@kaizen/components 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css
CHANGED
|
@@ -10093,19 +10093,28 @@
|
|
|
10093
10093
|
display: none;
|
|
10094
10094
|
}
|
|
10095
10095
|
}
|
|
10096
|
-
.TitleBlock-module_titleRow__Ifqiu
|
|
10096
|
+
.TitleBlock-module_titleRow__Ifqiu {
|
|
10097
|
+
display: flex;
|
|
10098
|
+
width: 100%;
|
|
10099
|
+
justify-content: center;
|
|
10100
|
+
}
|
|
10097
10101
|
.TitleBlock-module_rowBelowSeparator__H4E63 {
|
|
10098
10102
|
display: flex;
|
|
10099
10103
|
width: 100%;
|
|
10100
10104
|
justify-content: center;
|
|
10101
10105
|
}
|
|
10106
|
+
@container (max-width: calc(768px - 1px)) {
|
|
10107
|
+
.TitleBlock-module_rowBelowSeparator__H4E63 {
|
|
10108
|
+
height: 3.75rem;
|
|
10109
|
+
}
|
|
10110
|
+
}
|
|
10102
10111
|
.TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_titleRow__Ifqiu {
|
|
10103
10112
|
background-color: var(--color-white, #ffffff);
|
|
10104
|
-
margin-bottom:
|
|
10113
|
+
margin-bottom: 0.063rem;
|
|
10105
10114
|
}
|
|
10106
10115
|
.TitleBlock-module_adminVariant__s95nS .TitleBlock-module_titleRow__Ifqiu {
|
|
10107
10116
|
background-color: var(--color-white, #ffffff);
|
|
10108
|
-
margin-bottom:
|
|
10117
|
+
margin-bottom: 0.063rem;
|
|
10109
10118
|
}
|
|
10110
10119
|
.TitleBlock-module_rowBelowSeparatorInner__3gNec, .TitleBlock-module_titleRowInner__SlArS {
|
|
10111
10120
|
max-width: 1392px;
|
|
@@ -10128,6 +10137,11 @@
|
|
|
10128
10137
|
padding-bottom: 12px;
|
|
10129
10138
|
}
|
|
10130
10139
|
}
|
|
10140
|
+
@container (max-width: calc(768px - 1px)) {
|
|
10141
|
+
.TitleBlock-module_rowBelowSeparatorInner__3gNec {
|
|
10142
|
+
height: 3.75rem;
|
|
10143
|
+
}
|
|
10144
|
+
}
|
|
10131
10145
|
.TitleBlock-module_titleRowInnerContent__NhTHV {
|
|
10132
10146
|
position: relative;
|
|
10133
10147
|
display: flex;
|
|
@@ -10135,7 +10149,7 @@
|
|
|
10135
10149
|
align-items: center;
|
|
10136
10150
|
min-height: 5.25rem;
|
|
10137
10151
|
justify-content: space-between;
|
|
10138
|
-
border-bottom: 0.
|
|
10152
|
+
border-bottom: 0.063rem solid rgba(var(--color-white-rgb, 255, 255, 255), 0.1);
|
|
10139
10153
|
}
|
|
10140
10154
|
.TitleBlock-module_educationVariant__YvpWa .TitleBlock-module_titleRowInnerContent__NhTHV {
|
|
10141
10155
|
border-bottom-color: rgba(var(--color-purple-700-rgb, 74, 35, 77), 0.2);
|
|
@@ -10372,9 +10386,14 @@
|
|
|
10372
10386
|
.TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w {
|
|
10373
10387
|
display: flex;
|
|
10374
10388
|
width: 100%;
|
|
10375
|
-
margin-top: -0.
|
|
10389
|
+
margin-top: -0.063rem;
|
|
10376
10390
|
justify-content: space-between;
|
|
10377
10391
|
}
|
|
10392
|
+
@container (max-width: calc(768px - 1px)) {
|
|
10393
|
+
.TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w {
|
|
10394
|
+
height: 3.75rem;
|
|
10395
|
+
}
|
|
10396
|
+
}
|
|
10378
10397
|
.TitleBlock-module_titleAndAdjacent__Q7W-m {
|
|
10379
10398
|
display: flex;
|
|
10380
10399
|
min-width: 0;
|
|
@@ -10428,6 +10447,8 @@
|
|
|
10428
10447
|
}
|
|
10429
10448
|
@container (max-width: calc(768px - 1px)) {
|
|
10430
10449
|
.TitleBlock-module_hasNavigationTabs__v09jL .TitleBlock-module_navigationTabScrollerContainer__o234q {
|
|
10450
|
+
margin-top: 0.063rem;
|
|
10451
|
+
height: 3.75rem;
|
|
10431
10452
|
display: block;
|
|
10432
10453
|
overflow-x: scroll;
|
|
10433
10454
|
scrollbar-width: none;
|
|
@@ -10455,7 +10476,7 @@
|
|
|
10455
10476
|
.TitleBlock-module_navigationTabEdgeShadowRight__xkIWc, .TitleBlock-module_navigationTabEdgeShadowLeft__9pGhR {
|
|
10456
10477
|
display: block;
|
|
10457
10478
|
position: absolute;
|
|
10458
|
-
top: 3.
|
|
10479
|
+
top: 3.687rem;
|
|
10459
10480
|
width: 3.75rem;
|
|
10460
10481
|
height: 3.75rem;
|
|
10461
10482
|
background: linear-gradient(0deg, var(--color-purple-600, #5f3361), rgba(var(--color-purple-600-rgb, 95, 51, 97), 0));
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
$breadcrumb-circle-width: 48px;
|
|
15
15
|
$breadcrumb-breakpoint-width: $layout-content-max-width + $layout-content-side-margin * 2 +
|
|
16
16
|
$breadcrumb-circle-width * 2.25;
|
|
17
|
-
$title-block-separator-height: 0.
|
|
17
|
+
$title-block-separator-height: 0.063rem;
|
|
18
18
|
$tab-container-height-default: $ca-grid * 3;
|
|
19
19
|
$tab-container-height-small: $ca-grid * 2.5;
|
|
20
20
|
$tab-container-height-default-collapsed: 0;
|
|
@@ -48,21 +48,30 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.titleRow
|
|
51
|
+
.titleRow {
|
|
52
|
+
display: flex;
|
|
53
|
+
width: 100%;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
.rowBelowSeparator {
|
|
53
58
|
display: flex;
|
|
54
59
|
width: 100%;
|
|
55
60
|
justify-content: center;
|
|
61
|
+
|
|
62
|
+
@include title-block-small {
|
|
63
|
+
height: $tab-container-height-small;
|
|
64
|
+
}
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
.lightVariant .titleRow {
|
|
59
68
|
background-color: $color-white;
|
|
60
|
-
margin-bottom:
|
|
69
|
+
margin-bottom: $title-block-separator-height;
|
|
61
70
|
}
|
|
62
71
|
|
|
63
72
|
.adminVariant .titleRow {
|
|
64
73
|
background-color: $color-white;
|
|
65
|
-
margin-bottom:
|
|
74
|
+
margin-bottom: $title-block-separator-height;
|
|
66
75
|
}
|
|
67
76
|
|
|
68
77
|
%titleBlockInner {
|
|
@@ -92,6 +101,10 @@
|
|
|
92
101
|
|
|
93
102
|
.rowBelowSeparatorInner {
|
|
94
103
|
@extend %titleBlockInner;
|
|
104
|
+
|
|
105
|
+
@include title-block-small {
|
|
106
|
+
height: $tab-container-height-small;
|
|
107
|
+
}
|
|
95
108
|
}
|
|
96
109
|
|
|
97
110
|
.titleRowInnerContent {
|
|
@@ -360,6 +373,10 @@
|
|
|
360
373
|
width: 100%;
|
|
361
374
|
margin-top: -$title-block-separator-height;
|
|
362
375
|
justify-content: space-between;
|
|
376
|
+
|
|
377
|
+
@include title-block-small {
|
|
378
|
+
height: $tab-container-height-small;
|
|
379
|
+
}
|
|
363
380
|
}
|
|
364
381
|
|
|
365
382
|
.titleAndAdjacent {
|
|
@@ -425,6 +442,8 @@
|
|
|
425
442
|
.navigationTabScrollerContainer {
|
|
426
443
|
.hasNavigationTabs & {
|
|
427
444
|
@include title-block-small {
|
|
445
|
+
margin-top: $title-block-separator-height;
|
|
446
|
+
height: $tab-container-height-small;
|
|
428
447
|
display: block;
|
|
429
448
|
overflow-x: scroll;
|
|
430
449
|
scrollbar-width: none;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { type Meta, type StoryObj } from '@storybook/react'
|
|
3
|
+
import { expect, waitFor, within } from '@storybook/test'
|
|
3
4
|
import { Icon } from '~components/Icon'
|
|
4
5
|
import { assetUrl } from '~components/utils/hostedAssets'
|
|
5
6
|
import { StickerSheet } from '~storybook/components/StickerSheet'
|
|
@@ -26,6 +27,47 @@ const SECONDARY_ACTIONS = [
|
|
|
26
27
|
},
|
|
27
28
|
]
|
|
28
29
|
|
|
30
|
+
const viewports = {
|
|
31
|
+
viewports: {
|
|
32
|
+
default: {
|
|
33
|
+
name: 'desktop (above or equal to 1366)',
|
|
34
|
+
styles: { width: '1366px', height: '800px' },
|
|
35
|
+
type: 'desktop',
|
|
36
|
+
},
|
|
37
|
+
desktopSm: {
|
|
38
|
+
name: 'desktop-sm (1024 - 1365)',
|
|
39
|
+
styles: { width: '1365px', height: '800px' },
|
|
40
|
+
type: 'desktop',
|
|
41
|
+
},
|
|
42
|
+
tablet: {
|
|
43
|
+
name: 'tablet (672 - 1023)',
|
|
44
|
+
styles: { width: '1023px', height: '800px' },
|
|
45
|
+
type: 'desktop',
|
|
46
|
+
},
|
|
47
|
+
mobileResponsive: {
|
|
48
|
+
name: 'mobile-responsive (512 - 671)',
|
|
49
|
+
styles: { width: '671px', height: '800px' },
|
|
50
|
+
type: 'desktop',
|
|
51
|
+
},
|
|
52
|
+
mobile: {
|
|
53
|
+
name: 'mobile (361 - 512)',
|
|
54
|
+
styles: { width: '511px', height: '800px' },
|
|
55
|
+
type: 'desktop',
|
|
56
|
+
},
|
|
57
|
+
mobileXs: {
|
|
58
|
+
name: 'mobile (under 360)',
|
|
59
|
+
styles: { width: '360px', height: '800px' },
|
|
60
|
+
type: 'desktop',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
defaultViewport: 'default',
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const chromaticViewports = {
|
|
67
|
+
disable: false,
|
|
68
|
+
viewports: [1366, 1365, 1079, 360, 320],
|
|
69
|
+
}
|
|
70
|
+
|
|
29
71
|
const meta = {
|
|
30
72
|
title: 'Components/TitleBlock',
|
|
31
73
|
component: TitleBlock,
|
|
@@ -94,54 +136,41 @@ export const Playground: Story = {
|
|
|
94
136
|
|
|
95
137
|
export const Viewports: Story = {
|
|
96
138
|
parameters: {
|
|
97
|
-
viewport:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
viewport: viewports,
|
|
140
|
+
chromatic: chromaticViewports,
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
export const WithTabNavigation: Story = {
|
|
144
|
+
parameters: {
|
|
145
|
+
viewport: viewports,
|
|
146
|
+
chromatic: chromaticViewports,
|
|
147
|
+
},
|
|
148
|
+
play: async ({ canvasElement, step }) => {
|
|
149
|
+
const canvas = within(canvasElement.parentElement!)
|
|
150
|
+
|
|
151
|
+
const TabNavigation = await canvas.findByRole('navigation', {
|
|
152
|
+
name: 'Page title',
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
await step('Navigation Tab is present', async () => {
|
|
156
|
+
await waitFor(() => expect(TabNavigation).toBeInTheDocument())
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
await step('Navigation is focusable', async () => {
|
|
160
|
+
const NavigationList = canvas.getByRole('list')
|
|
161
|
+
const listItems = within(NavigationList).getAllByRole('listitem')
|
|
162
|
+
|
|
163
|
+
const thirdNavigationLink = within(listItems[2]).getByRole('link')
|
|
164
|
+
thirdNavigationLink.focus()
|
|
165
|
+
expect(thirdNavigationLink).toHaveFocus()
|
|
166
|
+
})
|
|
121
167
|
},
|
|
122
168
|
}
|
|
123
169
|
|
|
124
170
|
export const HasLongTitle: Story = {
|
|
125
171
|
parameters: {
|
|
126
|
-
viewport:
|
|
127
|
-
|
|
128
|
-
default: {
|
|
129
|
-
name: 'Above or equal to 1366',
|
|
130
|
-
styles: { width: '1366px', height: '800px' },
|
|
131
|
-
type: 'desktop',
|
|
132
|
-
},
|
|
133
|
-
under1366: {
|
|
134
|
-
name: 'Under 1366',
|
|
135
|
-
styles: { width: '1365px', height: '800px' },
|
|
136
|
-
type: 'desktop',
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
defaultViewport: 'default',
|
|
140
|
-
},
|
|
141
|
-
chromatic: {
|
|
142
|
-
disable: false,
|
|
143
|
-
viewports: [1365, 1366],
|
|
144
|
-
},
|
|
172
|
+
viewport: viewports,
|
|
173
|
+
chromatic: chromaticViewports,
|
|
145
174
|
},
|
|
146
175
|
args: { title: 'A long title with over thirty characters' },
|
|
147
176
|
}
|
|
@@ -153,45 +182,8 @@ export const LightVariant: Story = {
|
|
|
153
182
|
sourceState: 'shown',
|
|
154
183
|
},
|
|
155
184
|
},
|
|
156
|
-
viewport:
|
|
157
|
-
|
|
158
|
-
default: {
|
|
159
|
-
name: 'desktop (above or equal to 1366)',
|
|
160
|
-
styles: { width: '1366px', height: '800px' },
|
|
161
|
-
type: 'desktop',
|
|
162
|
-
},
|
|
163
|
-
desktopSm: {
|
|
164
|
-
name: 'desktop-sm (1024 - 1365)',
|
|
165
|
-
styles: { width: '1365px', height: '800px' },
|
|
166
|
-
type: 'desktop',
|
|
167
|
-
},
|
|
168
|
-
tablet: {
|
|
169
|
-
name: 'tablet (672 - 1023)',
|
|
170
|
-
styles: { width: '1023px', height: '800px' },
|
|
171
|
-
type: 'desktop',
|
|
172
|
-
},
|
|
173
|
-
mobileResponsive: {
|
|
174
|
-
name: 'mobile-responsive (512 - 671)',
|
|
175
|
-
styles: { width: '671px', height: '800px' },
|
|
176
|
-
type: 'desktop',
|
|
177
|
-
},
|
|
178
|
-
mobile: {
|
|
179
|
-
name: 'mobile (361 - 512)',
|
|
180
|
-
styles: { width: '511px', height: '800px' },
|
|
181
|
-
type: 'desktop',
|
|
182
|
-
},
|
|
183
|
-
mobileXs: {
|
|
184
|
-
name: 'mobile (under 360)',
|
|
185
|
-
styles: { width: '360px', height: '800px' },
|
|
186
|
-
type: 'desktop',
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
defaultViewport: 'default',
|
|
190
|
-
},
|
|
191
|
-
chromatic: {
|
|
192
|
-
disable: false,
|
|
193
|
-
viewports: [1079, 1365, 1366, 360, 320],
|
|
194
|
-
},
|
|
185
|
+
viewport: viewports,
|
|
186
|
+
chromatic: chromaticViewports,
|
|
195
187
|
},
|
|
196
188
|
args: {
|
|
197
189
|
variant: 'light',
|
|
@@ -209,25 +201,8 @@ export const LightVariant: Story = {
|
|
|
209
201
|
|
|
210
202
|
export const AdminVariant: Story = {
|
|
211
203
|
parameters: {
|
|
212
|
-
viewport:
|
|
213
|
-
|
|
214
|
-
default: {
|
|
215
|
-
name: 'Above or equal to 1366',
|
|
216
|
-
styles: { width: '1366px', height: '800px' },
|
|
217
|
-
type: 'desktop',
|
|
218
|
-
},
|
|
219
|
-
under1366: {
|
|
220
|
-
name: 'Under 1366',
|
|
221
|
-
styles: { width: '1365px', height: '800px' },
|
|
222
|
-
type: 'desktop',
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
defaultViewport: 'default',
|
|
226
|
-
},
|
|
227
|
-
chromatic: {
|
|
228
|
-
disable: false,
|
|
229
|
-
viewports: [1365, 1366],
|
|
230
|
-
},
|
|
204
|
+
viewport: viewports,
|
|
205
|
+
chromatic: chromaticViewports,
|
|
231
206
|
},
|
|
232
207
|
args: {
|
|
233
208
|
variant: 'admin',
|
|
@@ -244,25 +219,8 @@ export const AdminVariant: Story = {
|
|
|
244
219
|
|
|
245
220
|
export const EducationVariant: Story = {
|
|
246
221
|
parameters: {
|
|
247
|
-
viewport:
|
|
248
|
-
|
|
249
|
-
default: {
|
|
250
|
-
name: 'Above or equal to 1366',
|
|
251
|
-
styles: { width: '1366px', height: '800px' },
|
|
252
|
-
type: 'desktop',
|
|
253
|
-
},
|
|
254
|
-
under1366: {
|
|
255
|
-
name: 'Under 1366',
|
|
256
|
-
styles: { width: '1365px', height: '800px' },
|
|
257
|
-
type: 'desktop',
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
defaultViewport: 'default',
|
|
261
|
-
},
|
|
262
|
-
chromatic: {
|
|
263
|
-
disable: false,
|
|
264
|
-
viewports: [1365, 1366],
|
|
265
|
-
},
|
|
222
|
+
viewport: viewports,
|
|
223
|
+
chromatic: chromaticViewports,
|
|
266
224
|
},
|
|
267
225
|
args: {
|
|
268
226
|
variant: 'education',
|