@envive-ai/react-toolkit 0.2.0 → 0.2.2
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 +10 -13
- package/src/components/Accordion/Accordion.tsx +3 -3
- package/src/components/AnimatedChevron/AnimatedChevron.tsx +1 -2
- 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/SearchInput/searchInputVariants.ts +2 -2
- 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/AnimatedChevron/index.cjs +0 -3
- package/dist/AnimatedChevron/index.d.cts +0 -11
- package/dist/AnimatedChevron/index.d.ts +0 -11
- package/dist/AnimatedChevron/index.js +0 -3
- package/dist/AnimatedChevron-CwuXgR2r.js +0 -29
- package/dist/AnimatedChevron-e_UzWBl0.cjs +0 -37
- 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-BJ0qXMWD.js +0 -60
- package/dist/ButtonBase-BktteD9c.js +0 -1
- package/dist/ButtonBase-Cb6Iec6f.cjs +0 -0
- package/dist/ButtonBase-VIv-tn7H.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-HCYZjI14.cjs +0 -81
- package/dist/DynamicFiltersScrollbar-O0ai3cIG.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-CKJmd2w4.cjs +0 -72
- package/dist/Headline-DtjTB4xS.js +0 -64
- 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-CbYsD1_a.js +0 -42
- package/dist/ImageWithFallback-Km9h16Vz.cjs +0 -51
- package/dist/ModalSheet/index.cjs +0 -4
- package/dist/ModalSheet/index.d.cts +0 -38
- package/dist/ModalSheet/index.d.ts +0 -38
- package/dist/ModalSheet/index.js +0 -4
- package/dist/ModalSheet-DwnbbFh7.cjs +0 -313
- package/dist/ModalSheet-sMg44OLz.js +0 -302
- 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-BDz80MCQ.cjs +0 -319
- package/dist/ProductCard-CqhNJShq.js +0 -255
- 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-8n4XgcMr.js +0 -60
- package/dist/ProductGrid-RRcdkY5J.cjs +0 -74
- 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-BWnaUI8o.cjs +0 -84
- package/dist/RadioButton-CG8_M0hY.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-B7EuiEP1.js +0 -38
- package/dist/RadioButtonGroup-ReQqakpS.cjs +0 -52
- package/dist/SearchAutocomplete/index.cjs +0 -3
- package/dist/SearchAutocomplete/index.d.cts +0 -13
- package/dist/SearchAutocomplete/index.d.ts +0 -13
- package/dist/SearchAutocomplete/index.js +0 -3
- package/dist/SearchAutocomplete-BMNYZiJL.js +0 -51
- package/dist/SearchAutocomplete-BmHdijOv.cjs +0 -62
- package/dist/SearchFilter/index.cjs +0 -19
- package/dist/SearchFilter/index.d.cts +0 -91
- package/dist/SearchFilter/index.d.ts +0 -91
- package/dist/SearchFilter/index.js +0 -14
- package/dist/SearchFilter-C8mgj84o.js +0 -268
- package/dist/SearchFilter-FrdHPM5O.cjs +0 -307
- package/dist/SearchInput/index.cjs +0 -7
- package/dist/SearchInput/index.d.cts +0 -34
- package/dist/SearchInput/index.d.ts +0 -34
- package/dist/SearchInput/index.js +0 -6
- package/dist/SearchInput--x9NTMTb.cjs +0 -106
- package/dist/SearchInput-IBq83nqF.js +0 -89
- package/dist/SearchInputForm/index.cjs +0 -39
- package/dist/SearchInputForm/index.d.cts +0 -34
- package/dist/SearchInputForm/index.d.ts +0 -34
- package/dist/SearchInputForm/index.js +0 -37
- 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 -62
- package/dist/SearchResultsFilterSidebar/index.d.cts +0 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
- package/dist/SearchResultsFilterSidebar/index.js +0 -57
- 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-D7dM35qq.js +0 -110
- package/dist/SearchResultsStates-nlaPbkj3.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-D1aZE-7A.cjs +0 -101
- package/dist/SparkleAnimation-DtWkXmkN.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-bg6jb_ks.js +0 -38
- package/dist/Spinner-rcWX566W.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-BeHPlVHT.js +0 -31
- package/dist/TextInput-CGs4BY1q.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-CRiPqTCb.js +0 -60
- package/dist/ToggleButton-DfJZ8POQ.cjs +0 -68
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/colorsConfig-Ck2jeqWe.js +0 -26
- package/dist/colorsConfig-CqCKftuM.cjs +0 -38
- package/dist/index-B9WeFNlO.d.cts +0 -325
- package/dist/index-CLGe_Pam.d.cts +0 -46
- package/dist/index-CeECGrFM.d.ts +0 -325
- package/dist/index-PSzeHU2s.d.ts +0 -46
- package/dist/searchFilterSidebarVariants-B05f5SD5.js +0 -34
- package/dist/searchFilterSidebarVariants-NQhqq-NT.cjs +0 -39
- package/dist/textVariantClasses-B0gNjzl4.d.cts +0 -174
- package/dist/textVariantClasses-Bl8SAGwZ.d.ts +0 -174
- package/dist/textVariantClasses-CBre7vXv.cjs +0 -123
- package/dist/textVariantClasses-CRrTb43V.js +0 -99
- package/dist/types-BhGjnuWx.d.cts +0 -4
- package/dist/types-CTOdb0G0.d.ts +0 -4
- package/src/components/Headline/Headline.tsx +0 -81
- package/src/components/Headline/index.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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TypographyVariantMap,
|
|
3
|
+
TypographyDomVariantMap,
|
|
4
|
+
ElementTypes,
|
|
5
|
+
} from './typographyVariantClasses';
|
|
6
|
+
|
|
7
|
+
export const getElementTypeFromVariant = (
|
|
8
|
+
variant: keyof typeof TypographyVariantMap,
|
|
9
|
+
isHeadline: boolean,
|
|
10
|
+
): ElementTypes => {
|
|
11
|
+
if (isHeadline) {
|
|
12
|
+
// if the variant corresponds to a real dom element, then use it as the element type.
|
|
13
|
+
const mappedHeaderElement = TypographyDomVariantMap[variant]
|
|
14
|
+
? (variant as keyof typeof TypographyDomVariantMap)
|
|
15
|
+
: null;
|
|
16
|
+
return mappedHeaderElement || 'h3'; // defaults to h3
|
|
17
|
+
}
|
|
18
|
+
return 'span'; // default to span for body variants.
|
|
19
|
+
};
|
package/dist/Accordion/index.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/Accordion/Accordion.d.ts
|
|
4
|
-
interface AccordionProps {
|
|
5
|
-
title: string;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare const Accordion: ({
|
|
9
|
-
title,
|
|
10
|
-
content
|
|
11
|
-
}: AccordionProps) => react_jsx_runtime17.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Accordion };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/Accordion/Accordion.d.ts
|
|
4
|
-
interface AccordionProps {
|
|
5
|
-
title: string;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare const Accordion: ({
|
|
9
|
-
title,
|
|
10
|
-
content
|
|
11
|
-
}: AccordionProps) => react_jsx_runtime22.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Accordion };
|
package/dist/Accordion/index.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-DllCE9_D.cjs');
|
|
3
|
-
let framer_motion = require("framer-motion");
|
|
4
|
-
framer_motion = require_chunk.__toESM(framer_motion);
|
|
5
|
-
let react = require("react");
|
|
6
|
-
react = require_chunk.__toESM(react);
|
|
7
|
-
let classnames = require("classnames");
|
|
8
|
-
classnames = require_chunk.__toESM(classnames);
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
11
|
-
let __envive_ai_react_icons_ChevronDown = require("@envive-ai/react-icons/ChevronDown");
|
|
12
|
-
__envive_ai_react_icons_ChevronDown = require_chunk.__toESM(__envive_ai_react_icons_ChevronDown);
|
|
13
|
-
|
|
14
|
-
//#region src/components/Accordion/Accordion.tsx
|
|
15
|
-
const ANIMATION_DURATION = .3;
|
|
16
|
-
const Accordion = ({ title, content }) => {
|
|
17
|
-
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
18
|
-
const contentRef = (0, react.useRef)(null);
|
|
19
|
-
const titleWrapperClasses = (0, classnames.default)({
|
|
20
|
-
"spiffy-tw-border-b": true,
|
|
21
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]": true,
|
|
22
|
-
"spiffy-tw-pb-2": true,
|
|
23
|
-
"spiffy-tw-flex": true,
|
|
24
|
-
"spiffy-tw-justify-between": true,
|
|
25
|
-
"spiffy-tw-items-center": true,
|
|
26
|
-
"spiffy-tw-w-full": true,
|
|
27
|
-
"spiffy-tw-group": true
|
|
28
|
-
});
|
|
29
|
-
const titleClasses = (0, classnames.default)({
|
|
30
|
-
"spiffy-tw-uppercase": true,
|
|
31
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]": true,
|
|
32
|
-
"!spiffy-tw-font-[400]": true,
|
|
33
|
-
"group-aria-expanded:!spiffy-tw-font-medium": true
|
|
34
|
-
});
|
|
35
|
-
const contentClasses = (0, classnames.default)({ "spiffy-tw-overflow-hidden": true });
|
|
36
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
37
|
-
"aria-expanded": isOpen,
|
|
38
|
-
type: "button",
|
|
39
|
-
className: titleWrapperClasses,
|
|
40
|
-
onClick: () => setIsOpen(!isOpen),
|
|
41
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
42
|
-
variant: "body4",
|
|
43
|
-
className: titleClasses,
|
|
44
|
-
children: title
|
|
45
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
46
|
-
variants: {
|
|
47
|
-
open: { rotate: 180 },
|
|
48
|
-
closed: { rotate: 360 }
|
|
49
|
-
},
|
|
50
|
-
animate: isOpen ? "open" : "closed",
|
|
51
|
-
transition: {
|
|
52
|
-
duration: ANIMATION_DURATION,
|
|
53
|
-
ease: "easeOut"
|
|
54
|
-
},
|
|
55
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_ChevronDown.default, {})
|
|
56
|
-
})]
|
|
57
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
58
|
-
variants: {
|
|
59
|
-
open: {
|
|
60
|
-
height: "auto",
|
|
61
|
-
marginTop: "24px",
|
|
62
|
-
marginBottom: "24px"
|
|
63
|
-
},
|
|
64
|
-
closed: {
|
|
65
|
-
height: "0px",
|
|
66
|
-
marginTop: "0px",
|
|
67
|
-
marginBottom: "0px"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
className: contentClasses,
|
|
71
|
-
initial: { height: 0 },
|
|
72
|
-
animate: isOpen ? "open" : "closed",
|
|
73
|
-
transition: {
|
|
74
|
-
duration: ANIMATION_DURATION,
|
|
75
|
-
ease: "easeOut"
|
|
76
|
-
},
|
|
77
|
-
ref: contentRef,
|
|
78
|
-
children: content
|
|
79
|
-
})] });
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
//#endregion
|
|
83
|
-
Object.defineProperty(exports, 'Accordion', {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function () {
|
|
86
|
-
return Accordion;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Text } from "./Text-BLzNhX4H.js";
|
|
2
|
-
import { motion } from "framer-motion";
|
|
3
|
-
import { useRef, useState } from "react";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import ChevronDown from "@envive-ai/react-icons/ChevronDown";
|
|
7
|
-
|
|
8
|
-
//#region src/components/Accordion/Accordion.tsx
|
|
9
|
-
const ANIMATION_DURATION = .3;
|
|
10
|
-
const Accordion = ({ title, content }) => {
|
|
11
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
12
|
-
const contentRef = useRef(null);
|
|
13
|
-
const titleWrapperClasses = classNames({
|
|
14
|
-
"spiffy-tw-border-b": true,
|
|
15
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]": true,
|
|
16
|
-
"spiffy-tw-pb-2": true,
|
|
17
|
-
"spiffy-tw-flex": true,
|
|
18
|
-
"spiffy-tw-justify-between": true,
|
|
19
|
-
"spiffy-tw-items-center": true,
|
|
20
|
-
"spiffy-tw-w-full": true,
|
|
21
|
-
"spiffy-tw-group": true
|
|
22
|
-
});
|
|
23
|
-
const titleClasses = classNames({
|
|
24
|
-
"spiffy-tw-uppercase": true,
|
|
25
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]": true,
|
|
26
|
-
"!spiffy-tw-font-[400]": true,
|
|
27
|
-
"group-aria-expanded:!spiffy-tw-font-medium": true
|
|
28
|
-
});
|
|
29
|
-
const contentClasses = classNames({ "spiffy-tw-overflow-hidden": true });
|
|
30
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("button", {
|
|
31
|
-
"aria-expanded": isOpen,
|
|
32
|
-
type: "button",
|
|
33
|
-
className: titleWrapperClasses,
|
|
34
|
-
onClick: () => setIsOpen(!isOpen),
|
|
35
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
36
|
-
variant: "body4",
|
|
37
|
-
className: titleClasses,
|
|
38
|
-
children: title
|
|
39
|
-
}), /* @__PURE__ */ jsx(motion.div, {
|
|
40
|
-
variants: {
|
|
41
|
-
open: { rotate: 180 },
|
|
42
|
-
closed: { rotate: 360 }
|
|
43
|
-
},
|
|
44
|
-
animate: isOpen ? "open" : "closed",
|
|
45
|
-
transition: {
|
|
46
|
-
duration: ANIMATION_DURATION,
|
|
47
|
-
ease: "easeOut"
|
|
48
|
-
},
|
|
49
|
-
children: /* @__PURE__ */ jsx(ChevronDown, {})
|
|
50
|
-
})]
|
|
51
|
-
}), /* @__PURE__ */ jsx(motion.div, {
|
|
52
|
-
variants: {
|
|
53
|
-
open: {
|
|
54
|
-
height: "auto",
|
|
55
|
-
marginTop: "24px",
|
|
56
|
-
marginBottom: "24px"
|
|
57
|
-
},
|
|
58
|
-
closed: {
|
|
59
|
-
height: "0px",
|
|
60
|
-
marginTop: "0px",
|
|
61
|
-
marginBottom: "0px"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
className: contentClasses,
|
|
65
|
-
initial: { height: 0 },
|
|
66
|
-
animate: isOpen ? "open" : "closed",
|
|
67
|
-
transition: {
|
|
68
|
-
duration: ANIMATION_DURATION,
|
|
69
|
-
ease: "easeOut"
|
|
70
|
-
},
|
|
71
|
-
ref: contentRef,
|
|
72
|
-
children: content
|
|
73
|
-
})] });
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
export { Accordion };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MotionValue } from "framer-motion";
|
|
2
|
-
import { FC } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/AnimatedChevron/AnimatedChevron.d.ts
|
|
5
|
-
interface AnimatedChevronProps {
|
|
6
|
-
animationKey: MotionValue;
|
|
7
|
-
chevronColor: string;
|
|
8
|
-
}
|
|
9
|
-
declare const AnimatedChevron: FC<AnimatedChevronProps>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { AnimatedChevron };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MotionValue } from "framer-motion";
|
|
2
|
-
import { FC } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/AnimatedChevron/AnimatedChevron.d.ts
|
|
5
|
-
interface AnimatedChevronProps {
|
|
6
|
-
animationKey: MotionValue;
|
|
7
|
-
chevronColor: string;
|
|
8
|
-
}
|
|
9
|
-
declare const AnimatedChevron: FC<AnimatedChevronProps>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { AnimatedChevron };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { motion, useTransform } from "framer-motion";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/AnimatedChevron/AnimatedChevron.tsx
|
|
5
|
-
const AnimatedChevron = ({ animationKey, chevronColor }) => {
|
|
6
|
-
const leftRotation = useTransform(animationKey, [300, 0], [-12, 0]);
|
|
7
|
-
const rightRotation = useTransform(animationKey, [300, 0], [12, 0]);
|
|
8
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
-
style: { display: "flex" },
|
|
10
|
-
children: [/* @__PURE__ */ jsx(motion.div, { style: {
|
|
11
|
-
x: 1,
|
|
12
|
-
width: "25px",
|
|
13
|
-
height: "4px",
|
|
14
|
-
background: chevronColor,
|
|
15
|
-
borderRadius: "8px",
|
|
16
|
-
rotate: leftRotation
|
|
17
|
-
} }), /* @__PURE__ */ jsx(motion.div, { style: {
|
|
18
|
-
x: -1,
|
|
19
|
-
width: "25px",
|
|
20
|
-
height: "4px",
|
|
21
|
-
background: chevronColor,
|
|
22
|
-
borderRadius: "8px",
|
|
23
|
-
rotate: rightRotation
|
|
24
|
-
} })]
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { AnimatedChevron };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
let framer_motion = require("framer-motion");
|
|
3
|
-
framer_motion = require_chunk.__toESM(framer_motion);
|
|
4
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
6
|
-
|
|
7
|
-
//#region src/components/AnimatedChevron/AnimatedChevron.tsx
|
|
8
|
-
const AnimatedChevron = ({ animationKey, chevronColor }) => {
|
|
9
|
-
const leftRotation = (0, framer_motion.useTransform)(animationKey, [300, 0], [-12, 0]);
|
|
10
|
-
const rightRotation = (0, framer_motion.useTransform)(animationKey, [300, 0], [12, 0]);
|
|
11
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
12
|
-
style: { display: "flex" },
|
|
13
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, { style: {
|
|
14
|
-
x: 1,
|
|
15
|
-
width: "25px",
|
|
16
|
-
height: "4px",
|
|
17
|
-
background: chevronColor,
|
|
18
|
-
borderRadius: "8px",
|
|
19
|
-
rotate: leftRotation
|
|
20
|
-
} }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, { style: {
|
|
21
|
-
x: -1,
|
|
22
|
-
width: "25px",
|
|
23
|
-
height: "4px",
|
|
24
|
-
background: chevronColor,
|
|
25
|
-
borderRadius: "8px",
|
|
26
|
-
rotate: rightRotation
|
|
27
|
-
} })]
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
Object.defineProperty(exports, 'AnimatedChevron', {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return AnimatedChevron;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../textVariantClasses-CBre7vXv.cjs');
|
|
3
|
-
const require_Text = require('../Text-DllCE9_D.cjs');
|
|
4
|
-
require('../Text-C8t_iEj6.cjs');
|
|
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
|
-
let react_indiana_drag_scroll = require("react-indiana-drag-scroll");
|
|
10
|
-
react_indiana_drag_scroll = require_chunk.__toESM(react_indiana_drag_scroll);
|
|
11
|
-
|
|
12
|
-
//#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx
|
|
13
|
-
const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
|
|
14
|
-
if (selectedFilterOptions.length === 0) return null;
|
|
15
|
-
const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
|
|
16
|
-
const buttonClasses = (0, classnames.default)(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
|
|
17
|
-
const iconColor = "currentColor";
|
|
18
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_indiana_drag_scroll.default, {
|
|
19
|
-
className: filterBarClassNames,
|
|
20
|
-
hideScrollbars: true,
|
|
21
|
-
children: selectedFilterOptions.map((filter) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22
|
-
className: buttonClasses,
|
|
23
|
-
type: "button",
|
|
24
|
-
onClick: () => onRemoveFilter(filter),
|
|
25
|
-
"aria-label": `Remove filter: ${filter.displayName}`,
|
|
26
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
27
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
|
|
28
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
29
|
-
variant: "body3",
|
|
30
|
-
children: filter.displayName
|
|
31
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
32
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
33
|
-
width: "10",
|
|
34
|
-
height: "10",
|
|
35
|
-
viewBox: "0 0 10 10",
|
|
36
|
-
fill: "none",
|
|
37
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
38
|
-
d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
|
|
39
|
-
fill: iconColor
|
|
40
|
-
})
|
|
41
|
-
})]
|
|
42
|
-
})
|
|
43
|
-
}, filter.id))
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
exports.AppliedFiltersScrollbar = AppliedFiltersScrollbar;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
|
-
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
3
|
-
|
|
4
|
-
//#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts
|
|
5
|
-
interface AppliedFiltersScrollbarProps {
|
|
6
|
-
selectedFilterOptions: SelectedFilterOption[];
|
|
7
|
-
filterBarClassNames: string;
|
|
8
|
-
filterDefaultClasses: string;
|
|
9
|
-
filterHoverClasses: string;
|
|
10
|
-
appliedFilterBackgroundClasses: string;
|
|
11
|
-
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const AppliedFiltersScrollbar: ({
|
|
14
|
-
selectedFilterOptions,
|
|
15
|
-
filterBarClassNames,
|
|
16
|
-
filterDefaultClasses,
|
|
17
|
-
filterHoverClasses,
|
|
18
|
-
appliedFilterBackgroundClasses,
|
|
19
|
-
onRemoveFilter
|
|
20
|
-
}: AppliedFiltersScrollbarProps) => react_jsx_runtime15.JSX.Element;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { AppliedFiltersScrollbar };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
|
-
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
3
|
-
|
|
4
|
-
//#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts
|
|
5
|
-
interface AppliedFiltersScrollbarProps {
|
|
6
|
-
selectedFilterOptions: SelectedFilterOption[];
|
|
7
|
-
filterBarClassNames: string;
|
|
8
|
-
filterDefaultClasses: string;
|
|
9
|
-
filterHoverClasses: string;
|
|
10
|
-
appliedFilterBackgroundClasses: string;
|
|
11
|
-
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const AppliedFiltersScrollbar: ({
|
|
14
|
-
selectedFilterOptions,
|
|
15
|
-
filterBarClassNames,
|
|
16
|
-
filterDefaultClasses,
|
|
17
|
-
filterHoverClasses,
|
|
18
|
-
appliedFilterBackgroundClasses,
|
|
19
|
-
onRemoveFilter
|
|
20
|
-
}: AppliedFiltersScrollbarProps) => react_jsx_runtime5.JSX.Element;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { AppliedFiltersScrollbar };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "../textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import { Text } from "../Text-BLzNhX4H.js";
|
|
3
|
-
import "../Text-BMsncrpY.js";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import ScrollContainer from "react-indiana-drag-scroll";
|
|
7
|
-
|
|
8
|
-
//#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx
|
|
9
|
-
const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
|
|
10
|
-
if (selectedFilterOptions.length === 0) return null;
|
|
11
|
-
const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
|
|
12
|
-
const buttonClasses = classNames(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
|
|
13
|
-
const iconColor = "currentColor";
|
|
14
|
-
return /* @__PURE__ */ jsx(ScrollContainer, {
|
|
15
|
-
className: filterBarClassNames,
|
|
16
|
-
hideScrollbars: true,
|
|
17
|
-
children: selectedFilterOptions.map((filter) => /* @__PURE__ */ jsx("button", {
|
|
18
|
-
className: buttonClasses,
|
|
19
|
-
type: "button",
|
|
20
|
-
onClick: () => onRemoveFilter(filter),
|
|
21
|
-
"aria-label": `Remove filter: ${filter.displayName}`,
|
|
22
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
|
|
24
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
25
|
-
variant: "body3",
|
|
26
|
-
children: filter.displayName
|
|
27
|
-
}), /* @__PURE__ */ jsx("svg", {
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
width: "10",
|
|
30
|
-
height: "10",
|
|
31
|
-
viewBox: "0 0 10 10",
|
|
32
|
-
fill: "none",
|
|
33
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
34
|
-
d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
|
|
35
|
-
fill: iconColor
|
|
36
|
-
})
|
|
37
|
-
})]
|
|
38
|
-
})
|
|
39
|
-
}, filter.id))
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { AppliedFiltersScrollbar };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
require('../textVariantClasses-CBre7vXv.cjs');
|
|
2
|
-
require('../Text-DllCE9_D.cjs');
|
|
3
|
-
const require_ButtonBase = require('../ButtonBase-VIv-tn7H.cjs');
|
|
4
|
-
require('../ButtonBase-Cb6Iec6f.cjs');
|
|
5
|
-
|
|
6
|
-
exports.ButtonBase = require_ButtonBase.ButtonBase;
|
|
7
|
-
exports.ButtonBaseOverrides = require_ButtonBase.ButtonBaseOverrides;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
|
-
import { ButtonHTMLAttributes, CSSProperties } from "react";
|
|
3
|
-
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ButtonBase/types.d.ts
|
|
6
|
-
interface ButtonHoverStyles extends CSSProperties {
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
color?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ButtonBaseProps extends TestProps {
|
|
11
|
-
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
12
|
-
isDisabled?: boolean;
|
|
13
|
-
dataAttributes?: Record<string, string>;
|
|
14
|
-
buttonClass?: string;
|
|
15
|
-
text: string;
|
|
16
|
-
textClass?: string;
|
|
17
|
-
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
18
|
-
iconClass?: string;
|
|
19
|
-
onClick?: () => void;
|
|
20
|
-
disablePadding?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare enum ButtonBaseOverrides {
|
|
23
|
-
BUTTON = "spiffy-button-base-button",
|
|
24
|
-
BUTTON_TEXT = "spiffy-button-base-button-text",
|
|
25
|
-
BUTTON_ICON = "spiffy-button-base-button-icon",
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/components/ButtonBase/ButtonBase.d.ts
|
|
29
|
-
declare const ButtonBase: ({
|
|
30
|
-
isDisabled,
|
|
31
|
-
dataAttributes,
|
|
32
|
-
buttonClass,
|
|
33
|
-
text,
|
|
34
|
-
textClass,
|
|
35
|
-
icon,
|
|
36
|
-
iconClass,
|
|
37
|
-
dataTestId,
|
|
38
|
-
onClick,
|
|
39
|
-
disablePadding
|
|
40
|
-
}: ButtonBaseProps) => react_jsx_runtime16.JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { ButtonBase, ButtonBaseOverrides, ButtonBaseProps, ButtonHoverStyles };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, CSSProperties } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ButtonBase/types.d.ts
|
|
6
|
-
interface ButtonHoverStyles extends CSSProperties {
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
color?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ButtonBaseProps extends TestProps {
|
|
11
|
-
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
12
|
-
isDisabled?: boolean;
|
|
13
|
-
dataAttributes?: Record<string, string>;
|
|
14
|
-
buttonClass?: string;
|
|
15
|
-
text: string;
|
|
16
|
-
textClass?: string;
|
|
17
|
-
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
18
|
-
iconClass?: string;
|
|
19
|
-
onClick?: () => void;
|
|
20
|
-
disablePadding?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare enum ButtonBaseOverrides {
|
|
23
|
-
BUTTON = "spiffy-button-base-button",
|
|
24
|
-
BUTTON_TEXT = "spiffy-button-base-button-text",
|
|
25
|
-
BUTTON_ICON = "spiffy-button-base-button-icon",
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/components/ButtonBase/ButtonBase.d.ts
|
|
29
|
-
declare const ButtonBase: ({
|
|
30
|
-
isDisabled,
|
|
31
|
-
dataAttributes,
|
|
32
|
-
buttonClass,
|
|
33
|
-
text,
|
|
34
|
-
textClass,
|
|
35
|
-
icon,
|
|
36
|
-
iconClass,
|
|
37
|
-
dataTestId,
|
|
38
|
-
onClick,
|
|
39
|
-
disablePadding
|
|
40
|
-
}: ButtonBaseProps) => react_jsx_runtime0.JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { ButtonBase, ButtonBaseOverrides, ButtonBaseProps, ButtonHoverStyles };
|
package/dist/ButtonBase/index.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Text } from "./Text-BLzNhX4H.js";
|
|
2
|
-
import { createElement, useEffect, useRef } from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/components/ButtonBase/types.ts
|
|
7
|
-
let ButtonBaseOverrides = /* @__PURE__ */ function(ButtonBaseOverrides$1) {
|
|
8
|
-
ButtonBaseOverrides$1["BUTTON"] = "spiffy-button-base-button";
|
|
9
|
-
ButtonBaseOverrides$1["BUTTON_TEXT"] = "spiffy-button-base-button-text";
|
|
10
|
-
ButtonBaseOverrides$1["BUTTON_ICON"] = "spiffy-button-base-button-icon";
|
|
11
|
-
return ButtonBaseOverrides$1;
|
|
12
|
-
}({});
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/ButtonBase/ButtonBase.tsx
|
|
16
|
-
const ButtonBase = ({ isDisabled = false, dataAttributes, buttonClass, text, textClass, icon, iconClass = "spiffy-tw-w-[21px] spiffy-tw-h-[21px]", dataTestId, onClick, disablePadding = false }) => {
|
|
17
|
-
const buttonRef = useRef(null);
|
|
18
|
-
const buttonClassName = classNames({
|
|
19
|
-
[ButtonBaseOverrides.BUTTON]: true,
|
|
20
|
-
"spiffy-tw-flex": true,
|
|
21
|
-
"spiffy-tw-min-h-[36px]": true,
|
|
22
|
-
"spiffy-tw-cursor-pointer": true,
|
|
23
|
-
"spiffy-tw-items-center": true,
|
|
24
|
-
"spiffy-tw-gap-2": true,
|
|
25
|
-
"spiffy-tw-px-4": !disablePadding,
|
|
26
|
-
"spiffy-tw-transition-colors": true,
|
|
27
|
-
"spiffy-tw-opacity-40": isDisabled,
|
|
28
|
-
"spiffy-tw-cursor-not-allowed": isDisabled,
|
|
29
|
-
[`${buttonClass}`]: buttonClass != null
|
|
30
|
-
});
|
|
31
|
-
const textClassName = classNames({
|
|
32
|
-
[ButtonBaseOverrides.BUTTON_TEXT]: true,
|
|
33
|
-
"spiffy-tw-whitespace-nowrap": true,
|
|
34
|
-
[`${textClass}`]: textClass != null
|
|
35
|
-
});
|
|
36
|
-
const iconClassName = classNames({
|
|
37
|
-
[ButtonBaseOverrides.BUTTON_ICON]: true,
|
|
38
|
-
[`${iconClass}`]: iconClass != null
|
|
39
|
-
});
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (dataAttributes && buttonRef.current) Object.entries(dataAttributes).forEach(([key, value]) => {
|
|
42
|
-
buttonRef.current?.setAttribute(key, value);
|
|
43
|
-
});
|
|
44
|
-
}, [dataAttributes]);
|
|
45
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
ref: buttonRef,
|
|
48
|
-
className: buttonClassName,
|
|
49
|
-
disabled: isDisabled,
|
|
50
|
-
"data-testid": dataTestId,
|
|
51
|
-
onClick,
|
|
52
|
-
children: [icon && createElement(icon, { className: iconClassName }), /* @__PURE__ */ jsx(Text, {
|
|
53
|
-
className: textClassName,
|
|
54
|
-
children: text
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
export { ButtonBase, ButtonBaseOverrides };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|