@workday/canvas-kit-docs 6.0.0-beta.0-next.11 → 6.0.0-beta.0-next.16

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.
@@ -5687,6 +5687,16 @@ module.exports = {specifications: [
5687
5687
  }
5688
5688
  ]
5689
5689
  },
5690
+ {
5691
+ "type": "describe",
5692
+ "name": "when the \"Super Mega Ultra Long Content With Max Width Custom\" button is hovered",
5693
+ "children": [
5694
+ {
5695
+ "type": "it",
5696
+ "name": "should show the tooltip"
5697
+ }
5698
+ ]
5699
+ },
5690
5700
  {
5691
5701
  "type": "describe",
5692
5702
  "name": "when the \"Short Content\" button is focused",
@@ -5706,6 +5716,16 @@ module.exports = {specifications: [
5706
5716
  "name": "should show the tooltip"
5707
5717
  }
5708
5718
  ]
5719
+ },
5720
+ {
5721
+ "type": "describe",
5722
+ "name": "when the \"Super Mega Ultra Long Content With Max Width Custom\" button is focused",
5723
+ "children": [
5724
+ {
5725
+ "type": "it",
5726
+ "name": "should show the tooltip"
5727
+ }
5728
+ ]
5709
5729
  }
5710
5730
  ]
5711
5731
  },
@@ -5687,6 +5687,16 @@ module.exports = {specifications: [
5687
5687
  }
5688
5688
  ]
5689
5689
  },
5690
+ {
5691
+ "type": "describe",
5692
+ "name": "when the \"Super Mega Ultra Long Content With Max Width Custom\" button is hovered",
5693
+ "children": [
5694
+ {
5695
+ "type": "it",
5696
+ "name": "should show the tooltip"
5697
+ }
5698
+ ]
5699
+ },
5690
5700
  {
5691
5701
  "type": "describe",
5692
5702
  "name": "when the \"Short Content\" button is focused",
@@ -5706,6 +5716,16 @@ module.exports = {specifications: [
5706
5716
  "name": "should show the tooltip"
5707
5717
  }
5708
5718
  ]
5719
+ },
5720
+ {
5721
+ "type": "describe",
5722
+ "name": "when the \"Super Mega Ultra Long Content With Max Width Custom\" button is focused",
5723
+ "children": [
5724
+ {
5725
+ "type": "it",
5726
+ "name": "should show the tooltip"
5727
+ }
5728
+ ]
5709
5729
  }
5710
5730
  ]
5711
5731
  },
@@ -5,6 +5,7 @@ import Circle from './examples/Circle';
5
5
  import CircleFilled from './examples/CircleFilled';
6
6
  import Inverse from './examples/Inverse';
7
7
  import InverseFilled from './examples/InverseFilled';
8
+ import MirroredIcon from './examples/MirroredIcon';
8
9
  import Plain from './examples/Plain';
9
10
  import Square from './examples/Square';
10
11
  import SquareFilled from './examples/SquareFilled';
@@ -76,6 +77,19 @@ backgrounds.
76
77
 
77
78
  <ExampleCodeBlock code={InverseFilled} />
78
79
 
80
+ ### Mirroring Icons
81
+
82
+ Sometimes icons should be mirrored for bidirectional support. Setting the `shouldMirrorIcon` prop to
83
+ `true` will transform the icon's x-axis to mirror the graphic. This is often useful when there is no
84
+ equivalent mirrored icon available. Below is an example of the `unorderedListIcon` being rendered in
85
+ its default state with an icon showing a left-to-right bulleted list. Beside it is the same icon
86
+ that has been mirrored to show a right-to-left bulleted list.
87
+
88
+ Note that while the `aria-label` text in this example did not need to be updated, if the label
89
+ contains directional descriptors such as "right" and "left," the text should also be updated.
90
+
91
+ <ExampleCodeBlock code={MirroredIcon} />
92
+
79
93
  ### Toggleability
80
94
 
81
95
  The `toggle` prop can be used to make icon buttons toggleable.
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+
3
+ import {IconButton} from '@workday/canvas-kit-react/button';
4
+ import {unorderedListIcon} from '@workday/canvas-system-icons-web';
5
+
6
+ export default () => (
7
+ <>
8
+ <IconButton icon={unorderedListIcon} aria-label="create a bulleted list" />
9
+ <IconButton icon={unorderedListIcon} aria-label="create a bulleted list" shouldMirrorIcon />
10
+ </>
11
+ );
@@ -4,6 +4,21 @@ import {SecondaryButton} from '@workday/canvas-kit-react/button';
4
4
  import {OverflowTooltip} from '@workday/canvas-kit-react/tooltip';
5
5
  import {space} from '@workday/canvas-kit-react/tokens';
6
6
 
7
+ const CustomContent = ({...elemProps}) => (
8
+ <button
9
+ style={{
10
+ marginTop: space.xs,
11
+ maxWidth: 200,
12
+ overflow: 'hidden',
13
+ textOverflow: 'ellipsis',
14
+ whiteSpace: 'nowrap',
15
+ }}
16
+ {...elemProps}
17
+ >
18
+ Super Mega Ultra Long Content With Max Width Custom
19
+ </button>
20
+ );
21
+
7
22
  export default () => {
8
23
  return (
9
24
  <React.Fragment>
@@ -28,6 +43,9 @@ export default () => {
28
43
  Super Mega Ultra Long Content With Max Width
29
44
  </button>
30
45
  </OverflowTooltip>
46
+ <OverflowTooltip>
47
+ <CustomContent />
48
+ </OverflowTooltip>
31
49
  </React.Fragment>
32
50
  );
33
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "6.0.0-beta.0-next.11+c369bddc",
3
+ "version": "6.0.0-beta.0-next.16+2c70e470",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@storybook/csf": "0.0.1",
52
- "@workday/canvas-kit-react": "^6.0.0-beta.0-next.11+c369bddc"
52
+ "@workday/canvas-kit-react": "^6.0.0-beta.0-next.16+2c70e470"
53
53
  },
54
54
  "devDependencies": {
55
55
  "fs-extra": "^10.0.0",
@@ -57,5 +57,5 @@
57
57
  "mkdirp": "^1.0.3",
58
58
  "typescript": "^3.8.3"
59
59
  },
60
- "gitHead": "c369bddcf00cc219e9c8d6569b5a26355bdde4d6"
60
+ "gitHead": "2c70e470ff0afecfdd18ea96837ab7f19f812128"
61
61
  }