@depict-ai/react-ui 0.0.75 → 0.0.77
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/index.d.ts +42 -103
- package/dist/main.js +16 -16
- package/dist/module.js +12 -12
- package/dist/styles/components/PLP/Buttons.scss +2 -2
- package/dist/styles/components/PLP/MorphingSign.scss +1 -1
- package/dist/styles/components/PLP/PLPResults.scss +1 -0
- package/dist/styles/components/PLP/ScrollStatus.scss +1 -1
- package/dist/styles/components/PLP/SelectedFilters.scss +3 -3
- package/dist/styles/components/PLP/SlidableItems.scss +1 -1
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +1 -1
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +38 -26
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +2 -2
- package/dist/styles/components/PLP/Toast.scss +2 -2
- package/dist/styles/components/category/BreadCrumbs.scss +3 -3
- package/dist/styles/components/category/CategoryTitle.scss +1 -1
- package/dist/styles/components/category/QuickLinks.scss +2 -2
- package/dist/styles/components/search/Autocomplete.scss +7 -7
- package/dist/styles/components/search/CategorySuggestions.scss +1 -1
- package/dist/styles/components/search/PreviousSearches.scss +3 -3
- package/dist/styles/components/search/SearchField.scss +28 -9
- package/dist/styles/default.css +1 -1
- package/dist/styles/helpers/color_inference.scss +112 -0
- package/dist/styles/helpers/custom_input.scss +1 -1
- package/dist/styles/helpers/utils.scss +14 -0
- package/dist/styles/index.scss +13 -5
- package/dist/styles/package.json +31 -0
- package/dist/styles/variables.scss +113 -67
- package/dist-server/index.d.ts +8 -8
- package/dist-server/main.js +12 -12
- package/dist-server/module.js +8 -8
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseProductListingConfig, BaseProviderConfig, BaseSearchProviderConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products } from "@depict-ai/ui";
|
|
2
2
|
import { Display } from "@depict-ai/utilishared";
|
|
3
3
|
import React, { ReactNode, PropsWithChildren, ReactElement } from "react";
|
|
4
4
|
import { Locale } from "@depict-ai/ui/locales";
|
|
5
|
-
export const version = "0.0.
|
|
6
|
-
interface PLPConfig<T extends Display> {
|
|
5
|
+
export const version = "0.0.77";
|
|
6
|
+
interface PLPConfig<T extends Display> extends BaseProductListingConfig {
|
|
7
7
|
/**
|
|
8
8
|
* The product card to use for rendering products.
|
|
9
9
|
*/
|
|
10
10
|
productCard: DepictProductCard<T>;
|
|
11
|
-
/**
|
|
12
|
-
* How many columns to show at each media size.
|
|
13
|
-
* @default
|
|
14
|
-
* [[2, 901], [3, 1024], [4]]
|
|
15
|
-
* @example
|
|
16
|
-
* [[2, 901], [3, 1024], [4]]
|
|
17
|
-
* means 2 columns at sizes up to 901px, 3 columns at sizes up to 1024px and after that 4 columns at any size.
|
|
18
|
-
*/
|
|
19
|
-
columnsAtSize?: SDKColsAtSize;
|
|
20
|
-
/**
|
|
21
|
-
* The spacing between products.
|
|
22
|
-
* @default "2%"
|
|
23
|
-
* @example
|
|
24
|
-
* "2%", "10px", "1rem", {horizontal: "1%", vertical: "5px"}
|
|
25
|
-
*/
|
|
26
|
-
gridSpacing?: SDKGridSpacing;
|
|
27
11
|
}
|
|
28
12
|
/**
|
|
29
13
|
* The Depict product card props.
|
|
@@ -37,35 +21,10 @@ export interface DepictProductCardProps<T extends Display> {
|
|
|
37
21
|
*/
|
|
38
22
|
export type DepictProductCard<T extends Display> = (props: DepictProductCardProps<T>) => ReactNode;
|
|
39
23
|
type NavigateFunction = (relativeUrl: string) => void;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*/
|
|
45
|
-
searchPagePath: string;
|
|
46
|
-
/**
|
|
47
|
-
* The name of the url parameter that will be used for the search query.
|
|
48
|
-
* @example "q", "search_query"
|
|
49
|
-
* @default "search_query"
|
|
50
|
-
*/
|
|
51
|
-
urlParamName?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to enable category suggestions in the search modal and search page.
|
|
54
|
-
* @default false
|
|
55
|
-
*/
|
|
56
|
-
enableCategorySuggestions?: boolean;
|
|
57
|
-
};
|
|
58
|
-
type DepictBaseConfig = {
|
|
59
|
-
/**
|
|
60
|
-
* The merchant to use for the search.
|
|
61
|
-
* @example "YOUR_MERCHANT", "stronger"
|
|
62
|
-
*/
|
|
63
|
-
merchant: string;
|
|
64
|
-
/**
|
|
65
|
-
* The market to use for the search.
|
|
66
|
-
* @example "YOUR_MARKET", "no", "en-de"
|
|
67
|
-
*/
|
|
68
|
-
market: string;
|
|
24
|
+
/**
|
|
25
|
+
* The config for the DepictProvider.
|
|
26
|
+
*/
|
|
27
|
+
type ProviderConfig = BaseProviderConfig & {
|
|
69
28
|
/**
|
|
70
29
|
* The function to use for navigating to a new page.
|
|
71
30
|
* This function will be used internally by our components to navigate.
|
|
@@ -111,12 +70,7 @@ type DepictBaseConfig = {
|
|
|
111
70
|
* @default en
|
|
112
71
|
*/
|
|
113
72
|
locale?: Locale;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The config for the DepictProvider.
|
|
117
|
-
*/
|
|
118
|
-
type DepictConfig = DepictBaseConfig & {
|
|
119
|
-
search: DepictSearchConfig;
|
|
73
|
+
search: BaseSearchProviderConfig;
|
|
120
74
|
};
|
|
121
75
|
/**
|
|
122
76
|
* The DepictProvider is a wrapper component that should be used to wrap any component that uses Depict components.
|
|
@@ -143,28 +97,28 @@ type DepictConfig = DepictBaseConfig & {
|
|
|
143
97
|
* ```
|
|
144
98
|
* @returns {JSX.Element} The DepictProvider.
|
|
145
99
|
*/
|
|
146
|
-
export function DepictProvider(props: PropsWithChildren<
|
|
100
|
+
export function DepictProvider(props: PropsWithChildren<ProviderConfig>): import("react").FunctionComponentElement<{
|
|
147
101
|
children?: import("react").ReactNode;
|
|
148
102
|
}>;
|
|
149
103
|
/**
|
|
150
|
-
* A component used to align other Depict components
|
|
104
|
+
* A component used to align other Depict components to.
|
|
151
105
|
* @example
|
|
152
106
|
* Align the search modal
|
|
153
107
|
* ```tsx
|
|
154
108
|
* import React from "react";
|
|
155
|
-
* import {
|
|
109
|
+
* import { ComponentAligner, useSearchModal } from "@depict-ai/react-ui";
|
|
156
110
|
*
|
|
157
111
|
* const App = () => {
|
|
158
112
|
* const ref = React.createRef();
|
|
159
113
|
*
|
|
160
|
-
* const { open } =
|
|
114
|
+
* const { open } = useSearchModal({
|
|
161
115
|
* location: "aligned",
|
|
162
116
|
* alignerRef: ref,
|
|
163
117
|
* });
|
|
164
118
|
*
|
|
165
119
|
* return (
|
|
166
120
|
* <div>
|
|
167
|
-
* <
|
|
121
|
+
* <ComponentAligner ref={ref} />
|
|
168
122
|
* <button onClick={open}>Open</button>
|
|
169
123
|
* </div>
|
|
170
124
|
* );
|
|
@@ -172,24 +126,19 @@ export function DepictProvider(props: PropsWithChildren<DepictConfig>): import("
|
|
|
172
126
|
* ```
|
|
173
127
|
* @returns {JSX.Element}
|
|
174
128
|
*/
|
|
175
|
-
export const
|
|
176
|
-
interface SearchPageConfig<T extends Display> extends PLPConfig<T> {
|
|
177
|
-
/**
|
|
178
|
-
* Whether to show the search input field in the search page.
|
|
179
|
-
* @default true
|
|
180
|
-
*/
|
|
181
|
-
includeInputField?: boolean;
|
|
129
|
+
export const ComponentAligner: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
130
|
+
interface SearchPageConfig<T extends Display> extends BaseSearchPageConfig, PLPConfig<T> {
|
|
182
131
|
}
|
|
183
132
|
/**
|
|
184
|
-
*
|
|
133
|
+
* SearchPage is a component that renders a Depict search results page.
|
|
185
134
|
* @param props - The props for the search page.
|
|
186
135
|
*
|
|
187
136
|
* @example
|
|
188
137
|
* ```tsx
|
|
189
|
-
* import { DepictProductCard, ImagePlaceholder, Display,
|
|
138
|
+
* import { DepictProductCard, ImagePlaceholder, Display, SearchPage } from '@depict-ai/react-ui'
|
|
190
139
|
*
|
|
191
140
|
* function Search() {
|
|
192
|
-
* return <
|
|
141
|
+
* return <SearchPage productCard={MyCustomSearchProductCard} />
|
|
193
142
|
* }
|
|
194
143
|
*
|
|
195
144
|
* interface MyCustomDisplay extends Display {}
|
|
@@ -220,43 +169,33 @@ interface SearchPageConfig<T extends Display> extends PLPConfig<T> {
|
|
|
220
169
|
*
|
|
221
170
|
* ```
|
|
222
171
|
*/
|
|
223
|
-
export function
|
|
224
|
-
interface CategoryPageConfig<T extends Display> extends PLPConfig<T> {
|
|
172
|
+
export function SearchPage<T extends Display>(props: SearchPageConfig<T>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
173
|
+
interface CategoryPageConfig<T extends Display> extends BaseCategoryPageConfig, PLPConfig<T> {
|
|
225
174
|
/**
|
|
226
175
|
* The category id to show.
|
|
227
176
|
*/
|
|
228
177
|
categoryId: string;
|
|
229
|
-
/**
|
|
230
|
-
* Whether to show the breadcrumbs in the category page.
|
|
231
|
-
* @default true
|
|
232
|
-
*/
|
|
233
|
-
showBreadcrumbs?: boolean;
|
|
234
|
-
/**
|
|
235
|
-
* Whether to show the quicklinks in the category page.
|
|
236
|
-
* @default true
|
|
237
|
-
*/
|
|
238
|
-
showQuicklinks?: boolean;
|
|
239
178
|
/**
|
|
240
179
|
* categoryTitlePlugin is an optional plugin that can be used to customize the title of the category page.
|
|
241
180
|
* @default CategoryTitle
|
|
242
181
|
*
|
|
243
182
|
* @example
|
|
244
183
|
* ```tsx
|
|
245
|
-
* <
|
|
184
|
+
* <CategoryPage categoryId="jeans" productCard={MyCustomCategoryProductCard} categoryTitlePlugin={CategoryTitle} />
|
|
246
185
|
* ```
|
|
247
186
|
*/
|
|
248
187
|
categoryTitlePlugin?: typeof CategoryTitle | typeof embedded_num_products;
|
|
249
188
|
}
|
|
250
189
|
/**
|
|
251
|
-
*
|
|
190
|
+
* CategoryPage is a component that renders a Depict category page.
|
|
252
191
|
* @param props the props for the category page.
|
|
253
192
|
*
|
|
254
193
|
* @example
|
|
255
194
|
* ```tsx
|
|
256
|
-
* import { DepictProductCard, ImagePlaceholder, Display,
|
|
195
|
+
* import { DepictProductCard, ImagePlaceholder, Display, CategoryPage } from '@depict-ai/react-ui'
|
|
257
196
|
*
|
|
258
197
|
* function Category() {
|
|
259
|
-
* return <
|
|
198
|
+
* return <CategoryPage categoryId="jeans" productCard={MyCustomCategoryProductCard} />
|
|
260
199
|
* }
|
|
261
200
|
*
|
|
262
201
|
* interface MyCustomDisplay extends Display {}
|
|
@@ -286,7 +225,7 @@ interface CategoryPageConfig<T extends Display> extends PLPConfig<T> {
|
|
|
286
225
|
* }
|
|
287
226
|
* ```
|
|
288
227
|
*/
|
|
289
|
-
export function
|
|
228
|
+
export function CategoryPage<T extends Display>(props: CategoryPageConfig<T>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
290
229
|
/**
|
|
291
230
|
* BreadCrumbs is the "trail" in the header of a category page.
|
|
292
231
|
*/
|
|
@@ -343,19 +282,19 @@ interface UseSearchModalParams {
|
|
|
343
282
|
* @example
|
|
344
283
|
* ```tsx
|
|
345
284
|
import React from "react";
|
|
346
|
-
import {
|
|
285
|
+
import { ComponentAligner, useSearchModal } from "@depict-ai/react-ui";
|
|
347
286
|
|
|
348
287
|
const App = () => {
|
|
349
288
|
const ref = React.createRef();
|
|
350
289
|
|
|
351
|
-
const { open } =
|
|
290
|
+
const { open } = useSearchModal({
|
|
352
291
|
location: "aligned",
|
|
353
292
|
alignerRef: ref,
|
|
354
293
|
});
|
|
355
294
|
|
|
356
295
|
return (
|
|
357
296
|
<div>
|
|
358
|
-
<
|
|
297
|
+
<ComponentAligner ref={ref} />
|
|
359
298
|
<button onClick={open}>Open</button>
|
|
360
299
|
</div>
|
|
361
300
|
);
|
|
@@ -378,10 +317,10 @@ interface UseSearchModalReturn {
|
|
|
378
317
|
* Open a centered modal:
|
|
379
318
|
* ```tsx
|
|
380
319
|
* import React from "react";
|
|
381
|
-
* import {
|
|
320
|
+
* import { useSearchModal } from "@depict-ai/react-ui";
|
|
382
321
|
*
|
|
383
322
|
* const App = () => {
|
|
384
|
-
* const { open } =
|
|
323
|
+
* const { open } = useSearchModal({
|
|
385
324
|
* location: "centered",
|
|
386
325
|
* });
|
|
387
326
|
*
|
|
@@ -394,23 +333,23 @@ interface UseSearchModalReturn {
|
|
|
394
333
|
* ```
|
|
395
334
|
* @returns {JSX.Element}
|
|
396
335
|
*/
|
|
397
|
-
export function
|
|
336
|
+
export function useSearchModal(params?: UseSearchModalParams): UseSearchModalReturn;
|
|
398
337
|
interface SearchFieldProps {
|
|
399
338
|
/**
|
|
400
339
|
* A reference to the DOM element that the modal should be aligned to.
|
|
401
340
|
*
|
|
402
341
|
* The top of the modal will be aligned to the top of the element.
|
|
403
342
|
*
|
|
404
|
-
* The
|
|
343
|
+
* The height of the search field in the modal will be the same as the height of the element.
|
|
405
344
|
* If not provided, the modal will be aligned to the search field itself.
|
|
406
345
|
*/
|
|
407
346
|
alignerRef?: React.RefObject<HTMLElement>;
|
|
408
347
|
}
|
|
409
|
-
interface
|
|
348
|
+
interface UseSearchFieldReturn {
|
|
410
349
|
/**
|
|
411
350
|
* A React component that renders the search field.
|
|
412
351
|
*/
|
|
413
|
-
|
|
352
|
+
SearchField: () => ReactElement;
|
|
414
353
|
}
|
|
415
354
|
/**
|
|
416
355
|
* Hook used to configure the Depict search field.
|
|
@@ -418,14 +357,14 @@ interface UseDepictSearchFieldReturn {
|
|
|
418
357
|
* Render a search field that opens a modal aligned to the search field itself:
|
|
419
358
|
* ```tsx
|
|
420
359
|
* import React from "react";
|
|
421
|
-
* import {
|
|
360
|
+
* import { useSearchField } from "@depict-ai/react-ui";
|
|
422
361
|
*
|
|
423
362
|
* const App = () => {
|
|
424
|
-
* const {
|
|
363
|
+
* const { SearchField } = useSearchField();
|
|
425
364
|
*
|
|
426
365
|
* return (
|
|
427
366
|
* <div>
|
|
428
|
-
* <
|
|
367
|
+
* <SearchField />
|
|
429
368
|
* </div>
|
|
430
369
|
* );
|
|
431
370
|
* };
|
|
@@ -434,25 +373,25 @@ interface UseDepictSearchFieldReturn {
|
|
|
434
373
|
* Render a search field that opens a modal aligned another DOM element:
|
|
435
374
|
* ```tsx
|
|
436
375
|
* import React from "react";
|
|
437
|
-
* import {
|
|
376
|
+
* import { ComponentAligner, useSearchField } from "@depict-ai/react-ui";
|
|
438
377
|
*
|
|
439
378
|
* const App = () => {
|
|
440
379
|
* const ref = useRef(null);
|
|
441
|
-
* const {
|
|
380
|
+
* const { SearchField } = useSearchField({
|
|
442
381
|
* alignerRef: ref
|
|
443
382
|
* });
|
|
444
383
|
*
|
|
445
384
|
* return (
|
|
446
385
|
* <div>
|
|
447
|
-
* <
|
|
448
|
-
* <
|
|
386
|
+
* <ComponentAligner ref={ref} />
|
|
387
|
+
* <SearchField />
|
|
449
388
|
* </div>
|
|
450
389
|
* );
|
|
451
390
|
* };
|
|
452
391
|
* ```
|
|
453
392
|
* @returns {JSX.Element}
|
|
454
393
|
*/
|
|
455
|
-
export const
|
|
394
|
+
export const useSearchField: (props?: SearchFieldProps) => UseSearchFieldReturn;
|
|
456
395
|
/**
|
|
457
396
|
* Helper function to navigate to a new page depending on the navigation library used.
|
|
458
397
|
*/
|
package/dist/main.js
CHANGED
|
@@ -13,21 +13,21 @@ function $parcel$export(e, n, v, s) {
|
|
|
13
13
|
|
|
14
14
|
$parcel$export(module.exports, "QuickLinks", () => $f16af0e861aff3d0$export$466cdc317043f6cb);
|
|
15
15
|
$parcel$export(module.exports, "BreadCrumbs", () => $d88e98b11c182b8e$export$5646050d516e06bc);
|
|
16
|
-
$parcel$export(module.exports, "
|
|
16
|
+
$parcel$export(module.exports, "ComponentAligner", () => $883a881f7926405d$export$80e99ee6b29cadd2);
|
|
17
17
|
$parcel$export(module.exports, "DepictProvider", () => $24b00503eef73528$export$9fac37a9c21c2f3b);
|
|
18
|
-
$parcel$export(module.exports, "
|
|
19
|
-
$parcel$export(module.exports, "
|
|
18
|
+
$parcel$export(module.exports, "CategoryPage", () => $5aa5fcb9f8a2bebc$export$f7d2f673fc2f091d);
|
|
19
|
+
$parcel$export(module.exports, "SearchPage", () => $7ad7a3d0011b7b1b$export$a54ec244c8863715);
|
|
20
20
|
$parcel$export(module.exports, "ImagePlaceholder", () => $df522c8a81ed5a01$export$3f37af283f8fb843);
|
|
21
21
|
$parcel$export(module.exports, "TextPlaceholder", () => $7c8b440edc188ad5$export$89c6019e4baa40b1);
|
|
22
|
-
$parcel$export(module.exports, "
|
|
23
|
-
$parcel$export(module.exports, "
|
|
22
|
+
$parcel$export(module.exports, "useSearchModal", () => $ae73b15c325f1b21$export$912994940e660d32);
|
|
23
|
+
$parcel$export(module.exports, "useSearchField", () => $913da7f4d0bc77f2$export$9bb30bbe003b82e0);
|
|
24
24
|
$parcel$export(module.exports, "CategoryTitle", () => $b03e4eee8610ebbe$re_export$CategoryTitle);
|
|
25
25
|
$parcel$export(module.exports, "EmbeddedNumProducts", () => $b03e4eee8610ebbe$re_export$EmbeddedNumProducts);
|
|
26
26
|
$parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
|
|
27
27
|
$parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
|
|
28
28
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
29
29
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
30
|
-
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.
|
|
30
|
+
const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.77";
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -244,7 +244,7 @@ function $24b00503eef73528$var$ensure_correct_formatting(path) {
|
|
|
244
244
|
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
const $
|
|
247
|
+
const $883a881f7926405d$export$80e99ee6b29cadd2 = /*#__PURE__*/ (0, $4GYXz$react.forwardRef)((_, ref)=>{
|
|
248
248
|
return /*#__PURE__*/ (0, $4GYXz$react.createElement)("div", {
|
|
249
249
|
className: "depict aligner",
|
|
250
250
|
style: {
|
|
@@ -260,7 +260,7 @@ const $d96434e62e08087d$export$3f4580d6398c5027 = /*#__PURE__*/ (0, $4GYXz$react
|
|
|
260
260
|
|
|
261
261
|
|
|
262
262
|
|
|
263
|
-
function $7ad7a3d0011b7b1b$export$
|
|
263
|
+
function $7ad7a3d0011b7b1b$export$a54ec244c8863715(props) {
|
|
264
264
|
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)($7ad7a3d0011b7b1b$var$SolidSearchPage), props);
|
|
265
265
|
}
|
|
266
266
|
function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
@@ -314,7 +314,7 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
|
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
let $5aa5fcb9f8a2bebc$var$render_cb;
|
|
317
|
-
function $5aa5fcb9f8a2bebc$export$
|
|
317
|
+
function $5aa5fcb9f8a2bebc$export$f7d2f673fc2f091d(props) {
|
|
318
318
|
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)($5aa5fcb9f8a2bebc$var$SolidCategoryPage), props, "div", {}, (props)=>$5aa5fcb9f8a2bebc$var$render_cb?.(props));
|
|
319
319
|
}
|
|
320
320
|
function $5aa5fcb9f8a2bebc$var$SolidCategoryPage(props, set_portals) {
|
|
@@ -416,7 +416,7 @@ const $7c8b440edc188ad5$export$89c6019e4baa40b1 = ({ width: width , height: heig
|
|
|
416
416
|
|
|
417
417
|
|
|
418
418
|
|
|
419
|
-
const $
|
|
419
|
+
const $177ac8f5258066ba$export$d69d8daa20eae175 = (createOpenModalParams)=>{
|
|
420
420
|
const { globalState: globalState , location: location = "centered" , alignerRef: alignerRef } = createOpenModalParams;
|
|
421
421
|
const openModal = ()=>{
|
|
422
422
|
if (globalState.search) {
|
|
@@ -435,8 +435,8 @@ const $ef7db890e488d4f4$export$d69d8daa20eae175 = (createOpenModalParams)=>{
|
|
|
435
435
|
};
|
|
436
436
|
|
|
437
437
|
|
|
438
|
-
function $
|
|
439
|
-
const open = (0, $
|
|
438
|
+
function $ae73b15c325f1b21$export$912994940e660d32(params = {}) {
|
|
439
|
+
const open = (0, $177ac8f5258066ba$export$d69d8daa20eae175)({
|
|
440
440
|
globalState: $0b7cd4fb39fc3502$export$8e769ad4338a911e,
|
|
441
441
|
...params
|
|
442
442
|
});
|
|
@@ -449,7 +449,7 @@ function $3647cad61d03b89c$export$cc1e9aaf280afdcb(params = {}) {
|
|
|
449
449
|
|
|
450
450
|
|
|
451
451
|
|
|
452
|
-
const $
|
|
452
|
+
const $cd591d0e4ce29df7$export$bde46b5bb6287cea = (props)=>{
|
|
453
453
|
const ReactSearchField = ()=>{
|
|
454
454
|
return (0, $b4d0d98857ed9934$export$f6e64e17bd69eeef)((0, $b4d0d98857ed9934$export$e5139bbbb9a05035)(()=>(0, $4GYXz$depictaiui.SearchField)({
|
|
455
455
|
depict_search: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search,
|
|
@@ -460,12 +460,12 @@ const $5e06ce09dcfaf030$export$bde46b5bb6287cea = (props)=>{
|
|
|
460
460
|
};
|
|
461
461
|
|
|
462
462
|
|
|
463
|
-
const $
|
|
464
|
-
const SearchField = (0, $
|
|
463
|
+
const $913da7f4d0bc77f2$export$9bb30bbe003b82e0 = (props)=>{
|
|
464
|
+
const SearchField = (0, $cd591d0e4ce29df7$export$bde46b5bb6287cea)({
|
|
465
465
|
alignerRef: props?.alignerRef
|
|
466
466
|
});
|
|
467
467
|
return {
|
|
468
|
-
|
|
468
|
+
SearchField: SearchField
|
|
469
469
|
};
|
|
470
470
|
};
|
|
471
471
|
|
package/dist/module.js
CHANGED
|
@@ -9,7 +9,7 @@ import {createPortal as $TZSbU$createPortal} from "react-dom";
|
|
|
9
9
|
|
|
10
10
|
/*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
|
|
11
11
|
// Note, if you add an export here, also add one in src-server/main.ts
|
|
12
|
-
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.
|
|
12
|
+
const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.77";
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -226,7 +226,7 @@ function $5376eb2a386cd90d$var$ensure_correct_formatting(path) {
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
const $
|
|
229
|
+
const $421f32789b6f111f$export$80e99ee6b29cadd2 = /*#__PURE__*/ (0, $TZSbU$forwardRef)((_, ref)=>{
|
|
230
230
|
return /*#__PURE__*/ (0, $TZSbU$createElement)("div", {
|
|
231
231
|
className: "depict aligner",
|
|
232
232
|
style: {
|
|
@@ -242,7 +242,7 @@ const $4db0e2f013fc5124$export$3f4580d6398c5027 = /*#__PURE__*/ (0, $TZSbU$forwa
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
function $4a678f0c87b12e78$export$
|
|
245
|
+
function $4a678f0c87b12e78$export$a54ec244c8863715(props) {
|
|
246
246
|
return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)((0, $c83ba9ab79386687$export$e5139bbbb9a05035)($4a678f0c87b12e78$var$SolidSearchPage), props);
|
|
247
247
|
}
|
|
248
248
|
function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
@@ -296,7 +296,7 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
|
|
|
296
296
|
|
|
297
297
|
|
|
298
298
|
let $48d7f568740a317d$var$render_cb;
|
|
299
|
-
function $48d7f568740a317d$export$
|
|
299
|
+
function $48d7f568740a317d$export$f7d2f673fc2f091d(props) {
|
|
300
300
|
return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)((0, $c83ba9ab79386687$export$e5139bbbb9a05035)($48d7f568740a317d$var$SolidCategoryPage), props, "div", {}, (props)=>$48d7f568740a317d$var$render_cb?.(props));
|
|
301
301
|
}
|
|
302
302
|
function $48d7f568740a317d$var$SolidCategoryPage(props, set_portals) {
|
|
@@ -398,7 +398,7 @@ const $cbd250061abf11cb$export$89c6019e4baa40b1 = ({ width: width , height: heig
|
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
const $
|
|
401
|
+
const $41cab674edff4277$export$d69d8daa20eae175 = (createOpenModalParams)=>{
|
|
402
402
|
const { globalState: globalState , location: location = "centered" , alignerRef: alignerRef } = createOpenModalParams;
|
|
403
403
|
const openModal = ()=>{
|
|
404
404
|
if (globalState.search) {
|
|
@@ -417,8 +417,8 @@ const $5e26376d86621891$export$d69d8daa20eae175 = (createOpenModalParams)=>{
|
|
|
417
417
|
};
|
|
418
418
|
|
|
419
419
|
|
|
420
|
-
function $
|
|
421
|
-
const open = (0, $
|
|
420
|
+
function $70344e5e0d0fea06$export$912994940e660d32(params = {}) {
|
|
421
|
+
const open = (0, $41cab674edff4277$export$d69d8daa20eae175)({
|
|
422
422
|
globalState: $42858f023ef23dab$export$8e769ad4338a911e,
|
|
423
423
|
...params
|
|
424
424
|
});
|
|
@@ -431,7 +431,7 @@ function $cfa72c75e6cf6901$export$cc1e9aaf280afdcb(params = {}) {
|
|
|
431
431
|
|
|
432
432
|
|
|
433
433
|
|
|
434
|
-
const $
|
|
434
|
+
const $cdd7408b22d1586a$export$bde46b5bb6287cea = (props)=>{
|
|
435
435
|
const ReactSearchField = ()=>{
|
|
436
436
|
return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)((0, $c83ba9ab79386687$export$e5139bbbb9a05035)(()=>(0, $TZSbU$SearchField)({
|
|
437
437
|
depict_search: (0, $42858f023ef23dab$export$8e769ad4338a911e).search,
|
|
@@ -442,12 +442,12 @@ const $a732d80ca44c466d$export$bde46b5bb6287cea = (props)=>{
|
|
|
442
442
|
};
|
|
443
443
|
|
|
444
444
|
|
|
445
|
-
const $
|
|
446
|
-
const SearchField = (0, $
|
|
445
|
+
const $2b886cf548a4775c$export$9bb30bbe003b82e0 = (props)=>{
|
|
446
|
+
const SearchField = (0, $cdd7408b22d1586a$export$bde46b5bb6287cea)({
|
|
447
447
|
alignerRef: props?.alignerRef
|
|
448
448
|
});
|
|
449
449
|
return {
|
|
450
|
-
|
|
450
|
+
SearchField: SearchField
|
|
451
451
|
};
|
|
452
452
|
};
|
|
453
453
|
|
|
@@ -473,4 +473,4 @@ const $97603d19204ec48d$export$b8a61e5c71402559 = {
|
|
|
473
473
|
(0, $TZSbU$add_to_version_info)("react-ui", (0, $c9c4d066f9a5b51b$export$83d89fbfd8236492));
|
|
474
474
|
|
|
475
475
|
|
|
476
|
-
export {$b68a14248b7ef667$export$466cdc317043f6cb as QuickLinks, $f866f7ed9f751af4$export$5646050d516e06bc as BreadCrumbs, $
|
|
476
|
+
export {$b68a14248b7ef667$export$466cdc317043f6cb as QuickLinks, $f866f7ed9f751af4$export$5646050d516e06bc as BreadCrumbs, $421f32789b6f111f$export$80e99ee6b29cadd2 as ComponentAligner, $5376eb2a386cd90d$export$9fac37a9c21c2f3b as DepictProvider, $48d7f568740a317d$export$f7d2f673fc2f091d as CategoryPage, $4a678f0c87b12e78$export$a54ec244c8863715 as SearchPage, $f446a84f85ba06f6$export$3f37af283f8fb843 as ImagePlaceholder, $cbd250061abf11cb$export$89c6019e4baa40b1 as TextPlaceholder, $70344e5e0d0fea06$export$912994940e660d32 as useSearchModal, $2b886cf548a4775c$export$9bb30bbe003b82e0 as useSearchField, $43099132aad1ceb6$re_export$CategoryTitle as CategoryTitle, $43099132aad1ceb6$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version, $97603d19204ec48d$export$b8a61e5c71402559 as Navigation};
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"background": variables.get-background-color("inverse", "default"),
|
|
13
13
|
"hover-background": variables.get-background-color("inverse", "hover"),
|
|
14
14
|
"active-background": variables.get-background-color("inverse", "pressed"),
|
|
15
|
-
"color": variables.get-text-color("inverse", "default"),
|
|
15
|
+
"color": variables.get-text-icon-color("inverse", "default"),
|
|
16
16
|
"border": 1px solid transparent,
|
|
17
17
|
"border-radius": variables.$border-radius,
|
|
18
18
|
"hover-filter": drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)),
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"background": variables.get-background-color("base", "default"),
|
|
32
32
|
"hover-background": variables.get-background-color("base", "hover"),
|
|
33
33
|
"active-background": variables.get-background-color("base", "pressed"),
|
|
34
|
-
"color": variables.get-text-color("base", "default"),
|
|
34
|
+
"color": variables.get-text-icon-color("base", "default"),
|
|
35
35
|
"border": variables.get-border-color("base", "default") 1px solid,
|
|
36
36
|
"border-radius": variables.$border-radius,
|
|
37
37
|
"hover-filter": drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)),
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
.text {
|
|
22
22
|
background: rgba(variables.get-background-color("inverse", "hover"), 0.75);
|
|
23
|
-
color: variables.get-text-color("inverse", "default");
|
|
23
|
+
color: variables.get-text-icon-color("inverse", "default");
|
|
24
24
|
padding: 10px 20px;
|
|
25
25
|
border-radius: calc(#{variables.$border-radius} * 5);
|
|
26
26
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "../../variables";
|
|
2
2
|
@use "../../helpers/utils";
|
|
3
3
|
@use "../../helpers/supports-hover";
|
|
4
|
-
@use "
|
|
5
|
-
@use "
|
|
4
|
+
@use "Buttons";
|
|
5
|
+
@use "ProductListingPage";
|
|
6
6
|
@use "sass:map";
|
|
7
7
|
|
|
8
8
|
/// Mixin that styles the SelectedFilters component, which is the component that shows the selected filters if both the sorting and filtering menus are currently hidden.
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
font-size: 1.1em;
|
|
41
41
|
text-transform: variables.$uppercase-text-transform;
|
|
42
|
-
color: variables.get-text-color("base", "default");
|
|
42
|
+
color: variables.get-text-icon-color("base", "default");
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.depict-slider {
|