@carbon-labs/react-animated-header 0.11.0 → 0.13.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 +20 -0
- package/es/components/AnimatedHeader/AnimatedHeader.d.ts +2 -0
- package/es/components/AnimatedHeader/AnimatedHeader.js +12 -2
- package/lib/__stories__/AnimatedHeader.stories.d.ts +20 -0
- package/lib/components/AnimatedHeader/AnimatedHeader.d.ts +2 -0
- package/lib/components/AnimatedHeader/AnimatedHeader.js +12 -2
- package/package.json +6 -4
|
@@ -8637,6 +8637,14 @@ export declare const ThemeG10: {
|
|
|
8637
8637
|
workspaceLabel: {
|
|
8638
8638
|
description: string;
|
|
8639
8639
|
};
|
|
8640
|
+
expandButtonLabel: {
|
|
8641
|
+
description: string;
|
|
8642
|
+
type: string;
|
|
8643
|
+
};
|
|
8644
|
+
collapseButtonLabel: {
|
|
8645
|
+
description: string;
|
|
8646
|
+
type: string;
|
|
8647
|
+
};
|
|
8640
8648
|
};
|
|
8641
8649
|
args: {
|
|
8642
8650
|
allTiles: ({
|
|
@@ -8696,6 +8704,8 @@ export declare const ThemeG10: {
|
|
|
8696
8704
|
tasksConfig: number;
|
|
8697
8705
|
userName: string;
|
|
8698
8706
|
welcomeText: string;
|
|
8707
|
+
expandButtonLabel: string;
|
|
8708
|
+
collapseButtonLabel: string;
|
|
8699
8709
|
headerAnimation: number;
|
|
8700
8710
|
};
|
|
8701
8711
|
};
|
|
@@ -17333,6 +17343,14 @@ export declare const ThemeG100: {
|
|
|
17333
17343
|
workspaceLabel: {
|
|
17334
17344
|
description: string;
|
|
17335
17345
|
};
|
|
17346
|
+
expandButtonLabel: {
|
|
17347
|
+
description: string;
|
|
17348
|
+
type: string;
|
|
17349
|
+
};
|
|
17350
|
+
collapseButtonLabel: {
|
|
17351
|
+
description: string;
|
|
17352
|
+
type: string;
|
|
17353
|
+
};
|
|
17336
17354
|
};
|
|
17337
17355
|
args: {
|
|
17338
17356
|
allTiles: ({
|
|
@@ -17392,6 +17410,8 @@ export declare const ThemeG100: {
|
|
|
17392
17410
|
tasksConfig: number;
|
|
17393
17411
|
userName: string;
|
|
17394
17412
|
welcomeText: string;
|
|
17413
|
+
expandButtonLabel: string;
|
|
17414
|
+
collapseButtonLabel: string;
|
|
17395
17415
|
headerAnimation: number;
|
|
17396
17416
|
};
|
|
17397
17417
|
globals: {
|
|
@@ -50,6 +50,8 @@ export interface AnimatedHeaderProps {
|
|
|
50
50
|
userName?: string;
|
|
51
51
|
welcomeText?: string;
|
|
52
52
|
workspaceLabel?: string;
|
|
53
|
+
expandButtonLabel?: string;
|
|
54
|
+
collapseButtonLabel?: string;
|
|
53
55
|
}
|
|
54
56
|
declare const AnimatedHeader: React.FC<AnimatedHeaderProps>;
|
|
55
57
|
export default AnimatedHeader;
|
|
@@ -35,7 +35,9 @@ const AnimatedHeader = _ref => {
|
|
|
35
35
|
tasksConfig,
|
|
36
36
|
userName,
|
|
37
37
|
welcomeText,
|
|
38
|
-
workspaceLabel = `Open in: ${userName}'s workspace` || `Select a workspace
|
|
38
|
+
workspaceLabel = `Open in: ${userName}'s workspace` || `Select a workspace`,
|
|
39
|
+
expandButtonLabel = 'Expand',
|
|
40
|
+
collapseButtonLabel = 'Collapse'
|
|
39
41
|
} = _ref;
|
|
40
42
|
const prefix = usePrefix();
|
|
41
43
|
const blockClass = `${prefix}--animated-header`;
|
|
@@ -194,7 +196,7 @@ const AnimatedHeader = _ref => {
|
|
|
194
196
|
kind: "ghost",
|
|
195
197
|
renderIcon: open ? ChevronUp : ChevronDown,
|
|
196
198
|
onClick: handleButtonCollapseClick
|
|
197
|
-
}, open ?
|
|
199
|
+
}, open ? collapseButtonLabel : expandButtonLabel))));
|
|
198
200
|
};
|
|
199
201
|
AnimatedHeader.displayName = 'Animated Header';
|
|
200
202
|
AnimatedHeader.propTypes = {
|
|
@@ -210,10 +212,18 @@ AnimatedHeader.propTypes = {
|
|
|
210
212
|
* Specify an optional className to be added to your Animated Header
|
|
211
213
|
*/
|
|
212
214
|
className: PropTypes.string,
|
|
215
|
+
/**
|
|
216
|
+
* Custom collapse button label
|
|
217
|
+
*/
|
|
218
|
+
collapseButtonLabel: PropTypes.string,
|
|
213
219
|
/**
|
|
214
220
|
* Provide short sentence in max. 3 lines related to product context
|
|
215
221
|
*/
|
|
216
222
|
description: PropTypes.string,
|
|
223
|
+
/**
|
|
224
|
+
* Custom expand button label
|
|
225
|
+
*/
|
|
226
|
+
expandButtonLabel: PropTypes.string,
|
|
217
227
|
/**
|
|
218
228
|
* Helper function passed to downshift that allows the library to render a
|
|
219
229
|
* given item to a string label. By default, it extracts the `label` field
|
|
@@ -8637,6 +8637,14 @@ export declare const ThemeG10: {
|
|
|
8637
8637
|
workspaceLabel: {
|
|
8638
8638
|
description: string;
|
|
8639
8639
|
};
|
|
8640
|
+
expandButtonLabel: {
|
|
8641
|
+
description: string;
|
|
8642
|
+
type: string;
|
|
8643
|
+
};
|
|
8644
|
+
collapseButtonLabel: {
|
|
8645
|
+
description: string;
|
|
8646
|
+
type: string;
|
|
8647
|
+
};
|
|
8640
8648
|
};
|
|
8641
8649
|
args: {
|
|
8642
8650
|
allTiles: ({
|
|
@@ -8696,6 +8704,8 @@ export declare const ThemeG10: {
|
|
|
8696
8704
|
tasksConfig: number;
|
|
8697
8705
|
userName: string;
|
|
8698
8706
|
welcomeText: string;
|
|
8707
|
+
expandButtonLabel: string;
|
|
8708
|
+
collapseButtonLabel: string;
|
|
8699
8709
|
headerAnimation: number;
|
|
8700
8710
|
};
|
|
8701
8711
|
};
|
|
@@ -17333,6 +17343,14 @@ export declare const ThemeG100: {
|
|
|
17333
17343
|
workspaceLabel: {
|
|
17334
17344
|
description: string;
|
|
17335
17345
|
};
|
|
17346
|
+
expandButtonLabel: {
|
|
17347
|
+
description: string;
|
|
17348
|
+
type: string;
|
|
17349
|
+
};
|
|
17350
|
+
collapseButtonLabel: {
|
|
17351
|
+
description: string;
|
|
17352
|
+
type: string;
|
|
17353
|
+
};
|
|
17336
17354
|
};
|
|
17337
17355
|
args: {
|
|
17338
17356
|
allTiles: ({
|
|
@@ -17392,6 +17410,8 @@ export declare const ThemeG100: {
|
|
|
17392
17410
|
tasksConfig: number;
|
|
17393
17411
|
userName: string;
|
|
17394
17412
|
welcomeText: string;
|
|
17413
|
+
expandButtonLabel: string;
|
|
17414
|
+
collapseButtonLabel: string;
|
|
17395
17415
|
headerAnimation: number;
|
|
17396
17416
|
};
|
|
17397
17417
|
globals: {
|
|
@@ -50,6 +50,8 @@ export interface AnimatedHeaderProps {
|
|
|
50
50
|
userName?: string;
|
|
51
51
|
welcomeText?: string;
|
|
52
52
|
workspaceLabel?: string;
|
|
53
|
+
expandButtonLabel?: string;
|
|
54
|
+
collapseButtonLabel?: string;
|
|
53
55
|
}
|
|
54
56
|
declare const AnimatedHeader: React.FC<AnimatedHeaderProps>;
|
|
55
57
|
export default AnimatedHeader;
|
|
@@ -39,7 +39,9 @@ const AnimatedHeader = _ref => {
|
|
|
39
39
|
tasksConfig,
|
|
40
40
|
userName,
|
|
41
41
|
welcomeText,
|
|
42
|
-
workspaceLabel = `Open in: ${userName}'s workspace` || `Select a workspace
|
|
42
|
+
workspaceLabel = `Open in: ${userName}'s workspace` || `Select a workspace`,
|
|
43
|
+
expandButtonLabel = 'Expand',
|
|
44
|
+
collapseButtonLabel = 'Collapse'
|
|
43
45
|
} = _ref;
|
|
44
46
|
const prefix = usePrefix.usePrefix();
|
|
45
47
|
const blockClass = `${prefix}--animated-header`;
|
|
@@ -198,7 +200,7 @@ const AnimatedHeader = _ref => {
|
|
|
198
200
|
kind: "ghost",
|
|
199
201
|
renderIcon: open ? bucket3.ChevronUp : bucket3.ChevronDown,
|
|
200
202
|
onClick: handleButtonCollapseClick
|
|
201
|
-
}, open ?
|
|
203
|
+
}, open ? collapseButtonLabel : expandButtonLabel))));
|
|
202
204
|
};
|
|
203
205
|
AnimatedHeader.displayName = 'Animated Header';
|
|
204
206
|
AnimatedHeader.propTypes = {
|
|
@@ -214,10 +216,18 @@ AnimatedHeader.propTypes = {
|
|
|
214
216
|
* Specify an optional className to be added to your Animated Header
|
|
215
217
|
*/
|
|
216
218
|
className: PropTypes.string,
|
|
219
|
+
/**
|
|
220
|
+
* Custom collapse button label
|
|
221
|
+
*/
|
|
222
|
+
collapseButtonLabel: PropTypes.string,
|
|
217
223
|
/**
|
|
218
224
|
* Provide short sentence in max. 3 lines related to product context
|
|
219
225
|
*/
|
|
220
226
|
description: PropTypes.string,
|
|
227
|
+
/**
|
|
228
|
+
* Custom expand button label
|
|
229
|
+
*/
|
|
230
|
+
expandButtonLabel: PropTypes.string,
|
|
221
231
|
/**
|
|
222
232
|
* Helper function passed to downshift that allows the library to render a
|
|
223
233
|
* given item to a string label. By default, it extracts the `label` field
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-animated-header",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
"url": "https://github.com/carbon-design-system/carbon-labs",
|
|
14
14
|
"directory": "src/components/AnimatedHeader"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
16
|
+
"exports": {
|
|
17
|
+
"import": "./es/index.js",
|
|
18
|
+
"require": "./lib/index.js"
|
|
19
|
+
},
|
|
18
20
|
"files": [
|
|
19
21
|
"es",
|
|
20
22
|
"lib",
|
|
@@ -36,5 +38,5 @@
|
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@carbon-labs/utilities": "canary"
|
|
38
40
|
},
|
|
39
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "a5745110a01ff799eb90643535370b87f17ea4fa"
|
|
40
42
|
}
|