@tapcart/mobile-components 0.12.7 → 0.12.9
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/components/hooks/use-recommendations.d.ts.map +1 -1
- package/dist/components/hooks/use-recommendations.js +7 -1
- package/dist/components/hooks/use-recommendations.test.d.ts +2 -0
- package/dist/components/hooks/use-recommendations.test.d.ts.map +1 -0
- package/dist/components/hooks/use-recommendations.test.js +85 -0
- package/dist/components/ui/Input/input.d.ts.map +1 -1
- package/dist/components/ui/Input/input.js +3 -3
- package/dist/components/ui/Input/types.d.ts +1 -0
- package/dist/components/ui/Input/types.d.ts.map +1 -1
- package/dist/lib/variablesCart.util.d.ts.map +1 -1
- package/dist/lib/variablesCart.util.js +3 -0
- package/dist/styles.css +20 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-recommendations.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-recommendations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOxE,UAAU,sBAAsB;IAE9B,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAGxC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAUD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,GAAG,EAAE,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,GAAG,CAAA;CACX;AAmBD,QAAA,MAAM,kBAAkB,yEASrB,sBAAsB,KAAG,
|
|
1
|
+
{"version":3,"file":"use-recommendations.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-recommendations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOxE,UAAU,sBAAsB;IAE9B,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAGxC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAUD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,EAAE,GAAG,EAAE,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,GAAG,CAAA;CACX;AAmBD,QAAA,MAAM,kBAAkB,yEASrB,sBAAsB,KAAG,uBA2H3B,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -35,7 +35,13 @@ queryVariables, apiURL, }) => {
|
|
|
35
35
|
? query
|
|
36
36
|
: (searchParams === null || searchParams === void 0 ? void 0 : searchParams.get("recommendation")) || "";
|
|
37
37
|
// Check if resolved recommendation meets minimum length requirement
|
|
38
|
-
|
|
38
|
+
// Allow fetching when:
|
|
39
|
+
// - query is empty → show trending searches
|
|
40
|
+
// - query meets minimum length (≥3 chars)
|
|
41
|
+
// - searchClient has a customSearchConfig (e.g., filter-only queries on PDP)
|
|
42
|
+
const shouldFetch = !recommendation.trim().length ||
|
|
43
|
+
recommendation.length >= MIN_QUERY_LENGTH ||
|
|
44
|
+
(usingSearchClient && Boolean(customSearchConfig));
|
|
39
45
|
const [cachedRecommendation, setCachedRecommendations] = React.useState(recommendationsLocalStorage.getCacheItem({
|
|
40
46
|
id: `${recommendation}-${queryVariables === null || queryVariables === void 0 ? void 0 : queryVariables.language}`,
|
|
41
47
|
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-recommendations.test.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-recommendations.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { renderHook } from "@testing-library/react";
|
|
2
|
+
import { useRecommendations } from "./use-recommendations";
|
|
3
|
+
// Mock next/navigation
|
|
4
|
+
jest.mock("next/navigation", () => ({
|
|
5
|
+
useSearchParams: () => new URLSearchParams(),
|
|
6
|
+
}));
|
|
7
|
+
// Mock SWR to give us control over fetching behavior
|
|
8
|
+
jest.mock("swr", () => {
|
|
9
|
+
return {
|
|
10
|
+
__esModule: true,
|
|
11
|
+
default: (key, fetcher, _options) => {
|
|
12
|
+
// If key is null, SWR doesn't fetch
|
|
13
|
+
if (key === null) {
|
|
14
|
+
return { data: undefined, error: undefined, isLoading: false };
|
|
15
|
+
}
|
|
16
|
+
return { data: undefined, error: undefined, isLoading: true };
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
// Mock the local storage cache
|
|
21
|
+
jest.mock("../libs/cache/RecommendationsLocalStorage", () => {
|
|
22
|
+
return {
|
|
23
|
+
__esModule: true,
|
|
24
|
+
default: jest.fn().mockImplementation(() => ({
|
|
25
|
+
getCacheItem: jest.fn().mockReturnValue(null),
|
|
26
|
+
setCacheItem: jest.fn(),
|
|
27
|
+
})),
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
describe("useRecommendations", () => {
|
|
31
|
+
const mockSearchClient = {
|
|
32
|
+
getRecommendations: jest.fn().mockResolvedValue({
|
|
33
|
+
products: [{ id: "1", title: "Product 1" }],
|
|
34
|
+
searches: ["suggestion 1"],
|
|
35
|
+
facets: [],
|
|
36
|
+
totalResults: 1,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
const defaultProps = {
|
|
40
|
+
queryVariables: { appId: "test-app" },
|
|
41
|
+
apiURL: "http://test.com/recommendations",
|
|
42
|
+
};
|
|
43
|
+
beforeEach(() => {
|
|
44
|
+
jest.clearAllMocks();
|
|
45
|
+
});
|
|
46
|
+
it("should fetch trending recommendations when query is empty", () => {
|
|
47
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ searchClient: mockSearchClient, query: "" }, defaultProps)));
|
|
48
|
+
// Empty query now triggers a trending recommendations fetch
|
|
49
|
+
expect(result.current.isLoading).toBe(true);
|
|
50
|
+
});
|
|
51
|
+
it("should not fetch when query is below MIN_QUERY_LENGTH and no customSearchConfig", () => {
|
|
52
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ searchClient: mockSearchClient, query: "ab" }, defaultProps)));
|
|
53
|
+
expect(result.current.products).toEqual([]);
|
|
54
|
+
expect(result.current.isLoading).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
it("should fetch trending when no searchClient and empty search params", () => {
|
|
57
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ query: "ab" }, defaultProps)));
|
|
58
|
+
// Without searchClient, recommendation comes from searchParams (empty string)
|
|
59
|
+
// Empty query now triggers a trending fetch
|
|
60
|
+
expect(result.current.isLoading).toBe(true);
|
|
61
|
+
});
|
|
62
|
+
it("should fetch when query meets MIN_QUERY_LENGTH", () => {
|
|
63
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ searchClient: mockSearchClient, query: "abc" }, defaultProps)));
|
|
64
|
+
// SWR mock returns isLoading: true when key is not null
|
|
65
|
+
expect(result.current.isLoading).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
it("should fetch when customSearchConfig is provided with searchClient even with empty query", () => {
|
|
68
|
+
const customSearchConfig = {
|
|
69
|
+
filter: 'attributes.mfield_bnb__seriesId = 584945 AND NOT id: ANY("9338273530096")',
|
|
70
|
+
pageSize: 6,
|
|
71
|
+
};
|
|
72
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ searchClient: mockSearchClient, query: "", customSearchConfig }, defaultProps)));
|
|
73
|
+
// shouldFetch should be true due to customSearchConfig bypass, so SWR gets a key and returns isLoading: true
|
|
74
|
+
expect(result.current.isLoading).toBe(true);
|
|
75
|
+
});
|
|
76
|
+
it("should fetch trending when customSearchConfig is provided without searchClient and empty query", () => {
|
|
77
|
+
const customSearchConfig = {
|
|
78
|
+
filter: "attributes.mfield_bnb__seriesId = 584945",
|
|
79
|
+
pageSize: 6,
|
|
80
|
+
};
|
|
81
|
+
const { result } = renderHook(() => useRecommendations(Object.assign({ query: "", customSearchConfig }, defaultProps)));
|
|
82
|
+
// Empty query now triggers a trending fetch regardless of searchClient
|
|
83
|
+
expect(result.current.isLoading).toBe(true);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,QAAA,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,QAAA,MAAM,KAAK,qFAyLV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -16,9 +16,9 @@ import { getTextTranslation, useTranslation, } from "../../contexts/translation-
|
|
|
16
16
|
import { Icon } from "../icon";
|
|
17
17
|
import { inputVariants, useInput } from "./useInput";
|
|
18
18
|
const Input = React.forwardRef((_a, ref) => {
|
|
19
|
-
var { className, error = false, id, type, label, labelStyle, asChild, value, onChange, icon, iconUrl, iconPosition = "right", // Default to "right" for backward compatibility
|
|
19
|
+
var { className, error = false, id, type, label, labelStyle, labelPositionStyle, asChild, value, onChange, icon, iconUrl, iconPosition = "right", // Default to "right" for backward compatibility
|
|
20
20
|
iconColor, placeholder, placeholderFont, placeholderFontWeight, placeholderFontSize, placeholderTextAlign, placeholderTextColor, placeholderUpperCase, inputPadding, backgroundColor, borderRadius, inputBorderColor, borderSides, inputSpacing, inputActiveBorderColor } = _a, // New prop for active border color
|
|
21
|
-
props = __rest(_a, ["className", "error", "id", "type", "label", "labelStyle", "asChild", "value", "onChange", "icon", "iconUrl", "iconPosition", "iconColor", "placeholder", "placeholderFont", "placeholderFontWeight", "placeholderFontSize", "placeholderTextAlign", "placeholderTextColor", "placeholderUpperCase", "inputPadding", "backgroundColor", "borderRadius", "inputBorderColor", "borderSides", "inputSpacing", "inputActiveBorderColor"]);
|
|
21
|
+
props = __rest(_a, ["className", "error", "id", "type", "label", "labelStyle", "labelPositionStyle", "asChild", "value", "onChange", "icon", "iconUrl", "iconPosition", "iconColor", "placeholder", "placeholderFont", "placeholderFontWeight", "placeholderFontSize", "placeholderTextAlign", "placeholderTextColor", "placeholderUpperCase", "inputPadding", "backgroundColor", "borderRadius", "inputBorderColor", "borderSides", "inputSpacing", "inputActiveBorderColor"]);
|
|
22
22
|
const translations = useTranslation();
|
|
23
23
|
const translatedPlaceholder = getTextTranslation({
|
|
24
24
|
text: placeholder,
|
|
@@ -64,7 +64,7 @@ const Input = React.forwardRef((_a, ref) => {
|
|
|
64
64
|
iconPosition === "left" &&
|
|
65
65
|
placeholderTextAlign === "center"
|
|
66
66
|
? undefined
|
|
67
|
-
: inputPaddingLeft, paddingRight: inputPaddingRight, fontFamily: placeholderFont, fontWeight: placeholderFontWeight, fontSize: `${placeholderFontSize}px`, textAlign: placeholderTextAlign, color: placeholderTextColorStyle, textTransform: placeholderUpperCase ? "uppercase" : undefined, paddingTop: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top, paddingBottom: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom, backgroundColor: inputBgColor }, borderStyle), borderRadiusStyle) })), label ? (_jsx("label", Object.assign({ htmlFor: id, style: labelTextStyle, className: cn("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0", iconPosition === "left" ? "start-10" : "start-4") }, { children: label }))) : null, (icon || iconUrl) && iconPosition === "right" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
|
|
67
|
+
: inputPaddingLeft, paddingRight: inputPaddingRight, fontFamily: placeholderFont, fontWeight: placeholderFontWeight, fontSize: `${placeholderFontSize}px`, textAlign: placeholderTextAlign, color: placeholderTextColorStyle, textTransform: placeholderUpperCase ? "uppercase" : undefined, paddingTop: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top, paddingBottom: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom, backgroundColor: inputBgColor }, borderStyle), borderRadiusStyle) })), label ? (_jsx("label", Object.assign({ htmlFor: id, style: Object.assign(Object.assign({}, labelTextStyle), labelPositionStyle), className: cn("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0", iconPosition === "left" ? "start-10" : "start-4") }, { children: label }))) : null, (icon || iconUrl) && iconPosition === "right" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
|
|
68
68
|
"w-5": true,
|
|
69
69
|
"text-stateColors-error": error,
|
|
70
70
|
}), style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/types.ts"],"names":[],"mappings":"AAAA,OA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AS,CAAC,EAAE,KAAK,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClD,oBAAoB,CAAC,EAAE,KAAK,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAA;IACxB,sBAAsB,CAAC,EAAE,KAAK,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variablesCart.util.d.ts","sourceRoot":"","sources":["../../lib/variablesCart.util.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,6BAA6B,EAO9B,MAAM,kBAAkB,CAAA;AAEzB,eAAO,MAAM,2BAA2B;;cAM5B,MAAM;;0BAEI;YAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;YACzB,KAAK,EAAE,MAAM,CAAA;YACb,cAAc,CAAC,EAAE,MAAM,CAAA;SACxB,EAAE;;;;;;CAyBN,CAAA;
|
|
1
|
+
{"version":3,"file":"variablesCart.util.d.ts","sourceRoot":"","sources":["../../lib/variablesCart.util.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,6BAA6B,EAO9B,MAAM,kBAAkB,CAAA;AAEzB,eAAO,MAAM,2BAA2B;;cAM5B,MAAM;;0BAEI;YAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;YACzB,KAAK,EAAE,MAAM,CAAA;YACb,cAAc,CAAC,EAAE,MAAM,CAAA;SACxB,EAAE;;;;;;CAyBN,CAAA;AA8FD,eAAO,MAAM,6BAA6B,SAClC,MAAM,QACN,SAAS,GAAG,IAAI,YAUvB,CAAA;AAED,eAAO,MAAM,2BAA2B,SAChC,MAAM,QACN,SAAS,GAAG,IAAI,YAUvB,CAAA;AAoMD,MAAM,MAAM,uBAAuB,GAAG;IACpC,yBAAyB,EAAE,sBAAsB,EAAE,CAAA;IACnD,gBAAgB,EAAE,6BAA6B,EAAE,CAAA;IACjD,cAAc,EAAE,OAAO,CAAA;IACvB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,iCAAiC,EAAE,uBAU/C,CAAA;AAED,eAAO,MAAM,8BAA8B,SACnC,SAAS,GAAG,IAAI,KACrB,uBAmCF,CAAA"}
|
|
@@ -42,6 +42,9 @@ const getOrderLevelDiscounts = (cart) => {
|
|
|
42
42
|
if (discount.code) {
|
|
43
43
|
code = ((discount === null || discount === void 0 ? void 0 : discount.code) || "").toUpperCase();
|
|
44
44
|
}
|
|
45
|
+
else if (discount.title) {
|
|
46
|
+
code = ((discount === null || discount === void 0 ? void 0 : discount.title) || "").toUpperCase();
|
|
47
|
+
}
|
|
45
48
|
else if ((_b = (_a = discount.kind) === null || _a === void 0 ? void 0 : _a.manual) === null || _b === void 0 ? void 0 : _b.code) {
|
|
46
49
|
code = (((_d = (_c = discount === null || discount === void 0 ? void 0 : discount.kind) === null || _c === void 0 ? void 0 : _c.manual) === null || _d === void 0 ? void 0 : _d.code) || "").toUpperCase();
|
|
47
50
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1030,6 +1030,9 @@ video {
|
|
|
1030
1030
|
.h-24 {
|
|
1031
1031
|
height: 6rem;
|
|
1032
1032
|
}
|
|
1033
|
+
.h-3 {
|
|
1034
|
+
height: 0.75rem;
|
|
1035
|
+
}
|
|
1033
1036
|
.h-4 {
|
|
1034
1037
|
height: 1rem;
|
|
1035
1038
|
}
|
|
@@ -1302,6 +1305,10 @@ video {
|
|
|
1302
1305
|
--tw-translate-y: -50%;
|
|
1303
1306
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1304
1307
|
}
|
|
1308
|
+
.rotate-0 {
|
|
1309
|
+
--tw-rotate: 0deg;
|
|
1310
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1311
|
+
}
|
|
1305
1312
|
.rotate-180 {
|
|
1306
1313
|
--tw-rotate: 180deg;
|
|
1307
1314
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -1314,6 +1321,16 @@ video {
|
|
|
1314
1321
|
--tw-rotate: 90deg;
|
|
1315
1322
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1316
1323
|
}
|
|
1324
|
+
.scale-0 {
|
|
1325
|
+
--tw-scale-x: 0;
|
|
1326
|
+
--tw-scale-y: 0;
|
|
1327
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1328
|
+
}
|
|
1329
|
+
.scale-100 {
|
|
1330
|
+
--tw-scale-x: 1;
|
|
1331
|
+
--tw-scale-y: 1;
|
|
1332
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1333
|
+
}
|
|
1317
1334
|
.transform {
|
|
1318
1335
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1319
1336
|
}
|
|
@@ -1685,6 +1702,9 @@ video {
|
|
|
1685
1702
|
.border-b {
|
|
1686
1703
|
border-bottom-width: 1px;
|
|
1687
1704
|
}
|
|
1705
|
+
.border-b-0 {
|
|
1706
|
+
border-bottom-width: 0px;
|
|
1707
|
+
}
|
|
1688
1708
|
.border-b-2 {
|
|
1689
1709
|
border-bottom-width: 2px;
|
|
1690
1710
|
}
|