@4alldigital/foundation-ui--core 3.11.0 → 3.12.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 +5 -2
- package/src/components/AnimationSet1/AnimationSet1.tsx +1 -0
- package/src/components/Button/Button.types.ts +2 -1
- package/src/components/Header/Header.tsx +3 -2
- package/src/components/Link/Link.types.ts +1 -0
- package/src/components/Menu/Menu.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +1 -0
- package/src/components/Schedule/Schedule.stories.tsx +1 -3
- package/src/components/SubscriptionManager/SubscriptionManager.stories.tsx +0 -1
- package/src/context/Theme/index.tsx +1 -1
- package/src/features/Search/Search.tsx +1 -0
- package/src/features/Search/config/config-helper.ts +1 -0
- package/src/features/Search/views/Paging/Paging.tsx +1 -0
- package/src/features/Search/views/Paging/Paging.types.ts +1 -0
- package/src/features/Search/views/PagingInfo/PagingInfo.tsx +1 -0
- package/src/features/Search/views/PagingInfo/PagingInfo.types.ts +1 -0
- package/src/features/Search/views/Result/Result.tsx +1 -0
- package/src/features/Search/views/Result/Result.types.ts +1 -0
- package/src/features/Search/views/Results/Results.types.ts +1 -0
- package/src/features/Search/views/ResultsPerPage/ResultsPerPage.tsx +1 -0
- package/src/features/Search/views/ResultsPerPage/ResultsPerPage.types.ts +1 -0
- package/src/features/Search/views/Sorting/Sorting.tsx +1 -0
- package/src/features/Search/views/Sorting/Sorting.types.ts +1 -0
- package/src/templates/ChallengeScreen/ChallengeScreen.stories.tsx +7 -0
- package/src/templates/ContentScreen/ContentScreen.stories.tsx +1 -1
- package/src/templates/DashboardScreen/DashboardScreen.stories.tsx +9 -9
- package/src/templates/FAQScreen/FAQScreen.stories.tsx +1 -1
- package/src/templates/PasswordResetScreen/PasswordResetScreen.stories.tsx +1 -1
- package/src/templates/ScheduleScreen/ScheduleScreen.stories.tsx +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4alldigital/foundation-ui--core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.2",
|
|
4
4
|
"description": "Foundation UI Core Component Library (source distribution)",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -35,5 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"author": "Joe Mewes",
|
|
37
37
|
"license": "MIT",
|
|
38
|
-
"
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/he": "^1.2.3"
|
|
40
|
+
},
|
|
41
|
+
"gitHead": "3d674cdb288d74e5021fcf47bdf674c44355b7af"
|
|
39
42
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { buttonVariants } from './Button';
|
|
3
4
|
import { MouseEventHandler, ReactNode } from 'react';
|
|
@@ -33,7 +34,7 @@ export enum BTN_SIZES {
|
|
|
33
34
|
// New CVA-based button props
|
|
34
35
|
export interface ButtonProps
|
|
35
36
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
36
|
-
VariantProps<typeof buttonVariants> {
|
|
37
|
+
Omit<VariantProps<typeof buttonVariants>, 'variant' | 'size'> {
|
|
37
38
|
// Radix UI Slot support
|
|
38
39
|
asChild?: boolean;
|
|
39
40
|
|
|
@@ -96,7 +96,7 @@ const Header = ({
|
|
|
96
96
|
<div className="hidden md:flex items-center justify-center gap-2">
|
|
97
97
|
{!context?.app?.isAuthenticated && context?.app?.loginCallback && (
|
|
98
98
|
<div className="w-32 flex justify-end">
|
|
99
|
-
<Button onClick={context?.app?.loginCallback}>{T.UI.LOGIN}</Button>
|
|
99
|
+
<Button rounded onClick={context?.app?.loginCallback}>{T.UI.LOGIN}</Button>
|
|
100
100
|
</div>
|
|
101
101
|
)}
|
|
102
102
|
{!context?.app?.isAuthenticated && !context?.app?.loginCallback && (
|
|
@@ -160,12 +160,13 @@ const Header = ({
|
|
|
160
160
|
</div>
|
|
161
161
|
{context?.app?.isAuthenticated && (
|
|
162
162
|
<div className="md:hidden flex justify-center">
|
|
163
|
-
<Button onClick={context?.app?.logoutCallback}>{T.UI.LOGOUT}</Button>
|
|
163
|
+
<Button rounded onClick={context?.app?.logoutCallback}>{T.UI.LOGOUT}</Button>
|
|
164
164
|
</div>
|
|
165
165
|
)}
|
|
166
166
|
{!context?.app?.isAuthenticated && (
|
|
167
167
|
<div className="md:hidden flex justify-center">
|
|
168
168
|
<Button
|
|
169
|
+
rounded
|
|
169
170
|
onClick={() => {
|
|
170
171
|
context?.app?.loginCallback?.();
|
|
171
172
|
toggleMenuClass();
|
|
@@ -21,7 +21,7 @@ const Menu = ({ testID, title, links, inline = true, separators = false, classNa
|
|
|
21
21
|
return (
|
|
22
22
|
<div key={key} className='flex gap-0'>
|
|
23
23
|
<div className="relative py-2">
|
|
24
|
-
<Link href={link.url} className="flex gap-1">
|
|
24
|
+
<Link href={link.url} className="flex gap-1 transition-opacity hover:opacity-70">
|
|
25
25
|
{link.icon && <Icon name={link.icon} />}
|
|
26
26
|
{link.title && <div>{link.title}</div>}
|
|
27
27
|
</Link>
|
|
@@ -70,11 +70,10 @@ const exampleData = [
|
|
|
70
70
|
},
|
|
71
71
|
];
|
|
72
72
|
|
|
73
|
-
const formattedSchedule = formatSchedule(exampleData as ESSchedule[])[0];
|
|
73
|
+
const formattedSchedule = formatSchedule(exampleData as unknown as ESSchedule[])[0];
|
|
74
74
|
|
|
75
75
|
export const Default: Story = {
|
|
76
76
|
args: {
|
|
77
|
-
raised: false,
|
|
78
77
|
scheduleItems: formattedSchedule,
|
|
79
78
|
},
|
|
80
79
|
render: args => {
|
|
@@ -84,7 +83,6 @@ export const Default: Story = {
|
|
|
84
83
|
|
|
85
84
|
export const HasAccess: Story = {
|
|
86
85
|
args: {
|
|
87
|
-
raised: false,
|
|
88
86
|
scheduleItems: formattedSchedule,
|
|
89
87
|
hasAccess: true,
|
|
90
88
|
},
|
|
@@ -50,7 +50,6 @@ export const Default: Story = {
|
|
|
50
50
|
pauseSubscriptionCallback: () => console.log('Pause Subscription'),
|
|
51
51
|
changeSubscriptionCallback: (id: string) => console.log('Change Subscription to: ', id),
|
|
52
52
|
updatePaymentMethodCallback: () => console.log('Update Payment Method'),
|
|
53
|
-
contactSupportCallback: () => console.log('Contact Support'),
|
|
54
53
|
selectedPlanCallback: (planId: string) => console.log('Selected Plan: ', planId),
|
|
55
54
|
isLoading: false,
|
|
56
55
|
},
|
|
@@ -26,36 +26,43 @@ export const Default: Story = {
|
|
|
26
26
|
{
|
|
27
27
|
title: 'Day 1: Root Chakra',
|
|
28
28
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
29
|
+
video: '',
|
|
29
30
|
id: 'day-1',
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
title: 'Day 2: Sacral Chakra',
|
|
33
34
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
35
|
+
video: '',
|
|
34
36
|
id: 'day-2',
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
title: 'Day 3: Solar Plexus Chakra',
|
|
38
40
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
41
|
+
video: '',
|
|
39
42
|
id: 'day-3',
|
|
40
43
|
},
|
|
41
44
|
{
|
|
42
45
|
title: 'Day 4: Heart Chakra',
|
|
43
46
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
47
|
+
video: '',
|
|
44
48
|
id: 'day-4',
|
|
45
49
|
},
|
|
46
50
|
{
|
|
47
51
|
title: 'Day 5: Throat Chakra',
|
|
48
52
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
53
|
+
video: '',
|
|
49
54
|
id: 'day-5',
|
|
50
55
|
},
|
|
51
56
|
{
|
|
52
57
|
title: 'Day 6: Third Eye Chakra',
|
|
53
58
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
59
|
+
video: '',
|
|
54
60
|
id: 'day-6',
|
|
55
61
|
},
|
|
56
62
|
{
|
|
57
63
|
title: 'Day 7: Crown Chakra',
|
|
58
64
|
image: 'https://d9r66csa6956h.cloudfront.net/styles/full_16_9/s3/2023-08/main-min.png?itok=g21nbiph',
|
|
65
|
+
video: '',
|
|
59
66
|
id: 'day-7',
|
|
60
67
|
},
|
|
61
68
|
],
|
|
@@ -39,7 +39,7 @@ const ESPromos = [
|
|
|
39
39
|
sort: [1719844354],
|
|
40
40
|
},
|
|
41
41
|
];
|
|
42
|
-
const formattedPromos = formatPromos(ESPromos);
|
|
42
|
+
const formattedPromos = formatPromos(ESPromos as unknown as Parameters<typeof formatPromos>[0]);
|
|
43
43
|
|
|
44
44
|
const ESPromoNews = [
|
|
45
45
|
{
|
|
@@ -250,7 +250,7 @@ const ESPromoNews = [
|
|
|
250
250
|
},
|
|
251
251
|
];
|
|
252
252
|
|
|
253
|
-
const formattedPromoNews = formatPromos(ESPromoNews);
|
|
253
|
+
const formattedPromoNews = formatPromos(ESPromoNews as unknown as Parameters<typeof formatPromos>[0]);
|
|
254
254
|
|
|
255
255
|
export const Default: Story = {
|
|
256
256
|
parameters: {
|
|
@@ -437,9 +437,9 @@ export const Default: Story = {
|
|
|
437
437
|
},
|
|
438
438
|
],
|
|
439
439
|
promo: {
|
|
440
|
-
title: formattedPromos[0].title,
|
|
441
|
-
description: formattedPromos[0].description,
|
|
442
|
-
image: formattedPromos[0].image,
|
|
440
|
+
title: formattedPromos[0].title ?? '',
|
|
441
|
+
description: formattedPromos[0].description ?? '',
|
|
442
|
+
image: formattedPromos[0].image ?? '',
|
|
443
443
|
buttonData: {
|
|
444
444
|
variant: BTN_VARIANTS.PRIMARY,
|
|
445
445
|
size: BTN_SIZES.MEDIUM,
|
|
@@ -450,11 +450,11 @@ export const Default: Story = {
|
|
|
450
450
|
news: formattedPromoNews.map(promo => ({
|
|
451
451
|
variant: CardVariant.MEDIA,
|
|
452
452
|
data: {
|
|
453
|
-
id: promo.uuid,
|
|
454
|
-
title: promo.title,
|
|
455
|
-
description: promo.description,
|
|
453
|
+
id: promo.uuid ?? '',
|
|
454
|
+
title: promo.title ?? '',
|
|
455
|
+
description: promo.description ?? '',
|
|
456
456
|
image: {
|
|
457
|
-
src: promo.image,
|
|
457
|
+
src: promo.image ?? '',
|
|
458
458
|
alt: 'Placeholder image',
|
|
459
459
|
},
|
|
460
460
|
htmlDetails: true,
|
|
@@ -15,7 +15,7 @@ export const Default: Story = {
|
|
|
15
15
|
args: {
|
|
16
16
|
title: 'Password Reset',
|
|
17
17
|
image: 'https://picsum.photos/1600/900',
|
|
18
|
-
handleSubmitCallback: (data:
|
|
18
|
+
handleSubmitCallback: (data: Record<string, string>) => console.log(data),
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -54,7 +54,7 @@ const exampleData = [
|
|
|
54
54
|
},
|
|
55
55
|
];
|
|
56
56
|
|
|
57
|
-
const formattedSchedule = formatSchedule(exampleData)?.[0];
|
|
57
|
+
const formattedSchedule = formatSchedule(exampleData as unknown as Parameters<typeof formatSchedule>[0])?.[0];
|
|
58
58
|
|
|
59
59
|
// October 2025 example data for calendar view
|
|
60
60
|
const october2025Data = [
|
|
@@ -107,7 +107,7 @@ const october2025Data = [
|
|
|
107
107
|
},
|
|
108
108
|
];
|
|
109
109
|
|
|
110
|
-
const formattedOctober2025Schedule = formatSchedule(october2025Data)?.[0];
|
|
110
|
+
const formattedOctober2025Schedule = formatSchedule(october2025Data as unknown as Parameters<typeof formatSchedule>[0])?.[0];
|
|
111
111
|
|
|
112
112
|
export const Default: Story = {
|
|
113
113
|
parameters: {
|
|
@@ -118,7 +118,6 @@ export const Default: Story = {
|
|
|
118
118
|
title: 'Schedule',
|
|
119
119
|
image: 'https://picsum.photos/1600/900',
|
|
120
120
|
scheduleData: {
|
|
121
|
-
raised: false,
|
|
122
121
|
scheduleItems: formattedSchedule,
|
|
123
122
|
hasAccess: true,
|
|
124
123
|
},
|
|
@@ -134,7 +133,6 @@ export const AccessRestricted: Story = {
|
|
|
134
133
|
title: 'Schedule',
|
|
135
134
|
image: 'https://picsum.photos/1600/900',
|
|
136
135
|
scheduleData: {
|
|
137
|
-
raised: false,
|
|
138
136
|
scheduleItems: formattedSchedule,
|
|
139
137
|
hasAccess: false,
|
|
140
138
|
},
|