ublo-lib 1.35.19 → 1.36.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 (120) hide show
  1. package/es/common/components/scrolling-carousel/scrolling-carousel.module.css +4 -0
  2. package/es/lbm/components/instant-search/facet-switch.d.ts +8 -0
  3. package/es/lbm/components/instant-search/facet-switch.d.ts.map +1 -0
  4. package/es/lbm/components/instant-search/facet-switch.js +15 -0
  5. package/es/lbm/components/instant-search/facet-switch.module.css +19 -0
  6. package/es/lbm/components/instant-search/faqs.d.ts +12 -0
  7. package/es/lbm/components/instant-search/faqs.d.ts.map +1 -0
  8. package/es/lbm/components/instant-search/faqs.js +44 -0
  9. package/es/lbm/components/instant-search/faqs.module.css +102 -0
  10. package/es/lbm/components/instant-search/hooks/use-constant.d.ts +2 -0
  11. package/es/lbm/components/instant-search/hooks/use-constant.d.ts.map +1 -0
  12. package/es/lbm/components/instant-search/hooks/use-constant.js +8 -0
  13. package/es/lbm/components/instant-search/hooks/use-debounced-search.d.ts +11 -0
  14. package/es/lbm/components/instant-search/hooks/use-debounced-search.d.ts.map +1 -0
  15. package/es/lbm/components/instant-search/hooks/use-debounced-search.js +12 -0
  16. package/es/lbm/components/instant-search/hooks/use-search.d.ts +17 -0
  17. package/es/lbm/components/instant-search/hooks/use-search.d.ts.map +1 -0
  18. package/es/lbm/components/instant-search/hooks/use-search.js +10 -0
  19. package/es/lbm/components/instant-search/i18n.json +32 -0
  20. package/es/lbm/components/instant-search/index.d.ts +3 -0
  21. package/es/lbm/components/instant-search/index.d.ts.map +1 -0
  22. package/es/lbm/components/instant-search/index.js +2 -0
  23. package/es/lbm/components/instant-search/instant-search.d.ts +19 -0
  24. package/es/lbm/components/instant-search/instant-search.d.ts.map +1 -0
  25. package/es/lbm/components/instant-search/instant-search.js +64 -0
  26. package/es/lbm/components/instant-search/instant-search.module.css +8 -0
  27. package/es/lbm/components/instant-search/links.d.ts +12 -0
  28. package/es/lbm/components/instant-search/links.d.ts.map +1 -0
  29. package/es/lbm/components/instant-search/links.js +30 -0
  30. package/es/lbm/components/instant-search/links.module.css +96 -0
  31. package/es/lbm/components/instant-search/no-product.d.ts +6 -0
  32. package/es/lbm/components/instant-search/no-product.d.ts.map +1 -0
  33. package/es/lbm/components/instant-search/no-product.js +4 -0
  34. package/es/lbm/components/instant-search/products.d.ts +14 -0
  35. package/es/lbm/components/instant-search/products.d.ts.map +1 -0
  36. package/es/lbm/components/instant-search/products.js +47 -0
  37. package/es/lbm/components/instant-search/products.module.css +163 -0
  38. package/es/lbm/components/instant-search/results.d.ts +79 -0
  39. package/es/lbm/components/instant-search/results.d.ts.map +1 -0
  40. package/es/lbm/components/instant-search/results.js +34 -0
  41. package/es/lbm/components/instant-search/results.module.css +85 -0
  42. package/es/lbm/components/instant-search/search-input.d.ts +15 -0
  43. package/es/lbm/components/instant-search/search-input.d.ts.map +1 -0
  44. package/es/lbm/components/instant-search/search-input.js +56 -0
  45. package/es/lbm/components/instant-search/search-input.module.css +88 -0
  46. package/es/lbm/components/instant-search/services/api.d.ts +2 -0
  47. package/es/lbm/components/instant-search/services/api.d.ts.map +1 -0
  48. package/es/lbm/components/instant-search/services/api.js +22 -0
  49. package/es/lbm/components/instant-search/services/lumiplan-api.d.ts +9 -0
  50. package/es/lbm/components/instant-search/services/lumiplan-api.d.ts.map +1 -0
  51. package/es/lbm/components/instant-search/services/lumiplan-api.js +37 -0
  52. package/es/lbm/components/instant-search/services/messages.d.ts +2 -0
  53. package/es/lbm/components/instant-search/services/messages.d.ts.map +1 -0
  54. package/es/lbm/components/instant-search/services/messages.js +5 -0
  55. package/es/lbm/components/instant-search/services/utils.d.ts +4 -0
  56. package/es/lbm/components/instant-search/services/utils.d.ts.map +1 -0
  57. package/es/lbm/components/instant-search/services/utils.js +28 -0
  58. package/es/lbm/components/instant-search/widgets/access.d.ts +8 -0
  59. package/es/lbm/components/instant-search/widgets/access.d.ts.map +1 -0
  60. package/es/lbm/components/instant-search/widgets/access.js +29 -0
  61. package/es/lbm/components/instant-search/widgets/activity.d.ts +8 -0
  62. package/es/lbm/components/instant-search/widgets/activity.d.ts.map +1 -0
  63. package/es/lbm/components/instant-search/widgets/activity.js +74 -0
  64. package/es/lbm/components/instant-search/widgets/activity.module.css +6 -0
  65. package/es/lbm/components/instant-search/widgets/components/card.d.ts +11 -0
  66. package/es/lbm/components/instant-search/widgets/components/card.d.ts.map +1 -0
  67. package/es/lbm/components/instant-search/widgets/components/card.js +15 -0
  68. package/es/lbm/components/instant-search/widgets/components/card.module.css +60 -0
  69. package/es/lbm/components/instant-search/widgets/components/metric.d.ts +8 -0
  70. package/es/lbm/components/instant-search/widgets/components/metric.d.ts.map +1 -0
  71. package/es/lbm/components/instant-search/widgets/components/metric.js +6 -0
  72. package/es/lbm/components/instant-search/widgets/components/metric.module.css +12 -0
  73. package/es/lbm/components/instant-search/widgets/components/status-with-icon.d.ts +9 -0
  74. package/es/lbm/components/instant-search/widgets/components/status-with-icon.d.ts.map +1 -0
  75. package/es/lbm/components/instant-search/widgets/components/status-with-icon.js +5 -0
  76. package/es/lbm/components/instant-search/widgets/components/status-with-icon.module.css +12 -0
  77. package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts +9 -0
  78. package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts.map +1 -0
  79. package/es/lbm/components/instant-search/widgets/dawn-nights-openings.js +37 -0
  80. package/es/lbm/components/instant-search/widgets/dawn-nights-openings.module.css +33 -0
  81. package/es/lbm/components/instant-search/widgets/lift.d.ts +8 -0
  82. package/es/lbm/components/instant-search/widgets/lift.d.ts.map +1 -0
  83. package/es/lbm/components/instant-search/widgets/lift.js +52 -0
  84. package/es/lbm/components/instant-search/widgets/lift.module.css +6 -0
  85. package/es/lbm/components/instant-search/widgets/lifts.d.ts +8 -0
  86. package/es/lbm/components/instant-search/widgets/lifts.d.ts.map +1 -0
  87. package/es/lbm/components/instant-search/widgets/lifts.js +26 -0
  88. package/es/lbm/components/instant-search/widgets/msem-widget.d.ts +8 -0
  89. package/es/lbm/components/instant-search/widgets/msem-widget.d.ts.map +1 -0
  90. package/es/lbm/components/instant-search/widgets/msem-widget.js +31 -0
  91. package/es/lbm/components/instant-search/widgets/msem-widget.module.css +51 -0
  92. package/es/lbm/components/instant-search/widgets/openings.d.ts +8 -0
  93. package/es/lbm/components/instant-search/widgets/openings.d.ts.map +1 -0
  94. package/es/lbm/components/instant-search/widgets/openings.js +32 -0
  95. package/es/lbm/components/instant-search/widgets/slope.d.ts +8 -0
  96. package/es/lbm/components/instant-search/widgets/slope.d.ts.map +1 -0
  97. package/es/lbm/components/instant-search/widgets/slope.js +73 -0
  98. package/es/lbm/components/instant-search/widgets/slope.module.css +26 -0
  99. package/es/lbm/components/instant-search/widgets/slopes.d.ts +8 -0
  100. package/es/lbm/components/instant-search/widgets/slopes.d.ts.map +1 -0
  101. package/es/lbm/components/instant-search/widgets/slopes.js +26 -0
  102. package/es/lbm/components/instant-search/widgets/snow.d.ts +9 -0
  103. package/es/lbm/components/instant-search/widgets/snow.d.ts.map +1 -0
  104. package/es/lbm/components/instant-search/widgets/snow.js +25 -0
  105. package/es/lbm/components/instant-search/widgets/types.d.ts +27 -0
  106. package/es/lbm/components/instant-search/widgets/types.d.ts.map +1 -0
  107. package/es/lbm/components/instant-search/widgets/types.js +1 -0
  108. package/es/lbm/components/instant-search/widgets/weather.d.ts +9 -0
  109. package/es/lbm/components/instant-search/widgets/weather.d.ts.map +1 -0
  110. package/es/lbm/components/instant-search/widgets/weather.js +36 -0
  111. package/es/lbm/components/instant-search/widgets/weather.module.css +32 -0
  112. package/es/lbm/components/instant-search/widgets/webcam.d.ts +8 -0
  113. package/es/lbm/components/instant-search/widgets/webcam.d.ts.map +1 -0
  114. package/es/lbm/components/instant-search/widgets/webcam.js +9 -0
  115. package/es/lbm/components/instant-search/widgets/webcam.module.css +13 -0
  116. package/es/lbm/components/instant-search/widgets.d.ts +11 -0
  117. package/es/lbm/components/instant-search/widgets.d.ts.map +1 -0
  118. package/es/lbm/components/instant-search/widgets.js +68 -0
  119. package/es/lbm/components/instant-search/widgets.module.css +14 -0
  120. package/package.json +3 -3
@@ -53,3 +53,7 @@ svg.controlIcon {
53
53
  .inner > :global(.cms) > :global(section) {
54
54
  scroll-snap-align: start;
55
55
  }
56
+
57
+ .inner > :global(.cms) > :global(section:last-child) {
58
+ scroll-snap-align: end;
59
+ }
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ lang: string;
3
+ facet: number;
4
+ setFacet: (facet: number) => void;
5
+ };
6
+ export default function ThemeSwitch({ lang, facet, setFacet }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=facet-switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facet-switch.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/facet-switch.tsx"],"names":[],"mappings":"AAgBA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAsBnE"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Select from "dt-design-system/es/select";
3
+ import message from "./services/messages";
4
+ import styles from "./facet-switch.module.css";
5
+ export default function ThemeSwitch({ lang, facet, setFacet }) {
6
+ const facets = {
7
+ 0: { icon: "Snowflake", label: message(lang, "winter") },
8
+ 1: { icon: "Sun", label: message(lang, "summer") },
9
+ };
10
+ const options = Object.keys(facets).map((key) => {
11
+ return { value: key, label: facets[key].label };
12
+ });
13
+ const icon = facets[facet].icon;
14
+ return (_jsx(Select, { className: styles.select, icon: icon, options: options, value: facet.toString(), onValueChange: (value) => setFacet(Number(value)), compact: true }));
15
+ }
@@ -0,0 +1,19 @@
1
+ .select {
2
+ }
3
+
4
+ .select label > span {
5
+ display: none;
6
+ }
7
+
8
+ .label {
9
+ display: flex;
10
+ align-items: center;
11
+ gap: 6px;
12
+ }
13
+
14
+ .icon {
15
+ flex: 0 0 16px;
16
+ width: 16px;
17
+ height: 16px;
18
+ fill: currentColor;
19
+ }
@@ -0,0 +1,12 @@
1
+ import type { Hit } from "./results";
2
+ type Props = {
3
+ lang: string;
4
+ faqs: Hit[];
5
+ loading: boolean;
6
+ sendPlausibleGoal: (path: string) => void;
7
+ maximized: boolean;
8
+ setMaximized: (maximized: boolean) => void;
9
+ };
10
+ export default function Faqs({ lang, faqs, loading, sendPlausibleGoal, maximized, setMaximized, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=faqs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faqs.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/faqs.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IAEnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,KAAK,2CA4DP"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import Link from "ublo/link";
4
+ import Loader from "dt-design-system/es/loader";
5
+ import Button from "dt-design-system/es/button";
6
+ import * as Icons from "dt-design-system/es/icons";
7
+ import * as Ripple from "dt-design-system/es/ripple";
8
+ import message from "./services/messages";
9
+ import * as Utils from "./services/utils";
10
+ import styles from "./faqs.module.css";
11
+ const PLACEHOLDERS = [...new Array(1)];
12
+ export default function Faqs({ lang, faqs, loading, sendPlausibleGoal, maximized, setMaximized, }) {
13
+ const noResult = !loading && !faqs.length;
14
+ if (noResult)
15
+ return null;
16
+ const toggleMaximized = () => {
17
+ setMaximized(!maximized);
18
+ };
19
+ const hasMultipleFaqs = faqs.length > 1;
20
+ const ButtonIcon = Icons[maximized ? "ChevronsDown" : "ChevronsUp"];
21
+ const buttonLabel = message(lang, maximized ? "hideAllFAQs" : "showAllFAQs");
22
+ const firstFaq = faqs?.[0];
23
+ const otherFaqs = faqs.slice(1);
24
+ const classes = classNames(styles.faqs, {
25
+ [styles.maximized]: maximized,
26
+ });
27
+ return (_jsxs("div", { className: classes, children: [_jsxs("div", { className: styles.header, children: [_jsx("div", { className: styles.title, children: message(lang, "faqs") }), hasMultipleFaqs && (_jsxs(Button, { onClick: toggleMaximized, compact: true, children: [_jsx(ButtonIcon, {}), buttonLabel, " (", faqs.length, ")", _jsx(ButtonIcon, {})] }))] }), _jsxs("div", { className: styles.preview, children: [loading &&
28
+ PLACEHOLDERS.map((_, i) => {
29
+ return (_jsx("div", { className: styles.loaderContainer, children: _jsx(Loader, { className: styles.loader, variant: "overlay" }) }, i));
30
+ }), !loading && firstFaq && (_jsx(Faq, { faq: firstFaq, sendPlausibleGoal: sendPlausibleGoal }))] }), maximized && (_jsx("div", { className: styles.list, children: otherFaqs.map((faq) => {
31
+ return (_jsx(Faq, { faq: faq, sendPlausibleGoal: sendPlausibleGoal }, faq.document.path));
32
+ }) }))] }));
33
+ }
34
+ function Faq({ faq, sendPlausibleGoal }) {
35
+ const { document, highlight } = faq;
36
+ const { title, text, path } = document;
37
+ const decodedPath = decodeURIComponent(path);
38
+ const faqTitle = Utils.wrapWithMark(title, highlight.title?.matched_tokens);
39
+ const faqText = Utils.wrapWithMark(text, highlight.text?.matched_tokens);
40
+ const createRipple = (e) => {
41
+ Ripple.create(e);
42
+ };
43
+ return (_jsxs(Link, { className: styles.faq, href: decodedPath, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx("div", { className: styles.faqTitle, dangerouslySetInnerHTML: { __html: faqTitle } }), _jsx("div", { className: styles.faqText, dangerouslySetInnerHTML: { __html: faqText } })] }));
44
+ }
@@ -0,0 +1,102 @@
1
+ .faqs {
2
+ position: sticky;
3
+ bottom: 0;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 12px;
7
+ margin-top: auto;
8
+ padding: 12px;
9
+ background-color: var(--ds-grey-000, #fff);
10
+ border-top: var(--ds-input-border, 1px solid var(--ds-grey-300, #d7d7d7));
11
+ }
12
+
13
+ .faqs.maximized {
14
+ flex: 1 1 100%;
15
+ transform: translateY(-1px);
16
+ }
17
+
18
+ .header {
19
+ align-self: flex-start;
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 8px;
23
+ }
24
+
25
+ .title {
26
+ font-size: 17px;
27
+ font-weight: 700;
28
+ padding: 3px 8px;
29
+ background-color: var(--ds-grey-200, #efefef);
30
+ border-radius: var(--ds-radius-100, 6px);
31
+ }
32
+
33
+ .list {
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 12px;
37
+ }
38
+
39
+ .loaderContainer {
40
+ position: relative;
41
+ width: 100%;
42
+ height: 52px;
43
+ border-radius: var(--ds-radius-100, 6px);
44
+ }
45
+
46
+ .faq {
47
+ position: relative;
48
+ display: flex;
49
+ flex-direction: column;
50
+ gap: 8px;
51
+ padding: 6px 6px 6px 12px;
52
+ color: var(--ds-grey-500, #484848);
53
+ border-radius: var(--ds-radius-100, 6px);
54
+ transition: background-color 160ms
55
+ var(--ds-transition-easing, cubic-bezier(0.4, 0, 0.2, 1));
56
+ }
57
+
58
+ .faq:is(:hover, :focus) {
59
+ background-color: var(--ds-grey-100, #f5f5f5);
60
+ }
61
+
62
+ .faq::before {
63
+ content: "";
64
+ position: absolute;
65
+ top: 15%;
66
+ left: 0;
67
+ height: 70%;
68
+ width: 2px;
69
+ background-color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
70
+ opacity: 0.5;
71
+ }
72
+
73
+ .faqTitle {
74
+ font-size: 15px;
75
+ font-weight: 700;
76
+ }
77
+
78
+ .faqText {
79
+ font-size: 14px;
80
+ }
81
+
82
+ .faqTitle mark,
83
+ .faqText mark {
84
+ position: relative;
85
+ display: inline-block;
86
+ font-weight: 700;
87
+ color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
88
+ background-color: transparent;
89
+ }
90
+
91
+ .faqTitle mark::before,
92
+ .faqText mark::before {
93
+ content: "";
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+ width: 100%;
98
+ height: 100%;
99
+ background-color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
100
+ border-radius: calc(var(--ds-radius-100, 6px) / 3);
101
+ opacity: 0.15;
102
+ }
@@ -0,0 +1,2 @@
1
+ export default function useConstant(fn: any): any;
2
+ //# sourceMappingURL=use-constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-constant.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/hooks/use-constant.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,EAAE,GAAG,OAQ1C"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export default function useConstant(fn) {
3
+ const ref = React.useRef();
4
+ if (!ref.current) {
5
+ ref.current = { v: fn() };
6
+ }
7
+ return ref.current.v;
8
+ }
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ type SearchFunction = (text: string, facet: number) => Promise<any>;
3
+ export default function useDebouncedSearch(searchFunction: SearchFunction): {
4
+ text: string;
5
+ setText: React.Dispatch<React.SetStateAction<string>>;
6
+ facet: number;
7
+ setFacet: React.Dispatch<React.SetStateAction<number>>;
8
+ search: import("react-async-hook").UseAsyncReturn<any, any[]>;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=use-debounced-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debounced-search.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/hooks/use-debounced-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,cAAc,EAAE,cAAc;;;;;;EAcxE"}
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import debouncePromise from "awesome-debounce-promise";
3
+ import { useAsync } from "react-async-hook";
4
+ import useConstant from "./use-constant";
5
+ const DEBOUNCE_AMOUNT = 400;
6
+ export default function useDebouncedSearch(searchFunction) {
7
+ const [text, setText] = React.useState("");
8
+ const [facet, setFacet] = React.useState(0);
9
+ const debouncedSearchFunction = useConstant(() => debouncePromise(searchFunction, DEBOUNCE_AMOUNT));
10
+ const search = useAsync(async () => text.length === 0 ? undefined : debouncedSearchFunction(text, facet), [debouncedSearchFunction, text, facet], { setLoading: (state) => ({ ...state, loading: true }) });
11
+ return { text, setText, facet, setFacet, search };
12
+ }
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ export type SearchOptions = {
3
+ groupLimit?: number;
4
+ page?: number;
5
+ perPage?: number;
6
+ queryBy?: string;
7
+ queryByWeights?: string;
8
+ sortBy?: string;
9
+ };
10
+ export default function useSearch(lang: string, options?: SearchOptions): {
11
+ text: string;
12
+ setText: import("react").Dispatch<import("react").SetStateAction<string>>;
13
+ facet: number;
14
+ setFacet: import("react").Dispatch<import("react").SetStateAction<number>>;
15
+ search: import("react-async-hook").UseAsyncReturn<any, any[]>;
16
+ };
17
+ //# sourceMappingURL=use-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-search.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/instant-search/hooks/use-search.ts"],"names":[],"mappings":";AAOA,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB;;;;;;EAY1E"}
@@ -0,0 +1,10 @@
1
+ import getConfig from "next/config";
2
+ import useDebouncedSearch from "./use-debounced-search";
3
+ import * as API from "../services/api";
4
+ const { publicRuntimeConfig } = getConfig();
5
+ const { site } = publicRuntimeConfig;
6
+ export default function useSearch(lang, options = {}) {
7
+ return useDebouncedSearch(async (query, facet) => {
8
+ return API.fetchResults(site, lang, query, facet, options.groupLimit, options.queryBy, options.queryByWeights);
9
+ });
10
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "fr": {
3
+ "try": "Essayez",
4
+ "pages": "Pages",
5
+ "faqs": "Questions fréquentes",
6
+ "information": "Informations",
7
+ "documents": "Documents",
8
+ "noProducts": "Pas de produit correspondant",
9
+ "showOtherResults": "Afficher les autres résultats",
10
+ "winter": "Hiver",
11
+ "summer": "Été",
12
+ "results": "résultats pour",
13
+ "result": "résultat pour",
14
+ "showAllFAQs": "Tout afficher",
15
+ "hideAllFAQs": "Réduire"
16
+ },
17
+ "en": {
18
+ "try": "Try",
19
+ "pages": "Pages",
20
+ "faqs": "FAQs",
21
+ "information": "Information",
22
+ "documents": "Documents",
23
+ "noProducts": "No matching product",
24
+ "showOtherResults": "Show other results",
25
+ "winter": "Winter",
26
+ "summer": "Summer",
27
+ "results": "results for",
28
+ "result": "result for",
29
+ "showAllFAQs": "Show all",
30
+ "hideAllFAQs": "Hide all"
31
+ }
32
+ }
@@ -0,0 +1,3 @@
1
+ import InstantSearch from "./instant-search";
2
+ export default InstantSearch;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ import InstantSearch from "./instant-search";
2
+ export default InstantSearch;
@@ -0,0 +1,19 @@
1
+ import { type SearchOptions } from "./hooks/use-search";
2
+ type Props = {
3
+ lang: string;
4
+ className?: string;
5
+ ubloContext: {
6
+ lang: string;
7
+ cmsMode: "connected" | "editing" | "info";
8
+ metadata: Record<string, string>;
9
+ path: string;
10
+ };
11
+ suggestions?: {
12
+ fr?: string[];
13
+ en?: string[];
14
+ };
15
+ options?: SearchOptions;
16
+ };
17
+ export default function InstantSearch({ lang, suggestions, className, options, }: Props): import("react/jsx-runtime").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=instant-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instant-search.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/instant-search.tsx"],"names":[],"mappings":"AAOA,OAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;QAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,SAAS,EACT,OAAY,GACb,EAAE,KAAK,2CAmGP"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import classNames from "classnames";
4
+ import Router from "next/router";
5
+ import Input from "dt-design-system/es/input";
6
+ import Dialog from "dt-design-system/es/dialog";
7
+ import SearchInput from "./search-input";
8
+ import Results from "./results";
9
+ import useSearch from "./hooks/use-search";
10
+ import * as Plausible from "../../../common/components/plausible";
11
+ import css from "./instant-search.module.css";
12
+ export default function InstantSearch({ lang, suggestions, className, options = {}, }) {
13
+ const [opened, setOpened] = React.useState(false);
14
+ const { text, setText, facet, setFacet, search } = useSearch(lang, options);
15
+ const classes = classNames(css.search, className);
16
+ const openSearch = () => {
17
+ setOpened(true);
18
+ document.body.style.setProperty("overflow", "hidden");
19
+ };
20
+ const closeSearch = (skipEvent) => {
21
+ setOpened(false);
22
+ setText("");
23
+ document.body.style.removeProperty("overflow");
24
+ if (!skipEvent) {
25
+ const event = search?.result?.length === 0 ? "Search failed" : "Search canceled";
26
+ if (text.length > 0) {
27
+ Plausible.sendGoal(event, {
28
+ Terms: text,
29
+ });
30
+ }
31
+ }
32
+ };
33
+ const sendPlausibleGoal = (path) => () => {
34
+ Plausible.sendGoal("Search", {
35
+ "Terms - Destination": `${text} - ${path}`,
36
+ });
37
+ };
38
+ Router.ready(() => {
39
+ Router.events.on("routeChangeStart", () => {
40
+ if (opened) {
41
+ closeSearch(true);
42
+ }
43
+ });
44
+ });
45
+ const handleKeyPresses = React.useCallback((e) => {
46
+ const allowedKeys = ["k"];
47
+ const { code, ctrlKey, key, metaKey } = e;
48
+ const isAllowed = (ctrlKey || metaKey) &&
49
+ (allowedKeys.includes(code) || allowedKeys.includes(key));
50
+ if (!isAllowed)
51
+ return;
52
+ e.preventDefault();
53
+ if (key === "k" && (ctrlKey || metaKey)) {
54
+ openSearch();
55
+ }
56
+ }, []);
57
+ React.useEffect(() => {
58
+ window.addEventListener("keydown", handleKeyPresses);
59
+ return () => {
60
+ window.removeEventListener("keydown", handleKeyPresses);
61
+ };
62
+ }, [handleKeyPresses]);
63
+ return (_jsxs(_Fragment, { children: [_jsx(Input, { icon: "Search", placeholder: "Que recherchez-vous ?", className: classes, onClick: openSearch, readOnly: true }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: closeSearch, container: "body", showAsModal: false, children: [_jsx(SearchInput, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, facet: facet, setFacet: setFacet, results: search.result, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal })] })] }));
64
+ }
@@ -0,0 +1,8 @@
1
+ .dialog {
2
+ width: 1400px;
3
+ max-width: calc(100% - 6px);
4
+ max-height: calc(100% - 6px);
5
+ background-color: transparent;
6
+ box-shadow: none;
7
+ pointer-events: auto;
8
+ }
@@ -0,0 +1,12 @@
1
+ import type { Hit } from "./results";
2
+ type Props = {
3
+ linksTitle: string;
4
+ icon: "FileText" | "Info" | "Question" | "User" | "File";
5
+ links: Hit[];
6
+ pageTitleAsTitle?: boolean;
7
+ loading: boolean;
8
+ sendPlausibleGoal: (path: string) => void;
9
+ };
10
+ export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loading, sendPlausibleGoal, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/links.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACzD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,iBAAiB,GAClB,EAAE,KAAK,2CAmEP"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from "ublo/link";
3
+ import Loader from "dt-design-system/es/loader";
4
+ import * as Icons from "dt-design-system/es/icons";
5
+ import * as Ripple from "dt-design-system/es/ripple";
6
+ import * as Utils from "./services/utils";
7
+ import css from "./links.module.css";
8
+ const PLACEHOLDERS = [...new Array(3)];
9
+ export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loading, sendPlausibleGoal, }) {
10
+ const Icon = Icons[icon];
11
+ const noResult = !loading && !links.length;
12
+ const createRipple = (e) => {
13
+ Ripple.create(e);
14
+ };
15
+ if (noResult)
16
+ return null;
17
+ return (_jsxs("div", { className: css.linksSection, children: [_jsx("div", { className: css.linksTitle, children: linksTitle }), _jsxs("div", { className: css.links, children: [loading &&
18
+ PLACEHOLDERS.map((_, i) => {
19
+ return (_jsx("div", { className: css.loaderContainer, children: _jsx(Loader, { className: css.loader, variant: "overlay" }) }, i));
20
+ }), !loading &&
21
+ links.map((link) => {
22
+ const { id, text, parentTitle, path, target } = link.document;
23
+ const decodedPath = decodeURIComponent(target || path);
24
+ const titleProperty = pageTitleAsTitle ? "pageTitle" : "title";
25
+ const linkTitle = Utils.getHighlight(titleProperty, link.highlight) ||
26
+ link.document[titleProperty].trim();
27
+ const linkText = Utils.getHighlight("text", link.highlight, true) || text?.trim();
28
+ return (_jsxs(Link, { href: decodedPath, className: css.link, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Icon, { className: css.linkIcon }), _jsxs("div", { className: css.linkContent, children: [parentTitle && (_jsx("div", { className: css.linkParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsx("div", { className: css.linkTitle, dangerouslySetInnerHTML: { __html: linkTitle } }), linkText && (_jsx("div", { className: css.linkText, dangerouslySetInnerHTML: { __html: linkText } }))] })] }, id));
29
+ })] })] }));
30
+ }
@@ -0,0 +1,96 @@
1
+ .linksSection {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 6px;
5
+ }
6
+
7
+ .linksTitle {
8
+ position: sticky;
9
+ top: 16px;
10
+ font-size: 17px;
11
+ font-weight: 700;
12
+ padding: 3px 8px;
13
+ background-color: var(--ds-grey-200, #efefef);
14
+ border-radius: var(--ds-radius-100, 6px);
15
+ z-index: 1;
16
+ }
17
+
18
+ @media (min-width: 730px) {
19
+ .linksTitle {
20
+ top: 0;
21
+ }
22
+ }
23
+
24
+ .links {
25
+ display: flex;
26
+ flex-direction: column;
27
+ gap: 6px;
28
+ }
29
+
30
+ .loaderContainer {
31
+ position: relative;
32
+ width: 100%;
33
+ height: 44px;
34
+ border-radius: var(--ds-radius-100, 6px);
35
+ }
36
+
37
+ .link {
38
+ position: relative;
39
+ display: flex;
40
+ gap: 10px;
41
+ padding: 6px;
42
+ color: var(--ds-grey-500, #484848);
43
+ border-radius: var(--ds-radius-100, 6px);
44
+ transition: background-color 160ms
45
+ var(--ds-transition-easing, cubic-bezier(0.4, 0, 0.2, 1));
46
+ }
47
+
48
+ .link:is(:hover, :focus) {
49
+ background-color: var(--ds-grey-100, #f5f5f5);
50
+ }
51
+
52
+ .linkIcon {
53
+ flex: 0 0 16px;
54
+ width: 16px;
55
+ height: 16px;
56
+ margin-top: 2px;
57
+ fill: currentColor;
58
+ }
59
+
60
+ .linkContent {
61
+ flex: 1 1 auto;
62
+ }
63
+
64
+ .linkTitle {
65
+ font-size: 15px;
66
+ }
67
+
68
+ .link mark {
69
+ position: relative;
70
+ display: inline-block;
71
+ font-weight: 700;
72
+ color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
73
+ background-color: transparent;
74
+ }
75
+
76
+ .link mark::before {
77
+ content: "";
78
+ position: absolute;
79
+ top: 0;
80
+ left: 0;
81
+ width: 100%;
82
+ height: 100%;
83
+ background-color: var(--ds-secondary, var(--ds-blue-400, #4177f6));
84
+ border-radius: calc(var(--ds-radius-100, 6px) / 3);
85
+ opacity: 0.15;
86
+ }
87
+
88
+ .linkParent {
89
+ text-transform: uppercase;
90
+ font-size: 10px;
91
+ }
92
+
93
+ .linkText {
94
+ font-size: 12px;
95
+ white-space: pre-wrap;
96
+ }
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ className?: string;
3
+ };
4
+ export default function NoProduct({ className }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=no-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-product.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/no-product.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,KAAK,2CA2FrD"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export default function NoProduct({ className }) {
3
+ return (_jsxs("svg", { width: "200", height: "200", viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: [_jsx("path", { d: "M100.5 184.3a85.8 85.8 0 1 0 0-171.5 85.8 85.8 0 0 0 0 171.5Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M100.5 11a87.5 87.5 0 1 0 0 175 87.5 87.5 0 0 0 0-175Zm0 3.5a84 84 0 1 1 0 168 84 84 0 0 1 0-168Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M161.4 61.5c1 0 1.8-.8 1.8-1.8V46.1a4.7 4.7 0 0 0-4.7-4.7H26a4.7 4.7 0 0 0-4.7 4.7v34.3c0 1 .8 1.8 1.8 1.8h61.5c.4 0 .8-.1 1.1-.4l26.4-20.3h49.3Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M138.4 59.7h-25.5L84.6 80.4H45.3V25.7a3 3 0 0 1 2.9-2.9h64.7l25.5 27.5v9.4Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M112.9 21H48.2a4.7 4.7 0 0 0-4.7 4.7v54.7c0 1 .8 1.8 1.8 1.8h39.3c.4 0 .8-.1 1-.3l27.8-20.4h25c1 0 1.8-.8 1.8-1.8V50l-.1-.3-.2-.3v-.2l-.2-.1L114 21.6l-.1-.2-.4-.2h-.1l-.3-.1H113Zm-1.8 3.6H48.2c-.6 0-1.2.5-1.2 1.1v53h37l27.8-20.4c.3-.2.7-.3 1-.3h23.8v-6H113c-1 0-1.8-.8-1.8-1.7V24.6Zm-51 44.8h25.7a1.8 1.8 0 0 0 0-3.5H60.2a1.8 1.8 0 0 0 0 3.5Zm0-16h22a1.8 1.8 0 0 0 0-3.5H60a1.8 1.8 0 0 0 0 3.5Zm0-8.4h37.4a1.8 1.8 0 0 0 0-3.6H60.2a1.8 1.8 0 0 0 0 3.6Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.8 84a3 3 0 0 1 2.9-3.6h76.5a3 3 0 0 0 1.7-.5l26.4-19.6a3 3 0 0 1 1.8-.6h64.7a3 3 0 0 1 3 3.5c-2.9 16-14.4 83-16.8 96.7a3 3 0 0 1-2.9 2.4H25.4a3 3 0 0 1-2.9-2.2L4.8 84Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m3.1 84.4 17.7 76a4.7 4.7 0 0 0 4.6 3.7h136.7c2.3 0 4.2-1.7 4.6-4l16.7-96.6a4.7 4.7 0 0 0-4.6-5.5h-64.7c-1 0-2 .3-2.8.9a1130716.6 1130716.6 0 0 1-27.1 19.8H7.7a4.7 4.7 0 0 0-4.6 5.7Zm3.5-.8a1.2 1.2 0 0 1 1.1-1.4h76.5c1 0 2-.3 2.8-1a724489.6 724489.6 0 0 1 27-19.7h64.8a1.2 1.2 0 0 1 1.2 1.4l-16.7 96.7c-.1.6-.6 1-1.2 1H25.4c-.5 0-1-.4-1.1-1l-17.7-76Z", fill: "#D7D7D7" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M159.7 161a36.5 36.5 0 0 1-46.5-4 36.6 36.6 0 0 1 .4-51.8 36.6 36.6 0 0 1 51.7-.4 36.5 36.5 0 0 1 4 46.5l25 24.9c2.6 2.6 2.6 7 0 9.6a6.8 6.8 0 0 1-9.7 0l-25-24.9Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m159.5 163.2 23.8 23.9a8.6 8.6 0 0 0 12.2 0 8.6 8.6 0 0 0 0-12.2L171.6 151a38.2 38.2 0 0 0-5-47.4 38.3 38.3 0 0 0-54.2.4 38.3 38.3 0 0 0-.4 54.2 38.2 38.2 0 0 0 47.5 5Zm1.4-3.5c-.6-.6-1.5-.7-2.2-.2a34.7 34.7 0 0 1-44.2-3.8 34.8 34.8 0 0 1 .4-49.2 34.8 34.8 0 0 1 49.2-.4c12 11.9 13.1 30.5 3.8 44.2-.5.7-.4 1.6.2 2.2l24.9 25c2 1.9 2 5.1 0 7a5 5 0 0 1-7.2 0L161 159.8Z", fill: "#D7D7D7" }), _jsx("path", { d: "M163.5 130.8a24.4 24.4 0 0 0-24.2-24.6c-13.4 0-24.3 11-24.3 24.6a24.4 24.4 0 0 0 24.3 24.6c13.3 0 24.2-11 24.2-24.6Z", fill: "#EDEDED" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M113.3 130.8a26.2 26.2 0 0 0 26 26.4c14.3 0 26-11.8 26-26.4a26.2 26.2 0 0 0-26-26.4c-14.4 0-26 11.8-26 26.4Zm3.5 0c0-12.6 10-22.8 22.5-22.8a22.7 22.7 0 0 1 22.4 22.8c0 12.6-10 22.9-22.4 22.9a22.7 22.7 0 0 1-22.5-22.9Z", fill: "#D7D7D7" }), _jsx("path", { opacity: ".7", fillRule: "evenodd", clipRule: "evenodd", d: "M117 121c.7-1.4 13.9 1.6 22.3 9.9 8.1 8 11.4 21.4 10.2 22-9.1 4.3-20.2 2.7-27.6-4.7-7.4-7.3-9-18.3-4.8-27.3Z", fill: "#fff" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M120.9 112.5a26.2 26.2 0 0 0-.3 37 26.2 26.2 0 0 0 37-.2 26.2 26.2 0 0 0 .3-37 26.2 26.2 0 0 0-37 .2Zm2.5 2.5c9-9 23.3-9 32-.3a22.7 22.7 0 0 1-.2 32c-9 9-23.3 9.1-32 .3a22.7 22.7 0 0 1 .2-32Z", fill: "#D7D7D7" }), _jsx("path", { d: "M140.2 142.1c1.4 0 2.4 1 2.4 2.4 0 1.3-1 2.3-2.4 2.3-1.3 0-2.3-1-2.3-2.3 0-1.3 1-2.4 2.3-2.4Zm.1-20.5V117a9.5 9.5 0 0 0-9.4 6.8v.2l4.5 1v.1l-4.6-1.1c-.3 1.2.5 2.5 1.8 2.8 1.2.3 2.5-.5 2.8-1.7l.2-.5.7-1.2c.7-.8 1.8-1.7 4-1.7Zm9.4 5.1a9.3 9.3 0 0 0-9.4-9.8v4.7c.6 0 1.8.2 2.9 1 .9.6 1.8 1.7 1.8 4.1 0 .5-.2 1-.7 1.6-.5.6-1.3 1.2-2.2 1.7a18.4 18.4 0 0 1-3.4 1.5h-.3c-1.2.4-2 1.8-1.6 3 .4 1.3 1.7 2 3 1.6l-.7-2.2-.4-1.4-.2-.6V131.6l.6 2.3.6 2.2h.2a11.6 11.6 0 0 0 1.3-.5c.9-.3 2-.8 3.2-1.5 1.2-.6 2.4-1.5 3.4-2.7a7 7 0 0 0 2-4.7Z", fill: "#D7D7D7" })] }));
4
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import type { Hit } from "./results";
3
+ type Props = {
4
+ lang: string;
5
+ products: Hit[];
6
+ loading: boolean;
7
+ sendPlausibleGoal: (path: string) => void;
8
+ otherResultsRef: React.RefObject<HTMLDivElement>;
9
+ isOtherResultsEmpty: boolean;
10
+ faqsMaximized: boolean;
11
+ };
12
+ export default function Products({ lang, products, loading, sendPlausibleGoal, otherResultsRef, isOtherResultsEmpty, faqsMaximized, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=products.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,EAAE,KAAK,2CAkIP"}