@kaizen/components 0.0.0-canary-02-18-UUXP-55-20251218012602 → 0.0.0-canary-01-new-bp-20251222095813
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/cjs/src/TitleBlock/TitleBlock.cjs +0 -6
- package/dist/cjs/src/TitleBlock/TitleBlock.module.scss.cjs +1 -2
- package/dist/esm/src/TitleBlock/TitleBlock.mjs +0 -6
- package/dist/esm/src/TitleBlock/TitleBlock.module.scss.mjs +1 -2
- package/dist/styles.css +40 -19
- package/package.json +1 -1
- package/src/TitleBlock/TitleBlock.module.scss +32 -16
- package/src/TitleBlock/TitleBlock.tsx +0 -3
- package/src/TitleBlock/_docs/TitleBlock.stories.tsx +75 -144
- package/src/TitleBlock/_mixins.scss +10 -0
|
@@ -116,12 +116,6 @@ var Breadcrumb = function (_a) {
|
|
|
116
116
|
name: "arrow_back",
|
|
117
117
|
isPresentational: true,
|
|
118
118
|
shouldMirrorInRTL: true
|
|
119
|
-
})), React__default.default.createElement("div", {
|
|
120
|
-
className: TitleBlock_module.staticIcon
|
|
121
|
-
}, React__default.default.createElement(Icon.Icon, {
|
|
122
|
-
name: "arrow_back",
|
|
123
|
-
isPresentational: true,
|
|
124
|
-
shouldMirrorInRTL: true
|
|
125
119
|
})), React__default.default.createElement("span", {
|
|
126
120
|
className: TitleBlock_module.breadcrumbTextLink,
|
|
127
121
|
"data-automation-id": textAutomationId,
|
|
@@ -53,7 +53,6 @@ var styles = {
|
|
|
53
53
|
"slide-fade": "TitleBlock-module_slide-fade__o5TnP",
|
|
54
54
|
"reverse-slide-fade": "TitleBlock-module_reverse-slide-fade__LZZ98",
|
|
55
55
|
"breadcrumbText": "TitleBlock-module_breadcrumbText__vDi0k",
|
|
56
|
-
"circle": "TitleBlock-module_circle__68z-T"
|
|
57
|
-
"staticIcon": "TitleBlock-module_staticIcon__5jeBS"
|
|
56
|
+
"circle": "TitleBlock-module_circle__68z-T"
|
|
58
57
|
};
|
|
59
58
|
module.exports = styles;
|
|
@@ -107,12 +107,6 @@ var Breadcrumb = function (_a) {
|
|
|
107
107
|
name: "arrow_back",
|
|
108
108
|
isPresentational: true,
|
|
109
109
|
shouldMirrorInRTL: true
|
|
110
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
className: styles.staticIcon
|
|
112
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
113
|
-
name: "arrow_back",
|
|
114
|
-
isPresentational: true,
|
|
115
|
-
shouldMirrorInRTL: true
|
|
116
110
|
})), /*#__PURE__*/React.createElement("span", {
|
|
117
111
|
className: styles.breadcrumbTextLink,
|
|
118
112
|
"data-automation-id": textAutomationId,
|
|
@@ -51,7 +51,6 @@ var styles = {
|
|
|
51
51
|
"slide-fade": "TitleBlock-module_slide-fade__o5TnP",
|
|
52
52
|
"reverse-slide-fade": "TitleBlock-module_reverse-slide-fade__LZZ98",
|
|
53
53
|
"breadcrumbText": "TitleBlock-module_breadcrumbText__vDi0k",
|
|
54
|
-
"circle": "TitleBlock-module_circle__68z-T"
|
|
55
|
-
"staticIcon": "TitleBlock-module_staticIcon__5jeBS"
|
|
54
|
+
"circle": "TitleBlock-module_circle__68z-T"
|
|
56
55
|
};
|
|
57
56
|
export { styles as default };
|
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);
|
|
@@ -10270,10 +10284,9 @@
|
|
|
10270
10284
|
margin-inline-end: var(--spacing-xs, 0.375rem);
|
|
10271
10285
|
margin-inline-start: 0;
|
|
10272
10286
|
}
|
|
10273
|
-
@
|
|
10287
|
+
@container (max-width: calc(1080px - 1px)) {
|
|
10274
10288
|
.TitleBlock-module_hamburger__qe4R0 {
|
|
10275
10289
|
display: flex;
|
|
10276
|
-
align-items: center;
|
|
10277
10290
|
}
|
|
10278
10291
|
}
|
|
10279
10292
|
.TitleBlock-module_subtitle__AI9tj {
|
|
@@ -10373,9 +10386,14 @@
|
|
|
10373
10386
|
.TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w {
|
|
10374
10387
|
display: flex;
|
|
10375
10388
|
width: 100%;
|
|
10376
|
-
margin-top: -0.
|
|
10389
|
+
margin-top: -0.063rem;
|
|
10377
10390
|
justify-content: space-between;
|
|
10378
10391
|
}
|
|
10392
|
+
@container (max-width: calc(768px - 1px)) {
|
|
10393
|
+
.TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w {
|
|
10394
|
+
height: 3.75rem;
|
|
10395
|
+
}
|
|
10396
|
+
}
|
|
10379
10397
|
.TitleBlock-module_titleAndAdjacent__Q7W-m {
|
|
10380
10398
|
display: flex;
|
|
10381
10399
|
min-width: 0;
|
|
@@ -10429,6 +10447,8 @@
|
|
|
10429
10447
|
}
|
|
10430
10448
|
@container (max-width: calc(768px - 1px)) {
|
|
10431
10449
|
.TitleBlock-module_hasNavigationTabs__v09jL .TitleBlock-module_navigationTabScrollerContainer__o234q {
|
|
10450
|
+
margin-top: 0.063rem;
|
|
10451
|
+
height: 3.75rem;
|
|
10432
10452
|
display: block;
|
|
10433
10453
|
overflow-x: scroll;
|
|
10434
10454
|
scrollbar-width: none;
|
|
@@ -10456,7 +10476,7 @@
|
|
|
10456
10476
|
.TitleBlock-module_navigationTabEdgeShadowRight__xkIWc, .TitleBlock-module_navigationTabEdgeShadowLeft__9pGhR {
|
|
10457
10477
|
display: block;
|
|
10458
10478
|
position: absolute;
|
|
10459
|
-
top: 3.
|
|
10479
|
+
top: 3.687rem;
|
|
10460
10480
|
width: 3.75rem;
|
|
10461
10481
|
height: 3.75rem;
|
|
10462
10482
|
background: linear-gradient(0deg, var(--color-purple-600, #5f3361), rgba(var(--color-purple-600-rgb, 95, 51, 97), 0));
|
|
@@ -10557,6 +10577,18 @@
|
|
|
10557
10577
|
border-style: var(--border-focus-ring-border-style, solid);
|
|
10558
10578
|
inset: calc(-2 * var(--border-focus-ring-border-width, 2px) - var(--border-focus-ring-border-width, 2px));
|
|
10559
10579
|
}
|
|
10580
|
+
@container (max-width: calc(1080px - 1px)) {
|
|
10581
|
+
.TitleBlock-module_breadcrumb__lVNKz {
|
|
10582
|
+
display: none;
|
|
10583
|
+
}
|
|
10584
|
+
}
|
|
10585
|
+
@media (min-width: 1080px) {
|
|
10586
|
+
@container (max-width: 704px) {
|
|
10587
|
+
.TitleBlock-module_breadcrumb__lVNKz {
|
|
10588
|
+
display: none;
|
|
10589
|
+
}
|
|
10590
|
+
}
|
|
10591
|
+
}
|
|
10560
10592
|
@media only screen {
|
|
10561
10593
|
@container (max-width: 1644px) {
|
|
10562
10594
|
.TitleBlock-module_breadcrumb__lVNKz {
|
|
@@ -10661,19 +10693,8 @@
|
|
|
10661
10693
|
color: var(--color-blue-500, #0168b3);
|
|
10662
10694
|
background-color: rgba(var(--color-blue-500-rgb, 1, 104, 179), 0.1);
|
|
10663
10695
|
}
|
|
10664
|
-
@media (max-width: 1079px) {
|
|
10665
|
-
.TitleBlock-module_circle__68z-T {
|
|
10666
|
-
display: none;
|
|
10667
|
-
}
|
|
10668
|
-
}
|
|
10669
10696
|
/* stylelint-enable no-descending-specificity */
|
|
10670
10697
|
}
|
|
10671
|
-
.TitleBlock-module_staticIcon__5jeBS {
|
|
10672
|
-
display: none;
|
|
10673
|
-
width: 20px;
|
|
10674
|
-
height: 20px;
|
|
10675
|
-
}
|
|
10676
|
-
|
|
10677
10698
|
@keyframes TitleBlock-module_slide-fade__o5TnP {
|
|
10678
10699
|
0% {
|
|
10679
10700
|
display: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-01-new-bp-20251222095813",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -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 {
|
|
@@ -249,9 +262,8 @@
|
|
|
249
262
|
|
|
250
263
|
@include ca-margin($end: $spacing-xs);
|
|
251
264
|
|
|
252
|
-
@
|
|
265
|
+
@include title-block-medium-and-small {
|
|
253
266
|
display: flex;
|
|
254
|
-
align-items: center;
|
|
255
267
|
}
|
|
256
268
|
}
|
|
257
269
|
|
|
@@ -361,6 +373,10 @@
|
|
|
361
373
|
width: 100%;
|
|
362
374
|
margin-top: -$title-block-separator-height;
|
|
363
375
|
justify-content: space-between;
|
|
376
|
+
|
|
377
|
+
@include title-block-small {
|
|
378
|
+
height: $tab-container-height-small;
|
|
379
|
+
}
|
|
364
380
|
}
|
|
365
381
|
|
|
366
382
|
.titleAndAdjacent {
|
|
@@ -426,6 +442,8 @@
|
|
|
426
442
|
.navigationTabScrollerContainer {
|
|
427
443
|
.hasNavigationTabs & {
|
|
428
444
|
@include title-block-small {
|
|
445
|
+
margin-top: $title-block-separator-height;
|
|
446
|
+
height: $tab-container-height-small;
|
|
429
447
|
display: block;
|
|
430
448
|
overflow-x: scroll;
|
|
431
449
|
scrollbar-width: none;
|
|
@@ -580,6 +598,14 @@
|
|
|
580
598
|
}
|
|
581
599
|
}
|
|
582
600
|
|
|
601
|
+
@include title-block-medium-and-small {
|
|
602
|
+
display: none;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
@include title-block-media-above-1080-container-under-720 {
|
|
606
|
+
display: none;
|
|
607
|
+
}
|
|
608
|
+
|
|
583
609
|
@media only screen {
|
|
584
610
|
@container (max-width: #{$breadcrumb-breakpoint-width}) {
|
|
585
611
|
position: relative;
|
|
@@ -711,20 +737,10 @@
|
|
|
711
737
|
color: $color-blue-500;
|
|
712
738
|
background-color: rgba($color-blue-500-rgb, 0.1);
|
|
713
739
|
}
|
|
714
|
-
|
|
715
|
-
@media (max-width: 1079px) {
|
|
716
|
-
display: none;
|
|
717
|
-
}
|
|
718
740
|
}
|
|
719
741
|
/* stylelint-enable no-descending-specificity */
|
|
720
742
|
}
|
|
721
743
|
|
|
722
|
-
.staticIcon {
|
|
723
|
-
display: none;
|
|
724
|
-
width: 20px;
|
|
725
|
-
height: 20px;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
744
|
@keyframes slide-fade {
|
|
729
745
|
0% {
|
|
730
746
|
display: none;
|
|
@@ -155,9 +155,6 @@ const Breadcrumb = ({
|
|
|
155
155
|
<div className={styles.circle}>
|
|
156
156
|
<Icon name="arrow_back" isPresentational shouldMirrorInRTL />
|
|
157
157
|
</div>
|
|
158
|
-
<div className={styles.staticIcon}>
|
|
159
|
-
<Icon name="arrow_back" isPresentational shouldMirrorInRTL />
|
|
160
|
-
</div>
|
|
161
158
|
<span
|
|
162
159
|
className={styles.breadcrumbTextLink}
|
|
163
160
|
data-automation-id={textAutomationId}
|
|
@@ -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,81 +136,41 @@ export const Playground: Story = {
|
|
|
94
136
|
|
|
95
137
|
export const Viewports: Story = {
|
|
96
138
|
parameters: {
|
|
97
|
-
viewport:
|
|
98
|
-
|
|
99
|
-
default: {
|
|
100
|
-
name: 'Above or equal to 1366',
|
|
101
|
-
styles: { width: '1366px', height: '800px' },
|
|
102
|
-
type: 'desktop',
|
|
103
|
-
},
|
|
104
|
-
under1366: {
|
|
105
|
-
name: 'Under 1366',
|
|
106
|
-
styles: { width: '1365px', height: '800px' },
|
|
107
|
-
type: 'desktop',
|
|
108
|
-
},
|
|
109
|
-
mediumSmall: {
|
|
110
|
-
name: 'Medium and small',
|
|
111
|
-
styles: { width: '1079px', height: '800px' },
|
|
112
|
-
type: 'desktop',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
// defaultViewport: 'default',
|
|
116
|
-
},
|
|
117
|
-
chromatic: {
|
|
118
|
-
disable: false,
|
|
119
|
-
viewports: [1079, 1365, 1366, 760, 360],
|
|
120
|
-
},
|
|
139
|
+
viewport: viewports,
|
|
140
|
+
chromatic: chromaticViewports,
|
|
121
141
|
},
|
|
122
142
|
}
|
|
123
|
-
|
|
124
|
-
export const WithNoSecondaryOverflow: Story = {
|
|
143
|
+
export const WithTabNavigation: Story = {
|
|
125
144
|
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, 760, 360],
|
|
144
|
-
},
|
|
145
|
+
viewport: viewports,
|
|
146
|
+
chromatic: chromaticViewports,
|
|
145
147
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
+
})
|
|
149
167
|
},
|
|
150
168
|
}
|
|
169
|
+
|
|
151
170
|
export const HasLongTitle: Story = {
|
|
152
171
|
parameters: {
|
|
153
|
-
viewport:
|
|
154
|
-
|
|
155
|
-
default: {
|
|
156
|
-
name: 'Above or equal to 1366',
|
|
157
|
-
styles: { width: '1366px', height: '800px' },
|
|
158
|
-
type: 'desktop',
|
|
159
|
-
},
|
|
160
|
-
under1366: {
|
|
161
|
-
name: 'Under 1366',
|
|
162
|
-
styles: { width: '1365px', height: '800px' },
|
|
163
|
-
type: 'desktop',
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
// defaultViewport: 'default',
|
|
167
|
-
},
|
|
168
|
-
chromatic: {
|
|
169
|
-
disable: false,
|
|
170
|
-
viewports: [1365, 1366, 760, 360],
|
|
171
|
-
},
|
|
172
|
+
viewport: viewports,
|
|
173
|
+
chromatic: chromaticViewports,
|
|
172
174
|
},
|
|
173
175
|
args: { title: 'A long title with over thirty characters' },
|
|
174
176
|
}
|
|
@@ -180,45 +182,8 @@ export const LightVariant: Story = {
|
|
|
180
182
|
sourceState: 'shown',
|
|
181
183
|
},
|
|
182
184
|
},
|
|
183
|
-
viewport:
|
|
184
|
-
|
|
185
|
-
default: {
|
|
186
|
-
name: 'desktop (above or equal to 1366)',
|
|
187
|
-
styles: { width: '1366px', height: '800px' },
|
|
188
|
-
type: 'desktop',
|
|
189
|
-
},
|
|
190
|
-
desktopSm: {
|
|
191
|
-
name: 'desktop-sm (1024 - 1365)',
|
|
192
|
-
styles: { width: '1365px', height: '800px' },
|
|
193
|
-
type: 'desktop',
|
|
194
|
-
},
|
|
195
|
-
tablet: {
|
|
196
|
-
name: 'tablet (672 - 1023)',
|
|
197
|
-
styles: { width: '1023px', height: '800px' },
|
|
198
|
-
type: 'desktop',
|
|
199
|
-
},
|
|
200
|
-
mobileResponsive: {
|
|
201
|
-
name: 'mobile-responsive (512 - 671)',
|
|
202
|
-
styles: { width: '671px', height: '800px' },
|
|
203
|
-
type: 'desktop',
|
|
204
|
-
},
|
|
205
|
-
mobile: {
|
|
206
|
-
name: 'mobile (361 - 512)',
|
|
207
|
-
styles: { width: '511px', height: '800px' },
|
|
208
|
-
type: 'desktop',
|
|
209
|
-
},
|
|
210
|
-
mobileXs: {
|
|
211
|
-
name: 'mobile (under 360)',
|
|
212
|
-
styles: { width: '360px', height: '800px' },
|
|
213
|
-
type: 'desktop',
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
// defaultViewport: 'default',
|
|
217
|
-
},
|
|
218
|
-
chromatic: {
|
|
219
|
-
disable: false,
|
|
220
|
-
viewports: [1365, 1366, 760, 360],
|
|
221
|
-
},
|
|
185
|
+
viewport: viewports,
|
|
186
|
+
chromatic: chromaticViewports,
|
|
222
187
|
},
|
|
223
188
|
args: {
|
|
224
189
|
variant: 'light',
|
|
@@ -236,25 +201,8 @@ export const LightVariant: Story = {
|
|
|
236
201
|
|
|
237
202
|
export const AdminVariant: Story = {
|
|
238
203
|
parameters: {
|
|
239
|
-
viewport:
|
|
240
|
-
|
|
241
|
-
default: {
|
|
242
|
-
name: 'Above or equal to 1366',
|
|
243
|
-
styles: { width: '1366px', height: '800px' },
|
|
244
|
-
type: 'desktop',
|
|
245
|
-
},
|
|
246
|
-
under1366: {
|
|
247
|
-
name: 'Under 1366',
|
|
248
|
-
styles: { width: '1365px', height: '800px' },
|
|
249
|
-
type: 'desktop',
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
// defaultViewport: 'default',
|
|
253
|
-
},
|
|
254
|
-
chromatic: {
|
|
255
|
-
disable: false,
|
|
256
|
-
viewports: [1365, 1366],
|
|
257
|
-
},
|
|
204
|
+
viewport: viewports,
|
|
205
|
+
chromatic: chromaticViewports,
|
|
258
206
|
},
|
|
259
207
|
args: {
|
|
260
208
|
variant: 'admin',
|
|
@@ -271,25 +219,8 @@ export const AdminVariant: Story = {
|
|
|
271
219
|
|
|
272
220
|
export const EducationVariant: Story = {
|
|
273
221
|
parameters: {
|
|
274
|
-
viewport:
|
|
275
|
-
|
|
276
|
-
default: {
|
|
277
|
-
name: 'Above or equal to 1366',
|
|
278
|
-
styles: { width: '1366px', height: '800px' },
|
|
279
|
-
type: 'desktop',
|
|
280
|
-
},
|
|
281
|
-
under1366: {
|
|
282
|
-
name: 'Under 1366',
|
|
283
|
-
styles: { width: '1365px', height: '800px' },
|
|
284
|
-
type: 'desktop',
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
// defaultViewport: 'default',
|
|
288
|
-
},
|
|
289
|
-
chromatic: {
|
|
290
|
-
disable: false,
|
|
291
|
-
viewports: [1365, 1366],
|
|
292
|
-
},
|
|
222
|
+
viewport: viewports,
|
|
223
|
+
chromatic: chromaticViewports,
|
|
293
224
|
},
|
|
294
225
|
args: {
|
|
295
226
|
variant: 'education',
|
|
@@ -41,3 +41,13 @@
|
|
|
41
41
|
@content;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
// This emulates a scenario in which the the appchrome is in use and the CP is open
|
|
46
|
+
@mixin title-block-media-above-1080-container-under-720 {
|
|
47
|
+
@media (min-width: 1080px) {
|
|
48
|
+
// diff of 15px undexplained in the container that wraps main/body
|
|
49
|
+
@container (max-width: 704px) {
|
|
50
|
+
@content;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|