@workday/canvas-kit-docs 13.0.0-alpha.996-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 +270163 -169419
- 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 +11 -0
- 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 +70 -0
- 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
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import {jsx, keyframes} from '@emotion/react';
|
|
4
1
|
import React from 'react';
|
|
5
2
|
|
|
6
3
|
import {CSSProperties, space} from '@workday/canvas-kit-react/tokens';
|
|
@@ -8,47 +5,66 @@ import {useTheme} from '@workday/canvas-kit-react/common';
|
|
|
8
5
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
9
6
|
import {loopIcon} from '@workday/canvas-system-icons-web';
|
|
10
7
|
import {Banner} from '@workday/canvas-kit-react/banner';
|
|
8
|
+
import {
|
|
9
|
+
createStencil,
|
|
10
|
+
createStyles,
|
|
11
|
+
createVars,
|
|
12
|
+
keyframes,
|
|
13
|
+
handleCsProp,
|
|
14
|
+
cssVar,
|
|
15
|
+
} from '@workday/canvas-kit-styling';
|
|
16
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
11
17
|
|
|
12
|
-
const containerStyles
|
|
18
|
+
const containerStyles = createStyles({
|
|
13
19
|
position: 'absolute',
|
|
14
20
|
right: 0,
|
|
15
21
|
overflow: 'hidden',
|
|
16
|
-
};
|
|
22
|
+
});
|
|
23
|
+
const stickyAnimationVars = createVars('width', 'rerun');
|
|
24
|
+
const stickAnimationKeyframes = keyframes({
|
|
25
|
+
'0%': {
|
|
26
|
+
transform: `translateX(${cssVar(stickyAnimationVars.width)})`,
|
|
27
|
+
},
|
|
28
|
+
'100%': {
|
|
29
|
+
transform: `translateX(0 * ${cssVar(stickyAnimationVars.rerun)})`,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const stickyAnimationStencil = createStencil({
|
|
34
|
+
base: {
|
|
35
|
+
marginY: system.space.x1,
|
|
36
|
+
marginInlineStart: system.space.x1,
|
|
37
|
+
marginInlineEnd: 0,
|
|
38
|
+
animationName: stickAnimationKeyframes,
|
|
39
|
+
animationDuration: '.3s',
|
|
40
|
+
animationTimingFunction: 'ease-out',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
17
43
|
|
|
18
44
|
export default () => {
|
|
19
45
|
const theme = useTheme();
|
|
20
46
|
const bannerRef = React.useRef<HTMLButtonElement>(null);
|
|
21
47
|
const containerRef = React.useRef<HTMLDivElement>(null);
|
|
22
48
|
const [styles, setStyles] = React.useState<CSSProperties>();
|
|
49
|
+
const [bannerWidth, setBannerWidth] = React.useState(0);
|
|
23
50
|
|
|
24
51
|
const [rerun, setRerun] = React.useState(1); // Only needed for demo purposes
|
|
25
52
|
|
|
26
53
|
React.useLayoutEffect(() => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
width *= -1;
|
|
30
|
-
}
|
|
31
|
-
const slideInKeyframes = keyframes({
|
|
32
|
-
'0%': {
|
|
33
|
-
transform: `translateX(${width}px)`,
|
|
34
|
-
},
|
|
35
|
-
'100%': {
|
|
36
|
-
transform: `translateX(0 * ${rerun})`,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
setStyles({
|
|
41
|
-
marginY: space.xxxs,
|
|
42
|
-
marginInlineStart: space.xxxs,
|
|
43
|
-
maringInlineEnd: 0,
|
|
44
|
-
animation: `${slideInKeyframes} .3s ease-out forwards`,
|
|
45
|
-
});
|
|
54
|
+
const width = bannerRef.current.offsetWidth;
|
|
55
|
+
setBannerWidth(theme.canvas.direction === 'rtl' ? width * -1 : width);
|
|
46
56
|
}, [theme.canvas.direction, rerun]);
|
|
47
57
|
|
|
48
58
|
return (
|
|
49
59
|
<Box height={64}>
|
|
50
|
-
<div
|
|
51
|
-
<div
|
|
60
|
+
<div className={containerStyles} ref={containerRef}>
|
|
61
|
+
<div
|
|
62
|
+
key={rerun}
|
|
63
|
+
{...handleCsProp({}, [
|
|
64
|
+
stickyAnimationStencil(),
|
|
65
|
+
stickyAnimationVars({width: `${bannerWidth}px`, rerun: `${rerun}`}),
|
|
66
|
+
])}
|
|
67
|
+
>
|
|
52
68
|
<Banner
|
|
53
69
|
onClick={() => setRerun(r => r + 1)}
|
|
54
70
|
hasError={true}
|
|
@@ -14,6 +14,7 @@ import TertiaryInverse from './examples/TertiaryInverse';
|
|
|
14
14
|
import Delete from './examples/Delete';
|
|
15
15
|
import Grow from './examples/Grow';
|
|
16
16
|
import CustomStyles from './examples/CustomStyles';
|
|
17
|
+
import ThemeOverrides from './examples/ThemeOverrides';
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
# Canvas Kit Button
|
|
@@ -91,6 +92,16 @@ or view the example below.
|
|
|
91
92
|
|
|
92
93
|
<ExampleCodeBlock code={CustomStyles} />
|
|
93
94
|
|
|
95
|
+
### Theme Overrides
|
|
96
|
+
|
|
97
|
+
The most common way to theme our buttons is to pass a `theme` object at the root level of the application via the `CanvasProvider`. In the example below, our buttons use our `brand.action.**` tokens with the fallback being `brand.primary.**`.
|
|
98
|
+
|
|
99
|
+
> **Caution:** Setting `--cnvs-brand-action**` tokens at the `:root` CSS will override all `PrimaryButton` theme colors set at the `CanvasProvider` level.
|
|
100
|
+
|
|
101
|
+
> **Note:** You should **not** individually theme components wrapping them with the `CanvasProvider`, but rather theme at the root level of the application.
|
|
102
|
+
|
|
103
|
+
<ExampleCodeBlock code={ThemeOverrides} />
|
|
104
|
+
|
|
94
105
|
### Accessible Use of the `as` Prop
|
|
95
106
|
|
|
96
107
|
Like many of our components, Buttons accept an `as` prop, which lets you change the underlying
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import {buttonStencil, PrimaryButton, PrimaryButtonProps} from '@workday/canvas-kit-react/button';
|
|
4
2
|
import {Grid} from '@workday/canvas-kit-react/layout';
|
|
5
3
|
import {plusIcon} from '@workday/canvas-system-icons-web';
|
|
6
4
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
7
5
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
8
|
-
import {createStencil, createStyles,
|
|
6
|
+
import {createStencil, createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
9
7
|
import {system} from '@workday/canvas-tokens-web';
|
|
10
8
|
|
|
11
9
|
const customContainer = createStyles({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import {ExternalHyperlink} from '@workday/canvas-kit-react/button';
|
|
4
2
|
|
|
5
3
|
export default () => (
|
|
6
|
-
<ExternalHyperlink href="https://workday.com"
|
|
4
|
+
<ExternalHyperlink href="https://workday.com" iconLabel="Opens link in new window">
|
|
5
|
+
External Hyperlink
|
|
6
|
+
</ExternalHyperlink>
|
|
7
7
|
);
|
|
@@ -12,7 +12,11 @@ const parentContainerStyles = createStyles({
|
|
|
12
12
|
|
|
13
13
|
export default () => (
|
|
14
14
|
<Box cs={parentContainerStyles}>
|
|
15
|
-
<ExternalHyperlink
|
|
15
|
+
<ExternalHyperlink
|
|
16
|
+
href="https://workday.com"
|
|
17
|
+
variant="inverse"
|
|
18
|
+
iconLabel="Opens link in new window"
|
|
19
|
+
>
|
|
16
20
|
Hyperlink
|
|
17
21
|
</ExternalHyperlink>
|
|
18
22
|
</Box>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
4
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {
|
|
6
|
+
plusIcon,
|
|
7
|
+
relatedActionsVerticalIcon,
|
|
8
|
+
caretDownIcon,
|
|
9
|
+
} from '@workday/canvas-system-icons-web';
|
|
10
|
+
import {createStyles} from '@workday/canvas-kit-styling';
|
|
11
|
+
import {brand, system} from '@workday/canvas-tokens-web';
|
|
12
|
+
import {CanvasProvider} from '@workday/canvas-kit-react/common';
|
|
13
|
+
import {Heading} from '@workday/canvas-kit-react/text';
|
|
14
|
+
|
|
15
|
+
const parentContainerStyles = createStyles({
|
|
16
|
+
gap: system.space.x4,
|
|
17
|
+
padding: system.space.x4,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const customActionTheme = createStyles({
|
|
21
|
+
[brand.action.base]: 'teal',
|
|
22
|
+
[brand.action.accent]: 'white',
|
|
23
|
+
[brand.action.dark]: 'hsla(180, 100%, 20%)',
|
|
24
|
+
[brand.action.darkest]: 'hsla(180, 100%, 16%)',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default () => (
|
|
28
|
+
<div>
|
|
29
|
+
<Heading size="medium" as="h3">
|
|
30
|
+
Override Primary Color Via Canvas Provider
|
|
31
|
+
</Heading>
|
|
32
|
+
<CanvasProvider
|
|
33
|
+
theme={{
|
|
34
|
+
canvas: {
|
|
35
|
+
palette: {
|
|
36
|
+
primary: {
|
|
37
|
+
main: 'navy',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<Flex cs={parentContainerStyles}>
|
|
44
|
+
<PrimaryButton>Primary</PrimaryButton>
|
|
45
|
+
<PrimaryButton icon={plusIcon} iconPosition="start">
|
|
46
|
+
Primary
|
|
47
|
+
</PrimaryButton>
|
|
48
|
+
<PrimaryButton icon={caretDownIcon} iconPosition="end">
|
|
49
|
+
Primary
|
|
50
|
+
</PrimaryButton>
|
|
51
|
+
<PrimaryButton aria-label="Related Actions" icon={relatedActionsVerticalIcon} />
|
|
52
|
+
</Flex>
|
|
53
|
+
</CanvasProvider>
|
|
54
|
+
<Heading size="medium" as="h3">
|
|
55
|
+
Override Action Color Via CSS Action Token
|
|
56
|
+
</Heading>
|
|
57
|
+
<div className={customActionTheme}>
|
|
58
|
+
<Flex cs={parentContainerStyles}>
|
|
59
|
+
<PrimaryButton>Primary</PrimaryButton>
|
|
60
|
+
<PrimaryButton icon={plusIcon} iconPosition="start">
|
|
61
|
+
Primary
|
|
62
|
+
</PrimaryButton>
|
|
63
|
+
<PrimaryButton icon={caretDownIcon} iconPosition="end">
|
|
64
|
+
Primary
|
|
65
|
+
</PrimaryButton>
|
|
66
|
+
<PrimaryButton aria-label="Related Actions" icon={relatedActionsVerticalIcon} />
|
|
67
|
+
</Flex>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
useListModel,
|
|
9
9
|
ListItemProps,
|
|
10
10
|
ListBox,
|
|
11
|
+
getCursor,
|
|
11
12
|
} from '@workday/canvas-kit-react/collection';
|
|
12
13
|
import {composeHooks, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
13
14
|
|
|
@@ -47,7 +48,7 @@ export default () => {
|
|
|
47
48
|
<Item data-id="third">Third</Item>
|
|
48
49
|
</ListBox>
|
|
49
50
|
|
|
50
|
-
<p>Cursor ID: {model.state
|
|
51
|
+
<p>Cursor ID: {getCursor(model.state)}</p>
|
|
51
52
|
<p>
|
|
52
53
|
Selected IDs: {(model.state.selectedIds !== 'all' ? model.state.selectedIds : []).join(',')}
|
|
53
54
|
</p>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
useListModel,
|
|
8
8
|
ListItemProps,
|
|
9
9
|
ListBox,
|
|
10
|
+
getCursor,
|
|
10
11
|
} from '@workday/canvas-kit-react/collection';
|
|
11
12
|
import {
|
|
12
13
|
composeHooks,
|
|
@@ -51,7 +52,7 @@ export default () => {
|
|
|
51
52
|
<SelectableItem data-id="third">Third</SelectableItem>
|
|
52
53
|
</ListBox>
|
|
53
54
|
|
|
54
|
-
<p>Cursor ID: {model.state
|
|
55
|
+
<p>Cursor ID: {getCursor(model.state)}</p>
|
|
55
56
|
<p>Selected ID: {model.state.selectedIds[0]}</p>
|
|
56
57
|
</>
|
|
57
58
|
);
|
|
@@ -16,7 +16,7 @@ import HoistedModel from './examples/HoistedModel';
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
yarn add @workday/canvas-kit-
|
|
19
|
+
yarn add @workday/canvas-kit-react
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
@@ -79,4 +79,4 @@ the example below, we're hoisting the models to expand and collapse all three co
|
|
|
79
79
|
|
|
80
80
|
## Component API
|
|
81
81
|
|
|
82
|
-
<SymbolDoc name="Expandable" fileName="/
|
|
82
|
+
<SymbolDoc name="Expandable" fileName="/react/" />
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
|
|
1
|
+
import {Expandable} from '@workday/canvas-kit-react/expandable';
|
|
4
2
|
// @ts-ignore: Cannot find module error
|
|
5
3
|
import testAvatar from './test-avatar.png';
|
|
6
4
|
|
|
7
5
|
export default () => (
|
|
8
|
-
|
|
6
|
+
<div>
|
|
9
7
|
<Expandable>
|
|
10
8
|
<Expandable.Target headingLevel="h4">
|
|
11
9
|
<Expandable.Icon iconPosition="start" />
|
|
12
|
-
<Expandable.Avatar url={testAvatar} />
|
|
10
|
+
<Expandable.Avatar altText="Avatar" url={testAvatar} />
|
|
13
11
|
<Expandable.Title>Title</Expandable.Title>
|
|
14
12
|
</Expandable.Target>
|
|
15
13
|
|
|
@@ -17,12 +15,12 @@ export default () => (
|
|
|
17
15
|
</Expandable>
|
|
18
16
|
<Expandable>
|
|
19
17
|
<Expandable.Target headingLevel="h4">
|
|
20
|
-
<Expandable.Avatar url={testAvatar} />
|
|
18
|
+
<Expandable.Avatar altText="Avatar" url={testAvatar} />
|
|
21
19
|
<Expandable.Title>Title</Expandable.Title>
|
|
22
20
|
<Expandable.Icon iconPosition="end" />
|
|
23
21
|
</Expandable.Target>
|
|
24
22
|
|
|
25
23
|
<Expandable.Content>Content</Expandable.Content>
|
|
26
24
|
</Expandable>
|
|
27
|
-
|
|
25
|
+
</div>
|
|
28
26
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {Expandable, useExpandableModel} from '@workday/canvas-kit-
|
|
3
|
+
import {Expandable, useExpandableModel} from '@workday/canvas-kit-react/expandable';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
import {SecondaryButton} from '@workday/canvas-kit-react/button';
|
|
6
6
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
|
|
1
|
+
import {Expandable} from '@workday/canvas-kit-react/expandable';
|
|
4
2
|
// @ts-ignore: Cannot find module error
|
|
5
3
|
import testAvatar from './test-avatar.png';
|
|
6
4
|
|
|
@@ -8,7 +6,7 @@ export default () => (
|
|
|
8
6
|
<Expandable>
|
|
9
7
|
<Expandable.Target headingLevel="h4">
|
|
10
8
|
<Expandable.Icon iconPosition="start" />
|
|
11
|
-
<Expandable.Avatar url={testAvatar} />
|
|
9
|
+
<Expandable.Avatar altText="Avatar" url={testAvatar} />
|
|
12
10
|
<Expandable.Title>
|
|
13
11
|
Our house special supreme pizza includes pepperoni, sausage, bell peppers, mushrooms,
|
|
14
12
|
onions, and oregano.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
|
|
1
|
+
import {Expandable} from '@workday/canvas-kit-react/expandable';
|
|
4
2
|
import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
|
|
5
3
|
|
|
6
4
|
export default () => {
|
|
@@ -3,6 +3,9 @@ import Basic from './examples/Basic';
|
|
|
3
3
|
import ContextMenu from './examples/ContextMenu';
|
|
4
4
|
import Icons from './examples/Icons';
|
|
5
5
|
import SelectableMenu from './examples/SelectableMenu';
|
|
6
|
+
import Grouping from './examples/Grouping';
|
|
7
|
+
import Nested from './examples/Nested';
|
|
8
|
+
import NestedDynamic from './examples/Nested';
|
|
6
9
|
|
|
7
10
|
# Canvas Kit Menu
|
|
8
11
|
|
|
@@ -69,6 +72,37 @@ behaviors depend on many other things. To see a full example of all these behavi
|
|
|
69
72
|
|
|
70
73
|
<ExampleCodeBlock code={SelectableMenu} />
|
|
71
74
|
|
|
75
|
+
### Grouping
|
|
76
|
+
|
|
77
|
+
Grouping adds hierarchy and categorization to menu items. Group headers do not represent menu items
|
|
78
|
+
and are not selectable with the keyboard or mouse.
|
|
79
|
+
|
|
80
|
+
> **Note**: Grouping is not supported in virtual rendering. Menus by default have `shouldVirtualize`
|
|
81
|
+
> set to `false`. Setting to `true` results in unspecified behavior. We use `react-virtual` which
|
|
82
|
+
> doesn't support nested virtualization.
|
|
83
|
+
|
|
84
|
+
<ExampleCodeBlock code={Grouping} />
|
|
85
|
+
|
|
86
|
+
### Nested
|
|
87
|
+
|
|
88
|
+
Menus support nesting. If you only have a few items and not very many nesting levels, the menu can
|
|
89
|
+
be defined statically using JSX. A submenu is defined using the `<Menu.Submenu>` component. The
|
|
90
|
+
`Submenu` is implemented as a special `Menu` subcomponent. The API of the submenu is the same as the
|
|
91
|
+
`Menu` except the submenu's target is also a menu item. The component is named `TargetItem` to
|
|
92
|
+
indicate this dual role.
|
|
93
|
+
|
|
94
|
+
<ExampleCodeBlock code={Nested} />
|
|
95
|
+
|
|
96
|
+
### Nested Dynamic Items
|
|
97
|
+
|
|
98
|
+
Menu nesting is simpler with the dynamic API. In this example, a `renderItem` function is defined to
|
|
99
|
+
allow recursive nesting of items using a data structure you define. A submenu will inherit the
|
|
100
|
+
`getId` and `getTextValue` functions of the parent menu. While you can pass a specialize `getId` or
|
|
101
|
+
`getTextValue` function to each submenu, it may be simpler to use the same one for the menu and
|
|
102
|
+
submenus.
|
|
103
|
+
|
|
104
|
+
<ExampleCodeBlock code={NestedDynamic} />
|
|
105
|
+
|
|
72
106
|
## Component API
|
|
73
107
|
|
|
74
108
|
<SymbolDoc name="Menu" fileName="/react/" />
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
|
|
6
|
+
export default () => {
|
|
7
|
+
const [selected, setSelected] = React.useState('');
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Menu onSelect={data => setSelected(data.id)}>
|
|
11
|
+
<Menu.Target>Open Menu</Menu.Target>
|
|
12
|
+
<Menu.Popper>
|
|
13
|
+
<Menu.Card>
|
|
14
|
+
<Menu.List>
|
|
15
|
+
<Menu.Group title="First Group">
|
|
16
|
+
<Menu.Item>First Item</Menu.Item>
|
|
17
|
+
<Menu.Item>Second Item</Menu.Item>
|
|
18
|
+
</Menu.Group>
|
|
19
|
+
<Menu.Group title="Second Group">
|
|
20
|
+
<Menu.Item>Third Item (with a really, really, really long label)</Menu.Item>
|
|
21
|
+
<Menu.Item aria-disabled>Fourth Item</Menu.Item>
|
|
22
|
+
</Menu.Group>
|
|
23
|
+
</Menu.List>
|
|
24
|
+
</Menu.Card>
|
|
25
|
+
</Menu.Popper>
|
|
26
|
+
<BodyText size="small" marginTop="s">
|
|
27
|
+
Selected: <span data-testid="output">{selected}</span>
|
|
28
|
+
</BodyText>
|
|
29
|
+
</Menu>
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -31,7 +31,7 @@ export default () => {
|
|
|
31
31
|
</Menu.Item>
|
|
32
32
|
<Menu.Item data-text="User">
|
|
33
33
|
<Menu.Item.Icon icon={userIcon} />
|
|
34
|
-
<Menu.Item.Text
|
|
34
|
+
<Menu.Item.Text>User</Menu.Item.Text>
|
|
35
35
|
</Menu.Item>
|
|
36
36
|
<Menu.Divider />
|
|
37
37
|
<Menu.Item data-text="Fifth Item (with divider)">
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {chevronRightSmallIcon} from '@workday/canvas-system-icons-web';
|
|
3
|
+
|
|
4
|
+
import {Menu} from '@workday/canvas-kit-react/menu';
|
|
5
|
+
import {BodyText} from '@workday/canvas-kit-react/text';
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
const [selected, setSelected] = React.useState('');
|
|
9
|
+
return (
|
|
10
|
+
<Menu
|
|
11
|
+
id="first-menu"
|
|
12
|
+
onSelect={data => {
|
|
13
|
+
setSelected(data.id);
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
<Menu.Target>Open Menu</Menu.Target>
|
|
17
|
+
<Menu.Popper>
|
|
18
|
+
<Menu.Card>
|
|
19
|
+
<Menu.List>
|
|
20
|
+
<Menu.Item data-id="first-item">First Item</Menu.Item>
|
|
21
|
+
<Menu.Submenu id="second-menu">
|
|
22
|
+
<Menu.Submenu.TargetItem data-id="second-item">Second Item</Menu.Submenu.TargetItem>
|
|
23
|
+
<Menu.Submenu.Popper>
|
|
24
|
+
<Menu.Submenu.Card>
|
|
25
|
+
<Menu.Submenu.List>
|
|
26
|
+
<Menu.Submenu.Item data-id="first-sub-item">First Sub Item</Menu.Submenu.Item>
|
|
27
|
+
<Menu.Submenu.Item data-id="second-sub-item">First Sub Item</Menu.Submenu.Item>
|
|
28
|
+
<Menu.Submenu.Item data-id="third-sub-item">Third Sub Item</Menu.Submenu.Item>
|
|
29
|
+
<Menu.Submenu.Item data-id="fourth-sub-item">Fourth Sub Item</Menu.Submenu.Item>
|
|
30
|
+
</Menu.Submenu.List>
|
|
31
|
+
</Menu.Submenu.Card>
|
|
32
|
+
</Menu.Submenu.Popper>
|
|
33
|
+
</Menu.Submenu>
|
|
34
|
+
<Menu.Divider />
|
|
35
|
+
<Menu.Item data-id="third-item">
|
|
36
|
+
Third Item (with a really, really, really long label)
|
|
37
|
+
</Menu.Item>
|
|
38
|
+
<Menu.Item aria-disabled data-id="fourth-item">
|
|
39
|
+
Fourth Item
|
|
40
|
+
</Menu.Item>
|
|
41
|
+
</Menu.List>
|
|
42
|
+
</Menu.Card>
|
|
43
|
+
</Menu.Popper>
|
|
44
|
+
<BodyText size="small" marginTop="s">
|
|
45
|
+
Selected: <span data-testid="output">{selected}</span>
|
|
46
|
+
</BodyText>
|
|
47
|
+
</Menu>
|
|
48
|
+
);
|
|
49
|
+
};
|