@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,188 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../textVariantClasses-CBre7vXv.cjs');
|
|
3
|
-
require('../Text-DllCE9_D.cjs');
|
|
4
|
-
const require_ButtonBase = require('../ButtonBase-DrIwVGTR.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 __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
10
|
-
__envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
11
|
-
let __envive_ai_react_icons_FourPointStar = require("@envive-ai/react-icons/FourPointStar");
|
|
12
|
-
__envive_ai_react_icons_FourPointStar = require_chunk.__toESM(__envive_ai_react_icons_FourPointStar);
|
|
13
|
-
|
|
14
|
-
//#region src/components/SuggestionButton/SuggestionButton.tsx
|
|
15
|
-
const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
16
|
-
const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
17
|
-
const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
18
|
-
const BORDER_CLASS = "spiffy-tw-border";
|
|
19
|
-
const TEXT_LINK_CLASSES = [
|
|
20
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
21
|
-
"spiffy-tw-fill-[--spiffy-colors-text-link]",
|
|
22
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-link]"
|
|
23
|
-
];
|
|
24
|
-
const TEXT_LIGHT_CLASSES = [
|
|
25
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
26
|
-
"spiffy-tw-fill-[--spiffy-colors-text-light]",
|
|
27
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]"
|
|
28
|
-
];
|
|
29
|
-
const TEXT_PRIMARY_CLASSES = [
|
|
30
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
31
|
-
"spiffy-tw-fill-[--spiffy-colors-text-primary]",
|
|
32
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]"
|
|
33
|
-
];
|
|
34
|
-
const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
|
|
35
|
-
const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
|
|
36
|
-
const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
|
|
37
|
-
const variantClassMap = new Map([
|
|
38
|
-
["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
|
|
39
|
-
["outlinedLight", [
|
|
40
|
-
"spiffy-tw-border-[--spiffy-colors-border-outline]",
|
|
41
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
42
|
-
...TEXT_LINK_CLASSES,
|
|
43
|
-
BORDER_CLASS
|
|
44
|
-
]],
|
|
45
|
-
["primary", [
|
|
46
|
-
"spiffy-tw-bg-[--spiffy-colors-background-primary]",
|
|
47
|
-
"spiffy-tw-border-[--spiffy-colors-background-primary]",
|
|
48
|
-
...TEXT_LIGHT_CLASSES,
|
|
49
|
-
BORDER_CLASS
|
|
50
|
-
]],
|
|
51
|
-
["secondary", [
|
|
52
|
-
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
53
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
54
|
-
"spiffy-tw-border-[--spiffy-colors-background-secondary]",
|
|
55
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
56
|
-
BORDER_CLASS
|
|
57
|
-
]],
|
|
58
|
-
["tertiary", [
|
|
59
|
-
"spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
|
|
60
|
-
"spiffy-tw-border-[--spiffy-colors-background-tertiary]",
|
|
61
|
-
...TEXT_LINK_CLASSES,
|
|
62
|
-
BORDER_CLASS
|
|
63
|
-
]],
|
|
64
|
-
["dark", [
|
|
65
|
-
...DARK_BACKGROUND_CLASSES,
|
|
66
|
-
...TEXT_LIGHT_CLASSES,
|
|
67
|
-
BORDER_CLASS
|
|
68
|
-
]],
|
|
69
|
-
["darkPrimary", [
|
|
70
|
-
...DARK_BACKGROUND_CLASSES,
|
|
71
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
72
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
73
|
-
BORDER_CLASS
|
|
74
|
-
]],
|
|
75
|
-
["darkAccent", [
|
|
76
|
-
...DARK_BACKGROUND_CLASSES,
|
|
77
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
78
|
-
"spiffy-tw-fill-[--spiffy-colors-text-accent]",
|
|
79
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
80
|
-
BORDER_CLASS
|
|
81
|
-
]],
|
|
82
|
-
["transparent", [
|
|
83
|
-
"spiffy-tw-bg-transparent",
|
|
84
|
-
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
85
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
86
|
-
"spiffy-tw-fill-transparent",
|
|
87
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]",
|
|
88
|
-
BORDER_CLASS
|
|
89
|
-
]],
|
|
90
|
-
["transparentDark", [
|
|
91
|
-
"spiffy-tw-bg-transparent",
|
|
92
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]",
|
|
93
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
94
|
-
"spiffy-tw-fill-transparent",
|
|
95
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]",
|
|
96
|
-
BORDER_CLASS
|
|
97
|
-
]],
|
|
98
|
-
["secondaryDark", [
|
|
99
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
100
|
-
...TEXT_LINK_CLASSES,
|
|
101
|
-
BORDER_CLASS
|
|
102
|
-
]],
|
|
103
|
-
["secondaryAccent", [
|
|
104
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
105
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
106
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
107
|
-
BORDER_CLASS
|
|
108
|
-
]],
|
|
109
|
-
["lightDark", [
|
|
110
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
111
|
-
"spiffy-tw-border-[--spiffy-colors-background-dark]",
|
|
112
|
-
...TEXT_PRIMARY_CLASSES,
|
|
113
|
-
BORDER_CLASS
|
|
114
|
-
]]
|
|
115
|
-
]);
|
|
116
|
-
const borderedVariants = [
|
|
117
|
-
"outlined",
|
|
118
|
-
"outlinedLight",
|
|
119
|
-
"primary",
|
|
120
|
-
"secondary",
|
|
121
|
-
"tertiary",
|
|
122
|
-
"dark",
|
|
123
|
-
"darkAccent",
|
|
124
|
-
"darkPrimary",
|
|
125
|
-
"transparent",
|
|
126
|
-
"transparentDark",
|
|
127
|
-
"secondaryDark",
|
|
128
|
-
"secondaryAccent",
|
|
129
|
-
"lightDark"
|
|
130
|
-
];
|
|
131
|
-
const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
|
|
132
|
-
const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
|
|
133
|
-
const buttonClassName = (0, classnames.default)({
|
|
134
|
-
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
135
|
-
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
136
|
-
"!spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
137
|
-
"!spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
138
|
-
"!spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
139
|
-
"spiffy-tw-border-[1px]": borderedVariants.includes(variant),
|
|
140
|
-
"spiffy-tw-border-solid": borderedVariants.includes(variant)
|
|
141
|
-
});
|
|
142
|
-
const textClassName = (0, classnames.default)({
|
|
143
|
-
"spiffy-tw-text-[14px]": true,
|
|
144
|
-
"spiffy-tw-leading-[100%]": true,
|
|
145
|
-
"!spiffy-tw-font-bold": boldText
|
|
146
|
-
});
|
|
147
|
-
const iconClass = (0, classnames.default)({
|
|
148
|
-
"spiffy-tw-w-[11px]": true,
|
|
149
|
-
"spiffy-tw-h-[11px]": true,
|
|
150
|
-
"spiffy-tw-stroke-inherit": true,
|
|
151
|
-
"spiffy-tw-fill-inherit": true
|
|
152
|
-
});
|
|
153
|
-
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
154
|
-
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
155
|
-
const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
|
|
156
|
-
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
157
|
-
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
158
|
-
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
159
|
-
const variantClasses = [
|
|
160
|
-
...baseNonBorderClasses,
|
|
161
|
-
...hoverTransform(hoverNonBorderClasses),
|
|
162
|
-
...baseBorderClasses,
|
|
163
|
-
...hoverTransform(hoverBorderClasses)
|
|
164
|
-
];
|
|
165
|
-
const buttonClass = `${buttonClassName} ${variantClasses.join(" ")}`;
|
|
166
|
-
const getIcon = () => {
|
|
167
|
-
if (isAnswer) return void 0;
|
|
168
|
-
if (variant === "transparentDark") return __envive_ai_react_icons_OutlinedStar.default;
|
|
169
|
-
return __envive_ai_react_icons_FourPointStar.default;
|
|
170
|
-
};
|
|
171
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
|
|
172
|
-
text: content,
|
|
173
|
-
dataAttributes,
|
|
174
|
-
dataTestId,
|
|
175
|
-
isDisabled,
|
|
176
|
-
icon: getIcon(),
|
|
177
|
-
iconClass: isAnswer ? void 0 : iconClass,
|
|
178
|
-
textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
|
|
179
|
-
buttonClass,
|
|
180
|
-
onClick
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
//#endregion
|
|
185
|
-
exports.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS;
|
|
186
|
-
exports.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS;
|
|
187
|
-
exports.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS;
|
|
188
|
-
exports.SuggestionButton = SuggestionButton;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
|
-
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
-
|
|
4
|
-
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
|
-
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
9
|
-
declare const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
10
|
-
declare const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
11
|
-
interface SuggestionButtonProps extends TestProps {
|
|
12
|
-
variant: SuggestionButtonVariant;
|
|
13
|
-
hoverVariant: SuggestionButtonVariant;
|
|
14
|
-
isDisabled: boolean;
|
|
15
|
-
content: string;
|
|
16
|
-
boldText?: boolean;
|
|
17
|
-
borderRadius?: 'sm' | 'md' | 'lg';
|
|
18
|
-
isAnswer?: boolean;
|
|
19
|
-
dataAttributes?: Record<string, string>;
|
|
20
|
-
onClick: () => void;
|
|
21
|
-
}
|
|
22
|
-
declare const SuggestionButton: ({
|
|
23
|
-
variant,
|
|
24
|
-
hoverVariant,
|
|
25
|
-
isDisabled,
|
|
26
|
-
content,
|
|
27
|
-
boldText,
|
|
28
|
-
borderRadius,
|
|
29
|
-
isAnswer,
|
|
30
|
-
dataAttributes,
|
|
31
|
-
dataTestId,
|
|
32
|
-
onClick
|
|
33
|
-
}: SuggestionButtonProps) => react_jsx_runtime26.JSX.Element;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
|
-
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
|
-
|
|
4
|
-
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
|
-
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
9
|
-
declare const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
10
|
-
declare const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
11
|
-
interface SuggestionButtonProps extends TestProps {
|
|
12
|
-
variant: SuggestionButtonVariant;
|
|
13
|
-
hoverVariant: SuggestionButtonVariant;
|
|
14
|
-
isDisabled: boolean;
|
|
15
|
-
content: string;
|
|
16
|
-
boldText?: boolean;
|
|
17
|
-
borderRadius?: 'sm' | 'md' | 'lg';
|
|
18
|
-
isAnswer?: boolean;
|
|
19
|
-
dataAttributes?: Record<string, string>;
|
|
20
|
-
onClick: () => void;
|
|
21
|
-
}
|
|
22
|
-
declare const SuggestionButton: ({
|
|
23
|
-
variant,
|
|
24
|
-
hoverVariant,
|
|
25
|
-
isDisabled,
|
|
26
|
-
content,
|
|
27
|
-
boldText,
|
|
28
|
-
borderRadius,
|
|
29
|
-
isAnswer,
|
|
30
|
-
dataAttributes,
|
|
31
|
-
dataTestId,
|
|
32
|
-
onClick
|
|
33
|
-
}: SuggestionButtonProps) => react_jsx_runtime12.JSX.Element;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import "../textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import "../Text-BLzNhX4H.js";
|
|
3
|
-
import { ButtonBase } from "../ButtonBase-DgRupM53.js";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import OutlinedStar from "@envive-ai/react-icons/OutlinedStar";
|
|
7
|
-
import FourPointStar from "@envive-ai/react-icons/FourPointStar";
|
|
8
|
-
|
|
9
|
-
//#region src/components/SuggestionButton/SuggestionButton.tsx
|
|
10
|
-
const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
11
|
-
const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
|
|
12
|
-
const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
|
|
13
|
-
const BORDER_CLASS = "spiffy-tw-border";
|
|
14
|
-
const TEXT_LINK_CLASSES = [
|
|
15
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
16
|
-
"spiffy-tw-fill-[--spiffy-colors-text-link]",
|
|
17
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-link]"
|
|
18
|
-
];
|
|
19
|
-
const TEXT_LIGHT_CLASSES = [
|
|
20
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
21
|
-
"spiffy-tw-fill-[--spiffy-colors-text-light]",
|
|
22
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]"
|
|
23
|
-
];
|
|
24
|
-
const TEXT_PRIMARY_CLASSES = [
|
|
25
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
26
|
-
"spiffy-tw-fill-[--spiffy-colors-text-primary]",
|
|
27
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]"
|
|
28
|
-
];
|
|
29
|
-
const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
|
|
30
|
-
const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
|
|
31
|
-
const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
|
|
32
|
-
const variantClassMap = new Map([
|
|
33
|
-
["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
|
|
34
|
-
["outlinedLight", [
|
|
35
|
-
"spiffy-tw-border-[--spiffy-colors-border-outline]",
|
|
36
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
37
|
-
...TEXT_LINK_CLASSES,
|
|
38
|
-
BORDER_CLASS
|
|
39
|
-
]],
|
|
40
|
-
["primary", [
|
|
41
|
-
"spiffy-tw-bg-[--spiffy-colors-background-primary]",
|
|
42
|
-
"spiffy-tw-border-[--spiffy-colors-background-primary]",
|
|
43
|
-
...TEXT_LIGHT_CLASSES,
|
|
44
|
-
BORDER_CLASS
|
|
45
|
-
]],
|
|
46
|
-
["secondary", [
|
|
47
|
-
"spiffy-tw-bg-[--spiffy-colors-background-secondary]",
|
|
48
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
49
|
-
"spiffy-tw-border-[--spiffy-colors-background-secondary]",
|
|
50
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
51
|
-
BORDER_CLASS
|
|
52
|
-
]],
|
|
53
|
-
["tertiary", [
|
|
54
|
-
"spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
|
|
55
|
-
"spiffy-tw-border-[--spiffy-colors-background-tertiary]",
|
|
56
|
-
...TEXT_LINK_CLASSES,
|
|
57
|
-
BORDER_CLASS
|
|
58
|
-
]],
|
|
59
|
-
["dark", [
|
|
60
|
-
...DARK_BACKGROUND_CLASSES,
|
|
61
|
-
...TEXT_LIGHT_CLASSES,
|
|
62
|
-
BORDER_CLASS
|
|
63
|
-
]],
|
|
64
|
-
["darkPrimary", [
|
|
65
|
-
...DARK_BACKGROUND_CLASSES,
|
|
66
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
67
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
68
|
-
BORDER_CLASS
|
|
69
|
-
]],
|
|
70
|
-
["darkAccent", [
|
|
71
|
-
...DARK_BACKGROUND_CLASSES,
|
|
72
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
73
|
-
"spiffy-tw-fill-[--spiffy-colors-text-accent]",
|
|
74
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
75
|
-
BORDER_CLASS
|
|
76
|
-
]],
|
|
77
|
-
["transparent", [
|
|
78
|
-
"spiffy-tw-bg-transparent",
|
|
79
|
-
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
80
|
-
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
81
|
-
"spiffy-tw-fill-transparent",
|
|
82
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-light]",
|
|
83
|
-
BORDER_CLASS
|
|
84
|
-
]],
|
|
85
|
-
["transparentDark", [
|
|
86
|
-
"spiffy-tw-bg-transparent",
|
|
87
|
-
"spiffy-tw-border-[--spiffy-colors-border-light]",
|
|
88
|
-
"spiffy-tw-text-[--spiffy-colors-text-primary]",
|
|
89
|
-
"spiffy-tw-fill-transparent",
|
|
90
|
-
"spiffy-tw-stroke-[--spiffy-colors-text-primary]",
|
|
91
|
-
BORDER_CLASS
|
|
92
|
-
]],
|
|
93
|
-
["secondaryDark", [
|
|
94
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
95
|
-
...TEXT_LINK_CLASSES,
|
|
96
|
-
BORDER_CLASS
|
|
97
|
-
]],
|
|
98
|
-
["secondaryAccent", [
|
|
99
|
-
...SECONDARY_DARK_BACKGROUND_CLASSES,
|
|
100
|
-
"spiffy-tw-text-[--spiffy-colors-text-link]",
|
|
101
|
-
...ACCENT_PRIMARY_CLASSES,
|
|
102
|
-
BORDER_CLASS
|
|
103
|
-
]],
|
|
104
|
-
["lightDark", [
|
|
105
|
-
"spiffy-tw-bg-[--spiffy-colors-background-light]",
|
|
106
|
-
"spiffy-tw-border-[--spiffy-colors-background-dark]",
|
|
107
|
-
...TEXT_PRIMARY_CLASSES,
|
|
108
|
-
BORDER_CLASS
|
|
109
|
-
]]
|
|
110
|
-
]);
|
|
111
|
-
const borderedVariants = [
|
|
112
|
-
"outlined",
|
|
113
|
-
"outlinedLight",
|
|
114
|
-
"primary",
|
|
115
|
-
"secondary",
|
|
116
|
-
"tertiary",
|
|
117
|
-
"dark",
|
|
118
|
-
"darkAccent",
|
|
119
|
-
"darkPrimary",
|
|
120
|
-
"transparent",
|
|
121
|
-
"transparentDark",
|
|
122
|
-
"secondaryDark",
|
|
123
|
-
"secondaryAccent",
|
|
124
|
-
"lightDark"
|
|
125
|
-
];
|
|
126
|
-
const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
|
|
127
|
-
const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
|
|
128
|
-
const buttonClassName = classNames({
|
|
129
|
-
[SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
|
|
130
|
-
[SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
|
|
131
|
-
"!spiffy-tw-rounded-[20px]": borderRadius === "lg",
|
|
132
|
-
"!spiffy-tw-rounded-[8px]": borderRadius === "md",
|
|
133
|
-
"!spiffy-tw-rounded-[0px]": borderRadius === "sm",
|
|
134
|
-
"spiffy-tw-border-[1px]": borderedVariants.includes(variant),
|
|
135
|
-
"spiffy-tw-border-solid": borderedVariants.includes(variant)
|
|
136
|
-
});
|
|
137
|
-
const textClassName = classNames({
|
|
138
|
-
"spiffy-tw-text-[14px]": true,
|
|
139
|
-
"spiffy-tw-leading-[100%]": true,
|
|
140
|
-
"!spiffy-tw-font-bold": boldText
|
|
141
|
-
});
|
|
142
|
-
const iconClass = classNames({
|
|
143
|
-
"spiffy-tw-w-[11px]": true,
|
|
144
|
-
"spiffy-tw-h-[11px]": true,
|
|
145
|
-
"spiffy-tw-stroke-inherit": true,
|
|
146
|
-
"spiffy-tw-fill-inherit": true
|
|
147
|
-
});
|
|
148
|
-
const baseClasses = variantClassMap.get(variant) ?? [];
|
|
149
|
-
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
150
|
-
const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
|
|
151
|
-
const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
|
|
152
|
-
const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
|
|
153
|
-
const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
|
|
154
|
-
const variantClasses = [
|
|
155
|
-
...baseNonBorderClasses,
|
|
156
|
-
...hoverTransform(hoverNonBorderClasses),
|
|
157
|
-
...baseBorderClasses,
|
|
158
|
-
...hoverTransform(hoverBorderClasses)
|
|
159
|
-
];
|
|
160
|
-
const buttonClass = `${buttonClassName} ${variantClasses.join(" ")}`;
|
|
161
|
-
const getIcon = () => {
|
|
162
|
-
if (isAnswer) return void 0;
|
|
163
|
-
if (variant === "transparentDark") return OutlinedStar;
|
|
164
|
-
return FourPointStar;
|
|
165
|
-
};
|
|
166
|
-
return /* @__PURE__ */ jsx(ButtonBase, {
|
|
167
|
-
text: content,
|
|
168
|
-
dataAttributes,
|
|
169
|
-
dataTestId,
|
|
170
|
-
isDisabled,
|
|
171
|
-
icon: getIcon(),
|
|
172
|
-
iconClass: isAnswer ? void 0 : iconClass,
|
|
173
|
-
textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
|
|
174
|
-
buttonClass,
|
|
175
|
-
onClick
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
//#endregion
|
|
180
|
-
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton };
|
package/dist/Text/index.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const require_textVariantClasses = require('../textVariantClasses-CBre7vXv.cjs');
|
|
2
|
-
const require_Text = require('../Text-DllCE9_D.cjs');
|
|
3
|
-
const require_Text$1 = require('../Text-C8t_iEj6.cjs');
|
|
4
|
-
|
|
5
|
-
exports.ExpandableTextOverrides = require_Text$1.ExpandableTextOverrides;
|
|
6
|
-
exports.HeadlineVariantMap = require_textVariantClasses.HeadlineVariantMap;
|
|
7
|
-
exports.Text = require_Text.Text;
|
|
8
|
-
exports.TextStyleVariantMap = require_textVariantClasses.TextStyleVariantMap;
|
|
9
|
-
exports.TextVariantMap = require_textVariantClasses.TextVariantMap;
|
|
10
|
-
exports.getVariantPlaceholderClassNames = require_textVariantClasses.getVariantPlaceholderClassNames;
|
package/dist/Text/index.d.cts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames } from "../textVariantClasses-B0gNjzl4.cjs";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/Text/types.d.ts
|
|
5
|
-
declare enum ExpandableTextOverrides {
|
|
6
|
-
EXPANDABLE_TEXT_CONTAINER = "spiffy-expandable-text-container",
|
|
7
|
-
EXPANDABLE_TEXT = "spiffy-expandable-text",
|
|
8
|
-
EXPANDABLE_BUTTON = "spiffy-expandable-button",
|
|
9
|
-
}
|
|
10
|
-
type TextVariant = 'body1' | 'body2' | 'body3' | 'body4' | 'body5';
|
|
11
|
-
type TextType = 'p' | 'span' | 'sub';
|
|
12
|
-
type HeadlineProps = {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
className?: string;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
variant?: HeadlineVariant;
|
|
17
|
-
testId?: string;
|
|
18
|
-
id?: string;
|
|
19
|
-
};
|
|
20
|
-
type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/components/Text/Text.d.ts
|
|
23
|
-
type TextProps = {
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
noOfLines?: number;
|
|
26
|
-
className?: string;
|
|
27
|
-
style?: React.CSSProperties;
|
|
28
|
-
variant?: TextVariant;
|
|
29
|
-
type?: TextType;
|
|
30
|
-
testId?: string;
|
|
31
|
-
};
|
|
32
|
-
declare const Text: ({
|
|
33
|
-
children,
|
|
34
|
-
className,
|
|
35
|
-
style,
|
|
36
|
-
noOfLines,
|
|
37
|
-
testId,
|
|
38
|
-
type,
|
|
39
|
-
variant
|
|
40
|
-
}: TextProps) => react_jsx_runtime0.JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { ExpandableTextOverrides, HeadlineProps, HeadlineVariant, HeadlineVariantMap, Text, TextStyleVariantMap, TextType, TextVariant, TextVariantMap, getVariantPlaceholderClassNames };
|
package/dist/Text/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames } from "../textVariantClasses-C8OCWZAw.js";
|
|
2
|
-
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/Text/types.d.ts
|
|
5
|
-
declare enum ExpandableTextOverrides {
|
|
6
|
-
EXPANDABLE_TEXT_CONTAINER = "spiffy-expandable-text-container",
|
|
7
|
-
EXPANDABLE_TEXT = "spiffy-expandable-text",
|
|
8
|
-
EXPANDABLE_BUTTON = "spiffy-expandable-button",
|
|
9
|
-
}
|
|
10
|
-
type TextVariant = 'body1' | 'body2' | 'body3' | 'body4' | 'body5';
|
|
11
|
-
type TextType = 'p' | 'span' | 'sub';
|
|
12
|
-
type HeadlineProps = {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
className?: string;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
variant?: HeadlineVariant;
|
|
17
|
-
testId?: string;
|
|
18
|
-
id?: string;
|
|
19
|
-
};
|
|
20
|
-
type HeadlineVariant = 't1' | 't2' | 't3' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/components/Text/Text.d.ts
|
|
23
|
-
type TextProps = {
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
noOfLines?: number;
|
|
26
|
-
className?: string;
|
|
27
|
-
style?: React.CSSProperties;
|
|
28
|
-
variant?: TextVariant;
|
|
29
|
-
type?: TextType;
|
|
30
|
-
testId?: string;
|
|
31
|
-
};
|
|
32
|
-
declare const Text: ({
|
|
33
|
-
children,
|
|
34
|
-
className,
|
|
35
|
-
style,
|
|
36
|
-
noOfLines,
|
|
37
|
-
testId,
|
|
38
|
-
type,
|
|
39
|
-
variant
|
|
40
|
-
}: TextProps) => react_jsx_runtime13.JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
|
-
export { ExpandableTextOverrides, HeadlineProps, HeadlineVariant, HeadlineVariantMap, Text, TextStyleVariantMap, TextType, TextVariant, TextVariantMap, getVariantPlaceholderClassNames };
|
package/dist/Text/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames } from "../textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import { Text } from "../Text-BLzNhX4H.js";
|
|
3
|
-
import { ExpandableTextOverrides } from "../Text-BMsncrpY.js";
|
|
4
|
-
|
|
5
|
-
export { ExpandableTextOverrides, HeadlineVariantMap, Text, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames };
|
package/dist/Text-BLzNhX4H.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { TextVariantMap } from "./textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/Text/Text.tsx
|
|
6
|
-
const Text = ({ children, className, style, noOfLines, testId, type = "span", variant = "body3" }) => {
|
|
7
|
-
const variantClassNames = variant ? TextVariantMap[variant] : {};
|
|
8
|
-
const textClassNames = classNames(className, variantClassNames, {
|
|
9
|
-
"spiffy-tw-font-[\"Inter Variable,sans-serif\"]": true,
|
|
10
|
-
"spiffy-tw-line-clamp-1": noOfLines === 1,
|
|
11
|
-
"spiffy-tw-line-clamp-2": noOfLines === 2,
|
|
12
|
-
"spiffy-tw-line-clamp-3": noOfLines === 3,
|
|
13
|
-
"spiffy-tw-line-clamp-4": noOfLines === 4,
|
|
14
|
-
"spiffy-tw-line-clamp-5": noOfLines === 5,
|
|
15
|
-
"spiffy-tw-line-clamp-6": noOfLines === 6,
|
|
16
|
-
"spiffy-tw-line-clamp-7": noOfLines === 7
|
|
17
|
-
});
|
|
18
|
-
switch (type) {
|
|
19
|
-
case "p": return /* @__PURE__ */ jsx("p", {
|
|
20
|
-
"data-testid": testId,
|
|
21
|
-
className: textClassNames,
|
|
22
|
-
style,
|
|
23
|
-
children
|
|
24
|
-
});
|
|
25
|
-
case "span": return /* @__PURE__ */ jsx("span", {
|
|
26
|
-
"data-testid": testId,
|
|
27
|
-
className: textClassNames,
|
|
28
|
-
style,
|
|
29
|
-
children
|
|
30
|
-
});
|
|
31
|
-
case "sub": return /* @__PURE__ */ jsx("sub", {
|
|
32
|
-
"data-testid": testId,
|
|
33
|
-
className: textClassNames,
|
|
34
|
-
style,
|
|
35
|
-
children
|
|
36
|
-
});
|
|
37
|
-
default: throw new Error(`Invalid text type: ${type}`);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { Text };
|
package/dist/Text-BMsncrpY.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region src/components/Text/types.ts
|
|
2
|
-
let ExpandableTextOverrides = /* @__PURE__ */ function(ExpandableTextOverrides$1) {
|
|
3
|
-
ExpandableTextOverrides$1["EXPANDABLE_TEXT_CONTAINER"] = "spiffy-expandable-text-container";
|
|
4
|
-
ExpandableTextOverrides$1["EXPANDABLE_TEXT"] = "spiffy-expandable-text";
|
|
5
|
-
ExpandableTextOverrides$1["EXPANDABLE_BUTTON"] = "spiffy-expandable-button";
|
|
6
|
-
return ExpandableTextOverrides$1;
|
|
7
|
-
}({});
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ExpandableTextOverrides };
|
package/dist/Text-C8t_iEj6.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/components/Text/types.ts
|
|
3
|
-
let ExpandableTextOverrides = /* @__PURE__ */ function(ExpandableTextOverrides$1) {
|
|
4
|
-
ExpandableTextOverrides$1["EXPANDABLE_TEXT_CONTAINER"] = "spiffy-expandable-text-container";
|
|
5
|
-
ExpandableTextOverrides$1["EXPANDABLE_TEXT"] = "spiffy-expandable-text";
|
|
6
|
-
ExpandableTextOverrides$1["EXPANDABLE_BUTTON"] = "spiffy-expandable-button";
|
|
7
|
-
return ExpandableTextOverrides$1;
|
|
8
|
-
}({});
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
Object.defineProperty(exports, 'ExpandableTextOverrides', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return ExpandableTextOverrides;
|
|
15
|
-
}
|
|
16
|
-
});
|
package/dist/Text-DllCE9_D.cjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_textVariantClasses = require('./textVariantClasses-CBre7vXv.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/Text/Text.tsx
|
|
9
|
-
const Text = ({ children, className, style, noOfLines, testId, type = "span", variant = "body3" }) => {
|
|
10
|
-
const variantClassNames = variant ? require_textVariantClasses.TextVariantMap[variant] : {};
|
|
11
|
-
const textClassNames = (0, classnames.default)(className, variantClassNames, {
|
|
12
|
-
"spiffy-tw-font-[\"Inter Variable,sans-serif\"]": true,
|
|
13
|
-
"spiffy-tw-line-clamp-1": noOfLines === 1,
|
|
14
|
-
"spiffy-tw-line-clamp-2": noOfLines === 2,
|
|
15
|
-
"spiffy-tw-line-clamp-3": noOfLines === 3,
|
|
16
|
-
"spiffy-tw-line-clamp-4": noOfLines === 4,
|
|
17
|
-
"spiffy-tw-line-clamp-5": noOfLines === 5,
|
|
18
|
-
"spiffy-tw-line-clamp-6": noOfLines === 6,
|
|
19
|
-
"spiffy-tw-line-clamp-7": noOfLines === 7
|
|
20
|
-
});
|
|
21
|
-
switch (type) {
|
|
22
|
-
case "p": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23
|
-
"data-testid": testId,
|
|
24
|
-
className: textClassNames,
|
|
25
|
-
style,
|
|
26
|
-
children
|
|
27
|
-
});
|
|
28
|
-
case "span": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
29
|
-
"data-testid": testId,
|
|
30
|
-
className: textClassNames,
|
|
31
|
-
style,
|
|
32
|
-
children
|
|
33
|
-
});
|
|
34
|
-
case "sub": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("sub", {
|
|
35
|
-
"data-testid": testId,
|
|
36
|
-
className: textClassNames,
|
|
37
|
-
style,
|
|
38
|
-
children
|
|
39
|
-
});
|
|
40
|
-
default: throw new Error(`Invalid text type: ${type}`);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
Object.defineProperty(exports, 'Text', {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: function () {
|
|
48
|
-
return Text;
|
|
49
|
-
}
|
|
50
|
-
});
|
package/dist/TextInput/index.cjs
DELETED