@licklist/design 0.78.5-dev.34 → 0.78.5-dev.36

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 (47) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
  3. package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
  4. package/dist/v2/components/NPSScore/index.d.ts +3 -0
  5. package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
  6. package/dist/v2/components/Tooltip/Tooltip.d.ts +5 -4
  7. package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -1
  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/dist/v2/styles/components/Button.scss +168 -0
  25. package/dist/v2/styles/form/NewInput.scss +172 -0
  26. package/dist/v2/styles/index.scss +4 -0
  27. package/dist/v2/styles/navigation/Navigation.scss +17 -0
  28. package/dist/v2/styles/navigation/NavigationItem.scss +86 -0
  29. package/dist/v2/styles/navigation/NavigationSection.scss +26 -0
  30. package/dist/v2/styles/navigation/_index.scss +9 -0
  31. package/dist/v2/styles/tokens/_colors.scss +554 -0
  32. package/dist/v2/styles/tokens/_sizes.scss +122 -0
  33. package/dist/v2/styles/tokens/_status.scss +108 -0
  34. package/dist/v2/styles/tokens/_typography.scss +146 -0
  35. package/package.json +2 -1
  36. package/rollup.config.js +1 -0
  37. package/src/v2/components/NPSScore/NPSScore.scss +330 -0
  38. package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
  39. package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
  40. package/src/v2/components/NPSScore/index.ts +2 -0
  41. package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +34 -0
  42. package/src/v2/index.ts +32 -0
  43. package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +1 -1
  44. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +37 -12
  45. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +41 -23
  46. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +27 -1
  47. package/src/v2/navigation/DashboardLayout/index.ts +15 -1
@@ -0,0 +1,108 @@
1
+ /* Status/Alert Color tokens derived from Figma Alerts & Errors page
2
+ * Spec: https://www.figma.com/design/HPb8SEwQH2rrFAD2sRlKei/BKIT---Booked-Kit?node-id=167:968
3
+ */
4
+
5
+ :root {
6
+ /* Success/Green Status Colors */
7
+ --color-success-fill: #2d6b18;
8
+ --color-success-background: #eef9ea;
9
+ --color-success-border: #c9ecbd;
10
+
11
+ /* Error/Red Status Colors */
12
+ --color-error-fill: #cc3c35;
13
+ --color-error-background: #fceceb;
14
+ --color-error-border: #f5c4c2;
15
+
16
+ /* Alert/Warning/Yellow Status Colors */
17
+ --color-alert-fill: #fd7e14;
18
+ --color-alert-background: #fcf6e7;
19
+ --color-alert-border: #f6e3b4;
20
+
21
+ /* Info/Blue Status Colors */
22
+ --color-info-fill: #0e8ce2;
23
+ --color-info-background: #e7f4fc;
24
+ --color-info-border: #b4dbf6;
25
+ }
26
+
27
+ /* Legacy format for compatibility with existing alias system */
28
+ :root {
29
+ /* Surfaces - Status backgrounds */
30
+ --surfaces-status-background-success: var(--color-success-background);
31
+ --surfaces-status-background-error: var(--color-error-background);
32
+ --surfaces-status-background-alert: var(--color-alert-background);
33
+ --surfaces-status-background-info: var(--color-info-background);
34
+
35
+ /* Borders - Status borders */
36
+ --borders-status-border-success: var(--color-success-border);
37
+ --borders-status-border-error: var(--color-error-border);
38
+ --borders-status-border-alert: var(--color-alert-border);
39
+ --borders-status-border-info: var(--color-info-border);
40
+
41
+ /* Fills - Status icons/text */
42
+ --fills-status-fill-success: var(--color-success-fill);
43
+ --fills-status-fill-error: var(--color-error-fill);
44
+ --fills-status-fill-alert: var(--color-alert-fill);
45
+ --fills-status-fill-info: var(--color-info-fill);
46
+ }
47
+
48
+ /* SCSS Map for status colors */
49
+ $status-colors: (
50
+ success: (
51
+ fill: var(--color-success-fill),
52
+ background: var(--color-success-background),
53
+ border: var(--color-success-border)
54
+ ),
55
+ error: (
56
+ fill: var(--color-error-fill),
57
+ background: var(--color-error-background),
58
+ border: var(--color-error-border)
59
+ ),
60
+ alert: (
61
+ fill: var(--color-alert-fill),
62
+ background: var(--color-alert-background),
63
+ border: var(--color-alert-border)
64
+ ),
65
+ info: (
66
+ fill: var(--color-info-fill),
67
+ background: var(--color-info-background),
68
+ border: var(--color-info-border)
69
+ )
70
+ );
71
+
72
+ /* Mixins for status colors */
73
+ @mixin status-success() {
74
+ background-color: var(--surfaces-status-background-success);
75
+ border-color: var(--borders-status-border-success);
76
+ color: var(--fills-status-fill-success);
77
+ }
78
+
79
+ @mixin status-error() {
80
+ background-color: var(--surfaces-status-background-error);
81
+ border-color: var(--borders-status-border-error);
82
+ color: var(--fills-status-fill-error);
83
+ }
84
+
85
+ @mixin status-alert() {
86
+ background-color: var(--surfaces-status-background-alert);
87
+ border-color: var(--borders-status-border-alert);
88
+ color: var(--fills-status-fill-alert);
89
+ }
90
+
91
+ @mixin status-info() {
92
+ background-color: var(--surfaces-status-background-info);
93
+ border-color: var(--borders-status-border-info);
94
+ color: var(--fills-status-fill-info);
95
+ }
96
+
97
+ /* Helper mixin for getting status colors */
98
+ @function get-status-color($status, $type) {
99
+ $status-map: map-get($status-colors, $status);
100
+ @if $status-map {
101
+ $color: map-get($status-map, $type);
102
+ @if $color {
103
+ @return $color;
104
+ }
105
+ }
106
+ @warn "Unknown status color: #{$status}.#{$type}";
107
+ @return null;
108
+ }
@@ -0,0 +1,146 @@
1
+ /* Typography tokens and mixins derived from Figma
2
+ * Spec: https://www.figma.com/design/HPb8SEwQH2rrFAD2sRlKei/BKIT---Booked-Kit?node-id=30-95&m=dev
3
+ */
4
+
5
+ :root {
6
+ /* Families */
7
+ --font-family-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
8
+ --font-family-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
9
+
10
+ /* Headings Desktop */
11
+ --heading-xxl-size: 44px;
12
+ --heading-xxl-line: 48px;
13
+ --heading-xxl-weight: 600;
14
+ --heading-xl-size: 32px;
15
+ --heading-xl-line: 36px;
16
+ --heading-xl-weight: 700;
17
+ --heading-h1-size: 24px;
18
+ --heading-h1-line: 28px;
19
+ --heading-h1-weight: 600;
20
+ --heading-h2-size: 20px;
21
+ --heading-h2-line: 24px;
22
+ --heading-h2-weight: 600;
23
+ --heading-h3-size: 17px;
24
+ --heading-h3-line: 20px;
25
+ --heading-h3-weight: 600;
26
+ --heading-h4-size: 15px;
27
+ --heading-h4-line: 18px;
28
+ --heading-h4-weight: 600;
29
+ --heading-h5-size: 13px;
30
+ --heading-h5-line: 16px;
31
+ --heading-h5-weight: 500;
32
+ --heading-h6-size: 11px;
33
+ --heading-h6-line: 14px;
34
+ --heading-h6-weight: 500;
35
+
36
+ /* Headings Mobile */
37
+ --heading-xxl-mobile-size: 32px;
38
+ --heading-xxl-mobile-line: 36px;
39
+ --heading-xxl-mobile-weight: 600;
40
+ --heading-xl-mobile-size: 26px;
41
+ --heading-xl-mobile-line: 30px;
42
+ --heading-xl-mobile-weight: 700;
43
+ --heading-h1-mobile-size: 20px;
44
+ --heading-h1-mobile-line: 23px;
45
+ --heading-h1-mobile-weight: 600;
46
+ --heading-h2-mobile-size: 18px;
47
+ --heading-h2-mobile-line: 22px;
48
+ --heading-h2-mobile-weight: 600;
49
+ --heading-h3-mobile-size: 16px;
50
+ --heading-h3-mobile-line: 18px;
51
+ --heading-h3-mobile-weight: 600;
52
+ --heading-h4-mobile-size: 14px;
53
+ --heading-h4-mobile-line: 16px;
54
+ --heading-h4-mobile-weight: 600;
55
+ --heading-h5-mobile-size: 13px;
56
+ --heading-h5-mobile-line: 16px;
57
+ --heading-h5-mobile-weight: 500;
58
+ --heading-h6-mobile-size: 11px;
59
+ --heading-h6-mobile-line: 14px;
60
+ --heading-h6-mobile-weight: 500;
61
+
62
+ /* Body Desktop */
63
+ --text-xl-size: 20px;
64
+ --text-xl-line: 26px;
65
+ --text-xl-weight: 400;
66
+ --text-large-size: 18px;
67
+ --text-large-line: 24px;
68
+ --text-large-weight: 400;
69
+ --text-regular-size: 15px;
70
+ --text-regular-line: 20px;
71
+ --text-regular-weight: 400;
72
+ --text-small-size: 13px;
73
+ --text-small-line: 16px;
74
+ --text-small-weight: 400;
75
+ --text-small-emphasis-weight: 500;
76
+ --text-small-bold-weight: 600;
77
+ --text-xs-size: 10px;
78
+ --text-xs-line: 13px;
79
+ --text-xs-weight: 500;
80
+ --text-xs-bold-weight: 600;
81
+ }
82
+
83
+ /* Breakpoint: adjust if your system uses different breakpoints */
84
+ $bp-mobile-max: 767px;
85
+
86
+ /* Map of variants to CSS variable tuples: (size, line, weight) */
87
+ $typo-map: (
88
+ 'heading.xxl': (var(--heading-xxl-size), var(--heading-xxl-line), var(--heading-xxl-weight), var(--font-family-sans)),
89
+ 'heading.xl': (var(--heading-xl-size), var(--heading-xl-line), var(--heading-xl-weight), var(--font-family-sans)),
90
+ 'heading.h1': (var(--heading-h1-size), var(--heading-h1-line), var(--heading-h1-weight), var(--font-family-sans)),
91
+ 'heading.h2': (var(--heading-h2-size), var(--heading-h2-line), var(--heading-h2-weight), var(--font-family-sans)),
92
+ 'heading.h3': (var(--heading-h3-size), var(--heading-h3-line), var(--heading-h3-weight), var(--font-family-sans)),
93
+ 'heading.h4': (var(--heading-h4-size), var(--heading-h4-line), var(--heading-h4-weight), var(--font-family-sans)),
94
+ 'heading.h5': (var(--heading-h5-size), var(--heading-h5-line), var(--heading-h5-weight), var(--font-family-sans)),
95
+ 'heading.h6': (var(--heading-h6-size), var(--heading-h6-line), var(--heading-h6-weight), var(--font-family-sans)),
96
+
97
+ 'heading.xxl.mobile': (var(--heading-xxl-mobile-size), var(--heading-xxl-mobile-line), var(--heading-xxl-mobile-weight), var(--font-family-sans)),
98
+ 'heading.xl.mobile': (var(--heading-xl-mobile-size), var(--heading-xl-mobile-line), var(--heading-xl-mobile-weight), var(--font-family-sans)),
99
+ 'heading.h1.mobile': (var(--heading-h1-mobile-size), var(--heading-h1-mobile-line), var(--heading-h1-mobile-weight), var(--font-family-sans)),
100
+ 'heading.h2.mobile': (var(--heading-h2-mobile-size), var(--heading-h2-mobile-line), var(--heading-h2-mobile-weight), var(--font-family-sans)),
101
+ 'heading.h3.mobile': (var(--heading-h3-mobile-size), var(--heading-h3-mobile-line), var(--heading-h3-mobile-weight), var(--font-family-sans)),
102
+ 'heading.h4.mobile': (var(--heading-h4-mobile-size), var(--heading-h4-mobile-line), var(--heading-h4-mobile-weight), var(--font-family-sans)),
103
+ 'heading.h5.mobile': (var(--heading-h5-mobile-size), var(--heading-h5-mobile-line), var(--heading-h5-mobile-weight), var(--font-family-sans)),
104
+ 'heading.h6.mobile': (var(--heading-h6-mobile-size), var(--heading-h6-mobile-line), var(--heading-h6-mobile-weight), var(--font-family-sans)),
105
+
106
+ 'text.xl': (var(--text-xl-size), var(--text-xl-line), var(--text-xl-weight), var(--font-family-sans)),
107
+ 'text.large': (var(--text-large-size), var(--text-large-line), var(--text-large-weight), var(--font-family-sans)),
108
+ 'text.regular': (var(--text-regular-size), var(--text-regular-line), var(--text-regular-weight), var(--font-family-sans)),
109
+ 'text.small': (var(--text-small-size), var(--text-small-line), var(--text-small-weight), var(--font-family-sans)),
110
+ 'text.small.emphasis': (var(--text-small-size), var(--text-small-line), var(--text-small-emphasis-weight), var(--font-family-sans)),
111
+ 'text.small.bold': (var(--text-small-size), var(--text-small-line), var(--text-small-bold-weight), var(--font-family-sans)),
112
+ 'text.xs': (var(--text-xs-size), var(--text-xs-line), var(--text-xs-weight), var(--font-family-sans)),
113
+ 'text.xs.bold': (var(--text-xs-size), var(--text-xs-line), var(--text-xs-bold-weight), var(--font-family-sans))
114
+ );
115
+
116
+ @mixin apply-typo($tuple) {
117
+ $size: nth($tuple, 1);
118
+ $line: nth($tuple, 2);
119
+ $weight: nth($tuple, 3);
120
+ $family: nth($tuple, 4);
121
+ font-family: $family;
122
+ font-size: $size;
123
+ line-height: $line;
124
+ font-weight: $weight;
125
+ color: var(--labels-main-label-primary, #121E52);
126
+ }
127
+
128
+ @mixin typography($variant) {
129
+ @if map-has-key($typo-map, $variant) {
130
+ @include apply-typo(map-get($typo-map, $variant));
131
+ }
132
+
133
+ @else {
134
+ /* Fallback to regular text */
135
+ @include apply-typo(map-get($typo-map, 'text.regular'));
136
+ }
137
+ }
138
+
139
+ /* Convenience mixin that switches to mobile variant under mobile breakpoint */
140
+ @mixin responsive-heading($desktopVariant, $mobileVariant) {
141
+ @include typography($desktopVariant);
142
+
143
+ @media (max-width: $bp-mobile-max) {
144
+ @include typography($mobileVariant);
145
+ }
146
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.5-dev.34",
3
+ "version": "0.78.5-dev.36",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -71,6 +71,7 @@
71
71
  "@mantine/hooks": "6.0.22",
72
72
  "@mdx-js/react": "1.6.22",
73
73
  "@popperjs/core": "2.11.8",
74
+ "@radix-ui/react-tooltip": "^1.2.8",
74
75
  "@react-aria/utils": "3.9.0",
75
76
  "@svgr/webpack": "^6.5.1",
76
77
  "@tanstack/react-table": "8.10.6",
package/rollup.config.js CHANGED
@@ -40,6 +40,7 @@ export default [
40
40
  targets: [
41
41
  { src: './src/assets/*', dest: './dist/assets' },
42
42
  { src: './src/styles/*', dest: './dist/styles' },
43
+ { src: './src/v2/styles/*', dest: './dist/v2/styles' },
43
44
  { src: './src/root.css', dest: './dist' },
44
45
  ],
45
46
  }),
@@ -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
+ }