@licklist/design 0.78.5-dev.35 → 0.78.5-dev.37

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 (36) hide show
  1. package/dist/auth/Authorizer.d.ts.map +1 -1
  2. package/dist/auth/Authorizer.js +15 -11
  3. package/dist/index.js +1 -1
  4. package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
  5. package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
  6. package/dist/v2/components/NPSScore/index.d.ts +3 -0
  7. package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
  8. package/dist/v2/components/UserPanel/UserPanel.js +168 -0
  9. package/dist/v2/components/UserPanel/UserPanel.scss.js +6 -0
  10. package/dist/v2/index.d.ts +4 -0
  11. package/dist/v2/index.d.ts.map +1 -1
  12. package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +1 -1
  13. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +8 -0
  14. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -1
  15. package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +8 -2
  16. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +20 -0
  17. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -1
  18. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +66 -65
  19. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +5 -0
  20. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -1
  21. package/dist/v2/navigation/DashboardLayout/TopNavigation.js +16 -1
  22. package/dist/v2/navigation/DashboardLayout/index.d.ts +1 -1
  23. package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -1
  24. package/package.json +3 -3
  25. package/src/auth/Authorizer.tsx +23 -19
  26. package/src/v2/components/NPSScore/NPSScore.scss +330 -0
  27. package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
  28. package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
  29. package/src/v2/components/NPSScore/index.ts +2 -0
  30. package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +34 -0
  31. package/src/v2/index.ts +32 -0
  32. package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +1 -1
  33. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +37 -12
  34. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +41 -23
  35. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +27 -1
  36. package/src/v2/navigation/DashboardLayout/index.ts +15 -1
@@ -4,6 +4,7 @@ import './TopNavigation.scss.js';
4
4
  import img from './assets/BookedLogo_Mark.png.js';
5
5
  import { UserAvatar } from '../../components/UserAvatar/UserAvatar.js';
6
6
  import { Tooltip } from '../../components/Tooltip/Tooltip.js';
7
+ import { UserPanel } from '../../components/UserPanel/UserPanel.js';
7
8
 
8
9
  function _array_like_to_array(arr, len) {
9
10
  if (len == null || len > arr.length) len = arr.length;
@@ -298,7 +299,7 @@ var CloseIcon = function() {
298
299
  });
299
300
  };
300
301
  var TopNavigation = function(param) {
301
- var _param_sidebarCollapsed = param.sidebarCollapsed, sidebarCollapsed = _param_sidebarCollapsed === void 0 ? false : _param_sidebarCollapsed, onSidebarToggle = param.onSidebarToggle, _param_userInitials = param.userInitials, userInitials = _param_userInitials === void 0 ? 'U' : _param_userInitials, _param_userName = param.userName, userName = _param_userName === void 0 ? 'User' : _param_userName, userAvatarUrl = param.userAvatarUrl, _param_inboxCount = param.inboxCount, inboxCount = _param_inboxCount === void 0 ? 0 : _param_inboxCount, _param_notificationCount = param.notificationCount, notificationCount = _param_notificationCount === void 0 ? 0 : _param_notificationCount, onUserClick = param.onUserClick, onInboxClick = param.onInboxClick, onNotificationClick = param.onNotificationClick, onHelpClick = param.onHelpClick, _param_mobileMenuOpen = param.mobileMenuOpen, mobileMenuOpen = _param_mobileMenuOpen === void 0 ? false : _param_mobileMenuOpen, onMobileMenuToggle = param.onMobileMenuToggle, _param_sidebarToggleDisabled = param.sidebarToggleDisabled, sidebarToggleDisabled = _param_sidebarToggleDisabled === void 0 ? false : _param_sidebarToggleDisabled, userPanelOpen = param.userPanelOpen;
302
+ var _param_sidebarCollapsed = param.sidebarCollapsed, sidebarCollapsed = _param_sidebarCollapsed === void 0 ? false : _param_sidebarCollapsed, onSidebarToggle = param.onSidebarToggle, _param_userInitials = param.userInitials, userInitials = _param_userInitials === void 0 ? 'U' : _param_userInitials, _param_userName = param.userName, userName = _param_userName === void 0 ? 'User' : _param_userName, userEmail = param.userEmail, userAvatarUrl = param.userAvatarUrl, userId = param.userId, userRole = param.userRole, _param_inboxCount = param.inboxCount, inboxCount = _param_inboxCount === void 0 ? 0 : _param_inboxCount, _param_notificationCount = param.notificationCount, notificationCount = _param_notificationCount === void 0 ? 0 : _param_notificationCount, onUserClick = param.onUserClick, onInboxClick = param.onInboxClick, onNotificationClick = param.onNotificationClick, onHelpClick = param.onHelpClick, onProfileClick = param.onProfileClick, onLogoutClick = param.onLogoutClick, _param_mobileMenuOpen = param.mobileMenuOpen, mobileMenuOpen = _param_mobileMenuOpen === void 0 ? false : _param_mobileMenuOpen, onMobileMenuToggle = param.onMobileMenuToggle, _param_sidebarToggleDisabled = param.sidebarToggleDisabled, sidebarToggleDisabled = _param_sidebarToggleDisabled === void 0 ? false : _param_sidebarToggleDisabled, _param_userPanelOpen = param.userPanelOpen, userPanelOpen = _param_userPanelOpen === void 0 ? false : _param_userPanelOpen;
302
303
  var _useState = _sliced_to_array(useState(null), 2), hoveredItem = _useState[0], setHoveredItem = _useState[1];
303
304
  var _useState1 = _sliced_to_array(useState(false), 2), isNotificationActive = _useState1[0], setIsNotificationActive = _useState1[1];
304
305
  var handleUserClick = function() {
@@ -445,6 +446,20 @@ var TopNavigation = function(param) {
445
446
  })
446
447
  })
447
448
  ]
449
+ }),
450
+ /*#__PURE__*/ jsx(UserPanel, {
451
+ isOpen: userPanelOpen,
452
+ onClose: function() {
453
+ return onUserClick === null || onUserClick === void 0 ? void 0 : onUserClick();
454
+ },
455
+ userName: userName,
456
+ email: userEmail,
457
+ initials: userInitials,
458
+ avatarUrl: userAvatarUrl,
459
+ userNumber: userId,
460
+ userRole: userRole,
461
+ onProfileClick: onProfileClick,
462
+ onLogoutClick: onLogoutClick
448
463
  })
449
464
  ]
450
465
  });
@@ -1,5 +1,5 @@
1
1
  export { DashboardLayout, type DashboardLayoutProps, type DestinationType } from './DashboardLayout';
2
- export { ProviderSidebar, type ProviderSidebarProps } from './ProviderSidebar';
2
+ export { ProviderSidebar, type ProviderSidebarProps, type NavItem, HomeIcon, FlowsIcon, InventoryIcon, LoyaltyIcon, CustomersIcon, ReportsIcon, AnalyticsIcon, MarketingIcon, WaiversIcon, SettingsIcon, } from './ProviderSidebar';
3
3
  export { AdminSidebar, type AdminSidebarProps } from './AdminSidebar';
4
4
  export { TopNavigation, type TopNavigationProps } from './TopNavigation';
5
5
  export { DashboardFooter, type DashboardFooterProps } from './DashboardFooter';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACpG,OAAO,EACH,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.5-dev.35",
3
+ "version": "0.78.5-dev.37",
4
4
  "repository": {
5
5
  "type": "git",
6
- "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
6
+ "url": "git+ssh://git@bitbucket.org/bookedit-licklist/licklist_design.git"
7
7
  },
8
8
  "author": "Yaroslav Havryliv",
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "homepage": "https://bitbucket.org/artelogicsoft/licklist_design#readme",
11
+ "homepage": "https://bitbucket.org/bookedit-licklist/licklist_design#readme",
12
12
  "description": "",
13
13
  "scripts": {
14
14
  "start": "storybook dev -p 9009",
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, useEffect, useState, useCallback } from 'react'
2
- import { matchPath, useLocation } from 'react-router-dom'
2
+ import { matchPath, useLocation, useNavigate } from 'react-router-dom'
3
3
  import useUser from '@licklist/plugins/dist/context/user/hooks/useUser'
4
4
  import { ROUTES, MATCH_ROUTE_PATTERNS } from '@licklist/core/dist/Config'
5
5
  import useAuthApi from '@licklist/plugins/dist/hooks/Api/useAuthApi'
@@ -18,6 +18,7 @@ function Authorizer(props: AuthorizerProps) {
18
18
  const { useProfile } = useAuthApi()
19
19
 
20
20
  const { pathname } = useLocation()
21
+ const navigate = useNavigate()
21
22
 
22
23
  // This will re-fetch user's profile
23
24
  const profile = useProfile()
@@ -54,38 +55,41 @@ function Authorizer(props: AuthorizerProps) {
54
55
  return
55
56
  }
56
57
 
57
- if (
58
- [
59
- ROUTES.LOGIN_PAGE,
60
- ROUTES.REGISTER_PAGE,
61
- ROUTES.PRIVACY_PAGE,
62
- ROUTES.TERMS_PAGE,
63
- ROUTES.PRIVACY_FACTS_PAGE,
64
- ROUTES.CHANGE_PASSWORD,
65
- ROUTES.FORGOT_PASSWORD,
66
- ROUTES.SSO_LOGIN,
67
- ROUTES.MAINTENANCE_PAGE,
68
- ...matchedPathPatternUrls(),
69
- ].includes(pathname)
70
- ) {
71
- setIsValidated(() => true)
58
+ const publicRoutes = [
59
+ ROUTES.LOGIN_PAGE,
60
+ ROUTES.REGISTER_PAGE,
61
+ ROUTES.PRIVACY_PAGE,
62
+ ROUTES.TERMS_PAGE,
63
+ ROUTES.PRIVACY_FACTS_PAGE,
64
+ ROUTES.CHANGE_PASSWORD,
65
+ ROUTES.FORGOT_PASSWORD,
66
+ ROUTES.SSO_LOGIN,
67
+ ROUTES.MAINTENANCE_PAGE,
68
+ ...matchedPathPatternUrls(),
69
+ ]
70
+
71
+ // If we're on a public route (e.g. /login), mark as validated and never redirect
72
+ if (publicRoutes.includes(pathname)) {
73
+ setIsValidated(true)
72
74
  return
73
75
  }
74
76
 
75
77
  const route = RouteService.getCurrentRoute()
76
78
 
77
- RouteService.redirectTo(
78
- [ROUTES.MAINTENANCE_PAGE, `returnUrl=${escape(route)}`].join('?'),
79
+ navigate(
80
+ [ROUTES.LOGIN_PAGE, `returnUrl=${escape(route)}`].join('?'),
81
+ { replace: true },
79
82
  )
80
83
  }, [
81
84
  auth.secrets,
82
85
  user.profile,
83
86
  profile.data,
84
- matchedPathPatternUrls,
85
87
  profile.isError,
86
88
  profile.isLoading,
87
89
  profile.isFetching,
88
90
  pathname,
91
+ matchedPathPatternUrls,
92
+ navigate,
89
93
  ])
90
94
 
91
95
  if (profile.isFetching || profile.isLoading || !isValidated)
@@ -0,0 +1,330 @@
1
+ .nps-score {
2
+ width: 100%;
3
+ margin-top: 24px;
4
+
5
+ &__container {
6
+ background: var(--surfaces-main-surface-secondary, #F4F4F7);
7
+ border-radius: 16px;
8
+ padding: 24px;
9
+ border: 1px solid var(--borders-main-border-primary, #E8E9EF);
10
+ }
11
+
12
+ &__question {
13
+ font-family: var(--font-family-sans);
14
+ font-size: 18px;
15
+ font-weight: 600;
16
+ line-height: 24px;
17
+ color: var(--labels-main-label-primary, #121E52);
18
+ margin: 0 0 16px 0;
19
+ }
20
+
21
+ &__labels {
22
+ display: flex;
23
+ justify-content: space-between;
24
+ align-items: center;
25
+ margin-bottom: 12px;
26
+ }
27
+
28
+ &__label {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: 8px;
32
+
33
+ span {
34
+ font-family: var(--font-family-sans);
35
+ font-size: 14px;
36
+ font-weight: 500;
37
+ color: var(--labels-main-label-secondary, #626A90);
38
+ }
39
+
40
+ &--desktop {
41
+ display: none;
42
+
43
+ @media (min-width: 768px) {
44
+ display: flex;
45
+ }
46
+ }
47
+
48
+ &--mobile {
49
+ display: flex;
50
+ justify-content: flex-end;
51
+ margin-top: 12px;
52
+
53
+ @media (min-width: 768px) {
54
+ display: none;
55
+ }
56
+ }
57
+ }
58
+
59
+ &__label-icon {
60
+ color: var(--fills-main-fill-secondary, #626A90);
61
+ flex-shrink: 0;
62
+ }
63
+
64
+ &__buttons {
65
+ display: grid;
66
+ grid-template-columns: repeat(5, 1fr);
67
+ gap: 8px;
68
+
69
+ @media (min-width: 768px) {
70
+ grid-template-columns: repeat(10, 1fr);
71
+ }
72
+ }
73
+
74
+ &__button {
75
+ height: 48px;
76
+ border-radius: 12px;
77
+ font-family: var(--font-family-sans);
78
+ font-size: 18px;
79
+ font-weight: 600;
80
+ transition: all 0.2s ease;
81
+ cursor: pointer;
82
+ background: var(--surfaces-main-surface-primary, #FFFFFF);
83
+ border: 1px solid var(--borders-main-border-primary, #E8E9EF);
84
+ color: var(--labels-main-label-primary, #121E52);
85
+
86
+ &:hover:not(&--selected) {
87
+ background: var(--surfaces-main-surface-primary-hover, #F8F8FA);
88
+ }
89
+
90
+ &--selected {
91
+ background: var(--fills-main-fill-primary, #14215A);
92
+ border-color: transparent;
93
+ color: #FFFFFF;
94
+ }
95
+ }
96
+
97
+ &__expanded {
98
+ margin-top: 16px;
99
+ display: flex;
100
+ flex-direction: column;
101
+ gap: 16px;
102
+ animation: nps-fade-in 0.2s ease;
103
+ }
104
+
105
+ &__field {
106
+ &--roles {
107
+ padding-top: 16px;
108
+ }
109
+ }
110
+
111
+ &__field-label {
112
+ display: block;
113
+ font-family: var(--font-family-sans);
114
+ font-size: 14px;
115
+ font-weight: 500;
116
+ color: var(--labels-main-label-primary, #121E52);
117
+ margin-bottom: 8px;
118
+ }
119
+
120
+ &__field-header {
121
+ display: flex;
122
+ justify-content: space-between;
123
+ align-items: center;
124
+ margin-bottom: 8px;
125
+ }
126
+
127
+ &__optional {
128
+ font-family: var(--font-family-sans);
129
+ font-size: 14px;
130
+ color: var(--labels-main-label-secondary, #626A90);
131
+ }
132
+
133
+ &__textarea {
134
+ width: 100%;
135
+ min-height: 100px;
136
+ padding: 12px;
137
+ border-radius: 8px;
138
+ border: 1px solid var(--borders-main-border-primary, #E8E9EF);
139
+ background: var(--surfaces-main-surface-primary, #FFFFFF);
140
+ font-family: var(--font-family-sans);
141
+ font-size: 14px;
142
+ color: var(--labels-main-label-primary, #121E52);
143
+ resize: vertical;
144
+ box-sizing: border-box;
145
+
146
+ &::placeholder {
147
+ color: var(--labels-main-label-tertiary, #9CA3AF);
148
+ }
149
+
150
+ &:focus {
151
+ outline: none;
152
+ border-color: var(--fills-main-fill-primary, #14215A);
153
+ }
154
+
155
+ &--error {
156
+ border-color: var(--fills-main-fill-danger, #DC2626);
157
+ }
158
+ }
159
+
160
+ &__hint {
161
+ font-family: var(--font-family-sans);
162
+ font-size: 14px;
163
+ color: var(--labels-main-label-secondary, #626A90);
164
+ margin: 4px 0 0 0;
165
+ }
166
+
167
+ &__error {
168
+ font-family: var(--font-family-sans);
169
+ font-size: 14px;
170
+ color: var(--fills-main-fill-danger, #DC2626);
171
+ margin: 4px 0 0 0;
172
+ }
173
+
174
+ &__add-comment {
175
+ font-family: var(--font-family-sans);
176
+ font-size: 14px;
177
+ font-weight: 500;
178
+ color: var(--labels-main-label-action, #2563EB);
179
+ text-decoration: underline;
180
+ background: none;
181
+ border: none;
182
+ padding: 0;
183
+ cursor: pointer;
184
+ transition: color 0.2s ease;
185
+
186
+ &:hover {
187
+ color: var(--labels-main-label-action-hover, #1D4ED8);
188
+ }
189
+ }
190
+
191
+ &__roles {
192
+ display: grid;
193
+ grid-template-columns: 1fr;
194
+ gap: 12px;
195
+
196
+ @media (min-width: 640px) {
197
+ grid-template-columns: repeat(2, 1fr);
198
+ }
199
+
200
+ @media (min-width: 1024px) {
201
+ grid-template-columns: repeat(3, 1fr);
202
+ }
203
+ }
204
+
205
+ &__role {
206
+ display: flex;
207
+ align-items: center;
208
+ gap: 8px;
209
+ cursor: pointer;
210
+ position: relative;
211
+ }
212
+
213
+ &__role-input {
214
+ appearance: none;
215
+ -webkit-appearance: none;
216
+ -moz-appearance: none;
217
+ width: 20px;
218
+ height: 20px;
219
+ border-radius: 50%;
220
+ border: 2px solid var(--borders-main-border-primary, #E8E9EF);
221
+ background: var(--surfaces-main-surface-primary, #FFFFFF);
222
+ margin: 0;
223
+ cursor: pointer;
224
+ flex-shrink: 0;
225
+ position: relative;
226
+ transition: border-color 0.2s ease;
227
+
228
+ &::before {
229
+ content: '';
230
+ position: absolute;
231
+ top: 50%;
232
+ left: 50%;
233
+ transform: translate(-50%, -50%) scale(0);
234
+ width: 10px;
235
+ height: 10px;
236
+ border-radius: 50%;
237
+ background: var(--fills-main-fill-primary, #14215A);
238
+ transition: transform 0.2s ease;
239
+ }
240
+
241
+ &:checked {
242
+ border-color: var(--fills-main-fill-primary, #14215A);
243
+
244
+ &::before {
245
+ transform: translate(-50%, -50%) scale(1);
246
+ }
247
+ }
248
+
249
+ &:focus {
250
+ outline: none;
251
+ box-shadow: 0 0 0 2px var(--fills-main-fill-primary-opacity, rgba(20, 33, 90, 0.2));
252
+ }
253
+ }
254
+
255
+ &__role-radio {
256
+ display: none;
257
+ }
258
+
259
+ &__role-label {
260
+ font-family: var(--font-family-sans);
261
+ font-size: 14px;
262
+ color: var(--labels-main-label-primary, #121E52);
263
+ }
264
+
265
+ &__submit {
266
+ display: inline-flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ padding: 12px 24px;
270
+ border-radius: 8px;
271
+ border: none;
272
+ background: var(--fills-main-fill-primary, #14215A);
273
+ color: #FFFFFF;
274
+ font-family: var(--font-family-sans);
275
+ font-size: 14px;
276
+ font-weight: 600;
277
+ cursor: pointer;
278
+ transition: background 0.2s ease;
279
+ width: fit-content;
280
+
281
+ &:hover:not(:disabled) {
282
+ background: var(--fills-main-fill-primary-hover, #1a2a6e);
283
+ }
284
+
285
+ &:disabled {
286
+ opacity: 0.6;
287
+ cursor: not-allowed;
288
+ }
289
+ }
290
+
291
+ &__success {
292
+ display: flex;
293
+ flex-direction: column;
294
+ align-items: center;
295
+ justify-content: center;
296
+ padding: 32px;
297
+ text-align: center;
298
+ }
299
+
300
+ &__success-icon {
301
+ color: var(--fills-main-fill-success, #10B981);
302
+ margin-bottom: 16px;
303
+ }
304
+
305
+ &__success-title {
306
+ font-family: var(--font-family-sans);
307
+ font-size: 24px;
308
+ font-weight: 600;
309
+ color: var(--labels-main-label-primary, #121E52);
310
+ margin: 0 0 8px 0;
311
+ }
312
+
313
+ &__success-message {
314
+ font-family: var(--font-family-sans);
315
+ font-size: 14px;
316
+ color: var(--labels-main-label-secondary, #626A90);
317
+ margin: 0;
318
+ }
319
+ }
320
+
321
+ @keyframes nps-fade-in {
322
+ from {
323
+ opacity: 0;
324
+ transform: translateY(-8px);
325
+ }
326
+ to {
327
+ opacity: 1;
328
+ transform: translateY(0);
329
+ }
330
+ }
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+ import type { Meta, StoryObj } from '@storybook/react'
3
+ import { NPSScore } from './NPSScore'
4
+
5
+ const meta: Meta<typeof NPSScore> = {
6
+ title: 'v2/Components/NPSScore',
7
+ component: NPSScore,
8
+ parameters: {
9
+ layout: 'padded',
10
+ },
11
+ argTypes: {
12
+ firstName: { control: 'text' },
13
+ onSubmit: { action: 'submitted' },
14
+ onDismiss: { action: 'dismissed' },
15
+ },
16
+ }
17
+
18
+ export default meta
19
+ type Story = StoryObj<typeof NPSScore>
20
+
21
+ export const Default: Story = {
22
+ args: {
23
+ firstName: 'Godwin',
24
+ onSubmit: (data) => {
25
+ console.log('NPS Submitted:', data)
26
+ return Promise.resolve()
27
+ },
28
+ },
29
+ }