@carbon-labs/react-animated-header 0.38.0 → 0.40.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/__stories__/AnimatedHeader.stories.d.ts +2 -2
- package/es/components/AnimatedHeader/AnimatedHeader.js +2 -2
- package/es/components/ContentSwitcherSelector/ContentSwitcherSelector.js +1 -1
- package/es/components/HeaderAction/HeaderAction.js +1 -1
- package/es/components/HeaderTitle/HeaderTitle.js +1 -1
- package/es/components/TasksController/TasksController.js +1 -1
- package/es/components/Tiles/AIPromptTile/AIPromptTile.d.ts +4 -0
- package/es/components/Tiles/AIPromptTile/AIPromptTile.js +17 -5
- package/es/components/Tiles/AITile/AITile.d.ts +4 -0
- package/es/components/Tiles/AITile/AITile.js +7 -1
- package/es/components/Tiles/AITile/AITileBody.d.ts +8 -1
- package/es/components/Tiles/AITile/AITileBody.js +17 -5
- package/es/components/Tiles/GlassTile/GlassTile.d.ts +3 -0
- package/es/components/Tiles/GlassTile/GlassTile.js +5 -1
- package/es/components/Tiles/GlassTile/GlassTileBody.d.ts +6 -1
- package/es/components/Tiles/GlassTile/GlassTileBody.js +9 -3
- package/es/components/WorkspaceSelector/WorkspaceSelector.js +1 -1
- package/es/index.js +1 -0
- package/lib/__stories__/AnimatedHeader.stories.d.ts +2 -2
- package/lib/components/AnimatedHeader/AnimatedHeader.js +3 -3
- package/lib/components/ContentSwitcherSelector/ContentSwitcherSelector.js +1 -1
- package/lib/components/HeaderAction/HeaderAction.js +1 -1
- package/lib/components/HeaderTitle/HeaderTitle.js +1 -1
- package/lib/components/TasksController/TasksController.js +1 -1
- package/lib/components/Tiles/AIPromptTile/AIPromptTile.d.ts +4 -0
- package/lib/components/Tiles/AIPromptTile/AIPromptTile.js +16 -4
- package/lib/components/Tiles/AITile/AITile.d.ts +4 -0
- package/lib/components/Tiles/AITile/AITile.js +7 -1
- package/lib/components/Tiles/AITile/AITileBody.d.ts +8 -1
- package/lib/components/Tiles/AITile/AITileBody.js +16 -4
- package/lib/components/Tiles/GlassTile/GlassTile.d.ts +3 -0
- package/lib/components/Tiles/GlassTile/GlassTile.js +5 -1
- package/lib/components/Tiles/GlassTile/GlassTileBody.d.ts +6 -1
- package/lib/components/Tiles/GlassTile/GlassTileBody.js +8 -2
- package/lib/components/WorkspaceSelector/WorkspaceSelector.js +1 -1
- package/lib/es/_virtual/_rollupPluginBabelHelpers.d.ts +8 -0
- package/lib/es/assets/animated/header_animated_data_fabric_dark_06.json.d.ts +1097 -0
- package/lib/es/assets/animated/header_animated_data_fabric_light_03.json.d.ts +1097 -0
- package/lib/es/assets/animated/header_animated_db2_dark_03.json.d.ts +2639 -0
- package/lib/es/assets/animated/header_animated_db2_light_03.json.d.ts +2639 -0
- package/lib/es/assets/animated/header_animated_watsonx_a_dark_06.json.d.ts +771 -0
- package/lib/es/assets/animated/header_animated_watsonx_a_light_06.json.d.ts +771 -0
- package/lib/es/assets/animated/header_animated_watsonx_data_dark_03.json.d.ts +1963 -0
- package/lib/es/assets/animated/header_animated_watsonx_data_light_04.json.d.ts +2043 -0
- package/lib/es/assets/animated/header_animated_wxbia_dark_06.json.d.ts +1053 -0
- package/lib/es/assets/animated/header_animated_wxbia_light_09.json.d.ts +1053 -0
- package/lib/es/assets/static/header_static_data_fabric_dark_06.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_data_fabric_light_06.svg.d.ts +8 -0
- package/lib/{_virtual/lottie2.js → es/assets/static/header_static_db2_dark_01.svg.d.ts} +2 -6
- package/{es/_virtual/lottie2.js → lib/es/assets/static/header_static_db2_light_01.svg.d.ts} +2 -4
- package/lib/es/assets/static/header_static_watsonx_a_dark_01.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_watsonx_a_light_01.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_watsonx_data_dark_05.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_watsonx_data_light_06.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_wxbia_dark_01.svg.d.ts +8 -0
- package/lib/es/assets/static/header_static_wxbia_light_01.svg.d.ts +8 -0
- package/lib/es/components/AnimatedHeader/AnimatedHeader.d.ts +99 -0
- package/lib/es/components/ContentSwitcherSelector/ContentSwitcherSelector.d.ts +10 -0
- package/lib/es/components/HeaderAction/HeaderAction.d.ts +11 -0
- package/lib/es/components/HeaderTitle/HeaderTitle.d.ts +8 -0
- package/lib/es/components/TasksController/TasksController.d.ts +11 -0
- package/lib/es/components/Tiles/AIPromptTile/AIPromptTile.d.ts +25 -0
- package/lib/es/components/Tiles/AITile/AITile.d.ts +26 -0
- package/lib/es/components/Tiles/AITile/AITileBody.d.ts +16 -0
- package/lib/es/components/Tiles/BaseTile/BaseTile.d.ts +2 -0
- package/lib/es/components/Tiles/GlassTile/GlassTile.d.ts +24 -0
- package/lib/es/components/Tiles/GlassTile/GlassTileBody.d.ts +15 -0
- package/lib/es/components/WorkspaceSelector/WorkspaceSelector.d.ts +9 -0
- package/lib/es/index.d.ts +24 -0
- package/lib/index.js +1 -0
- package/package.json +4 -6
- package/scss/Tiles/AIPromptTile/ai-prompt-tile.scss +5 -0
- package/scss/Tiles/AITile/ai-tile.scss +5 -0
- package/scss/Tiles/GlassTile/glass-tile.scss +5 -0
- package/LICENSE +0 -201
- package/es/_virtual/_commonjsHelpers.js +0 -12
- package/es/_virtual/lottie.js +0 -14
- package/es/node_modules/@carbon-labs/utilities/es/usePrefix.js +0 -20
- package/es/node_modules/lottie-web/build/player/lottie.js +0 -683
- package/lib/_virtual/_commonjsHelpers.js +0 -14
- package/lib/_virtual/lottie.js +0 -18
- package/lib/node_modules/@carbon-labs/utilities/es/usePrefix.js +0 -23
- package/lib/node_modules/lottie-web/build/player/lottie.js +0 -685
|
@@ -15065,7 +15065,7 @@ export declare const ThemeG10: {
|
|
|
15065
15065
|
type: string;
|
|
15066
15066
|
button: {
|
|
15067
15067
|
href: string;
|
|
15068
|
-
icon: import("@carbon/react
|
|
15068
|
+
icon: import("@carbon/icons-react").CarbonIconType;
|
|
15069
15069
|
text: string;
|
|
15070
15070
|
type: "tertiary";
|
|
15071
15071
|
};
|
|
@@ -30258,7 +30258,7 @@ export declare const ThemeG100: {
|
|
|
30258
30258
|
type: string;
|
|
30259
30259
|
button: {
|
|
30260
30260
|
href: string;
|
|
30261
|
-
icon: import("@carbon/react
|
|
30261
|
+
icon: import("@carbon/icons-react").CarbonIconType;
|
|
30262
30262
|
text: string;
|
|
30263
30263
|
type: "tertiary";
|
|
30264
30264
|
};
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React, { useRef, useState, useEffect } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import lottie from '
|
|
11
|
+
import lottie from 'lottie-web';
|
|
12
12
|
import { Grid, Column, Button } from '@carbon/react';
|
|
13
13
|
import { ChevronUp, ChevronDown } from '@carbon/icons-react';
|
|
14
|
-
import { usePrefix } from '
|
|
14
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
15
15
|
import '@carbon/react/icons';
|
|
16
16
|
import { BaseTile } from '../Tiles/BaseTile/BaseTile.js';
|
|
17
17
|
import TasksController from '../TasksController/TasksController.js';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { SkeletonPlaceholder, ContentSwitcher, Switch } from '@carbon/react';
|
|
11
|
-
import { usePrefix } from '
|
|
11
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
12
12
|
|
|
13
13
|
const ContentSwitcherSelector = ({
|
|
14
14
|
contentSwitcherConfig,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { IconButton, Button } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
|
|
12
12
|
const HeaderAction = ({
|
|
13
13
|
config,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Tooltip } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
|
|
12
12
|
const NAME_FIRST_LANGS = ['ar',
|
|
13
13
|
// Arabic
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { SkeletonPlaceholder, Button, Dropdown } from '@carbon/react';
|
|
11
|
-
import { usePrefix } from '
|
|
11
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
12
12
|
|
|
13
13
|
const TasksController = ({
|
|
14
14
|
tasksControllerConfig,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { type AITileBodyProps, type AITileLabelVariant } from '../AITile/AITileBody';
|
|
10
11
|
export type AIPromptTileProps = {
|
|
11
12
|
variant: 'aiPrompt';
|
|
12
13
|
tileId: string;
|
|
@@ -16,6 +17,9 @@ export type AIPromptTileProps = {
|
|
|
16
17
|
productName?: string;
|
|
17
18
|
promptPlaceholder?: string;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
20
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
21
|
+
aiLabelText?: string;
|
|
22
|
+
aiLabelTagType?: AITileBodyProps['aiLabelTagType'];
|
|
19
23
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
20
24
|
ariaLabel?: string;
|
|
21
25
|
open?: boolean;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, { useState } from 'react';
|
|
9
|
-
import { SkeletonPlaceholder, AILabel, TextInput, IconButton, Button } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
9
|
+
import { SkeletonPlaceholder, Tag, AILabel, TextInput, IconButton, Button } from '@carbon/react';
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
import { Send } from '@carbon/react/icons';
|
|
12
12
|
|
|
13
13
|
var _AILabel, _Send;
|
|
@@ -19,6 +19,9 @@ const AIPromptTile = ({
|
|
|
19
19
|
productName,
|
|
20
20
|
promptPlaceholder = 'Start chatting...',
|
|
21
21
|
primaryIcon: PrimaryIcon,
|
|
22
|
+
aiLabelVariant = 'aiLabel',
|
|
23
|
+
aiLabelText = 'AI',
|
|
24
|
+
aiLabelTagType = 'gray',
|
|
22
25
|
onClick,
|
|
23
26
|
ariaLabel,
|
|
24
27
|
open,
|
|
@@ -64,11 +67,20 @@ const AIPromptTile = ({
|
|
|
64
67
|
}, PrimaryIcon && /*#__PURE__*/React.createElement(PrimaryIcon, {
|
|
65
68
|
fill: `var(--cds-icon-secondary)`,
|
|
66
69
|
size: 24
|
|
67
|
-
}),
|
|
70
|
+
}), aiLabelVariant === 'tag' ? /*#__PURE__*/React.createElement(Tag, {
|
|
71
|
+
size: "sm",
|
|
72
|
+
type: aiLabelTagType,
|
|
73
|
+
className: `${blockClass}--tag`,
|
|
74
|
+
decorator: _AILabel || (_AILabel = /*#__PURE__*/React.createElement(AILabel, {
|
|
75
|
+
aiText: "AI",
|
|
76
|
+
size: "xs",
|
|
77
|
+
kind: "inline"
|
|
78
|
+
}))
|
|
79
|
+
}, aiLabelText) : /*#__PURE__*/React.createElement(AILabel, {
|
|
68
80
|
autoAlign: true,
|
|
69
|
-
aiText:
|
|
81
|
+
aiText: aiLabelText,
|
|
70
82
|
size: "xs"
|
|
71
|
-
}))
|
|
83
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
72
84
|
className: `${blockClass}--title`
|
|
73
85
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
74
86
|
className: `${blockClass}--text-input-container ${textInput && `${blockClass}--text-input-container__active`}`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { AITileBodyProps, AITileLabelVariant } from '../AITile/AITileBody';
|
|
10
11
|
export type AITileProps = {
|
|
11
12
|
variant: 'ai';
|
|
12
13
|
tileId: string;
|
|
@@ -17,6 +18,9 @@ export type AITileProps = {
|
|
|
17
18
|
customContent?: React.ReactNode | null;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
19
20
|
secondaryIcon?: ElementType | null;
|
|
21
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
22
|
+
aiLabelText?: string;
|
|
23
|
+
aiLabelTagType?: AITileBodyProps['aiLabelTagType'];
|
|
20
24
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
21
25
|
ariaLabel?: string;
|
|
22
26
|
open?: boolean;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Link } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
import { AITileBody } from './AITileBody.js';
|
|
12
12
|
|
|
13
13
|
const AITile = ({
|
|
@@ -19,6 +19,9 @@ const AITile = ({
|
|
|
19
19
|
customContent,
|
|
20
20
|
primaryIcon: PrimaryIcon,
|
|
21
21
|
secondaryIcon: SecondaryIcon,
|
|
22
|
+
aiLabelVariant,
|
|
23
|
+
aiLabelText,
|
|
24
|
+
aiLabelTagType,
|
|
22
25
|
onClick: aiTileClickHandler,
|
|
23
26
|
ariaLabel,
|
|
24
27
|
open,
|
|
@@ -34,6 +37,9 @@ const AITile = ({
|
|
|
34
37
|
title: title,
|
|
35
38
|
subtitle: subtitle,
|
|
36
39
|
customContent: customContent,
|
|
40
|
+
aiLabelVariant: aiLabelVariant,
|
|
41
|
+
aiLabelText: aiLabelText,
|
|
42
|
+
aiLabelTagType: aiLabelTagType,
|
|
37
43
|
isLoading: isLoading
|
|
38
44
|
});
|
|
39
45
|
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { ElementType, ReactNode } from 'react';
|
|
10
|
+
import { type TagProps } from '@carbon/react';
|
|
11
|
+
type TagTypeName = TagProps<'div'>['type'];
|
|
12
|
+
export type AITileLabelVariant = 'aiLabel' | 'tag';
|
|
10
13
|
export type AITileBodyProps = {
|
|
11
14
|
open?: boolean;
|
|
12
15
|
title?: string | null;
|
|
@@ -14,6 +17,10 @@ export type AITileBodyProps = {
|
|
|
14
17
|
customContent?: ReactNode;
|
|
15
18
|
primaryIcon?: ElementType | null;
|
|
16
19
|
secondaryIcon?: ElementType | null;
|
|
20
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
21
|
+
aiLabelText?: string;
|
|
22
|
+
aiLabelTagType?: TagTypeName;
|
|
17
23
|
isLoading?: boolean;
|
|
18
24
|
};
|
|
19
|
-
export declare const AITileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, isLoading, }: AITileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const AITileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, aiLabelVariant, aiLabelText, aiLabelTagType, isLoading, }: AITileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { usePrefix } from '
|
|
10
|
-
import { SkeletonPlaceholder, AILabel } from '@carbon/react';
|
|
9
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
10
|
+
import { SkeletonPlaceholder, Tag, AILabel } from '@carbon/react';
|
|
11
11
|
|
|
12
12
|
var _AILabel;
|
|
13
13
|
const AITileBody = ({
|
|
@@ -17,6 +17,9 @@ const AITileBody = ({
|
|
|
17
17
|
customContent,
|
|
18
18
|
primaryIcon: PrimaryIcon,
|
|
19
19
|
secondaryIcon: SecondaryIcon,
|
|
20
|
+
aiLabelVariant = 'aiLabel',
|
|
21
|
+
aiLabelText = 'AI',
|
|
22
|
+
aiLabelTagType = 'gray',
|
|
20
23
|
isLoading
|
|
21
24
|
}) => {
|
|
22
25
|
const prefix = usePrefix();
|
|
@@ -40,11 +43,20 @@ const AITileBody = ({
|
|
|
40
43
|
}, PrimaryIcon && /*#__PURE__*/React.createElement(PrimaryIcon, {
|
|
41
44
|
fill: `var(--cds-icon-secondary)`,
|
|
42
45
|
size: 24
|
|
43
|
-
}),
|
|
46
|
+
}), aiLabelVariant === 'tag' ? /*#__PURE__*/React.createElement(Tag, {
|
|
47
|
+
size: "sm",
|
|
48
|
+
type: aiLabelTagType,
|
|
49
|
+
className: `${blockClass}--tag`,
|
|
50
|
+
decorator: _AILabel || (_AILabel = /*#__PURE__*/React.createElement(AILabel, {
|
|
51
|
+
aiText: "AI",
|
|
52
|
+
size: "xs",
|
|
53
|
+
kind: "inline"
|
|
54
|
+
}))
|
|
55
|
+
}, aiLabelText) : /*#__PURE__*/React.createElement(AILabel, {
|
|
44
56
|
autoAlign: true,
|
|
45
|
-
aiText:
|
|
57
|
+
aiText: aiLabelText,
|
|
46
58
|
size: "xs"
|
|
47
|
-
}))
|
|
59
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
48
60
|
className: `${blockClass}--title`
|
|
49
61
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
50
62
|
className: `${blockClass}--footer`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { GlassTileBodyProps } from './GlassTileBody';
|
|
10
11
|
export type GlassTileProps = {
|
|
11
12
|
variant?: 'glass';
|
|
12
13
|
tileId: string;
|
|
@@ -17,6 +18,8 @@ export type GlassTileProps = {
|
|
|
17
18
|
customContent?: React.ReactNode | null;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
19
20
|
secondaryIcon?: ElementType | null;
|
|
21
|
+
tagLabel?: string | null;
|
|
22
|
+
tagType?: GlassTileBodyProps['tagType'];
|
|
20
23
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
21
24
|
ariaLabel?: string;
|
|
22
25
|
open?: boolean;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Link } from '@carbon/react';
|
|
10
|
-
import { usePrefix } from '
|
|
10
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
11
11
|
import { GlassTileBody } from './GlassTileBody.js';
|
|
12
12
|
|
|
13
13
|
const GlassTile = ({
|
|
@@ -19,6 +19,8 @@ const GlassTile = ({
|
|
|
19
19
|
customContent,
|
|
20
20
|
primaryIcon: PrimaryIcon,
|
|
21
21
|
secondaryIcon: SecondaryIcon,
|
|
22
|
+
tagLabel,
|
|
23
|
+
tagType,
|
|
22
24
|
onClick: glassTileClickHandler,
|
|
23
25
|
ariaLabel,
|
|
24
26
|
open,
|
|
@@ -34,6 +36,8 @@ const GlassTile = ({
|
|
|
34
36
|
title: title,
|
|
35
37
|
subtitle: subtitle,
|
|
36
38
|
customContent: customContent,
|
|
39
|
+
tagLabel: tagLabel,
|
|
40
|
+
tagType: tagType,
|
|
37
41
|
isLoading: isLoading
|
|
38
42
|
});
|
|
39
43
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { ElementType, ReactNode } from 'react';
|
|
10
|
+
import { type TagProps } from '@carbon/react';
|
|
11
|
+
type TagTypeName = TagProps<'div'>['type'];
|
|
10
12
|
export type GlassTileBodyProps = {
|
|
11
13
|
open?: boolean;
|
|
12
14
|
title?: string | null;
|
|
@@ -14,6 +16,9 @@ export type GlassTileBodyProps = {
|
|
|
14
16
|
customContent?: ReactNode;
|
|
15
17
|
primaryIcon?: ElementType | null;
|
|
16
18
|
secondaryIcon?: ElementType | null;
|
|
19
|
+
tagLabel?: string | null;
|
|
20
|
+
tagType?: TagTypeName;
|
|
17
21
|
isLoading?: boolean;
|
|
18
22
|
};
|
|
19
|
-
export declare const GlassTileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, isLoading, }: GlassTileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const GlassTileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, tagLabel, tagType, isLoading, }: GlassTileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { usePrefix } from '
|
|
10
|
-
import { SkeletonPlaceholder } from '@carbon/react';
|
|
9
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
10
|
+
import { SkeletonPlaceholder, Tag } from '@carbon/react';
|
|
11
11
|
|
|
12
12
|
const GlassTileBody = ({
|
|
13
13
|
open,
|
|
@@ -16,6 +16,8 @@ const GlassTileBody = ({
|
|
|
16
16
|
customContent,
|
|
17
17
|
primaryIcon: PrimaryIcon,
|
|
18
18
|
secondaryIcon: SecondaryIcon,
|
|
19
|
+
tagLabel,
|
|
20
|
+
tagType = 'gray',
|
|
19
21
|
isLoading
|
|
20
22
|
}) => {
|
|
21
23
|
const prefix = usePrefix();
|
|
@@ -37,7 +39,11 @@ const GlassTileBody = ({
|
|
|
37
39
|
}, PrimaryIcon && /*#__PURE__*/React.createElement(PrimaryIcon, {
|
|
38
40
|
fill: `var(--cds-icon-secondary)`,
|
|
39
41
|
size: 24
|
|
40
|
-
})
|
|
42
|
+
}), tagLabel && /*#__PURE__*/React.createElement(Tag, {
|
|
43
|
+
size: "sm",
|
|
44
|
+
type: tagType,
|
|
45
|
+
className: `${blockClass}--tag`
|
|
46
|
+
}, tagLabel)), /*#__PURE__*/React.createElement("div", {
|
|
41
47
|
className: `${blockClass}--title`
|
|
42
48
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
43
49
|
className: `${blockClass}--footer`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { SkeletonPlaceholder, Dropdown } from '@carbon/react';
|
|
9
|
-
import { usePrefix } from '
|
|
9
|
+
import { usePrefix } from '@carbon-labs/utilities/usePrefix';
|
|
10
10
|
import React, { useMemo } from 'react';
|
|
11
11
|
|
|
12
12
|
const WorkspaceSelector = ({
|
package/es/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { default as HeaderAction } from './components/HeaderAction/HeaderAction.
|
|
|
10
10
|
export { default as HeaderTitle } from './components/HeaderTitle/HeaderTitle.js';
|
|
11
11
|
import 'react';
|
|
12
12
|
import '@carbon/react';
|
|
13
|
+
import '@carbon-labs/utilities/usePrefix';
|
|
13
14
|
import '@carbon/react/icons';
|
|
14
15
|
export { BaseTile } from './components/Tiles/BaseTile/BaseTile.js';
|
|
15
16
|
export { default as dataFabricStaticLight } from './assets/static/header_static_data_fabric_light_06.svg.js';
|
|
@@ -15065,7 +15065,7 @@ export declare const ThemeG10: {
|
|
|
15065
15065
|
type: string;
|
|
15066
15066
|
button: {
|
|
15067
15067
|
href: string;
|
|
15068
|
-
icon: import("@carbon/react
|
|
15068
|
+
icon: import("@carbon/icons-react").CarbonIconType;
|
|
15069
15069
|
text: string;
|
|
15070
15070
|
type: "tertiary";
|
|
15071
15071
|
};
|
|
@@ -30258,7 +30258,7 @@ export declare const ThemeG100: {
|
|
|
30258
30258
|
type: string;
|
|
30259
30259
|
button: {
|
|
30260
30260
|
href: string;
|
|
30261
|
-
icon: import("@carbon/react
|
|
30261
|
+
icon: import("@carbon/icons-react").CarbonIconType;
|
|
30262
30262
|
text: string;
|
|
30263
30263
|
type: "tertiary";
|
|
30264
30264
|
};
|
|
@@ -12,10 +12,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
|
-
var lottie = require('
|
|
15
|
+
var lottie = require('lottie-web');
|
|
16
16
|
var react = require('@carbon/react');
|
|
17
17
|
var iconsReact = require('@carbon/icons-react');
|
|
18
|
-
var usePrefix = require('
|
|
18
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
19
19
|
require('@carbon/react/icons');
|
|
20
20
|
var BaseTile = require('../Tiles/BaseTile/BaseTile.js');
|
|
21
21
|
var TasksController = require('../TasksController/TasksController.js');
|
|
@@ -65,7 +65,7 @@ const AnimatedHeader = ({
|
|
|
65
65
|
if (!animationContainer.current || !headerAnimation) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
const animation = lottie.
|
|
68
|
+
const animation = lottie.loadAnimation({
|
|
69
69
|
container: animationContainer.current,
|
|
70
70
|
animationData: headerAnimation,
|
|
71
71
|
renderer: 'svg',
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var react = require('@carbon/react');
|
|
15
|
-
var usePrefix = require('
|
|
15
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
16
16
|
|
|
17
17
|
const ContentSwitcherSelector = ({
|
|
18
18
|
contentSwitcherConfig,
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var react = require('@carbon/react');
|
|
14
|
-
var usePrefix = require('
|
|
14
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
15
15
|
|
|
16
16
|
const HeaderAction = ({
|
|
17
17
|
config,
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var react = require('@carbon/react');
|
|
14
|
-
var usePrefix = require('
|
|
14
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
15
15
|
|
|
16
16
|
const NAME_FIRST_LANGS = ['ar',
|
|
17
17
|
// Arabic
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var react = require('@carbon/react');
|
|
15
|
-
var usePrefix = require('
|
|
15
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
16
16
|
|
|
17
17
|
const TasksController = ({
|
|
18
18
|
tasksControllerConfig,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { type AITileBodyProps, type AITileLabelVariant } from '../AITile/AITileBody';
|
|
10
11
|
export type AIPromptTileProps = {
|
|
11
12
|
variant: 'aiPrompt';
|
|
12
13
|
tileId: string;
|
|
@@ -16,6 +17,9 @@ export type AIPromptTileProps = {
|
|
|
16
17
|
productName?: string;
|
|
17
18
|
promptPlaceholder?: string;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
20
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
21
|
+
aiLabelText?: string;
|
|
22
|
+
aiLabelTagType?: AITileBodyProps['aiLabelTagType'];
|
|
19
23
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
20
24
|
ariaLabel?: string;
|
|
21
25
|
open?: boolean;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
var React = require('react');
|
|
11
11
|
var react = require('@carbon/react');
|
|
12
|
-
var usePrefix = require('
|
|
12
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
13
13
|
var icons = require('@carbon/react/icons');
|
|
14
14
|
|
|
15
15
|
var _AILabel, _Send;
|
|
@@ -21,6 +21,9 @@ const AIPromptTile = ({
|
|
|
21
21
|
productName,
|
|
22
22
|
promptPlaceholder = 'Start chatting...',
|
|
23
23
|
primaryIcon: PrimaryIcon,
|
|
24
|
+
aiLabelVariant = 'aiLabel',
|
|
25
|
+
aiLabelText = 'AI',
|
|
26
|
+
aiLabelTagType = 'gray',
|
|
24
27
|
onClick,
|
|
25
28
|
ariaLabel,
|
|
26
29
|
open,
|
|
@@ -66,11 +69,20 @@ const AIPromptTile = ({
|
|
|
66
69
|
}, PrimaryIcon && /*#__PURE__*/React.createElement(PrimaryIcon, {
|
|
67
70
|
fill: `var(--cds-icon-secondary)`,
|
|
68
71
|
size: 24
|
|
69
|
-
}),
|
|
72
|
+
}), aiLabelVariant === 'tag' ? /*#__PURE__*/React.createElement(react.Tag, {
|
|
73
|
+
size: "sm",
|
|
74
|
+
type: aiLabelTagType,
|
|
75
|
+
className: `${blockClass}--tag`,
|
|
76
|
+
decorator: _AILabel || (_AILabel = /*#__PURE__*/React.createElement(react.AILabel, {
|
|
77
|
+
aiText: "AI",
|
|
78
|
+
size: "xs",
|
|
79
|
+
kind: "inline"
|
|
80
|
+
}))
|
|
81
|
+
}, aiLabelText) : /*#__PURE__*/React.createElement(react.AILabel, {
|
|
70
82
|
autoAlign: true,
|
|
71
|
-
aiText:
|
|
83
|
+
aiText: aiLabelText,
|
|
72
84
|
size: "xs"
|
|
73
|
-
}))
|
|
85
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
74
86
|
className: `${blockClass}--title`
|
|
75
87
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
76
88
|
className: `${blockClass}--text-input-container ${textInput && `${blockClass}--text-input-container__active`}`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { AITileBodyProps, AITileLabelVariant } from '../AITile/AITileBody';
|
|
10
11
|
export type AITileProps = {
|
|
11
12
|
variant: 'ai';
|
|
12
13
|
tileId: string;
|
|
@@ -17,6 +18,9 @@ export type AITileProps = {
|
|
|
17
18
|
customContent?: React.ReactNode | null;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
19
20
|
secondaryIcon?: ElementType | null;
|
|
21
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
22
|
+
aiLabelText?: string;
|
|
23
|
+
aiLabelTagType?: AITileBodyProps['aiLabelTagType'];
|
|
20
24
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
21
25
|
ariaLabel?: string;
|
|
22
26
|
open?: boolean;
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var react = require('@carbon/react');
|
|
14
|
-
var usePrefix = require('
|
|
14
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
15
15
|
var AITileBody = require('./AITileBody.js');
|
|
16
16
|
|
|
17
17
|
const AITile = ({
|
|
@@ -23,6 +23,9 @@ const AITile = ({
|
|
|
23
23
|
customContent,
|
|
24
24
|
primaryIcon: PrimaryIcon,
|
|
25
25
|
secondaryIcon: SecondaryIcon,
|
|
26
|
+
aiLabelVariant,
|
|
27
|
+
aiLabelText,
|
|
28
|
+
aiLabelTagType,
|
|
26
29
|
onClick: aiTileClickHandler,
|
|
27
30
|
ariaLabel,
|
|
28
31
|
open,
|
|
@@ -38,6 +41,9 @@ const AITile = ({
|
|
|
38
41
|
title: title,
|
|
39
42
|
subtitle: subtitle,
|
|
40
43
|
customContent: customContent,
|
|
44
|
+
aiLabelVariant: aiLabelVariant,
|
|
45
|
+
aiLabelText: aiLabelText,
|
|
46
|
+
aiLabelTagType: aiLabelTagType,
|
|
41
47
|
isLoading: isLoading
|
|
42
48
|
});
|
|
43
49
|
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { ElementType, ReactNode } from 'react';
|
|
10
|
+
import { type TagProps } from '@carbon/react';
|
|
11
|
+
type TagTypeName = TagProps<'div'>['type'];
|
|
12
|
+
export type AITileLabelVariant = 'aiLabel' | 'tag';
|
|
10
13
|
export type AITileBodyProps = {
|
|
11
14
|
open?: boolean;
|
|
12
15
|
title?: string | null;
|
|
@@ -14,6 +17,10 @@ export type AITileBodyProps = {
|
|
|
14
17
|
customContent?: ReactNode;
|
|
15
18
|
primaryIcon?: ElementType | null;
|
|
16
19
|
secondaryIcon?: ElementType | null;
|
|
20
|
+
aiLabelVariant?: AITileLabelVariant;
|
|
21
|
+
aiLabelText?: string;
|
|
22
|
+
aiLabelTagType?: TagTypeName;
|
|
17
23
|
isLoading?: boolean;
|
|
18
24
|
};
|
|
19
|
-
export declare const AITileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, isLoading, }: AITileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const AITileBody: ({ open, title, subtitle, customContent, primaryIcon: PrimaryIcon, secondaryIcon: SecondaryIcon, aiLabelVariant, aiLabelText, aiLabelTagType, isLoading, }: AITileBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
var React = require('react');
|
|
11
|
-
var usePrefix = require('
|
|
11
|
+
var usePrefix = require('@carbon-labs/utilities/usePrefix');
|
|
12
12
|
var react = require('@carbon/react');
|
|
13
13
|
|
|
14
14
|
var _AILabel;
|
|
@@ -19,6 +19,9 @@ const AITileBody = ({
|
|
|
19
19
|
customContent,
|
|
20
20
|
primaryIcon: PrimaryIcon,
|
|
21
21
|
secondaryIcon: SecondaryIcon,
|
|
22
|
+
aiLabelVariant = 'aiLabel',
|
|
23
|
+
aiLabelText = 'AI',
|
|
24
|
+
aiLabelTagType = 'gray',
|
|
22
25
|
isLoading
|
|
23
26
|
}) => {
|
|
24
27
|
const prefix = usePrefix.usePrefix();
|
|
@@ -42,11 +45,20 @@ const AITileBody = ({
|
|
|
42
45
|
}, PrimaryIcon && /*#__PURE__*/React.createElement(PrimaryIcon, {
|
|
43
46
|
fill: `var(--cds-icon-secondary)`,
|
|
44
47
|
size: 24
|
|
45
|
-
}),
|
|
48
|
+
}), aiLabelVariant === 'tag' ? /*#__PURE__*/React.createElement(react.Tag, {
|
|
49
|
+
size: "sm",
|
|
50
|
+
type: aiLabelTagType,
|
|
51
|
+
className: `${blockClass}--tag`,
|
|
52
|
+
decorator: _AILabel || (_AILabel = /*#__PURE__*/React.createElement(react.AILabel, {
|
|
53
|
+
aiText: "AI",
|
|
54
|
+
size: "xs",
|
|
55
|
+
kind: "inline"
|
|
56
|
+
}))
|
|
57
|
+
}, aiLabelText) : /*#__PURE__*/React.createElement(react.AILabel, {
|
|
46
58
|
autoAlign: true,
|
|
47
|
-
aiText:
|
|
59
|
+
aiText: aiLabelText,
|
|
48
60
|
size: "xs"
|
|
49
|
-
}))
|
|
61
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
50
62
|
className: `${blockClass}--title`
|
|
51
63
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
52
64
|
className: `${blockClass}--footer`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React, { ElementType } from 'react';
|
|
10
|
+
import { GlassTileBodyProps } from './GlassTileBody';
|
|
10
11
|
export type GlassTileProps = {
|
|
11
12
|
variant?: 'glass';
|
|
12
13
|
tileId: string;
|
|
@@ -17,6 +18,8 @@ export type GlassTileProps = {
|
|
|
17
18
|
customContent?: React.ReactNode | null;
|
|
18
19
|
primaryIcon?: ElementType | null;
|
|
19
20
|
secondaryIcon?: ElementType | null;
|
|
21
|
+
tagLabel?: string | null;
|
|
22
|
+
tagType?: GlassTileBodyProps['tagType'];
|
|
20
23
|
onClick?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
|
21
24
|
ariaLabel?: string;
|
|
22
25
|
open?: boolean;
|