@carbon/upgrade 11.38.0 → 11.39.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.
@@ -0,0 +1,66 @@
1
+ import { Theme, Button } from "@carbon/react";
2
+ import React, { useState } from 'react';
3
+ import {
4
+ preview__Coachmark as Coachmark,
5
+ preview__CoachmarkBeacon as CoachmarkBeacon,
6
+ } from '@carbon/ibm-products';
7
+ import { Crossroads } from '@carbon/react/icons';
8
+
9
+ // Example 1: Basic Coachmark with Beacon and dark theme
10
+ export const Example1 = () => {
11
+ const [isOpen, setIsOpen] = useState(true);
12
+
13
+ const handleBeaconClick = () => {
14
+ setIsOpen(isOpen => !isOpen);
15
+ };
16
+
17
+ return (
18
+ <Theme theme="white"><Coachmark align="bottom" position={{ x: 0, y: 0 }} open={isOpen}><CoachmarkBeacon
19
+ label="Show information"
20
+ buttonProps={{
21
+ onClick: handleBeaconClick,
22
+ id: "CoachmarkBtn"
23
+ }} /><Coachmark.Content><Coachmark.Content.Header closeIconDescription="Close" /><Coachmark.Content.Body><h2>Hello World</h2><p>this is a description test</p><Button size="sm">Done</Button></Coachmark.Content.Body></Coachmark.Content></Coachmark></Theme>
24
+ );
25
+ };
26
+
27
+ // Example 2: Coachmark with Button target and light theme
28
+ export const Example2 = () => {
29
+ const [isOpen, setIsOpen] = useState(true);
30
+
31
+ const handleButtonClick = () => {
32
+ setIsOpen(isOpen => !isOpen);
33
+ };
34
+
35
+ return (
36
+ <Theme theme="white"><Coachmark align="top" position={{ x: 10, y: 20 }} open={isOpen}><Button
37
+ id="CoachmarkTriggerRefBtn"
38
+ onClick={handleButtonClick}
39
+ kind="tertiary"
40
+ size="md"
41
+ renderIcon={Crossroads}>Click Me
42
+ </Button><Coachmark.Content><Coachmark.Content.Header closeIconDescription="Close" /><Coachmark.Content.Body><h2>Welcome</h2><p>This is your dashboard</p><Button size="sm">Got it</Button></Coachmark.Content.Body></Coachmark.Content></Coachmark></Theme>
43
+ );
44
+ };
45
+
46
+ // Example 3: Floating Coachmark
47
+ export const Example3 = () => {
48
+ const [isOpen, setIsOpen] = useState(true);
49
+
50
+ const handleBeaconClick = () => {
51
+ setIsOpen(isOpen => !isOpen);
52
+ };
53
+
54
+ return (
55
+ <Theme theme="g90"><Coachmark
56
+ align="bottom-left"
57
+ position={{ x: 5, y: 5 }}
58
+ open={isOpen}
59
+ floating={true}><CoachmarkBeacon
60
+ label="Learn more"
61
+ buttonProps={{
62
+ onClick: handleBeaconClick,
63
+ id: "CoachmarkBtn"
64
+ }} /><Coachmark.Content><Coachmark.Content.Header closeIconDescription="Dismiss" /><Coachmark.Content.Body><h2>New Feature</h2><p>Check out this new feature</p><Button size="sm">Close</Button></Coachmark.Content.Body></Coachmark.Content></Coachmark></Theme>
65
+ );
66
+ };
@@ -0,0 +1,17 @@
1
+ import { Button, preview__PageHeader as PageHeader } from '@carbon/react';
2
+ import {
3
+ PageHeaderBreadcrumbBar,
4
+ PageHeaderContent,
5
+ PageHeaderTabBar,
6
+ } from '@carbon/react';
7
+
8
+ const Example = () => (
9
+ <>
10
+ <Button />
11
+ <PageHeader.Root>
12
+ <PageHeaderBreadcrumbBar />
13
+ <PageHeaderContent title="Title" />
14
+ <PageHeaderTabBar />
15
+ </PageHeader.Root>
16
+ </>
17
+ );
@@ -0,0 +1,13 @@
1
+ import { Button } from '@carbon/react';
2
+ import { PageHeader, PageHeaderBreadcrumbBar, PageHeaderContent, PageHeaderTabBar } from "@carbon/ibm-products";
3
+
4
+ const Example = () => (
5
+ <>
6
+ <Button />
7
+ <PageHeader.Root>
8
+ <PageHeaderBreadcrumbBar />
9
+ <PageHeaderContent title="Title" />
10
+ <PageHeaderTabBar />
11
+ </PageHeader.Root>
12
+ </>
13
+ );
@@ -0,0 +1,6 @@
1
+ import {
2
+ PageHeader as PageHeaderDirect,
3
+ PageHeaderContentText,
4
+ } from '@carbon/react/es/components/PageHeader/index.js';
5
+ import '@carbon/web-components/es/components/page-header/index.js';
6
+ import '@carbon/web-components/lib/components/page-header/page-header-tabs.js';
@@ -0,0 +1,6 @@
1
+ import {
2
+ PageHeader as PageHeaderDirect,
3
+ PageHeaderContentText,
4
+ } from "@carbon/ibm-products";
5
+ import "@carbon/ibm-products-web-components/es/components/page-header/index.js";
6
+ import "@carbon/ibm-products-web-components/lib/components/page-header/page-header-tabs.js";
@@ -0,0 +1,3 @@
1
+ import { Link } from '@carbon/react';
2
+ import { PageHeader } from '@carbon/ibm-products';
3
+ import '@carbon/ibm-products-web-components/es/components/page-header/index.js';
@@ -0,0 +1,3 @@
1
+ import { Link } from '@carbon/react';
2
+ import { PageHeader } from '@carbon/ibm-products';
3
+ import '@carbon/ibm-products-web-components/es/components/page-header/index.js';
@@ -0,0 +1,18 @@
1
+ import {
2
+ Link,
3
+ preview__PageHeader as PageHeader,
4
+ PageHeaderContent,
5
+ } from '@carbon/react';
6
+ import { ProductiveCard } from '@carbon/ibm-products';
7
+ import { PageHeaderContentText as Text } from '@carbon/react/es/components/PageHeader/index.js';
8
+
9
+ const Example = () => (
10
+ <>
11
+ <Link href="#" />
12
+ <PageHeader.Root>
13
+ <PageHeaderContent title="Title" />
14
+ <Text>Example</Text>
15
+ </PageHeader.Root>
16
+ <ProductiveCard />
17
+ </>
18
+ );
@@ -0,0 +1,18 @@
1
+ import { Link } from '@carbon/react';
2
+ import {
3
+ ProductiveCard,
4
+ PageHeader,
5
+ PageHeaderContent,
6
+ PageHeaderContentText as Text,
7
+ } from '@carbon/ibm-products';
8
+
9
+ const Example = () => (
10
+ <>
11
+ <Link href="#" />
12
+ <PageHeader.Root>
13
+ <PageHeaderContent title="Title" />
14
+ <Text>Example</Text>
15
+ </PageHeader.Root>
16
+ <ProductiveCard />
17
+ </>
18
+ );
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright IBM Corp. 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
+ 'use strict';
9
+
10
+ const { defineTest } = require('jscodeshift/dist/testUtils');
11
+
12
+ defineTest(__dirname, 'ibm-products-update-coachmark');
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright IBM Corp. 2026, 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
+ 'use strict';
9
+
10
+ const { defineTest } = require('jscodeshift/dist/testUtils');
11
+
12
+ defineTest(__dirname, 'ibm-products-update-page-header');
13
+ defineTest(
14
+ __dirname,
15
+ 'ibm-products-update-page-header',
16
+ null,
17
+ 'ibm-products-update-page-header2'
18
+ );
19
+ defineTest(
20
+ __dirname,
21
+ 'ibm-products-update-page-header',
22
+ null,
23
+ 'ibm-products-update-page-header3'
24
+ );
25
+ defineTest(
26
+ __dirname,
27
+ 'ibm-products-update-page-header',
28
+ null,
29
+ 'ibm-products-update-page-header4'
30
+ );