@carbon/ibm-products 2.88.0 → 2.89.0
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/css/carbon.css +17 -4
- package/css/carbon.css.map +1 -1
- package/css/index-full-carbon.css +106 -33
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +54 -29
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +89 -29
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +104 -32
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/AboutModal/AboutModal.d.ts.map +1 -1
- package/es/components/AboutModal/AboutModal.js +2 -2
- package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts +17 -0
- package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/Coachmark.js +35 -5
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +1 -9
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +48 -47
- package/es/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +4 -1
- package/es/components/Coachmark/next/Coachmark/ContentHeader.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/ContentHeader.js +26 -11
- package/es/components/Coachmark/next/Coachmark/context.d.ts +1 -0
- package/es/components/Coachmark/next/Coachmark/context.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +4 -15
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +22 -15
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +4 -14
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -1
- package/es/components/DelimitedList/DelimitedList.d.ts +1 -0
- package/es/components/DelimitedList/DelimitedList.d.ts.map +1 -1
- package/es/components/DelimitedList/DelimitedList.js +6 -0
- package/es/components/StringFormatter/StringFormatter.d.ts +1 -0
- package/es/components/StringFormatter/StringFormatter.d.ts.map +1 -1
- package/es/components/StringFormatter/StringFormatter.js +6 -0
- package/es/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/es/components/Tearsheet/next/Tearsheet.js +6 -9
- package/es/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetBody.js +5 -2
- package/es/components/Tearsheet/next/TearsheetHeader.d.ts +1 -1
- package/es/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeader.js +11 -10
- package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeaderContent.js +26 -7
- package/es/components/Tearsheet/next/context.d.ts +4 -2
- package/es/components/Tearsheet/next/context.d.ts.map +1 -1
- package/es/components/Tearsheet/next/context.js +4 -2
- package/es/global/js/hooks/useCollapsible.d.ts.map +1 -1
- package/es/global/js/hooks/useCollapsible.js +7 -5
- package/es/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +1 -1
- package/es/node_modules/@carbon/icons-react/es/Icon.js +1 -1
- package/es/settings.js +8 -2
- package/lib/components/AboutModal/AboutModal.d.ts.map +1 -1
- package/lib/components/AboutModal/AboutModal.js +1 -1
- package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +17 -0
- package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/Coachmark.js +35 -5
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +1 -9
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +47 -46
- package/lib/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +4 -1
- package/lib/components/Coachmark/next/Coachmark/ContentHeader.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/ContentHeader.js +26 -11
- package/lib/components/Coachmark/next/Coachmark/context.d.ts +1 -0
- package/lib/components/Coachmark/next/Coachmark/context.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +3 -14
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +22 -15
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +3 -13
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -1
- package/lib/components/DelimitedList/DelimitedList.d.ts +1 -0
- package/lib/components/DelimitedList/DelimitedList.d.ts.map +1 -1
- package/lib/components/DelimitedList/DelimitedList.js +6 -0
- package/lib/components/StringFormatter/StringFormatter.d.ts +1 -0
- package/lib/components/StringFormatter/StringFormatter.d.ts.map +1 -1
- package/lib/components/StringFormatter/StringFormatter.js +6 -0
- package/lib/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/Tearsheet.js +6 -9
- package/lib/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetBody.js +4 -1
- package/lib/components/Tearsheet/next/TearsheetHeader.d.ts +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeader.js +11 -10
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +24 -5
- package/lib/components/Tearsheet/next/context.d.ts +4 -2
- package/lib/components/Tearsheet/next/context.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/context.js +4 -2
- package/lib/global/js/hooks/useCollapsible.d.ts.map +1 -1
- package/lib/global/js/hooks/useCollapsible.js +7 -5
- package/lib/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/lib/index.js +2 -2
- package/lib/node_modules/@carbon/icons-react/lib/Icon.js +1 -1
- package/lib/settings.js +8 -1
- package/package.json +15 -15
- package/scss/components/Coachmark/_coachmark.scss +25 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +16 -0
- package/scss/components/PageHeader/_page-header.scss +30 -22
- package/scss/components/Tearsheet/_tearsheet_next.scss +40 -7
- package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +0 -110
- package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.js +0 -32
- package/es/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -416
- package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -509
- package/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -86
- package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -145
- package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +0 -111
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.js +0 -33
- package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -420
- package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -515
- package/lib/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -92
- package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -162
- package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
|
@@ -943,6 +943,14 @@ $duration: 1000ms;
|
|
|
943
943
|
min-inline-size: 0;
|
|
944
944
|
}
|
|
945
945
|
|
|
946
|
+
// Ensure menu dropdown stays within viewport bounds
|
|
947
|
+
// Note: Carbon MenuButton renders the menu in a portal at body level
|
|
948
|
+
.#{$carbon-prefix}--menu.#{$carbon-prefix}--menu--open {
|
|
949
|
+
// Prevent menu from being cut off at top of viewport
|
|
950
|
+
max-block-size: calc(100vh - #{$spacing-05});
|
|
951
|
+
overflow-y: auto;
|
|
952
|
+
}
|
|
953
|
+
|
|
946
954
|
.#{$block-class}__content__subtitle {
|
|
947
955
|
@include type.type-style('productive-heading-03');
|
|
948
956
|
|
|
@@ -973,16 +981,22 @@ $duration: 1000ms;
|
|
|
973
981
|
}
|
|
974
982
|
|
|
975
983
|
.#{$block-class}__tab-bar--tablist {
|
|
976
|
-
display:
|
|
977
|
-
|
|
978
|
-
|
|
984
|
+
display: flex;
|
|
985
|
+
align-items: center;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.#{$block-class}__tab-bar--tablist > .#{$carbon-prefix}--tabs {
|
|
989
|
+
display: inline-flex;
|
|
990
|
+
margin-inline-end: $spacing-03;
|
|
979
991
|
}
|
|
980
992
|
|
|
981
993
|
.#{$pkg-prefix}--page-header__tab-bar--tablist
|
|
982
994
|
.#{$pkg-prefix}--page-header__tags {
|
|
983
|
-
display: flex;
|
|
984
|
-
align-
|
|
995
|
+
display: inline-flex;
|
|
996
|
+
align-items: center;
|
|
985
997
|
justify-content: flex-end;
|
|
998
|
+
margin-inline-start: auto;
|
|
999
|
+
min-inline-size: 0;
|
|
986
1000
|
}
|
|
987
1001
|
|
|
988
1002
|
.#{$pkg-prefix}--page-header__tab-bar--tablist.#{$pkg-prefix}--page-header__tab-bar--with-scroller
|
|
@@ -1033,32 +1047,26 @@ $duration: 1000ms;
|
|
|
1033
1047
|
}
|
|
1034
1048
|
|
|
1035
1049
|
.#{$block-class}--tag-overflow-container {
|
|
1050
|
+
display: inline-flex;
|
|
1036
1051
|
align-content: center;
|
|
1052
|
+
justify-content: flex-end;
|
|
1053
|
+
inline-size: 40%;
|
|
1037
1054
|
text-align: end;
|
|
1038
|
-
@include breakpoint(sm) {
|
|
1039
|
-
transform: translateX(calc(-1 * #{$spacing-06}));
|
|
1040
|
-
}
|
|
1041
|
-
@include breakpoint(md) {
|
|
1042
|
-
transform: translateX(calc(-1 * #{$spacing-03}));
|
|
1043
|
-
}
|
|
1044
|
-
@include breakpoint(lg) {
|
|
1045
|
-
transform: translateX($spacing-08);
|
|
1046
|
-
}
|
|
1047
1055
|
|
|
1048
1056
|
.#{$carbon-prefix}--tag {
|
|
1057
|
+
flex-shrink: 0;
|
|
1049
1058
|
margin-inline-end: $spacing-03;
|
|
1050
1059
|
}
|
|
1060
|
+
|
|
1061
|
+
@include breakpoint-down(md) {
|
|
1062
|
+
inline-size: auto;
|
|
1063
|
+
}
|
|
1051
1064
|
}
|
|
1052
1065
|
|
|
1053
1066
|
.#{$block-class}--tag-overflow-popover__hidden {
|
|
1054
1067
|
visibility: hidden;
|
|
1055
1068
|
}
|
|
1056
1069
|
|
|
1057
|
-
.#{$block-class}--tag-overflow-container__has-no-hidden-items {
|
|
1058
|
-
/* stylelint-disable-next-line carbon/layout-use */
|
|
1059
|
-
transform: translateX($spacing-07);
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
1070
|
.#{$block-class}__tag-item {
|
|
1063
1071
|
flex-shrink: 0;
|
|
1064
1072
|
}
|
|
@@ -1076,9 +1084,9 @@ $duration: 1000ms;
|
|
|
1076
1084
|
}
|
|
1077
1085
|
|
|
1078
1086
|
.#{$pkg-prefix}--page-header--scroller-button-container {
|
|
1079
|
-
position:
|
|
1080
|
-
|
|
1081
|
-
|
|
1087
|
+
position: relative;
|
|
1088
|
+
margin-inline-start: $spacing-03;
|
|
1089
|
+
padding-inline-end: $spacing-05;
|
|
1082
1090
|
}
|
|
1083
1091
|
|
|
1084
1092
|
@keyframes page-header-title-breadcrumb-animation {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@use '@carbon/styles/scss/utilities';
|
|
14
14
|
@use '../../global/styles/project-settings' as *;
|
|
15
15
|
@use '../../global/styles/mixins' as *;
|
|
16
|
+
@use '@carbon/layout/scss/convert';
|
|
16
17
|
|
|
17
18
|
$block-class__next: #{$pkg-prefix}--tearsheet__next;
|
|
18
19
|
$motion-duration: $duration-moderate-02;
|
|
@@ -183,7 +184,8 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
183
184
|
> *:not(
|
|
184
185
|
.#{$block-class__next}__navigation-bar,
|
|
185
186
|
.#{$block-class__next}__header-content-wrapper,
|
|
186
|
-
.#{$carbon-prefix}--modal-close-button
|
|
187
|
+
.#{$carbon-prefix}--modal-close-button,
|
|
188
|
+
.#{$block-class__next}__close-button
|
|
187
189
|
) {
|
|
188
190
|
margin-block-end: $spacing-06;
|
|
189
191
|
}
|
|
@@ -216,6 +218,22 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
|
|
221
|
+
// Reorder elements visually for wide variant on desktop
|
|
222
|
+
// headerActions is first in DOM but should display on the right (order: 2)
|
|
223
|
+
// This only applies to wide variant on desktop (not mobile, not narrow)
|
|
224
|
+
&:not(.#{$block-class__next}--narrow) {
|
|
225
|
+
@include breakpoint(md) {
|
|
226
|
+
.#{$block-class__next}__header-content-wrapper {
|
|
227
|
+
.#{$block-class__next}__header-actions {
|
|
228
|
+
order: 2;
|
|
229
|
+
}
|
|
230
|
+
.#{$block-class__next}__header-content {
|
|
231
|
+
order: 1;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
219
237
|
// ──────────────────────────────────────────────────────────────
|
|
220
238
|
// Header (default vs collapsed)
|
|
221
239
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -225,6 +243,8 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
225
243
|
.#{$block-class__next}__navigation-bar,
|
|
226
244
|
.#{$block-class__next}__header-content-wrapper,
|
|
227
245
|
.#{$carbon-prefix}--modal-close-button,
|
|
246
|
+
.#{$block-class__next}__close-button,
|
|
247
|
+
.#{$block-class__next}__decorator,
|
|
228
248
|
.excludeFromCollapse
|
|
229
249
|
) {
|
|
230
250
|
overflow: hidden;
|
|
@@ -235,6 +255,7 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
235
255
|
opacity $motion-duration motion(entrance, expressive),
|
|
236
256
|
margin $motion-duration motion(entrance, expressive),
|
|
237
257
|
padding $motion-duration motion(entrance, expressive);
|
|
258
|
+
visibility: hidden;
|
|
238
259
|
}
|
|
239
260
|
|
|
240
261
|
.#{$block-class__next}__header-actions,
|
|
@@ -261,6 +282,8 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
261
282
|
.#{$block-class__next}__navigation-bar,
|
|
262
283
|
.#{$block-class__next}__header-content-wrapper,
|
|
263
284
|
.#{$carbon-prefix}--modal-close-button,
|
|
285
|
+
.#{$block-class__next}__close-button,
|
|
286
|
+
.#{$block-class__next}__decorator,
|
|
264
287
|
.excludeFromCollapse
|
|
265
288
|
),
|
|
266
289
|
.#{$block-class__next}__header-actions
|
|
@@ -271,6 +294,8 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
271
294
|
.#{$block-class__next}__navigation-bar,
|
|
272
295
|
.#{$block-class__next}__header-content-wrapper,
|
|
273
296
|
.#{$carbon-prefix}--modal-close-button,
|
|
297
|
+
.#{$block-class__next}__close-button,
|
|
298
|
+
.#{$block-class__next}__decorator,
|
|
274
299
|
.excludeFromCollapse
|
|
275
300
|
)
|
|
276
301
|
*,
|
|
@@ -285,6 +310,7 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
285
310
|
opacity: 0;
|
|
286
311
|
pointer-events: none;
|
|
287
312
|
transition: all $motion-duration motion(entrance, expressive);
|
|
313
|
+
visibility: hidden;
|
|
288
314
|
}
|
|
289
315
|
|
|
290
316
|
// Header title
|
|
@@ -343,14 +369,13 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
343
369
|
.#{$block-class__next}__navigation-bar::before {
|
|
344
370
|
position: absolute;
|
|
345
371
|
z-index: 1;
|
|
346
|
-
background:
|
|
372
|
+
background: $border-subtle-01;
|
|
347
373
|
block-size: 1px;
|
|
348
374
|
content: '';
|
|
349
|
-
inline-size:
|
|
350
|
-
inset-block-start:
|
|
351
|
-
inset-inline-start:
|
|
375
|
+
inline-size: calc(100% + $spacing-11);
|
|
376
|
+
inset-block-start: 0;
|
|
377
|
+
inset-inline-start: -$spacing-07;
|
|
352
378
|
pointer-events: none;
|
|
353
|
-
transform: translateX(-50%);
|
|
354
379
|
}
|
|
355
380
|
}
|
|
356
381
|
|
|
@@ -424,10 +449,18 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
424
449
|
@include type.type-style('body-compact-01');
|
|
425
450
|
}
|
|
426
451
|
|
|
452
|
+
// Always hide Carbon's default modal close button
|
|
427
453
|
.#{$block-class__next}__header--no-close-icon {
|
|
428
454
|
display: none;
|
|
429
455
|
}
|
|
430
456
|
|
|
457
|
+
// Decorator positioning (after close button)
|
|
458
|
+
.#{$block-class__next}__decorator {
|
|
459
|
+
position: absolute;
|
|
460
|
+
inset-block-start: convert.to-rem(10px);
|
|
461
|
+
inset-inline-end: convert.to-rem(48px);
|
|
462
|
+
}
|
|
463
|
+
|
|
431
464
|
// ──────────────────────────────────────────────────────────────
|
|
432
465
|
// Navigation bar inside header
|
|
433
466
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -447,7 +480,7 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
|
|
|
447
480
|
}
|
|
448
481
|
.#{$block-class__next}__scroller-container {
|
|
449
482
|
position: absolute;
|
|
450
|
-
inset-block-end:
|
|
483
|
+
inset-block-end: 0;
|
|
451
484
|
inset-inline-end: -$spacing-08; // padding inline end of header + adjusted -ve margin for tabs
|
|
452
485
|
@include breakpoint-down(md) {
|
|
453
486
|
inset-inline-end: -$spacing-06;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
9
|
-
import { require_classnames } from "../../../../../node_modules/classnames/index.js";
|
|
10
|
-
import { pkg } from "../../../../../settings.js";
|
|
11
|
-
import { useIsomorphicEffect } from "../../../../../global/js/hooks/useIsomorphicEffect.js";
|
|
12
|
-
import { autoUpdate, computePosition } from "../../../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
|
|
13
|
-
import { arrow, flip, offset, shift } from "../../../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js";
|
|
14
|
-
import React, { forwardRef, useRef } from "react";
|
|
15
|
-
import { usePrefix, useTheme } from "@carbon/react";
|
|
16
|
-
|
|
17
|
-
//#region src/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.tsx
|
|
18
|
-
var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
|
|
19
|
-
const CoachmarkBubble = forwardRef((props, ref) => {
|
|
20
|
-
const { children, align, target, className, dropShadow = true, highContrast = false, caret = false, open, ...rest } = props;
|
|
21
|
-
const { theme } = useTheme();
|
|
22
|
-
const carbonPrefix = usePrefix();
|
|
23
|
-
const tooltipRef = useRef(null);
|
|
24
|
-
const arrowRef = useRef(null);
|
|
25
|
-
const targetRef = useRef(null);
|
|
26
|
-
useIsomorphicEffect(() => {
|
|
27
|
-
if (target) {
|
|
28
|
-
if (typeof target === "string") {
|
|
29
|
-
if (target === "#" || target.trim() === "") return;
|
|
30
|
-
targetRef.current = document.querySelector(target);
|
|
31
|
-
} else if ("current" in target) targetRef.current = target.current;
|
|
32
|
-
else targetRef.current = target;
|
|
33
|
-
if (targetRef.current && tooltipRef.current && arrowRef.current && open) {
|
|
34
|
-
targetRef.current.scrollIntoView({
|
|
35
|
-
behavior: "smooth",
|
|
36
|
-
block: "center",
|
|
37
|
-
inline: "center"
|
|
38
|
-
});
|
|
39
|
-
const middlewares = [
|
|
40
|
-
offset(10),
|
|
41
|
-
flip(),
|
|
42
|
-
shift({ padding: 5 }),
|
|
43
|
-
arrow({ element: arrowRef.current })
|
|
44
|
-
];
|
|
45
|
-
const cleanup = autoUpdate(targetRef.current, tooltipRef.current, () => {
|
|
46
|
-
if (targetRef.current && tooltipRef.current) computePosition(targetRef.current, tooltipRef.current, {
|
|
47
|
-
placement: align,
|
|
48
|
-
strategy: "fixed",
|
|
49
|
-
middleware: middlewares
|
|
50
|
-
}).then(({ x, y, placement, middlewareData }) => {
|
|
51
|
-
if (tooltipRef.current) Object.assign(tooltipRef.current.style, {
|
|
52
|
-
left: `${x}px`,
|
|
53
|
-
top: `${y}px`
|
|
54
|
-
});
|
|
55
|
-
const arrowX = middlewareData.arrow?.x;
|
|
56
|
-
const arrowY = middlewareData.arrow?.y;
|
|
57
|
-
const staticSide = {
|
|
58
|
-
top: "bottom",
|
|
59
|
-
right: "left",
|
|
60
|
-
bottom: "top",
|
|
61
|
-
left: "right"
|
|
62
|
-
}[placement.split("-")[0]];
|
|
63
|
-
if (staticSide && arrowRef.current) Object.assign(arrowRef.current.style, {
|
|
64
|
-
left: arrowX != null ? `${arrowX}px` : "",
|
|
65
|
-
top: arrowY != null ? `${arrowY}px` : "",
|
|
66
|
-
right: "",
|
|
67
|
-
bottom: "",
|
|
68
|
-
[staticSide]: "-4px"
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}, { animationFrame: true });
|
|
72
|
-
return () => {
|
|
73
|
-
cleanup();
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}, [
|
|
78
|
-
target,
|
|
79
|
-
open,
|
|
80
|
-
align
|
|
81
|
-
]);
|
|
82
|
-
if (!target) return null;
|
|
83
|
-
const mergedRefs = (node) => {
|
|
84
|
-
tooltipRef.current = node;
|
|
85
|
-
if (typeof ref === "function") ref(node);
|
|
86
|
-
else if (ref) ref.current = node;
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
89
|
-
...rest,
|
|
90
|
-
ref: mergedRefs,
|
|
91
|
-
className: (0, import_classnames.default)({
|
|
92
|
-
[`${carbonPrefix}--g100`]: theme === "white" && highContrast || theme === "g100" && !highContrast,
|
|
93
|
-
[`${carbonPrefix}--g90`]: theme === "g10" && highContrast || theme === "g90" && !highContrast,
|
|
94
|
-
[`${carbonPrefix}--g10`]: theme === "g90" && highContrast || theme === "g10" && !highContrast,
|
|
95
|
-
[`${carbonPrefix}--white`]: theme === "g100" && highContrast || theme === "white" && !highContrast,
|
|
96
|
-
[`${pkg.prefix}__bubble`]: true,
|
|
97
|
-
[`${pkg.prefix}__bubble-open`]: open,
|
|
98
|
-
[`${pkg.prefix}__bubble-drop-shadow`]: dropShadow,
|
|
99
|
-
[`${pkg.prefix}__bubble-high-contrast`]: highContrast,
|
|
100
|
-
[`${pkg.prefix}__bubble-hidden`]: !targetRef.current
|
|
101
|
-
}, className)
|
|
102
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
103
|
-
ref: arrowRef,
|
|
104
|
-
className: !caret ? `${pkg.prefix}__bubble__arrow` : ""
|
|
105
|
-
}), children);
|
|
106
|
-
});
|
|
107
|
-
CoachmarkBubble.displayName = "CoachmarkBubble";
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
export { CoachmarkBubble };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { __toESM } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
9
|
-
import { require_classnames } from "../../../../../node_modules/classnames/index.js";
|
|
10
|
-
import { pkg } from "../../../../../settings.js";
|
|
11
|
-
import React from "react";
|
|
12
|
-
|
|
13
|
-
//#region src/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.tsx
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
*
|
|
17
|
-
* Copyright IBM Corp. 2025
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
|
|
23
|
-
const CoachmarkBubbleHeader = ({ children, className, ...rest }) => {
|
|
24
|
-
return /* @__PURE__ */ React.createElement("header", {
|
|
25
|
-
...rest,
|
|
26
|
-
className: (0, import_classnames.default)(`${pkg.prefix}__bubble__header`, className)
|
|
27
|
-
}, children);
|
|
28
|
-
};
|
|
29
|
-
CoachmarkBubbleHeader.displayName = "CoachmarkBubbleHeader";
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { CoachmarkBubbleHeader };
|