@capillarytech/blaze-ui 6.1.5 → 6.1.6-beta.3

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 (102) hide show
  1. package/CapEmojiPicker/Picker/index.d.ts +6 -0
  2. package/CapEmojiPicker/Picker/index.d.ts.map +1 -0
  3. package/CapEmojiPicker/Picker/index.js +114 -0
  4. package/CapEmojiPicker/Picker/messages.d.ts +21 -0
  5. package/CapEmojiPicker/Picker/messages.d.ts.map +1 -0
  6. package/CapEmojiPicker/Picker/messages.js +24 -0
  7. package/CapEmojiPicker/TriggerButton/_triggerButton.scss +45 -0
  8. package/CapEmojiPicker/TriggerButton/index.d.ts +9 -0
  9. package/CapEmojiPicker/TriggerButton/index.d.ts.map +1 -0
  10. package/CapEmojiPicker/TriggerButton/index.js +35 -0
  11. package/CapEmojiPicker/Wrapper/index.d.ts +4 -0
  12. package/CapEmojiPicker/Wrapper/index.d.ts.map +1 -0
  13. package/CapEmojiPicker/Wrapper/index.js +166 -0
  14. package/CapEmojiPicker/Wrapper/messages.d.ts +13 -0
  15. package/CapEmojiPicker/Wrapper/messages.d.ts.map +1 -0
  16. package/CapEmojiPicker/Wrapper/messages.js +16 -0
  17. package/CapEmojiPicker/Wrapper/useEmojiTriggerPosition.d.ts +18 -0
  18. package/CapEmojiPicker/Wrapper/useEmojiTriggerPosition.d.ts.map +1 -0
  19. package/CapEmojiPicker/Wrapper/useEmojiTriggerPosition.js +108 -0
  20. package/CapEmojiPicker/_capEmojiPicker.css +231 -0
  21. package/CapEmojiPicker/_capEmojiPicker.scss +281 -0
  22. package/CapEmojiPicker/_config.scss +7 -0
  23. package/CapEmojiPicker/assets/sentiment-satsified.svg +3 -0
  24. package/CapEmojiPicker/assets/sentiment-satsified.svg.js +4 -0
  25. package/CapEmojiPicker/constants.d.ts +34 -0
  26. package/CapEmojiPicker/constants.d.ts.map +1 -0
  27. package/CapEmojiPicker/constants.js +18 -0
  28. package/CapEmojiPicker/index.d.ts +4 -0
  29. package/CapEmojiPicker/index.d.ts.map +1 -0
  30. package/CapEmojiPicker/index.js +11 -0
  31. package/CapEmojiPicker/utils.d.ts +20 -0
  32. package/CapEmojiPicker/utils.d.ts.map +1 -0
  33. package/CapEmojiPicker/utils.js +24 -0
  34. package/CapNavigationSPA/CapNavigationSPASidebar/index.d.ts +10 -0
  35. package/CapNavigationSPA/CapNavigationSPASidebar/index.d.ts.map +1 -0
  36. package/CapNavigationSPA/CapNavigationSPASidebar/index.js +603 -0
  37. package/CapNavigationSPA/CapNavigationSPASidebar/styles.css +350 -0
  38. package/CapNavigationSPA/CapNavigationSPASidebar/styles.module.scss.js +59 -0
  39. package/CapNavigationSPA/CapNavigationSPASidebar/styles.scss +422 -0
  40. package/CapNavigationSPA/CapNavigationSPASidebar/types.d.ts +31 -0
  41. package/CapNavigationSPA/CapNavigationSPASidebar/types.d.ts.map +1 -0
  42. package/CapNavigationSPA/CapNavigationSPASidebar/types.js +1 -0
  43. package/CapNavigationSPA/CapNavigationSPATopBar/index.d.ts +11 -0
  44. package/CapNavigationSPA/CapNavigationSPATopBar/index.d.ts.map +1 -0
  45. package/CapNavigationSPA/CapNavigationSPATopBar/index.js +95 -0
  46. package/CapNavigationSPA/CapNavigationSPATopBar/styles.css +147 -0
  47. package/CapNavigationSPA/CapNavigationSPATopBar/styles.module.scss.js +18 -0
  48. package/CapNavigationSPA/CapNavigationSPATopBar/styles.scss +173 -0
  49. package/CapNavigationSPA/CapNavigationSPATopBar/types.d.ts +24 -0
  50. package/CapNavigationSPA/CapNavigationSPATopBar/types.d.ts.map +1 -0
  51. package/CapNavigationSPA/CapNavigationSPATopBar/types.js +1 -0
  52. package/CapNavigationSPA/constants.d.ts +2 -0
  53. package/CapNavigationSPA/constants.d.ts.map +1 -0
  54. package/CapNavigationSPA/constants.js +4 -0
  55. package/CapNavigationSPA/index.d.ts +10 -0
  56. package/CapNavigationSPA/index.d.ts.map +1 -0
  57. package/CapNavigationSPA/index.js +436 -0
  58. package/CapNavigationSPA/messages.d.ts +13 -0
  59. package/CapNavigationSPA/messages.d.ts.map +1 -0
  60. package/CapNavigationSPA/messages.js +16 -0
  61. package/CapNavigationSPA/mockdata.d.ts +6 -0
  62. package/CapNavigationSPA/mockdata.d.ts.map +1 -0
  63. package/CapNavigationSPA/mockdata.js +4 -0
  64. package/CapNavigationSPA/styles.css +48 -0
  65. package/CapNavigationSPA/styles.module.scss.js +9 -0
  66. package/CapNavigationSPA/styles.scss +49 -0
  67. package/CapNavigationSPA/tests/CapNavigationSPA.mockData.d.ts +31 -0
  68. package/CapNavigationSPA/tests/CapNavigationSPA.mockData.d.ts.map +1 -0
  69. package/CapNavigationSPA/types.d.ts +39 -0
  70. package/CapNavigationSPA/types.d.ts.map +1 -0
  71. package/CapNavigationSPA/types.js +1 -0
  72. package/assets/icons/blocks.svg +9 -0
  73. package/assets/icons/closed-lock.svg +1 -0
  74. package/assets/icons/csv.svg +21 -0
  75. package/assets/icons/databricks.svg +7 -0
  76. package/assets/icons/four-join.svg +19 -0
  77. package/assets/icons/http.svg +18 -0
  78. package/assets/icons/kafka.svg +9 -0
  79. package/assets/icons/open-lock.svg +1 -0
  80. package/assets/icons/s3.svg +3 -0
  81. package/assets/icons/sftp.svg +32 -0
  82. package/assets/icons/split-json.svg +9 -0
  83. package/assets/icons/three-join.svg +17 -0
  84. package/assets/icons/two-join.svg +15 -0
  85. package/assets/icons/xml.svg +12 -0
  86. package/assets/svgIcons/Icons/AiraNav.js +23 -0
  87. package/assets/svgIcons/Icons/CreativesNav.js +22 -0
  88. package/assets/svgIcons/Icons/DataManagement.js +22 -0
  89. package/assets/svgIcons/Icons/EngageNav.js +23 -0
  90. package/assets/svgIcons/Icons/InsightsNav.js +22 -0
  91. package/assets/svgIcons/Icons/LoyaltyTag.js +22 -0
  92. package/assets/svgIcons/Icons/Members.js +22 -0
  93. package/assets/svgIcons/Icons/RewardsOutline.js +4 -6
  94. package/assets/svgIcons/Icons/SidebarCollapse.js +17 -0
  95. package/assets/svgIcons/Icons/SidebarExpand.js +22 -0
  96. package/assets/svgIcons/Icons/ThreeStars.js +36 -18
  97. package/assets/svgIcons/component.js +27 -0
  98. package/assets/svgIcons/index.js +612 -594
  99. package/index.d.ts +2 -0
  100. package/index.d.ts.map +1 -1
  101. package/index.js +195 -193
  102. package/package.json +2 -1
@@ -0,0 +1,422 @@
1
+ @import '../../styles/_variables.scss';
2
+
3
+ // BEM: Block = cap-navigation-spa-sidebar | Elements = __wrapper, __logo, __nav, __item, ... | Modifiers = --collapsed, __item--expanded, ...
4
+ // Wrapper for sidebar + L2 flyout (position relative for flyout)
5
+ .cap-navigation-spa-sidebar__wrapper {
6
+ position: relative;
7
+ display: flex;
8
+ flex-shrink: 0;
9
+ }
10
+
11
+ // Figma 646-56222: Navigation 240px, bg #FAFBFC (Neutral/1), border-right #dfe2e7, items 40px height, 20px pl, 14px text #091e42
12
+ .cap-navigation-spa-sidebar {
13
+ width: 17.143rem; // 240px
14
+ min-width: 17.143rem;
15
+ height: 100%;
16
+ background-color: $CAP_G10; // #FAFBFC – same as L2 dropdown (Figma 646-56222)
17
+ border-right: 1px solid $CAP_G07; // #dfe2e7
18
+ display: flex;
19
+ flex-direction: column;
20
+ flex-shrink: 0;
21
+ transition:
22
+ width 0.2s ease,
23
+ min-width 0.2s ease;
24
+ }
25
+
26
+ // Collapsed state: 80px width, icons only (per Figma collapsed sidebar design)
27
+ .cap-navigation-spa-sidebar--collapsed {
28
+ width: 5.714rem; // 80px
29
+ min-width: 5.714rem;
30
+ background-color: $CAP_G10; // #fafbfc
31
+ }
32
+
33
+ // Figma 583:6904 – logo left-aligned with module icons (same 20px left as nav items)
34
+ .cap-navigation-spa-sidebar__logo {
35
+ height: 5rem; // 80px – increased for clearer branding area
36
+ padding: 1rem 0.857rem 1rem 1.429rem; // 16px 12px 16px 20px – left 20px to align with nav
37
+ display: flex;
38
+ align-items: center;
39
+ gap: 0.5rem;
40
+ flex-shrink: 0;
41
+ }
42
+
43
+ .cap-navigation-spa-sidebar--collapsed .cap-navigation-spa-sidebar__logo {
44
+ padding: 1rem 0.571rem; // center logo when collapsed
45
+ justify-content: center;
46
+ }
47
+
48
+ .cap-navigation-spa-sidebar__logo-icon {
49
+ flex-shrink: 0;
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ }
54
+
55
+ .cap-navigation-spa-sidebar__logo-text {
56
+ font-family: $FONT_FAMILY;
57
+ font-size: $FONT_SIZE_L;
58
+ font-weight: $FONT_WEIGHT_MEDIUM;
59
+ color: $CAP_G01; // #091e42
60
+ }
61
+
62
+ // Scrollable nav: reserve space for scrollbar so item width stays standard (Figma 240px content) and doesn’t shrink when scroll appears
63
+ .cap-navigation-spa-sidebar__nav {
64
+ display: flex;
65
+ flex-direction: column;
66
+ flex: 1 1 auto;
67
+ min-height: 0;
68
+ min-width: 0; // allow flex shrink in column layout; width comes from sidebar
69
+ padding: 0;
70
+ overflow-y: auto;
71
+ overflow-x: hidden; // collapsed flyout renders in portal outside nav
72
+ scrollbar-gutter: stable; // reserve scrollbar space so content width doesn’t change when scroll appears
73
+ }
74
+
75
+ // Figma 597-9820: nav items 240×40px, 20px pl, 14px text #091e42; full width so overflow uses scroll, not shrink
76
+ .cap-navigation-spa-sidebar__item {
77
+ display: flex;
78
+ align-items: center;
79
+ flex-shrink: 0; // keep standard height and width; do not shrink when many items
80
+ height: 2.857rem; // 40px – Figma
81
+ padding: 0 1.429rem 0 1.429rem; // 20px – Figma
82
+ gap: 1rem; // 16px – Figma left 36px for text after 20px pl + 16px icon
83
+ width: 100%;
84
+ min-width: 0; // allow text truncation inside; row keeps full width
85
+ border: none;
86
+ background: transparent;
87
+ cursor: pointer;
88
+ font-family: $FONT_FAMILY;
89
+ font-size: $FONT_SIZE_M; // 14px
90
+ font-weight: $FONT_WEIGHT_REGULAR;
91
+ color: $CAP_G01; // #091e42 – same for all items (no blue active in Figma)
92
+ text-align: left;
93
+ transition: background-color 0.15s ease;
94
+
95
+ &:hover {
96
+ background-color: $CAP_G08; // #ebecf0
97
+ }
98
+ }
99
+
100
+ .cap-navigation-spa-sidebar--collapsed .cap-navigation-spa-sidebar__item {
101
+ padding: 0 0.571rem; // center icon when collapsed
102
+ justify-content: center;
103
+ }
104
+
105
+ .cap-navigation-spa-sidebar__item-icon {
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ width: 1rem; // 16px – Figma icon size
110
+ height: 1rem;
111
+ flex-shrink: 0;
112
+ color: $CAP_G01; // #091e42 – same as label per Figma
113
+ }
114
+
115
+ .cap-navigation-spa-sidebar__item-dot {
116
+ width: 0.25rem;
117
+ height: 0.25rem;
118
+ border-radius: 50%;
119
+ background-color: currentColor;
120
+ }
121
+
122
+ .cap-navigation-spa-sidebar__item-label {
123
+ white-space: nowrap;
124
+ overflow: hidden;
125
+ text-overflow: ellipsis;
126
+ flex: 1 1 auto;
127
+ min-width: 0;
128
+ }
129
+
130
+ // Figma: parent with children when flyout is open – bg #EBECF0 (Loyalty); Engage uses #E9F0FE
131
+ .cap-navigation-spa-sidebar__item--expanded {
132
+ background-color: $CAP_G08; // #ebecf0
133
+ }
134
+
135
+ .cap-navigation-spa-sidebar__item--expanded-loyalty,
136
+ .cap-navigation-spa-sidebar__item--expanded-engage,
137
+ .cap-navigation-spa-sidebar__item--expanded-insights,
138
+ .cap-navigation-spa-sidebar__item--expanded-members,
139
+ .cap-navigation-spa-sidebar__item--expanded-rewards,
140
+ .cap-navigation-spa-sidebar__item--expanded-audiences,
141
+ .cap-navigation-spa-sidebar__item--expanded-data-management,
142
+ .cap-navigation-spa-sidebar__item--expanded-extensions,
143
+ .cap-navigation-spa-sidebar__item--expanded-settings {
144
+ background-color: $CAP_PALE_GREY; // #E9F0FE – Figma Loyalty/Engage/Insights/Member profiles/Rewards/Audience/Data management/Extensions/Settings expanded
145
+ }
146
+
147
+ .cap-navigation-spa-sidebar__item-chevron {
148
+ flex-shrink: 0;
149
+ margin-left: auto;
150
+ color: $CAP_G01;
151
+ }
152
+
153
+ // L2 wrapper: holds horizontal divider + L2 block (image: thin line beneath header)
154
+ .cap-navigation-spa-sidebar__l2-wrapper {
155
+ display: flex;
156
+ flex-direction: column;
157
+ width: 100%;
158
+ }
159
+
160
+ // Horizontal separator between parent row and L2 items – image: 1px light grey spanning content width
161
+ .cap-navigation-spa-sidebar__l2-divider {
162
+ height: 1px;
163
+ background-color: $CAP_G07; // #DFE2E7
164
+ width: 100%;
165
+ flex-shrink: 0;
166
+ }
167
+
168
+ // L2 inline – same background as sidebar (Figma 646-56222)
169
+ .cap-navigation-spa-sidebar__l2-inline {
170
+ display: flex;
171
+ flex-direction: column;
172
+ margin-left: 2.286rem; // 32px – indent so bar aligns
173
+ padding: 0;
174
+ border-left: 2px solid $CAP_G07; // ~2px vertical bar per image (slightly darker light grey)
175
+ background-color: $CAP_G10; // #FAFBFC – same as sidebar
176
+ }
177
+
178
+ // Parent text starts at 20+16+16 = 52px; L2 content starts at 32+2 = 34px → padding-left 18px for alignment; bg same as sidebar (Figma 646-56222)
179
+ .cap-navigation-spa-sidebar__l2-inline-item {
180
+ display: flex;
181
+ align-items: center;
182
+ height: 2.857rem; // 40px
183
+ padding: 0 1.714rem 0 1.286rem; // 4px 24px right, 18px left – align "P" with "L" of Loyalty
184
+ width: 100%;
185
+ border: none;
186
+ background-color: $CAP_G10; // #FAFBFC – same as sidebar
187
+ cursor: pointer;
188
+ font-family: $FONT_FAMILY;
189
+ font-size: $FONT_SIZE_M;
190
+ font-weight: $FONT_WEIGHT_REGULAR;
191
+ color: $CAP_G01; // #091E42
192
+ text-align: left;
193
+ transition: background-color 0.15s ease;
194
+
195
+ &:hover {
196
+ background-color: $CAP_G08; // #EBECF0
197
+ }
198
+ }
199
+
200
+ .cap-navigation-spa-sidebar__l2-inline-item--selected {
201
+ background-color: #e9f0fe; // Figma – selected L2 item (Loyalty)
202
+ }
203
+
204
+ // Loyalty / Engage / Insights / Member profiles / Rewards / Audience / Data management / Extensions / Settings L2 selected – Figma: bg #EBECF0, blue left edge #2466EA
205
+ // Pull selected item 2px left so blue bar overlays container grey bar (only blue shows for selected row)
206
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-loyalty,
207
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-engage,
208
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-insights,
209
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-members,
210
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-rewards,
211
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-audiences,
212
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-data-management,
213
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-extensions,
214
+ .cap-navigation-spa-sidebar__l2-inline-item--selected-settings {
215
+ margin-left: -2px; // overlay container’s 2px grey border so blue draws on top
216
+ background-color: $CAP_G08; // #EBECF0
217
+ box-shadow: inset 2px 0 0 map-get($CAP_SECONDARY, base); // #2466EA – blue vertical bar
218
+ }
219
+
220
+ // Figma 672-86680: 16px gap above and below horizontal dividers (same as section gap)
221
+ .cap-navigation-spa-sidebar__divider {
222
+ height: 1px;
223
+ background-color: $CAP_G07; // #dfe2e7
224
+ margin: 1rem 0.857rem; // 16px top/bottom, 12px left/right
225
+ flex-shrink: 0;
226
+ }
227
+
228
+ .cap-navigation-spa-sidebar__footer {
229
+ padding: 0.571rem 0 1rem;
230
+ flex-shrink: 0;
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: 1rem; // 16px between settings row and collapse button (same in both states)
234
+ background-color: $CAP_G10; // match sidebar so scrolled nav content does not show behind sticky footer
235
+ }
236
+
237
+ // Figma collapsed: same 16px gap, tighter horizontal padding
238
+ .cap-navigation-spa-sidebar--collapsed .cap-navigation-spa-sidebar__footer {
239
+ padding: 0.571rem 0.571rem 1rem;
240
+ }
241
+
242
+ // Collapse/expand toggle – background matches navigation bar (no white block); icon #091E42 (Figma 640-46050)
243
+ .cap-navigation-spa-sidebar__collapse-btn {
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ width: 5.714rem; // 80px – same as collapsed sidebar width
248
+ height: 2.857rem; // 40px
249
+ padding: 0;
250
+ margin-top: 0;
251
+ border: none;
252
+ background-color: transparent; // same as navigation bar (Figma – no separate white block)
253
+ cursor: pointer;
254
+ color: $CAP_G01; // #091e42
255
+ border-radius: 0;
256
+ transition: background-color 0.15s ease;
257
+ flex-shrink: 0;
258
+
259
+ &:hover {
260
+ background-color: $CAP_G08; // #EBECF0 – subtle hover
261
+ }
262
+ }
263
+
264
+ // Figma 640-46050: expand/collapse icon exactly 16×16px (override CapIcon size)
265
+ .cap-navigation-spa-sidebar__collapse-btn-icon {
266
+ font-size: 16px;
267
+ }
268
+
269
+ // Wrapper for collapse button – collapsed state: centered (Figma 638-43461)
270
+ .cap-navigation-spa-sidebar__collapse-wrap {
271
+ width: 100%;
272
+ display: flex;
273
+ justify-content: center;
274
+ }
275
+
276
+ // Expanded state: row with "Collapse panel" + icon right-aligned (Figma 1184-369113)
277
+ .cap-navigation-spa-sidebar__collapse-row {
278
+ width: 100%;
279
+ height: 2.857rem; // 40px
280
+ padding: 0 1.143rem; // 16px
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: flex-end;
284
+ gap: 0.571rem; // 8px
285
+ background-color: $CAP_G10; // #FAFBFC – same as sidebar background (Figma 1175-366323)
286
+ }
287
+
288
+ .cap-navigation-spa-sidebar__collapse-panel-group {
289
+ display: flex;
290
+ align-items: center;
291
+ gap: 0.571rem; // 8px
292
+ flex-shrink: 0;
293
+
294
+ .cap-navigation-spa-sidebar__collapse-btn {
295
+ width: auto;
296
+ min-width: 2.857rem; // 40px tap target
297
+ padding: 0 0.571rem; // 8px
298
+ }
299
+ }
300
+
301
+ .cap-navigation-spa-sidebar__collapse-panel-label {
302
+ font-family: $FONT_FAMILY;
303
+ font-size: 0.857rem; // 12px – Figma Inductive/Regular
304
+ font-weight: $FONT_WEIGHT_REGULAR;
305
+ line-height: 1.333; // 16px
306
+ color: $CAP_G04; // #5E6C84 – Figma Character/Inactive
307
+ }
308
+
309
+ // Collapsed L2 flyout – wrapper so flyout is positioned to the right of the hovered item (Figma 640-45225)
310
+ .cap-navigation-spa-sidebar__item-flyout-wrap {
311
+ position: relative;
312
+ }
313
+
314
+ // Flyout container – absolute to the right of the sidebar icon; vertically centered so arrow points at parent (Figma 640-47376)
315
+ .cap-navigation-spa-sidebar__l2-flyout {
316
+ position: absolute;
317
+ left: 100%;
318
+ top: 50%;
319
+ transform: translateY(-50%);
320
+ display: flex;
321
+ align-items: center; // arrow aligns to center of flyout = center of parent row
322
+ padding-left: 4px; // small gap so arrow sits between icon and card
323
+ z-index: 10;
324
+ pointer-events: auto;
325
+ }
326
+
327
+ // Left-pointing arrow (white triangle) connecting flyout to sidebar (Figma: 7.07×7.071 rotated 135° = diamond)
328
+ .cap-navigation-spa-sidebar__l2-flyout-arrow {
329
+ width: 0;
330
+ height: 0;
331
+ border-top: 5px solid transparent;
332
+ border-bottom: 5px solid transparent;
333
+ border-right: 5px solid $CAP_WHITE;
334
+ align-self: center;
335
+ margin-left: -3px; // overlap card border so arrow touches card
336
+ filter: drop-shadow(0 0 1px rgba(9, 30, 66, 0.15));
337
+ }
338
+
339
+ // Card: white bg, rounded corners, border, shadow (Figma 640-45225)
340
+ .cap-navigation-spa-sidebar__l2-flyout-card {
341
+ background-color: $CAP_WHITE;
342
+ border: 1px solid $CAP_G07; // #DFE2E7
343
+ border-radius: 6px;
344
+ box-shadow:
345
+ 0 4px 4px rgba(9, 30, 66, 0.15),
346
+ 0 0 1px rgba(9, 30, 66, 0.15);
347
+ min-width: 200px;
348
+ overflow: hidden;
349
+ display: flex;
350
+ flex-direction: column;
351
+ }
352
+
353
+ // Parent title row (e.g. "Loyalty") – header style, border below
354
+ .cap-navigation-spa-sidebar__l2-flyout-parent {
355
+ padding: 8px 16px 10px;
356
+ font-family: $FONT_FAMILY;
357
+ font-size: $FONT_SIZE_M;
358
+ font-weight: $FONT_WEIGHT_MEDIUM;
359
+ color: $CAP_G01; // #091E42
360
+ border-bottom: 1px solid $CAP_G07; // #DFE2E7
361
+ flex-shrink: 0;
362
+ }
363
+
364
+ // L2 flyout item row – default #FAFBFC, selected #E9F0FE (Figma 640-45225)
365
+ .cap-navigation-spa-sidebar__l2-flyout-item {
366
+ display: flex;
367
+ align-items: center;
368
+ height: 2.857rem; // 40px
369
+ padding: 0 1rem; // 16px
370
+ width: 100%;
371
+ border: none;
372
+ background-color: #fafbfc; // Figma default row – variable absent
373
+ cursor: pointer;
374
+ font-family: $FONT_FAMILY;
375
+ font-size: $FONT_SIZE_M;
376
+ font-weight: $FONT_WEIGHT_REGULAR;
377
+ color: $CAP_G01; // #091E42
378
+ text-align: left;
379
+ transition: background-color 0.15s ease;
380
+
381
+ &:hover {
382
+ background-color: $CAP_G08; // #EBECF0
383
+ }
384
+ }
385
+
386
+ .cap-navigation-spa-sidebar__l2-flyout-item--selected {
387
+ background-color: $CAP_PALE_GREY; // #E9F0FE – Figma selected L2 row
388
+ }
389
+
390
+ // L1 tooltip flyout – collapsed state, modules without L2: show module name on hover (Figma 642-48287)
391
+ .cap-navigation-spa-sidebar__l1-tooltip-flyout {
392
+ position: absolute;
393
+ left: 100%;
394
+ top: 50%;
395
+ transform: translateY(-50%);
396
+ display: flex;
397
+ align-items: center;
398
+ padding-left: 4px;
399
+ z-index: 10;
400
+ pointer-events: auto;
401
+ }
402
+
403
+ .cap-navigation-spa-sidebar__l1-tooltip-card {
404
+ background-color: $CAP_WHITE;
405
+ border: 1px solid $CAP_G07; // #DFE2E7
406
+ border-radius: 6px;
407
+ box-shadow:
408
+ 0 4px 4px rgba(9, 30, 66, 0.15),
409
+ 0 0 1px rgba(9, 30, 66, 0.15);
410
+ overflow: hidden;
411
+ display: flex;
412
+ flex-direction: column;
413
+ }
414
+
415
+ .cap-navigation-spa-sidebar__l1-tooltip-label {
416
+ padding: 8px 16px 10px;
417
+ font-family: $FONT_FAMILY;
418
+ font-size: $FONT_SIZE_M;
419
+ font-weight: $FONT_WEIGHT_REGULAR;
420
+ color: $CAP_G01; // #091E42 – Figma 642-48287
421
+ white-space: nowrap;
422
+ }
@@ -0,0 +1,31 @@
1
+ import type React from 'react';
2
+ export interface CapNavigationSPASidebarItem {
3
+ key: string;
4
+ title: string;
5
+ link?: string;
6
+ target?: string;
7
+ iconType?: string;
8
+ /** Child items shown in L2 flyout (e.g. Programs, Promotions under Loyalty) */
9
+ children?: CapNavigationSPASidebarItem[];
10
+ }
11
+ export interface CapNavigationSPASidebarProps {
12
+ /** Sidebar nav items (icon + label) */
13
+ items: CapNavigationSPASidebarItem[];
14
+ /** Key of the currently selected item */
15
+ selectedKey?: string;
16
+ /** Callback when a nav item is clicked */
17
+ onItemClick?: (item: CapNavigationSPASidebarItem) => void;
18
+ /** Settings label; rendered at bottom */
19
+ settingsLabel?: string;
20
+ /** Optional logo node (e.g. Capillary logo) */
21
+ logo?: React.ReactNode;
22
+ /** Optional className */
23
+ className?: string;
24
+ /** When true, sidebar is collapsed (icons only, 80px width) */
25
+ collapsed?: boolean;
26
+ /** Callback when user clicks collapse/expand toggle at bottom */
27
+ onCollapseExpand?: () => void;
28
+ /** When false, do not set window.location on item click (e.g. for Storybook). Default true */
29
+ navigateToLink?: boolean;
30
+ }
31
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../components/CapNavigationSPA/CapNavigationSPASidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,2BAA2B,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,4BAA4B;IAC3C,uCAAuC;IACvC,KAAK,EAAE,2BAA2B,EAAE,CAAC;IACrC,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC1D,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,8FAA8F;IAC9F,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * CapNavigationSPATopBar – Top bar matching New navigation Figma 1175-368593.
3
+ * Left: org name + environment pill + chevron.
4
+ * Right: Aira icon, notification bell, help (?), divider, user avatar.
5
+ */
6
+ import React from 'react';
7
+ import type { CapNavigationSPATopBarProps } from './types';
8
+ declare const CapNavigationSPATopBar: React.FC<CapNavigationSPATopBarProps>;
9
+ export default CapNavigationSPATopBar;
10
+ export type { CapNavigationSPATopBarProps } from './types';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/CapNavigationSPA/CapNavigationSPATopBar/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAwFjE,CAAC;AAEF,eAAe,sBAAsB,CAAC;AACtC,YAAY,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,95 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import CapIcon from "../../CapIcon/index.js";
4
+ import styles from "./styles.module.scss.js";
5
+ const CapNavigationSPATopBar = ({
6
+ orgName,
7
+ environmentLabel = "Production",
8
+ onOrgEnvClick,
9
+ onAiraClick,
10
+ onNotificationClick,
11
+ showNotificationBadge = false,
12
+ onHelpClick,
13
+ onUserClick,
14
+ userDisplay,
15
+ className
16
+ }) => /* @__PURE__ */ jsx(
17
+ "header",
18
+ {
19
+ className: classNames(styles["cap-navigation-spa-topbar"], className),
20
+ "data-testid": "cap-navigation-spa-topbar",
21
+ children: /* @__PURE__ */ jsxs("div", { className: styles["cap-navigation-spa-topbar__inner"], children: [
22
+ /* @__PURE__ */ jsxs(
23
+ "button",
24
+ {
25
+ type: "button",
26
+ className: styles["cap-navigation-spa-topbar__org-button"],
27
+ onClick: onOrgEnvClick,
28
+ "aria-label": "Organization and environment",
29
+ "data-testid": "cap-navigation-spa-topbar-org",
30
+ children: [
31
+ /* @__PURE__ */ jsx("span", { className: styles["cap-navigation-spa-topbar__org-name"], children: orgName ?? "Organization" }),
32
+ /* @__PURE__ */ jsx("span", { className: styles["cap-navigation-spa-topbar__env-pill"], children: environmentLabel }),
33
+ /* @__PURE__ */ jsx("span", { className: styles["cap-navigation-spa-topbar__org-chevron"], children: /* @__PURE__ */ jsx(CapIcon, { type: "down", size: "xs" }) })
34
+ ]
35
+ }
36
+ ),
37
+ /* @__PURE__ */ jsxs("div", { className: styles["cap-navigation-spa-topbar__right"], children: [
38
+ /* @__PURE__ */ jsx(
39
+ "button",
40
+ {
41
+ type: "button",
42
+ className: styles["cap-navigation-spa-topbar__aira-btn"],
43
+ onClick: onAiraClick,
44
+ "aria-label": "Aira",
45
+ "data-testid": "cap-navigation-spa-topbar-aira",
46
+ children: /* @__PURE__ */ jsx(CapIcon, { type: "aira-nav", size: "s" })
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsxs(
50
+ "button",
51
+ {
52
+ type: "button",
53
+ className: classNames(
54
+ styles["cap-navigation-spa-topbar__icon-btn"],
55
+ showNotificationBadge && styles["cap-navigation-spa-topbar__icon-btn--has-badge"]
56
+ ),
57
+ onClick: onNotificationClick,
58
+ "aria-label": "Notifications",
59
+ "data-testid": "cap-navigation-spa-topbar-notifications",
60
+ children: [
61
+ /* @__PURE__ */ jsx(CapIcon, { type: "bell", size: "s" }),
62
+ showNotificationBadge && /* @__PURE__ */ jsx("span", { className: styles["cap-navigation-spa-topbar__notification-badge"] })
63
+ ]
64
+ }
65
+ ),
66
+ /* @__PURE__ */ jsx(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ className: styles["cap-navigation-spa-topbar__icon-btn"],
71
+ onClick: onHelpClick,
72
+ "aria-label": "Help",
73
+ "data-testid": "cap-navigation-spa-topbar-help",
74
+ children: /* @__PURE__ */ jsx(CapIcon, { type: "question-circle", size: "s" })
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsx("div", { className: styles["cap-navigation-spa-topbar__divider"] }),
78
+ userDisplay !== void 0 ? /* @__PURE__ */ jsx("div", { className: styles["cap-navigation-spa-topbar__user-wrap"], children: userDisplay }) : /* @__PURE__ */ jsx(
79
+ "button",
80
+ {
81
+ type: "button",
82
+ className: styles["cap-navigation-spa-topbar__user-btn"],
83
+ onClick: onUserClick,
84
+ "aria-label": "User menu",
85
+ "data-testid": "cap-navigation-spa-topbar-user",
86
+ children: /* @__PURE__ */ jsx(CapIcon, { type: "user", size: "s" })
87
+ }
88
+ )
89
+ ] })
90
+ ] })
91
+ }
92
+ );
93
+ export {
94
+ CapNavigationSPATopBar as default
95
+ };