@searchspring/snap-preact-components 0.39.3 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Molecules/Carousel/Carousel.d.ts +2 -1
- package/dist/cjs/components/Molecules/Carousel/Carousel.d.ts.map +1 -1
- package/dist/cjs/components/Molecules/Carousel/Carousel.js +13 -2
- package/dist/cjs/components/Molecules/Carousel/Carousel.stories.js +3 -3
- package/dist/cjs/components/Molecules/Slideout/Slideout.d.ts +1 -0
- package/dist/cjs/components/Molecules/Slideout/Slideout.d.ts.map +1 -1
- package/dist/cjs/components/Molecules/Slideout/Slideout.js +4 -31
- package/dist/cjs/components/Molecules/Slideout/Slideout.stories.d.ts +14 -0
- package/dist/cjs/components/Molecules/Slideout/Slideout.stories.d.ts.map +1 -1
- package/dist/cjs/components/Molecules/Slideout/Slideout.stories.js +9 -0
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.d.ts +7 -2
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.js +81 -27
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.stories.d.ts +75 -0
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.stories.d.ts.map +1 -1
- package/dist/cjs/components/Organisms/Autocomplete/Autocomplete.stories.js +51 -1
- package/dist/cjs/components/Organisms/Recommendation/Recommendation.d.ts.map +1 -1
- package/dist/cjs/components/Organisms/Recommendation/Recommendation.js +10 -48
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.d.ts +10 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.js +51 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.d.ts +94 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.js +106 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/index.d.ts +2 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/index.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ProfileTracker/index.js +17 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.d.ts +12 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.js +54 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.d.ts +109 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.js +116 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/index.d.ts +2 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/index.d.ts.map +1 -0
- package/dist/cjs/components/Trackers/Recommendation/ResultTracker/index.js +17 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/Molecules/Carousel/Carousel.d.ts +2 -1
- package/dist/esm/components/Molecules/Carousel/Carousel.d.ts.map +1 -1
- package/dist/esm/components/Molecules/Carousel/Carousel.js +16 -2
- package/dist/esm/components/Molecules/Carousel/Carousel.stories.js +3 -3
- package/dist/esm/components/Molecules/Slideout/Slideout.d.ts +1 -0
- package/dist/esm/components/Molecules/Slideout/Slideout.d.ts.map +1 -1
- package/dist/esm/components/Molecules/Slideout/Slideout.js +4 -31
- package/dist/esm/components/Molecules/Slideout/Slideout.stories.d.ts +14 -0
- package/dist/esm/components/Molecules/Slideout/Slideout.stories.d.ts.map +1 -1
- package/dist/esm/components/Molecules/Slideout/Slideout.stories.js +10 -0
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.d.ts +7 -2
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.js +80 -25
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.stories.d.ts +75 -0
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.stories.d.ts.map +1 -1
- package/dist/esm/components/Organisms/Autocomplete/Autocomplete.stories.js +56 -1
- package/dist/esm/components/Organisms/Recommendation/Recommendation.d.ts.map +1 -1
- package/dist/esm/components/Organisms/Recommendation/Recommendation.js +9 -47
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.d.ts +10 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.js +40 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.d.ts +94 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/RecommendationProfileTracker.stories.js +48 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/index.d.ts +2 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/index.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ProfileTracker/index.js +1 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.d.ts +12 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.js +43 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.d.ts +109 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/RecommendationResultTracker.stories.js +58 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/index.d.ts +2 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/index.d.ts.map +1 -0
- package/dist/esm/components/Trackers/Recommendation/ResultTracker/index.js +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/package.json +11 -11
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.Default = void 0;
|
|
54
|
+
var preact_1 = require("preact");
|
|
55
|
+
var blocks_1 = require("@storybook/addon-docs/blocks");
|
|
56
|
+
var RecommendationResultTracker_1 = require("./RecommendationResultTracker");
|
|
57
|
+
var utilities_1 = require("../../../../utilities");
|
|
58
|
+
var readme_md_1 = __importDefault(require("../ResultTracker/readme.md"));
|
|
59
|
+
var snapify_1 = require("../../../../utilities/snapify");
|
|
60
|
+
var Result_1 = require("../../../Molecules/Result");
|
|
61
|
+
exports.default = {
|
|
62
|
+
title: "Trackers/Recommendation/Result",
|
|
63
|
+
component: RecommendationResultTracker_1.RecommendationResultTracker,
|
|
64
|
+
parameters: {
|
|
65
|
+
docs: {
|
|
66
|
+
page: function () { return ((0, preact_1.h)("div", null,
|
|
67
|
+
(0, preact_1.h)(readme_md_1.default, null),
|
|
68
|
+
(0, preact_1.h)(blocks_1.ArgsTable, { story: blocks_1.PRIMARY_STORY }))); },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
decorators: [
|
|
72
|
+
function (Story) { return ((0, preact_1.h)("div", { style: { maxWidth: '250px' } },
|
|
73
|
+
(0, preact_1.h)(Story, null))); },
|
|
74
|
+
],
|
|
75
|
+
argTypes: __assign({ controller: {
|
|
76
|
+
description: 'Recommendation Controller reference',
|
|
77
|
+
type: { required: true },
|
|
78
|
+
table: {
|
|
79
|
+
type: {
|
|
80
|
+
summary: 'Controller',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
control: { type: 'none' },
|
|
84
|
+
}, result: {
|
|
85
|
+
description: 'Result store Product reference',
|
|
86
|
+
type: { required: true },
|
|
87
|
+
table: {
|
|
88
|
+
type: {
|
|
89
|
+
summary: 'result store Product object',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
control: { type: 'none' },
|
|
93
|
+
} }, utilities_1.componentArgs),
|
|
94
|
+
};
|
|
95
|
+
var snapInstance = snapify_1.Snapify.recommendation({ id: 'Recommendation', tag: 'trending', globals: { siteId: '8uyt2m' } });
|
|
96
|
+
var Default = function (props, _a) {
|
|
97
|
+
var _b, _c;
|
|
98
|
+
var controller = _a.loaded.controller;
|
|
99
|
+
return ((0, preact_1.h)(RecommendationResultTracker_1.RecommendationResultTracker, __assign({}, props, { controller: controller, result: (_b = controller === null || controller === void 0 ? void 0 : controller.store) === null || _b === void 0 ? void 0 : _b.results[0] }),
|
|
100
|
+
(0, preact_1.h)(Result_1.Result, { result: (_c = controller === null || controller === void 0 ? void 0 : controller.store) === null || _c === void 0 ? void 0 : _c.results[0] })));
|
|
101
|
+
};
|
|
102
|
+
exports.Default = Default;
|
|
103
|
+
exports.Default.loaders = [
|
|
104
|
+
function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
|
+
return __generator(this, function (_a) {
|
|
106
|
+
switch (_a.label) {
|
|
107
|
+
case 0: return [4 /*yield*/, snapInstance.search()];
|
|
108
|
+
case 1:
|
|
109
|
+
_a.sent();
|
|
110
|
+
return [2 /*return*/, {
|
|
111
|
+
controller: snapInstance,
|
|
112
|
+
}];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}); },
|
|
116
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Trackers/Recommendation/ResultTracker/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./RecommendationResultTracker"), exports);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export * from './components/Atoms/Merchandising';
|
|
|
10
10
|
export * from './components/Atoms/Overlay';
|
|
11
11
|
export * from './components/Atoms/Price';
|
|
12
12
|
export * from './components/Atoms/Skeleton';
|
|
13
|
+
export * from './components/Trackers/Recommendation/ResultTracker';
|
|
14
|
+
export * from './components/Trackers/Recommendation/ProfileTracker';
|
|
13
15
|
export * from './components/Molecules/Carousel';
|
|
14
16
|
export * from './components/Molecules/Checkbox';
|
|
15
17
|
export * from './components/Molecules/ErrorHandler';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AAGpE,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AAGnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,6 +27,8 @@ __exportStar(require("./components/Atoms/Merchandising"), exports);
|
|
|
27
27
|
__exportStar(require("./components/Atoms/Overlay"), exports);
|
|
28
28
|
__exportStar(require("./components/Atoms/Price"), exports);
|
|
29
29
|
__exportStar(require("./components/Atoms/Skeleton"), exports);
|
|
30
|
+
__exportStar(require("./components/Trackers/Recommendation/ResultTracker"), exports);
|
|
31
|
+
__exportStar(require("./components/Trackers/Recommendation/ProfileTracker"), exports);
|
|
30
32
|
// MOLECULES
|
|
31
33
|
__exportStar(require("./components/Molecules/Carousel"), exports);
|
|
32
34
|
__exportStar(require("./components/Molecules/Checkbox"), exports);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import SwiperCore from 'swiper/core';
|
|
3
|
+
import { SwiperOptions } from 'swiper';
|
|
3
4
|
import { ComponentProps, BreakpointsProps } from '../../../types';
|
|
4
5
|
export declare const defaultCarouselBreakpoints: {
|
|
5
6
|
0: {
|
|
@@ -45,7 +46,7 @@ export interface CarouselProps extends ComponentProps {
|
|
|
45
46
|
hideButtons?: boolean;
|
|
46
47
|
loop?: boolean;
|
|
47
48
|
vertical?: boolean;
|
|
48
|
-
pagination?: boolean;
|
|
49
|
+
pagination?: boolean | SwiperOptions['pagination'];
|
|
49
50
|
autoAdjustSlides?: boolean;
|
|
50
51
|
onClick?: (swiper: SwiperCore, e: MouseEvent | TouchEvent | PointerEvent) => void;
|
|
51
52
|
onNextButtonClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAQA,OAAO,UAAsC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAQA,OAAO,UAAsC,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAKvC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AA8H9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,gBAAyB,aAAa,KAAG,WAAW;;CA+JvE,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;CACxB"}
|
|
@@ -192,7 +192,8 @@ export const Carousel = observer((properties) => {
|
|
|
192
192
|
theme,
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
const { children, breakpoints, loop,
|
|
195
|
+
const { children, breakpoints, loop, nextButton, prevButton, hideButtons, vertical, autoAdjustSlides, onInit, onNextButtonClick, onPrevButtonClick, onClick, disableStyles, style, modules, className, ...additionalProps } = props;
|
|
196
|
+
let pagination = props.pagination;
|
|
196
197
|
const subProps = {
|
|
197
198
|
icon: {
|
|
198
199
|
// default props
|
|
@@ -221,6 +222,19 @@ export const Carousel = observer((properties) => {
|
|
|
221
222
|
else if (style) {
|
|
222
223
|
styling.css = [style];
|
|
223
224
|
}
|
|
225
|
+
if (pagination) {
|
|
226
|
+
if (typeof pagination == 'object') {
|
|
227
|
+
pagination = {
|
|
228
|
+
clickable: true,
|
|
229
|
+
...pagination,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
pagination = {
|
|
234
|
+
clickable: true,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
224
238
|
return children?.length ? (jsx(CacheProvider, null,
|
|
225
239
|
jsx("div", { ref: rootComponentRef, ...styling, className: classnames('ss__carousel', vertical ? 'ss__carousel-vertical' : '', className) },
|
|
226
240
|
jsx("div", { className: classnames('ss__carousel__prev-wrapper', { 'ss__carousel__prev-wrapper--hidden': hideButtons }) },
|
|
@@ -235,7 +249,7 @@ export const Carousel = observer((properties) => {
|
|
|
235
249
|
}
|
|
236
250
|
}, onClick: (swiper, e) => {
|
|
237
251
|
onClick && onClick(swiper, e);
|
|
238
|
-
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, ...additionalProps, ...displaySettings, pagination: pagination
|
|
252
|
+
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, ...additionalProps, ...displaySettings, pagination: pagination }, children.map((child) => {
|
|
239
253
|
return jsx(SwiperSlide, null, child);
|
|
240
254
|
})),
|
|
241
255
|
jsx("div", { className: classnames('ss__carousel__next-wrapper', { 'ss__carousel__next-wrapper--hidden': hideButtons }) },
|
|
@@ -35,14 +35,14 @@ export default {
|
|
|
35
35
|
},
|
|
36
36
|
pagination: {
|
|
37
37
|
defaultValue: false,
|
|
38
|
-
description: '
|
|
38
|
+
description: 'Configuration for pagination dots',
|
|
39
39
|
table: {
|
|
40
40
|
type: {
|
|
41
|
-
summary: 'boolean',
|
|
41
|
+
summary: 'boolean | SwiperOptions.pagination',
|
|
42
42
|
},
|
|
43
43
|
defaultValue: { summary: false },
|
|
44
44
|
},
|
|
45
|
-
control: { type: 'boolean' },
|
|
45
|
+
control: { type: 'boolean | SwiperOptions.pagination' },
|
|
46
46
|
},
|
|
47
47
|
vertical: {
|
|
48
48
|
defaultValue: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slideout.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Slideout/Slideout.tsx"],"names":[],"mappings":";AAAA,eAAe;AACf,OAAO,EAAe,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQxD,OAAO,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Slideout.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Slideout/Slideout.tsx"],"names":[],"mappings":";AAAA,eAAe;AACf,OAAO,EAAe,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAQxD,OAAO,EAAE,cAAc,EAAc,MAAM,gBAAgB,CAAC;AAyB5D,wBAAgB,QAAQ,CAAC,UAAU,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CA0F/D;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IACrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,oBAAY,kBAAkB,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -26,7 +26,6 @@ const CSS = {
|
|
|
26
26
|
overflowY: 'auto',
|
|
27
27
|
}),
|
|
28
28
|
};
|
|
29
|
-
const buttonClass = 'ss__slideout__button';
|
|
30
29
|
export function Slideout(properties) {
|
|
31
30
|
const globalTheme = useTheme();
|
|
32
31
|
const props = {
|
|
@@ -35,7 +34,7 @@ export function Slideout(properties) {
|
|
|
35
34
|
displayAt: '',
|
|
36
35
|
slideDirection: 'left',
|
|
37
36
|
width: '300px',
|
|
38
|
-
buttonContent:
|
|
37
|
+
buttonContent: 'click me',
|
|
39
38
|
overlayColor: 'rgba(0,0,0,0.8)',
|
|
40
39
|
transitionSpeed: '0.25s',
|
|
41
40
|
// global theme
|
|
@@ -44,7 +43,7 @@ export function Slideout(properties) {
|
|
|
44
43
|
...properties,
|
|
45
44
|
...properties.theme?.components?.slideout,
|
|
46
45
|
};
|
|
47
|
-
const { children, active, width, displayAt, transitionSpeed, overlayColor, slideDirection,
|
|
46
|
+
const { children, active, buttonContent, noButtonWrapper, width, displayAt, transitionSpeed, overlayColor, slideDirection, disableStyles, className, style, } = props;
|
|
48
47
|
const subProps = {
|
|
49
48
|
overlay: {
|
|
50
49
|
// default props
|
|
@@ -79,34 +78,8 @@ export function Slideout(properties) {
|
|
|
79
78
|
styling.css = [style];
|
|
80
79
|
}
|
|
81
80
|
return isVisible ? (jsx(CacheProvider, null,
|
|
82
|
-
|
|
81
|
+
buttonContent &&
|
|
82
|
+
(noButtonWrapper ? (cloneWithProps(buttonContent, { toggleActive, active: isActive })) : (jsx("div", { className: "ss__slideout__button", onClick: () => toggleActive() }, cloneWithProps(buttonContent, { active: isActive })))),
|
|
83
83
|
jsx("div", { className: classnames('ss__slideout', className, { 'ss__slideout--active': isActive }), ...styling }, cloneWithProps(children, { toggleActive, active: isActive })),
|
|
84
84
|
jsx(Overlay, { ...subProps.overlay, active: isActive, onClick: toggleActive }))) : (jsx(Fragment, null));
|
|
85
85
|
}
|
|
86
|
-
const ButtonContent = (props) => {
|
|
87
|
-
const { content, toggleActive } = props;
|
|
88
|
-
if (content && typeof content == 'string') {
|
|
89
|
-
return (jsx("div", { className: buttonClass, onClick: () => toggleActive() }, content));
|
|
90
|
-
}
|
|
91
|
-
else if (content && typeof content == 'object') {
|
|
92
|
-
let clone = cloneWithProps(content, {
|
|
93
|
-
onClick: () => toggleActive(),
|
|
94
|
-
});
|
|
95
|
-
if (clone.props.class || clone.props.className) {
|
|
96
|
-
// check if class
|
|
97
|
-
if (clone.props.class && clone.props.class.indexOf(buttonClass) < 0) {
|
|
98
|
-
clone.props.class = `${clone.props.class} ${buttonClass}`;
|
|
99
|
-
}
|
|
100
|
-
// check if classname
|
|
101
|
-
if (clone.props.className && clone.props.className.indexOf(buttonClass) < 0) {
|
|
102
|
-
clone.props.className = `${clone.props.className} ${buttonClass}`;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
clone.props.className = clone.props.class = buttonClass;
|
|
107
|
-
}
|
|
108
|
-
return clone;
|
|
109
|
-
}
|
|
110
|
-
else
|
|
111
|
-
return jsx(Fragment, null);
|
|
112
|
-
};
|
|
@@ -164,6 +164,20 @@ declare const _default: {
|
|
|
164
164
|
type: string;
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
|
+
noButtonWrapper: {
|
|
168
|
+
description: string;
|
|
169
|
+
table: {
|
|
170
|
+
type: {
|
|
171
|
+
summary: string;
|
|
172
|
+
};
|
|
173
|
+
defaultValue: {
|
|
174
|
+
summary: boolean;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
control: {
|
|
178
|
+
type: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
167
181
|
};
|
|
168
182
|
};
|
|
169
183
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slideout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Slideout/Slideout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"Slideout.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Slideout/Slideout.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIrD,wBAsGE;AAEF,eAAO,MAAM,OAAO;WAAU,aAAa;;;;CAI1C,CAAC"}
|
|
@@ -90,6 +90,16 @@ export default {
|
|
|
90
90
|
},
|
|
91
91
|
control: { type: 'color' },
|
|
92
92
|
},
|
|
93
|
+
noButtonWrapper: {
|
|
94
|
+
description: 'Prevent the wrapper element from rendering (this element has the onClick handler to toggle the state)',
|
|
95
|
+
table: {
|
|
96
|
+
type: {
|
|
97
|
+
summary: 'boolean',
|
|
98
|
+
},
|
|
99
|
+
defaultValue: { summary: false },
|
|
100
|
+
},
|
|
101
|
+
control: { type: 'boolean' },
|
|
102
|
+
},
|
|
93
103
|
...componentArgs,
|
|
94
104
|
},
|
|
95
105
|
};
|
|
@@ -12,10 +12,15 @@ export interface AutocompleteProps extends ComponentProps {
|
|
|
12
12
|
hideContent?: boolean;
|
|
13
13
|
hideBanners?: boolean;
|
|
14
14
|
hideLink?: boolean;
|
|
15
|
+
hideHistory?: boolean;
|
|
16
|
+
hideTrending?: boolean;
|
|
17
|
+
retainHistory?: boolean;
|
|
18
|
+
retainTrending?: boolean;
|
|
15
19
|
horizontalTerms?: boolean;
|
|
16
20
|
vertical?: boolean;
|
|
17
21
|
termsTitle?: string;
|
|
18
22
|
trendingTitle?: string;
|
|
23
|
+
historyTitle?: string;
|
|
19
24
|
facetsTitle?: string;
|
|
20
25
|
contentTitle?: string;
|
|
21
26
|
viewportMaxHeight?: boolean;
|
|
@@ -27,7 +32,7 @@ export interface AutocompleteProps extends ComponentProps {
|
|
|
27
32
|
linkSlot?: JSX.Element;
|
|
28
33
|
breakpoints?: BreakpointsProps;
|
|
29
34
|
width?: string;
|
|
30
|
-
onFacetOptionClick?: (e: React.MouseEvent<
|
|
31
|
-
onTermClick?: (e: React.MouseEvent<
|
|
35
|
+
onFacetOptionClick?: (e: React.MouseEvent<Element, MouseEvent>) => void;
|
|
36
|
+
onTermClick?: (e: React.MouseEvent<Element, MouseEvent>) => void;
|
|
32
37
|
}
|
|
33
38
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/Organisms/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAS5E,OAAO,EAAE,cAAc,EAAgB,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/Organisms/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAS5E,OAAO,EAAE,cAAc,EAAgB,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAqJ5F,eAAO,MAAM,YAAY,gBAAyB,iBAAiB,KAAG,WAAW;;CAqd/E,CAAC;AAoCH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,UAAU,EAAE,sBAAsB,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACxE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CACjE"}
|