@licklist/design 0.78.20 → 0.78.25

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.
Files changed (193) hide show
  1. package/dist/assets/Trend-Down.svg +3 -0
  2. package/dist/assets/Trend-Up.svg +3 -0
  3. package/dist/auth/Authorizer.d.ts.map +1 -1
  4. package/dist/auth/Authorizer.js +47 -12
  5. package/dist/auth/Layout/UserNavDropDown.js +1 -1
  6. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  7. package/dist/auth/Login/LoginComponent.js +8 -6
  8. package/dist/auth/Logout/Logout.js +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +5 -0
  12. package/dist/v2/components/EntityHeader/EntityHeader.d.ts +13 -0
  13. package/dist/v2/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  14. package/dist/v2/components/EntityHeader/EntityHeader.js +85 -0
  15. package/dist/v2/components/EntityHeader/EntityHeader.scss.js +6 -0
  16. package/dist/v2/components/EntityHeader/index.d.ts +2 -0
  17. package/dist/v2/components/EntityHeader/index.d.ts.map +1 -0
  18. package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
  19. package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
  20. package/dist/v2/components/NPSScore/index.d.ts +3 -0
  21. package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
  22. package/dist/v2/components/Select/Select.d.ts +10 -0
  23. package/dist/v2/components/Select/Select.d.ts.map +1 -0
  24. package/dist/v2/components/Select/index.d.ts +3 -0
  25. package/dist/v2/components/Select/index.d.ts.map +1 -0
  26. package/dist/v2/components/Tooltip/Tooltip.d.ts +21 -0
  27. package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -0
  28. package/dist/v2/components/Tooltip/Tooltip.js +103 -0
  29. package/dist/v2/components/Tooltip/Tooltip.scss.js +6 -0
  30. package/dist/v2/components/Tooltip/index.d.ts +2 -0
  31. package/dist/v2/components/Tooltip/index.d.ts.map +1 -0
  32. package/dist/v2/components/UserAvatar/UserAvatar.d.ts +12 -0
  33. package/dist/v2/components/UserAvatar/UserAvatar.d.ts.map +1 -0
  34. package/dist/v2/components/UserAvatar/UserAvatar.js +77 -0
  35. package/dist/v2/components/UserAvatar/UserAvatar.scss.js +6 -0
  36. package/dist/v2/components/UserAvatar/index.d.ts +2 -0
  37. package/dist/v2/components/UserAvatar/index.d.ts.map +1 -0
  38. package/dist/v2/components/UserPanel/UserPanel.d.ts +17 -0
  39. package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -0
  40. package/dist/v2/components/UserPanel/UserPanel.js +168 -0
  41. package/dist/v2/components/UserPanel/UserPanel.scss.js +6 -0
  42. package/dist/v2/components/UserPanel/index.d.ts +3 -0
  43. package/dist/v2/components/UserPanel/index.d.ts.map +1 -0
  44. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts +15 -0
  45. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -0
  46. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +3 -0
  47. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -0
  48. package/dist/v2/dashboard-analytics/chart/Chart.d.ts +21 -0
  49. package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -0
  50. package/dist/v2/dashboard-analytics/chart/index.d.ts +3 -0
  51. package/dist/v2/dashboard-analytics/chart/index.d.ts.map +1 -0
  52. package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts +57 -0
  53. package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -0
  54. package/dist/v2/dashboard-analytics/dashboard/index.d.ts +3 -0
  55. package/dist/v2/dashboard-analytics/dashboard/index.d.ts.map +1 -0
  56. package/dist/v2/dashboard-analytics/index.d.ts +13 -0
  57. package/dist/v2/dashboard-analytics/index.d.ts.map +1 -0
  58. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts +17 -0
  59. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts.map +1 -0
  60. package/dist/v2/dashboard-analytics/metric-card/index.d.ts +3 -0
  61. package/dist/v2/dashboard-analytics/metric-card/index.d.ts.map +1 -0
  62. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +12 -0
  63. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -0
  64. package/dist/v2/dashboard-analytics/venue-card/index.d.ts +3 -0
  65. package/dist/v2/dashboard-analytics/venue-card/index.d.ts.map +1 -0
  66. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts +25 -0
  67. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts.map +1 -0
  68. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts +3 -0
  69. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts.map +1 -0
  70. package/dist/v2/index.d.ts +11 -5
  71. package/dist/v2/index.d.ts.map +1 -1
  72. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +10 -0
  73. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -0
  74. package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +296 -0
  75. package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +6 -0
  76. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts +7 -0
  77. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -0
  78. package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +34 -0
  79. package/dist/v2/navigation/DashboardLayout/DashboardFooter.scss.js +6 -0
  80. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +42 -0
  81. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -0
  82. package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +154 -0
  83. package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +6 -0
  84. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +35 -0
  85. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -0
  86. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +344 -0
  87. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +6 -0
  88. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +26 -0
  89. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -0
  90. package/dist/v2/navigation/DashboardLayout/TopNavigation.js +468 -0
  91. package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +6 -0
  92. package/dist/v2/navigation/DashboardLayout/assets/AdminLogo.png.js +3 -0
  93. package/dist/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png.js +3 -0
  94. package/dist/v2/navigation/DashboardLayout/index.d.ts +7 -0
  95. package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -0
  96. package/package.json +7 -5
  97. package/src/assets/Trend-Down.svg +3 -0
  98. package/src/assets/Trend-Up.svg +3 -0
  99. package/src/auth/Authorizer.tsx +49 -20
  100. package/src/auth/Layout/UserNavDropDown.tsx +1 -1
  101. package/src/auth/Login/LoginComponent.tsx +7 -5
  102. package/src/auth/Logout/Logout.tsx +1 -1
  103. package/src/index.ts +2 -1
  104. package/src/v2/components/EntityHeader/EntityHeader.scss +133 -0
  105. package/src/v2/components/EntityHeader/EntityHeader.stories.tsx +103 -0
  106. package/src/v2/components/EntityHeader/EntityHeader.tsx +76 -0
  107. package/src/v2/components/EntityHeader/index.ts +1 -0
  108. package/src/v2/components/NPSScore/NPSScore.scss +330 -0
  109. package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
  110. package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
  111. package/src/v2/components/NPSScore/index.ts +2 -0
  112. package/src/v2/components/Select/Select.scss +188 -0
  113. package/src/v2/components/Select/Select.stories.tsx +164 -0
  114. package/src/v2/components/Select/Select.tsx +56 -0
  115. package/src/v2/components/Select/index.ts +2 -0
  116. package/src/v2/components/Tooltip/Tooltip.scss +92 -0
  117. package/src/v2/components/Tooltip/Tooltip.stories.tsx +164 -0
  118. package/src/v2/components/Tooltip/Tooltip.tsx +64 -0
  119. package/src/v2/components/Tooltip/index.ts +8 -0
  120. package/src/v2/components/UserAvatar/UserAvatar.scss +62 -0
  121. package/src/v2/components/UserAvatar/UserAvatar.stories.tsx +94 -0
  122. package/src/v2/components/UserAvatar/UserAvatar.tsx +96 -0
  123. package/src/v2/components/UserAvatar/index.ts +1 -0
  124. package/src/v2/components/UserPanel/UserPanel.scss +195 -0
  125. package/src/v2/components/UserPanel/UserPanel.stories.tsx +66 -0
  126. package/src/v2/components/UserPanel/UserPanel.tsx +132 -0
  127. package/src/v2/components/UserPanel/index.ts +2 -0
  128. package/src/v2/dashboard-analytics/blog-posts/Blog.scss +92 -0
  129. package/src/v2/dashboard-analytics/blog-posts/Blog.stories.tsx +57 -0
  130. package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +91 -0
  131. package/src/v2/dashboard-analytics/blog-posts/index.ts +2 -0
  132. package/src/v2/dashboard-analytics/chart/Chart.scss +424 -0
  133. package/src/v2/dashboard-analytics/chart/Chart.stories.tsx +157 -0
  134. package/src/v2/dashboard-analytics/chart/Chart.tsx +623 -0
  135. package/src/v2/dashboard-analytics/chart/index.ts +2 -0
  136. package/src/v2/dashboard-analytics/dashboard/Dashboard.scss +254 -0
  137. package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +298 -0
  138. package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +248 -0
  139. package/src/v2/dashboard-analytics/dashboard/index.ts +2 -0
  140. package/src/v2/dashboard-analytics/index.ts +12 -0
  141. package/src/v2/dashboard-analytics/metric-card/MetricCard.scss +125 -0
  142. package/src/v2/dashboard-analytics/metric-card/MetricCard.stories.tsx +106 -0
  143. package/src/v2/dashboard-analytics/metric-card/MetricCard.tsx +72 -0
  144. package/src/v2/dashboard-analytics/metric-card/index.ts +2 -0
  145. package/src/v2/dashboard-analytics/venue-card/VenueCard.scss +112 -0
  146. package/src/v2/dashboard-analytics/venue-card/VenueCard.stories.tsx +40 -0
  147. package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +62 -0
  148. package/src/v2/dashboard-analytics/venue-card/index.ts +2 -0
  149. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss +129 -0
  150. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.stories.tsx +31 -0
  151. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.tsx +61 -0
  152. package/src/v2/dashboard-analytics/venue-closed-card/index.ts +2 -0
  153. package/src/v2/design-system/colors/ColorSystem.scss +439 -0
  154. package/src/v2/design-system/colors/ColorSystem.stories.tsx +730 -0
  155. package/src/v2/design-system/typography/Typography.scss +295 -0
  156. package/src/v2/design-system/typography/Typography.stories.tsx +109 -0
  157. package/src/v2/index.ts +43 -7
  158. package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +207 -0
  159. package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +171 -0
  160. package/src/v2/navigation/DashboardLayout/DashboardFooter.scss +30 -0
  161. package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +25 -0
  162. package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +91 -0
  163. package/src/v2/navigation/DashboardLayout/DashboardLayout.stories.tsx +370 -0
  164. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +215 -0
  165. package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +266 -0
  166. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +252 -0
  167. package/src/v2/navigation/DashboardLayout/Sidebar.stories.tsx +220 -0
  168. package/src/v2/navigation/DashboardLayout/TopNavigation.scss +206 -0
  169. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +270 -0
  170. package/src/v2/navigation/DashboardLayout/assets/AdminLogo.png +0 -0
  171. package/src/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png +0 -0
  172. package/src/v2/navigation/DashboardLayout/index.ts +20 -0
  173. package/src/v2/styles/index.scss +0 -1
  174. package/src/v2/styles/tokens/_colors.scss +531 -98
  175. package/dist/v2/components/Colors/Colors.d.ts +0 -21
  176. package/dist/v2/components/Colors/Colors.d.ts.map +0 -1
  177. package/dist/v2/components/Colors/index.d.ts +0 -3
  178. package/dist/v2/components/Colors/index.d.ts.map +0 -1
  179. package/dist/v2/components/Typography/Typography.d.ts +0 -11
  180. package/dist/v2/components/Typography/Typography.d.ts.map +0 -1
  181. package/dist/v2/components/Typography/index.d.ts +0 -3
  182. package/dist/v2/components/Typography/index.d.ts.map +0 -1
  183. package/src/v2/components/Colors/Colors.scss +0 -64
  184. package/src/v2/components/Colors/Colors.stories.tsx +0 -143
  185. package/src/v2/components/Colors/Colors.tsx +0 -51
  186. package/src/v2/components/Colors/ColorsAliases.stories.tsx +0 -285
  187. package/src/v2/components/Colors/Sizes.stories.tsx +0 -141
  188. package/src/v2/components/Colors/index.ts +0 -2
  189. package/src/v2/components/Typography/Typography.scss +0 -72
  190. package/src/v2/components/Typography/Typography.stories.tsx +0 -266
  191. package/src/v2/components/Typography/Typography.tsx +0 -56
  192. package/src/v2/components/Typography/index.ts +0 -2
  193. package/src/v2/styles/tokens/_aliases.scss +0 -199
@@ -0,0 +1,266 @@
1
+ .provider-sidebar {
2
+ background: var(--surfaces-main-background-secondary, #F8F8FA);
3
+ border-right: 1px solid var(--borders-main-border-primary, #E8E9EF);
4
+ box-sizing: border-box;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: flex-start;
8
+ padding: 8px;
9
+ height: 100%;
10
+ overflow-y: auto;
11
+ transition: width 0.3s ease;
12
+
13
+ &--expanded {
14
+ width: 268px;
15
+ }
16
+
17
+ &--collapsed {
18
+ width: 72px;
19
+ }
20
+
21
+ // Mobile responsive - full width on small screens
22
+ @media (max-width: 640px) {
23
+ width: 100% !important;
24
+ border-right: none;
25
+ }
26
+
27
+ &__content {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 4px;
31
+ width: 100%;
32
+ }
33
+
34
+
35
+ &__back-link {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 8px;
39
+ padding: 8px;
40
+ border-radius: 8px;
41
+ cursor: pointer;
42
+ transition: all 0.2s ease;
43
+ width: 100%;
44
+ box-sizing: border-box;
45
+ color: var(--fills-main-fill-primary, #14215A);
46
+
47
+ &:hover {
48
+ background: var(--surfaces-main-background-secondary-hover, #F0F0F4);
49
+
50
+ .provider-sidebar__icon--back {
51
+ .back-icon-default {
52
+ display: none;
53
+ }
54
+ .back-icon-hover {
55
+ display: block;
56
+ }
57
+ }
58
+ }
59
+
60
+ &:active {
61
+ background: var(--surfaces-main-background-secondary-pressed, #E8E8EC);
62
+ }
63
+
64
+ &--collapsed {
65
+ justify-content: center;
66
+ }
67
+ }
68
+
69
+
70
+ &__header {
71
+ display: flex;
72
+ align-items: center;
73
+ width: 100%;
74
+ box-sizing: border-box;
75
+
76
+ &--collapsed {
77
+ justify-content: center;
78
+ }
79
+ }
80
+
81
+ &__avatar {
82
+ width: 47px;
83
+ height: 47px;
84
+ border-radius: 50%;
85
+ flex-shrink: 0;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ overflow: hidden;
90
+ position: relative;
91
+
92
+ img {
93
+ width: 100%;
94
+ height: 100%;
95
+ object-fit: cover;
96
+ }
97
+ }
98
+
99
+ &__avatar-placeholder {
100
+ width: 100%;
101
+ height: 100%;
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ position: relative;
106
+
107
+ &::before {
108
+ content: '';
109
+ position: absolute;
110
+ inset: 0;
111
+ border-radius: 50%;
112
+ border: 2px solid var(--fills-main-fill-secondary, #626A90);
113
+ background: rgba(98, 106, 144, 0.2);
114
+ }
115
+
116
+ span {
117
+ font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
118
+ font-weight: 700;
119
+ font-size: 18px;
120
+ color: var(--labels-main-label-secondary, #626A90);
121
+ position: relative;
122
+ z-index: 1;
123
+ }
124
+ }
125
+
126
+ &__header-text {
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 4px;
130
+ min-width: 0;
131
+ flex: 1;
132
+ }
133
+
134
+ &__title {
135
+ font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
136
+ font-weight: 600;
137
+ font-size: 15px;
138
+ line-height: 18px;
139
+ color: var(--labels-main-label-primary, #121E52);
140
+ margin: 0;
141
+ white-space: nowrap;
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ }
145
+
146
+ &__badge {
147
+ display: inline-flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ padding: 4px 8px;
151
+ background: var(--surfaces-main-background-tertiary, #E8E9EF);
152
+ border-radius: 8px;
153
+ width: fit-content;
154
+ transition: background 0.2s ease;
155
+
156
+ .provider-sidebar__header:hover & {
157
+ background: var(--surfaces-main-background-tertiary-hover, #DCDDE3);
158
+ }
159
+
160
+ span {
161
+ font-family: 'Geist Mono', 'SF Mono', 'Consolas', monospace;
162
+ font-weight: 600;
163
+ font-size: 10px;
164
+ line-height: 12px;
165
+ color: var(--labels-main-label-secondary, #626A90);
166
+ white-space: nowrap;
167
+ }
168
+ }
169
+
170
+
171
+ &__nav {
172
+ display: flex;
173
+ flex-direction: column;
174
+ gap: 4px;
175
+ width: 100%;
176
+ padding-top: 8px;
177
+ }
178
+
179
+ &__link {
180
+ box-sizing: border-box;
181
+ display: flex;
182
+ align-items: center;
183
+ gap: 8px;
184
+ padding: 8px;
185
+ border-radius: 8px;
186
+ cursor: pointer;
187
+ transition: all 0.2s ease;
188
+ text-decoration: none;
189
+ outline: none;
190
+ width: 100%;
191
+ color: var(--fills-main-fill-primary, #14215A);
192
+
193
+ &:hover:not(&--active) {
194
+ background: var(--surfaces-main-background-secondary-hover, #F0F0F4);
195
+ }
196
+
197
+ &:active:not(&--active) {
198
+ background: var(--surfaces-main-background-secondary-pressed, #E8E8EC);
199
+ }
200
+
201
+ &:focus-visible {
202
+ outline: 2px solid var(--fills-main-fill-primary, #14215A);
203
+ outline-offset: 2px;
204
+ }
205
+
206
+ &--collapsed {
207
+ justify-content: center;
208
+ }
209
+
210
+ &--active {
211
+ background: linear-gradient(
212
+ to top right,
213
+ var(--gradient-stop3, #0E8CE2) 0%,
214
+ var(--gradient-stop2, #5D5BF4) 50%,
215
+ var(--gradient-stop1, #6200EE) 100%
216
+ );
217
+ color: white;
218
+ cursor: default;
219
+
220
+ .provider-sidebar__icon {
221
+ color: white;
222
+
223
+ svg path {
224
+ fill: white;
225
+ }
226
+ }
227
+
228
+ .provider-sidebar__link-text {
229
+ color: white;
230
+ }
231
+ }
232
+ }
233
+
234
+ &__icon {
235
+ flex-shrink: 0;
236
+ width: 24px;
237
+ height: 24px;
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: center;
241
+
242
+ svg {
243
+ width: 100%;
244
+ height: 100%;
245
+ }
246
+
247
+ &--back {
248
+ .back-icon-default {
249
+ display: block;
250
+ }
251
+ .back-icon-hover {
252
+ display: none;
253
+ }
254
+ }
255
+ }
256
+
257
+ &__link-text {
258
+ font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
259
+ font-weight: 500;
260
+ font-size: 13px;
261
+ line-height: 16px;
262
+ color: var(--labels-main-label-primary, #121E52);
263
+ margin: 0;
264
+ white-space: nowrap;
265
+ }
266
+ }
@@ -0,0 +1,252 @@
1
+ import React from 'react'
2
+ import './ProviderSidebar.scss'
3
+ import { EntityHeader } from '../../components/EntityHeader'
4
+ import { Tooltip } from '../../components/Tooltip'
5
+
6
+ export interface NavItem {
7
+ id: string
8
+ label: string
9
+ path: string
10
+ icon: React.ReactNode
11
+ end?: boolean
12
+ }
13
+
14
+ export interface ProviderSidebarProps {
15
+ expanded?: boolean
16
+ providerName?: string
17
+ providerId?: string
18
+ providerImage?: string
19
+ providerType?: 'venue' | 'promoter'
20
+ onNavigation?: (path: string) => void
21
+ activePath?: string
22
+ showBackToAdmin?: boolean
23
+ onBackToAdmin?: () => void
24
+ /** Custom navigation items - if not provided, uses default items */
25
+ navItems?: NavItem[]
26
+ }
27
+
28
+
29
+ const HomeIcon = () => (
30
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
31
+ <path d="M17.7273 20.1182H6.27273C5.82086 20.1182 5.45455 19.7423 5.45455 19.2785V11.7207H3L11.4496 3.83661C11.7617 3.54543 12.2383 3.54543 12.5504 3.83661L21 11.7207H18.5455V19.2785C18.5455 19.7423 18.1792 20.1182 17.7273 20.1182ZM7.09091 18.4387H16.9091V10.1734L12 5.59288L7.09091 10.1734V18.4387Z" fill="currentColor" />
32
+ </svg>
33
+ )
34
+
35
+ const FlowsIcon = () => (
36
+ <svg width="24" height="24" viewBox="0 0 32 32" fill="none">
37
+ <path d="M21.2073 6.29297L19.793 7.70718L22.0859 10.0001H17.0002V12.0001H22.0859L19.793 14.293L21.2073 15.7072L25.9144 11.0001L21.2073 6.29297ZM13.5001 11.0001C13.5001 9.61936 12.3809 8.50007 11.0001 8.50007C9.61944 8.50007 8.50015 9.61936 8.50015 11.0001C8.50015 12.3808 9.61944 13.5001 11.0001 13.5001C12.3809 13.5001 13.5001 12.3808 13.5001 11.0001ZM15.5002 11.0001C15.5002 13.4854 13.4854 15.5001 11.0001 15.5001C8.51487 15.5001 6.50015 13.4854 6.50015 11.0001C6.50015 8.51479 8.51487 6.50007 11.0001 6.50007C13.4854 6.50007 15.5002 8.51479 15.5002 11.0001ZM9.91436 22.0001L12.2073 24.293L10.793 25.7072L6.08594 21.0001L10.793 16.293L12.2073 17.7072L9.91436 20.0001H15.0002V22.0001H9.91436ZM19.0002 23.0001H23.0002V19.0001H19.0002V23.0001ZM17.0002 18.0001C17.0002 17.4478 17.4479 17.0001 18.0002 17.0001H24.0002C24.5524 17.0001 25.0002 17.4478 25.0002 18.0001V24.0001C25.0002 24.5524 24.5524 25.0001 24.0002 25.0001H18.0002C17.4479 25.0001 17.0002 24.5524 17.0002 24.0001V18.0001Z" fill="currentColor" />
38
+ </svg>
39
+ )
40
+
41
+ const InventoryIcon = () => (
42
+ <svg width="24" height="24" viewBox="0 0 32 32" fill="none">
43
+ <path d="M13.9042 7.10022L23.8037 8.51443L25.2179 18.414L16.0255 27.6063C15.635 27.9969 15.0019 27.9969 14.6113 27.6063L4.71184 17.7069C4.32131 17.3163 4.32131 16.6832 4.71184 16.2926L13.9042 7.10022ZM14.6113 9.22154L6.83316 16.9997L15.3184 25.485L23.0966 17.7069L22.036 10.2822L14.6113 9.22154ZM16.7327 15.5855C15.9516 14.8044 15.9516 13.5381 16.7327 12.7571C17.5137 11.976 18.78 11.976 19.5611 12.7571C20.3421 13.5381 20.3421 14.8044 19.5611 15.5855C18.78 16.3666 17.5137 16.3666 16.7327 15.5855Z" fill="currentColor" />
44
+ </svg>
45
+ )
46
+
47
+ const LoyaltyIcon = () => (
48
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
49
+ <path d="M12.0005 16.695L6.71036 19.6562L7.89186 13.7099L3.44092 9.59385L9.4612 8.88004L12.0005 3.375L14.5396 8.88004L20.5599 9.59385L16.109 13.7099L17.2905 19.6562L12.0005 16.695ZM12.0005 14.976L15.1855 16.7588L14.4741 13.1788L17.1539 10.7006L13.5292 10.2708L12.0005 6.95626L10.4716 10.2708L6.84691 10.7006L9.52673 13.1788L8.81537 16.7588L12.0005 14.976Z" fill="currentColor" />
50
+ </svg>
51
+ )
52
+
53
+ const CustomersIcon = () => (
54
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
55
+ <path d="M4.5 19.5C4.5 16.1863 7.18629 13.5 10.5 13.5C13.8137 13.5 16.5 16.1863 16.5 19.5H15C15 17.0147 12.9853 15 10.5 15C8.01472 15 6 17.0147 6 19.5H4.5ZM10.5 12.75C8.01375 12.75 6 10.7362 6 8.25C6 5.76375 8.01375 3.75 10.5 3.75C12.9862 3.75 15 5.76375 15 8.25C15 10.7362 12.9862 12.75 10.5 12.75ZM10.5 11.25C12.1575 11.25 13.5 9.9075 13.5 8.25C13.5 6.5925 12.1575 5.25 10.5 5.25C8.8425 5.25 7.5 6.5925 7.5 8.25C7.5 9.9075 8.8425 11.25 10.5 11.25ZM16.7128 14.0271C18.7983 14.9671 20.25 17.064 20.25 19.5H18.75C18.75 17.673 17.6612 16.1003 16.0971 15.3953L16.7128 14.0271ZM16.1972 5.55991C17.6958 6.17777 18.75 7.65271 18.75 9.375C18.75 11.5276 17.1032 13.2939 15 13.4832V11.9734C16.2725 11.7916 17.25 10.698 17.25 9.375C17.25 8.33951 16.6512 7.44452 15.7808 7.01726L16.1972 5.55991Z" fill="currentColor" />
56
+ </svg>
57
+ )
58
+
59
+ const ReportsIcon = () => (
60
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
61
+ <path d="M11.25 8.25H12.75V15.75H11.25V8.25ZM14.25 11.25H15.75V15.75H14.25V11.25ZM8.25 12.75H9.75V15.75H8.25V12.75ZM14.25 6H6.75V18H17.25V9H14.25V6ZM5.25 5.24385C5.25 4.83304 5.58562 4.5 5.99888 4.5H15L18.7498 8.25L18.75 18.7444C18.75 19.1617 18.4163 19.5 18.0049 19.5H5.99505C5.58357 19.5 5.25 19.1585 5.25 18.7561V5.24385Z" fill="currentColor" />
62
+ </svg>
63
+ )
64
+
65
+ const AnalyticsIcon = () => (
66
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
67
+ <path d="M6.75 5.25V17.25H18.75V18.75H5.25V5.25H6.75ZM18.2197 7.71967L19.2803 8.78033L15 13.0606L12.75 10.8112L9.53033 14.0303L8.46967 12.9697L12.75 8.68934L15 10.9388L18.2197 7.71967Z" fill="currentColor" />
68
+ </svg>
69
+ )
70
+
71
+ const MarketingIcon = () => (
72
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
73
+ <path d="M10.7195 16.3629C10.7195 16.3629 15.9848 15.7286 18.7404 17.3195L19.4649 17.1254C19.865 17.0182 20.1024 16.607 19.9952 16.2069L18.8183 11.8146C19.4001 11.4863 19.7099 10.7953 19.529 10.1201C19.3481 9.44504 18.7343 9.00145 18.0663 9.00807L16.8894 4.61576C16.7822 4.21567 16.3709 3.97822 15.9708 4.08543L15.2464 4.27955C13.6554 7.03522 8.7784 9.11847 8.7784 9.11847L5.88062 9.89492C5.08042 10.1093 4.60555 10.9318 4.81996 11.732L5.98464 16.0787C6.19906 16.8789 7.02156 17.3538 7.82176 17.1394L8.54621 16.9453L10.2412 20.3734L11.6901 19.9851L10.7195 16.3629ZM10.5497 9.93369C11.0163 9.69484 11.5885 9.38415 12.197 9.01286C13.317 8.32952 14.7109 7.3523 15.7461 6.14469L18.2407 15.4544C16.7403 14.9262 15.0445 14.7769 13.733 14.7451C13.0204 14.7278 12.3694 14.7448 11.846 14.7712L10.5497 9.93369ZM6.26885 11.3438L9.16662 10.5674L10.3313 14.914L7.43353 15.6905L6.26885 11.3438Z" fill="currentColor" />
74
+ </svg>
75
+ )
76
+
77
+ const WaiversIcon = () => (
78
+ <svg width="24" height="24" viewBox="0 0 32 32" fill="none">
79
+ <path d="M19.5771 18.5563C20.9411 17.6264 22.718 17.1662 25.1523 17.4449L25.6484 17.5104L25.749 17.5309C26.2398 17.6564 26.5658 18.1363 26.4893 18.6481C26.4124 19.1602 25.9595 19.523 25.4531 19.4987L25.3516 19.4889L24.9297 19.4323C22.8719 19.1952 21.596 19.6007 20.7041 20.2086C19.7063 20.8889 19.0536 21.9054 18.3594 23.0729C17.718 24.1516 16.9733 25.5059 15.7871 26.2936C14.5585 27.1092 13.0355 27.2399 11.0518 26.5787L10.6484 26.4362L10.5547 26.3951C10.1007 26.17 9.88172 25.6328 10.0635 25.1481C10.2455 24.6636 10.7639 24.4027 11.2539 24.5319L11.3516 24.5631L11.6816 24.6803C13.2821 25.216 14.1232 24.9983 14.6816 24.6276C15.4013 24.1496 15.9073 23.2847 16.6406 22.0514C17.3213 20.9067 18.1691 19.5164 19.5771 18.5563ZM14.6758 4.54749C14.9256 4.0552 15.5271 3.85842 16.0195 4.10803L20.5703 6.41467L20.6582 6.46545C21.085 6.73909 21.2439 7.29752 21.0098 7.7594L14.4189 20.7594C14.3389 20.9171 14.2179 21.0511 14.0693 21.1471L9.81738 23.8932C9.51875 24.0861 9.14038 24.1056 8.82324 23.9449C8.50608 23.7842 8.29737 23.4669 8.27637 23.1119L7.97852 18.0592C7.96811 17.8825 8.00497 17.7053 8.08496 17.5475L14.6758 4.54749ZM9.99121 18.2106L10.1719 21.2819L12.7578 19.6129L18.7734 7.7467L16.0068 6.34436L9.99121 18.2106Z" fill="currentColor" />
80
+ </svg>
81
+ )
82
+
83
+ const SettingsIcon = () => (
84
+ <svg width="24" height="24" viewBox="0 0 32 32" fill="none">
85
+ <path d="M6 15.6385C6 14.774 6.1097 13.9351 6.31595 13.135C7.40622 13.1915 8.48848 12.6488 9.0718 11.6385C9.65467 10.6289 9.58406 9.42138 8.99121 8.50568C10.1835 7.33396 11.6683 6.45889 13.326 6C13.8222 6.97252 14.8333 7.63849 16 7.63849C17.1667 7.63849 18.1778 6.97252 18.674 6C20.3317 6.45889 21.8165 7.33396 23.0088 8.50568C22.4159 9.42138 22.3453 10.6289 22.9282 11.6385C23.5115 12.6488 24.5938 13.1915 25.6841 13.135C25.8903 13.9351 26 14.774 26 15.6385C26 16.503 25.8903 17.3419 25.6841 18.142C24.5938 18.0855 23.5115 18.6282 22.9282 19.6385C22.3453 20.6481 22.4159 21.8556 23.0088 22.7713C21.8165 23.943 20.3317 24.8181 18.674 25.277C18.1778 24.3045 17.1667 23.6385 16 23.6385C14.8333 23.6385 13.8222 24.3045 13.326 25.277C11.6683 24.8181 10.1835 23.943 8.99121 22.7713C9.58406 21.8556 9.65467 20.6481 9.0718 19.6385C8.48848 18.6282 7.40622 18.0855 6.31595 18.142C6.1097 17.3419 6 16.503 6 15.6385ZM10.8039 18.6385C11.434 19.7299 11.6146 20.9846 11.3682 22.1623C11.776 22.4525 12.2101 22.7039 12.6649 22.9128C13.5618 22.1099 14.7392 21.6385 16 21.6385C17.2608 21.6385 18.4382 22.1099 19.3351 22.9128C19.7899 22.7039 20.224 22.4525 20.6318 22.1623C20.3854 20.9846 20.566 19.7299 21.1962 18.6385C21.8262 17.5472 22.8225 16.7635 23.9655 16.388C23.9884 16.1402 24 15.8903 24 15.6385C24 15.3868 23.9884 15.1368 23.9655 14.8891C22.8225 14.5136 21.8262 13.7299 21.1962 12.6385C20.566 11.5471 20.3854 10.2924 20.6318 9.11472C20.224 8.82455 19.7899 8.57314 19.3351 8.36419C18.4382 9.16711 17.2608 9.63849 16 9.63849C14.7392 9.63849 13.5618 9.16711 12.6649 8.36419C12.2101 8.57314 11.776 8.82455 11.3682 9.11472C11.6146 10.2924 11.434 11.5471 10.8039 12.6385C10.1738 13.7299 9.17754 14.5136 8.03451 14.8891C8.01157 15.1368 8 15.3868 8 15.6385C8 15.8903 8.01157 16.1402 8.03451 16.388C9.17754 16.7635 10.1738 17.5472 10.8039 18.6385ZM16 18.6385C14.3431 18.6385 13 17.2954 13 15.6385C13 13.9817 14.3431 12.6385 16 12.6385C17.6569 12.6385 19 13.9817 19 15.6385C19 17.2954 17.6569 18.6385 16 18.6385ZM16 16.6385C16.5523 16.6385 17 16.1908 17 15.6385C17 15.0862 16.5523 14.6385 16 14.6385C15.4477 14.6385 15 15.0862 15 15.6385C15 16.1908 15.4477 16.6385 16 16.6385Z" fill="currentColor" />
86
+ </svg>
87
+ )
88
+
89
+ const BackToAdminIcon = () => (
90
+ <svg width="24" height="24" viewBox="0 0 32 32" fill="none" className="back-icon-default">
91
+ <path d="M9.55133 6.10624C11.7796 3.98299 12.8196 3.43412 14.0699 3.07302C15.3202 2.71192 16.5989 2.71192 17.8491 3.07302C19.0994 3.43412 20.1395 3.98299 22.3677 6.10624L26.0109 9.57766C28.2391 11.7009 28.8152 12.6919 29.1941 13.8833C29.5731 15.0746 29.5731 16.293 29.1941 17.4844C28.8152 18.6757 28.2391 19.6668 26.0109 21.79L22.3677 25.2614C20.1395 27.3847 19.0994 27.9336 17.8491 28.2947C16.5989 28.6558 15.3202 28.6558 14.0699 28.2947C12.8196 27.9336 11.7796 27.3847 9.55133 25.2614L5.9082 21.79C3.67993 19.6668 3.10391 18.6757 2.72496 17.4844C2.346 16.293 2.346 15.0746 2.72496 13.8833C3.10391 12.6919 3.67993 11.7009 5.9082 9.57766L9.55133 6.10624ZM11.5539 7.91572L7.85896 11.4365C6.12189 13.0917 5.64637 13.7617 5.36514 14.6458C5.14433 15.34 5.14433 16.0277 5.36514 16.7219C5.64356 17.5972 6.1124 18.2626 7.80723 19.8818L11.5539 23.4519C13.2532 25.0669 13.9516 25.5136 14.8702 25.7789C15.5987 25.9893 16.3204 25.9893 17.0489 25.7789C17.9768 25.5109 18.6799 25.0578 20.417 23.4026L24.0601 19.9312C25.7972 18.276 26.2727 17.606 26.5539 16.7219C26.7747 16.0277 26.7747 15.34 26.5539 14.6458C26.2727 13.7617 25.7972 13.0917 24.0601 11.4365L20.417 7.96506C18.6799 6.30986 17.9768 5.85675 17.0489 5.58877C16.3204 5.37836 15.5987 5.37836 14.8702 5.58877C13.9516 5.85407 13.2532 6.30081 11.5539 7.91572ZM20.6368 14.4341C21.3775 13.7283 22.5784 13.7283 23.3191 14.4341C24.0598 15.1399 24.0598 16.2842 23.3191 16.99L17.3449 22.6826C16.6042 23.3884 15.4033 23.3884 14.6626 22.6826L13.7903 21.8515C13.6273 21.6961 13.5851 21.6236 13.5574 21.5364C13.5297 21.4492 13.5297 21.3601 13.5574 21.2729C13.5851 21.1857 13.6273 21.1132 13.7903 20.9579L20.6368 14.4341ZM10.6631 17.5937C10.8415 17.4237 11.0836 17.3285 11.3359 17.329L14.8252 17.3367C15.0157 17.3371 15.1697 17.4846 15.1693 17.6661C15.169 17.7513 15.1341 17.833 15.0718 17.8942L14.8878 18.0748L12.7118 20.1298C12.5095 20.3208 12.1833 20.3202 11.9819 20.1283L10.6631 18.8716C10.2928 18.5187 10.2928 17.9466 10.6631 17.5937Z" fill="currentColor"/>
92
+ </svg>
93
+ )
94
+
95
+ const BackArrowIcon = () => (
96
+ <svg width="20" height="20" viewBox="0 0 32 32" fill="none" className="back-icon-hover">
97
+ <path d="M12.3433 13.7572L12.3433 21.343L10.3433 21.343L10.3433 10.343L21.3433 10.3431V12.343L13.7575 12.343L22.3641 20.9496L20.9499 22.3638L12.3433 13.7572Z" fill="currentColor"/>
98
+ </svg>
99
+ )
100
+
101
+ // Export icons for reuse
102
+ export {
103
+ HomeIcon,
104
+ FlowsIcon,
105
+ InventoryIcon,
106
+ LoyaltyIcon,
107
+ CustomersIcon,
108
+ ReportsIcon,
109
+ AnalyticsIcon,
110
+ MarketingIcon,
111
+ WaiversIcon,
112
+ SettingsIcon,
113
+ }
114
+
115
+ // Default navigation items
116
+ const defaultNavItems: NavItem[] = [
117
+ { id: 'home', label: 'Home', path: '/home', icon: <HomeIcon />, end: true },
118
+ { id: 'flows', label: 'Flows', path: '/flows', icon: <FlowsIcon /> },
119
+ { id: 'inventory', label: 'Inventory', path: '/inventory', icon: <InventoryIcon /> },
120
+ { id: 'loyalty', label: 'Loyalty', path: '/loyalty', icon: <LoyaltyIcon /> },
121
+ { id: 'customers', label: 'Customers', path: '/customers', icon: <CustomersIcon /> },
122
+ { id: 'reports', label: 'Reports', path: '/reports', icon: <ReportsIcon /> },
123
+ { id: 'analytics', label: 'Analytics', path: '/analytics', icon: <AnalyticsIcon /> },
124
+ { id: 'marketing', label: 'Marketing', path: '/marketing', icon: <MarketingIcon /> },
125
+ { id: 'waivers', label: 'Waivers', path: '/waivers', icon: <WaiversIcon /> },
126
+ { id: 'settings', label: 'Settings', path: '/settings', icon: <SettingsIcon /> },
127
+ ]
128
+
129
+ export const ProviderSidebar: React.FC<ProviderSidebarProps> = ({
130
+ expanded = true,
131
+ providerName,
132
+ providerId,
133
+ providerImage,
134
+ providerType = 'venue',
135
+ onNavigation,
136
+ activePath = '/home',
137
+ showBackToAdmin = false,
138
+ onBackToAdmin,
139
+ navItems = defaultNavItems,
140
+ }) => {
141
+
142
+ const isActive = (item: NavItem) => {
143
+ if (item.end) {
144
+ return activePath === item.path || activePath === item.path + '/'
145
+ }
146
+ return activePath?.startsWith(item.path)
147
+ }
148
+
149
+ const handleNavClick = (path: string) => {
150
+ onNavigation?.(path)
151
+ }
152
+
153
+ return (
154
+ <aside className={`provider-sidebar provider-sidebar--${expanded ? 'expanded' : 'collapsed'}`}>
155
+ <div className="provider-sidebar__content">
156
+
157
+ {showBackToAdmin && (
158
+ expanded ? (
159
+ <div
160
+ className="provider-sidebar__back-link"
161
+ onClick={onBackToAdmin}
162
+ role="button"
163
+ tabIndex={0}
164
+ onKeyDown={(e) => e.key === 'Enter' && onBackToAdmin?.()}
165
+ >
166
+ <div className="provider-sidebar__icon provider-sidebar__icon--back">
167
+ <BackToAdminIcon />
168
+ <BackArrowIcon />
169
+ </div>
170
+ <span className="provider-sidebar__link-text">Back to Admin Panel</span>
171
+ </div>
172
+ ) : (
173
+ <Tooltip content="Back to Admin Panel" side="right" sideOffset={8} delayDuration={100}>
174
+ <div
175
+ className="provider-sidebar__back-link provider-sidebar__back-link--collapsed"
176
+ onClick={onBackToAdmin}
177
+ role="button"
178
+ tabIndex={0}
179
+ onKeyDown={(e) => e.key === 'Enter' && onBackToAdmin?.()}
180
+ >
181
+ <div className="provider-sidebar__icon provider-sidebar__icon--back">
182
+ <BackToAdminIcon />
183
+ <BackArrowIcon />
184
+ </div>
185
+ </div>
186
+ </Tooltip>
187
+ )
188
+ )}
189
+
190
+
191
+ {expanded ? (
192
+ <div className="provider-sidebar__header">
193
+ <EntityHeader
194
+ name={providerName}
195
+ id={providerId}
196
+ idLabel={providerType === 'venue' ? 'Venue ID' : 'Provider ID'}
197
+ imageUrl={providerImage}
198
+ size="md"
199
+ collapsed={false}
200
+ />
201
+ </div>
202
+ ) : (
203
+ <Tooltip content={providerName} side="right" sideOffset={8} delayDuration={100}>
204
+ <div className="provider-sidebar__header provider-sidebar__header--collapsed">
205
+ <EntityHeader
206
+ name={providerName}
207
+ id={providerId}
208
+ idLabel={providerType === 'venue' ? 'Venue ID' : 'Provider ID'}
209
+ imageUrl={providerImage}
210
+ size="md"
211
+ collapsed={true}
212
+ />
213
+ </div>
214
+ </Tooltip>
215
+ )}
216
+
217
+
218
+ <nav className="provider-sidebar__nav">
219
+ {navItems.map((item) => {
220
+ const linkContent = (
221
+ <div
222
+ key={item.id}
223
+ className={`provider-sidebar__link ${isActive(item) ? 'provider-sidebar__link--active' : ''} ${expanded ? '' : 'provider-sidebar__link--collapsed'}`}
224
+ onClick={() => handleNavClick(item.path)}
225
+ role="button"
226
+ tabIndex={0}
227
+ onKeyDown={(e) => e.key === 'Enter' && handleNavClick(item.path)}
228
+ >
229
+ <div className="provider-sidebar__icon">
230
+ {item.icon}
231
+ </div>
232
+ {expanded && (
233
+ <span className="provider-sidebar__link-text">{item.label}</span>
234
+ )}
235
+ </div>
236
+ )
237
+
238
+ if (!expanded) {
239
+ return (
240
+ <Tooltip key={item.id} content={item.label} side="right" sideOffset={8} delayDuration={100}>
241
+ {linkContent}
242
+ </Tooltip>
243
+ )
244
+ }
245
+
246
+ return linkContent
247
+ })}
248
+ </nav>
249
+ </div>
250
+ </aside>
251
+ )
252
+ }