@workday/canvas-kit-docs 13.0.0-alpha.998-next.0 → 13.0.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/dist/es6/lib/ExampleCodeBlock.d.ts +1 -2
- package/dist/es6/lib/ExampleCodeBlock.d.ts.map +1 -1
- package/dist/es6/lib/ExampleCodeBlock.js +53 -28
- package/dist/es6/lib/MDXElements.d.ts +1 -2
- package/dist/es6/lib/MDXElements.d.ts.map +1 -1
- package/dist/es6/lib/MDXElements.js +6 -6
- package/dist/es6/lib/MoreTooltip.d.ts +1 -1
- package/dist/es6/lib/MoreTooltip.d.ts.map +1 -1
- package/dist/es6/lib/MoreTooltip.js +11 -12
- package/dist/es6/lib/Specifications.d.ts +1 -2
- package/dist/es6/lib/Specifications.d.ts.map +1 -1
- package/dist/es6/lib/Specifications.js +3 -20
- package/dist/es6/lib/StylePropsTable.d.ts +1 -2
- package/dist/es6/lib/StylePropsTable.d.ts.map +1 -1
- package/dist/es6/lib/StylePropsTable.js +6 -16
- package/dist/es6/lib/Table.d.ts.map +1 -1
- package/dist/es6/lib/Table.js +7 -7
- package/dist/es6/lib/Value.d.ts +3 -3
- package/dist/es6/lib/Value.d.ts.map +1 -1
- package/dist/es6/lib/Value.js +16 -51
- package/dist/es6/lib/docs.js +270155 -169429
- package/dist/es6/lib/stackblitzFiles/.eslintrc.cjs.txt +15 -0
- package/dist/es6/lib/stackblitzFiles/App.d.ts +2 -0
- package/dist/es6/lib/stackblitzFiles/App.d.ts.map +1 -0
- package/dist/es6/lib/stackblitzFiles/App.js +17 -0
- package/dist/es6/lib/stackblitzFiles/App.tsx +33 -0
- package/dist/es6/lib/stackblitzFiles/Demo.d.ts +2 -0
- package/dist/es6/lib/stackblitzFiles/Demo.d.ts.map +1 -0
- package/dist/es6/lib/stackblitzFiles/Demo.js +2 -0
- package/dist/es6/lib/stackblitzFiles/Demo.tsx +1 -0
- package/dist/es6/lib/stackblitzFiles/index.html +13 -0
- package/dist/es6/lib/stackblitzFiles/main.d.ts +4 -0
- package/dist/es6/lib/stackblitzFiles/main.d.ts.map +1 -0
- package/dist/es6/lib/stackblitzFiles/main.js +25 -0
- package/dist/es6/lib/stackblitzFiles/main.tsx +27 -0
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.d.ts +2 -0
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.d.ts.map +1 -0
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +42 -0
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +42 -0
- package/dist/es6/lib/stackblitzFiles/tsconfig.json +26 -0
- package/dist/es6/lib/stackblitzFiles/tsconfig.node.json +12 -0
- package/dist/es6/lib/stackblitzFiles/vite-env.d.ts +1 -0
- package/dist/es6/lib/stackblitzFiles/vite.config.d.ts +4 -0
- package/dist/es6/lib/stackblitzFiles/vite.config.d.ts.map +1 -0
- package/dist/es6/lib/stackblitzFiles/vite.config.js +7 -0
- package/dist/es6/lib/stackblitzFiles/vite.config.ts +10 -0
- package/dist/es6/lib/widgetUtils.d.ts +5 -5
- package/dist/es6/lib/widgetUtils.d.ts.map +1 -1
- package/dist/es6/lib/widgetUtils.js +25 -54
- package/dist/es6/lib/widgets/array.js +2 -4
- package/dist/es6/lib/widgets/callExpression.js +2 -14
- package/dist/es6/lib/widgets/canvasColor.js +2 -2
- package/dist/es6/lib/widgets/component.js +2 -4
- package/dist/es6/lib/widgets/conditional.js +2 -12
- package/dist/es6/lib/widgets/enhancedComponent.js +15 -67
- package/dist/es6/lib/widgets/external.js +2 -4
- package/dist/es6/lib/widgets/function.js +7 -26
- package/dist/es6/lib/widgets/intersection.js +2 -3
- package/dist/es6/lib/widgets/model.js +3 -19
- package/dist/es6/lib/widgets/object.js +2 -2
- package/dist/es6/lib/widgets/parenthesis.js +2 -5
- package/dist/es6/lib/widgets/primitives.js +9 -27
- package/dist/es6/lib/widgets/qualifiedName.js +2 -5
- package/dist/es6/lib/widgets/symbol.js +2 -2
- package/dist/es6/lib/widgets/tuple.js +2 -5
- package/dist/es6/lib/widgets/typeParameter.js +2 -13
- package/dist/es6/lib/widgets/union.js +4 -10
- package/dist/es6/mdx/installBlock.d.ts +1 -2
- package/dist/es6/mdx/installBlock.d.ts.map +1 -1
- package/dist/es6/mdx/installBlock.js +2 -6
- package/dist/es6/mdx/style-props/examples/Background.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Background.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Background.js +2 -5
- package/dist/es6/mdx/style-props/examples/Border.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Border.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Border.js +2 -5
- package/dist/es6/mdx/style-props/examples/Color.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Color.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Color.js +2 -5
- package/dist/es6/mdx/style-props/examples/Depth.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Depth.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Depth.js +2 -5
- package/dist/es6/mdx/style-props/examples/Flex.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Flex.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Flex.js +2 -14
- package/dist/es6/mdx/style-props/examples/FlexItem.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/FlexItem.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/FlexItem.js +2 -13
- package/dist/es6/mdx/style-props/examples/Grid.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Grid.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Grid.js +2 -6
- package/dist/es6/mdx/style-props/examples/GridItem.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/GridItem.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/GridItem.js +2 -6
- package/dist/es6/mdx/style-props/examples/Layout.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Layout.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Layout.js +2 -5
- package/dist/es6/mdx/style-props/examples/Other.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Other.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Other.js +2 -5
- package/dist/es6/mdx/style-props/examples/Position.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Position.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Position.js +2 -5
- package/dist/es6/mdx/style-props/examples/Space.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Space.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Space.js +2 -8
- package/dist/es6/mdx/style-props/examples/Text.d.ts +1 -2
- package/dist/es6/mdx/style-props/examples/Text.d.ts.map +1 -1
- package/dist/es6/mdx/style-props/examples/Text.js +2 -5
- package/dist/es6/mdx/versionsTable.d.ts +1 -2
- package/dist/es6/mdx/versionsTable.d.ts.map +1 -1
- package/dist/es6/mdx/versionsTable.js +23 -49
- package/dist/es6/mdx/welcomePage.d.ts +1 -2
- package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
- package/dist/es6/mdx/welcomePage.js +37 -49
- package/dist/mdx/12.0-UPGRADE-GUIDE.mdx +1 -1
- package/dist/mdx/13.0-UPGRADE-GUIDE.mdx +454 -0
- package/dist/mdx/CODEMODS.mdx +58 -0
- package/dist/mdx/CONTRIBUTING.mdx +8 -0
- package/dist/mdx/TESTING.mdx +34 -0
- package/dist/mdx/preview-react/_examples/mdx/{Forms.mdx → FormLibraryExample.mdx} +0 -2
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Basic.tsx +1 -1
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Body.tsx +1 -1
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Caution.tsx +1 -2
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Critical.tsx +5 -12
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/CustomIconCritical.tsx +1 -1
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Heading.tsx +1 -1
- package/dist/mdx/preview-react/information-highlight/examples/Informational.tsx +55 -0
- package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/RTL.tsx +1 -1
- package/dist/mdx/preview-react/loading-sparkles/examples/Basic.tsx +2 -2
- package/dist/mdx/preview-react/multi-select/examples/Basic.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Complex.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Controlled.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Icons.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Searching.tsx +1 -1
- package/dist/mdx/preview-react/pill/Pill.mdx +18 -9
- package/dist/mdx/preview-react/pill/examples/Basic.tsx +14 -8
- package/dist/mdx/preview-react/pill/examples/CustomStyles.tsx +45 -0
- package/dist/mdx/preview-react/pill/examples/WithAvatar.tsx +16 -10
- package/dist/mdx/preview-react/pill/examples/WithCount.tsx +12 -6
- package/dist/mdx/preview-react/pill/examples/WithList.tsx +15 -5
- package/dist/mdx/preview-react/pill/examples/WithReadOnly.tsx +8 -5
- package/dist/mdx/preview-react/pill/examples/WithRemovable.tsx +23 -11
- package/dist/mdx/preview-react/segmented-control/examples/Disabled.tsx +0 -1
- package/dist/mdx/preview-react/segmented-control/examples/RTL.tsx +0 -1
- package/dist/mdx/preview-react/segmented-control/examples/Vertical.tsx +0 -1
- package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithCustomOptionsLeft.tsx +1 -1
- package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithSimpleOptionsLeft.tsx +1 -1
- package/dist/mdx/preview-react/select/examples/Top Label/Alert.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/Default.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithCustomOptions.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithSimpleOptions.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/Disabled.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/Error.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/Grow.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/Top Label/Scrollable.tsx +0 -2
- package/dist/mdx/preview-react/select/examples/storiesData.tsx +0 -1
- package/dist/mdx/preview-react/side-panel/SidePanel.mdx +28 -3
- package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +36 -17
- package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +40 -34
- package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +47 -23
- package/dist/mdx/preview-react/side-panel/examples/HiddenName.tsx +24 -5
- package/dist/mdx/preview-react/side-panel/examples/OnExpandedChange.tsx +22 -6
- package/dist/mdx/preview-react/side-panel/examples/OnStateTransition.tsx +24 -9
- package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +39 -40
- package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +36 -36
- package/dist/mdx/preview-react/text-area/examples/Alert.tsx +1 -4
- package/dist/mdx/preview-react/text-input/examples/Alert.tsx +1 -4
- package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +1 -4
- package/dist/mdx/react/_examples/Tooltips.mdx +15 -0
- package/dist/mdx/react/_examples/examples/Tooltips/ListOfUploadedFiles.tsx +38 -0
- package/dist/mdx/react/_examples/mdx/SidePanel.mdx +18 -1
- package/dist/mdx/react/_examples/mdx/examples/GlobalHeader.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/SidePanelWithNavigation.tsx +154 -116
- package/dist/mdx/react/_examples/mdx/examples/SidePanelWithOverlay.tsx +33 -15
- package/dist/mdx/react/_examples/mdx/examples/Table/WithSelectableRows.tsx +1 -1
- package/dist/mdx/react/action-bar/examples/Basic.tsx +0 -1
- package/dist/mdx/react/action-bar/examples/DeleteAction.tsx +0 -2
- package/dist/mdx/react/action-bar/examples/Icons.tsx +0 -2
- package/dist/mdx/react/avatar/avatar/examples/Basic.tsx +2 -3
- package/dist/mdx/react/avatar/avatar/examples/Button.tsx +3 -4
- package/dist/mdx/react/avatar/avatar/examples/CustomStyles.tsx +2 -3
- package/dist/mdx/react/avatar/avatar/examples/Image.tsx +7 -8
- package/dist/mdx/react/avatar/avatar/examples/LazyLoad.tsx +7 -2
- package/dist/mdx/react/avatar/avatar/examples/ObjectFit.tsx +9 -4
- package/dist/mdx/react/avatar/avatar/examples/Size.tsx +10 -11
- package/dist/mdx/react/avatar/avatar/examples/Variant.tsx +2 -3
- package/dist/mdx/react/banner/examples/Error.tsx +0 -2
- package/dist/mdx/react/banner/examples/Sticky.tsx +0 -1
- package/dist/mdx/react/banner/examples/StickyAnimation.tsx +42 -26
- package/dist/mdx/react/breadcrumbs/examples/Basic.tsx +0 -1
- package/dist/mdx/react/button/button/Button.mdx +5 -1
- package/dist/mdx/react/button/button/examples/CustomStyles.tsx +1 -3
- package/dist/mdx/react/button/button/examples/Delete.tsx +0 -2
- package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +3 -3
- package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +5 -1
- package/dist/mdx/react/button/button/examples/Hyperlink.tsx +0 -2
- package/dist/mdx/react/button/button/examples/Primary.tsx +0 -2
- package/dist/mdx/react/button/button/examples/ThemeOverrides.tsx +14 -17
- package/dist/mdx/react/collection/mdx/examples/MultiSelection.tsx +2 -1
- package/dist/mdx/react/collection/mdx/examples/Selection.tsx +2 -1
- package/dist/mdx/react/color-picker/color-preview/examples/Basic.tsx +0 -1
- package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +0 -1
- package/dist/mdx/{labs-react → react}/expandable/Expandable.mdx +2 -2
- package/dist/mdx/{labs-react → react}/expandable/examples/Avatar.tsx +5 -7
- package/dist/mdx/{labs-react → react}/expandable/examples/Depth.tsx +1 -4
- package/dist/mdx/{labs-react → react}/expandable/examples/EndIcon.tsx +1 -3
- package/dist/mdx/{labs-react → react}/expandable/examples/HoistedModel.tsx +1 -1
- package/dist/mdx/{labs-react → react}/expandable/examples/LongTitle.tsx +2 -4
- package/dist/mdx/{labs-react → react}/expandable/examples/RTL.tsx +1 -3
- package/dist/mdx/{labs-react → react}/expandable/examples/StartIcon.tsx +1 -3
- package/dist/mdx/react/menu/Menu.mdx +34 -0
- package/dist/mdx/react/menu/examples/Grouping.tsx +32 -0
- package/dist/mdx/react/menu/examples/Icons.tsx +1 -1
- package/dist/mdx/react/menu/examples/Nested.tsx +49 -0
- package/dist/mdx/react/menu/examples/NestedDynamic.tsx +105 -0
- package/dist/mdx/react/modal/examples/Basic.tsx +0 -2
- package/dist/mdx/react/modal/examples/IframeTest.tsx +0 -1
- package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +0 -1
- package/dist/mdx/react/modal/examples/StackedModals.tsx +0 -1
- package/dist/mdx/react/pagination/examples/CustomRange.tsx +0 -1
- package/dist/mdx/react/pagination/examples/GoToForm.tsx +0 -1
- package/dist/mdx/react/pagination/examples/JumpControls.tsx +0 -1
- package/dist/mdx/react/popup/examples/Basic.tsx +0 -2
- package/dist/mdx/react/popup/examples/CloseOnTargetHiddenTest.tsx +0 -1
- package/dist/mdx/react/popup/examples/ComboboxWithinPopup.tsx +0 -1
- package/dist/mdx/react/popup/examples/MultiplePopups.tsx +0 -2
- package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +0 -1
- package/dist/mdx/react/popup/examples/PopupWithNonHidablePopup.tsx +0 -1
- package/dist/mdx/react/popup/examples/ReturnFocusTest.tsx +8 -6
- package/dist/mdx/react/popup/examples/TooltipReturnFocus.tsx +0 -1
- package/dist/mdx/react/select/examples/Basic.tsx +1 -0
- package/dist/mdx/react/select/examples/MenuHeight.tsx +0 -1
- package/dist/mdx/react/table/Table.mdx +14 -1
- package/dist/mdx/react/table/examples/BaseHtmlTable.tsx +46 -0
- package/dist/mdx/react/tabs/examples/Basic.tsx +0 -1
- package/dist/mdx/react/tabs/examples/DisabledTab.tsx +0 -1
- package/dist/mdx/react/tabs/examples/DynamicTabs.tsx +3 -2
- package/dist/mdx/react/tabs/examples/NamedTabs.tsx +0 -1
- package/dist/mdx/react/tabs/examples/RightToLeft.tsx +0 -1
- package/dist/mdx/react/text-input/examples/Basic.tsx +0 -3
- package/dist/mdx/react/toast/examples/Basic.tsx +0 -2
- package/dist/mdx/react/toast/examples/ToastAlert.tsx +0 -2
- package/dist/mdx/react/toast/examples/ToastDialog.tsx +0 -2
- package/dist/mdx/react/tokens/Tokens.mdx +1 -1
- package/dist/mdx/react/tooltip/Tooltip.mdx +31 -1
- package/dist/mdx/react/tooltip/examples/Default.tsx +0 -2
- package/dist/mdx/react/tooltip/examples/DescribeType.tsx +0 -2
- package/dist/mdx/react/tooltip/examples/DescriptionType.tsx +20 -0
- package/dist/mdx/react/tooltip/examples/Muted.tsx +0 -2
- package/dist/mdx/react/tooltip/examples/Placements.tsx +14 -11
- package/dist/mdx/style-props/examples/Background.tsx +2 -3
- package/dist/mdx/style-props/examples/Border.tsx +2 -3
- package/dist/mdx/style-props/examples/Color.tsx +2 -3
- package/dist/mdx/style-props/examples/Depth.tsx +2 -3
- package/dist/mdx/style-props/examples/Flex.tsx +0 -1
- package/dist/mdx/style-props/examples/FlexItem.tsx +0 -1
- package/dist/mdx/style-props/examples/Grid.tsx +0 -1
- package/dist/mdx/style-props/examples/GridItem.tsx +0 -1
- package/dist/mdx/style-props/examples/Layout.tsx +0 -1
- package/dist/mdx/style-props/examples/Other.tsx +0 -1
- package/dist/mdx/style-props/examples/Position.tsx +2 -3
- package/dist/mdx/style-props/examples/Space.tsx +2 -3
- package/dist/mdx/style-props/examples/Text.tsx +0 -1
- package/lib/ExampleCodeBlock.tsx +57 -19
- package/lib/MDXElements.tsx +3 -3
- package/lib/StylePropsTable.tsx +1 -2
- package/lib/Table.tsx +0 -1
- package/lib/stackblitzFiles/.eslintrc.cjs.txt +15 -0
- package/lib/stackblitzFiles/App.tsx +33 -0
- package/lib/stackblitzFiles/Demo.tsx +1 -0
- package/lib/stackblitzFiles/index.html +13 -0
- package/lib/stackblitzFiles/main.tsx +27 -0
- package/lib/stackblitzFiles/packageJSONFile.ts +42 -0
- package/lib/stackblitzFiles/tsconfig.json +26 -0
- package/lib/stackblitzFiles/tsconfig.node.json +12 -0
- package/lib/stackblitzFiles/types/custom-imports.d.ts +13 -0
- package/lib/stackblitzFiles/vite-env.d.ts +1 -0
- package/lib/stackblitzFiles/vite.config.ts +10 -0
- package/lib/widgets/array.tsx +0 -2
- package/lib/widgets/canvasColor.tsx +0 -2
- package/lib/widgets/component.tsx +0 -2
- package/lib/widgets/conditional.tsx +0 -2
- package/lib/widgets/enhancedComponent.tsx +1 -1
- package/lib/widgets/external.tsx +3 -2
- package/lib/widgets/model.tsx +0 -2
- package/lib/widgets/parenthesis.tsx +0 -2
- package/lib/widgets/primitives.tsx +1 -5
- package/lib/widgets/qualifiedName.tsx +0 -2
- package/lib/widgets/symbol.tsx +0 -2
- package/lib/widgets/tuple.tsx +0 -2
- package/lib/widgets/typeParameter.tsx +0 -2
- package/package.json +8 -7
- package/dist/mdx/preview-react/InformationHighlight/examples/Informational.tsx +0 -27
- /package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/InformationHighlight.mdx +0 -0
- /package/dist/mdx/{labs-react → react}/expandable/examples/test-avatar.png +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {Menu} from '@workday/canvas-kit-react/menu';
|
|
4
|
+
import {BodyText} from '@workday/canvas-kit-react/text';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
type Item = {
|
|
8
|
+
type?: 'item';
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
type SubmenuItem = {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
type: 'submenu';
|
|
16
|
+
children: (Item | SubmenuItem)[];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// This is a user-defined object. The structure uses `id` for the item identifier which is the
|
|
20
|
+
// default key used by the collection system and therefore doesn't require a `getId` function to be
|
|
21
|
+
// passed to the model. The `label` isn't the standard text value used by the collection system, so
|
|
22
|
+
// a `getTextValue` function is required. The `type` and `children` aren't important at all to the
|
|
23
|
+
// menu and are used in the template by the user-defined `renderItem` function.
|
|
24
|
+
const items: (SubmenuItem | Item)[] = [
|
|
25
|
+
{id: 'first-item', label: 'First Item'},
|
|
26
|
+
{
|
|
27
|
+
id: 'second-item',
|
|
28
|
+
label: 'Second Item',
|
|
29
|
+
type: 'submenu',
|
|
30
|
+
children: [
|
|
31
|
+
{id: 'first-sub-item', label: 'First Sub Item'},
|
|
32
|
+
{
|
|
33
|
+
id: 'second-sub-item',
|
|
34
|
+
label: 'Second Sub Item',
|
|
35
|
+
type: 'submenu',
|
|
36
|
+
children: [
|
|
37
|
+
{id: 'first-sub-sub-item', label: 'First Sub Sub Item'},
|
|
38
|
+
{
|
|
39
|
+
id: 'second-sub-sub-item',
|
|
40
|
+
type: 'submenu',
|
|
41
|
+
label: 'Second Sub Sub Item',
|
|
42
|
+
children: [
|
|
43
|
+
{id: 'first-sub-sub-sub-item', label: 'First Sub Sub Sub Item'},
|
|
44
|
+
{
|
|
45
|
+
id: 'second-sub-sub-sub-item',
|
|
46
|
+
label: 'Second Sub Sub Sub Item',
|
|
47
|
+
},
|
|
48
|
+
{id: 'third-sub-sub-sub-item', label: 'Third Sub Sub Sub Item'},
|
|
49
|
+
{id: 'fourth-sub-sub-sub-item', label: 'Fourth Sub Sub Sub Item'},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{id: 'third-sub-sub-item', label: 'Third Sub Sub Item'},
|
|
53
|
+
{id: 'fourth-sub-sub-item', label: 'Fourth Sub Sub Item'},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{id: 'third-sub-item', label: 'Third Sub Item'},
|
|
57
|
+
{id: 'fourth-sub-item', label: 'Fourth Sub Item'},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{id: 'third-item', label: 'Third Item'},
|
|
61
|
+
{id: 'fourth-item', label: 'Fourth Item'},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export default () => {
|
|
65
|
+
const [selected, setSelected] = React.useState('');
|
|
66
|
+
|
|
67
|
+
// defining this inline function allows use to recurse any nesting level defined by the `items`
|
|
68
|
+
// array.
|
|
69
|
+
function renderItem(item: SubmenuItem | Item) {
|
|
70
|
+
if (item.type === 'submenu') {
|
|
71
|
+
return (
|
|
72
|
+
<Menu.Submenu id={item.id} items={item.children}>
|
|
73
|
+
<Menu.Submenu.TargetItem>{item.label}</Menu.Submenu.TargetItem>
|
|
74
|
+
<Menu.Submenu.Popper>
|
|
75
|
+
<Menu.Submenu.Card>
|
|
76
|
+
<Menu.Submenu.List>{renderItem}</Menu.Submenu.List>
|
|
77
|
+
</Menu.Submenu.Card>
|
|
78
|
+
</Menu.Submenu.Popper>
|
|
79
|
+
</Menu.Submenu>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
return <Menu.Item>{item.label}</Menu.Item>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<Menu
|
|
87
|
+
items={items}
|
|
88
|
+
id="first-menu"
|
|
89
|
+
getTextValue={item => item.label}
|
|
90
|
+
onSelect={data => {
|
|
91
|
+
setSelected(data.id);
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<Menu.Target>Open Menu</Menu.Target>
|
|
95
|
+
<Menu.Popper>
|
|
96
|
+
<Menu.Card>
|
|
97
|
+
<Menu.List>{renderItem}</Menu.List>
|
|
98
|
+
</Menu.Card>
|
|
99
|
+
</Menu.Popper>
|
|
100
|
+
<BodyText size="small" cs={{marginBlockStart: system.space.x4}}>
|
|
101
|
+
Selected: <span data-testid="output">{selected}</span>
|
|
102
|
+
</BodyText>
|
|
103
|
+
</Menu>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
4
2
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
5
|
-
import {TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
3
|
+
import {SecondaryButton, TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
4
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
5
|
import {
|
|
7
6
|
Popup,
|
|
8
7
|
useCloseOnOutsideClick,
|
|
@@ -33,9 +32,12 @@ export default () => {
|
|
|
33
32
|
<FormField.Label>Name</FormField.Label>
|
|
34
33
|
<FormField.Input as={TextInput} />
|
|
35
34
|
</FormField>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
<Flex style={{marginBottom: 400, marginLeft: 410}}>
|
|
36
|
+
<SecondaryButton id="return-focus-button-tabindex" tabIndex={-1}>
|
|
37
|
+
Button with TabIndex=-1
|
|
38
|
+
</SecondaryButton>
|
|
39
|
+
<Popup.Target data-testid="target">Open Popup</Popup.Target>
|
|
40
|
+
</Flex>
|
|
39
41
|
<Popup.Popper>
|
|
40
42
|
<Popup.Card>
|
|
41
43
|
<Popup.CloseIcon aria-label="Close" />
|
|
@@ -3,13 +3,14 @@ import Basic from './examples/Basic';
|
|
|
3
3
|
import BasicWithHeading from './examples/BasicWithHeading';
|
|
4
4
|
import FixedColumn from './examples/FixedColumn';
|
|
5
5
|
import RightToLeft from './examples/RightToLeft';
|
|
6
|
+
import BaseHtmlTable from './examples/BaseHtmlTable'
|
|
6
7
|
|
|
7
8
|
# Canvas Kit Table
|
|
8
9
|
|
|
9
10
|
`Table` is a simple styled compound component that renders a
|
|
10
11
|
[table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to
|
|
11
12
|
present information in a two-dimensional table comprised of rows and columns of cells containing
|
|
12
|
-
data.
|
|
13
|
+
data. `Table` is built off of `BaseTable` and is using [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features.
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
@@ -50,6 +51,18 @@ Users may add styles to the `Table.Header` to render a fixed column. The example
|
|
|
50
51
|
|
|
51
52
|
<ExampleCodeBlock code={FixedColumn} />
|
|
52
53
|
|
|
54
|
+
### Base Html Table Example
|
|
55
|
+
|
|
56
|
+
If a user needs a standard HTML [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) with no [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features, then they can use the `BaseTable` component.
|
|
57
|
+
|
|
58
|
+
<ExampleCodeBlock code={BaseHtmlTable} />
|
|
59
|
+
|
|
60
|
+
### Which Component Should I Use?
|
|
61
|
+
|
|
62
|
+
> If a user wants [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features with their Table, then use the [Table](/components/containers/table/) component.
|
|
63
|
+
|
|
64
|
+
> If a user __does not__ want [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features with their Table, then use the [BaseTable](/components/text/heading/) component.
|
|
65
|
+
|
|
53
66
|
### Advanced
|
|
54
67
|
|
|
55
68
|
You can also find several advanced Table examples in our Storybook Examples section.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {BaseTable} from '@workday/canvas-kit-react/table';
|
|
4
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
const tableHeaderStyles = createStyles({
|
|
8
|
+
backgroundColor: system.color.bg.alt.softer,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default () => {
|
|
12
|
+
return (
|
|
13
|
+
<BaseTable>
|
|
14
|
+
<BaseTable.Caption>Coffee Drinks and Sizes</BaseTable.Caption>
|
|
15
|
+
<BaseTable.Head>
|
|
16
|
+
<BaseTable.Row>
|
|
17
|
+
<BaseTable.Header scope="col" cs={tableHeaderStyles}>
|
|
18
|
+
Drink
|
|
19
|
+
</BaseTable.Header>
|
|
20
|
+
<BaseTable.Header scope="col" cs={tableHeaderStyles}>
|
|
21
|
+
Size
|
|
22
|
+
</BaseTable.Header>
|
|
23
|
+
</BaseTable.Row>
|
|
24
|
+
</BaseTable.Head>
|
|
25
|
+
<BaseTable.Body>
|
|
26
|
+
<BaseTable.Row>
|
|
27
|
+
<BaseTable.Cell>Espresso</BaseTable.Cell>
|
|
28
|
+
<BaseTable.Cell>1 oz</BaseTable.Cell>
|
|
29
|
+
</BaseTable.Row>
|
|
30
|
+
<BaseTable.Row>
|
|
31
|
+
<BaseTable.Cell>Macchiato</BaseTable.Cell>
|
|
32
|
+
<BaseTable.Cell>2 oz Espresso</BaseTable.Cell>
|
|
33
|
+
</BaseTable.Row>
|
|
34
|
+
<BaseTable.Row>
|
|
35
|
+
<BaseTable.Cell>Cortado</BaseTable.Cell>
|
|
36
|
+
<BaseTable.Cell>2 oz Espresso, 1 oz Foamed Milk</BaseTable.Cell>
|
|
37
|
+
</BaseTable.Row>
|
|
38
|
+
<BaseTable.Row></BaseTable.Row>
|
|
39
|
+
<BaseTable.Row>
|
|
40
|
+
<BaseTable.Cell>Cappuccino</BaseTable.Cell>
|
|
41
|
+
<BaseTable.Cell>2 oz Espresso, 2 oz Foamed Milk, 2 oz Steamed Milk</BaseTable.Cell>
|
|
42
|
+
</BaseTable.Row>
|
|
43
|
+
</BaseTable.Body>
|
|
44
|
+
</BaseTable>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import {isCursor} from '@workday/canvas-kit-react/collection';
|
|
3
4
|
import {Tabs, useTabsModel} from '@workday/canvas-kit-react/tabs';
|
|
4
5
|
|
|
5
6
|
type Tab = {
|
|
@@ -32,14 +33,14 @@ export default () => {
|
|
|
32
33
|
* @param id The id of the item that will be removed
|
|
33
34
|
*/
|
|
34
35
|
const removeItem = <T extends unknown>(id: string, model: ReturnType<typeof useTabsModel>) => {
|
|
35
|
-
const index = model.state.items.findIndex(item =>
|
|
36
|
+
const index = model.state.items.findIndex(item => isCursor(model.state, item.id));
|
|
36
37
|
const nextIndex = index === model.state.items.length - 1 ? index - 1 : index + 1;
|
|
37
38
|
const nextId = model.state.items[nextIndex].id;
|
|
38
39
|
if (model.state.selectedIds[0] === id) {
|
|
39
40
|
// We're removing the currently selected item. Select next item
|
|
40
41
|
model.events.select({id: nextId});
|
|
41
42
|
}
|
|
42
|
-
if (model.state
|
|
43
|
+
if (isCursor(model.state, id)) {
|
|
43
44
|
// We're removing the currently focused item. Focus next item
|
|
44
45
|
model.events.goTo({id: nextId});
|
|
45
46
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ExampleCodeBlock} from '@workday/canvas-kit-docs';
|
|
2
|
-
import {InformationHighlight} from '@workday/canvas-kit-preview-react/
|
|
2
|
+
import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';import {BorderRadius, Space, Depth, Colors, Type} from './examples/Tokens';
|
|
3
3
|
import Overview from './examples/Overview';
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
|
|
1
|
+
import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
|
|
2
|
+
import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
|
|
3
|
+
import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';import Default from './examples/Default';
|
|
2
4
|
import CustomContent from './examples/CustomContent';
|
|
3
5
|
import DelayedTooltip from './examples/DelayedTooltip';
|
|
6
|
+
import DescriptionType from './examples/DescriptionType';
|
|
4
7
|
import DescribeType from './examples/DescribeType';
|
|
5
8
|
import Muted from './examples/Muted';
|
|
6
9
|
import Placements from './examples/Placements';
|
|
@@ -62,6 +65,14 @@ and focus events.
|
|
|
62
65
|
|
|
63
66
|
### Describing an Element
|
|
64
67
|
|
|
68
|
+
<InformationHighlight variant={'caution'} className='sb-unstyled'>
|
|
69
|
+
<InformationHighlight.Icon />
|
|
70
|
+
<InformationHighlight.Heading> Caution: Describe type has been deprecated </InformationHighlight.Heading>
|
|
71
|
+
<InformationHighlight.Body>
|
|
72
|
+
Assistive technology may ignore <StatusIndicator variant='gray'><StatusIndicator.Label cs={{textTransform: 'lowercase'}}>type="describe"</StatusIndicator.Label></StatusIndicator> techniques based on verbosity settings. Please use <StatusIndicator cs={{textTransform: 'lowercase'}} variant='gray'><StatusIndicator.Label cs={{textTransform: 'lowercase'}}>type="description"</StatusIndicator.Label></StatusIndicator> on Tooltips.
|
|
73
|
+
</InformationHighlight.Body>
|
|
74
|
+
</InformationHighlight>
|
|
75
|
+
|
|
65
76
|
The default mode for a tooltip is to label content via `aria-label`. If a tooltip is meant to
|
|
66
77
|
provide ancillary information, the `type` can be set to `describe`. This will add `aria-describedby`
|
|
67
78
|
to the target element. This will allow screen reader users to hear the name of the control that is
|
|
@@ -69,6 +80,25 @@ being focused and the ancillary tooltip information.
|
|
|
69
80
|
|
|
70
81
|
<ExampleCodeBlock code={DescribeType} />
|
|
71
82
|
|
|
83
|
+
### Description of an Element
|
|
84
|
+
|
|
85
|
+
The default mode for a tooltip is to assign a name to the target element with an `aria-label`
|
|
86
|
+
string. If a tooltip is meant to provide ancillary information, the `type` can be set to `description`.
|
|
87
|
+
This will add `aria-description` strings to the target element instead. This variant is useful on
|
|
88
|
+
text buttons and other components that already have a label or name. Use this type instead of `describe` to ensure proper aria attributes are added to the dom regardless if the tooltip is visible.
|
|
89
|
+
|
|
90
|
+
> **Note:** If you use `description` type and want to pass `jsx`, it **must* be inline and **not** a component to ensure the inner text is properly read by voiceover.
|
|
91
|
+
>
|
|
92
|
+
> ```jsx
|
|
93
|
+
> // The text will be understood as: You must accept terms and conditions
|
|
94
|
+
> <Tooltip type="description" title={<span>You<i>must</i> accept terms and conditions</span>}/>
|
|
95
|
+
>
|
|
96
|
+
> // This will render a string including the html and will not be properly understood by voice over.
|
|
97
|
+
> const MyComponent = () => <span>You<i>must</i> accept terms and conditions</span>
|
|
98
|
+
> <Tool
|
|
99
|
+
|
|
100
|
+
<ExampleCodeBlock code={DescriptionType} />
|
|
101
|
+
|
|
72
102
|
### Muted Tooltips
|
|
73
103
|
|
|
74
104
|
If a tooltip does not need to be visible to screen reader users, or you handle accessibility of the
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {DeleteButton, SecondaryButton, TertiaryButton} from '@workday/canvas-kit-react/button';
|
|
2
|
+
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
3
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import {chartConfigIcon} from '@workday/canvas-system-icons-web';
|
|
5
|
+
|
|
6
|
+
export default () => {
|
|
7
|
+
return (
|
|
8
|
+
<Flex gap="s">
|
|
9
|
+
<Tooltip type="description" title="Search using additional criteria">
|
|
10
|
+
<TertiaryButton icon={chartConfigIcon}>Advanced Search</TertiaryButton>
|
|
11
|
+
</Tooltip>
|
|
12
|
+
<Tooltip type="description" title="Create saved search">
|
|
13
|
+
<SecondaryButton>Save</SecondaryButton>
|
|
14
|
+
</Tooltip>
|
|
15
|
+
<Tooltip type="description" title="The service will restart after this action">
|
|
16
|
+
<DeleteButton>Delete</DeleteButton>
|
|
17
|
+
</Tooltip>
|
|
18
|
+
</Flex>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -2,6 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
3
3
|
import {Card} from '@workday/canvas-kit-react/card';
|
|
4
4
|
import {Placement} from '@workday/canvas-kit-react/popup';
|
|
5
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
6
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
|
|
8
|
+
const placementCardStyles = createStyles({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
width: 100,
|
|
11
|
+
height: 100,
|
|
12
|
+
justifyContent: 'space-around',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
padding: system.space.x1,
|
|
15
|
+
});
|
|
5
16
|
|
|
6
17
|
export default () => {
|
|
7
18
|
const placementStyles = {
|
|
@@ -12,15 +23,7 @@ export default () => {
|
|
|
12
23
|
const createPlacement = (placement: string, index) => {
|
|
13
24
|
return (
|
|
14
25
|
<Tooltip title="Add" placement={placement as Placement} key={index}>
|
|
15
|
-
<Card
|
|
16
|
-
style={{
|
|
17
|
-
display: 'flex',
|
|
18
|
-
width: 80,
|
|
19
|
-
height: 80,
|
|
20
|
-
justifyContent: 'space-around',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
}}
|
|
23
|
-
>
|
|
26
|
+
<Card cs={placementCardStyles}>
|
|
24
27
|
<Card.Body>{placement}</Card.Body>
|
|
25
28
|
</Card>
|
|
26
29
|
</Tooltip>
|
|
@@ -32,8 +35,8 @@ export default () => {
|
|
|
32
35
|
style={{
|
|
33
36
|
padding: 100, // give enough room for the tooltips to fit around their targets
|
|
34
37
|
display: 'grid',
|
|
35
|
-
gridTemplateColumns: '
|
|
36
|
-
gridTemplateRows: '
|
|
38
|
+
gridTemplateColumns: '100px 320px 100px',
|
|
39
|
+
gridTemplateRows: '100px 320px 100px',
|
|
37
40
|
}}
|
|
38
41
|
>
|
|
39
42
|
<div />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
|
|
4
3
|
const baseStyles = {
|
|
@@ -12,7 +11,7 @@ const baseStyles = {
|
|
|
12
11
|
|
|
13
12
|
export default () => {
|
|
14
13
|
return (
|
|
15
|
-
|
|
14
|
+
<div>
|
|
16
15
|
<Box backgroundColor="cinnamon300" {...baseStyles}>
|
|
17
16
|
Cinnamon 300
|
|
18
17
|
</Box>
|
|
@@ -22,6 +21,6 @@ export default () => {
|
|
|
22
21
|
<Box backgroundColor="blueberry300" {...baseStyles}>
|
|
23
22
|
Blueberry 300
|
|
24
23
|
</Box>
|
|
25
|
-
|
|
24
|
+
</div>
|
|
26
25
|
);
|
|
27
26
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
|
|
4
3
|
const baseStyles = {
|
|
@@ -11,7 +10,7 @@ const baseStyles = {
|
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
export default () => (
|
|
14
|
-
|
|
13
|
+
<div>
|
|
15
14
|
<Box borderRadius="m" border="solid 4px" borderColor="cinnamon300" {...baseStyles}>
|
|
16
15
|
Cinnamon 300
|
|
17
16
|
</Box>
|
|
@@ -21,5 +20,5 @@ export default () => (
|
|
|
21
20
|
<Box borderRadius="m" border="solid 4px" borderColor="blueberry300" {...baseStyles}>
|
|
22
21
|
Blueberry 300
|
|
23
22
|
</Box>
|
|
24
|
-
|
|
23
|
+
</div>
|
|
25
24
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
|
|
4
3
|
const baseStyles = {
|
|
@@ -10,7 +9,7 @@ const baseStyles = {
|
|
|
10
9
|
};
|
|
11
10
|
|
|
12
11
|
export default () => (
|
|
13
|
-
|
|
12
|
+
<div>
|
|
14
13
|
<Box backgroundColor="cinnamon300" color="blackPepper500" {...baseStyles}>
|
|
15
14
|
Cinnamon 300
|
|
16
15
|
</Box>
|
|
@@ -20,5 +19,5 @@ export default () => (
|
|
|
20
19
|
<Box backgroundColor="blueberry300" color="blackPepper500" {...baseStyles}>
|
|
21
20
|
Blueberry 300
|
|
22
21
|
</Box>
|
|
23
|
-
|
|
22
|
+
</div>
|
|
24
23
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
2
|
|
|
4
3
|
const baseStyles = {
|
|
@@ -11,7 +10,7 @@ const baseStyles = {
|
|
|
11
10
|
};
|
|
12
11
|
|
|
13
12
|
export default () => (
|
|
14
|
-
|
|
13
|
+
<div>
|
|
15
14
|
<Box backgroundColor="cinnamon300" depth={1} {...baseStyles}>
|
|
16
15
|
Depth 1
|
|
17
16
|
</Box>
|
|
@@ -21,5 +20,5 @@ export default () => (
|
|
|
21
20
|
<Box backgroundColor="blueberry300" depth={3} {...baseStyles}>
|
|
22
21
|
Depth 3
|
|
23
22
|
</Box>
|
|
24
|
-
|
|
23
|
+
</div>
|
|
25
24
|
);
|