@universal-tennis/ui-shared 0.1.98 → 0.2.0
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/.storybook/main.js +16 -16
- package/.storybook/typography.css +5 -26
- package/dist/App.d.ts +2 -2
- package/dist/App.js +12 -12
- package/dist/components.d.ts +43 -43
- package/dist/components.js +48 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/items.d.ts +2 -2
- package/dist/items.js +1 -1
- package/dist/stories/assets/css/typography.css +5 -26
- package/dist/stories/atoms/Button/Button.d.ts +10 -10
- package/dist/stories/atoms/Button/Button.js +95 -95
- package/dist/stories/atoms/Button/Button.js.map +1 -1
- package/dist/stories/atoms/Button/Button.stories.d.ts +17 -17
- package/dist/stories/atoms/Button/Button.stories.js +45 -45
- package/dist/stories/atoms/Icons/AddIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/AddIcon.js +8 -8
- package/dist/stories/atoms/Icons/AvailabilityMaybeIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/AvailabilityMaybeIcon.js +6 -6
- package/dist/stories/atoms/Icons/AvailabilityNoIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/AvailabilityNoIcon.js +6 -6
- package/dist/stories/atoms/Icons/AvailabilityNotSetIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/AvailabilityNotSetIcon.js +7 -7
- package/dist/stories/atoms/Icons/AvailabilityYesIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/AvailabilityYesIcon.js +6 -6
- package/dist/stories/atoms/Icons/BallInMotionIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/BallInMotionIcon.js +9 -9
- package/dist/stories/atoms/Icons/CalendarIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/CalendarIcon.js +6 -6
- package/dist/stories/atoms/Icons/ClockIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/ClockIcon.js +8 -8
- package/dist/stories/atoms/Icons/CloseIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/CloseIcon.js +6 -6
- package/dist/stories/atoms/Icons/DeleteIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/DeleteIcon.js +10 -10
- package/dist/stories/atoms/Icons/DoublePersonIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/DoublePersonIcon.js +13 -13
- package/dist/stories/atoms/Icons/EditIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/EditIcon.js +6 -6
- package/dist/stories/atoms/Icons/Icons.stories.d.ts +37 -37
- package/dist/stories/atoms/Icons/Icons.stories.js +303 -303
- package/dist/stories/atoms/Icons/LeftChevronIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/LeftChevronIcon.js +6 -6
- package/dist/stories/atoms/Icons/LineIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/LineIcon.js +6 -6
- package/dist/stories/atoms/Icons/LocationIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/LocationIcon.js +7 -7
- package/dist/stories/atoms/Icons/MessageIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/MessageIcon.js +6 -6
- package/dist/stories/atoms/Icons/PickleballBallIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/PickleballBallIcon.js +17 -17
- package/dist/stories/atoms/Icons/RightChevronIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/RightChevronIcon.js +6 -6
- package/dist/stories/atoms/Icons/SessionIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SessionIcon.js +6 -6
- package/dist/stories/atoms/Icons/SinglePersonIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SinglePersonIcon.js +9 -9
- package/dist/stories/atoms/Icons/SinglePersonV2Icon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SinglePersonV2Icon.js +7 -7
- package/dist/stories/atoms/Icons/SocialMediaFacebookIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SocialMediaFacebookIcon.js +10 -10
- package/dist/stories/atoms/Icons/SocialMediaInstagramIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SocialMediaInstagramIcon.js +6 -6
- package/dist/stories/atoms/Icons/SocialMediaTikTokIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SocialMediaTikTokIcon.js +10 -10
- package/dist/stories/atoms/Icons/SocialMediaXIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SocialMediaXIcon.js +10 -10
- package/dist/stories/atoms/Icons/SocialMediaYoutubeIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SocialMediaYoutubeIcon.js +6 -6
- package/dist/stories/atoms/Icons/SwapIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SwapIcon.js +6 -6
- package/dist/stories/atoms/Icons/SwapNoBorderIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/SwapNoBorderIcon.js +9 -9
- package/dist/stories/atoms/Icons/TennisBallIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/TennisBallIcon.js +8 -8
- package/dist/stories/atoms/Icons/VerifiedIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/VerifiedIcon.js +7 -7
- package/dist/stories/atoms/Icons/VisibilityIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/VisibilityIcon.js +7 -7
- package/dist/stories/atoms/Icons/VisibilityOffIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/VisibilityOffIcon.js +8 -8
- package/dist/stories/atoms/Icons/WinnerIndicatorIcon.d.ts +3 -3
- package/dist/stories/atoms/Icons/WinnerIndicatorIcon.js +31 -31
- package/dist/stories/atoms/Icons/sharedTypes.d.ts +11 -11
- package/dist/stories/atoms/Icons/sharedTypes.js +1 -1
- package/dist/stories/atoms/Typography/Typography.d.ts +49 -49
- package/dist/stories/atoms/Typography/Typography.js +143 -143
- package/dist/stories/atoms/Typography/Typography.js.map +1 -1
- package/dist/stories/atoms/Typography/Typography.stories.d.ts +37 -37
- package/dist/stories/atoms/Typography/Typography.stories.js +190 -190
- package/dist/stories/atoms/UTMap/UTMap.d.ts +7 -7
- package/dist/stories/atoms/UTMap/UTMap.js +8 -8
- package/dist/stories/atoms/UTMap/UTMap.stories.d.ts +9 -9
- package/dist/stories/atoms/UTMap/UTMap.stories.js +35 -35
- package/dist/stories/molecules/AvatarWithName/AvatarWithName.d.ts +27 -27
- package/dist/stories/molecules/AvatarWithName/AvatarWithName.js +20 -20
- package/dist/stories/molecules/AvatarWithName/AvatarWithName.stories.d.ts +15 -15
- package/dist/stories/molecules/AvatarWithName/AvatarWithName.stories.js +72 -72
- package/dist/stories/molecules/Cards/Cards.stories.d.ts +7 -7
- package/dist/stories/molecules/Cards/Cards.stories.js +64 -64
- package/dist/stories/molecules/Cards/ContactCard.d.ts +3 -3
- package/dist/stories/molecules/Cards/ContactCard.js +38 -38
- package/dist/stories/molecules/Cards/DrawCard.d.ts +3 -3
- package/dist/stories/molecules/Cards/DrawCard.js +116 -116
- package/dist/stories/molecules/Cards/DrawCard.js.map +1 -1
- package/dist/stories/molecules/Cards/Modals.stories.d.ts +5 -5
- package/dist/stories/molecules/Cards/Modals.stories.js +72 -72
- package/dist/stories/molecules/Cards/TeamCard.d.ts +3 -3
- package/dist/stories/molecules/Cards/TeamCard.js +20 -20
- package/dist/stories/molecules/Cards/TeamDrawCard.d.ts +3 -3
- package/dist/stories/molecules/Cards/TeamDrawCard.js +78 -78
- package/dist/stories/molecules/Cards/shared.d.ts +1 -9
- package/dist/stories/molecules/Cards/shared.js +12 -12
- package/dist/stories/molecules/Cards/sharedTypes.d.ts +61 -61
- package/dist/stories/molecules/Cards/sharedTypes.js +2 -2
- package/dist/stories/molecules/FooterSection/FooterSection.d.ts +4 -4
- package/dist/stories/molecules/FooterSection/FooterSection.js +11 -11
- package/dist/stories/molecules/FooterSection/FooterSection.stories.d.ts +5 -5
- package/dist/stories/molecules/FooterSection/FooterSection.stories.js +20 -20
- package/dist/stories/molecules/FooterSection/sharedTypes.d.ts +5 -5
- package/dist/stories/molecules/FooterSection/sharedTypes.js +1 -1
- package/dist/stories/molecules/GlobalNavItem/GlobalNavItem.d.ts +13 -13
- package/dist/stories/molecules/GlobalNavItem/GlobalNavItem.js +27 -27
- package/dist/stories/molecules/GlobalNavItem/GlobalNavItem.stories.d.ts +5 -5
- package/dist/stories/molecules/GlobalNavItem/GlobalNavItem.stories.js +18 -18
- package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.d.ts +29 -29
- package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.js +33 -33
- package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.d.ts +16 -16
- package/dist/stories/molecules/SquareAvatarWithName/SquareAvatarWithName.stories.js +81 -81
- package/dist/stories/organisms/Footer/Footer.d.ts +4 -4
- package/dist/stories/organisms/Footer/Footer.js +97 -97
- package/dist/stories/organisms/Footer/Footer.stories.d.ts +5 -5
- package/dist/stories/organisms/Footer/Footer.stories.js +58 -58
- package/dist/stories/organisms/Footer/sharedTypes.d.ts +16 -16
- package/dist/stories/organisms/Footer/sharedTypes.js +1 -1
- package/dist/stories/organisms/GlobalNavigation/GlobalNavigation.d.ts +36 -36
- package/dist/stories/organisms/GlobalNavigation/GlobalNavigation.js +49 -49
- package/dist/stories/organisms/GlobalNavigation/GlobalNavigation.js.map +1 -1
- package/dist/stories/organisms/GlobalNavigation/GlobalNavigation.stories.d.ts +9 -9
- package/dist/stories/organisms/GlobalNavigation/GlobalNavigation.stories.js +196 -196
- package/dist/stories/organisms/Modals/FullPageModal.d.ts +4 -4
- package/dist/stories/organisms/Modals/FullPageModal.js +59 -59
- package/dist/stories/organisms/Modals/Modals.stories.d.ts +5 -5
- package/dist/stories/organisms/Modals/Modals.stories.js +73 -73
- package/dist/stories/organisms/Modals/sharedTypes.d.ts +14 -14
- package/dist/stories/organisms/Modals/sharedTypes.js +1 -1
- package/dist/stories/organisms/Tables/DrawCardTable.d.ts +3 -3
- package/dist/stories/organisms/Tables/DrawCardTable.js +56 -56
- package/dist/stories/organisms/Tables/SortableTable.d.ts +23 -23
- package/dist/stories/organisms/Tables/SortableTable.js +34 -34
- package/dist/stories/organisms/Tables/SortableTable.js.map +1 -1
- package/dist/stories/organisms/Tables/Tables.stories.d.ts +8 -8
- package/dist/stories/organisms/Tables/Tables.stories.js +90 -90
- package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.d.ts +3 -3
- package/dist/stories/organisms/Tables/TeamDrawCardTable/DesktopTableRows.js +66 -66
- package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.d.ts +3 -3
- package/dist/stories/organisms/Tables/TeamDrawCardTable/MobileTableRows.js +43 -43
- package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.d.ts +3 -3
- package/dist/stories/organisms/Tables/TeamDrawCardTable/TeamDrawCardTable.js +22 -22
- package/dist/stories/organisms/Tables/mockData.d.ts +71 -71
- package/dist/stories/organisms/Tables/mockData.js +99 -99
- package/dist/stories/organisms/Tables/sharedTypes.d.ts +15 -15
- package/dist/stories/organisms/Tables/sharedTypes.js +1 -1
- package/dist/stories/utils/constants.d.ts +19 -19
- package/dist/stories/utils/constants.js +23 -23
- package/dist/stories/utils/constants.js.map +1 -1
- package/dist/stories/utils/getArrayWithIds.d.ts +3 -3
- package/dist/stories/utils/getArrayWithIds.js +1 -1
- package/dist/stories/utils/useScreenSize.d.ts +4 -4
- package/dist/stories/utils/useScreenSize.js +27 -27
- package/dist/types/tableDataTypes.d.ts +38 -38
- package/dist/types/tableDataTypes.js +1 -1
- package/package.json +1 -1
- package/public/index.html +50 -45
- package/src/stories/Introduction.stories.mdx +179 -179
- package/src/stories/assets/css/typography.css +5 -26
|
@@ -1,197 +1,197 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import GlobalNavigation from './GlobalNavigation';
|
|
3
|
-
// Default
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Organisms/GlobalNavigation',
|
|
6
|
-
};
|
|
7
|
-
// Templates
|
|
8
|
-
function GlobalNavigationTemplate(args) {
|
|
9
|
-
return React.createElement(GlobalNavigation, Object.assign({}, args));
|
|
10
|
-
}
|
|
11
|
-
const fullWidthNavItems = [
|
|
12
|
-
{
|
|
13
|
-
label: 'Players',
|
|
14
|
-
filterType: 'players',
|
|
15
|
-
sportType: 'tennis,pickleball'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: 'All events',
|
|
19
|
-
filterType: 'events',
|
|
20
|
-
sportType: 'tennis,pickleball'
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
const tennisGlobalNavItems = [
|
|
24
|
-
{
|
|
25
|
-
label: 'Flex leagues',
|
|
26
|
-
filterType: 'flexLeagues',
|
|
27
|
-
sportType: 'tennis'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
label: 'Adult Team Tennis',
|
|
31
|
-
filterType: 1,
|
|
32
|
-
sportType: 'tennis',
|
|
33
|
-
isLeagues: true
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: 'Junior Team Tennis',
|
|
37
|
-
filterType: 3,
|
|
38
|
-
sportType: 'tennis',
|
|
39
|
-
isLeagues: true
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: 'UTR pro tennis tour',
|
|
43
|
-
filterType: 'proTennisTour',
|
|
44
|
-
sportType: 'tennis'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: 'Paid hits',
|
|
48
|
-
filterType: 'paidHits',
|
|
49
|
-
sportType: 'tennis'
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: 'Paid hitters',
|
|
53
|
-
filterType: 'paidHitClubs',
|
|
54
|
-
sportType: 'tennis'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: 'Junior circuits',
|
|
58
|
-
filterType: 'juniorCircuits',
|
|
59
|
-
sportType: 'tennis'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: 'College circuits',
|
|
63
|
-
filterType: 'collegeCircuits',
|
|
64
|
-
sportType: 'tennis'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: 'Junior regionals',
|
|
68
|
-
filterType: 'juniorRegionals',
|
|
69
|
-
sportType: 'tennis'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: 'Camps',
|
|
73
|
-
filterType: 'camps',
|
|
74
|
-
sportType: 'tennis'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: 'Clubs',
|
|
78
|
-
filterType: 'clubs',
|
|
79
|
-
sportType: 'tennis,pickleball'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: 'High schools',
|
|
83
|
-
filterType: 'highSchools',
|
|
84
|
-
sportType: 'tennis'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: 'Colleges',
|
|
88
|
-
filterType: 'colleges',
|
|
89
|
-
sportType: 'tennis'
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
const pickleballGlobalNavItems = [
|
|
93
|
-
{
|
|
94
|
-
label: 'Flex leagues',
|
|
95
|
-
filterType: 'flexLeagues',
|
|
96
|
-
sportType: 'pickleball',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
label: 'Golden Ticket',
|
|
100
|
-
filterType: 'events',
|
|
101
|
-
data: { 'Golden Ticket': true },
|
|
102
|
-
sportType: 'pickleball',
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
label: 'APP',
|
|
106
|
-
filterType: 'app',
|
|
107
|
-
sportType: 'pickleball',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label: 'USAP',
|
|
111
|
-
filterType: 'usap',
|
|
112
|
-
sportType: 'pickleball',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: 'Adult team pickleball',
|
|
116
|
-
filterType: 6,
|
|
117
|
-
sportType: 'pickleball',
|
|
118
|
-
isLeagues: true,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: 'Junior team pickleball',
|
|
122
|
-
filterType: 7,
|
|
123
|
-
sportType: 'pickleball',
|
|
124
|
-
isLeagues: true,
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
label: 'Clubs',
|
|
128
|
-
filterType: 'clubs',
|
|
129
|
-
sportType: 'tennis,pickleball'
|
|
130
|
-
}
|
|
131
|
-
];
|
|
132
|
-
const LeagueTypes = {
|
|
133
|
-
UT_ADULT_TEAM_PICKLEBALL: 6,
|
|
134
|
-
UT_JUNIOR_TEAM_PICKLEBALL: 7,
|
|
135
|
-
};
|
|
136
|
-
const onTeamLeagueSearchClick = (item) => {
|
|
137
|
-
console.log(`Team League Search Clicked: Filter Type - ${item === null || item === void 0 ? void 0 : item.filterType}, Sport Type - ${item === null || item === void 0 ? void 0 : item.sportType}`);
|
|
138
|
-
};
|
|
139
|
-
const onTypeFilterClick = (item) => {
|
|
140
|
-
console.log(`Type Filter Clicked: Filter Type - ${item === null || item === void 0 ? void 0 : item.filterType}, Sport Type - ${item === null || item === void 0 ? void 0 : item.sportType}`);
|
|
141
|
-
};
|
|
142
|
-
// Stories
|
|
143
|
-
export const GlobalNav = GlobalNavigationTemplate.bind({});
|
|
144
|
-
GlobalNav.args = {
|
|
145
|
-
fullWidthNavItems,
|
|
146
|
-
isAdultTeamPickleballEnabled: true,
|
|
147
|
-
isJuniorTeamPickleballEnabled: true,
|
|
148
|
-
tennisNavItems: tennisGlobalNavItems,
|
|
149
|
-
pickleballNavItems: pickleballGlobalNavItems,
|
|
150
|
-
onTeamLeagueSearchClick,
|
|
151
|
-
onTypeFilterClick
|
|
152
|
-
};
|
|
153
|
-
export const TennisOnly = GlobalNavigationTemplate.bind({});
|
|
154
|
-
TennisOnly.args = {
|
|
155
|
-
fullWidthNavItems,
|
|
156
|
-
isAdultTeamPickleballEnabled: true,
|
|
157
|
-
isJuniorTeamPickleballEnabled: true,
|
|
158
|
-
leagueTypes: LeagueTypes,
|
|
159
|
-
tennisNavItems: tennisGlobalNavItems,
|
|
160
|
-
pickleballNavItems: pickleballGlobalNavItems,
|
|
161
|
-
onTeamLeagueSearchClick,
|
|
162
|
-
onTypeFilterClick
|
|
163
|
-
};
|
|
164
|
-
export const PickleballOnly = GlobalNavigationTemplate.bind({});
|
|
165
|
-
PickleballOnly.args = {
|
|
166
|
-
fullWidthNavItems,
|
|
167
|
-
isAdultTeamPickleballEnabled: true,
|
|
168
|
-
isJuniorTeamPickleballEnabled: true,
|
|
169
|
-
leagueTypes: LeagueTypes,
|
|
170
|
-
tennisNavItems: tennisGlobalNavItems,
|
|
171
|
-
pickleballNavItems: pickleballGlobalNavItems,
|
|
172
|
-
onTeamLeagueSearchClick,
|
|
173
|
-
onTypeFilterClick
|
|
174
|
-
};
|
|
175
|
-
export const AdultTeamPickleballDisabled = GlobalNavigationTemplate.bind({});
|
|
176
|
-
AdultTeamPickleballDisabled.args = {
|
|
177
|
-
fullWidthNavItems,
|
|
178
|
-
isAdultTeamPickleballEnabled: false,
|
|
179
|
-
isJuniorTeamPickleballEnabled: true,
|
|
180
|
-
leagueTypes: LeagueTypes,
|
|
181
|
-
tennisNavItems: tennisGlobalNavItems,
|
|
182
|
-
pickleballNavItems: pickleballGlobalNavItems,
|
|
183
|
-
onTeamLeagueSearchClick,
|
|
184
|
-
onTypeFilterClick
|
|
185
|
-
};
|
|
186
|
-
export const JuniorTeamPickleballDisabled = GlobalNavigationTemplate.bind({});
|
|
187
|
-
JuniorTeamPickleballDisabled.args = {
|
|
188
|
-
fullWidthNavItems,
|
|
189
|
-
isAdultTeamPickleballEnabled: true,
|
|
190
|
-
isJuniorTeamPickleballEnabled: false,
|
|
191
|
-
leagueTypes: LeagueTypes,
|
|
192
|
-
tennisNavItems: tennisGlobalNavItems,
|
|
193
|
-
pickleballNavItems: pickleballGlobalNavItems,
|
|
194
|
-
onTeamLeagueSearchClick,
|
|
195
|
-
onTypeFilterClick
|
|
196
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import GlobalNavigation from './GlobalNavigation';
|
|
3
|
+
// Default
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Organisms/GlobalNavigation',
|
|
6
|
+
};
|
|
7
|
+
// Templates
|
|
8
|
+
function GlobalNavigationTemplate(args) {
|
|
9
|
+
return React.createElement(GlobalNavigation, Object.assign({}, args));
|
|
10
|
+
}
|
|
11
|
+
const fullWidthNavItems = [
|
|
12
|
+
{
|
|
13
|
+
label: 'Players',
|
|
14
|
+
filterType: 'players',
|
|
15
|
+
sportType: 'tennis,pickleball'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'All events',
|
|
19
|
+
filterType: 'events',
|
|
20
|
+
sportType: 'tennis,pickleball'
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
const tennisGlobalNavItems = [
|
|
24
|
+
{
|
|
25
|
+
label: 'Flex leagues',
|
|
26
|
+
filterType: 'flexLeagues',
|
|
27
|
+
sportType: 'tennis'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Adult Team Tennis',
|
|
31
|
+
filterType: 1,
|
|
32
|
+
sportType: 'tennis',
|
|
33
|
+
isLeagues: true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: 'Junior Team Tennis',
|
|
37
|
+
filterType: 3,
|
|
38
|
+
sportType: 'tennis',
|
|
39
|
+
isLeagues: true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'UTR pro tennis tour',
|
|
43
|
+
filterType: 'proTennisTour',
|
|
44
|
+
sportType: 'tennis'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Paid hits',
|
|
48
|
+
filterType: 'paidHits',
|
|
49
|
+
sportType: 'tennis'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: 'Paid hitters',
|
|
53
|
+
filterType: 'paidHitClubs',
|
|
54
|
+
sportType: 'tennis'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'Junior circuits',
|
|
58
|
+
filterType: 'juniorCircuits',
|
|
59
|
+
sportType: 'tennis'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'College circuits',
|
|
63
|
+
filterType: 'collegeCircuits',
|
|
64
|
+
sportType: 'tennis'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Junior regionals',
|
|
68
|
+
filterType: 'juniorRegionals',
|
|
69
|
+
sportType: 'tennis'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Camps',
|
|
73
|
+
filterType: 'camps',
|
|
74
|
+
sportType: 'tennis'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Clubs',
|
|
78
|
+
filterType: 'clubs',
|
|
79
|
+
sportType: 'tennis,pickleball'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: 'High schools',
|
|
83
|
+
filterType: 'highSchools',
|
|
84
|
+
sportType: 'tennis'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: 'Colleges',
|
|
88
|
+
filterType: 'colleges',
|
|
89
|
+
sportType: 'tennis'
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
const pickleballGlobalNavItems = [
|
|
93
|
+
{
|
|
94
|
+
label: 'Flex leagues',
|
|
95
|
+
filterType: 'flexLeagues',
|
|
96
|
+
sportType: 'pickleball',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'Golden Ticket',
|
|
100
|
+
filterType: 'events',
|
|
101
|
+
data: { 'Golden Ticket': true },
|
|
102
|
+
sportType: 'pickleball',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'APP',
|
|
106
|
+
filterType: 'app',
|
|
107
|
+
sportType: 'pickleball',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: 'USAP',
|
|
111
|
+
filterType: 'usap',
|
|
112
|
+
sportType: 'pickleball',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: 'Adult team pickleball',
|
|
116
|
+
filterType: 6,
|
|
117
|
+
sportType: 'pickleball',
|
|
118
|
+
isLeagues: true,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: 'Junior team pickleball',
|
|
122
|
+
filterType: 7,
|
|
123
|
+
sportType: 'pickleball',
|
|
124
|
+
isLeagues: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: 'Clubs',
|
|
128
|
+
filterType: 'clubs',
|
|
129
|
+
sportType: 'tennis,pickleball'
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
const LeagueTypes = {
|
|
133
|
+
UT_ADULT_TEAM_PICKLEBALL: 6,
|
|
134
|
+
UT_JUNIOR_TEAM_PICKLEBALL: 7,
|
|
135
|
+
};
|
|
136
|
+
const onTeamLeagueSearchClick = (item) => {
|
|
137
|
+
console.log(`Team League Search Clicked: Filter Type - ${item === null || item === void 0 ? void 0 : item.filterType}, Sport Type - ${item === null || item === void 0 ? void 0 : item.sportType}`);
|
|
138
|
+
};
|
|
139
|
+
const onTypeFilterClick = (item) => {
|
|
140
|
+
console.log(`Type Filter Clicked: Filter Type - ${item === null || item === void 0 ? void 0 : item.filterType}, Sport Type - ${item === null || item === void 0 ? void 0 : item.sportType}`);
|
|
141
|
+
};
|
|
142
|
+
// Stories
|
|
143
|
+
export const GlobalNav = GlobalNavigationTemplate.bind({});
|
|
144
|
+
GlobalNav.args = {
|
|
145
|
+
fullWidthNavItems,
|
|
146
|
+
isAdultTeamPickleballEnabled: true,
|
|
147
|
+
isJuniorTeamPickleballEnabled: true,
|
|
148
|
+
tennisNavItems: tennisGlobalNavItems,
|
|
149
|
+
pickleballNavItems: pickleballGlobalNavItems,
|
|
150
|
+
onTeamLeagueSearchClick,
|
|
151
|
+
onTypeFilterClick
|
|
152
|
+
};
|
|
153
|
+
export const TennisOnly = GlobalNavigationTemplate.bind({});
|
|
154
|
+
TennisOnly.args = {
|
|
155
|
+
fullWidthNavItems,
|
|
156
|
+
isAdultTeamPickleballEnabled: true,
|
|
157
|
+
isJuniorTeamPickleballEnabled: true,
|
|
158
|
+
leagueTypes: LeagueTypes,
|
|
159
|
+
tennisNavItems: tennisGlobalNavItems,
|
|
160
|
+
pickleballNavItems: pickleballGlobalNavItems,
|
|
161
|
+
onTeamLeagueSearchClick,
|
|
162
|
+
onTypeFilterClick
|
|
163
|
+
};
|
|
164
|
+
export const PickleballOnly = GlobalNavigationTemplate.bind({});
|
|
165
|
+
PickleballOnly.args = {
|
|
166
|
+
fullWidthNavItems,
|
|
167
|
+
isAdultTeamPickleballEnabled: true,
|
|
168
|
+
isJuniorTeamPickleballEnabled: true,
|
|
169
|
+
leagueTypes: LeagueTypes,
|
|
170
|
+
tennisNavItems: tennisGlobalNavItems,
|
|
171
|
+
pickleballNavItems: pickleballGlobalNavItems,
|
|
172
|
+
onTeamLeagueSearchClick,
|
|
173
|
+
onTypeFilterClick
|
|
174
|
+
};
|
|
175
|
+
export const AdultTeamPickleballDisabled = GlobalNavigationTemplate.bind({});
|
|
176
|
+
AdultTeamPickleballDisabled.args = {
|
|
177
|
+
fullWidthNavItems,
|
|
178
|
+
isAdultTeamPickleballEnabled: false,
|
|
179
|
+
isJuniorTeamPickleballEnabled: true,
|
|
180
|
+
leagueTypes: LeagueTypes,
|
|
181
|
+
tennisNavItems: tennisGlobalNavItems,
|
|
182
|
+
pickleballNavItems: pickleballGlobalNavItems,
|
|
183
|
+
onTeamLeagueSearchClick,
|
|
184
|
+
onTypeFilterClick
|
|
185
|
+
};
|
|
186
|
+
export const JuniorTeamPickleballDisabled = GlobalNavigationTemplate.bind({});
|
|
187
|
+
JuniorTeamPickleballDisabled.args = {
|
|
188
|
+
fullWidthNavItems,
|
|
189
|
+
isAdultTeamPickleballEnabled: true,
|
|
190
|
+
isJuniorTeamPickleballEnabled: false,
|
|
191
|
+
leagueTypes: LeagueTypes,
|
|
192
|
+
tennisNavItems: tennisGlobalNavItems,
|
|
193
|
+
pickleballNavItems: pickleballGlobalNavItems,
|
|
194
|
+
onTeamLeagueSearchClick,
|
|
195
|
+
onTypeFilterClick
|
|
196
|
+
};
|
|
197
197
|
//# sourceMappingURL=GlobalNavigation.stories.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { FullPageModalType } from './sharedTypes';
|
|
3
|
-
declare function FullPageModal({ isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children, ...props }: FullPageModalType): JSX.Element;
|
|
4
|
-
export default FullPageModal;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FullPageModalType } from './sharedTypes';
|
|
3
|
+
declare function FullPageModal({ isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children, ...props }: FullPageModalType): React.JSX.Element;
|
|
4
|
+
export default FullPageModal;
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import AppBar from '@mui/material/AppBar';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
|
-
import CloseIcon from '@mui/icons-material/Close';
|
|
16
|
-
import Container from '@mui/material/Container';
|
|
17
|
-
import Dialog from '@mui/material/Dialog';
|
|
18
|
-
import IconButton from '@mui/material/IconButton';
|
|
19
|
-
import Toolbar from '@mui/material/Toolbar';
|
|
20
|
-
import Typography from '@mui/material/Typography';
|
|
21
|
-
import Grid from '@mui/material/Grid';
|
|
22
|
-
import Button from '../../atoms/Button/Button';
|
|
23
|
-
function FullPageModal(_a) {
|
|
24
|
-
var { isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children } = _a, props = __rest(_a, ["isOpen", "onClose", "pageTitle", "bottomCTAText", "secondaryBottomCTAText", "onBottomCTAClick", "onSecondaryBottomCTAClick", "isBottomCTAdisabled", "isSecondaryBottomCTAdisabled", "PagePopupModal", "children"]);
|
|
25
|
-
const handleOnClose = () => {
|
|
26
|
-
onClose();
|
|
27
|
-
};
|
|
28
|
-
return (React.createElement(Box, Object.assign({ position: "relative" }, props),
|
|
29
|
-
React.createElement(Dialog, { PaperProps: {
|
|
30
|
-
style: {
|
|
31
|
-
backgroundColor: 'var(--cool-grey-150)',
|
|
32
|
-
boxShadow: 'none',
|
|
33
|
-
overflow: 'hidden'
|
|
34
|
-
},
|
|
35
|
-
}, fullScreen: true, open: isOpen, onClose: handleOnClose },
|
|
36
|
-
React.createElement(AppBar, { sx: { position: 'relative', backgroundColor: 'var(--white)' } },
|
|
37
|
-
React.createElement(Toolbar, null,
|
|
38
|
-
React.createElement(Container, { maxWidth: false },
|
|
39
|
-
React.createElement(Box, { display: "flex", justifyContent: "space-between", alignItems: "center" },
|
|
40
|
-
React.createElement(Typography, { variant: "h6" }, pageTitle),
|
|
41
|
-
React.createElement(IconButton, { edge: "start", onClick: handleOnClose, "aria-label": "close" },
|
|
42
|
-
React.createElement(CloseIcon, null)))))),
|
|
43
|
-
React.createElement(Grid, { sx: { minHeight: "100vh", paddingBottom: '136px' }, container: true },
|
|
44
|
-
children,
|
|
45
|
-
bottomCTAText && !!onBottomCTAClick && (React.createElement(Box, { sx: {
|
|
46
|
-
position: "fixed",
|
|
47
|
-
width: "100%",
|
|
48
|
-
backgroundColor: 'black',
|
|
49
|
-
zIndex: 2,
|
|
50
|
-
display: 'flex',
|
|
51
|
-
justifyContent: 'flex-end'
|
|
52
|
-
}, p: 2, bottom: 0 },
|
|
53
|
-
!!onSecondaryBottomCTAClick && secondaryBottomCTAText && (React.createElement(Box, { sx: { marginRight: '16px' } },
|
|
54
|
-
React.createElement(Button, { onClick: onSecondaryBottomCTAClick, disabled: isSecondaryBottomCTAdisabled, category: "secondary-flipped" }, secondaryBottomCTAText))),
|
|
55
|
-
React.createElement(Box, null,
|
|
56
|
-
React.createElement(Button, { onClick: onBottomCTAClick, disabled: isBottomCTAdisabled, category: "secondary-flipped" }, bottomCTAText))))),
|
|
57
|
-
PagePopupModal)));
|
|
58
|
-
}
|
|
59
|
-
export default FullPageModal;
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import AppBar from '@mui/material/AppBar';
|
|
14
|
+
import Box from '@mui/material/Box';
|
|
15
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
16
|
+
import Container from '@mui/material/Container';
|
|
17
|
+
import Dialog from '@mui/material/Dialog';
|
|
18
|
+
import IconButton from '@mui/material/IconButton';
|
|
19
|
+
import Toolbar from '@mui/material/Toolbar';
|
|
20
|
+
import Typography from '@mui/material/Typography';
|
|
21
|
+
import Grid from '@mui/material/Grid';
|
|
22
|
+
import Button from '../../atoms/Button/Button';
|
|
23
|
+
function FullPageModal(_a) {
|
|
24
|
+
var { isOpen, onClose, pageTitle, bottomCTAText, secondaryBottomCTAText, onBottomCTAClick, onSecondaryBottomCTAClick, isBottomCTAdisabled, isSecondaryBottomCTAdisabled, PagePopupModal, children } = _a, props = __rest(_a, ["isOpen", "onClose", "pageTitle", "bottomCTAText", "secondaryBottomCTAText", "onBottomCTAClick", "onSecondaryBottomCTAClick", "isBottomCTAdisabled", "isSecondaryBottomCTAdisabled", "PagePopupModal", "children"]);
|
|
25
|
+
const handleOnClose = () => {
|
|
26
|
+
onClose();
|
|
27
|
+
};
|
|
28
|
+
return (React.createElement(Box, Object.assign({ position: "relative" }, props),
|
|
29
|
+
React.createElement(Dialog, { PaperProps: {
|
|
30
|
+
style: {
|
|
31
|
+
backgroundColor: 'var(--cool-grey-150)',
|
|
32
|
+
boxShadow: 'none',
|
|
33
|
+
overflow: 'hidden'
|
|
34
|
+
},
|
|
35
|
+
}, fullScreen: true, open: isOpen, onClose: handleOnClose },
|
|
36
|
+
React.createElement(AppBar, { sx: { position: 'relative', backgroundColor: 'var(--white)' } },
|
|
37
|
+
React.createElement(Toolbar, null,
|
|
38
|
+
React.createElement(Container, { maxWidth: false },
|
|
39
|
+
React.createElement(Box, { display: "flex", justifyContent: "space-between", alignItems: "center" },
|
|
40
|
+
React.createElement(Typography, { variant: "h6" }, pageTitle),
|
|
41
|
+
React.createElement(IconButton, { edge: "start", onClick: handleOnClose, "aria-label": "close" },
|
|
42
|
+
React.createElement(CloseIcon, null)))))),
|
|
43
|
+
React.createElement(Grid, { sx: { minHeight: "100vh", paddingBottom: '136px' }, container: true },
|
|
44
|
+
children,
|
|
45
|
+
bottomCTAText && !!onBottomCTAClick && (React.createElement(Box, { sx: {
|
|
46
|
+
position: "fixed",
|
|
47
|
+
width: "100%",
|
|
48
|
+
backgroundColor: 'black',
|
|
49
|
+
zIndex: 2,
|
|
50
|
+
display: 'flex',
|
|
51
|
+
justifyContent: 'flex-end'
|
|
52
|
+
}, p: 2, bottom: 0 },
|
|
53
|
+
!!onSecondaryBottomCTAClick && secondaryBottomCTAText && (React.createElement(Box, { sx: { marginRight: '16px' } },
|
|
54
|
+
React.createElement(Button, { onClick: onSecondaryBottomCTAClick, disabled: isSecondaryBottomCTAdisabled, category: "secondary-flipped" }, secondaryBottomCTAText))),
|
|
55
|
+
React.createElement(Box, null,
|
|
56
|
+
React.createElement(Button, { onClick: onBottomCTAClick, disabled: isBottomCTAdisabled, category: "secondary-flipped" }, bottomCTAText))))),
|
|
57
|
+
PagePopupModal)));
|
|
58
|
+
}
|
|
59
|
+
export default FullPageModal;
|
|
60
60
|
//# sourceMappingURL=FullPageModal.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
title: string;
|
|
3
|
-
};
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const FullPage: any;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const FullPage: any;
|