@agilant/toga-blox 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/cable.jpg +0 -0
- package/assets/card-1.jpg +0 -0
- package/assets/cat-logo.png +0 -0
- package/assets/item.jpg +0 -0
- package/assets/map.png +0 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +953 -0
- package/coverage/coverage-final.json +74 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +551 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/toga-blox-npm/index.html +131 -0
- package/coverage/toga-blox-npm/postcss.config.js.html +103 -0
- package/coverage/toga-blox-npm/src/components/Badge/Badge.stories.tsx.html +793 -0
- package/coverage/toga-blox-npm/src/components/Badge/Badge.tsx.html +247 -0
- package/coverage/toga-blox-npm/src/components/Badge/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Card/Card.stories.tsx.html +787 -0
- package/coverage/toga-blox-npm/src/components/Card/Card.tsx.html +163 -0
- package/coverage/toga-blox-npm/src/components/Card/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CategoryCardTemplate.tsx.html +343 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CompassCardTemplate.tsx.html +259 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CounterContentCardTemplate.tsx.html +685 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/HorizontalCardTemplate.tsx.html +637 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/ItemCardTemplate.tsx.html +550 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/KitContentCardTemplate.tsx.html +469 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/ShippingAddressCardTemplate.tsx.html +418 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/VerticalCardTemplate.tsx.html +592 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/index.html +221 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.stories.tsx.html +358 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.tsx.html +385 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Description/Description.stories.tsx.html +286 -0
- package/coverage/toga-blox-npm/src/components/Description/Description.tsx.html +124 -0
- package/coverage/toga-blox-npm/src/components/Description/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.stories.tsx.html +676 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.tsx.html +346 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Footer/ContactInfoItem.tsx.html +139 -0
- package/coverage/toga-blox-npm/src/components/Footer/Footer.stories.tsx.html +934 -0
- package/coverage/toga-blox-npm/src/components/Footer/Footer.tsx.html +373 -0
- package/coverage/toga-blox-npm/src/components/Footer/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.stories.tsx.html +952 -0
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.tsx.html +343 -0
- package/coverage/toga-blox-npm/src/components/FormButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.stories.tsx.html +376 -0
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.tsx.html +520 -0
- package/coverage/toga-blox-npm/src/components/GenericList/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DummyDataList.tsx.html +154 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DynamicIconList.tsx.html +250 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.stories.tsx.html +325 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.tsx.html +262 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/Hamburger.stories.tsx.html +760 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/HamburgerButton.tsx.html +232 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Header/Header.stories.tsx.html +1633 -0
- package/coverage/toga-blox-npm/src/components/Header/Header.tsx.html +814 -0
- package/coverage/toga-blox-npm/src/components/Header/headerContext.tsx.html +460 -0
- package/coverage/toga-blox-npm/src/components/Header/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/Hero/Hero.stories.tsx.html +289 -0
- package/coverage/toga-blox-npm/src/components/Hero/Hero.tsx.html +259 -0
- package/coverage/toga-blox-npm/src/components/Hero/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.stories.tsx.html +673 -0
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.tsx.html +313 -0
- package/coverage/toga-blox-npm/src/components/IconButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Image/Image.stories.tsx.html +322 -0
- package/coverage/toga-blox-npm/src/components/Image/Image.tsx.html +226 -0
- package/coverage/toga-blox-npm/src/components/Image/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Input/Input.stories.tsx.html +1621 -0
- package/coverage/toga-blox-npm/src/components/Input/Input.tsx.html +568 -0
- package/coverage/toga-blox-npm/src/components/Input/InputMemoTypes.tsx.html +181 -0
- package/coverage/toga-blox-npm/src/components/Input/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/MobileMenu/MobileMenu.tsx.html +208 -0
- package/coverage/toga-blox-npm/src/components/MobileMenu/index.html +116 -0
- package/coverage/toga-blox-npm/src/components/Nav/Nav.stories.tsx.html +628 -0
- package/coverage/toga-blox-npm/src/components/Nav/Nav.tsx.html +622 -0
- package/coverage/toga-blox-npm/src/components/Nav/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Page/TableDataDummy.tsx.html +733 -0
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.stories.tsx.html +1714 -0
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.tsx.html +115 -0
- package/coverage/toga-blox-npm/src/components/Page/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.stories.tsx.html +433 -0
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.tsx.html +121 -0
- package/coverage/toga-blox-npm/src/components/PageSection/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.stories.tsx.html +517 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.tsx.html +325 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Slider/Slider.stories.tsx.html +349 -0
- package/coverage/toga-blox-npm/src/components/Slider/Slider.tsx.html +502 -0
- package/coverage/toga-blox-npm/src/components/Slider/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AdminSubmenu.tsx.html +136 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenu.tsx.html +253 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenuItem.tsx.html +202 -0
- package/coverage/toga-blox-npm/src/components/Submenus/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/Text/Text.stories.tsx.html +235 -0
- package/coverage/toga-blox-npm/src/components/Text/Text.tsx.html +172 -0
- package/coverage/toga-blox-npm/src/components/Text/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.stories.tsx.html +445 -0
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.tsx.html +301 -0
- package/coverage/toga-blox-npm/src/components/Toaster/index.html +131 -0
- package/coverage/toga-blox-npm/src/hoc/styling/index.html +116 -0
- package/coverage/toga-blox-npm/src/hoc/styling/withStoryBook.tsx.html +142 -0
- package/coverage/toga-blox-npm/src/userHoc/index.html +116 -0
- package/coverage/toga-blox-npm/src/userHoc/withMemo.tsx.html +145 -0
- package/coverage/toga-blox-npm/src/utils/assertTagName.tsx.html +106 -0
- package/coverage/toga-blox-npm/src/utils/generateAccordionItem.tsx.html +373 -0
- package/coverage/toga-blox-npm/src/utils/generateFooterContacts.tsx.html +295 -0
- package/coverage/toga-blox-npm/src/utils/generateNavMenu.tsx.html +247 -0
- package/coverage/toga-blox-npm/src/utils/generateSocialList.tsx.html +187 -0
- package/coverage/toga-blox-npm/src/utils/getFontAwesomeIcon.tsx.html +145 -0
- package/coverage/toga-blox-npm/src/utils/index.html +206 -0
- package/coverage/toga-blox-npm/src/utils/inputValidation.tsx.html +163 -0
- package/coverage/toga-blox-npm/tailwind.config.js.html +205 -0
- package/declarations.d.ts +1 -1
- package/package.json +5 -6
- package/src/components/Badge/Badge.stories.tsx +110 -207
- package/src/components/Badge/Badge.test.tsx +40 -41
- package/src/components/Badge/Badge.tsx +29 -99
- package/src/components/Badge/Badge.types.tsx +12 -23
- package/src/components/Card/Card.stories.tsx +166 -22
- package/src/components/Card/Card.test.tsx +3 -3
- package/src/components/Card/Card.tsx +12 -16
- package/src/components/Card/DUMMYPRODUCTDATA.json +381 -225
- package/src/components/Card/templates/CategoryCardTemplate.tsx +86 -0
- package/src/components/Card/templates/CompassCardTemplate.tsx +1 -1
- package/src/components/Card/templates/CounterContentCardTemplate.tsx +200 -0
- package/src/components/Card/templates/ItemCardTemplate.tsx +155 -0
- package/src/components/Card/templates/KitContentCardTemplate.tsx +128 -0
- package/src/components/Card/templates/ShippingAddressCardTemplate.tsx +111 -0
- package/src/components/Card/templates/VerticalCardTemplate.tsx +100 -85
- package/src/components/CounterButton/CounterButton.tsx +1 -1
- package/src/components/Description/Description.stories.tsx +67 -0
- package/src/components/Description/Description.tsx +13 -0
- package/src/components/Description/Description.types.ts +9 -0
- package/src/components/DropDownIconButton/DropDownIconButton.stories.tsx +197 -0
- package/src/components/DropDownIconButton/DropDownIconButton.test.tsx +90 -0
- package/src/components/DropDownIconButton/DropDownIconButton.tsx +87 -0
- package/src/components/DropDownIconButton/DropDownIconButton.types.ts +21 -0
- package/src/components/DropDownIconButton/index.ts +2 -0
- package/src/components/Footer/ContactInfoItem.tsx +8 -10
- package/src/components/Footer/Footer.stories.tsx +13 -22
- package/src/components/Footer/Footer.tsx +25 -88
- package/src/components/Footer/Footer.types.tsx +2 -2
- package/src/components/FormButton/FormButton.stories.tsx +101 -226
- package/src/components/FormButton/FormButton.test.tsx +1 -1
- package/src/components/FormButton/FormButton.tsx +34 -42
- package/src/components/FormButton/FormButton.types.ts +7 -13
- package/src/components/GenericList/GenericList.stories.tsx +5 -12
- package/src/components/GenericList/GenericList.tsx +91 -92
- package/src/components/GenericList/templates/DynamicIconList.tsx +45 -64
- package/src/components/GetSupport/GetSupport.stories.tsx +80 -0
- package/src/components/GetSupport/GetSupport.test.tsx +62 -0
- package/src/components/GetSupport/GetSupport.tsx +59 -0
- package/src/components/GetSupport/GetSupport.types.ts +11 -0
- package/src/components/HamburgerButton/Hamburger.stories.tsx +225 -0
- package/src/components/HamburgerButton/HamburgerButton.tsx +37 -56
- package/src/components/HamburgerButton/HamburgerButton.types.tsx +2 -1
- package/src/components/Header/Header.stories.tsx +3 -5
- package/src/components/Header/Header.tsx +37 -83
- package/src/components/Hero/Hero.stories.tsx +1 -2
- package/src/components/IconButton/IconButton.stories.tsx +196 -0
- package/src/components/{Icon/Icon.test.tsx → IconButton/IconButton.test.tsx} +3 -4
- package/src/components/IconButton/IconButton.tsx +76 -0
- package/src/components/IconButton/IconButton.types.ts +28 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +10 -12
- package/src/components/Input/Input.test.tsx +2 -3
- package/src/components/Input/Input.tsx +41 -104
- package/src/components/MobileMenu/MobileMenu.types.tsx +0 -2
- package/src/components/Nav/DUMMYNAVDATA.json +4 -4
- package/src/components/Nav/Nav.tsx +49 -112
- package/src/components/Nav/Nav.types.tsx +14 -2
- package/src/components/Page/ViewPageTemplate.stories.tsx +2 -2
- package/src/components/Page/ViewPageTemplate.test.tsx +1 -1
- package/src/components/Page/ViewPageTemplate.types.ts +1 -1
- package/src/components/PageSection/PageSection.stories.tsx +3 -1
- package/src/components/PageSection/PageSections.test.tsx +2 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +144 -0
- package/src/components/SearchInput/SearchInput.tsx +81 -0
- package/src/components/SearchInput/SearchInput.types.ts +28 -0
- package/src/components/Slider/Slider.stories.tsx +88 -0
- package/src/components/Slider/Slider.tsx +139 -0
- package/src/components/Slider/Slider.types.ts +21 -0
- package/src/components/Submenus/AdminSubmenu.tsx +17 -0
- package/src/components/Submenus/AlertSubmenu.tsx +56 -0
- package/src/components/Submenus/AlertSubmenuItem.tsx +39 -0
- package/src/components/Submenus/types.tsx +32 -0
- package/src/components/Toaster/Toaster.stories.tsx +4 -6
- package/src/components/Toaster/Toaster.test.tsx +3 -4
- package/src/components/Toaster/Toaster.tsx +9 -17
- package/src/components/Toaster/Toaster.types.ts +2 -2
- package/src/utils/assertTagName.tsx +1 -1
- package/src/utils/generateAccordionItem.tsx +7 -13
- package/src/utils/generateFooterContacts.tsx +4 -9
- package/src/utils/getFontAwesomeIcon.tsx +8 -13
- package/tailwind.config.js +11 -3
- package/src/components/Badge/badgeClassNames.tsx +0 -173
- package/src/components/Card/cardClassNames.ts +0 -49
- package/src/components/Footer/footerClassNames.tsx +0 -57
- package/src/components/FormButton/formButtonClassNames.tsx +0 -153
- package/src/components/GenericList/genericListClassNames.tsx +0 -8
- package/src/components/Header/headerClassNames.tsx +0 -50
- package/src/components/Icon/Icon.stories.tsx +0 -227
- package/src/components/Icon/Icon.tsx +0 -208
- package/src/components/Icon/Icon.types.ts +0 -24
- package/src/components/Icon/iconClassNames.ts +0 -79
- package/src/components/Icon/index.ts +0 -2
- package/src/components/Input/inputClassNames.tsx +0 -169
- package/src/components/Nav/navClassNames.tsx +0 -192
package/tailwind.config.js
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
module.exports = {
|
|
5
4
|
mode: "jit",
|
|
6
5
|
content: ["./src/**/*.{js,jsx,ts,tsx}"],
|
|
7
6
|
|
|
8
7
|
theme: {
|
|
9
8
|
extend: {
|
|
9
|
+
width: {
|
|
10
|
+
"42px": "42px",
|
|
11
|
+
"26px": "26px",
|
|
12
|
+
"18px": "18px",
|
|
13
|
+
},
|
|
14
|
+
height: {
|
|
15
|
+
"42px": "42px",
|
|
16
|
+
"26px": "26px",
|
|
17
|
+
"18px": "18px",
|
|
18
|
+
},
|
|
10
19
|
maxHeight: {
|
|
11
20
|
"view-page": "1000px",
|
|
12
21
|
},
|
|
13
22
|
fontSize: {
|
|
14
23
|
"3xl": "2.25rem",
|
|
15
24
|
xxs: ".6rem",
|
|
25
|
+
"11px": "11px",
|
|
16
26
|
},
|
|
17
27
|
minWidth: {
|
|
18
28
|
navDropDown: "25em",
|
|
@@ -27,6 +37,4 @@ module.exports = {
|
|
|
27
37
|
mono: ["ui-monospace"],
|
|
28
38
|
},
|
|
29
39
|
},
|
|
30
|
-
|
|
31
|
-
plugins: [require("daisyui")],
|
|
32
40
|
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import classNames from "classNames";
|
|
2
|
-
|
|
3
|
-
export const getHoverClasses = (
|
|
4
|
-
hoverColor: string | undefined,
|
|
5
|
-
cursorPointer: boolean | undefined
|
|
6
|
-
) => {
|
|
7
|
-
return classNames(
|
|
8
|
-
{
|
|
9
|
-
"hover:bg-red-800 hover:text-white": hoverColor === "red",
|
|
10
|
-
"hover:bg-teal-800 hover:text-white": hoverColor === "green",
|
|
11
|
-
"hover:bg-blue-800 hover:text-white": hoverColor === "blue",
|
|
12
|
-
"hover:bg-orange-700 hover:text-white": hoverColor === "orange",
|
|
13
|
-
"hover:bg-purple-700 hover:text-white": hoverColor === "purple",
|
|
14
|
-
"hover:bg-slate-950 hover:text-white": hoverColor === "black",
|
|
15
|
-
"": hoverColor === "none",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"cursor-pointer": cursorPointer === true,
|
|
19
|
-
"": cursorPointer === false,
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const getIconClasses = (
|
|
25
|
-
iconOrder: string | undefined,
|
|
26
|
-
tagStyle: boolean | undefined,
|
|
27
|
-
tagStyleIconColor: string | undefined
|
|
28
|
-
) => {
|
|
29
|
-
return classNames({
|
|
30
|
-
"flex items-center order-first pr-2": iconOrder === "first" && tagStyle === false,
|
|
31
|
-
"flex items-center order-last pl-2": iconOrder === "last" && tagStyle === false,
|
|
32
|
-
"text-white bg-red-500 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
33
|
-
tagStyle === true && tagStyleIconColor === "red",
|
|
34
|
-
"text-white bg-blue-600 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
35
|
-
tagStyle === true && tagStyleIconColor === "blue",
|
|
36
|
-
"text-white bg-teal-700 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
37
|
-
tagStyle === true && tagStyleIconColor === "green",
|
|
38
|
-
"text-white bg-orange-700 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
39
|
-
tagStyle === true && tagStyleIconColor === "orange",
|
|
40
|
-
"text-white bg-purple-700 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
41
|
-
tagStyle === true && tagStyleIconColor === "purple",
|
|
42
|
-
"text-white bg-slate-950 flex justify-center items-center w-8 h-8 rounded-full max-md:text-black max-md:bg-transparent":
|
|
43
|
-
tagStyle === true && tagStyleIconColor === "black",
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const getBadgeSizeClasses = (
|
|
48
|
-
badgeSize: string | undefined,
|
|
49
|
-
width: number | undefined,
|
|
50
|
-
height: number | undefined
|
|
51
|
-
) => {
|
|
52
|
-
return classNames({
|
|
53
|
-
[`w-${width}`]: width,
|
|
54
|
-
[`h-${height}`]: height,
|
|
55
|
-
"w-16 h-8 px-2 py-1 text-xs text-nowrap": badgeSize === "small",
|
|
56
|
-
"w-20 h-10 px-3 py-2 text-sm text-nowrap": badgeSize === "medium",
|
|
57
|
-
"w-24 h-12 px-4 py-3 text-base text-nowrap": badgeSize === "large",
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const getColorClassNames = (
|
|
62
|
-
color: string | undefined,
|
|
63
|
-
borderColor: string | undefined,
|
|
64
|
-
fontColor: string | undefined,
|
|
65
|
-
backgroundColor: string | undefined
|
|
66
|
-
) => {
|
|
67
|
-
return classNames(
|
|
68
|
-
{
|
|
69
|
-
"bg-blue-200": color === "blue",
|
|
70
|
-
"bg-red-200": color === "red",
|
|
71
|
-
"bg-teal-100": color === "green",
|
|
72
|
-
"bg-orange-200": color === "orange",
|
|
73
|
-
"bg-purple-200": color === "purple",
|
|
74
|
-
"bg-slate-950": color === "black",
|
|
75
|
-
"bg-white": color === "white",
|
|
76
|
-
"bg-transparent border-black": color === "clear",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"border-blue-600": borderColor === "blue",
|
|
80
|
-
"border-teal-700": borderColor === "green",
|
|
81
|
-
"border-red-500": borderColor === "red",
|
|
82
|
-
"border-orange-500": borderColor === "orange",
|
|
83
|
-
"border-slate-950": borderColor === "black",
|
|
84
|
-
"border-purple-500": borderColor === "purple",
|
|
85
|
-
"border-transparent": borderColor === "none",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
[`text-${fontColor}`]: fontColor,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
[`bg-${backgroundColor}`]: backgroundColor,
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const getBorderRadiusClasses = (borderRadius: string | undefined) => {
|
|
97
|
-
return classNames({
|
|
98
|
-
"rounded": borderRadius === "rounded",
|
|
99
|
-
"rounded-sm": borderRadius === "rounded-sm",
|
|
100
|
-
"rounded-md": borderRadius === "rounded-md",
|
|
101
|
-
"rounded-lg": borderRadius === "rounded-lg",
|
|
102
|
-
"rounded-xl": borderRadius === "rounded-xl",
|
|
103
|
-
"rounded-2xl": borderRadius === "rounded-2xl",
|
|
104
|
-
"rounded-3xl": borderRadius === "rounded-3xl",
|
|
105
|
-
"rounded-full": borderRadius === "rounded-full",
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
interface BadgeClassProps {
|
|
110
|
-
badgeColorClasses: string;
|
|
111
|
-
hoverClasses: string;
|
|
112
|
-
additionalClasses?: string;
|
|
113
|
-
badgeSizeClasses?: string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
interface PillStyleClassProps {
|
|
117
|
-
badgeColorClasses: string;
|
|
118
|
-
hoverClasses: string;
|
|
119
|
-
additionalClasses?: string;
|
|
120
|
-
hasMobileStyle?: boolean;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
interface TagProps {
|
|
124
|
-
badgeColorClasses: string;
|
|
125
|
-
hoverClasses: string;
|
|
126
|
-
additionalClasses?: string;
|
|
127
|
-
hasMobileStyle?: boolean;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export const getBadgeClasses = ({
|
|
131
|
-
badgeColorClasses,
|
|
132
|
-
hoverClasses,
|
|
133
|
-
additionalClasses,
|
|
134
|
-
badgeSizeClasses,
|
|
135
|
-
}: BadgeClassProps) => {
|
|
136
|
-
return classNames(
|
|
137
|
-
"badge border-2 flex justify-center items-center",
|
|
138
|
-
badgeColorClasses,
|
|
139
|
-
hoverClasses,
|
|
140
|
-
additionalClasses,
|
|
141
|
-
badgeSizeClasses
|
|
142
|
-
);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export const getPillStyleClasses = ({
|
|
146
|
-
badgeColorClasses,
|
|
147
|
-
hoverClasses,
|
|
148
|
-
additionalClasses,
|
|
149
|
-
hasMobileStyle,
|
|
150
|
-
}: PillStyleClassProps) => {
|
|
151
|
-
return classNames(
|
|
152
|
-
"flex justify-center items-center w-full border-2 p-2",
|
|
153
|
-
hasMobileStyle ? "max-md:w-12 max-md:h-12 max-md:p-4" : "",
|
|
154
|
-
badgeColorClasses,
|
|
155
|
-
hoverClasses,
|
|
156
|
-
additionalClasses
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const getTagClasses = ({
|
|
161
|
-
badgeColorClasses,
|
|
162
|
-
hoverClasses,
|
|
163
|
-
additionalClasses,
|
|
164
|
-
hasMobileStyle,
|
|
165
|
-
}: TagProps) => {
|
|
166
|
-
return classNames(
|
|
167
|
-
"flex justify-between items-center w-fit border-2",
|
|
168
|
-
hasMobileStyle ? "max-md:w-12 max-md:h-6 max-md:p-2" : "",
|
|
169
|
-
badgeColorClasses,
|
|
170
|
-
hoverClasses,
|
|
171
|
-
additionalClasses
|
|
172
|
-
);
|
|
173
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import classNames from "classNames";
|
|
2
|
-
|
|
3
|
-
export const getCardStyleClasses = (
|
|
4
|
-
cardShape: string | undefined,
|
|
5
|
-
cardBorderColor: string | undefined,
|
|
6
|
-
cardBackgroundColor: string | undefined,
|
|
7
|
-
cardBoxShadow: boolean | undefined
|
|
8
|
-
) => {
|
|
9
|
-
return classNames(
|
|
10
|
-
{
|
|
11
|
-
"shadow-md": cardBoxShadow === true,
|
|
12
|
-
"": cardBoxShadow === false,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"rounded-none": cardShape === "cornered",
|
|
16
|
-
"overflow-hidden rounded-md": cardShape === "semiRounded",
|
|
17
|
-
"overflow-hidden rounded-lg": cardShape === "rounded",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"bg-blue-100": cardBackgroundColor === "light blue",
|
|
21
|
-
"bg-teal-100": cardBackgroundColor === "light green",
|
|
22
|
-
"bg-blue-500": cardBackgroundColor === "blue",
|
|
23
|
-
"bg-lime-500": cardBackgroundColor === "lime",
|
|
24
|
-
"bg-teal-500": cardBackgroundColor === "green",
|
|
25
|
-
"bg-yellow-400": cardBackgroundColor === "yellow",
|
|
26
|
-
"bg-orange-500": cardBackgroundColor === "orange",
|
|
27
|
-
"bg-rose-500": cardBackgroundColor === "pink",
|
|
28
|
-
"bg-fuchsia-500": cardBackgroundColor === "fuchsia",
|
|
29
|
-
"bg-purple-500": cardBackgroundColor === "purple",
|
|
30
|
-
"bg-slate-50": cardBackgroundColor === "gray",
|
|
31
|
-
"bg-white": cardBackgroundColor === "white",
|
|
32
|
-
"bg-transparent": cardBackgroundColor === "none",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"border-2 border-blue-500": cardBorderColor === "blue",
|
|
36
|
-
"border-2 border-lime-500": cardBorderColor === "lime",
|
|
37
|
-
"border-2 border-teal-500": cardBorderColor === "green",
|
|
38
|
-
"border-2 border-yellow-400": cardBorderColor === "yellow",
|
|
39
|
-
"border-2 border-orange-500": cardBorderColor === "orange",
|
|
40
|
-
"border-2 border-rose-500": cardBorderColor === "pink",
|
|
41
|
-
"border-2 border-fuchsia-500": cardBorderColor === "fuchsia",
|
|
42
|
-
"border-2 border-purple-500": cardBorderColor === "purple",
|
|
43
|
-
"border-2 border-slate-50": cardBorderColor === "gray",
|
|
44
|
-
"border-2 border-white": cardBorderColor === "white",
|
|
45
|
-
"border-2 border-black": cardBorderColor === "black",
|
|
46
|
-
"border-0 border-transparent": cardBorderColor === "none",
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import classNames from "classNames";
|
|
2
|
-
|
|
3
|
-
export const getLogoClasses = (
|
|
4
|
-
logoHoverColor: string | undefined,
|
|
5
|
-
logoBorderRadius: boolean | undefined
|
|
6
|
-
) => {
|
|
7
|
-
return classNames(
|
|
8
|
-
"flex",
|
|
9
|
-
"justify-center",
|
|
10
|
-
{
|
|
11
|
-
"rounded-full": logoBorderRadius === true,
|
|
12
|
-
"rounded-none": logoBorderRadius === false,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"hover:bg-blue-300": logoHoverColor === "blue",
|
|
16
|
-
"hover:bg-teal-300": logoHoverColor === "green",
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export const getBackgroundColor = (
|
|
23
|
-
backgroundColor: string | undefined,
|
|
24
|
-
) => {
|
|
25
|
-
return classNames(
|
|
26
|
-
{
|
|
27
|
-
"bg-teal-50": backgroundColor === "green",
|
|
28
|
-
"bg-slate-200": backgroundColor === "gray",
|
|
29
|
-
"bg-transparent": backgroundColor === "none",
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const getSocialPlacement = (
|
|
35
|
-
socialPlacement: string | undefined,
|
|
36
|
-
) => {
|
|
37
|
-
return classNames(
|
|
38
|
-
{
|
|
39
|
-
"justify-start pl-4": socialPlacement === "left",
|
|
40
|
-
"justify-center text-center": socialPlacement === "center",
|
|
41
|
-
"justify-end": socialPlacement === "right",
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const getCopyRightPlacement = (
|
|
47
|
-
copyRightTextPlacement: string | undefined,
|
|
48
|
-
) => {
|
|
49
|
-
return classNames(
|
|
50
|
-
{
|
|
51
|
-
"justify-start pl-4": copyRightTextPlacement === "left",
|
|
52
|
-
"justify-center": copyRightTextPlacement === "center",
|
|
53
|
-
"justify-end": copyRightTextPlacement === "right",
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import classNames from "classNames";
|
|
2
|
-
|
|
3
|
-
export const getHoverClassNames = (
|
|
4
|
-
hoverBackground: string | undefined,
|
|
5
|
-
hoverFontColor: string | undefined,
|
|
6
|
-
hoverUnderline: boolean | undefined,
|
|
7
|
-
hoverBorderColor: string | undefined,
|
|
8
|
-
isDisabled: boolean | undefined
|
|
9
|
-
) => {
|
|
10
|
-
return classNames(
|
|
11
|
-
{
|
|
12
|
-
"hover:bg-blue-200": hoverBackground === "blue" && !isDisabled,
|
|
13
|
-
"hover:bg-teal-100": hoverBackground === "green" && !isDisabled,
|
|
14
|
-
"hover:bg-gray-200": hoverBackground === "grey" && !isDisabled,
|
|
15
|
-
"hover:bg-slate-950": hoverBackground === "black" && !isDisabled,
|
|
16
|
-
"hover:bg-transparent text-black": hoverBackground === "none" && !isDisabled,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"hover:text-blue-800": hoverFontColor === "blue" && !isDisabled,
|
|
20
|
-
"hover:text-teal-800": hoverFontColor === "green" && !isDisabled,
|
|
21
|
-
"hover:text-gray-800": hoverFontColor === "grey" && !isDisabled,
|
|
22
|
-
"hover:text-slate-50": hoverFontColor === "white" && !isDisabled,
|
|
23
|
-
"hover:text-black": hoverFontColor === "black" && !isDisabled,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"hover:border-blue-800": hoverBorderColor === "blue" && !isDisabled,
|
|
27
|
-
"hover:border-teal-800":
|
|
28
|
-
hoverBorderColor === "green" && !isDisabled,
|
|
29
|
-
"hover:border-gray-800": hoverBorderColor === "grey" && !isDisabled,
|
|
30
|
-
"hover:border-black": hoverBorderColor === "black" && !isDisabled,
|
|
31
|
-
"hover:border-transparent":
|
|
32
|
-
hoverBackground === "none" && !isDisabled,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"hover:underline hover:underline-offset-4":
|
|
36
|
-
hoverUnderline === true && !isDisabled,
|
|
37
|
-
"": hoverUnderline === false || isDisabled,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"opacity-50 cursor-not-allowed": isDisabled === true,
|
|
41
|
-
"cursor-pointer": isDisabled === false,
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const getColorClassNames = (
|
|
47
|
-
color: string | undefined,
|
|
48
|
-
fontColor: string | undefined,
|
|
49
|
-
borderColor: string | undefined
|
|
50
|
-
) => {
|
|
51
|
-
return classNames(
|
|
52
|
-
{
|
|
53
|
-
"bg-blue-600": color === "blue",
|
|
54
|
-
"bg-teal-700": color === "green",
|
|
55
|
-
"bg-gray-600": color === "grey",
|
|
56
|
-
"bg-transparent border-black": color === "clear",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"border-blue-600": borderColor === "blue",
|
|
60
|
-
"border-teal-700": borderColor === "green",
|
|
61
|
-
"border-gray-600": borderColor === "grey",
|
|
62
|
-
"border-transparent": borderColor === "none",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"text-white": fontColor === "white" && color !== "clear",
|
|
66
|
-
"text-black": fontColor === "black",
|
|
67
|
-
},
|
|
68
|
-
{}
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const getIconClasses = (iconOrder: string | undefined) => {
|
|
73
|
-
return classNames({
|
|
74
|
-
"flex items-center order-first": iconOrder === "first",
|
|
75
|
-
"flex items-center order-last pl-2": iconOrder === "last",
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const getSizeClasses = (
|
|
80
|
-
buttonWide: boolean | undefined,
|
|
81
|
-
size: string | undefined
|
|
82
|
-
) => {
|
|
83
|
-
return classNames(
|
|
84
|
-
{
|
|
85
|
-
"btn-wide": buttonWide === true,
|
|
86
|
-
"": buttonWide === false,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"text-xs": size === "xs",
|
|
90
|
-
"text-sm": size === "sm",
|
|
91
|
-
"text-md": size === "md",
|
|
92
|
-
"text-lg": size === "lg",
|
|
93
|
-
"text-xl": size === "xl",
|
|
94
|
-
[`text-${size}`]: size !== undefined,
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const getTextClasses = (
|
|
100
|
-
textStyle: string | undefined,
|
|
101
|
-
fontFamily: string | undefined
|
|
102
|
-
) => {
|
|
103
|
-
return classNames(
|
|
104
|
-
{
|
|
105
|
-
"font-normal": textStyle === "normal",
|
|
106
|
-
"font-bold": textStyle === "bold",
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"font-sans": fontFamily === "sans",
|
|
110
|
-
"font-serif": fontFamily === "serif",
|
|
111
|
-
"font-mono": fontFamily === "mono",
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
interface ButtonClassProps {
|
|
117
|
-
buttonColorClasses: string;
|
|
118
|
-
buttonSizeClasses: string;
|
|
119
|
-
buttonShapeClasses: string;
|
|
120
|
-
textStyleClasses: string;
|
|
121
|
-
hoverClasses: string;
|
|
122
|
-
hasShadow: boolean;
|
|
123
|
-
customWidth?: string;
|
|
124
|
-
customHeight?: string;
|
|
125
|
-
additionalClasses?: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export const getButtonClasses = ({
|
|
129
|
-
buttonColorClasses,
|
|
130
|
-
buttonSizeClasses,
|
|
131
|
-
buttonShapeClasses,
|
|
132
|
-
textStyleClasses,
|
|
133
|
-
hoverClasses,
|
|
134
|
-
hasShadow,
|
|
135
|
-
customWidth,
|
|
136
|
-
customHeight,
|
|
137
|
-
additionalClasses,
|
|
138
|
-
}: ButtonClassProps) => {
|
|
139
|
-
return classNames(
|
|
140
|
-
"border-2 p-1 rounded-full flex justify-center max-sm:text-xs",
|
|
141
|
-
buttonColorClasses,
|
|
142
|
-
buttonSizeClasses,
|
|
143
|
-
buttonShapeClasses,
|
|
144
|
-
textStyleClasses,
|
|
145
|
-
hoverClasses,
|
|
146
|
-
{
|
|
147
|
-
"shadow-md": hasShadow,
|
|
148
|
-
},
|
|
149
|
-
customWidth,
|
|
150
|
-
customHeight,
|
|
151
|
-
additionalClasses
|
|
152
|
-
);
|
|
153
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import classNames from "classNames";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const getLogoClasses = (logoBorderRadius: boolean | undefined, logoHoverColor: string | undefined) => {
|
|
5
|
-
|
|
6
|
-
return classNames(
|
|
7
|
-
"border-transparent",
|
|
8
|
-
"p-1",
|
|
9
|
-
{
|
|
10
|
-
"rounded-full": logoBorderRadius === true,
|
|
11
|
-
"rounded-none": logoBorderRadius === false,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"hover:bg-blue-300": logoHoverColor === "blue",
|
|
15
|
-
"hover:bg-red-300": logoHoverColor === "red",
|
|
16
|
-
"hover:bg-teal-100": logoHoverColor === "green",
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const getHeaderClasses = (backgroundColor: string | undefined, bottomBorderColor: string | undefined,) => {
|
|
22
|
-
return classNames(
|
|
23
|
-
{
|
|
24
|
-
"bg-teal-100": backgroundColor === "green",
|
|
25
|
-
"bg-blue-100": backgroundColor === "blue",
|
|
26
|
-
"bg-slate-200": backgroundColor === "gray",
|
|
27
|
-
"bg-transparent": backgroundColor === "none",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"border-teal-500": bottomBorderColor === "green",
|
|
31
|
-
"border-blue-500": bottomBorderColor === "blue",
|
|
32
|
-
"border-slate-950": bottomBorderColor === "black",
|
|
33
|
-
"border-transparent": bottomBorderColor === "none",
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const getMobileMenuClasses = (
|
|
39
|
-
mobileMenuBackground: string | undefined,
|
|
40
|
-
) => {
|
|
41
|
-
return classNames(
|
|
42
|
-
{
|
|
43
|
-
"bg-teal-50": mobileMenuBackground === "green",
|
|
44
|
-
"bg-blue-50": mobileMenuBackground === "blue",
|
|
45
|
-
"bg-slate-100": mobileMenuBackground === "gray",
|
|
46
|
-
"bg-slate-50": mobileMenuBackground === "white",
|
|
47
|
-
"bg-transparent": mobileMenuBackground === "none",
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
};
|