@carbon/ibm-products-web-components 0.32.0 → 0.33.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/custom-elements.json +6 -0
- package/es/components/about-modal/about-modal.scss.js +1 -1
- package/es/components/coachmark/coachmark-header.js +6 -1
- package/es/components/coachmark/coachmark-header.js.map +1 -1
- package/es/components/coachmark/coachmark.d.ts +7 -0
- package/es/components/coachmark/coachmark.js +21 -1
- package/es/components/coachmark/coachmark.js.map +1 -1
- package/es/components/coachmark/coachmark.scss.js +1 -1
- package/es/components/notification-panel/notification-footer.scss.js +1 -1
- package/es/components/notification-panel/notification-panel.scss.js +1 -1
- package/es/components/notification-panel/notification.scss.js +1 -1
- package/es/components/page-header/_story-assets/set-of-breadcrumbs.scss.js +1 -1
- package/es/components/page-header/_story-assets/set-of-tags/set-of-tags.scss.js +1 -1
- package/es/components/page-header/page-header.figma.js +248 -0
- package/es/components/page-header/page-header.figma.js.map +1 -0
- package/es/components/page-header/utils.js +6 -0
- package/es/components/page-header/utils.js.map +1 -1
- package/es/components/side-panel/side-panel.scss.js +1 -1
- package/es/components/tearsheet/tearsheet.scss.js +1 -1
- package/es/packages/ibm-products-web-components/package.json.js +1 -1
- package/es-custom/components/about-modal/about-modal.scss.js +1 -1
- package/es-custom/components/coachmark/coachmark-header.js +6 -1
- package/es-custom/components/coachmark/coachmark-header.js.map +1 -1
- package/es-custom/components/coachmark/coachmark.d.ts +7 -0
- package/es-custom/components/coachmark/coachmark.js +21 -1
- package/es-custom/components/coachmark/coachmark.js.map +1 -1
- package/es-custom/components/coachmark/coachmark.scss.js +1 -1
- package/es-custom/components/notification-panel/notification-footer.scss.js +1 -1
- package/es-custom/components/notification-panel/notification-panel.scss.js +1 -1
- package/es-custom/components/notification-panel/notification.scss.js +1 -1
- package/es-custom/components/page-header/_story-assets/set-of-breadcrumbs.scss.js +1 -1
- package/es-custom/components/page-header/_story-assets/set-of-tags/set-of-tags.scss.js +1 -1
- package/es-custom/components/page-header/page-header.figma.js +248 -0
- package/es-custom/components/page-header/page-header.figma.js.map +1 -0
- package/es-custom/components/page-header/utils.js +6 -0
- package/es-custom/components/page-header/utils.js.map +1 -1
- package/es-custom/components/side-panel/side-panel.scss.js +1 -1
- package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
- package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
- package/lib/components/coachmark/coachmark.d.ts +7 -0
- package/package.json +16 -16
- package/scss/components/about-modal/about-modal.scss +9 -10
- package/scss/components/coachmark/coachmark.scss +4 -0
- package/scss/components/full-page-error/full-page-error.scss +0 -1
- package/scss/components/options-tile/options-tile.scss +1 -1
- package/scss/components/side-panel/side-panel.scss +16 -15
- package/scss/components/tearsheet/tearsheet.scss +38 -35
- package/scss/components/truncated-text/truncated-text.scss +9 -9
- package/scss/components/user-avatar/user-avatar.scss +0 -1
- package/telemetry.yml +1 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024
|
|
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 figma, { html } from '@figma/code-connect/html';
|
|
9
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
10
|
+
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
|
11
|
+
import '@carbon/web-components/es-custom/components/breadcrumb/index.js';
|
|
12
|
+
import '@carbon/web-components/es-custom/components/tabs/index.js';
|
|
13
|
+
import '@carbon/web-components/es-custom/components/tag/index.js';
|
|
14
|
+
import { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';
|
|
15
|
+
import Bee32 from '@carbon/icons/es/bee/32.js';
|
|
16
|
+
import Bee16 from '@carbon/icons/es/bee/16.js';
|
|
17
|
+
import Activity16 from '@carbon/icons/es/activity/16.js';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Copyright IBM Corp. 2025, 2025
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// Breadcrumb bar
|
|
28
|
+
figma.connect(
|
|
29
|
+
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=41243-6410',
|
|
30
|
+
{
|
|
31
|
+
props: {
|
|
32
|
+
icon: figma.boolean('Icon', {
|
|
33
|
+
true: html`${iconLoader(Bee16, { slot: 'icon' })}`,
|
|
34
|
+
false: undefined,
|
|
35
|
+
}),
|
|
36
|
+
contentActions: figma.boolean('Buttons', {
|
|
37
|
+
true: html`<div slot="content-actions">
|
|
38
|
+
<cds-custom-button size="md">Button</cds-custom-button>
|
|
39
|
+
</div>`,
|
|
40
|
+
false: undefined,
|
|
41
|
+
}),
|
|
42
|
+
pageActions: figma.boolean('Actions', {
|
|
43
|
+
true: html`<cds-custom-icon-button
|
|
44
|
+
slot="page-actions"
|
|
45
|
+
kind="ghost"
|
|
46
|
+
size="md"
|
|
47
|
+
align="bottom"
|
|
48
|
+
>
|
|
49
|
+
${iconLoader(Activity16, { slot: 'icon' })}
|
|
50
|
+
<span slot="tooltip-content">action 1</span>
|
|
51
|
+
</cds-custom-icon-button>
|
|
52
|
+
<cds-custom-icon-button
|
|
53
|
+
slot="page-actions"
|
|
54
|
+
kind="ghost"
|
|
55
|
+
size="md"
|
|
56
|
+
align="bottom"
|
|
57
|
+
>
|
|
58
|
+
${iconLoader(Activity16, { slot: 'icon' })}
|
|
59
|
+
<span slot="tooltip-content">action 2</span>
|
|
60
|
+
</cds-custom-icon-button>
|
|
61
|
+
<cds-custom-icon-button
|
|
62
|
+
slot="page-actions"
|
|
63
|
+
kind="ghost"
|
|
64
|
+
size="md"
|
|
65
|
+
align="bottom"
|
|
66
|
+
>
|
|
67
|
+
${iconLoader(Activity16, { slot: 'icon' })}
|
|
68
|
+
<span slot="tooltip-content">action 3</span>
|
|
69
|
+
</cds-custom-icon-button>`,
|
|
70
|
+
false: undefined,
|
|
71
|
+
}),
|
|
72
|
+
border: figma.boolean('Bottom border'),
|
|
73
|
+
},
|
|
74
|
+
example: (props) => {
|
|
75
|
+
return html` <c4p-page-header-breadcrumb border=${props.border}>
|
|
76
|
+
${props.icon}
|
|
77
|
+
<cds-custom-breadcrumb>
|
|
78
|
+
<cds-custom-breadcrumb-item>
|
|
79
|
+
<cds-custom-breadcrumb-link href="#">Breadcrumb</cds-custom-breadcrumb-link>
|
|
80
|
+
</cds-custom-breadcrumb-item>
|
|
81
|
+
<cds-custom-breadcrumb-item>
|
|
82
|
+
<cds-custom-breadcrumb-link href="#">Breadcrumb</cds-custom-breadcrumb-link>
|
|
83
|
+
</cds-custom-breadcrumb-item>
|
|
84
|
+
<cds-custom-breadcrumb-item>
|
|
85
|
+
<cds-custom-breadcrumb-link href="#">Breadcrumb</cds-custom-breadcrumb-link>
|
|
86
|
+
</cds-custom-breadcrumb-item>
|
|
87
|
+
<cds-custom-breadcrumb-item>
|
|
88
|
+
<cds-custom-breadcrumb-link href="#">Breadcrumb</cds-custom-breadcrumb-link>
|
|
89
|
+
</cds-custom-breadcrumb-item>
|
|
90
|
+
</cds-custom-breadcrumb>
|
|
91
|
+
${props.contentActions} ${props.pageActions}
|
|
92
|
+
</c4p-page-header-breadcrumb>`;
|
|
93
|
+
},
|
|
94
|
+
imports: [
|
|
95
|
+
"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'",
|
|
96
|
+
],
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
// Tab bar
|
|
101
|
+
figma.connect(
|
|
102
|
+
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=41241-4083',
|
|
103
|
+
{
|
|
104
|
+
props: {
|
|
105
|
+
tabs: figma.boolean('Tabs', {
|
|
106
|
+
true: html`<cds-custom-tabs value="tab-1">
|
|
107
|
+
<cds-custom-tab id="tab-1" target="tab-panel-1" value="tab-1">
|
|
108
|
+
Tab label
|
|
109
|
+
</cds-custom-tab>
|
|
110
|
+
<cds-custom-tab id="tab-2" target="tab-panel-2" value="tab-2">
|
|
111
|
+
Tab label
|
|
112
|
+
</cds-custom-tab>
|
|
113
|
+
</cds-custom-tabs>`,
|
|
114
|
+
false: undefined,
|
|
115
|
+
}),
|
|
116
|
+
tags: figma.boolean('Tags', {
|
|
117
|
+
true: html`<div slot="tags">
|
|
118
|
+
<cds-custom-tag type="blue" size="md">Tag</cds-custom-tag>
|
|
119
|
+
<cds-custom-tag type="blue" size="md">Tag</cds-custom-tag>
|
|
120
|
+
</div>`,
|
|
121
|
+
false: undefined,
|
|
122
|
+
}),
|
|
123
|
+
scroller: figma.boolean('Collapsable button', {
|
|
124
|
+
true: html` <c4p-page-header-scroller slot="scroller">
|
|
125
|
+
</c4p-page-header-scroller>`,
|
|
126
|
+
false: undefined,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
example: (props) => {
|
|
130
|
+
return html`<c4p-page-header-tabs>
|
|
131
|
+
${props.scroller} ${props.tabs} ${props.tags}
|
|
132
|
+
</c4p-page-header-tabs>`;
|
|
133
|
+
},
|
|
134
|
+
imports: [
|
|
135
|
+
"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'",
|
|
136
|
+
],
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
const sharedProps = {
|
|
141
|
+
title: figma.nestedProps('_Title', {
|
|
142
|
+
text: figma.string('Title text'),
|
|
143
|
+
icon: figma.boolean('Leading icon', {
|
|
144
|
+
true: html`${iconLoader(Bee32, { slot: 'icon' })}`,
|
|
145
|
+
false: undefined,
|
|
146
|
+
}),
|
|
147
|
+
tags: figma.boolean('Slot', {
|
|
148
|
+
true: html`<div slot="contextual-actions">
|
|
149
|
+
<cds-custom-tag type="blue" size="lg">Tag</cds-custom-tag>
|
|
150
|
+
</div>`,
|
|
151
|
+
false: undefined,
|
|
152
|
+
}),
|
|
153
|
+
}),
|
|
154
|
+
summary: figma.nestedProps('_Summary', {
|
|
155
|
+
text: figma.string('Summary text'),
|
|
156
|
+
}),
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
figma.connect(
|
|
160
|
+
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=31080%3A23323',
|
|
161
|
+
{
|
|
162
|
+
variant: { Style: 'Action' },
|
|
163
|
+
props: {
|
|
164
|
+
...sharedProps,
|
|
165
|
+
breadcrumbBar: figma.boolean('Breadcrumb bar', {
|
|
166
|
+
true: figma.children('_Breadcrumb bar'),
|
|
167
|
+
false: undefined,
|
|
168
|
+
}),
|
|
169
|
+
header: figma.nestedProps('_Content', {
|
|
170
|
+
actions: figma.boolean('Actions', {
|
|
171
|
+
true: html` <div slot="page-actions">
|
|
172
|
+
<cds-custom-button size="md">Button</cds-custom-button>
|
|
173
|
+
</div>`,
|
|
174
|
+
false: undefined,
|
|
175
|
+
}),
|
|
176
|
+
subtitle: figma.boolean('Subtitle', {
|
|
177
|
+
true: figma.textContent('Subtitle'),
|
|
178
|
+
false: undefined,
|
|
179
|
+
}),
|
|
180
|
+
}),
|
|
181
|
+
tabBar: figma.boolean('Tab bar', {
|
|
182
|
+
true: figma.children('_Tab bar'),
|
|
183
|
+
false: undefined,
|
|
184
|
+
}),
|
|
185
|
+
},
|
|
186
|
+
example: (props) =>
|
|
187
|
+
html`<c4p-page-header>
|
|
188
|
+
${props.breadcrumbBar}
|
|
189
|
+
<c4p-page-header-content title=${props.title.text}>
|
|
190
|
+
${props.title.icon} ${props.title.tags} ${props.header.actions}
|
|
191
|
+
<c4p-page-header-content-text subtitle=${props.header.subtitle}>
|
|
192
|
+
${props.summary.text}
|
|
193
|
+
</c4p-page-header-content-text>
|
|
194
|
+
</c4p-page-header-content>
|
|
195
|
+
${props.tabBar}
|
|
196
|
+
</c4p-page-header>`,
|
|
197
|
+
imports: [
|
|
198
|
+
"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'",
|
|
199
|
+
],
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
figma.connect(
|
|
204
|
+
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=31080%3A23323',
|
|
205
|
+
{
|
|
206
|
+
variant: { Style: 'Image' },
|
|
207
|
+
props: {
|
|
208
|
+
...sharedProps,
|
|
209
|
+
content: figma.nestedProps('_Content expressive', {
|
|
210
|
+
subtitle: figma.boolean('Subtitle', {
|
|
211
|
+
true: figma.textContent('Subtitle'),
|
|
212
|
+
false: undefined,
|
|
213
|
+
}),
|
|
214
|
+
}),
|
|
215
|
+
},
|
|
216
|
+
example: (props) => {
|
|
217
|
+
return html`<c4p-page-header>
|
|
218
|
+
<div class="cds-custom--css-grid">
|
|
219
|
+
<div
|
|
220
|
+
class="cds-custom--sm:col-span-4 cds-custom--md:col-span-4 cds-custom--lg:col-span-8 cds-custom--css-grid-column"
|
|
221
|
+
>
|
|
222
|
+
<c4p-page-header-content within-grid title=${props.title.text}>
|
|
223
|
+
${props.title.icon} ${props.title.tags}
|
|
224
|
+
<c4p-page-header-content-text subtitle=${props.content.subtitle}>
|
|
225
|
+
${props.summary.text}
|
|
226
|
+
</c4p-page-header-content-text>
|
|
227
|
+
</c4p-page-header-content>
|
|
228
|
+
</div>
|
|
229
|
+
<div
|
|
230
|
+
class="cds-custom--sm:col-span-0 cds-custom--md:col-span-4 cds-custom--lg:col-span-8 cds-custom--css-grid-column"
|
|
231
|
+
>
|
|
232
|
+
<c4p-page-header-hero-image>
|
|
233
|
+
<img
|
|
234
|
+
src="image1"
|
|
235
|
+
alt="a default image"
|
|
236
|
+
style="max-width:100%;height:auto"
|
|
237
|
+
/>
|
|
238
|
+
</c4p-page-header-hero-image>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
</c4p-page-header>`;
|
|
242
|
+
},
|
|
243
|
+
imports: [
|
|
244
|
+
"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'",
|
|
245
|
+
],
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
//# sourceMappingURL=page-header.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.figma.js","sources":["../../../src/components/page-header/page-header.figma.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2025, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport figma, { html } from '@figma/code-connect/html';\nimport '@carbon/web-components/es-custom/components/button/index.js';\nimport '@carbon/web-components/es-custom/components/icon-button/index.js';\nimport '@carbon/web-components/es-custom/components/breadcrumb/index.js';\nimport '@carbon/web-components/es-custom/components/tabs/index.js';\nimport '@carbon/web-components/es-custom/components/tag/index.js';\nimport { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';\n\nimport Bee32 from '@carbon/icons/es/bee/32.js';\nimport Bee16 from '@carbon/icons/es/bee/16.js';\nimport Activity16 from '@carbon/icons/es/activity/16.js';\n\n// Breadcrumb bar\nfigma.connect(\n 'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=41243-6410',\n {\n props: {\n icon: figma.boolean('Icon', {\n true: html`${iconLoader(Bee16, { slot: 'icon' })}`,\n false: undefined,\n }),\n contentActions: figma.boolean('Buttons', {\n true: html`<div slot=\"content-actions\">\n <cds-custom-button size=\"md\">Button</cds-custom-button>\n </div>`,\n false: undefined,\n }),\n pageActions: figma.boolean('Actions', {\n true: html`<cds-custom-icon-button\n slot=\"page-actions\"\n kind=\"ghost\"\n size=\"md\"\n align=\"bottom\"\n >\n ${iconLoader(Activity16, { slot: 'icon' })}\n <span slot=\"tooltip-content\">action 1</span>\n </cds-custom-icon-button>\n <cds-custom-icon-button\n slot=\"page-actions\"\n kind=\"ghost\"\n size=\"md\"\n align=\"bottom\"\n >\n ${iconLoader(Activity16, { slot: 'icon' })}\n <span slot=\"tooltip-content\">action 2</span>\n </cds-custom-icon-button>\n <cds-custom-icon-button\n slot=\"page-actions\"\n kind=\"ghost\"\n size=\"md\"\n align=\"bottom\"\n >\n ${iconLoader(Activity16, { slot: 'icon' })}\n <span slot=\"tooltip-content\">action 3</span>\n </cds-custom-icon-button>`,\n false: undefined,\n }),\n border: figma.boolean('Bottom border'),\n },\n example: (props) => {\n return html` <c4p-page-header-breadcrumb border=${props.border}>\n ${props.icon}\n <cds-custom-breadcrumb>\n <cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-link href=\"#\">Breadcrumb</cds-custom-breadcrumb-link>\n </cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-link href=\"#\">Breadcrumb</cds-custom-breadcrumb-link>\n </cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-link href=\"#\">Breadcrumb</cds-custom-breadcrumb-link>\n </cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-item>\n <cds-custom-breadcrumb-link href=\"#\">Breadcrumb</cds-custom-breadcrumb-link>\n </cds-custom-breadcrumb-item>\n </cds-custom-breadcrumb>\n ${props.contentActions} ${props.pageActions}\n </c4p-page-header-breadcrumb>`;\n },\n imports: [\n \"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'\",\n ],\n }\n);\n\n// Tab bar\nfigma.connect(\n 'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=41241-4083',\n {\n props: {\n tabs: figma.boolean('Tabs', {\n true: html`<cds-custom-tabs value=\"tab-1\">\n <cds-custom-tab id=\"tab-1\" target=\"tab-panel-1\" value=\"tab-1\">\n Tab label\n </cds-custom-tab>\n <cds-custom-tab id=\"tab-2\" target=\"tab-panel-2\" value=\"tab-2\">\n Tab label\n </cds-custom-tab>\n </cds-custom-tabs>`,\n false: undefined,\n }),\n tags: figma.boolean('Tags', {\n true: html`<div slot=\"tags\">\n <cds-custom-tag type=\"blue\" size=\"md\">Tag</cds-custom-tag>\n <cds-custom-tag type=\"blue\" size=\"md\">Tag</cds-custom-tag>\n </div>`,\n false: undefined,\n }),\n scroller: figma.boolean('Collapsable button', {\n true: html` <c4p-page-header-scroller slot=\"scroller\">\n </c4p-page-header-scroller>`,\n false: undefined,\n }),\n },\n example: (props) => {\n return html`<c4p-page-header-tabs>\n ${props.scroller} ${props.tabs} ${props.tags}\n </c4p-page-header-tabs>`;\n },\n imports: [\n \"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'\",\n ],\n }\n);\n\nconst sharedProps = {\n title: figma.nestedProps('_Title', {\n text: figma.string('Title text'),\n icon: figma.boolean('Leading icon', {\n true: html`${iconLoader(Bee32, { slot: 'icon' })}`,\n false: undefined,\n }),\n tags: figma.boolean('Slot', {\n true: html`<div slot=\"contextual-actions\">\n <cds-custom-tag type=\"blue\" size=\"lg\">Tag</cds-custom-tag>\n </div>`,\n false: undefined,\n }),\n }),\n summary: figma.nestedProps('_Summary', {\n text: figma.string('Summary text'),\n }),\n};\n\nfigma.connect(\n 'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=31080%3A23323',\n {\n variant: { Style: 'Action' },\n props: {\n ...sharedProps,\n breadcrumbBar: figma.boolean('Breadcrumb bar', {\n true: figma.children('_Breadcrumb bar'),\n false: undefined,\n }),\n header: figma.nestedProps('_Content', {\n actions: figma.boolean('Actions', {\n true: html` <div slot=\"page-actions\">\n <cds-custom-button size=\"md\">Button</cds-custom-button>\n </div>`,\n false: undefined,\n }),\n subtitle: figma.boolean('Subtitle', {\n true: figma.textContent('Subtitle'),\n false: undefined,\n }),\n }),\n tabBar: figma.boolean('Tab bar', {\n true: figma.children('_Tab bar'),\n false: undefined,\n }),\n },\n example: (props) =>\n html`<c4p-page-header>\n ${props.breadcrumbBar}\n <c4p-page-header-content title=${props.title.text}>\n ${props.title.icon} ${props.title.tags} ${props.header.actions}\n <c4p-page-header-content-text subtitle=${props.header.subtitle}>\n ${props.summary.text}\n </c4p-page-header-content-text>\n </c4p-page-header-content>\n ${props.tabBar}\n </c4p-page-header>`,\n imports: [\n \"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'\",\n ],\n }\n);\n\nfigma.connect(\n 'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=31080%3A23323',\n {\n variant: { Style: 'Image' },\n props: {\n ...sharedProps,\n content: figma.nestedProps('_Content expressive', {\n subtitle: figma.boolean('Subtitle', {\n true: figma.textContent('Subtitle'),\n false: undefined,\n }),\n }),\n },\n example: (props) => {\n return html`<c4p-page-header>\n <div class=\"cds-custom--css-grid\">\n <div\n class=\"cds-custom--sm:col-span-4 cds-custom--md:col-span-4 cds-custom--lg:col-span-8 cds-custom--css-grid-column\"\n >\n <c4p-page-header-content within-grid title=${props.title.text}>\n ${props.title.icon} ${props.title.tags}\n <c4p-page-header-content-text subtitle=${props.content.subtitle}>\n ${props.summary.text}\n </c4p-page-header-content-text>\n </c4p-page-header-content>\n </div>\n <div\n class=\"cds-custom--sm:col-span-0 cds-custom--md:col-span-4 cds-custom--lg:col-span-8 cds-custom--css-grid-column\"\n >\n <c4p-page-header-hero-image>\n <img\n src=\"image1\"\n alt=\"a default image\"\n style=\"max-width:100%;height:auto\"\n />\n </c4p-page-header-hero-image>\n </div>\n </div>\n </c4p-page-header>`;\n },\n imports: [\n \"import '@carbon/ibm-products-web-components/es/components/page-header/index.js'\",\n ],\n }\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAcA;AAC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,CAAC;AACV,OAAO,CAAC;AACR,KAAK;AACL,IAAI,OAAO,EAAE,CAAC,KAAK,KAAK;AACxB,MAAM,OAAO,IAAI,CAAC;AAClB;AACA;AACA;AACA;AACA,uDAAuD,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;AAC1E,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;AACpD,qDAAqD,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC9E,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,CAAC;AACzB,KAAK;AACL,IAAI,OAAO,EAAE;AACb,MAAM,iFAAiF;AACvF,KAAK;AACL;AACA,CAAC"}
|
|
@@ -48,6 +48,12 @@ const windowExists = typeof window !== `undefined`;
|
|
|
48
48
|
*/
|
|
49
49
|
const scrollable = (target) => {
|
|
50
50
|
const style = window.getComputedStyle(target);
|
|
51
|
+
const tagName = target.tagName.toLowerCase();
|
|
52
|
+
// Exclude body/html from hidden check (modals set overflow:hidden on body)
|
|
53
|
+
if (tagName === 'body' || tagName === 'html') {
|
|
54
|
+
return /(auto|scroll)/.test(style.overflow);
|
|
55
|
+
}
|
|
56
|
+
// For other elements, include hidden as it may be intentional scroll container
|
|
51
57
|
return /(auto|scroll|hidden)/.test(style.overflow);
|
|
52
58
|
};
|
|
53
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/components/page-header/utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;AAIG;AAEU,MAAA,eAAe,GAAG,CAAC,EAAe,KAAY;AACzD,IAAA,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,EAAE,CAAC;;AAGlD,IAAA,M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