@kaizen/components 0.0.0-canary-01-13-tb-wrapping-20260113005905 → 0.0.0-canary-01-21-tb-20260121033853
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 +1 -1
- package/dist/cjs/src/TitleBlock/TitleBlock.module.scss.cjs +1 -1
- package/dist/esm/src/TitleBlock/TitleBlock.mjs +1 -1
- package/dist/esm/src/TitleBlock/TitleBlock.module.scss.mjs +1 -1
- package/dist/styles.css +45 -38
- package/package.json +1 -1
- package/src/Tabs/subcomponents/Tab/Tab.module.css +1 -1
- package/src/TitleBlock/TitleBlock.module.scss +53 -40
- package/src/TitleBlock/TitleBlock.tsx +4 -1
- package/src/TitleBlock/_docs/TitleBlock.stories.tsx +222 -4
- package/src/TitleBlock/subcomponents/MainActions.module.scss +2 -2
|
@@ -284,7 +284,7 @@ var TitleBlock = function (_a) {
|
|
|
284
284
|
sectionTitleAutomationId: sectionTitleAutomationId,
|
|
285
285
|
sectionTitleDescription: sectionTitleDescription,
|
|
286
286
|
sectionTitleDescriptionAutomationId: sectionTitleDescriptionAutomationId
|
|
287
|
-
}) : defaultRenderSectionTitle(sectionTitle, sectionTitleDescription, variant, sectionTitleAutomationId, sectionTitleDescriptionAutomationId))), renderNavigationTabs(navigationTabs, collapseNavigationArea, title), (secondaryActions !== null && secondaryActions !== void 0 ? secondaryActions : secondaryOverflowMenuItems) && React__default.default.createElement(SecondaryActions.SecondaryActions, {
|
|
287
|
+
}) : defaultRenderSectionTitle(sectionTitle, sectionTitleDescription, variant, sectionTitleAutomationId, sectionTitleDescriptionAutomationId))), !sectionTitle && !sectionTitleDescription && !renderSectionTitle && renderNavigationTabs(navigationTabs, collapseNavigationArea, title), (secondaryActions !== null && secondaryActions !== void 0 ? secondaryActions : secondaryOverflowMenuItems) && React__default.default.createElement(SecondaryActions.SecondaryActions, {
|
|
288
288
|
secondaryActions: secondaryActions,
|
|
289
289
|
secondaryOverflowMenuItems: secondaryOverflowMenuItems,
|
|
290
290
|
reversed: utils.isReversed(variant)
|
|
@@ -25,9 +25,9 @@ var styles = {
|
|
|
25
25
|
"subtitle": "TitleBlock-module_subtitle__AI9tj",
|
|
26
26
|
"subtitleText": "TitleBlock-module_subtitleText__gpXET",
|
|
27
27
|
"sectionTitleContainer": "TitleBlock-module_sectionTitleContainer__LrDPV",
|
|
28
|
+
"sectionTitle": "TitleBlock-module_sectionTitle__b8daw",
|
|
28
29
|
"sectionTitleInner": "TitleBlock-module_sectionTitleInner__nJfOP",
|
|
29
30
|
"sectionTitleOverride": "TitleBlock-module_sectionTitleOverride__XcD8g",
|
|
30
|
-
"sectionTitle": "TitleBlock-module_sectionTitle__b8daw",
|
|
31
31
|
"sectionTitleDescription": "TitleBlock-module_sectionTitleDescription__wuVwm",
|
|
32
32
|
"dark": "TitleBlock-module_dark__KJexf",
|
|
33
33
|
"rowBelowSeparatorInnerContent": "TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w",
|
|
@@ -276,7 +276,7 @@ const TitleBlock = /*#__PURE__*/function () {
|
|
|
276
276
|
sectionTitleAutomationId: sectionTitleAutomationId,
|
|
277
277
|
sectionTitleDescription: sectionTitleDescription,
|
|
278
278
|
sectionTitleDescriptionAutomationId: sectionTitleDescriptionAutomationId
|
|
279
|
-
}) : defaultRenderSectionTitle(sectionTitle, sectionTitleDescription, variant, sectionTitleAutomationId, sectionTitleDescriptionAutomationId)))), renderNavigationTabs(navigationTabs, collapseNavigationArea, title), (secondaryActions !== null && secondaryActions !== void 0 ? secondaryActions : secondaryOverflowMenuItems) && (/*#__PURE__*/React.createElement(SecondaryActions, {
|
|
279
|
+
}) : defaultRenderSectionTitle(sectionTitle, sectionTitleDescription, variant, sectionTitleAutomationId, sectionTitleDescriptionAutomationId)))), !sectionTitle && !sectionTitleDescription && !renderSectionTitle && renderNavigationTabs(navigationTabs, collapseNavigationArea, title), (secondaryActions !== null && secondaryActions !== void 0 ? secondaryActions : secondaryOverflowMenuItems) && (/*#__PURE__*/React.createElement(SecondaryActions, {
|
|
280
280
|
secondaryActions: secondaryActions,
|
|
281
281
|
secondaryOverflowMenuItems: secondaryOverflowMenuItems,
|
|
282
282
|
reversed: isReversed(variant)
|
|
@@ -23,9 +23,9 @@ var styles = {
|
|
|
23
23
|
"subtitle": "TitleBlock-module_subtitle__AI9tj",
|
|
24
24
|
"subtitleText": "TitleBlock-module_subtitleText__gpXET",
|
|
25
25
|
"sectionTitleContainer": "TitleBlock-module_sectionTitleContainer__LrDPV",
|
|
26
|
+
"sectionTitle": "TitleBlock-module_sectionTitle__b8daw",
|
|
26
27
|
"sectionTitleInner": "TitleBlock-module_sectionTitleInner__nJfOP",
|
|
27
28
|
"sectionTitleOverride": "TitleBlock-module_sectionTitleOverride__XcD8g",
|
|
28
|
-
"sectionTitle": "TitleBlock-module_sectionTitle__b8daw",
|
|
29
29
|
"sectionTitleDescription": "TitleBlock-module_sectionTitleDescription__wuVwm",
|
|
30
30
|
"dark": "TitleBlock-module_dark__KJexf",
|
|
31
31
|
"rowBelowSeparatorInnerContent": "TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w",
|
package/dist/styles.css
CHANGED
|
@@ -9240,7 +9240,7 @@
|
|
|
9240
9240
|
border-bottom: 0;
|
|
9241
9241
|
border-top-left-radius: var(--border-borderless-border-radius);
|
|
9242
9242
|
border-top-right-radius: var(--border-borderless-border-radius);
|
|
9243
|
-
background:
|
|
9243
|
+
background: transparent;
|
|
9244
9244
|
white-space: nowrap;
|
|
9245
9245
|
text-decoration: none;
|
|
9246
9246
|
padding: var(--spacing-md) var(--spacing-md);
|
|
@@ -9982,7 +9982,7 @@
|
|
|
9982
9982
|
@container (max-width: 576px) {
|
|
9983
9983
|
.MainActions-module_mainActionsContainer__pk-78 {
|
|
9984
9984
|
justify-content: flex-start;
|
|
9985
|
-
margin-
|
|
9985
|
+
margin-inline-start: 48px;
|
|
9986
9986
|
}
|
|
9987
9987
|
}
|
|
9988
9988
|
.MainActions-module_mainActionsContainer__pk-78 .MainActions-module_defaultActionButtonMinimized__XePRS {
|
|
@@ -9997,7 +9997,7 @@
|
|
|
9997
9997
|
}
|
|
9998
9998
|
.MainActions-module_mainActionsContainer__pk-78 .MainActions-module_defaultActionButtonMinimized__XePRS {
|
|
9999
9999
|
display: flex;
|
|
10000
|
-
margin-
|
|
10000
|
+
margin-inline-end: 8px;
|
|
10001
10001
|
}
|
|
10002
10002
|
}
|
|
10003
10003
|
}
|
|
@@ -10058,11 +10058,6 @@
|
|
|
10058
10058
|
width: 100%;
|
|
10059
10059
|
justify-content: center;
|
|
10060
10060
|
}
|
|
10061
|
-
@container (max-width: calc(768px - 1px)) {
|
|
10062
|
-
.TitleBlock-module_rowBelowSeparator__H4E63 {
|
|
10063
|
-
height: 3.75rem;
|
|
10064
|
-
}
|
|
10065
|
-
}
|
|
10066
10061
|
.TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_titleRow__Ifqiu {
|
|
10067
10062
|
background-color: var(--color-white, #ffffff);
|
|
10068
10063
|
margin-bottom: 0.063rem;
|
|
@@ -10090,7 +10085,7 @@
|
|
|
10090
10085
|
border-bottom: 1px solid var(--color-gray-300, #eaeaec);
|
|
10091
10086
|
}
|
|
10092
10087
|
.TitleBlock-module_rowBelowSeparatorInner__3gNec {
|
|
10093
|
-
padding: 0
|
|
10088
|
+
padding: 0 4px 0 12px;
|
|
10094
10089
|
}
|
|
10095
10090
|
@media (min-width: 1080px) {
|
|
10096
10091
|
.TitleBlock-module_rowBelowSeparatorInner__3gNec {
|
|
@@ -10098,11 +10093,6 @@
|
|
|
10098
10093
|
margin-inline: 24px;
|
|
10099
10094
|
}
|
|
10100
10095
|
}
|
|
10101
|
-
@container (max-width: calc(768px - 1px)) {
|
|
10102
|
-
.TitleBlock-module_rowBelowSeparatorInner__3gNec {
|
|
10103
|
-
height: 3.75rem;
|
|
10104
|
-
}
|
|
10105
|
-
}
|
|
10106
10096
|
.TitleBlock-module_titleRowInnerContent__NhTHV {
|
|
10107
10097
|
box-sizing: border-box;
|
|
10108
10098
|
position: relative;
|
|
@@ -10154,7 +10144,7 @@
|
|
|
10154
10144
|
}
|
|
10155
10145
|
@container (max-width: 1365px) {
|
|
10156
10146
|
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_titleAndSubtitle__-kLSn {
|
|
10157
|
-
transform: translateY(-
|
|
10147
|
+
transform: translateY(-12px);
|
|
10158
10148
|
}
|
|
10159
10149
|
}
|
|
10160
10150
|
.TitleBlock-module_titleAndSubtitleInner__TX8xw {
|
|
@@ -10201,7 +10191,10 @@
|
|
|
10201
10191
|
font-size: var(--typography-heading-3-font-size, 1.375rem);
|
|
10202
10192
|
line-height: var(--typography-heading-3-line-height, 1.875rem);
|
|
10203
10193
|
letter-spacing: var(--typography-heading-3-letter-spacing, normal);
|
|
10204
|
-
|
|
10194
|
+
margin: 8px 0;
|
|
10195
|
+
}
|
|
10196
|
+
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
|
|
10197
|
+
margin-bottom: 0;
|
|
10205
10198
|
}
|
|
10206
10199
|
@media (min-width: 1080px) and (max-width: 1095px) {
|
|
10207
10200
|
@container (min-width: 1065px) {
|
|
@@ -10209,7 +10202,10 @@
|
|
|
10209
10202
|
font-size: var(--typography-heading-2-font-size, 1.75rem);
|
|
10210
10203
|
line-height: var(--typography-heading-2-line-height, 2.25rem);
|
|
10211
10204
|
letter-spacing: var(--typography-heading-2-letter-spacing, normal);
|
|
10212
|
-
|
|
10205
|
+
margin: 2px 0;
|
|
10206
|
+
}
|
|
10207
|
+
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
|
|
10208
|
+
margin-bottom: 0;
|
|
10213
10209
|
}
|
|
10214
10210
|
}
|
|
10215
10211
|
}
|
|
@@ -10218,7 +10214,10 @@
|
|
|
10218
10214
|
font-size: var(--typography-heading-2-font-size, 1.75rem);
|
|
10219
10215
|
line-height: var(--typography-heading-2-line-height, 2.25rem);
|
|
10220
10216
|
letter-spacing: var(--typography-heading-2-letter-spacing, normal);
|
|
10221
|
-
|
|
10217
|
+
margin: 2px 0;
|
|
10218
|
+
}
|
|
10219
|
+
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
|
|
10220
|
+
margin-bottom: 0;
|
|
10222
10221
|
}
|
|
10223
10222
|
}
|
|
10224
10223
|
@media (min-width: 1080px) and (max-width: 1095px) {
|
|
@@ -10227,7 +10226,10 @@
|
|
|
10227
10226
|
font-size: var(--typography-heading-3-font-size, 1.375rem);
|
|
10228
10227
|
line-height: var(--typography-heading-3-line-height, 1.875rem);
|
|
10229
10228
|
letter-spacing: var(--typography-heading-3-letter-spacing, normal);
|
|
10230
|
-
|
|
10229
|
+
margin: 2px 0;
|
|
10230
|
+
}
|
|
10231
|
+
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_hasLongTitle__L-6FV .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
|
|
10232
|
+
margin-bottom: 0;
|
|
10231
10233
|
}
|
|
10232
10234
|
}
|
|
10233
10235
|
}
|
|
@@ -10236,11 +10238,15 @@
|
|
|
10236
10238
|
font-size: var(--typography-heading-3-font-size, 1.375rem);
|
|
10237
10239
|
line-height: var(--typography-heading-3-line-height, 1.875rem);
|
|
10238
10240
|
letter-spacing: var(--typography-heading-3-letter-spacing, normal);
|
|
10239
|
-
|
|
10241
|
+
margin: 2px 0;
|
|
10242
|
+
}
|
|
10243
|
+
.TitleBlock-module_hasSubtitle__DQWKd .TitleBlock-module_hasLongTitle__L-6FV .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
|
|
10244
|
+
margin-bottom: 0;
|
|
10240
10245
|
}
|
|
10241
10246
|
}
|
|
10242
10247
|
.TitleBlock-module_avatar__mEjJ8 {
|
|
10243
10248
|
display: none;
|
|
10249
|
+
align-self: self-start;
|
|
10244
10250
|
box-sizing: border-box;
|
|
10245
10251
|
overflow: hidden;
|
|
10246
10252
|
height: 3rem;
|
|
@@ -10322,15 +10328,32 @@
|
|
|
10322
10328
|
.TitleBlock-module_sectionTitleContainer__LrDPV {
|
|
10323
10329
|
display: flex;
|
|
10324
10330
|
align-items: center;
|
|
10325
|
-
padding:
|
|
10331
|
+
padding-block: 9px;
|
|
10332
|
+
padding-inline-end: 8px;
|
|
10333
|
+
}
|
|
10334
|
+
@container (min-width: 1080px) {
|
|
10335
|
+
.TitleBlock-module_sectionTitleContainer__LrDPV {
|
|
10336
|
+
padding-block: 17px;
|
|
10337
|
+
}
|
|
10338
|
+
}
|
|
10339
|
+
.TitleBlock-module_sectionTitle__b8daw {
|
|
10340
|
+
display: block;
|
|
10326
10341
|
}
|
|
10327
10342
|
.TitleBlock-module_sectionTitleInner__nJfOP {
|
|
10328
10343
|
display: flex;
|
|
10329
10344
|
flex-direction: column;
|
|
10345
|
+
row-gap: 4px;
|
|
10346
|
+
}
|
|
10347
|
+
@container (min-width: 1080px) {
|
|
10348
|
+
.TitleBlock-module_sectionTitleInner__nJfOP {
|
|
10349
|
+
flex-direction: row;
|
|
10350
|
+
align-items: center;
|
|
10351
|
+
column-gap: 12px;
|
|
10352
|
+
row-gap: none;
|
|
10353
|
+
}
|
|
10330
10354
|
}
|
|
10331
10355
|
.TitleBlock-module_sectionTitleOverride__XcD8g.TitleBlock-module_sectionTitleOverride__XcD8g {
|
|
10332
10356
|
white-space: nowrap;
|
|
10333
|
-
margin-inline: 0 var(--spacing-24);
|
|
10334
10357
|
font-family: var(--typography-heading-2-font-family, "Inter", "Noto Sans", Helvetica, Arial, sans-serif);
|
|
10335
10358
|
font-weight: var(--typography-heading-2-font-weight, 600);
|
|
10336
10359
|
font-size: var(--typography-heading-2-font-size, 1.75rem);
|
|
@@ -10355,9 +10378,6 @@
|
|
|
10355
10378
|
letter-spacing: var(--typography-heading-4-letter-spacing, normal);
|
|
10356
10379
|
}
|
|
10357
10380
|
}
|
|
10358
|
-
.TitleBlock-module_sectionTitle__b8daw {
|
|
10359
|
-
display: block;
|
|
10360
|
-
}
|
|
10361
10381
|
.TitleBlock-module_sectionTitleDescription__wuVwm {
|
|
10362
10382
|
color: var(--color-white, #ffffff);
|
|
10363
10383
|
max-width: 780px;
|
|
@@ -10367,9 +10387,6 @@
|
|
|
10367
10387
|
line-height: var(--typography-paragraph-small-line-height, 1.125rem);
|
|
10368
10388
|
letter-spacing: var(--typography-paragraph-small-letter-spacing, normal);
|
|
10369
10389
|
}
|
|
10370
|
-
.TitleBlock-module_sectionTitle__b8daw + .TitleBlock-module_sectionTitleDescription__wuVwm {
|
|
10371
|
-
margin-top: var(--spacing-6);
|
|
10372
|
-
}
|
|
10373
10390
|
.TitleBlock-module_sectionTitleDescription__wuVwm.TitleBlock-module_dark__KJexf {
|
|
10374
10391
|
color: rgba(var(--color-purple-800-rgb, 47, 36, 56), 0.7);
|
|
10375
10392
|
}
|
|
@@ -10379,11 +10396,6 @@
|
|
|
10379
10396
|
margin-top: -0.063rem;
|
|
10380
10397
|
justify-content: space-between;
|
|
10381
10398
|
}
|
|
10382
|
-
@container (max-width: calc(768px - 1px)) {
|
|
10383
|
-
.TitleBlock-module_rowBelowSeparatorInnerContent__g5H9w {
|
|
10384
|
-
height: 3.75rem;
|
|
10385
|
-
}
|
|
10386
|
-
}
|
|
10387
10399
|
.TitleBlock-module_titleAndAdjacent__Q7W-m {
|
|
10388
10400
|
display: flex;
|
|
10389
10401
|
min-width: 0;
|
|
@@ -10517,11 +10529,6 @@
|
|
|
10517
10529
|
}
|
|
10518
10530
|
.TitleBlock-module_secondaryActionsContainer__-4q0l {
|
|
10519
10531
|
display: flex;
|
|
10520
|
-
align-items: flex-start;
|
|
10521
|
-
justify-content: flex-end;
|
|
10522
|
-
padding: calc(1.5rem / 2) 0;
|
|
10523
|
-
margin-inline-end: 0;
|
|
10524
|
-
margin-inline-start: 2.25rem;
|
|
10525
10532
|
}
|
|
10526
10533
|
.TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_secondaryActionsContainer__-4q0l, .TitleBlock-module_educationVariant__YvpWa .TitleBlock-module_secondaryActionsContainer__-4q0l, .TitleBlock-module_adminVariant__s95nS .TitleBlock-module_secondaryActionsContainer__-4q0l {
|
|
10527
10534
|
color: var(--color-blue-500, #0168b3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "0.0.0-canary-01-
|
|
3
|
+
"version": "0.0.0-canary-01-21-tb-20260121033853",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border-bottom: 0;
|
|
7
7
|
border-top-left-radius: var(--border-borderless-border-radius);
|
|
8
8
|
border-top-right-radius: var(--border-borderless-border-radius);
|
|
9
|
-
background:
|
|
9
|
+
background: transparent;
|
|
10
10
|
white-space: nowrap;
|
|
11
11
|
text-decoration: none;
|
|
12
12
|
padding: var(--spacing-md) var(--spacing-md);
|
|
@@ -61,10 +61,6 @@
|
|
|
61
61
|
display: flex;
|
|
62
62
|
width: 100%;
|
|
63
63
|
justify-content: center;
|
|
64
|
-
|
|
65
|
-
@include title-block-small {
|
|
66
|
-
height: $tab-container-height-small;
|
|
67
|
-
}
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
.lightVariant .titleRow {
|
|
@@ -101,7 +97,7 @@
|
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
%rowBelowSeparatorInnerMarginOverride {
|
|
104
|
-
padding: 0
|
|
100
|
+
padding: 0 4px 0 12px;
|
|
105
101
|
|
|
106
102
|
@include title-block-min-media-1080 {
|
|
107
103
|
padding: 0;
|
|
@@ -112,10 +108,6 @@
|
|
|
112
108
|
.rowBelowSeparatorInner {
|
|
113
109
|
@extend %titleBlockInner;
|
|
114
110
|
@extend %rowBelowSeparatorInnerMarginOverride;
|
|
115
|
-
|
|
116
|
-
@include title-block-small {
|
|
117
|
-
height: $tab-container-height-small;
|
|
118
|
-
}
|
|
119
111
|
}
|
|
120
112
|
|
|
121
113
|
.titleRowInnerContent {
|
|
@@ -153,11 +145,6 @@
|
|
|
153
145
|
align-items: center;
|
|
154
146
|
min-width: 0; // this is an important trick to prevent flexbox items from overflowing
|
|
155
147
|
|
|
156
|
-
// Applying width 100% when the title is *not* long and is followed by a subtitle
|
|
157
|
-
// causes misalignment of both.
|
|
158
|
-
@include title-block-under-1366 {
|
|
159
|
-
width: 100%;
|
|
160
|
-
}
|
|
161
148
|
// truncation
|
|
162
149
|
overflow: hidden;
|
|
163
150
|
text-overflow: ellipsis;
|
|
@@ -165,6 +152,12 @@
|
|
|
165
152
|
line-clamp: 3;
|
|
166
153
|
-webkit-line-clamp: 3;
|
|
167
154
|
-webkit-box-orient: vertical;
|
|
155
|
+
|
|
156
|
+
// Applying width 100% when the title is *not* long and is followed by a subtitle
|
|
157
|
+
// causes misalignment of both.
|
|
158
|
+
@include title-block-under-1366 {
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
168
161
|
}
|
|
169
162
|
|
|
170
163
|
.titleAndSubtitle {
|
|
@@ -175,7 +168,7 @@
|
|
|
175
168
|
|
|
176
169
|
.hasSubtitle & {
|
|
177
170
|
@include title-block-under-1366 {
|
|
178
|
-
transform: translateY(-
|
|
171
|
+
transform: translateY(-12px);
|
|
179
172
|
}
|
|
180
173
|
}
|
|
181
174
|
}
|
|
@@ -227,20 +220,32 @@
|
|
|
227
220
|
font-size: $typography-heading-3-font-size;
|
|
228
221
|
line-height: $typography-heading-3-line-height;
|
|
229
222
|
letter-spacing: $typography-heading-3-letter-spacing;
|
|
230
|
-
|
|
223
|
+
margin: 8px 0;
|
|
224
|
+
|
|
225
|
+
.hasSubtitle & {
|
|
226
|
+
margin-bottom: 0;
|
|
227
|
+
}
|
|
231
228
|
|
|
232
229
|
@include title-block-media-mixed-width {
|
|
233
230
|
font-size: $typography-heading-2-font-size;
|
|
234
231
|
line-height: $typography-heading-2-line-height;
|
|
235
232
|
letter-spacing: $typography-heading-2-letter-spacing;
|
|
236
|
-
|
|
233
|
+
margin: 2px 0;
|
|
234
|
+
|
|
235
|
+
.hasSubtitle & {
|
|
236
|
+
margin-bottom: 0;
|
|
237
|
+
}
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
@include title-block-min-container-1080 {
|
|
240
241
|
font-size: $typography-heading-2-font-size;
|
|
241
242
|
line-height: $typography-heading-2-line-height;
|
|
242
243
|
letter-spacing: $typography-heading-2-letter-spacing;
|
|
243
|
-
|
|
244
|
+
margin: 2px 0;
|
|
245
|
+
|
|
246
|
+
.hasSubtitle & {
|
|
247
|
+
margin-bottom: 0;
|
|
248
|
+
}
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
.hasLongTitle & {
|
|
@@ -248,20 +253,29 @@
|
|
|
248
253
|
font-size: $typography-heading-3-font-size;
|
|
249
254
|
line-height: $typography-heading-3-line-height;
|
|
250
255
|
letter-spacing: $typography-heading-3-letter-spacing;
|
|
251
|
-
|
|
256
|
+
margin: 2px 0;
|
|
257
|
+
|
|
258
|
+
.hasSubtitle & {
|
|
259
|
+
margin-bottom: 0;
|
|
260
|
+
}
|
|
252
261
|
}
|
|
253
262
|
|
|
254
263
|
@container (min-width: #{$layout-breakpoints-large}) and (max-width: 1365px) {
|
|
255
264
|
font-size: $typography-heading-3-font-size;
|
|
256
265
|
line-height: $typography-heading-3-line-height;
|
|
257
266
|
letter-spacing: $typography-heading-3-letter-spacing;
|
|
258
|
-
|
|
267
|
+
margin: 2px 0;
|
|
268
|
+
|
|
269
|
+
.hasSubtitle & {
|
|
270
|
+
margin-bottom: 0;
|
|
271
|
+
}
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
|
|
263
276
|
.avatar {
|
|
264
277
|
display: none;
|
|
278
|
+
align-self: self-start;
|
|
265
279
|
box-sizing: border-box;
|
|
266
280
|
overflow: hidden;
|
|
267
281
|
height: $ca-grid * 2;
|
|
@@ -294,7 +308,6 @@
|
|
|
294
308
|
.hamburger {
|
|
295
309
|
display: flex;
|
|
296
310
|
align-self: self-start;
|
|
297
|
-
// @include ca-margin($end: $spacing-xs);
|
|
298
311
|
|
|
299
312
|
@include title-block-min-media-1080 {
|
|
300
313
|
display: none;
|
|
@@ -346,17 +359,33 @@
|
|
|
346
359
|
.sectionTitleContainer {
|
|
347
360
|
display: flex;
|
|
348
361
|
align-items: center;
|
|
349
|
-
padding:
|
|
362
|
+
padding-block: 9px;
|
|
363
|
+
padding-inline-end: 8px; // 20 take 12 result in 8 extra padding needed in section versus tabs UI
|
|
364
|
+
|
|
365
|
+
@include title-block-min-container-1080 {
|
|
366
|
+
padding-block: 17px;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.sectionTitle {
|
|
371
|
+
display: block;
|
|
350
372
|
}
|
|
351
373
|
|
|
352
374
|
.sectionTitleInner {
|
|
353
375
|
display: flex;
|
|
354
376
|
flex-direction: column;
|
|
377
|
+
row-gap: 4px;
|
|
378
|
+
|
|
379
|
+
@include title-block-min-container-1080 {
|
|
380
|
+
flex-direction: row;
|
|
381
|
+
align-items: center;
|
|
382
|
+
column-gap: $title-block-gap-default;
|
|
383
|
+
row-gap: none;
|
|
384
|
+
}
|
|
355
385
|
}
|
|
356
386
|
|
|
357
387
|
.sectionTitleOverride.sectionTitleOverride {
|
|
358
388
|
white-space: nowrap;
|
|
359
|
-
margin-inline: 0 var(--spacing-24);
|
|
360
389
|
font-family: $typography-heading-2-font-family;
|
|
361
390
|
font-weight: $typography-heading-2-font-weight;
|
|
362
391
|
font-size: $typography-heading-2-font-size;
|
|
@@ -380,10 +409,6 @@
|
|
|
380
409
|
}
|
|
381
410
|
}
|
|
382
411
|
|
|
383
|
-
.sectionTitle {
|
|
384
|
-
display: block;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
412
|
.sectionTitleDescription {
|
|
388
413
|
color: $color-white;
|
|
389
414
|
max-width: 780px;
|
|
@@ -393,10 +418,6 @@
|
|
|
393
418
|
line-height: $typography-paragraph-small-line-height;
|
|
394
419
|
letter-spacing: $typography-paragraph-small-letter-spacing;
|
|
395
420
|
|
|
396
|
-
.sectionTitle + & {
|
|
397
|
-
margin-top: var(--spacing-6);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
421
|
&.dark {
|
|
401
422
|
color: rgba($color-purple-800-rgb, 0.7);
|
|
402
423
|
}
|
|
@@ -407,10 +428,6 @@
|
|
|
407
428
|
width: 100%;
|
|
408
429
|
margin-top: -$title-block-separator-height;
|
|
409
430
|
justify-content: space-between;
|
|
410
|
-
|
|
411
|
-
@include title-block-small {
|
|
412
|
-
height: $tab-container-height-small;
|
|
413
|
-
}
|
|
414
431
|
}
|
|
415
432
|
|
|
416
433
|
.titleAndAdjacent {
|
|
@@ -478,6 +495,7 @@
|
|
|
478
495
|
}
|
|
479
496
|
|
|
480
497
|
.navigationTabScrollerContainer {
|
|
498
|
+
// display: none;
|
|
481
499
|
.hasNavigationTabs & {
|
|
482
500
|
@include title-block-small {
|
|
483
501
|
margin-top: $title-block-separator-height;
|
|
@@ -567,11 +585,6 @@
|
|
|
567
585
|
// but the variants prevent us from breaking this out.
|
|
568
586
|
.secondaryActionsContainer {
|
|
569
587
|
display: flex;
|
|
570
|
-
align-items: flex-start;
|
|
571
|
-
justify-content: flex-end;
|
|
572
|
-
padding: (calc(#{$ca-grid} / 2)) 0;
|
|
573
|
-
|
|
574
|
-
@include ca-margin($start: $ca-grid * 1.5);
|
|
575
588
|
|
|
576
589
|
// To be removed eventually – the Dropdown does not
|
|
577
590
|
// currently set its own color, and we want it
|
|
@@ -376,7 +376,10 @@ export const TitleBlock = ({
|
|
|
376
376
|
</div>
|
|
377
377
|
</div>
|
|
378
378
|
)}
|
|
379
|
-
{
|
|
379
|
+
{!sectionTitle &&
|
|
380
|
+
!sectionTitleDescription &&
|
|
381
|
+
!renderSectionTitle &&
|
|
382
|
+
renderNavigationTabs(navigationTabs, collapseNavigationArea, title)}
|
|
380
383
|
{(secondaryActions ?? secondaryOverflowMenuItems) && (
|
|
381
384
|
<SecondaryActions
|
|
382
385
|
secondaryActions={secondaryActions}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { type Meta, type StoryObj } from '@storybook/react'
|
|
3
3
|
import { expect, waitFor, within } from '@storybook/test'
|
|
4
|
+
import { Heading } from 'react-aria-components'
|
|
4
5
|
import { Icon } from '~components/Icon'
|
|
5
6
|
import { assetUrl } from '~components/utils/hostedAssets'
|
|
6
7
|
import { StickerSheet } from '~storybook/components/StickerSheet'
|
|
@@ -253,18 +254,18 @@ export const StickerSheetVariants: Story = {
|
|
|
253
254
|
]}
|
|
254
255
|
/>
|
|
255
256
|
</StickerSheet.Row>
|
|
256
|
-
<StickerSheet.Row header="Education (
|
|
257
|
+
<StickerSheet.Row header="Education (Blue background)">
|
|
257
258
|
<TitleBlock
|
|
258
259
|
variant="education"
|
|
259
260
|
title="Education Variant"
|
|
260
|
-
subtitle="This is the education variant with
|
|
261
|
+
subtitle="This is the education variant with blue background"
|
|
261
262
|
breadcrumb={{
|
|
262
263
|
path: '#',
|
|
263
264
|
text: 'Back to courses',
|
|
264
265
|
}}
|
|
265
266
|
navigationTabs={[
|
|
266
|
-
<NavigationTab key="1" text="Lessons" href="#" active />,
|
|
267
|
-
<NavigationTab key="2" text="Assignments" href="#" />,
|
|
267
|
+
<NavigationTab key="1" variant="education" text="Lessons" href="#" active />,
|
|
268
|
+
<NavigationTab key="2" variant="education" text="Assignments" href="#" />,
|
|
268
269
|
]}
|
|
269
270
|
/>
|
|
270
271
|
</StickerSheet.Row>
|
|
@@ -301,6 +302,169 @@ export const StickerSheetVariants: Story = {
|
|
|
301
302
|
</StickerSheet>
|
|
302
303
|
),
|
|
303
304
|
}
|
|
305
|
+
export const StickerSheetVariantsWithSection: Story = {
|
|
306
|
+
name: 'Sticker Sheet (Variants With Section)',
|
|
307
|
+
render: () => (
|
|
308
|
+
<StickerSheet title="TitleBlock Variants">
|
|
309
|
+
<StickerSheet.Row header="Default (Purple background)">
|
|
310
|
+
<TitleBlock
|
|
311
|
+
title="Default Variant"
|
|
312
|
+
subtitle="This is the default purple variant with white text"
|
|
313
|
+
sectionTitle="Section title"
|
|
314
|
+
sectionTitleDescription="Description of section can go here"
|
|
315
|
+
navigationTabs={undefined}
|
|
316
|
+
surveyStatus={undefined}
|
|
317
|
+
/>
|
|
318
|
+
</StickerSheet.Row>
|
|
319
|
+
<StickerSheet.Row header="Education (Blue background)">
|
|
320
|
+
<TitleBlock
|
|
321
|
+
variant="education"
|
|
322
|
+
title="Education Variant"
|
|
323
|
+
subtitle="This is the education variant with blue background"
|
|
324
|
+
sectionTitle="Section title"
|
|
325
|
+
sectionTitleDescription="Description of section can go here"
|
|
326
|
+
navigationTabs={undefined}
|
|
327
|
+
surveyStatus={undefined}
|
|
328
|
+
/>
|
|
329
|
+
</StickerSheet.Row>
|
|
330
|
+
<StickerSheet.Row header="Admin (White background)">
|
|
331
|
+
<TitleBlock
|
|
332
|
+
variant="admin"
|
|
333
|
+
title="Admin Variant"
|
|
334
|
+
subtitle="This is the admin variant with white background"
|
|
335
|
+
sectionTitle="Section title"
|
|
336
|
+
sectionTitleDescription="Description of section can go here"
|
|
337
|
+
navigationTabs={undefined}
|
|
338
|
+
surveyStatus={undefined}
|
|
339
|
+
/>
|
|
340
|
+
</StickerSheet.Row>
|
|
341
|
+
<StickerSheet.Row header="Light (White background)">
|
|
342
|
+
<TitleBlock
|
|
343
|
+
variant="light"
|
|
344
|
+
title="Light Variant"
|
|
345
|
+
subtitle="This is the light variant with clean white background"
|
|
346
|
+
sectionTitle="Section title"
|
|
347
|
+
sectionTitleDescription="Description of section can go here"
|
|
348
|
+
navigationTabs={undefined}
|
|
349
|
+
surveyStatus={undefined}
|
|
350
|
+
/>
|
|
351
|
+
</StickerSheet.Row>
|
|
352
|
+
</StickerSheet>
|
|
353
|
+
),
|
|
354
|
+
}
|
|
355
|
+
export const StickerSheetVariantsWithSectionTitleOnly: Story = {
|
|
356
|
+
name: 'Sticker Sheet (Section Title Only)',
|
|
357
|
+
render: () => (
|
|
358
|
+
<StickerSheet title="TitleBlock Variants">
|
|
359
|
+
<StickerSheet.Row header="Default (Purple background)">
|
|
360
|
+
<TitleBlock
|
|
361
|
+
title="Default Variant"
|
|
362
|
+
subtitle="This is the default purple variant with white text"
|
|
363
|
+
sectionTitle="Section title"
|
|
364
|
+
sectionTitleDescription={undefined}
|
|
365
|
+
navigationTabs={undefined}
|
|
366
|
+
surveyStatus={undefined}
|
|
367
|
+
secondaryActions={undefined}
|
|
368
|
+
secondaryOverflowMenuItems={undefined}
|
|
369
|
+
primaryAction={undefined}
|
|
370
|
+
defaultAction={undefined}
|
|
371
|
+
/>
|
|
372
|
+
</StickerSheet.Row>
|
|
373
|
+
<StickerSheet.Row header="Education (Blue background)">
|
|
374
|
+
<TitleBlock
|
|
375
|
+
variant="education"
|
|
376
|
+
title="Education Variant"
|
|
377
|
+
subtitle="This is the education variant with blue background"
|
|
378
|
+
sectionTitle="Section title"
|
|
379
|
+
sectionTitleDescription={undefined}
|
|
380
|
+
navigationTabs={undefined}
|
|
381
|
+
surveyStatus={undefined}
|
|
382
|
+
secondaryActions={undefined}
|
|
383
|
+
secondaryOverflowMenuItems={undefined}
|
|
384
|
+
primaryAction={undefined}
|
|
385
|
+
defaultAction={undefined}
|
|
386
|
+
/>
|
|
387
|
+
</StickerSheet.Row>
|
|
388
|
+
<StickerSheet.Row header="Admin (White background)">
|
|
389
|
+
<TitleBlock
|
|
390
|
+
variant="admin"
|
|
391
|
+
title="Admin Variant"
|
|
392
|
+
subtitle="This is the admin variant with white background"
|
|
393
|
+
sectionTitle="Section title"
|
|
394
|
+
sectionTitleDescription={undefined}
|
|
395
|
+
navigationTabs={undefined}
|
|
396
|
+
surveyStatus={undefined}
|
|
397
|
+
secondaryActions={undefined}
|
|
398
|
+
secondaryOverflowMenuItems={undefined}
|
|
399
|
+
primaryAction={undefined}
|
|
400
|
+
defaultAction={undefined}
|
|
401
|
+
/>
|
|
402
|
+
</StickerSheet.Row>
|
|
403
|
+
<StickerSheet.Row header="Light (White background)">
|
|
404
|
+
<TitleBlock
|
|
405
|
+
variant="light"
|
|
406
|
+
title="Light Variant"
|
|
407
|
+
subtitle="This is the light variant with clean white background"
|
|
408
|
+
sectionTitle="Section title"
|
|
409
|
+
sectionTitleDescription={undefined}
|
|
410
|
+
navigationTabs={undefined}
|
|
411
|
+
surveyStatus={undefined}
|
|
412
|
+
secondaryActions={undefined}
|
|
413
|
+
secondaryOverflowMenuItems={undefined}
|
|
414
|
+
primaryAction={undefined}
|
|
415
|
+
defaultAction={undefined}
|
|
416
|
+
/>
|
|
417
|
+
</StickerSheet.Row>
|
|
418
|
+
</StickerSheet>
|
|
419
|
+
),
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export const StickerSheetVariantsWithCollapseNavigationAreaWhenPossible: Story = {
|
|
423
|
+
name: 'Sticker Sheet (Variants WithCollapseNavigationAreaWhenPossible)',
|
|
424
|
+
render: () => (
|
|
425
|
+
<StickerSheet title="TitleBlock Variants">
|
|
426
|
+
<StickerSheet.Row header="Default">
|
|
427
|
+
<TitleBlock
|
|
428
|
+
title="Default Variant"
|
|
429
|
+
subtitle={undefined}
|
|
430
|
+
breadcrumb={undefined}
|
|
431
|
+
navigationTabs={undefined}
|
|
432
|
+
collapseNavigationAreaWhenPossible={true}
|
|
433
|
+
/>
|
|
434
|
+
</StickerSheet.Row>
|
|
435
|
+
<StickerSheet.Row header="Education">
|
|
436
|
+
<TitleBlock
|
|
437
|
+
variant="education"
|
|
438
|
+
title="Education Variant"
|
|
439
|
+
subtitle={undefined}
|
|
440
|
+
breadcrumb={undefined}
|
|
441
|
+
navigationTabs={undefined}
|
|
442
|
+
collapseNavigationAreaWhenPossible={true}
|
|
443
|
+
/>
|
|
444
|
+
</StickerSheet.Row>
|
|
445
|
+
<StickerSheet.Row header="Admin">
|
|
446
|
+
<TitleBlock
|
|
447
|
+
variant="admin"
|
|
448
|
+
title="Admin Variant"
|
|
449
|
+
subtitle={undefined}
|
|
450
|
+
breadcrumb={undefined}
|
|
451
|
+
navigationTabs={undefined}
|
|
452
|
+
collapseNavigationAreaWhenPossible={true}
|
|
453
|
+
/>
|
|
454
|
+
</StickerSheet.Row>
|
|
455
|
+
<StickerSheet.Row header="Light">
|
|
456
|
+
<TitleBlock
|
|
457
|
+
variant="light"
|
|
458
|
+
title="Light Variant"
|
|
459
|
+
subtitle={undefined}
|
|
460
|
+
breadcrumb={undefined}
|
|
461
|
+
navigationTabs={undefined}
|
|
462
|
+
collapseNavigationAreaWhenPossible={true}
|
|
463
|
+
/>
|
|
464
|
+
</StickerSheet.Row>
|
|
465
|
+
</StickerSheet>
|
|
466
|
+
),
|
|
467
|
+
}
|
|
304
468
|
|
|
305
469
|
export const StickerSheetBreadcrumbs: Story = {
|
|
306
470
|
name: 'Sticker Sheet (Breadcrumb)',
|
|
@@ -434,3 +598,57 @@ export const StickerSheetSurveyStatus: Story = {
|
|
|
434
598
|
</StickerSheet>
|
|
435
599
|
),
|
|
436
600
|
}
|
|
601
|
+
|
|
602
|
+
export const WithSection: Story = {
|
|
603
|
+
parameters: {
|
|
604
|
+
viewport: viewports,
|
|
605
|
+
chromatic: chromaticViewports,
|
|
606
|
+
},
|
|
607
|
+
args: {
|
|
608
|
+
title: 'A extra long title with over thirty characters so it truncates in a mobile viewport',
|
|
609
|
+
variant: 'light',
|
|
610
|
+
sectionTitle: 'Section title',
|
|
611
|
+
sectionTitleDescription: 'Description of section can go here',
|
|
612
|
+
navigationTabs: undefined,
|
|
613
|
+
surveyStatus: undefined,
|
|
614
|
+
},
|
|
615
|
+
}
|
|
616
|
+
export const WithCustomSectionTitleOnly: Story = {
|
|
617
|
+
parameters: {
|
|
618
|
+
viewport: viewports,
|
|
619
|
+
chromatic: chromaticViewports,
|
|
620
|
+
},
|
|
621
|
+
args: {
|
|
622
|
+
title: 'Page title',
|
|
623
|
+
renderSectionTitle: () => (
|
|
624
|
+
<div>
|
|
625
|
+
<Heading className="p-0">Custom Section Title</Heading>
|
|
626
|
+
</div>
|
|
627
|
+
),
|
|
628
|
+
navigationTabs: undefined,
|
|
629
|
+
surveyStatus: undefined,
|
|
630
|
+
secondaryActions: undefined,
|
|
631
|
+
secondaryOverflowMenuItems: undefined,
|
|
632
|
+
primaryAction: undefined,
|
|
633
|
+
defaultAction: undefined,
|
|
634
|
+
},
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export const WithTitleCollapseNavigationAreaWhenPossible: Story = {
|
|
638
|
+
parameters: {
|
|
639
|
+
viewport: viewports,
|
|
640
|
+
chromatic: chromaticViewports,
|
|
641
|
+
},
|
|
642
|
+
args: {
|
|
643
|
+
title: 'Page title',
|
|
644
|
+
navigationTabs: undefined,
|
|
645
|
+
surveyStatus: undefined,
|
|
646
|
+
primaryAction: undefined,
|
|
647
|
+
defaultAction: undefined,
|
|
648
|
+
secondaryActions: undefined,
|
|
649
|
+
secondaryOverflowMenuItems: undefined,
|
|
650
|
+
breadcrumb: undefined,
|
|
651
|
+
avatar: undefined,
|
|
652
|
+
collapseNavigationAreaWhenPossible: true,
|
|
653
|
+
},
|
|
654
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@include title-block-under-576 {
|
|
14
14
|
justify-content: flex-start;
|
|
15
15
|
// offset: hamburger menu button is 48px wide
|
|
16
|
-
margin-
|
|
16
|
+
margin-inline-start: 48px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.defaultActionButtonMinimized {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.defaultActionButtonMinimized {
|
|
31
31
|
display: flex;
|
|
32
|
-
margin-
|
|
32
|
+
margin-inline-end: 8px;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|