@carbon-labs/react-animated-header 0.21.0 → 0.22.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/es/components/AnimatedHeader/AnimatedHeader.js +19 -20
- package/es/components/TasksController/TasksController.js +7 -8
- package/es/components/Tiles/AIPromptTile/AIPromptTile.js +12 -13
- package/es/components/Tiles/GlassTile/GlassTile.js +14 -15
- package/es/components/Tiles/GlassTile/GlassTileBody.js +9 -10
- package/es/components/WorkspaceSelector/WorkspaceSelector.js +5 -6
- package/lib/components/AnimatedHeader/AnimatedHeader.js +20 -21
- package/lib/components/TasksController/TasksController.js +7 -8
- package/lib/components/Tiles/AIPromptTile/AIPromptTile.js +12 -13
- package/lib/components/Tiles/GlassTile/GlassTile.js +14 -15
- package/lib/components/Tiles/GlassTile/GlassTileBody.js +9 -10
- package/lib/components/WorkspaceSelector/WorkspaceSelector.js +5 -6
- package/package.json +3 -3
- package/es/node_modules/@carbon/icons-react/es/Icon.js +0 -71
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3181
- package/es/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -14
- package/es/node_modules/@carbon/icons-react/node_modules/@carbon/icon-helpers/es/index.js +0 -125
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +0 -75
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3307
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -16
- package/lib/node_modules/@carbon/icons-react/node_modules/@carbon/icon-helpers/es/index.js +0 -128
|
@@ -8,35 +8,34 @@
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import React, { useRef, useState, useEffect } from 'react';
|
|
10
10
|
import { Grid, Column, Tooltip, Button } from '@carbon/react';
|
|
11
|
+
import { ChevronUp, ChevronDown } from '@carbon/icons-react';
|
|
11
12
|
import lottie from '../../_virtual/lottie.js';
|
|
12
13
|
import { usePrefix } from '../../node_modules/@carbon-labs/utilities/es/usePrefix.js';
|
|
13
14
|
import '@carbon/react/icons';
|
|
14
15
|
import { BaseTile } from '../Tiles/BaseTile/BaseTile.js';
|
|
15
16
|
import TasksController from '../TasksController/TasksController.js';
|
|
16
17
|
import WorkspaceSelector from '../WorkspaceSelector/WorkspaceSelector.js';
|
|
17
|
-
import { ChevronUp, ChevronDown } from '../../node_modules/@carbon/icons-react/es/generated/bucket-3.js';
|
|
18
18
|
|
|
19
19
|
/** Animated Header */
|
|
20
20
|
|
|
21
|
-
const AnimatedHeader =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} = _ref;
|
|
21
|
+
const AnimatedHeader = ({
|
|
22
|
+
allTileGroups,
|
|
23
|
+
selectedTileGroup,
|
|
24
|
+
setSelectedTileGroup,
|
|
25
|
+
description,
|
|
26
|
+
headerAnimation,
|
|
27
|
+
headerStatic,
|
|
28
|
+
productName = '[Product name]',
|
|
29
|
+
userName,
|
|
30
|
+
welcomeText,
|
|
31
|
+
tasksControllerConfig,
|
|
32
|
+
workspaceSelectorConfig,
|
|
33
|
+
isLoading,
|
|
34
|
+
disabledTaskLabel,
|
|
35
|
+
expandButtonLabel = 'Expand',
|
|
36
|
+
collapseButtonLabel = 'Collapse',
|
|
37
|
+
tileClickHandler
|
|
38
|
+
}) => {
|
|
40
39
|
const prefix = usePrefix();
|
|
41
40
|
const blockClass = `${prefix}--animated-header`;
|
|
42
41
|
const animationContainer = useRef(null);
|
|
@@ -10,14 +10,13 @@ import { SkeletonPlaceholder, Button, Dropdown } from '@carbon/react';
|
|
|
10
10
|
import React, { useMemo } from 'react';
|
|
11
11
|
import { usePrefix } from '../../node_modules/@carbon-labs/utilities/es/usePrefix.js';
|
|
12
12
|
|
|
13
|
-
const TasksController =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
13
|
+
const TasksController = ({
|
|
14
|
+
tasksControllerConfig,
|
|
15
|
+
isLoading,
|
|
16
|
+
allTileGroups,
|
|
17
|
+
selectedTileGroup,
|
|
18
|
+
setSelectedTileGroup
|
|
19
|
+
}) => {
|
|
21
20
|
const {
|
|
22
21
|
className: buttonCustomClass,
|
|
23
22
|
...buttonOverrideProps
|
|
@@ -14,19 +14,18 @@ var _AILabel, _Send;
|
|
|
14
14
|
|
|
15
15
|
/** Primary UI component for user interaction */
|
|
16
16
|
|
|
17
|
-
const AIPromptTile =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
17
|
+
const AIPromptTile = ({
|
|
18
|
+
href,
|
|
19
|
+
id,
|
|
20
|
+
mainIcon: MainIcon,
|
|
21
|
+
open,
|
|
22
|
+
productName,
|
|
23
|
+
title,
|
|
24
|
+
isLoading,
|
|
25
|
+
isDisabled,
|
|
26
|
+
disabledTaskLabel,
|
|
27
|
+
onClick
|
|
28
|
+
}) => {
|
|
30
29
|
const prefix = usePrefix();
|
|
31
30
|
const blockClass = `${prefix}--animated-header__ai-prompt-tile`;
|
|
32
31
|
const collapsed = `${blockClass}--collapsed`;
|
|
@@ -12,21 +12,20 @@ import { GlassTileBody } from './GlassTileBody.js';
|
|
|
12
12
|
|
|
13
13
|
/** Primary UI component for user interaction */
|
|
14
14
|
|
|
15
|
-
const GlassTile =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
15
|
+
const GlassTile = ({
|
|
16
|
+
href,
|
|
17
|
+
id,
|
|
18
|
+
mainIcon,
|
|
19
|
+
open,
|
|
20
|
+
secondaryIcon,
|
|
21
|
+
subtitle,
|
|
22
|
+
title,
|
|
23
|
+
customContent,
|
|
24
|
+
isLoading,
|
|
25
|
+
isDisabled,
|
|
26
|
+
disabledTaskLabel,
|
|
27
|
+
onClick: glassTileClickHandler
|
|
28
|
+
}) => {
|
|
30
29
|
const prefix = usePrefix();
|
|
31
30
|
const blockClass = `${prefix}--animated-header__glass-tile`;
|
|
32
31
|
const body = /*#__PURE__*/React.createElement(GlassTileBody, {
|
|
@@ -9,16 +9,15 @@ import React from 'react';
|
|
|
9
9
|
import { usePrefix } from '../../../node_modules/@carbon-labs/utilities/es/usePrefix.js';
|
|
10
10
|
import { SkeletonPlaceholder } from '@carbon/react';
|
|
11
11
|
|
|
12
|
-
const GlassTileBody =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
12
|
+
const GlassTileBody = ({
|
|
13
|
+
mainIcon: MainIcon,
|
|
14
|
+
open,
|
|
15
|
+
secondaryIcon: SecondaryIcon,
|
|
16
|
+
subtitle,
|
|
17
|
+
title,
|
|
18
|
+
customContent,
|
|
19
|
+
isLoading
|
|
20
|
+
}) => {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
const blockClass = `${prefix}--animated-header__glass-tile`;
|
|
24
23
|
const collapsed = `${blockClass}--collapsed`;
|
|
@@ -9,12 +9,11 @@ import { SkeletonPlaceholder, Dropdown } from '@carbon/react';
|
|
|
9
9
|
import { usePrefix } from '../../node_modules/@carbon-labs/utilities/es/usePrefix.js';
|
|
10
10
|
import React, { useMemo } from 'react';
|
|
11
11
|
|
|
12
|
-
const WorkspaceSelector =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const WorkspaceSelector = ({
|
|
13
|
+
workspaceSelectorConfig,
|
|
14
|
+
userName,
|
|
15
|
+
isLoading
|
|
16
|
+
}) => {
|
|
18
17
|
const {
|
|
19
18
|
className: dropdownCustomClass,
|
|
20
19
|
onChange: dropdownCustomOnChange,
|
|
@@ -12,35 +12,34 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var PropTypes = require('prop-types');
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var react = require('@carbon/react');
|
|
15
|
+
var iconsReact = require('@carbon/icons-react');
|
|
15
16
|
var lottie = require('../../_virtual/lottie.js');
|
|
16
17
|
var usePrefix = require('../../node_modules/@carbon-labs/utilities/es/usePrefix.js');
|
|
17
18
|
require('@carbon/react/icons');
|
|
18
19
|
var BaseTile = require('../Tiles/BaseTile/BaseTile.js');
|
|
19
20
|
var TasksController = require('../TasksController/TasksController.js');
|
|
20
21
|
var WorkspaceSelector = require('../WorkspaceSelector/WorkspaceSelector.js');
|
|
21
|
-
var bucket3 = require('../../node_modules/@carbon/icons-react/es/generated/bucket-3.js');
|
|
22
22
|
|
|
23
23
|
/** Animated Header */
|
|
24
24
|
|
|
25
|
-
const AnimatedHeader =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} = _ref;
|
|
25
|
+
const AnimatedHeader = ({
|
|
26
|
+
allTileGroups,
|
|
27
|
+
selectedTileGroup,
|
|
28
|
+
setSelectedTileGroup,
|
|
29
|
+
description,
|
|
30
|
+
headerAnimation,
|
|
31
|
+
headerStatic,
|
|
32
|
+
productName = '[Product name]',
|
|
33
|
+
userName,
|
|
34
|
+
welcomeText,
|
|
35
|
+
tasksControllerConfig,
|
|
36
|
+
workspaceSelectorConfig,
|
|
37
|
+
isLoading,
|
|
38
|
+
disabledTaskLabel,
|
|
39
|
+
expandButtonLabel = 'Expand',
|
|
40
|
+
collapseButtonLabel = 'Collapse',
|
|
41
|
+
tileClickHandler
|
|
42
|
+
}) => {
|
|
44
43
|
const prefix = usePrefix.usePrefix();
|
|
45
44
|
const blockClass = `${prefix}--animated-header`;
|
|
46
45
|
const animationContainer = React.useRef(null);
|
|
@@ -178,7 +177,7 @@ const AnimatedHeader = _ref => {
|
|
|
178
177
|
}, /*#__PURE__*/React.createElement(react.Button, {
|
|
179
178
|
id: `${blockClass}__button-collapse`,
|
|
180
179
|
kind: "ghost",
|
|
181
|
-
renderIcon: open ?
|
|
180
|
+
renderIcon: open ? iconsReact.ChevronUp : iconsReact.ChevronDown,
|
|
182
181
|
onClick: handleButtonCollapseClick
|
|
183
182
|
}, open ? collapseButtonLabel : expandButtonLabel))));
|
|
184
183
|
};
|
|
@@ -14,14 +14,13 @@ var react = require('@carbon/react');
|
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var usePrefix = require('../../node_modules/@carbon-labs/utilities/es/usePrefix.js');
|
|
16
16
|
|
|
17
|
-
const TasksController =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref;
|
|
17
|
+
const TasksController = ({
|
|
18
|
+
tasksControllerConfig,
|
|
19
|
+
isLoading,
|
|
20
|
+
allTileGroups,
|
|
21
|
+
selectedTileGroup,
|
|
22
|
+
setSelectedTileGroup
|
|
23
|
+
}) => {
|
|
25
24
|
const {
|
|
26
25
|
className: buttonCustomClass,
|
|
27
26
|
...buttonOverrideProps
|
|
@@ -16,19 +16,18 @@ var _AILabel, _Send;
|
|
|
16
16
|
|
|
17
17
|
/** Primary UI component for user interaction */
|
|
18
18
|
|
|
19
|
-
const AIPromptTile =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref;
|
|
19
|
+
const AIPromptTile = ({
|
|
20
|
+
href,
|
|
21
|
+
id,
|
|
22
|
+
mainIcon: MainIcon,
|
|
23
|
+
open,
|
|
24
|
+
productName,
|
|
25
|
+
title,
|
|
26
|
+
isLoading,
|
|
27
|
+
isDisabled,
|
|
28
|
+
disabledTaskLabel,
|
|
29
|
+
onClick
|
|
30
|
+
}) => {
|
|
32
31
|
const prefix = usePrefix.usePrefix();
|
|
33
32
|
const blockClass = `${prefix}--animated-header__ai-prompt-tile`;
|
|
34
33
|
const collapsed = `${blockClass}--collapsed`;
|
|
@@ -14,21 +14,20 @@ var GlassTileBody = require('./GlassTileBody.js');
|
|
|
14
14
|
|
|
15
15
|
/** Primary UI component for user interaction */
|
|
16
16
|
|
|
17
|
-
const GlassTile =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref;
|
|
17
|
+
const GlassTile = ({
|
|
18
|
+
href,
|
|
19
|
+
id,
|
|
20
|
+
mainIcon,
|
|
21
|
+
open,
|
|
22
|
+
secondaryIcon,
|
|
23
|
+
subtitle,
|
|
24
|
+
title,
|
|
25
|
+
customContent,
|
|
26
|
+
isLoading,
|
|
27
|
+
isDisabled,
|
|
28
|
+
disabledTaskLabel,
|
|
29
|
+
onClick: glassTileClickHandler
|
|
30
|
+
}) => {
|
|
32
31
|
const prefix = usePrefix.usePrefix();
|
|
33
32
|
const blockClass = `${prefix}--animated-header__glass-tile`;
|
|
34
33
|
const body = /*#__PURE__*/React.createElement(GlassTileBody.GlassTileBody, {
|
|
@@ -11,16 +11,15 @@ var React = require('react');
|
|
|
11
11
|
var usePrefix = require('../../../node_modules/@carbon-labs/utilities/es/usePrefix.js');
|
|
12
12
|
var react = require('@carbon/react');
|
|
13
13
|
|
|
14
|
-
const GlassTileBody =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
14
|
+
const GlassTileBody = ({
|
|
15
|
+
mainIcon: MainIcon,
|
|
16
|
+
open,
|
|
17
|
+
secondaryIcon: SecondaryIcon,
|
|
18
|
+
subtitle,
|
|
19
|
+
title,
|
|
20
|
+
customContent,
|
|
21
|
+
isLoading
|
|
22
|
+
}) => {
|
|
24
23
|
const prefix = usePrefix.usePrefix();
|
|
25
24
|
const blockClass = `${prefix}--animated-header__glass-tile`;
|
|
26
25
|
const collapsed = `${blockClass}--collapsed`;
|
|
@@ -13,12 +13,11 @@ var react = require('@carbon/react');
|
|
|
13
13
|
var usePrefix = require('../../node_modules/@carbon-labs/utilities/es/usePrefix.js');
|
|
14
14
|
var React = require('react');
|
|
15
15
|
|
|
16
|
-
const WorkspaceSelector =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
16
|
+
const WorkspaceSelector = ({
|
|
17
|
+
workspaceSelectorConfig,
|
|
18
|
+
userName,
|
|
19
|
+
isLoading
|
|
20
|
+
}) => {
|
|
22
21
|
const {
|
|
23
22
|
className: dropdownCustomClass,
|
|
24
23
|
onChange: dropdownCustomOnChange,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-animated-header",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "node ../../../tasks/build.js",
|
|
36
|
-
"clean": "
|
|
36
|
+
"clean": "rimraf es lib scss",
|
|
37
37
|
"postinstall": "ibmtelemetry --config=telemetry.yml",
|
|
38
38
|
"telemetry:config": "npx -y @ibm/telemetry-js-config-generator generate --id 40597fb8-d0ed-45fb-a95a-5b1751e22c36 --endpoint https://www-api.ibm.com/ibm-telemetry/v1/metrics --files ./components/**/*.(tsx|js|jsx)"
|
|
39
39
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@carbon-labs/utilities": "canary"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9a7e0911865b850569e3832039d1860ffebd2533"
|
|
49
49
|
}
|
|
@@ -1,71 +0,0 @@
|
|
|
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 { getAttributes } from '../node_modules/@carbon/icon-helpers/es/index.js';
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Copyright IBM Corp. 2019, 2023
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const Icon = /*#__PURE__*/React.forwardRef(function Icon(_ref, ref) {
|
|
19
|
-
let {
|
|
20
|
-
className,
|
|
21
|
-
children,
|
|
22
|
-
tabIndex,
|
|
23
|
-
xmlns = 'http://www.w3.org/2000/svg',
|
|
24
|
-
preserveAspectRatio = 'xMidYMid meet',
|
|
25
|
-
...rest
|
|
26
|
-
} = _ref;
|
|
27
|
-
const {
|
|
28
|
-
tabindex,
|
|
29
|
-
...attrs
|
|
30
|
-
} = getAttributes({
|
|
31
|
-
...rest,
|
|
32
|
-
tabindex: tabIndex
|
|
33
|
-
});
|
|
34
|
-
const props = attrs;
|
|
35
|
-
if (className) {
|
|
36
|
-
props.className = className;
|
|
37
|
-
}
|
|
38
|
-
if (tabindex !== undefined && tabindex !== null) {
|
|
39
|
-
if (typeof tabindex === 'number') {
|
|
40
|
-
props.tabIndex = tabindex;
|
|
41
|
-
} else {
|
|
42
|
-
props.tabIndex = Number(tabIndex);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (ref) {
|
|
46
|
-
props.ref = ref;
|
|
47
|
-
}
|
|
48
|
-
if (xmlns) {
|
|
49
|
-
props.xmlns = xmlns;
|
|
50
|
-
}
|
|
51
|
-
if (preserveAspectRatio) {
|
|
52
|
-
props.preserveAspectRatio = preserveAspectRatio;
|
|
53
|
-
}
|
|
54
|
-
return /*#__PURE__*/React.createElement('svg', props, children);
|
|
55
|
-
});
|
|
56
|
-
Icon.displayName = 'Icon';
|
|
57
|
-
Icon.propTypes = {
|
|
58
|
-
'aria-hidden': PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['true', 'false'])]),
|
|
59
|
-
'aria-label': PropTypes.string,
|
|
60
|
-
'aria-labelledby': PropTypes.string,
|
|
61
|
-
children: PropTypes.node,
|
|
62
|
-
className: PropTypes.string,
|
|
63
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
64
|
-
preserveAspectRatio: PropTypes.string,
|
|
65
|
-
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
-
viewBox: PropTypes.string,
|
|
67
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
68
|
-
xmlns: PropTypes.string
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { Icon as default };
|