@envive-ai/react-toolkit 0.1.13 → 0.2.1
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/package.json +13 -12
- package/src/atoms/search/types.ts +1 -5
- package/src/components/Accordion/Accordion.tsx +3 -3
- package/src/components/AnimatedChevron/index.ts +1 -0
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/ButtonBase/ButtonBase.tsx +2 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/ProductCard/ProductCard.tsx +10 -9
- package/src/components/RadioButton/RadioButton.tsx +2 -2
- package/src/components/SearchFilter/SearchFilterHeader.tsx +3 -3
- package/src/components/SearchFilter/SearchFilterItem.tsx +2 -2
- package/src/components/SearchFilter/index.ts +4 -2
- package/src/components/SearchInput/SearchInput.tsx +1 -1
- package/src/components/SearchInput/searchInputVariants.ts +3 -3
- package/src/components/SearchInputForm/SearchInputForm.tsx +1 -1
- package/src/components/SearchInputForm/index.ts +1 -1
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +3 -3
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -2
- package/src/components/TextInput/TextInput.tsx +4 -3
- package/src/components/ToggleButton/ToggleButton.tsx +5 -5
- package/src/components/Typography/Typography.spec.tsx +22 -0
- package/src/components/Typography/Typography.tsx +73 -0
- package/src/components/Typography/index.ts +2 -0
- package/src/components/{Text/textVariantClasses.ts → Typography/typographyVariantClasses.ts} +36 -38
- package/src/components/Typography/util.ts +19 -0
- package/dist/Accordion/index.cjs +0 -6
- package/dist/Accordion/index.d.cts +0 -13
- package/dist/Accordion/index.d.ts +0 -13
- package/dist/Accordion/index.js +0 -6
- package/dist/Accordion-D9gO9_y3.cjs +0 -88
- package/dist/Accordion-ZEdp99Ph.js +0 -77
- package/dist/AppliedFiltersScrollbar/index.cjs +0 -48
- package/dist/AppliedFiltersScrollbar/index.d.cts +0 -22
- package/dist/AppliedFiltersScrollbar/index.d.ts +0 -22
- package/dist/AppliedFiltersScrollbar/index.js +0 -44
- package/dist/ButtonBase/index.cjs +0 -7
- package/dist/ButtonBase/index.d.cts +0 -42
- package/dist/ButtonBase/index.d.ts +0 -42
- package/dist/ButtonBase/index.js +0 -6
- package/dist/ButtonBase-0NN6wmX-.js +0 -1
- package/dist/ButtonBase-BIXx56hq.cjs +0 -0
- package/dist/ButtonBase-DgRupM53.js +0 -60
- package/dist/ButtonBase-DrIwVGTR.cjs +0 -75
- package/dist/DynamicFiltersScrollbar/index.cjs +0 -36
- package/dist/DynamicFiltersScrollbar/index.d.cts +0 -28
- package/dist/DynamicFiltersScrollbar/index.d.ts +0 -28
- package/dist/DynamicFiltersScrollbar/index.js +0 -32
- package/dist/DynamicFiltersScrollbar-B1j53y2q.cjs +0 -81
- package/dist/DynamicFiltersScrollbar-D7WYp6x9.js +0 -66
- package/dist/FilterScrollbar/index.cjs +0 -6
- package/dist/FilterScrollbar/index.d.cts +0 -47
- package/dist/FilterScrollbar/index.d.ts +0 -47
- package/dist/FilterScrollbar/index.js +0 -5
- package/dist/Headline/index.cjs +0 -4
- package/dist/Headline/index.d.cts +0 -21
- package/dist/Headline/index.d.ts +0 -21
- package/dist/Headline/index.js +0 -4
- package/dist/Headline-COv0Jbn8.js +0 -64
- package/dist/Headline-Cp79THVF.cjs +0 -72
- package/dist/ImageWithFallback/index.cjs +0 -3
- package/dist/ImageWithFallback/index.d.cts +0 -26
- package/dist/ImageWithFallback/index.d.ts +0 -26
- package/dist/ImageWithFallback/index.js +0 -3
- package/dist/ImageWithFallback-Cx-KNi-D.cjs +0 -51
- package/dist/ImageWithFallback-DqxjwO3i.js +0 -42
- package/dist/ModalSheet/index.cjs +0 -3
- package/dist/ModalSheet/index.d.cts +0 -38
- package/dist/ModalSheet/index.d.ts +0 -38
- package/dist/ModalSheet/index.js +0 -3
- package/dist/ModalSheet-01pxpy_K.js +0 -326
- package/dist/ModalSheet-Csz8HIxs.cjs +0 -337
- package/dist/ProductCard/index.cjs +0 -17
- package/dist/ProductCard/index.d.cts +0 -2
- package/dist/ProductCard/index.d.ts +0 -2
- package/dist/ProductCard/index.js +0 -8
- package/dist/ProductCard-CNwmHggx.js +0 -255
- package/dist/ProductCard-EmdDy2af.cjs +0 -319
- package/dist/ProductGrid/index.cjs +0 -10
- package/dist/ProductGrid/index.d.cts +0 -33
- package/dist/ProductGrid/index.d.ts +0 -33
- package/dist/ProductGrid/index.js +0 -9
- package/dist/ProductGrid-CMoomZLc.cjs +0 -74
- package/dist/ProductGrid-nmWSp0qX.js +0 -60
- package/dist/RadioButton/index.cjs +0 -6
- package/dist/RadioButton/index.d.cts +0 -32
- package/dist/RadioButton/index.d.ts +0 -32
- package/dist/RadioButton/index.js +0 -6
- package/dist/RadioButton-BdKJRzLM.cjs +0 -84
- package/dist/RadioButton-S5dALI2f.js +0 -75
- package/dist/RadioButtonGroup/index.cjs +0 -8
- package/dist/RadioButtonGroup/index.d.cts +0 -36
- package/dist/RadioButtonGroup/index.d.ts +0 -36
- package/dist/RadioButtonGroup/index.js +0 -7
- package/dist/RadioButtonGroup-BipNsoHL.js +0 -38
- package/dist/RadioButtonGroup-TAJMA1j_.cjs +0 -52
- package/dist/SearchAutocomplete/index.cjs +0 -57
- package/dist/SearchAutocomplete/index.d.cts +0 -13
- package/dist/SearchAutocomplete/index.d.ts +0 -13
- package/dist/SearchAutocomplete/index.js +0 -51
- package/dist/SearchFilter/index.cjs +0 -15
- package/dist/SearchFilter/index.d.cts +0 -77
- package/dist/SearchFilter/index.d.ts +0 -77
- package/dist/SearchFilter/index.js +0 -13
- package/dist/SearchFilter-BcLc0TMq.cjs +0 -289
- package/dist/SearchFilter-w-0s2YVu.js +0 -268
- package/dist/SearchInput/index.cjs +0 -97
- package/dist/SearchInput/index.d.cts +0 -33
- package/dist/SearchInput/index.d.ts +0 -33
- package/dist/SearchInput/index.js +0 -90
- package/dist/SearchInputForm/index.cjs +0 -0
- package/dist/SearchInputForm/index.d.cts +0 -2
- package/dist/SearchInputForm/index.d.ts +0 -2
- package/dist/SearchInputForm/index.js +0 -1
- package/dist/SearchResultsContent/index.cjs +0 -47
- package/dist/SearchResultsContent/index.d.cts +0 -48
- package/dist/SearchResultsContent/index.d.ts +0 -48
- package/dist/SearchResultsContent/index.js +0 -44
- package/dist/SearchResultsFilterSidebar/index.cjs +0 -61
- package/dist/SearchResultsFilterSidebar/index.d.cts +0 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
- package/dist/SearchResultsFilterSidebar/index.js +0 -56
- package/dist/SearchResultsStates/index.cjs +0 -17
- package/dist/SearchResultsStates/index.d.cts +0 -69
- package/dist/SearchResultsStates/index.d.ts +0 -69
- package/dist/SearchResultsStates/index.js +0 -15
- package/dist/SearchResultsStates-DlZz14yy.js +0 -110
- package/dist/SearchResultsStates-DwcPrsdd.cjs +0 -132
- package/dist/SparkleAnimation/index.cjs +0 -4
- package/dist/SparkleAnimation/index.d.cts +0 -23
- package/dist/SparkleAnimation/index.d.ts +0 -23
- package/dist/SparkleAnimation/index.js +0 -3
- package/dist/SparkleAnimation-CvGlWUqv.cjs +0 -101
- package/dist/SparkleAnimation-paLhSu5E.js +0 -84
- package/dist/Spinner/index.cjs +0 -3
- package/dist/Spinner/index.d.cts +0 -11
- package/dist/Spinner/index.d.ts +0 -11
- package/dist/Spinner/index.js +0 -3
- package/dist/Spinner-CjGLIRgs.js +0 -38
- package/dist/Spinner-DFor2Szi.cjs +0 -46
- package/dist/SuggestionButton/index.cjs +0 -188
- package/dist/SuggestionButton/index.d.cts +0 -35
- package/dist/SuggestionButton/index.d.ts +0 -35
- package/dist/SuggestionButton/index.js +0 -180
- package/dist/Text/index.cjs +0 -10
- package/dist/Text/index.d.cts +0 -42
- package/dist/Text/index.d.ts +0 -42
- package/dist/Text/index.js +0 -5
- package/dist/Text-BLzNhX4H.js +0 -42
- package/dist/Text-BMsncrpY.js +0 -10
- package/dist/Text-C8t_iEj6.cjs +0 -16
- package/dist/Text-DllCE9_D.cjs +0 -50
- package/dist/TextInput/index.cjs +0 -4
- package/dist/TextInput/index.d.cts +0 -12
- package/dist/TextInput/index.d.ts +0 -12
- package/dist/TextInput/index.js +0 -4
- package/dist/TextInput-DmsOxxPN.js +0 -31
- package/dist/TextInput-HMW0hxLI.cjs +0 -40
- package/dist/ToggleButton/index.cjs +0 -6
- package/dist/ToggleButton/index.d.cts +0 -30
- package/dist/ToggleButton/index.d.ts +0 -30
- package/dist/ToggleButton/index.js +0 -6
- package/dist/ToggleButton-DblAj4Cd.cjs +0 -68
- package/dist/ToggleButton-r7Y7Kzzo.js +0 -60
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/colorsConfig-B3-SMUSx.cjs +0 -38
- package/dist/colorsConfig-DZ-GSPWy.js +0 -26
- package/dist/index-BKvXn5sj.d.ts +0 -4
- package/dist/index-Br1B7Jta.d.cts +0 -46
- package/dist/index-DADHwW6M.d.ts +0 -325
- package/dist/index-DDp-fLgm.d.cts +0 -325
- package/dist/index-Dh8rcWev.d.ts +0 -46
- package/dist/index-W1wCDiw_.d.cts +0 -4
- package/dist/searchFilterSidebarVariants-J0FJ8pck.js +0 -34
- package/dist/searchFilterSidebarVariants-kkTjYEIF.cjs +0 -39
- package/dist/textVariantClasses-B0gNjzl4.d.cts +0 -174
- package/dist/textVariantClasses-C8OCWZAw.d.ts +0 -174
- package/dist/textVariantClasses-CBre7vXv.cjs +0 -123
- package/dist/textVariantClasses-CRrTb43V.js +0 -99
- package/src/components/Headline/Headline.tsx +0 -81
- package/src/components/Headline/index.ts +0 -1
- package/src/components/SearchInputForm/types.ts +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -3
- package/src/components/Text/types.ts +0 -23
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextStyleVariantMap } from "../textVariantClasses-B0gNjzl4.cjs";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/TextInput/TextInput.d.ts
|
|
5
|
-
interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
-
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
-
borderColorClass?: string;
|
|
8
|
-
placeholderVariant?: keyof typeof TextStyleVariantMap;
|
|
9
|
-
}
|
|
10
|
-
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { TextInput, TextInputProps };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextStyleVariantMap } from "../textVariantClasses-C8OCWZAw.js";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/TextInput/TextInput.d.ts
|
|
5
|
-
interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
-
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
-
borderColorClass?: string;
|
|
8
|
-
placeholderVariant?: keyof typeof TextStyleVariantMap;
|
|
9
|
-
}
|
|
10
|
-
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { TextInput, TextInputProps };
|
package/dist/TextInput/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { TextStyleVariantMap, getVariantPlaceholderClassNames } from "./textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/TextInput/TextInput.tsx
|
|
7
|
-
const TextInput = React.forwardRef(({ className, borderRadius, borderColorClass, placeholderVariant,...rest }, ref) => {
|
|
8
|
-
const variantClassNames = placeholderVariant ? TextStyleVariantMap[placeholderVariant] : {};
|
|
9
|
-
const placeholderVariantClassNames = getVariantPlaceholderClassNames(variantClassNames);
|
|
10
|
-
const inputClasses = classNames([
|
|
11
|
-
{
|
|
12
|
-
"spiffy-text-input": true,
|
|
13
|
-
"spiffy-tw-outline-none": true,
|
|
14
|
-
"spiffy-tw-rounded-[64px]": borderRadius === "xl",
|
|
15
|
-
"spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
16
|
-
"spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
17
|
-
"spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
18
|
-
...placeholderVariantClassNames
|
|
19
|
-
},
|
|
20
|
-
borderColorClass,
|
|
21
|
-
className
|
|
22
|
-
]);
|
|
23
|
-
return /* @__PURE__ */ jsx("input", {
|
|
24
|
-
ref,
|
|
25
|
-
...rest,
|
|
26
|
-
className: inputClasses
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { TextInput };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_textVariantClasses = require('./textVariantClasses-CBre7vXv.cjs');
|
|
3
|
-
let react = require("react");
|
|
4
|
-
react = require_chunk.__toESM(react);
|
|
5
|
-
let classnames = require("classnames");
|
|
6
|
-
classnames = require_chunk.__toESM(classnames);
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
9
|
-
|
|
10
|
-
//#region src/components/TextInput/TextInput.tsx
|
|
11
|
-
const TextInput = react.default.forwardRef(({ className, borderRadius, borderColorClass, placeholderVariant,...rest }, ref) => {
|
|
12
|
-
const variantClassNames = placeholderVariant ? require_textVariantClasses.TextStyleVariantMap[placeholderVariant] : {};
|
|
13
|
-
const placeholderVariantClassNames = require_textVariantClasses.getVariantPlaceholderClassNames(variantClassNames);
|
|
14
|
-
const inputClasses = (0, classnames.default)([
|
|
15
|
-
{
|
|
16
|
-
"spiffy-text-input": true,
|
|
17
|
-
"spiffy-tw-outline-none": true,
|
|
18
|
-
"spiffy-tw-rounded-[64px]": borderRadius === "xl",
|
|
19
|
-
"spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
20
|
-
"spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
21
|
-
"spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
22
|
-
...placeholderVariantClassNames
|
|
23
|
-
},
|
|
24
|
-
borderColorClass,
|
|
25
|
-
className
|
|
26
|
-
]);
|
|
27
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
28
|
-
ref,
|
|
29
|
-
...rest,
|
|
30
|
-
className: inputClasses
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
Object.defineProperty(exports, 'TextInput', {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
get: function () {
|
|
38
|
-
return TextInput;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/ToggleButton/ToggleButton.d.ts
|
|
4
|
-
type ToggleButtonProps = {
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
variant: ToggleButtonVariant;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
label: string;
|
|
9
|
-
buttonClassName?: string;
|
|
10
|
-
labelClassName?: string;
|
|
11
|
-
secondaryLabel?: string;
|
|
12
|
-
secondaryLabelClassName?: string;
|
|
13
|
-
icon?: React.ReactNode;
|
|
14
|
-
iconClassName?: string;
|
|
15
|
-
};
|
|
16
|
-
type ToggleButtonVariant = 'default';
|
|
17
|
-
declare const ToggleButton: ({
|
|
18
|
-
isSelected,
|
|
19
|
-
onClick,
|
|
20
|
-
label,
|
|
21
|
-
buttonClassName,
|
|
22
|
-
labelClassName,
|
|
23
|
-
secondaryLabel,
|
|
24
|
-
secondaryLabelClassName,
|
|
25
|
-
icon,
|
|
26
|
-
iconClassName,
|
|
27
|
-
variant
|
|
28
|
-
}: ToggleButtonProps) => react_jsx_runtime24.JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/ToggleButton/ToggleButton.d.ts
|
|
4
|
-
type ToggleButtonProps = {
|
|
5
|
-
isSelected: boolean;
|
|
6
|
-
variant: ToggleButtonVariant;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
label: string;
|
|
9
|
-
buttonClassName?: string;
|
|
10
|
-
labelClassName?: string;
|
|
11
|
-
secondaryLabel?: string;
|
|
12
|
-
secondaryLabelClassName?: string;
|
|
13
|
-
icon?: React.ReactNode;
|
|
14
|
-
iconClassName?: string;
|
|
15
|
-
};
|
|
16
|
-
type ToggleButtonVariant = 'default';
|
|
17
|
-
declare const ToggleButton: ({
|
|
18
|
-
isSelected,
|
|
19
|
-
onClick,
|
|
20
|
-
label,
|
|
21
|
-
buttonClassName,
|
|
22
|
-
labelClassName,
|
|
23
|
-
secondaryLabel,
|
|
24
|
-
secondaryLabelClassName,
|
|
25
|
-
icon,
|
|
26
|
-
iconClassName,
|
|
27
|
-
variant
|
|
28
|
-
}: ToggleButtonProps) => react_jsx_runtime26.JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-DllCE9_D.cjs');
|
|
3
|
-
let classnames = require("classnames");
|
|
4
|
-
classnames = require_chunk.__toESM(classnames);
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
7
|
-
|
|
8
|
-
//#region src/components/ToggleButton/ToggleButton.tsx
|
|
9
|
-
const toggleButtonVariants = { default: {
|
|
10
|
-
button: ({ isSelected }) => (0, classnames.default)({
|
|
11
|
-
"spiffy-tw-bg-[--spiffy-colors-background-dark]": isSelected,
|
|
12
|
-
"spiffy-tw-border-[--spiffy-colors-background-dark]": isSelected,
|
|
13
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]": isSelected,
|
|
14
|
-
"hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]": true,
|
|
15
|
-
"hover:spiffy-tw-text-[--spiffy-colors-text-primary]": isSelected,
|
|
16
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]": !isSelected,
|
|
17
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]": !isSelected,
|
|
18
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]": !isSelected
|
|
19
|
-
}),
|
|
20
|
-
label: () => "",
|
|
21
|
-
secondaryLabel: ({ isSelected }) => (0, classnames.default)({
|
|
22
|
-
"spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected,
|
|
23
|
-
"hover:spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected
|
|
24
|
-
})
|
|
25
|
-
} };
|
|
26
|
-
const ToggleButton = ({ isSelected, onClick, label, buttonClassName, labelClassName, secondaryLabel, secondaryLabelClassName, icon, iconClassName, variant }) => {
|
|
27
|
-
const buttonClassNames = (0, classnames.default)({
|
|
28
|
-
"spiffy-tw-flex": true,
|
|
29
|
-
"spiffy-tw-items-center": true,
|
|
30
|
-
"spiffy-tw-gap-[4px]": true,
|
|
31
|
-
"spiffy-tw-cursor-pointer": true,
|
|
32
|
-
"spiffy-tw-py-[8px]": true,
|
|
33
|
-
"spiffy-tw-px-[12px]": true,
|
|
34
|
-
"spiffy-tw-rounded-[200px]": true,
|
|
35
|
-
"spiffy-tw-border": true
|
|
36
|
-
}, toggleButtonVariants?.[variant]?.button({ isSelected }), buttonClassName);
|
|
37
|
-
const labelClassNames = (0, classnames.default)({}, toggleButtonVariants?.[variant]?.label({ isSelected }), labelClassName);
|
|
38
|
-
const secondaryLabelClassNames = (0, classnames.default)({}, toggleButtonVariants?.[variant]?.secondaryLabel({ isSelected }), secondaryLabelClassName);
|
|
39
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
40
|
-
className: buttonClassNames,
|
|
41
|
-
onClick,
|
|
42
|
-
type: "button",
|
|
43
|
-
children: [
|
|
44
|
-
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
45
|
-
className: iconClassName,
|
|
46
|
-
children: icon
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
49
|
-
variant: "body3",
|
|
50
|
-
className: labelClassNames,
|
|
51
|
-
children: label
|
|
52
|
-
}),
|
|
53
|
-
secondaryLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
54
|
-
variant: "body4",
|
|
55
|
-
className: secondaryLabelClassNames,
|
|
56
|
-
children: secondaryLabel
|
|
57
|
-
})
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
Object.defineProperty(exports, 'ToggleButton', {
|
|
64
|
-
enumerable: true,
|
|
65
|
-
get: function () {
|
|
66
|
-
return ToggleButton;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Text } from "./Text-BLzNhX4H.js";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ToggleButton/ToggleButton.tsx
|
|
6
|
-
const toggleButtonVariants = { default: {
|
|
7
|
-
button: ({ isSelected }) => classNames({
|
|
8
|
-
"spiffy-tw-bg-[--spiffy-colors-background-dark]": isSelected,
|
|
9
|
-
"spiffy-tw-border-[--spiffy-colors-background-dark]": isSelected,
|
|
10
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]": isSelected,
|
|
11
|
-
"hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]": true,
|
|
12
|
-
"hover:spiffy-tw-text-[--spiffy-colors-text-primary]": isSelected,
|
|
13
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]": !isSelected,
|
|
14
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]": !isSelected,
|
|
15
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]": !isSelected
|
|
16
|
-
}),
|
|
17
|
-
label: () => "",
|
|
18
|
-
secondaryLabel: ({ isSelected }) => classNames({
|
|
19
|
-
"spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected,
|
|
20
|
-
"hover:spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected
|
|
21
|
-
})
|
|
22
|
-
} };
|
|
23
|
-
const ToggleButton = ({ isSelected, onClick, label, buttonClassName, labelClassName, secondaryLabel, secondaryLabelClassName, icon, iconClassName, variant }) => {
|
|
24
|
-
const buttonClassNames = classNames({
|
|
25
|
-
"spiffy-tw-flex": true,
|
|
26
|
-
"spiffy-tw-items-center": true,
|
|
27
|
-
"spiffy-tw-gap-[4px]": true,
|
|
28
|
-
"spiffy-tw-cursor-pointer": true,
|
|
29
|
-
"spiffy-tw-py-[8px]": true,
|
|
30
|
-
"spiffy-tw-px-[12px]": true,
|
|
31
|
-
"spiffy-tw-rounded-[200px]": true,
|
|
32
|
-
"spiffy-tw-border": true
|
|
33
|
-
}, toggleButtonVariants?.[variant]?.button({ isSelected }), buttonClassName);
|
|
34
|
-
const labelClassNames = classNames({}, toggleButtonVariants?.[variant]?.label({ isSelected }), labelClassName);
|
|
35
|
-
const secondaryLabelClassNames = classNames({}, toggleButtonVariants?.[variant]?.secondaryLabel({ isSelected }), secondaryLabelClassName);
|
|
36
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
37
|
-
className: buttonClassNames,
|
|
38
|
-
onClick,
|
|
39
|
-
type: "button",
|
|
40
|
-
children: [
|
|
41
|
-
icon && /* @__PURE__ */ jsx("div", {
|
|
42
|
-
className: iconClassName,
|
|
43
|
-
children: icon
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ jsx(Text, {
|
|
46
|
-
variant: "body3",
|
|
47
|
-
className: labelClassNames,
|
|
48
|
-
children: label
|
|
49
|
-
}),
|
|
50
|
-
secondaryLabel && /* @__PURE__ */ jsx(Text, {
|
|
51
|
-
variant: "body4",
|
|
52
|
-
className: secondaryLabelClassNames,
|
|
53
|
-
children: secondaryLabel
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
export { ToggleButton };
|
package/dist/chunk-CUT6urMc.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(exports, '__toESM', {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return __toESM;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/models/colorsConfig.ts
|
|
3
|
-
var ColorNames = /* @__PURE__ */ function(ColorNames$1) {
|
|
4
|
-
ColorNames$1["TextPrimary"] = "text-primary";
|
|
5
|
-
ColorNames$1["TextSecondary"] = "text-secondary";
|
|
6
|
-
ColorNames$1["TextAccent"] = "text-accent";
|
|
7
|
-
ColorNames$1["TextLink"] = "text-link";
|
|
8
|
-
ColorNames$1["TextLight"] = "text-light";
|
|
9
|
-
ColorNames$1["BackgroundPrimary"] = "background-primary";
|
|
10
|
-
ColorNames$1["BackgroundSecondary"] = "background-secondary";
|
|
11
|
-
ColorNames$1["BackgroundSecondaryDark"] = "background-secondary-dark";
|
|
12
|
-
ColorNames$1["BackgroundTertiary"] = "background-tertiary";
|
|
13
|
-
ColorNames$1["BackgroundDark"] = "background-dark";
|
|
14
|
-
ColorNames$1["BackgroundLight"] = "background-light";
|
|
15
|
-
ColorNames$1["BackgroundSaturated"] = "background-saturated";
|
|
16
|
-
ColorNames$1["BorderLight"] = "border-light";
|
|
17
|
-
ColorNames$1["BorderMedium"] = "border-medium";
|
|
18
|
-
ColorNames$1["BorderDark"] = "border-dark";
|
|
19
|
-
ColorNames$1["BorderOutline"] = "border-outline";
|
|
20
|
-
ColorNames$1["AccentPrimary"] = "accent-primary";
|
|
21
|
-
ColorNames$1["AccentSecondary"] = "accent-secondary";
|
|
22
|
-
return ColorNames$1;
|
|
23
|
-
}(ColorNames || {});
|
|
24
|
-
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
Object.defineProperty(exports, 'ColorNames', {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return ColorNames;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(exports, 'colorVar', {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () {
|
|
36
|
-
return colorVar;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//#region src/models/colorsConfig.ts
|
|
2
|
-
var ColorNames = /* @__PURE__ */ function(ColorNames$1) {
|
|
3
|
-
ColorNames$1["TextPrimary"] = "text-primary";
|
|
4
|
-
ColorNames$1["TextSecondary"] = "text-secondary";
|
|
5
|
-
ColorNames$1["TextAccent"] = "text-accent";
|
|
6
|
-
ColorNames$1["TextLink"] = "text-link";
|
|
7
|
-
ColorNames$1["TextLight"] = "text-light";
|
|
8
|
-
ColorNames$1["BackgroundPrimary"] = "background-primary";
|
|
9
|
-
ColorNames$1["BackgroundSecondary"] = "background-secondary";
|
|
10
|
-
ColorNames$1["BackgroundSecondaryDark"] = "background-secondary-dark";
|
|
11
|
-
ColorNames$1["BackgroundTertiary"] = "background-tertiary";
|
|
12
|
-
ColorNames$1["BackgroundDark"] = "background-dark";
|
|
13
|
-
ColorNames$1["BackgroundLight"] = "background-light";
|
|
14
|
-
ColorNames$1["BackgroundSaturated"] = "background-saturated";
|
|
15
|
-
ColorNames$1["BorderLight"] = "border-light";
|
|
16
|
-
ColorNames$1["BorderMedium"] = "border-medium";
|
|
17
|
-
ColorNames$1["BorderDark"] = "border-dark";
|
|
18
|
-
ColorNames$1["BorderOutline"] = "border-outline";
|
|
19
|
-
ColorNames$1["AccentPrimary"] = "accent-primary";
|
|
20
|
-
ColorNames$1["AccentSecondary"] = "accent-secondary";
|
|
21
|
-
return ColorNames$1;
|
|
22
|
-
}(ColorNames || {});
|
|
23
|
-
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { ColorNames, colorVar };
|
package/dist/index-BKvXn5sj.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
|
-
|
|
4
|
-
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
5
|
-
type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
|
|
6
|
-
type CloseIconVariant$1 = 'light' | 'tertiary' | 'dark';
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts
|
|
9
|
-
interface SearchFilterSidebarVariantClasses {
|
|
10
|
-
searchFilterHeaderClasses: string;
|
|
11
|
-
radioButtonFillColor: string;
|
|
12
|
-
radioButtonHoverColor: string;
|
|
13
|
-
radioButtonUncheckedBorderColor: string;
|
|
14
|
-
filterDefaultClasses: string;
|
|
15
|
-
filterActiveClasses: string;
|
|
16
|
-
filterHoverClasses: string;
|
|
17
|
-
appliedFilterBackgroundClasses: string;
|
|
18
|
-
applyFiltersUnchangedClasses: string;
|
|
19
|
-
applyFiltersChangedClasses: string;
|
|
20
|
-
filterCloseIconVariant: CloseIconVariant$1;
|
|
21
|
-
}
|
|
22
|
-
declare const searchFilterSidebarVariantClasses: Record<SearchFilterSidebarVariant, SearchFilterSidebarVariantClasses>;
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/components/SearchResultsFilterSidebar/SearchResultsFilter.d.ts
|
|
25
|
-
type SearchResultsFilterProps = {
|
|
26
|
-
productCount: number;
|
|
27
|
-
isOpen: boolean;
|
|
28
|
-
setIsOpen: (isOpen: boolean) => void;
|
|
29
|
-
searchFilters: SearchFilterDatum[];
|
|
30
|
-
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
31
|
-
onSelectFilterItem: SelectFilterItem;
|
|
32
|
-
onClearAllFilters: () => void;
|
|
33
|
-
filterButtonText: string;
|
|
34
|
-
};
|
|
35
|
-
declare const SearchResultsFilter: ({
|
|
36
|
-
productCount,
|
|
37
|
-
isOpen,
|
|
38
|
-
setIsOpen,
|
|
39
|
-
searchFilters,
|
|
40
|
-
searchFilterSidebarVariant,
|
|
41
|
-
onSelectFilterItem,
|
|
42
|
-
onClearAllFilters,
|
|
43
|
-
filterButtonText
|
|
44
|
-
}: SearchResultsFilterProps) => react_jsx_runtime0.JSX.Element;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|