@octaviaflow/upgrade 1.0.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.
Files changed (58) hide show
  1. package/README.md +97 -0
  2. package/bin/carbon-upgrade.js +48 -0
  3. package/cli.js +53573 -0
  4. package/package.json +56 -0
  5. package/telemetry.yml +17 -0
  6. package/transforms/ARCHITECTURE.md +47 -0
  7. package/transforms/__testfixtures__/featureflag-deprecate-flags-prop.input.js +143 -0
  8. package/transforms/__testfixtures__/featureflag-deprecate-flags-prop.output.js +133 -0
  9. package/transforms/__testfixtures__/ibm-products-update-userprofileimage.input.js +57 -0
  10. package/transforms/__testfixtures__/ibm-products-update-userprofileimage.output.js +50 -0
  11. package/transforms/__testfixtures__/icons-react-size-prop-object-key.input.js +25 -0
  12. package/transforms/__testfixtures__/icons-react-size-prop-object-key.output.js +25 -0
  13. package/transforms/__testfixtures__/icons-react-size-prop-rename.input.js +53 -0
  14. package/transforms/__testfixtures__/icons-react-size-prop-rename.output.js +53 -0
  15. package/transforms/__testfixtures__/icons-react-size-prop-with-prop.input.js +25 -0
  16. package/transforms/__testfixtures__/icons-react-size-prop-with-prop.output.js +28 -0
  17. package/transforms/__testfixtures__/refactor-light-to-layer.input.js +23 -0
  18. package/transforms/__testfixtures__/refactor-light-to-layer.output.js +23 -0
  19. package/transforms/__testfixtures__/refactor-to-callout.input.js +34 -0
  20. package/transforms/__testfixtures__/refactor-to-callout.output.js +32 -0
  21. package/transforms/__testfixtures__/refactor-to-callout2.input.js +13 -0
  22. package/transforms/__testfixtures__/refactor-to-callout2.output.js +13 -0
  23. package/transforms/__testfixtures__/refactor-to-callout3.input.js +14 -0
  24. package/transforms/__testfixtures__/refactor-to-callout3.output.js +14 -0
  25. package/transforms/__testfixtures__/refactor-to-callout4.input.js +12 -0
  26. package/transforms/__testfixtures__/refactor-to-callout4.output.js +12 -0
  27. package/transforms/__testfixtures__/size-prop-update.input.js +152 -0
  28. package/transforms/__testfixtures__/size-prop-update.output.js +152 -0
  29. package/transforms/__testfixtures__/small-to-size-prop.input.js +20 -0
  30. package/transforms/__testfixtures__/small-to-size-prop.output.js +19 -0
  31. package/transforms/__testfixtures__/sort-prop-types.input.js +16 -0
  32. package/transforms/__testfixtures__/sort-prop-types.output.js +16 -0
  33. package/transforms/__testfixtures__/sort-prop-types2.input.js +16 -0
  34. package/transforms/__testfixtures__/sort-prop-types2.output.js +16 -0
  35. package/transforms/__testfixtures__/update-carbon-components-react-import-to-scoped.input.js +17 -0
  36. package/transforms/__testfixtures__/update-carbon-components-react-import-to-scoped.output.js +17 -0
  37. package/transforms/__testfixtures__/update-carbon-icons-react-import-to-carbon-react.input.js +17 -0
  38. package/transforms/__testfixtures__/update-carbon-icons-react-import-to-carbon-react.output.js +17 -0
  39. package/transforms/__tests__/featureflag-deprecate-flags-prop-test.js +15 -0
  40. package/transforms/__tests__/ibm-products-update-userprofileimage-test.js +21 -0
  41. package/transforms/__tests__/icons-react-size-prop.js +67 -0
  42. package/transforms/__tests__/refactor-light-to-layer-test.js +14 -0
  43. package/transforms/__tests__/refactor-to-callout.js +18 -0
  44. package/transforms/__tests__/size-prop-update-test.js +15 -0
  45. package/transforms/__tests__/small-to-size-test.js +15 -0
  46. package/transforms/__tests__/sort-prop-types-test.js +16 -0
  47. package/transforms/__tests__/update-carbon-components-react-import-to-scoped.js +15 -0
  48. package/transforms/__tests__/update-carbon-icons-react-import-to-carbon-react.js +15 -0
  49. package/transforms/featureflag-deprecate-flags-prop.js +89 -0
  50. package/transforms/ibm-products-update-userprofileimage.js +134 -0
  51. package/transforms/icons-react-size-prop.js +327 -0
  52. package/transforms/refactor-light-to-layer.js +117 -0
  53. package/transforms/refactor-to-callout.js +160 -0
  54. package/transforms/size-prop-update.js +143 -0
  55. package/transforms/small-to-size-prop.js +59 -0
  56. package/transforms/sort-prop-types.js +91 -0
  57. package/transforms/update-carbon-components-react-import-to-scoped.js +42 -0
  58. package/transforms/update-carbon-icons-react-import-to-carbon-react.js +42 -0
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@octaviaflow/upgrade",
3
+ "description": "A tool for upgrading OctaviaFlow versions",
4
+ "version": "1.0.0",
5
+ "license": "Apache-2.0",
6
+ "bin": {
7
+ "octaviaflow-upgrade": "./bin/octaviaflow-upgrade.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/octaviaflow-design-system.git",
12
+ "directory": "packages/upgrade"
13
+ },
14
+ "bugs": "https://github.com/octaviaflow-design-system/issues",
15
+ "files": [
16
+ "bin",
17
+ "cli.js",
18
+ "transforms",
19
+ "telemetry.yml"
20
+ ],
21
+ "keywords": [
22
+ "octaviaflow",
23
+ "components",
24
+ "react"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "scripts": {
30
+ "build": "esbuild src/cli.js --bundle --platform=node --outfile=cli.js --target=node14 --external:jscodeshift",
31
+ "clean": "rimraf cli.js",
32
+ "watch": "bun run build --watch"
33
+ },
34
+ "devDependencies": {
35
+ "chalk": "^4.1.1",
36
+ "change-case": "^4.1.2",
37
+ "esbuild": "^0.24.0",
38
+ "execa": "^5.1.1",
39
+ "fast-glob": "^3.2.11",
40
+ "fs-extra": "^11.0.0",
41
+ "inquirer": "^8.1.0",
42
+ "is-git-clean": "^1.1.0",
43
+ "jest-diff": "^28.1.0",
44
+ "lodash.clonedeep": "^4.5.0",
45
+ "lodash.merge": "^4.6.2",
46
+ "memfs": "^4.0.0",
47
+ "nanoid": "^3.1.30",
48
+ "npm-which": "^3.0.1",
49
+ "rimraf": "^6.0.0",
50
+ "semver": "^7.3.5",
51
+ "yargs": "^17.0.1"
52
+ },
53
+ "dependencies": {
54
+ "jscodeshift": "^17.0.0"
55
+ }
56
+ }
package/telemetry.yml ADDED
@@ -0,0 +1,17 @@
1
+ # yaml-language-server: $schema=https://unpkg.com/@octaviaflow/telemetry-config-schema@v1.0.0/dist/config.schema.json
2
+ version: 1
3
+ projectId: '6d3533b7-48f9-4615-a86f-f90214cdb0b5'
4
+ name: 'OctaviaFlow Upgrade'
5
+ storage:
6
+ type: 'file'
7
+ file:
8
+ directory: '/Volumes/Main/Projects/OctaviaFlow-Design-System/telemetry-logs'
9
+ fileNamePattern: 'octaviaflow-upgrade-{timestamp}.json'
10
+ maxFileSizeMB: 10
11
+ compress: false
12
+ collect:
13
+ npm:
14
+ dependencies: null
15
+ js:
16
+ functions: {}
17
+ tokens: null
@@ -0,0 +1,47 @@
1
+ # transforms
2
+
3
+ > A folder of codemod transforms to be ran independently or via the
4
+ > @octaviaflow/upgrade cli
5
+
6
+ ## Usage
7
+
8
+ The transforms contained within this folder are primarily intended to be used
9
+ within @octaviaflow/upgrade cli commands.
10
+
11
+ You can run a specific transform for a path in the project by running:
12
+
13
+ ```bash
14
+ yarn jscodeshift -t transforms/<name>.js 'path/to/file'
15
+ ```
16
+
17
+ If you want to preview changes that are being made, you should enable the `dry`
18
+ and `print` options:
19
+
20
+ ```bash
21
+ yarn jscodeshift -d -p -t transforms/<name>.js 'path/to/file'
22
+ ```
23
+
24
+ ## Writing transforms
25
+
26
+ Transforms are written in the `transforms` directory with their tests and
27
+ fixtures written in the `__tests__` and `__testfixtures__` directories,
28
+ accordingly.
29
+
30
+ As an example, to add a transform called `sort-prop-types` one would create the
31
+ following files:
32
+
33
+ ```
34
+ - codemods
35
+ - transforms
36
+ - __testfixtures__
37
+ - sort-prop-types.input.js
38
+ - sort-prop-types.output.js
39
+ - __tests__
40
+ - sort-prop-types-test.js
41
+ - sort-prop-types.js
42
+ ```
43
+
44
+ In this structure, the test file will determine which test fixtures get run.
45
+ Test fixtures are written with a `*.input.js` and `*.output.js` convention.
46
+ Files that end with `*.input.js` are given to your transform and the test runner
47
+ will assert that the output matches what is available in `*.output.js`.
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { FeatureFlags } from '../FeatureFlags';
11
+ import {
12
+ RadioTile,
13
+ TileGroup,
14
+ TreeView,
15
+ VStack,
16
+ TreeNode,
17
+ OverflowMenu,
18
+ MenuItem,
19
+ } from '@octaviaflow/react';
20
+ import { Document, Folder } from '@octaviaflow/icons-react';
21
+ export const EnableV12TileDefaultIconsFlag = () => {
22
+ return (
23
+ <FeatureFlags flags={{ 'enable-v12-tile-default-icons': true }}>
24
+ <TileGroup legend="TestGroup" name="test">
25
+ <RadioTile id="test-1" value="test-1">
26
+ Option 1
27
+ </RadioTile>
28
+ <RadioTile id="test-2" value="test-2">
29
+ Option 2
30
+ </RadioTile>
31
+ </TileGroup>
32
+ </FeatureFlags>
33
+ );
34
+ };
35
+ export const EnableExperimentalFocusWrapWithoutSentinels = () => {
36
+ return (
37
+ // prettier-ignore
38
+ <FeatureFlags flags={{ 'enable-experimental-focus-wrap-without-sentinels': true }}>
39
+ <ActionableNotification
40
+ title="Notification title"
41
+ subtitle="Subtitle text goes here"
42
+ closeOnEscape
43
+ inline={false}
44
+ actionButtonLabel="Action"
45
+ />
46
+ </FeatureFlags>
47
+ );
48
+ };
49
+ export const EnableTreeviewControllable = (args) => {
50
+ return (
51
+ <div>
52
+ <FeatureFlags flags={{ 'enable-treeview-controllable': true }}>
53
+ <TreeView
54
+ label="Tree View"
55
+ active={true}
56
+ onActivate={() => {
57
+ console.log('test');
58
+ }}
59
+ selected={[]}
60
+ onSelect={() => {
61
+ console.log('test');
62
+ }}>
63
+ {renderTree(nodes)}
64
+ </TreeView>
65
+ </FeatureFlags>
66
+ </div>
67
+ );
68
+ };
69
+ export const EnableV12Overflowmenu = () => {
70
+ return (
71
+ <FeatureFlags flags={{ 'enable-v12-overflowmenu': true }}>
72
+ <OverflowMenu autoAlign={true}>
73
+ <MenuItem label="Stop app" />
74
+ <MenuItem label="Restart app" />
75
+ <MenuItem label="Rename app" />
76
+ <MenuItem label="Edit routes and access" />
77
+
78
+ <MenuItem label="Delete app" kind="danger" />
79
+ </OverflowMenu>
80
+ </FeatureFlags>
81
+ );
82
+ };
83
+ export const EnableV12TileRadioIcons = () => {
84
+ return (
85
+ <FeatureFlags flags={{ 'enable-v12-tile-radio-icons': true }}>
86
+ <TileGroup legend="TestGroup" name="test">
87
+ <RadioTile id="test-1" value="test-1">
88
+ Option 1
89
+ </RadioTile>
90
+ <RadioTile id="test-2" value="test-2">
91
+ Option 2
92
+ </RadioTile>
93
+ </TileGroup>
94
+ </FeatureFlags>
95
+ );
96
+ };
97
+ export const TestRegularJsx = () => {
98
+ return <div className={wrapperClasses}></div>;
99
+ };
100
+ export const CombinedFlags = () => {
101
+ return (
102
+ // prettier-ignore
103
+ <FeatureFlags
104
+ flags={{
105
+ 'enable-v12-tile-default-icons': true,
106
+ 'enable-v12-tile-radio-icons': true,
107
+ 'enable-v12-overflowmenu': true,
108
+ 'enable-treeview-controllable': true,
109
+ 'enable-experimental-focus-wrap-without-sentinels': true,
110
+ 'enable-v11-release': true,
111
+ 'enable-css-custom-properties': true,
112
+ 'enable-css-grid': true,
113
+ }}>
114
+ <TileGroup legend="TestGroup" name="test">
115
+ <RadioTile id="test-1" value="test-1">
116
+ Option 1
117
+ </RadioTile>
118
+ <RadioTile id="test-2" value="test-2">
119
+ Option 2
120
+ </RadioTile>
121
+ </TileGroup>
122
+ </FeatureFlags>
123
+ );
124
+ };
125
+ export const OldFlags = () => {
126
+ return (
127
+ <FeatureFlags
128
+ flags={{
129
+ 'enable-v11-release': true,
130
+ 'enable-css-custom-properties': true,
131
+ 'enable-css-grid': true,
132
+ }}>
133
+ <TileGroup legend="TestGroup" name="test">
134
+ <RadioTile id="test-1" value="test-1">
135
+ Option 1
136
+ </RadioTile>
137
+ <RadioTile id="test-2" value="test-2">
138
+ Option 2
139
+ </RadioTile>
140
+ </TileGroup>
141
+ </FeatureFlags>
142
+ );
143
+ };
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { FeatureFlags } from '../FeatureFlags';
11
+ import {
12
+ RadioTile,
13
+ TileGroup,
14
+ TreeView,
15
+ VStack,
16
+ TreeNode,
17
+ OverflowMenu,
18
+ MenuItem,
19
+ } from '@octaviaflow/react';
20
+ import { Document, Folder } from '@octaviaflow/icons-react';
21
+ export const EnableV12TileDefaultIconsFlag = () => {
22
+ return (
23
+ (<FeatureFlags enableV12TileDefaultIcons>
24
+ <TileGroup legend="TestGroup" name="test">
25
+ <RadioTile id="test-1" value="test-1">
26
+ Option 1
27
+ </RadioTile>
28
+ <RadioTile id="test-2" value="test-2">
29
+ Option 2
30
+ </RadioTile>
31
+ </TileGroup>
32
+ </FeatureFlags>)
33
+ );
34
+ };
35
+ export const EnableExperimentalFocusWrapWithoutSentinels = () => {
36
+ return (
37
+ // prettier-ignore
38
+ (<FeatureFlags enableExperimentalFocusWrapWithoutSentinels>
39
+ <ActionableNotification
40
+ title="Notification title"
41
+ subtitle="Subtitle text goes here"
42
+ closeOnEscape
43
+ inline={false}
44
+ actionButtonLabel="Action"
45
+ />
46
+ </FeatureFlags>)
47
+ );
48
+ };
49
+ export const EnableTreeviewControllable = (args) => {
50
+ return (
51
+ (<div>
52
+ <FeatureFlags enableTreeviewControllable>
53
+ <TreeView
54
+ label="Tree View"
55
+ active={true}
56
+ onActivate={() => {
57
+ console.log('test');
58
+ }}
59
+ selected={[]}
60
+ onSelect={() => {
61
+ console.log('test');
62
+ }}>
63
+ {renderTree(nodes)}
64
+ </TreeView>
65
+ </FeatureFlags>
66
+ </div>)
67
+ );
68
+ };
69
+ export const EnableV12Overflowmenu = () => {
70
+ return (
71
+ (<FeatureFlags enableV12Overflowmenu>
72
+ <OverflowMenu autoAlign={true}>
73
+ <MenuItem label="Stop app" />
74
+ <MenuItem label="Restart app" />
75
+ <MenuItem label="Rename app" />
76
+ <MenuItem label="Edit routes and access" />
77
+
78
+ <MenuItem label="Delete app" kind="danger" />
79
+ </OverflowMenu>
80
+ </FeatureFlags>)
81
+ );
82
+ };
83
+ export const EnableV12TileRadioIcons = () => {
84
+ return (
85
+ (<FeatureFlags enableV12TileRadioIcons>
86
+ <TileGroup legend="TestGroup" name="test">
87
+ <RadioTile id="test-1" value="test-1">
88
+ Option 1
89
+ </RadioTile>
90
+ <RadioTile id="test-2" value="test-2">
91
+ Option 2
92
+ </RadioTile>
93
+ </TileGroup>
94
+ </FeatureFlags>)
95
+ );
96
+ };
97
+ export const TestRegularJsx = () => {
98
+ return <div className={wrapperClasses}></div>;
99
+ };
100
+ export const CombinedFlags = () => {
101
+ return (
102
+ // prettier-ignore
103
+ (<FeatureFlags
104
+ enableV12TileDefaultIcons
105
+ enableV12TileRadioIcons
106
+ enableV12Overflowmenu
107
+ enableTreeviewControllable
108
+ enableExperimentalFocusWrapWithoutSentinels>
109
+ <TileGroup legend="TestGroup" name="test">
110
+ <RadioTile id="test-1" value="test-1">
111
+ Option 1
112
+ </RadioTile>
113
+ <RadioTile id="test-2" value="test-2">
114
+ Option 2
115
+ </RadioTile>
116
+ </TileGroup>
117
+ </FeatureFlags>)
118
+ );
119
+ };
120
+ export const OldFlags = () => {
121
+ return (
122
+ (<FeatureFlags>
123
+ <TileGroup legend="TestGroup" name="test">
124
+ <RadioTile id="test-1" value="test-1">
125
+ Option 1
126
+ </RadioTile>
127
+ <RadioTile id="test-2" value="test-2">
128
+ Option 2
129
+ </RadioTile>
130
+ </TileGroup>
131
+ </FeatureFlags>)
132
+ );
133
+ };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import React from 'react';
11
+ import { UserProfileImage } from '@octaviaflow/ibm-products';
12
+ import { Add } from '@octaviaflow/react/icons';
13
+
14
+ const ImageUrl =
15
+ 'https://img.freepik.com/free-photo/portrait-man-cartoon-style_23-2151133939.jpg?semt=ais_hybrid';
16
+
17
+ export const Example = () => (
18
+ <>
19
+ <UserProfileImage
20
+ size="md"
21
+ tooltipAlignment="bottom"
22
+ backgroundColor="light-purple"
23
+ theme="light"
24
+ tooltipText="Thomas Watson"
25
+ className="myClass"
26
+ initials="thomas j. watson"
27
+ />
28
+ <UserProfileImage
29
+ size="md"
30
+ tooltipAlignment="bottom"
31
+ backgroundColor="light-purple"
32
+ theme="light"
33
+ tooltipText="Thomas Watson"
34
+ className="myClass"
35
+ kind="user"
36
+ />
37
+ <UserProfileImage
38
+ size="md"
39
+ tooltipAlignment="bottom"
40
+ backgroundColor="light-purple"
41
+ theme="light"
42
+ tooltipText="Thomas Watson"
43
+ className="myClass"
44
+ icon={() => <Add size={20} />}
45
+ />
46
+ <UserProfileImage
47
+ size="md"
48
+ tooltipAlignment="bottom"
49
+ backgroundColor="light-purple"
50
+ theme="light"
51
+ tooltipText="Thomas Watson"
52
+ className="myClass"
53
+ image={ImageUrl}
54
+ imageDescription="Avatar of Thomas Watson"
55
+ />
56
+ </>
57
+ );
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { User } from "@octaviaflow/react/icons";
11
+ import React from 'react';
12
+ import { UserAvatar } from '@octaviaflow/ibm-products';
13
+ import { Add } from '@octaviaflow/react/icons';
14
+
15
+ const ImageUrl =
16
+ 'https://img.freepik.com/free-photo/portrait-man-cartoon-style_23-2151133939.jpg?semt=ais_hybrid';
17
+
18
+ export const Example = () => (
19
+ <>
20
+ <UserAvatar
21
+ size="md"
22
+ tooltipAlignment="bottom"
23
+ backgroundColor="order-5-purple"
24
+ tooltipText="Thomas Watson"
25
+ className="myClass"
26
+ name="thomas j. watson" />
27
+ <UserAvatar
28
+ size="md"
29
+ tooltipAlignment="bottom"
30
+ backgroundColor="order-5-purple"
31
+ tooltipText="Thomas Watson"
32
+ className="myClass"
33
+ renderIcon={User} />
34
+ <UserAvatar
35
+ size="md"
36
+ tooltipAlignment="bottom"
37
+ backgroundColor="order-5-purple"
38
+ tooltipText="Thomas Watson"
39
+ className="myClass"
40
+ renderIcon={() => <Add size={20} />} />
41
+ <UserAvatar
42
+ size="md"
43
+ tooltipAlignment="bottom"
44
+ backgroundColor="order-5-purple"
45
+ tooltipText="Thomas Watson"
46
+ className="myClass"
47
+ image={ImageUrl}
48
+ imageDescription="Avatar of Thomas Watson" />
49
+ </>
50
+ );
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { Add16, Add32 } from '@octaviaflow/icons-react';
11
+
12
+ const icons = {
13
+ Add16,
14
+ // prettier-ignore
15
+ Add32,
16
+ };
17
+
18
+ const options = {
19
+ Add16: 'Add16',
20
+ Add32: 'Add32',
21
+ };
22
+
23
+ function TestComponent() {
24
+ return <div>{icons[options['Add16']]}</div>;
25
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { Add } from '@octaviaflow/icons-react';
11
+
12
+ const icons = {
13
+ Add16: Add,
14
+ // prettier-ignore
15
+ Add32: props => <Add size={32} {...props} />,
16
+ };
17
+
18
+ const options = {
19
+ Add16: 'Add16',
20
+ Add32: 'Add32',
21
+ };
22
+
23
+ function TestComponent() {
24
+ return <div>{icons[options['Add16']]}</div>;
25
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import {
11
+ Add32,
12
+ Bee24,
13
+ Caret20,
14
+ DownArrow16,
15
+ Search24,
16
+ Zone24 as CustomZone,
17
+ } from '@octaviaflow/icons-react';
18
+ import { Search } from 'test';
19
+
20
+ function RendersIconDirectly() {
21
+ return (
22
+ <div>
23
+ <Add32 />
24
+ <Bee24 />
25
+ <Caret20 />
26
+ <DownArrow16 />
27
+ </div>
28
+ );
29
+ }
30
+
31
+ function RendersIconWithProps(props) {
32
+ return (
33
+ <div>
34
+ <Add32 aria-label="test" {...props} />
35
+ <Bee24 aria-label="test" {...props} />
36
+ <Caret20 aria-label="test" {...props} />
37
+ <DownArrow16 aria-label="test" {...props} />
38
+ </div>
39
+ );
40
+ }
41
+
42
+ function AliasedIcon() {
43
+ return <CustomZone />;
44
+ }
45
+
46
+ function ExistingScope() {
47
+ return (
48
+ <div>
49
+ <Search />
50
+ <Search24 />
51
+ </div>
52
+ );
53
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import {
11
+ Add,
12
+ Bee,
13
+ Caret,
14
+ DownArrow,
15
+ Search as SearchIcon,
16
+ Zone as CustomZone,
17
+ } from '@octaviaflow/icons-react';
18
+ import { Search } from 'test';
19
+
20
+ function RendersIconDirectly() {
21
+ return (
22
+ (<div>
23
+ <Add size={32} />
24
+ <Bee size={24} />
25
+ <Caret size={20} />
26
+ <DownArrow />
27
+ </div>)
28
+ );
29
+ }
30
+
31
+ function RendersIconWithProps(props) {
32
+ return (
33
+ (<div>
34
+ <Add size={32} aria-label="test" {...props} />
35
+ <Bee size={24} aria-label="test" {...props} />
36
+ <Caret size={20} aria-label="test" {...props} />
37
+ <DownArrow aria-label="test" {...props} />
38
+ </div>)
39
+ );
40
+ }
41
+
42
+ function AliasedIcon() {
43
+ return <CustomZone size={24} />;
44
+ }
45
+
46
+ function ExistingScope() {
47
+ return (
48
+ (<div>
49
+ <Search />
50
+ <SearchIcon size={24} />
51
+ </div>)
52
+ );
53
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ import { Add16, Bee24, Chevron24 as chevron } from '@octaviaflow/icons-react';
11
+
12
+ const mapped = {
13
+ default: Add16,
14
+ size: Bee24,
15
+ lowercase: chevron,
16
+ };
17
+
18
+ function RenderIconProp() {
19
+ return (
20
+ <div>
21
+ <DefaultSize renderIcon={Add16} />
22
+ <Size renderIcon={Bee24} />
23
+ </div>
24
+ );
25
+ }