@workday/canvas-kit-docs 6.8.10 → 6.9.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/index.js +13 -6
- package/dist/commonjs/lib/Specifications.d.ts.map +1 -1
- package/dist/commonjs/lib/Specifications.js +3 -1
- package/dist/commonjs/lib/docs.js +1 -0
- package/dist/commonjs/lib/specs.js +229 -2
- package/dist/es6/lib/Specifications.d.ts.map +1 -1
- package/dist/es6/lib/specs.js +229 -2
- package/dist/mdx/{4.0-MIGRATION-GUIDE.mdx → 4.0-UPGRADE-GUIDE.mdx} +1 -1
- package/dist/mdx/{5.0-MIGRATION-GUIDE.mdx → 5.0-UPGRADE-GUIDE.mdx} +3 -3
- package/dist/mdx/{6.0-MIGRATION-GUIDE.mdx → 6.0-UPGRADE-GUIDE.mdx} +4 -4
- package/dist/mdx/7.0-UPGRADE-GUIDE.mdx +1006 -0
- package/dist/mdx/COMPOUND_COMPONENTS.mdx +2 -2
- package/dist/mdx/CONTRIBUTING.mdx +2 -2
- package/dist/mdx/changelog.stories.mdx +1 -0
- package/dist/mdx/labs-react/search-form/examples/Basic.tsx +4 -2
- package/dist/mdx/labs-react/search-form/examples/CustomTheme.tsx +4 -2
- package/dist/mdx/labs-react/search-form/examples/Grow.tsx +4 -2
- package/dist/mdx/labs-react/search-form/examples/RTL.tsx +4 -2
- package/dist/mdx/labs-react/search-form/examples/Theming.tsx +4 -2
- package/dist/mdx/preview-react/_examples/SidePanelWithOverlay.mdx +8 -0
- package/dist/mdx/preview-react/_examples/examples/SidePanelWithOverlay.tsx +31 -0
- package/dist/mdx/preview-react/_examples/examples/TextInputWithFormik.tsx +3 -3
- package/dist/mdx/preview-react/form-field/examples/Custom.tsx +4 -5
- package/dist/mdx/preview-react/menu/Menu.mdx +1 -1
- package/dist/mdx/preview-react/menu/examples/ContextMenu.tsx +2 -2
- package/dist/mdx/preview-react/menu/examples/Icons.tsx +0 -1
- package/dist/mdx/preview-react/pill/Pill.mdx +241 -0
- package/dist/mdx/preview-react/pill/examples/Basic.tsx +18 -0
- package/dist/mdx/preview-react/pill/examples/WithAvatar.tsx +21 -0
- package/dist/mdx/preview-react/pill/examples/WithCount.tsx +9 -0
- package/dist/mdx/preview-react/pill/examples/WithList.tsx +31 -0
- package/dist/mdx/preview-react/pill/examples/WithReadOnly.tsx +15 -0
- package/dist/mdx/preview-react/pill/examples/WithRemovable.tsx +25 -0
- package/dist/mdx/preview-react/pill/examples/test-avatar.png +0 -0
- package/dist/mdx/preview-react/side-panel/SidePanel.mdx +5 -3
- package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +16 -22
- package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +9 -14
- package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +9 -13
- package/dist/mdx/preview-react/side-panel/examples/HiddenName.tsx +1 -1
- package/dist/mdx/preview-react/side-panel/examples/OnExpandedChange.tsx +1 -1
- package/dist/mdx/preview-react/side-panel/examples/OnStateTransition.tsx +1 -1
- package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +17 -24
- package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +9 -14
- package/dist/mdx/preview-react/text-area/examples/Alert.tsx +2 -1
- package/dist/mdx/preview-react/text-area/examples/HiddenLabel.tsx +6 -4
- package/dist/mdx/preview-react/text-area/examples/RefForwarding.tsx +1 -1
- package/dist/mdx/preview-react/text-input/examples/Alert.tsx +2 -1
- package/dist/mdx/preview-react/text-input/examples/HiddenLabel.tsx +6 -4
- package/dist/mdx/preview-react/text-input/examples/RefForwarding.tsx +1 -1
- package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +2 -1
- package/dist/mdx/react/_examples/SegmentedControlWithText.mdx +12 -0
- package/dist/mdx/react/_examples/examples/GlobalHeader.tsx +7 -6
- package/dist/mdx/react/_examples/examples/PageHeader.tsx +5 -5
- package/dist/mdx/react/_examples/examples/SegmentControlWithText.tsx +119 -0
- package/dist/mdx/react/action-bar/ActionBar.mdx +126 -23
- package/dist/mdx/react/action-bar/examples/Basic.tsx +7 -4
- package/dist/mdx/react/action-bar/examples/DeleteAction.tsx +15 -0
- package/dist/mdx/react/action-bar/examples/Icons.tsx +18 -0
- package/dist/mdx/react/action-bar/examples/OverflowActionBar.tsx +59 -0
- 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 +64 -0
- package/dist/mdx/react/banner/examples/StickyRTL.tsx +35 -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/button/Button.mdx +3 -3
- package/dist/mdx/react/button/button/Hyperlink.mdx +72 -0
- package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +7 -0
- package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +12 -0
- package/dist/mdx/react/button/button/examples/Hyperlink.tsx +5 -0
- package/dist/mdx/react/button/button/examples/HyperlinkInverse.tsx +12 -0
- package/dist/mdx/react/button/button/examples/Primary.tsx +11 -3
- package/dist/mdx/react/button/button/examples/PrimaryInverse.tsx +11 -3
- package/dist/mdx/react/button/button/examples/Secondary.tsx +11 -3
- package/dist/mdx/react/button/button/examples/SecondaryInverse.tsx +11 -3
- package/dist/mdx/react/button/button/examples/Tertiary.tsx +9 -4
- package/dist/mdx/react/button/button/examples/TertiaryInverse.tsx +12 -3
- package/dist/mdx/react/card/card.mdx +2 -2
- package/dist/mdx/react/card/examples/Depth.tsx +1 -1
- package/dist/mdx/react/checkbox/Checkbox.mdx +7 -0
- package/dist/mdx/react/checkbox/examples/Indeterminate.tsx +1 -1
- package/dist/mdx/react/checkbox/examples/Inverse.tsx +22 -0
- package/dist/mdx/react/checkbox/examples/RefForwarding.tsx +1 -1
- package/dist/mdx/react/collection/Collection.mdx +358 -0
- package/dist/mdx/react/collection/Collection.splitprops.tsx +19 -0
- package/dist/mdx/react/collection/examples/Basic.tsx +12 -0
- package/dist/mdx/react/collection/examples/BasicGrid.tsx +46 -0
- package/dist/mdx/react/collection/examples/BasicVirtual.tsx +24 -0
- package/dist/mdx/react/collection/examples/DynamicItems.tsx +20 -0
- package/dist/mdx/react/collection/examples/IdentifiedItems.tsx +12 -0
- package/dist/mdx/react/collection/examples/MultiSelection.tsx +56 -0
- package/dist/mdx/react/collection/examples/RovingFocus.tsx +39 -0
- package/dist/mdx/react/collection/examples/Selection.tsx +58 -0
- package/dist/mdx/react/collection/examples/WrappingGrid.tsx +48 -0
- package/dist/mdx/react/color-picker/color-input/ColorInput.mdx +2 -2
- package/dist/mdx/react/color-picker/color-preview/ColorPreview.mdx +2 -2
- package/dist/mdx/{labs-react/common → react/layout}/Box.mdx +3 -6
- package/dist/mdx/{labs-react → react}/layout/Flex.mdx +24 -27
- package/dist/mdx/{labs-react → react}/layout/Stack.mdx +98 -146
- package/dist/mdx/{labs-react/common → react/layout}/examples/As.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Border.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Color.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Depth.tsx +9 -3
- package/dist/mdx/{labs-react → react}/layout/examples/Flex/FlexCard.tsx +2 -3
- package/dist/mdx/{labs-react → react}/layout/examples/Flex/FlexLayout.tsx +1 -1
- package/dist/mdx/{labs-react → react}/layout/examples/Flex/Usage.tsx +2 -3
- package/dist/mdx/{labs-react/common → react/layout}/examples/FlexItem.tsx +1 -2
- package/dist/mdx/{labs-react/common → react/layout}/examples/Layout.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Position.tsx +1 -1
- package/dist/mdx/{labs-react → react}/layout/examples/PropTables.splitprops.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Ref.tsx +1 -1
- package/dist/mdx/{labs-react/common → react/layout}/examples/Space.tsx +1 -1
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/BasicStack.tsx +1 -1
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/HStackCards.tsx +2 -3
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/NestedStacks.tsx +1 -1
- package/dist/mdx/react/layout/examples/Stack/ShouldWrapChildren.tsx +28 -0
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/StackCard.tsx +2 -2
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/StackItems.tsx +1 -2
- package/dist/mdx/{labs-react → react}/layout/examples/Stack/VStackCards.tsx +2 -2
- package/dist/mdx/react/menu/Menu.mdx +123 -0
- package/dist/mdx/react/menu/examples/Basic.tsx +26 -0
- package/dist/mdx/react/menu/examples/ContextMenu.tsx +25 -0
- package/dist/mdx/react/menu/examples/Icons.tsx +41 -0
- package/dist/mdx/react/modal/Modal.mdx +34 -11
- package/dist/mdx/react/modal/examples/Basic.tsx +4 -2
- package/dist/mdx/react/modal/examples/BodyOverflow.tsx +56 -0
- package/dist/mdx/react/modal/examples/CustomFocus.tsx +4 -2
- package/dist/mdx/react/modal/examples/FullOverflow.tsx +55 -0
- package/dist/mdx/react/modal/examples/ReturnFocus.tsx +5 -3
- package/dist/mdx/react/modal/examples/WithoutCloseIcon.tsx +4 -2
- package/dist/mdx/react/pagination/PropTables.splitprops.tsx +1 -1
- package/dist/mdx/react/pagination/pagination.mdx +14 -14
- package/dist/mdx/react/popup/Popup.mdx +2 -1
- package/dist/mdx/react/popup/examples/Basic.tsx +1 -1
- package/dist/mdx/react/popup/examples/FocusRedirect.tsx +1 -1
- package/dist/mdx/react/popup/examples/FocusTrap.tsx +1 -1
- package/dist/mdx/react/popup/examples/FullScreen.tsx +1 -1
- package/dist/mdx/react/popup/examples/InitialFocus.tsx +4 -2
- package/dist/mdx/react/popup/examples/MultiplePopups.tsx +1 -1
- package/dist/mdx/react/popup/examples/NestedPopups.tsx +18 -18
- package/dist/mdx/react/popup/examples/RTL.tsx +6 -3
- package/dist/mdx/react/radio/Radio.mdx +7 -0
- package/dist/mdx/react/radio/examples/Basic.tsx +11 -2
- package/dist/mdx/react/radio/examples/Inverse.tsx +23 -0
- package/dist/mdx/react/segmented-control/SegmentedControl.mdx +2 -2
- package/dist/mdx/react/segmented-control/examples/Basic.tsx +13 -11
- package/dist/mdx/react/skeleton/examples/Basic.tsx +1 -1
- package/dist/mdx/react/skeleton/examples/Color.tsx +1 -2
- package/dist/mdx/react/skeleton/examples/Simulation.tsx +31 -30
- package/dist/mdx/react/status-indicator/StatusIndicator.mdx +12 -0
- package/dist/mdx/react/status-indicator/examples/MaxWidth.tsx +30 -0
- package/dist/mdx/react/tabs/Tabs.mdx +14 -17
- package/dist/mdx/react/tabs/TabsModel.splitprops.tsx +7 -3
- package/dist/mdx/react/tabs/examples/DynamicTabs.tsx +6 -13
- package/dist/mdx/react/tabs/examples/HoistedModel.tsx +8 -8
- package/dist/mdx/react/tabs/examples/Icons.tsx +4 -4
- package/dist/mdx/react/tabs/examples/NamedTabs.tsx +10 -10
- package/dist/mdx/react/tabs/examples/OverflowTabs.tsx +4 -8
- package/dist/mdx/react/tabs/examples/SinglePanel.tsx +3 -3
- package/dist/mdx/react/text-input/examples/Basic.tsx +3 -0
- package/dist/mdx/react/tooltip/Tooltip.mdx +2 -2
- package/dist/mdx/react/tooltip/examples/Default.tsx +2 -2
- package/dist/mdx/react/tooltip/examples/UseTooltip.tsx +2 -2
- package/package.json +9 -17
- package/dist/mdx/labs-react/common/examples/PropTables.splitprops.tsx +0 -91
- package/dist/mdx/labs-react/layout/examples/Stack/ShouldWrapChildren.tsx +0 -33
- package/dist/mdx/react/button/icon-button/IconButton.mdx +0 -103
- package/dist/mdx/react/button/icon-button/examples/Circle.tsx +0 -6
- package/dist/mdx/react/button/icon-button/examples/CircleFilled.tsx +0 -8
- package/dist/mdx/react/button/icon-button/examples/Inverse.tsx +0 -20
- package/dist/mdx/react/button/icon-button/examples/InverseFilled.tsx +0 -20
- package/dist/mdx/react/button/icon-button/examples/MirroredIcon.tsx +0 -11
- package/dist/mdx/react/button/icon-button/examples/Plain.tsx +0 -8
- package/dist/mdx/react/button/icon-button/examples/Square.tsx +0 -8
- package/dist/mdx/react/button/icon-button/examples/SquareFilled.tsx +0 -8
- package/dist/mdx/react/button/icon-button/examples/Toggleable.tsx +0 -20
- package/ts3.5/dist/commonjs/index.d.ts +0 -4
- package/ts3.5/dist/commonjs/lib/Specifications.d.ts +0 -6
- package/ts3.5/dist/commonjs/lib/docs.d.ts +0 -5
- package/ts3.5/dist/commonjs/lib/specs.d.ts +0 -16
- package/ts3.5/dist/es6/index.d.ts +0 -4
- package/ts3.5/dist/es6/lib/Specifications.d.ts +0 -6
- package/ts3.5/dist/es6/lib/docs.d.ts +0 -5
- package/ts3.5/dist/es6/lib/specs.d.ts +0 -16
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {space} from '@workday/canvas-kit-react/tokens';
|
|
3
2
|
|
|
4
|
-
import {Tabs, useTabsModel
|
|
5
|
-
import {SelectionModel} from '../../lib/selection';
|
|
3
|
+
import {Tabs, useTabsModel} from '@workday/canvas-kit-react/tabs';
|
|
6
4
|
|
|
7
5
|
type Tab = {
|
|
8
6
|
tab: string;
|
|
@@ -19,7 +17,7 @@ export default () => {
|
|
|
19
17
|
const addedRef = React.useRef(tabs.length - 1);
|
|
20
18
|
const model = useTabsModel({
|
|
21
19
|
items: tabs,
|
|
22
|
-
shouldSelect:
|
|
20
|
+
shouldSelect: data => data.id !== 'add',
|
|
23
21
|
});
|
|
24
22
|
|
|
25
23
|
// A ref of the model for the render functions to work around the caching done to lists
|
|
@@ -33,9 +31,8 @@ export default () => {
|
|
|
33
31
|
* * **Item is selected**: Selection will be moved to the next item in the list
|
|
34
32
|
* @param id The id of the item that will be removed
|
|
35
33
|
*/
|
|
36
|
-
const removeItem = <T extends unknown>(id: string, model:
|
|
34
|
+
const removeItem = <T extends unknown>(id: string, model: ReturnType<typeof useTabsModel>) => {
|
|
37
35
|
const index = model.state.items.findIndex(item => model.getId(item) === model.state.cursorId);
|
|
38
|
-
console.log('index', index, id, model.state.cursorId, model.state.items);
|
|
39
36
|
const nextIndex = index === model.state.items.length - 1 ? index - 1 : index + 1;
|
|
40
37
|
const nextId = model.getId(model.state.items[nextIndex]);
|
|
41
38
|
if (model.state.selectedIds[0] === id) {
|
|
@@ -80,7 +77,7 @@ export default () => {
|
|
|
80
77
|
<Tabs model={model}>
|
|
81
78
|
<Tabs.List overflowButton={<Tabs.OverflowButton>More</Tabs.OverflowButton>}>
|
|
82
79
|
{(item: Tab) => (
|
|
83
|
-
<Tabs.Item
|
|
80
|
+
<Tabs.Item onKeyDown={onKeyDown(item.id)} onClick={onClick(item.id)}>
|
|
84
81
|
{item.tab}
|
|
85
82
|
</Tabs.Item>
|
|
86
83
|
)}
|
|
@@ -88,16 +85,12 @@ export default () => {
|
|
|
88
85
|
<Tabs.Menu.Popper>
|
|
89
86
|
<Tabs.Menu.Card maxWidth={300} maxHeight={200}>
|
|
90
87
|
<Tabs.Menu.List>
|
|
91
|
-
{(item: Tab) => <Tabs.Menu.Item
|
|
88
|
+
{(item: Tab) => <Tabs.Menu.Item>{item.tab}</Tabs.Menu.Item>}
|
|
92
89
|
</Tabs.Menu.List>
|
|
93
90
|
</Tabs.Menu.Card>
|
|
94
91
|
</Tabs.Menu.Popper>
|
|
95
92
|
<Tabs.Panels>
|
|
96
|
-
{(item: Tab) =>
|
|
97
|
-
<Tabs.Panel marginTop="m" name={item.id}>
|
|
98
|
-
Contents of {item.tab}
|
|
99
|
-
</Tabs.Panel>
|
|
100
|
-
)}
|
|
93
|
+
{(item: Tab) => <Tabs.Panel marginTop="m">Contents of {item.tab}</Tabs.Panel>}
|
|
101
94
|
</Tabs.Panels>
|
|
102
95
|
</Tabs>
|
|
103
96
|
);
|
|
@@ -6,8 +6,8 @@ import {Tabs, useTabsModel} from '@workday/canvas-kit-react/tabs';
|
|
|
6
6
|
|
|
7
7
|
export default () => {
|
|
8
8
|
const model = useTabsModel({
|
|
9
|
-
onSelect(
|
|
10
|
-
console.log('Selected Tab', data, prevState);
|
|
9
|
+
onSelect(data, prevState) {
|
|
10
|
+
console.log('Selected Tab', data.id, prevState);
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
13
|
|
|
@@ -15,14 +15,14 @@ export default () => {
|
|
|
15
15
|
<>
|
|
16
16
|
<Tabs model={model}>
|
|
17
17
|
<Tabs.List>
|
|
18
|
-
<Tabs.Item
|
|
19
|
-
<Tabs.Item
|
|
20
|
-
<Tabs.Item
|
|
18
|
+
<Tabs.Item data-id="first">First Tab</Tabs.Item>
|
|
19
|
+
<Tabs.Item data-id="second">Second Tab</Tabs.Item>
|
|
20
|
+
<Tabs.Item data-id="third">Third Tab</Tabs.Item>
|
|
21
21
|
</Tabs.List>
|
|
22
22
|
<div style={{marginTop: space.m}}>
|
|
23
|
-
<Tabs.Panel
|
|
24
|
-
<Tabs.Panel
|
|
25
|
-
<Tabs.Panel
|
|
23
|
+
<Tabs.Panel data-id="first">Contents of First Tab</Tabs.Panel>
|
|
24
|
+
<Tabs.Panel data-id="second">Contents of Second Tab</Tabs.Panel>
|
|
25
|
+
<Tabs.Panel data-id="third">Contents of Third Tab</Tabs.Panel>
|
|
26
26
|
</div>
|
|
27
27
|
</Tabs>
|
|
28
28
|
<SecondaryButton
|
|
@@ -8,19 +8,19 @@ export default () => {
|
|
|
8
8
|
return (
|
|
9
9
|
<Tabs>
|
|
10
10
|
<Tabs.List>
|
|
11
|
-
<Tabs.Item
|
|
11
|
+
<Tabs.Item>
|
|
12
12
|
<Tabs.Item.Icon icon={starIcon} />
|
|
13
13
|
<Tabs.Item.Text>First Tab</Tabs.Item.Text>
|
|
14
14
|
</Tabs.Item>
|
|
15
|
-
<Tabs.Item
|
|
15
|
+
<Tabs.Item>
|
|
16
16
|
<Tabs.Item.Icon icon={searchIcon} />
|
|
17
17
|
<Tabs.Item.Text>Second Tab</Tabs.Item.Text>
|
|
18
18
|
</Tabs.Item>
|
|
19
|
-
<Tabs.Item
|
|
19
|
+
<Tabs.Item>
|
|
20
20
|
<Tabs.Item.Icon icon={selectIcon} />
|
|
21
21
|
<Tabs.Item.Text>Third Tab</Tabs.Item.Text>
|
|
22
22
|
</Tabs.Item>
|
|
23
|
-
<Tabs.Item
|
|
23
|
+
<Tabs.Item>
|
|
24
24
|
<Tabs.Item.Icon icon={shareIcon} />
|
|
25
25
|
<Tabs.Item.Text>Fourth Tab</Tabs.Item.Text>
|
|
26
26
|
</Tabs.Item>
|
|
@@ -7,18 +7,18 @@ export default () => {
|
|
|
7
7
|
return (
|
|
8
8
|
<Tabs>
|
|
9
9
|
<Tabs.List>
|
|
10
|
-
<Tabs.Item
|
|
11
|
-
<Tabs.Item
|
|
12
|
-
<Tabs.Item
|
|
13
|
-
<Tabs.Item
|
|
14
|
-
<Tabs.Item
|
|
10
|
+
<Tabs.Item data-id="first">First Tab</Tabs.Item>
|
|
11
|
+
<Tabs.Item data-id="second">Second Tab</Tabs.Item>
|
|
12
|
+
<Tabs.Item data-id="third">Third Tab</Tabs.Item>
|
|
13
|
+
<Tabs.Item data-id="fourth">Fourth Tab</Tabs.Item>
|
|
14
|
+
<Tabs.Item data-id="fifth">Fifth Tab</Tabs.Item>
|
|
15
15
|
</Tabs.List>
|
|
16
16
|
<div style={{marginTop: space.m}}>
|
|
17
|
-
<Tabs.Panel
|
|
18
|
-
<Tabs.Panel
|
|
19
|
-
<Tabs.Panel
|
|
20
|
-
<Tabs.Panel
|
|
21
|
-
<Tabs.Panel
|
|
17
|
+
<Tabs.Panel data-id="first">Contents of First Tab</Tabs.Panel>
|
|
18
|
+
<Tabs.Panel data-id="second">Contents of Second Tab</Tabs.Panel>
|
|
19
|
+
<Tabs.Panel data-id="third">Contents of Third Tab</Tabs.Panel>
|
|
20
|
+
<Tabs.Panel data-id="fourth">Contents of Fourth Tab</Tabs.Panel>
|
|
21
|
+
<Tabs.Panel data-id="fifth">Contents of Fifth Tab</Tabs.Panel>
|
|
22
22
|
</div>
|
|
23
23
|
</Tabs>
|
|
24
24
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {Tabs, useTabsModel} from '@workday/canvas-kit-react/tabs';
|
|
4
|
-
import {HStack} from '@workday/canvas-kit-
|
|
4
|
+
import {HStack} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
import {SecondaryButton} from '@workday/canvas-kit-react/button';
|
|
6
6
|
|
|
7
7
|
type MyTabItem = {
|
|
@@ -28,21 +28,17 @@ export default () => {
|
|
|
28
28
|
<div style={{width: containerWidth}}>
|
|
29
29
|
<Tabs model={model}>
|
|
30
30
|
<Tabs.List overflowButton={<Tabs.OverflowButton>More</Tabs.OverflowButton>}>
|
|
31
|
-
{(item: MyTabItem) => <Tabs.Item
|
|
31
|
+
{(item: MyTabItem) => <Tabs.Item>{item.text}</Tabs.Item>}
|
|
32
32
|
</Tabs.List>
|
|
33
33
|
<Tabs.Menu.Popper>
|
|
34
34
|
<Tabs.Menu.Card maxWidth={300} maxHeight={200}>
|
|
35
35
|
<Tabs.Menu.List>
|
|
36
|
-
{(item: MyTabItem) => <Tabs.Menu.Item
|
|
36
|
+
{(item: MyTabItem) => <Tabs.Menu.Item>{item.text}</Tabs.Menu.Item>}
|
|
37
37
|
</Tabs.Menu.List>
|
|
38
38
|
</Tabs.Menu.Card>
|
|
39
39
|
</Tabs.Menu.Popper>
|
|
40
40
|
<Tabs.Panels>
|
|
41
|
-
{(item: MyTabItem) =>
|
|
42
|
-
<Tabs.Panel marginTop="m" name={item.id}>
|
|
43
|
-
{item.contents}
|
|
44
|
-
</Tabs.Panel>
|
|
45
|
-
)}
|
|
41
|
+
{(item: MyTabItem) => <Tabs.Panel marginTop="m">{item.contents}</Tabs.Panel>}
|
|
46
42
|
</Tabs.Panels>
|
|
47
43
|
</Tabs>
|
|
48
44
|
<hr />
|
|
@@ -23,13 +23,13 @@ export default () => {
|
|
|
23
23
|
return (
|
|
24
24
|
<Tabs model={model}>
|
|
25
25
|
<Tabs.List>
|
|
26
|
-
<Tabs.Item
|
|
26
|
+
<Tabs.Item data-id="first" aria-controls="mytab-panel">
|
|
27
27
|
First Tab
|
|
28
28
|
</Tabs.Item>
|
|
29
|
-
<Tabs.Item
|
|
29
|
+
<Tabs.Item data-id="second" aria-controls="mytab-panel">
|
|
30
30
|
Second Tab
|
|
31
31
|
</Tabs.Item>
|
|
32
|
-
<Tabs.Item
|
|
32
|
+
<Tabs.Item data-id="third" aria-controls="mytab-panel">
|
|
33
33
|
Third Tab
|
|
34
34
|
</Tabs.Item>
|
|
35
35
|
</Tabs.List>
|
|
@@ -16,7 +16,7 @@ import UseTooltip from './examples/UseTooltip';
|
|
|
16
16
|
|
|
17
17
|
A Tooltip component that renders information/text when the user hovers over an element. A tooltip is
|
|
18
18
|
used to label or describe an element. By default, a tooltip will label an element. This is useful
|
|
19
|
-
for
|
|
19
|
+
for icon button. A tooltip can also be used to describe additional information about an element
|
|
20
20
|
|
|
21
21
|
[> Workday Design Reference](https://design.workday.com/components/popups/tooltips)
|
|
22
22
|
|
|
@@ -55,7 +55,7 @@ tooltip being visible
|
|
|
55
55
|
|
|
56
56
|
### Basic Example
|
|
57
57
|
|
|
58
|
-
Here is a basic example of an `
|
|
58
|
+
Here is a basic example of an `TertiaryButton` that renders an icon using a tooltip to label the icon. This is labeling the
|
|
59
59
|
button for both sighted users and for screen readers. A tooltip will provide an `aria-label` to
|
|
60
60
|
child elements for the accessibility tree and a visual tooltip during mouse hover and focus events.
|
|
61
61
|
Mouse over or focus on the x icon below. Click "Show code" to see the source code.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {xIcon} from '@workday/canvas-system-icons-web';
|
|
4
|
-
import {
|
|
4
|
+
import {TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
5
5
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
6
6
|
|
|
7
7
|
export default () => {
|
|
8
8
|
return (
|
|
9
9
|
<Tooltip title="Close">
|
|
10
|
-
<
|
|
10
|
+
<TertiaryButton icon={xIcon} aria-label="Close" />
|
|
11
11
|
</Tooltip>
|
|
12
12
|
);
|
|
13
13
|
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {Popper} from '@workday/canvas-kit-react/popup';
|
|
4
4
|
import {xIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
-
import {
|
|
5
|
+
import {TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
6
6
|
import {TooltipContainer, useTooltip} from '@workday/canvas-kit-react/tooltip';
|
|
7
7
|
|
|
8
8
|
export default () => {
|
|
@@ -10,7 +10,7 @@ export default () => {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<>
|
|
13
|
-
<
|
|
13
|
+
<TertiaryButton icon={xIcon} {...targetProps} aria-label="Close" />
|
|
14
14
|
<Popper placement="top" {...popperProps}>
|
|
15
15
|
<TooltipContainer {...tooltipProps}>Close</TooltipContainer>
|
|
16
16
|
</Popper>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0-next.3+33247e91",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,31 +10,23 @@
|
|
|
10
10
|
"types": "dist/es6/index.d.ts",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "
|
|
13
|
+
"url": "https://github.com/workday/canvas-kit.git",
|
|
14
|
+
"directory": "modules/docs"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"dist/",
|
|
17
18
|
"lib/",
|
|
18
|
-
"index.ts"
|
|
19
|
-
"ts3.5/**/*"
|
|
19
|
+
"index.ts"
|
|
20
20
|
],
|
|
21
|
-
"typesVersions": {
|
|
22
|
-
"<=3.5": {
|
|
23
|
-
"*": [
|
|
24
|
-
"ts3.5/*"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
21
|
"scripts": {
|
|
29
22
|
"watch": "yarn build:es6 -w",
|
|
30
|
-
"clean": "rimraf dist && rimraf
|
|
23
|
+
"clean": "rimraf dist && rimraf .build-info && mkdirp dist",
|
|
31
24
|
"build:mdx": "node ./utils/build-mdx.js mdx/",
|
|
32
25
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
33
26
|
"build:es6": "tsc -p tsconfig.es6.json",
|
|
34
27
|
"build:rebuild": "npm-run-all clean build",
|
|
35
28
|
"build:specs": "node ./utils/build-specifications.js",
|
|
36
|
-
"build
|
|
37
|
-
"build": "npm-run-all --parallel build:cjs build:es6 build:mdx --sequential build:specs build:downlevel-dts",
|
|
29
|
+
"build": "npm-run-all --parallel build:cjs build:es6 build:mdx --sequential build:specs",
|
|
38
30
|
"depcheck": "node ../../utils/check-dependencies-exist.js",
|
|
39
31
|
"typecheck:src": "tsc -p . --noEmit --incremental false"
|
|
40
32
|
},
|
|
@@ -50,13 +42,13 @@
|
|
|
50
42
|
],
|
|
51
43
|
"dependencies": {
|
|
52
44
|
"@storybook/csf": "0.0.1",
|
|
53
|
-
"@workday/canvas-kit-react": "^6.
|
|
45
|
+
"@workday/canvas-kit-react": "^6.9.0-next.3+33247e91"
|
|
54
46
|
},
|
|
55
47
|
"devDependencies": {
|
|
56
48
|
"fs-extra": "^10.0.0",
|
|
57
49
|
"glob": "^7.1.6",
|
|
58
50
|
"mkdirp": "^1.0.3",
|
|
59
|
-
"typescript": "
|
|
51
|
+
"typescript": "4.1"
|
|
60
52
|
},
|
|
61
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "33247e91cbfeabea3ea344808b5fd241250f9a56"
|
|
62
54
|
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
BoxProps,
|
|
5
|
-
BorderStyleProps,
|
|
6
|
-
ColorStyleProps,
|
|
7
|
-
DepthStyleProps,
|
|
8
|
-
FlexItemStyleProps,
|
|
9
|
-
LayoutStyleProps,
|
|
10
|
-
PositionStyleProps,
|
|
11
|
-
SpaceStyleProps,
|
|
12
|
-
} from '@workday/canvas-kit-labs-react/common';
|
|
13
|
-
// border props
|
|
14
|
-
export const BoxBorder = (props: BorderStyleProps) => <div />;
|
|
15
|
-
export const BoxBorderShorthand = (
|
|
16
|
-
props: Pick<
|
|
17
|
-
BorderStyleProps,
|
|
18
|
-
'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft'
|
|
19
|
-
>
|
|
20
|
-
) => <div />;
|
|
21
|
-
export const BoxBorderColor = (
|
|
22
|
-
props: Pick<
|
|
23
|
-
BorderStyleProps,
|
|
24
|
-
'borderColor' | 'borderTopColor' | 'borderRightColor' | 'borderBottomColor' | 'borderLeftColor'
|
|
25
|
-
>
|
|
26
|
-
) => <div />;
|
|
27
|
-
export const BoxBorderRadius = (
|
|
28
|
-
props: Pick<
|
|
29
|
-
BorderStyleProps,
|
|
30
|
-
| 'borderRadius'
|
|
31
|
-
| 'borderTopLeftRadius'
|
|
32
|
-
| 'borderTopRightRadius'
|
|
33
|
-
| 'borderBottomLeftRadius'
|
|
34
|
-
| 'borderBottomRightRadius'
|
|
35
|
-
>
|
|
36
|
-
) => <div />;
|
|
37
|
-
export const BoxBorderStyle = (
|
|
38
|
-
props: Pick<
|
|
39
|
-
BorderStyleProps,
|
|
40
|
-
'borderStyle' | 'borderTopStyle' | 'borderRightStyle' | 'borderBottomStyle' | 'borderLeftStyle'
|
|
41
|
-
>
|
|
42
|
-
) => <div />;
|
|
43
|
-
export const BoxBorderWidth = (
|
|
44
|
-
props: Pick<
|
|
45
|
-
BorderStyleProps,
|
|
46
|
-
'borderWidth' | 'borderTopWidth' | 'borderRightWidth' | 'borderBottomWidth' | 'borderLeftWidth'
|
|
47
|
-
>
|
|
48
|
-
) => <div />;
|
|
49
|
-
export const BoxBorderLogical = (
|
|
50
|
-
props: Pick<
|
|
51
|
-
BorderStyleProps,
|
|
52
|
-
| 'borderInlineStart'
|
|
53
|
-
| 'borderInlineStartColor'
|
|
54
|
-
| 'borderInlineStartStyle'
|
|
55
|
-
| 'borderInlineStartWidth'
|
|
56
|
-
| 'borderInlineEnd'
|
|
57
|
-
| 'borderInlineEndColor'
|
|
58
|
-
| 'borderInlineEndStyle'
|
|
59
|
-
| 'borderInlineEndWidth'
|
|
60
|
-
>
|
|
61
|
-
) => <div />;
|
|
62
|
-
// color props
|
|
63
|
-
export const BoxColor = (props: ColorStyleProps) => <div />;
|
|
64
|
-
// depth props
|
|
65
|
-
export const BoxDepth = (props: DepthStyleProps) => <div />;
|
|
66
|
-
// flex item props
|
|
67
|
-
export const BoxFlexItem = (props: FlexItemStyleProps) => <div />;
|
|
68
|
-
// layout props
|
|
69
|
-
export const BoxLayout = (props: LayoutStyleProps) => <div />;
|
|
70
|
-
// position props
|
|
71
|
-
export const BoxPosition = (props: PositionStyleProps) => <div />;
|
|
72
|
-
export const BoxPositionLogical = (
|
|
73
|
-
props: Pick<PositionStyleProps, 'insetInlineStart' | 'insetInlineEnd'>
|
|
74
|
-
) => <div />;
|
|
75
|
-
export const BoxPositionStandard = (
|
|
76
|
-
props: Omit<PositionStyleProps, 'insetInlineStart' | 'insetInlineEnd'>
|
|
77
|
-
) => <div />;
|
|
78
|
-
// space props
|
|
79
|
-
export const BoxSpace = (props: SpaceStyleProps) => <div />;
|
|
80
|
-
export const BoxSpaceLogical = (
|
|
81
|
-
props: Pick<
|
|
82
|
-
SpaceStyleProps,
|
|
83
|
-
'marginInlineStart' | 'marginInlineEnd' | 'paddingInlineStart' | 'paddingInlineEnd'
|
|
84
|
-
>
|
|
85
|
-
) => <div />;
|
|
86
|
-
export const BoxSpaceStandard = (
|
|
87
|
-
props: Omit<
|
|
88
|
-
SpaceStyleProps,
|
|
89
|
-
'marginInlineStart' | 'marginInlineEnd' | 'paddingInlineStart' | 'paddingInlineEnd'
|
|
90
|
-
>
|
|
91
|
-
) => <div />;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {Stack} from '@workday/canvas-kit-labs-react/layout';
|
|
3
|
-
import {Box} from '@workday/canvas-kit-labs-react/common';
|
|
4
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
5
|
-
import {
|
|
6
|
-
arrowLeftIcon,
|
|
7
|
-
arrowRightIcon,
|
|
8
|
-
exportIcon,
|
|
9
|
-
homeIcon,
|
|
10
|
-
relatedActionsIcon,
|
|
11
|
-
resetIcon,
|
|
12
|
-
starIcon,
|
|
13
|
-
} from '@workday/canvas-system-icons-web';
|
|
14
|
-
|
|
15
|
-
export default () => {
|
|
16
|
-
return (
|
|
17
|
-
<Stack border="solid 2px" shouldWrapChildren spacing="xxxs" padding="xxxs">
|
|
18
|
-
<IconButton aria-label="go to previous page" icon={arrowLeftIcon} variant="squareFilled" />
|
|
19
|
-
<IconButton aria-label="go to next page" icon={arrowRightIcon} variant="squareFilled" />
|
|
20
|
-
<IconButton aria-label="reload current page" icon={resetIcon} variant="squareFilled" />
|
|
21
|
-
<IconButton aria-label="go to home page" icon={homeIcon} variant="squareFilled" />
|
|
22
|
-
<Box marginInlineStart="m">
|
|
23
|
-
<IconButton aria-label="share current page" icon={exportIcon} variant="squareFilled" />
|
|
24
|
-
</Box>
|
|
25
|
-
<IconButton aria-label="bookmark current page" icon={starIcon} variant="squareFilled" />
|
|
26
|
-
<IconButton
|
|
27
|
-
aria-label="view related actions"
|
|
28
|
-
icon={relatedActionsIcon}
|
|
29
|
-
variant="squareFilled"
|
|
30
|
-
/>
|
|
31
|
-
</Stack>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
2
|
-
import {Specifications} from '@workday/canvas-kit-docs';
|
|
3
|
-
|
|
4
|
-
import Circle from './examples/Circle';
|
|
5
|
-
import CircleFilled from './examples/CircleFilled';
|
|
6
|
-
import Inverse from './examples/Inverse';
|
|
7
|
-
import InverseFilled from './examples/InverseFilled';
|
|
8
|
-
import MirroredIcon from './examples/MirroredIcon';
|
|
9
|
-
import Plain from './examples/Plain';
|
|
10
|
-
import Square from './examples/Square';
|
|
11
|
-
import SquareFilled from './examples/SquareFilled';
|
|
12
|
-
import Toggleable from './examples/Toggleable';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# Canvas Kit Icon Button
|
|
16
|
-
|
|
17
|
-
Clickable icon button elements that extend the native `<button>` element with Canvas styling.
|
|
18
|
-
|
|
19
|
-
[> Workday Design Reference](https://design.workday.com/components/buttons/icon-buttons)
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
yarn add @workday/canvas-kit-react
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
Here is a basic example of an Icon Button. Buttons can be customized with several props to change
|
|
30
|
-
the size, variant, etc.
|
|
31
|
-
|
|
32
|
-
<ExampleCodeBlock code={Circle} />
|
|
33
|
-
|
|
34
|
-
### Variants
|
|
35
|
-
|
|
36
|
-
`circle` is the default variant. Circle Icon Buttons have a hover state and should be used for
|
|
37
|
-
actions that require more emphasis than Plain Buttons.
|
|
38
|
-
|
|
39
|
-
Below are the other available variants:
|
|
40
|
-
|
|
41
|
-
#### CircleFilled
|
|
42
|
-
|
|
43
|
-
Filled Icon Buttons have a gray background and a hover state. Use these buttons for high-emphasis
|
|
44
|
-
actions.
|
|
45
|
-
|
|
46
|
-
<ExampleCodeBlock code={CircleFilled} />
|
|
47
|
-
|
|
48
|
-
#### Plain
|
|
49
|
-
|
|
50
|
-
Plain Icon Buttons don’t have a hover state and should be used for low-emphasis actions.
|
|
51
|
-
|
|
52
|
-
<ExampleCodeBlock code={Plain} />
|
|
53
|
-
|
|
54
|
-
#### Square
|
|
55
|
-
|
|
56
|
-
Square Icon Buttons are the equivalent to Default Icon Buttons and are typically used in Toolbars.
|
|
57
|
-
|
|
58
|
-
<ExampleCodeBlock code={Square} />
|
|
59
|
-
|
|
60
|
-
#### SquareFilled
|
|
61
|
-
|
|
62
|
-
Square Filled Icon Buttons are the equivalent to Filled Icon Buttons and are used in Icon Button
|
|
63
|
-
Toggle Groups.
|
|
64
|
-
|
|
65
|
-
<ExampleCodeBlock code={SquareFilled} />
|
|
66
|
-
|
|
67
|
-
#### Inverse
|
|
68
|
-
|
|
69
|
-
Inverse Icon Buttons should be used on dark backgrounds.
|
|
70
|
-
|
|
71
|
-
<ExampleCodeBlock code={Inverse} />
|
|
72
|
-
|
|
73
|
-
#### InverseFilled
|
|
74
|
-
|
|
75
|
-
InverseFilled Icon Buttons are a higher emphasis version of Inverse, and should be used on dark
|
|
76
|
-
backgrounds.
|
|
77
|
-
|
|
78
|
-
<ExampleCodeBlock code={InverseFilled} />
|
|
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
|
-
|
|
93
|
-
### Toggleability
|
|
94
|
-
|
|
95
|
-
The `toggle` prop can be used to make icon buttons toggleable.
|
|
96
|
-
|
|
97
|
-
<ExampleCodeBlock code={Toggleable} />
|
|
98
|
-
|
|
99
|
-
## Props
|
|
100
|
-
|
|
101
|
-
Undocumented props are spread to the underlying `<button>` element.
|
|
102
|
-
|
|
103
|
-
<ArgsTable of={IconButton} />
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
-
|
|
6
|
-
export default () => (
|
|
7
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="circleFilled" />
|
|
8
|
-
);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import {jsx} from '@emotion/core';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import {space, colors, borderRadius} from '@workday/canvas-kit-react/tokens';
|
|
6
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
7
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
8
|
-
|
|
9
|
-
const blueBackground = {
|
|
10
|
-
backgroundColor: colors.blueberry400,
|
|
11
|
-
borderRadius: borderRadius.m,
|
|
12
|
-
padding: space.xxs,
|
|
13
|
-
display: 'inline-block',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default () => (
|
|
17
|
-
<div css={blueBackground}>
|
|
18
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="inverse" />
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import {jsx} from '@emotion/core';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import {space, colors, borderRadius} from '@workday/canvas-kit-react/tokens';
|
|
6
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
7
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
8
|
-
|
|
9
|
-
const blueBackground = {
|
|
10
|
-
backgroundColor: colors.blueberry400,
|
|
11
|
-
borderRadius: borderRadius.m,
|
|
12
|
-
padding: space.xxs,
|
|
13
|
-
display: 'inline-block',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default () => (
|
|
17
|
-
<div css={blueBackground}>
|
|
18
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="inverseFilled" />
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
-
|
|
6
|
-
export default () => (
|
|
7
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="plain" />
|
|
8
|
-
);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
-
|
|
6
|
-
export default () => (
|
|
7
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="square" />
|
|
8
|
-
);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {IconButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {activityStreamIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
-
|
|
6
|
-
export default () => (
|
|
7
|
-
<IconButton icon={activityStreamIcon} aria-label="Activity Stream" variant="squareFilled" />
|
|
8
|
-
);
|