@workday/canvas-kit-docs 6.3.5 → 7.0.0-alpha.0-next.3
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/dist/commonjs/lib/specs.js +56 -0
- package/dist/es6/lib/specs.js +56 -0
- package/dist/mdx/7.0-MIGRATION-GUIDE.mdx +61 -0
- package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +16 -22
- package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +8 -13
- package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +8 -12
- package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +15 -22
- package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +8 -13
- package/dist/mdx/preview-react/text-area/examples/Alert.tsx +1 -0
- package/dist/mdx/preview-react/text-area/examples/HiddenLabel.tsx +6 -4
- package/dist/mdx/preview-react/text-input/examples/Alert.tsx +1 -0
- package/dist/mdx/preview-react/text-input/examples/HiddenLabel.tsx +6 -4
- package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +1 -0
- package/dist/mdx/react/action-bar/ActionBar.mdx +7 -25
- package/dist/mdx/react/action-bar/examples/Basic.tsx +3 -3
- package/dist/mdx/react/banner/Banner.mdx +203 -19
- package/dist/mdx/react/banner/PropTables.splitprops.tsx +39 -0
- package/dist/mdx/react/banner/examples/ActionText.tsx +8 -1
- package/dist/mdx/react/banner/examples/Basic.tsx +8 -1
- package/dist/mdx/react/banner/examples/Error.tsx +8 -1
- package/dist/mdx/react/banner/examples/RefForwarding.tsx +25 -0
- package/dist/mdx/react/banner/examples/Sticky.tsx +12 -7
- package/dist/mdx/react/banner/examples/StickyAnimation.tsx +63 -0
- package/dist/mdx/react/banner/examples/StickyRTL.tsx +36 -0
- package/dist/mdx/react/banner/examples/ThemedAlert.tsx +28 -0
- package/dist/mdx/react/banner/examples/ThemedError.tsx +29 -0
- package/dist/mdx/react/button/icon-button/examples/Inverse.tsx +9 -12
- package/dist/mdx/react/button/icon-button/examples/InverseFilled.tsx +9 -12
- package/dist/mdx/react/skeleton/examples/Simulation.tsx +10 -9
- package/dist/mdx/react/status-indicator/StatusIndicator.mdx +12 -0
- package/dist/mdx/react/status-indicator/examples/MaxWidth.tsx +30 -0
- package/package.json +3 -3
|
@@ -3,6 +3,7 @@ import {StatusIndicator} from '@workday/canvas-kit-react/status-indicator';
|
|
|
3
3
|
import Basic from './examples/Basic';
|
|
4
4
|
import Icon from './examples/Icon';
|
|
5
5
|
import Emphasis from './examples/Emphasis';
|
|
6
|
+
import MaxWidth from './examples/MaxWidth';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
# Canvas Kit Status Indicator
|
|
@@ -54,6 +55,17 @@ label.
|
|
|
54
55
|
|
|
55
56
|
<ExampleCodeBlock code={Icon} />
|
|
56
57
|
|
|
58
|
+
### Max Width
|
|
59
|
+
|
|
60
|
+
By default, the maximum width of a Status Indicator is `200px`. When the text in the StatusIndicator
|
|
61
|
+
exceeds the max width, it will be truncated with an ellipsis. This maxWidth can be customized.
|
|
62
|
+
|
|
63
|
+
Avoid truncation wherever possible by using shorter text in Status Indicators. In the case where
|
|
64
|
+
truncation is necessary, you should use an `OverflowTooltip`. For the full text to be accessible
|
|
65
|
+
when you do this, you should make the tooltip focusable with `tabIndex`.
|
|
66
|
+
|
|
67
|
+
<ExampleCodeBlock code={MaxWidth} />
|
|
68
|
+
|
|
57
69
|
## Props
|
|
58
70
|
|
|
59
71
|
Undocumented props are spread to the outermost element rendered by Status Indicator.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import {StatusIndicator} from '@workday/canvas-kit-react/status-indicator';
|
|
4
|
+
import {OverflowTooltip} from '@workday/canvas-kit-react/tooltip';
|
|
5
|
+
import {space} from '@workday/canvas-kit-react/tokens';
|
|
6
|
+
|
|
7
|
+
const StatusIndicators = styled('div')({
|
|
8
|
+
'& > *': {
|
|
9
|
+
margin: space.xxs,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export default () => {
|
|
14
|
+
return (
|
|
15
|
+
<StatusIndicators>
|
|
16
|
+
<StatusIndicator
|
|
17
|
+
label="Longer Than Normal Ellipsized Status"
|
|
18
|
+
type={StatusIndicator.Type.Blue}
|
|
19
|
+
maxWidth={250}
|
|
20
|
+
/>
|
|
21
|
+
<OverflowTooltip>
|
|
22
|
+
<StatusIndicator
|
|
23
|
+
label="Overflow Tooltip On Hover/Focus Status"
|
|
24
|
+
type={StatusIndicator.Type.Green}
|
|
25
|
+
tabIndex={0}
|
|
26
|
+
/>
|
|
27
|
+
</OverflowTooltip>
|
|
28
|
+
</StatusIndicators>
|
|
29
|
+
);
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.0-next.3+14a81c7e",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@storybook/csf": "0.0.1",
|
|
53
|
-
"@workday/canvas-kit-react": "^
|
|
53
|
+
"@workday/canvas-kit-react": "^7.0.0-alpha.0-next.3+14a81c7e"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"fs-extra": "^10.0.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"mkdirp": "^1.0.3",
|
|
59
59
|
"typescript": "^3.8.3"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "14a81c7ef3deb9efaf67fa3ec9cc2d2a3161b00b"
|
|
62
62
|
}
|