@workday/canvas-kit-docs 15.0.0-alpha.1303-next.0 → 15.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/README.md +6 -6
- package/dist/es6/docgen/createTraversals.d.ts +0 -3
- package/dist/es6/docgen/createTraversals.d.ts.map +1 -1
- package/dist/es6/docgen/docParser.d.ts +1 -1
- package/dist/es6/docgen/docParser.d.ts.map +1 -1
- package/dist/es6/docgen/docParser.js +14 -4
- package/dist/es6/docgen/plugins/componentParser.d.ts +1 -1
- package/dist/es6/docgen/plugins/componentParser.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/componentParser.js +1 -1
- package/dist/es6/docgen/plugins/customTypes.d.ts +1 -1
- package/dist/es6/docgen/plugins/customTypes.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/enhancedComponentParser.d.ts +1 -1
- package/dist/es6/docgen/plugins/enhancedComponentParser.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/enhancedComponentParser.js +2 -1
- package/dist/es6/docgen/plugins/modelParser.d.ts.map +1 -1
- package/dist/es6/docgen/plugins/modelParser.js +4 -4
- package/dist/es6/docgen/traverse.d.ts.map +1 -1
- package/dist/es6/docgen/traverse.js +1 -1
- package/dist/es6/lib/DescriptionTooltip.d.ts +2 -5
- package/dist/es6/lib/DescriptionTooltip.d.ts.map +1 -1
- package/dist/es6/lib/DescriptionTooltip.js +11 -10
- package/dist/es6/lib/DownloadLLMFile.js +11 -11
- package/dist/es6/lib/ExampleCodeBlock.d.ts.map +1 -1
- package/dist/es6/lib/ExampleCodeBlock.js +37 -28
- package/dist/es6/lib/MDXElements.d.ts +1 -1
- package/dist/es6/lib/MDXElements.d.ts.map +1 -1
- package/dist/es6/lib/MDXElements.js +5 -5
- package/dist/es6/lib/MoreTooltip.d.ts.map +1 -1
- package/dist/es6/lib/MoreTooltip.js +1 -1
- package/dist/es6/lib/Specifications.d.ts +3 -1
- package/dist/es6/lib/Specifications.d.ts.map +1 -1
- package/dist/es6/lib/Specifications.js +20 -10
- package/dist/es6/lib/StorybookStatusIndicator.d.ts +2 -2
- package/dist/es6/lib/StorybookStatusIndicator.d.ts.map +1 -1
- package/dist/es6/lib/StorybookStatusIndicator.js +23 -21
- package/dist/es6/lib/StylePropsTable.d.ts.map +1 -1
- package/dist/es6/lib/StylePropsTable.js +1 -1
- package/dist/es6/lib/SymbolDoc.d.ts +1 -1
- package/dist/es6/lib/SymbolDoc.d.ts.map +1 -1
- package/dist/es6/lib/SymbolDoc.js +1 -1
- package/dist/es6/lib/Table.d.ts.map +1 -1
- package/dist/es6/lib/Table.js +33 -10
- package/dist/es6/lib/Value.d.ts.map +1 -1
- package/dist/es6/lib/Value.js +14 -11
- package/dist/es6/lib/docs.d.ts.map +1 -1
- package/dist/es6/lib/docs.js +204588 -183032
- package/dist/es6/lib/specs.js +6142 -1
- package/dist/es6/lib/stackblitzFiles/App.d.ts.map +1 -1
- package/dist/es6/lib/stackblitzFiles/App.js +5 -11
- package/dist/es6/lib/stackblitzFiles/App.tsx +7 -21
- package/dist/es6/lib/stackblitzFiles/main.d.ts +1 -0
- package/dist/es6/lib/stackblitzFiles/main.d.ts.map +1 -1
- package/dist/es6/lib/stackblitzFiles/main.js +4 -3
- package/dist/es6/lib/stackblitzFiles/main.tsx +6 -4
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.d.ts.map +1 -1
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +8 -7
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +9 -7
- package/dist/es6/lib/stackblitzFiles/vite.config.d.ts +1 -1
- package/dist/es6/lib/stackblitzFiles/vite.config.d.ts.map +1 -1
- package/dist/es6/lib/stackblitzFiles/vite.config.js +1 -1
- package/dist/es6/lib/stackblitzFiles/vite.config.ts +1 -3
- package/dist/es6/lib/widgetUtils.d.ts.map +1 -1
- package/dist/es6/lib/widgetUtils.js +39 -39
- package/dist/es6/lib/widgets/array.js +1 -1
- package/dist/es6/lib/widgets/callExpression.js +1 -1
- package/dist/es6/lib/widgets/canvasColor.js +3 -2
- package/dist/es6/lib/widgets/conditional.js +1 -1
- package/dist/es6/lib/widgets/enhancedComponent.js +2 -1
- package/dist/es6/lib/widgets/external.js +1 -1
- package/dist/es6/lib/widgets/function.js +2 -2
- package/dist/es6/lib/widgets/index.d.ts +1 -1
- package/dist/es6/lib/widgets/index.d.ts.map +1 -1
- package/dist/es6/lib/widgets/index.js +1 -1
- package/dist/es6/lib/widgets/intersection.js +1 -1
- package/dist/es6/lib/widgets/model.js +1 -1
- package/dist/es6/lib/widgets/parenthesis.js +1 -1
- package/dist/es6/lib/widgets/primitives.js +2 -2
- package/dist/es6/lib/widgets/qualifiedName.js +1 -1
- package/dist/es6/lib/widgets/tuple.js +1 -1
- package/dist/es6/lib/widgets/typeParameter.js +1 -1
- package/dist/es6/lib/widgets/union.js +1 -1
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.d.ts +2 -0
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.js +31 -0
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/FilterListWithLiveStatus.js +9 -9
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/HiddenLiveRegion.js +2 -2
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/IconButtonsWithLiveBadges.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/IconButtonsWithLiveBadges.js +4 -4
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/TextInputWithLiveError.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/TextInputWithLiveError.js +3 -3
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/VisibleLiveRegion.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/AriaLiveRegions/VisibleLiveRegion.js +8 -9
- package/dist/es6/mdx/accessibility/examples/GlobalHeader.js +21 -21
- package/dist/es6/mdx/accessibility/examples/PageStructure/BreadcrumbNavRegion.js +2 -2
- package/dist/es6/mdx/accessibility/examples/PageStructure/FullPageDemo.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/PageStructure/FullPageDemo.js +16 -10
- package/dist/es6/mdx/accessibility/examples/PageStructure/LandmarkRegions.d.ts +1 -1
- package/dist/es6/mdx/accessibility/examples/PageStructure/LandmarkRegions.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/PageStructure/LandmarkRegions.js +15 -9
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.d.ts +2 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePopupNoPortal.js +62 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.d.ts +7 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/InlinePortalPopup.js +65 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.d.ts +7 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.d.ts.map +1 -0
- package/dist/es6/mdx/accessibility/examples/Popups/PopupAriaOwns.js +46 -0
- package/dist/es6/mdx/accessibility/examples/SidePanelWithNavigation.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/SidePanelWithNavigation.js +16 -16
- package/dist/es6/mdx/accessibility/examples/SidePanelWithOverlay.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/SidePanelWithOverlay.js +4 -5
- package/dist/es6/mdx/accessibility/examples/Table/WithColumnHeaderFilters.js +8 -8
- package/dist/es6/mdx/accessibility/examples/Table/WithExpandableRows.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/Table/WithExpandableRows.js +6 -6
- package/dist/es6/mdx/accessibility/examples/Table/WithFormFields.d.ts.map +1 -1
- package/dist/es6/mdx/accessibility/examples/Table/WithFormFields.js +10 -10
- package/dist/es6/mdx/accessibility/examples/Table/WithSelectableRows.js +4 -4
- package/dist/es6/mdx/accessibility/examples/Table/WithSortableColumnHeaders.js +7 -7
- package/dist/es6/mdx/installBlock.d.ts.map +1 -1
- package/dist/es6/mdx/installBlock.js +18 -6
- package/dist/es6/mdx/tokens/StorybookInformationHighlight/index.d.ts.map +1 -1
- package/dist/es6/mdx/tokens/StorybookInformationHighlight/index.js +2 -3
- package/dist/es6/mdx/versionsTable.d.ts.map +1 -1
- package/dist/es6/mdx/versionsTable.js +4 -3
- package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
- package/dist/es6/mdx/welcomePage.js +24 -20
- package/dist/es6/utils/parseSpecFile.d.ts +24 -0
- package/dist/es6/utils/parseSpecFile.d.ts.map +1 -0
- package/dist/es6/utils/parseSpecFile.js +82 -0
- package/dist/mdx/10.0-UPGRADE-GUIDE.mdx +3 -3
- package/dist/mdx/13.0-UPGRADE-GUIDE.mdx +24 -18
- package/dist/mdx/14.0-UPGRADE-GUIDE.mdx +61 -14
- package/dist/mdx/14.0-VISUAL-CHANGES.mdx +19 -19
- package/dist/mdx/15.0-UPGRADE-GUIDE.mdx +1097 -0
- package/dist/mdx/15.0-VISUAL-CHANGES.mdx +151 -0
- package/dist/mdx/5.0-UPGRADE-GUIDE.mdx +3 -3
- package/dist/mdx/7.0-UPGRADE-GUIDE.mdx +4 -4
- package/dist/mdx/8.0-UPGRADE-GUIDE.mdx +5 -5
- package/dist/mdx/9.0-UPGRADE-GUIDE.mdx +2 -2
- package/dist/mdx/CODEMODS.mdx +2 -2
- package/dist/mdx/CONTRIBUTING.mdx +4 -4
- package/dist/mdx/CREATING_COMPOUND_COMPONENTS.mdx +1 -1
- package/dist/mdx/DOCUMENTATION_GUIDELINES.mdx +2 -2
- package/dist/mdx/GETTING_STARTED.mdx +1 -2
- package/dist/mdx/accessibility/AriaLiveRegions.mdx +14 -15
- package/dist/mdx/accessibility/InlinePortals.mdx +20 -0
- package/dist/mdx/accessibility/PageStructure.mdx +3 -2
- package/dist/mdx/accessibility/Popups.mdx +71 -0
- package/dist/mdx/accessibility/WindowsHighContrastThemes.mdx +12 -11
- package/dist/mdx/changelog.mdx +1 -2
- package/dist/mdx/labs-react/ai-ingress-button/examples/Inverse.tsx +2 -2
- package/dist/mdx/preview-react/_examples/mdx/examples/TextInputWithReactHookForm.tsx +11 -12
- package/dist/mdx/preview-react/divider/examples/Basic.tsx +6 -7
- package/dist/mdx/preview-react/divider/examples/CustomSpace.tsx +4 -3
- package/dist/mdx/preview-react/loading-sparkles/LoadingSparkles.mdx +2 -2
- package/dist/mdx/preview-react/loading-sparkles/examples/Basic.tsx +3 -2
- package/dist/mdx/preview-react/loading-sparkles/examples/RTL.tsx +3 -7
- package/dist/mdx/preview-react/multi-select/MultiSelect.mdx +3 -4
- package/dist/mdx/preview-react/multi-select/examples/Basic.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Complex.tsx +3 -5
- package/dist/mdx/preview-react/multi-select/examples/Controlled.tsx +2 -3
- package/dist/mdx/preview-react/multi-select/examples/Disabled.tsx +1 -1
- package/dist/mdx/preview-react/multi-select/examples/Error.tsx +5 -5
- package/dist/mdx/preview-react/multi-select/examples/Icons.tsx +8 -9
- package/dist/mdx/preview-react/multi-select/examples/InitialSelectedItems.tsx +6 -8
- package/dist/mdx/preview-react/multi-select/examples/Searching.tsx +6 -8
- package/dist/mdx/preview-react/radio/examples/Basic.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Caution.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Custom.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Disabled.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Error.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Inverse.tsx +5 -4
- package/dist/mdx/preview-react/radio/examples/LabelPosition.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/NoValue.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/RefForwarding.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/Required.tsx +2 -1
- package/dist/mdx/preview-react/radio/examples/StandaloneRadio.tsx +2 -1
- package/dist/mdx/preview-react/side-panel/SidePanel.mdx +20 -8
- package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +5 -7
- package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +10 -15
- package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +5 -5
- package/dist/mdx/preview-react/side-panel/examples/HiddenName.tsx +2 -1
- package/dist/mdx/preview-react/side-panel/examples/OnExpandedChange.tsx +3 -2
- package/dist/mdx/preview-react/side-panel/examples/OnStateTransition.tsx +3 -2
- package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +4 -7
- package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +4 -6
- package/dist/mdx/preview-react/side-panel/examples/useDirection.ts +1 -0
- package/dist/mdx/preview-react/status-indicator/StatusIndicator.mdx +9 -2
- package/dist/mdx/preview-react/status-indicator/examples/Custom.tsx +22 -0
- package/dist/mdx/preview-react/status-indicator/examples/Emphasis.tsx +4 -6
- package/dist/mdx/preview-react/status-indicator/examples/Icon.tsx +4 -6
- package/dist/mdx/preview-react/status-indicator/examples/Overflow.tsx +5 -7
- package/dist/mdx/preview-react/status-indicator/examples/Variants.tsx +15 -17
- package/dist/mdx/preview-react/switch/Switch.mdx +84 -0
- package/dist/mdx/preview-react/switch/examples/Basic.tsx +21 -0
- package/dist/mdx/preview-react/switch/examples/Caution.tsx +22 -0
- package/dist/mdx/preview-react/switch/examples/Disabled.tsx +21 -0
- package/dist/mdx/preview-react/switch/examples/Error.tsx +22 -0
- package/dist/mdx/preview-react/switch/examples/LabelPosition.tsx +21 -0
- package/dist/mdx/preview-react/switch/examples/RTL.tsx +24 -0
- package/dist/mdx/preview-react/switch/examples/RefForwarding.tsx +30 -0
- package/dist/mdx/react/_examples/mdx/ContextualHelp.mdx +36 -0
- package/dist/mdx/react/_examples/mdx/examples/ContextualHelp/ContextualHelpDialogFocusRedirect.tsx +79 -0
- package/dist/mdx/react/_examples/mdx/examples/ContextualHelp/ContextualHelpDialogFocusTrap.tsx +79 -0
- package/dist/mdx/react/_examples/mdx/examples/ContextualHelp/ContextualHelpTooltip.tsx +43 -0
- package/dist/mdx/react/_examples/mdx/examples/CookieBanner.tsx +2 -2
- package/dist/mdx/react/_examples/mdx/examples/Density.tsx +43 -42
- package/dist/mdx/react/_examples/mdx/examples/MediaModal.tsx +4 -3
- package/dist/mdx/react/_examples/mdx/examples/PageHeader.tsx +22 -19
- package/dist/mdx/react/_examples/mdx/examples/SelectWithFormik.tsx +8 -12
- package/dist/mdx/react/_examples/mdx/examples/compoundComponent/CustomCard.tsx +10 -12
- package/dist/mdx/react/_examples/mdx/examples/layout/AreaColumnPositioning.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/layout/CustomColumnPositioning.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/layout/CustomColumnWidth.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/layout/FullWidthWith3Columns.tsx +50 -12
- package/dist/mdx/react/_examples/mdx/examples/layout/FullWidthWith3Columns2Rows.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/layout/Masonry.tsx +3 -2
- package/dist/mdx/react/_examples/mdx/examples/layout/ResponsiveColumns.tsx +2 -2
- package/dist/mdx/react/_examples/mdx/examples/layout/Tiled2and3Columns.tsx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/layout/Tiled4and2Columns.tsx +1 -1
- package/dist/mdx/react/action-bar/ActionBar.mdx +4 -4
- package/dist/mdx/react/action-bar/examples/Icons.tsx +1 -1
- package/dist/mdx/react/action-bar/examples/OverflowActionBar.tsx +5 -3
- package/dist/mdx/react/action-bar/examples/OverflowActionBarCustomButtonCount.tsx +1 -0
- package/dist/mdx/{preview-react → react}/avatar/Avatar.mdx +23 -13
- package/dist/mdx/react/avatar/examples/Basic.tsx +5 -0
- package/dist/mdx/{preview-react → react}/avatar/examples/Custom.tsx +1 -1
- package/dist/mdx/{preview-react → react}/avatar/examples/Decorative.tsx +7 -5
- package/dist/mdx/{preview-react → react}/avatar/examples/Image.tsx +1 -1
- package/dist/mdx/{preview-react → react}/avatar/examples/Size.tsx +2 -2
- package/dist/mdx/{preview-react → react}/avatar/examples/Variant.tsx +2 -2
- package/dist/mdx/react/avatar/examples/nicholas-avatar.jpg +0 -0
- package/dist/mdx/react/badge/CountBadge.mdx +1 -1
- package/dist/mdx/react/badge/examples/Basic.tsx +2 -2
- package/dist/mdx/react/badge/examples/CustomLimit.tsx +8 -8
- package/dist/mdx/react/badge/examples/Emphasis.tsx +4 -4
- package/dist/mdx/react/badge/examples/Inverse.tsx +7 -6
- package/dist/mdx/react/badge/examples/NotificationBadge.tsx +8 -7
- package/dist/mdx/react/banner/Banner.mdx +2 -2
- package/dist/mdx/react/banner/examples/IconBanner.tsx +1 -1
- package/dist/mdx/react/banner/examples/RefForwarding.tsx +1 -1
- package/dist/mdx/react/banner/examples/Sticky.tsx +1 -1
- package/dist/mdx/react/banner/examples/StickyAnimation.tsx +7 -7
- package/dist/mdx/react/banner/examples/StickyRTL.tsx +3 -14
- package/dist/mdx/react/banner/examples/ThemedAlert.tsx +4 -5
- package/dist/mdx/react/banner/examples/ThemedError.tsx +5 -6
- package/dist/mdx/react/breadcrumbs/Breadcrumbs.mdx +6 -5
- package/dist/mdx/react/breadcrumbs/examples/CurrentItemTruncation.tsx +1 -0
- package/dist/mdx/react/breadcrumbs/examples/LinkTruncation.tsx +1 -0
- package/dist/mdx/react/breadcrumbs/examples/Overflow.tsx +6 -3
- package/dist/mdx/react/breadcrumbs/examples/RTL.tsx +6 -10
- package/dist/mdx/react/button/button/Button.mdx +11 -12
- package/dist/mdx/react/button/button/Hyperlink.mdx +11 -5
- package/dist/mdx/react/button/button/examples/CustomStyles.tsx +43 -43
- package/dist/mdx/react/button/button/examples/Delete.tsx +4 -4
- package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +3 -3
- package/dist/mdx/react/button/button/examples/ExternalHyperlinkRTL.tsx +10 -0
- package/dist/mdx/react/button/button/examples/HyperlinkInverse.tsx +3 -3
- package/dist/mdx/react/button/button/examples/Primary.tsx +5 -5
- package/dist/mdx/react/button/button/examples/PrimaryInverse.tsx +6 -6
- package/dist/mdx/react/button/button/examples/Secondary.tsx +5 -5
- package/dist/mdx/react/button/button/examples/SecondaryInverse.tsx +6 -6
- package/dist/mdx/react/button/button/examples/StandaloneHyperlink.tsx +2 -2
- package/dist/mdx/react/button/button/examples/Tertiary.tsx +5 -5
- package/dist/mdx/react/button/button/examples/TertiaryInverse.tsx +6 -6
- package/dist/mdx/react/button/button/examples/ThemeOverrides.tsx +6 -6
- package/dist/mdx/react/card/card.mdx +5 -5
- package/dist/mdx/react/card/examples/Basic.tsx +1 -0
- package/dist/mdx/react/card/examples/Borderless.tsx +2 -3
- package/dist/mdx/react/card/examples/CustomStyles.tsx +1 -3
- package/dist/mdx/react/card/examples/Stencils.tsx +9 -10
- package/dist/mdx/react/card/examples/{Filled.tsx → Tonal.tsx} +2 -1
- package/dist/mdx/react/checkbox/Checkbox.mdx +11 -12
- package/dist/mdx/react/checkbox/examples/Basic.tsx +1 -0
- package/dist/mdx/react/checkbox/examples/Caution.tsx +1 -0
- package/dist/mdx/react/checkbox/examples/Disabled.tsx +1 -0
- package/dist/mdx/react/checkbox/examples/Error.tsx +1 -0
- package/dist/mdx/react/checkbox/examples/Indeterminate.tsx +3 -2
- package/dist/mdx/react/checkbox/examples/Inverse.tsx +3 -2
- package/dist/mdx/react/checkbox/examples/LabelPosition.tsx +1 -0
- package/dist/mdx/react/checkbox/examples/RefForwarding.tsx +3 -2
- package/dist/mdx/react/checkbox/examples/Required.tsx +1 -0
- package/dist/mdx/react/collection/mdx/examples/BasicGrid.tsx +3 -3
- package/dist/mdx/react/collection/mdx/examples/DataLoader.tsx +4 -4
- package/dist/mdx/react/collection/mdx/examples/MultiSelection.tsx +3 -3
- package/dist/mdx/react/collection/mdx/examples/OverflowVerticalList.tsx +3 -2
- package/dist/mdx/react/collection/mdx/examples/RovingFocus.tsx +2 -2
- package/dist/mdx/react/collection/mdx/examples/Selection.tsx +3 -3
- package/dist/mdx/react/collection/mdx/examples/StringChildren.tsx +1 -1
- package/dist/mdx/react/collection/mdx/examples/WrappingGrid.tsx +3 -3
- package/dist/mdx/react/color-picker/color-input/ColorInput.mdx +7 -8
- package/dist/mdx/react/color-picker/color-input/examples/Basic.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Caution.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Checked.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Disabled.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Error.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Grow.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/LabelPosition.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/RefForwarding.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/Required.tsx +2 -1
- package/dist/mdx/react/color-picker/color-input/examples/ValidColorChange.tsx +4 -3
- package/dist/mdx/react/color-picker/color-preview/ColorPreview.mdx +3 -3
- package/dist/mdx/react/color-picker/color-preview/examples/LabelPosition.tsx +2 -1
- package/dist/mdx/react/color-picker/color-preview/examples/RefForwarding.tsx +4 -3
- package/dist/mdx/react/combobox/examples/Autocomplete.tsx +11 -9
- package/dist/mdx/react/common/mdx/CompoundComponentUtilities.mdx +1 -1
- package/dist/mdx/react/common/mdx/Theming.mdx +166 -129
- package/dist/mdx/react/common/mdx/examples/CreateComponent.tsx +10 -4
- package/dist/mdx/react/common/mdx/examples/CreateContainer.tsx +1 -0
- package/dist/mdx/react/common/mdx/examples/CreateElemPropsHook.tsx +3 -2
- package/dist/mdx/react/common/mdx/examples/CreateModelHook.tsx +1 -0
- package/dist/mdx/react/common/mdx/examples/CreateSubcomponent.tsx +2 -1
- package/dist/mdx/react/common/mdx/examples/RTL.tsx +4 -5
- package/dist/mdx/react/common/mdx/examples/ResponsiveStyles.tsx +4 -3
- package/dist/mdx/react/common/mdx/examples/ResponsiveViewport.tsx +4 -3
- package/dist/mdx/react/common/mdx/examples/Theming.tsx +40 -22
- package/dist/mdx/react/dialog/Dialog.mdx +51 -20
- package/dist/mdx/react/dialog/examples/Basic.tsx +4 -3
- package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +20 -12
- package/dist/mdx/react/dialog/examples/Focus.tsx +3 -3
- package/dist/mdx/react/expandable/Expandable.mdx +54 -2
- package/dist/mdx/react/expandable/examples/Avatar.tsx +1 -0
- package/dist/mdx/react/expandable/examples/Depth.tsx +10 -1
- package/dist/mdx/react/expandable/examples/HoistedModel.tsx +26 -21
- package/dist/mdx/react/expandable/examples/LongTitle.tsx +1 -0
- package/dist/mdx/react/expandable/examples/RTL.tsx +2 -7
- package/dist/mdx/react/form-field/FormField.mdx +97 -45
- package/dist/mdx/react/form-field/examples/AllFields.tsx +10 -11
- package/dist/mdx/react/form-field/examples/Basic.tsx +1 -0
- package/dist/mdx/react/form-field/examples/Caution.tsx +8 -5
- package/dist/mdx/react/form-field/examples/Custom.tsx +3 -2
- package/dist/mdx/react/form-field/examples/CustomId.tsx +1 -0
- package/dist/mdx/react/form-field/examples/Disabled.tsx +2 -2
- package/dist/mdx/react/form-field/examples/Error.tsx +3 -3
- package/dist/mdx/react/form-field/examples/GroupedInputs.tsx +14 -14
- package/dist/mdx/react/form-field/examples/Grow.tsx +1 -0
- package/dist/mdx/react/form-field/examples/HiddenLabel.tsx +27 -11
- package/dist/mdx/react/form-field/examples/Hint.tsx +2 -2
- package/dist/mdx/react/form-field/examples/LabelPositionHorizontalEnd.tsx +3 -2
- package/dist/mdx/react/form-field/examples/LabelPositionHorizontalStart.tsx +3 -2
- package/dist/mdx/react/form-field/examples/RefForwarding.tsx +4 -3
- package/dist/mdx/react/form-field/examples/Required.tsx +2 -1
- package/dist/mdx/react/form-field/examples/ThemedErrors.tsx +8 -8
- package/dist/mdx/react/icon/Assets.mdx +174 -17
- package/dist/mdx/react/icon/examples/AccentIconList.tsx +5 -4
- package/dist/mdx/react/icon/examples/AppletIconList.tsx +5 -4
- package/dist/mdx/react/icon/examples/ExpressiveBasic.tsx +41 -0
- package/dist/mdx/react/icon/examples/ExpressiveCustomStyles.tsx +54 -0
- package/dist/mdx/react/icon/examples/{IconList.tsx → ExpressiveIconList.tsx} +20 -13
- package/dist/mdx/react/icon/examples/SVGBasic.tsx +31 -0
- package/dist/mdx/react/icon/examples/SystemBasic.tsx +44 -0
- package/dist/mdx/react/icon/examples/SystemCircleBasic.tsx +34 -0
- package/dist/mdx/react/icon/examples/SystemCustomStyles.tsx +62 -0
- package/dist/mdx/react/icon/examples/SystemIconList.tsx +80 -0
- package/dist/mdx/react/information-highlight/InformationHighlight.mdx +96 -0
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Basic.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Body.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Caution.tsx +2 -2
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Critical.tsx +2 -2
- package/dist/mdx/{preview-react → react}/information-highlight/examples/CustomIconCritical.tsx +5 -6
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Heading.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Informational.tsx +4 -4
- package/dist/mdx/{preview-react → react}/information-highlight/examples/RTL.tsx +6 -11
- package/dist/mdx/react/layout/Box.mdx +13 -13
- package/dist/mdx/react/layout/Flex.mdx +3 -3
- package/dist/mdx/react/layout/Grid.mdx +3 -3
- package/dist/mdx/react/layout/examples/Box/Basic.tsx +9 -2
- package/dist/mdx/react/layout/examples/Flex/Basic.tsx +1 -0
- package/dist/mdx/react/layout/examples/Grid/Basic.tsx +19 -13
- package/dist/mdx/react/layout/examples/Grid/GridCard.tsx +34 -24
- package/dist/mdx/react/layout/examples/Grid/GridLayout.tsx +1 -0
- package/dist/mdx/react/layout/examples/Grid/GridLayoutInteractive.tsx +3 -3
- package/dist/mdx/react/loading-dots/LoadingDots.mdx +1 -1
- package/dist/mdx/react/loading-dots/examples/Accessible.tsx +8 -7
- package/dist/mdx/react/loading-dots/examples/Basic.tsx +1 -0
- package/dist/mdx/react/loading-dots/examples/CustomColorAndAnimation.tsx +6 -4
- package/dist/mdx/react/loading-dots/examples/CustomShape.tsx +7 -7
- package/dist/mdx/react/loading-dots/examples/Inverse.tsx +2 -2
- package/dist/mdx/react/loading-dots/examples/RTL.tsx +3 -7
- package/dist/mdx/react/menu/Menu.mdx +68 -30
- package/dist/mdx/react/menu/examples/Icons.tsx +11 -10
- package/dist/mdx/react/menu/examples/MenuWithFallbackPlacements.tsx +5 -3
- package/dist/mdx/react/menu/examples/Nested.tsx +0 -1
- package/dist/mdx/react/menu/examples/NestedDynamic.tsx +1 -1
- package/dist/mdx/react/menu/examples/SelectableMenu.tsx +13 -2
- package/dist/mdx/react/modal/Modal.mdx +94 -16
- package/dist/mdx/react/modal/examples/Basic.tsx +5 -4
- package/dist/mdx/react/modal/examples/BodyOverflow.tsx +1 -1
- package/dist/mdx/react/modal/examples/CustomFocus.tsx +4 -3
- package/dist/mdx/react/modal/examples/FormModal.tsx +28 -3
- package/dist/mdx/react/modal/examples/FullOverflow.tsx +1 -1
- package/dist/mdx/react/modal/examples/IframeTest.tsx +1 -1
- package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +3 -3
- package/dist/mdx/react/modal/examples/ModalWithPopupRTL.tsx +66 -0
- package/dist/mdx/react/modal/examples/NoTargetRTL.tsx +49 -0
- package/dist/mdx/react/modal/examples/ReturnFocus.tsx +140 -41
- package/dist/mdx/react/modal/examples/StackedModals.tsx +1 -1
- package/dist/mdx/react/modal/examples/WithRadioButtons.tsx +1 -0
- package/dist/mdx/react/modal/examples/WithTooltips.tsx +2 -1
- package/dist/mdx/react/modal/examples/WithoutCloseIcon.tsx +10 -9
- package/dist/mdx/react/pagination/examples/Basic.tsx +0 -1
- package/dist/mdx/react/pagination/examples/HoistedModel.tsx +0 -1
- package/dist/mdx/react/pagination/examples/RTL.tsx +2 -5
- package/dist/mdx/react/pagination/examples/ResponsiveRange.tsx +13 -9
- package/dist/mdx/react/pagination/pagination.mdx +8 -6
- package/dist/mdx/{preview-react → react}/pill/Pill.mdx +3 -3
- package/dist/mdx/{preview-react → react}/pill/examples/Basic.tsx +2 -3
- package/dist/mdx/react/pill/examples/CustomStyles.tsx +52 -0
- package/dist/mdx/{preview-react → react}/pill/examples/WithAvatar.tsx +6 -4
- package/dist/mdx/{preview-react → react}/pill/examples/WithCount.tsx +3 -2
- package/dist/mdx/{preview-react → react}/pill/examples/WithList.tsx +2 -2
- package/dist/mdx/{preview-react → react}/pill/examples/WithReadOnly.tsx +3 -3
- package/dist/mdx/{preview-react → react}/pill/examples/WithRemovable.tsx +6 -5
- package/dist/mdx/react/popup/Popup.mdx +64 -36
- package/dist/mdx/react/popup/examples/Basic.tsx +22 -5
- package/dist/mdx/react/popup/examples/ComboboxWithinPopup.tsx +3 -3
- package/dist/mdx/react/popup/examples/CustomTarget.tsx +3 -2
- package/dist/mdx/react/popup/examples/ExternalWindow.tsx +26 -29
- package/dist/mdx/react/popup/examples/FocusRedirect.tsx +27 -12
- package/dist/mdx/react/popup/examples/FocusTrap.tsx +8 -6
- package/dist/mdx/react/popup/examples/FullScreen.tsx +6 -6
- package/dist/mdx/react/popup/examples/InitialFocus.tsx +115 -11
- package/dist/mdx/react/popup/examples/InlinePopup.tsx +126 -0
- package/dist/mdx/react/popup/examples/MixedPopupTypes.tsx +5 -4
- package/dist/mdx/react/popup/examples/MultiplePopups.tsx +34 -22
- package/dist/mdx/react/popup/examples/NestedPopups.tsx +5 -5
- package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +26 -18
- package/dist/mdx/react/popup/examples/PopupWithNonHidablePopup.tsx +1 -1
- package/dist/mdx/react/popup/examples/RTL.tsx +9 -9
- package/dist/mdx/react/popup/examples/ReturnFocusTest.tsx +4 -4
- package/dist/mdx/react/popup/examples/TooltipReturnFocus.tsx +5 -5
- package/dist/mdx/react/radio/Radio.mdx +8 -9
- package/dist/mdx/react/radio/examples/Basic.tsx +4 -3
- package/dist/mdx/react/radio/examples/Caution.tsx +2 -1
- package/dist/mdx/react/radio/examples/Disabled.tsx +2 -1
- package/dist/mdx/react/radio/examples/Error.tsx +2 -1
- package/dist/mdx/react/radio/examples/Inverse.tsx +3 -2
- package/dist/mdx/react/radio/examples/LabelPosition.tsx +2 -1
- package/dist/mdx/react/radio/examples/NoValue.tsx +2 -1
- package/dist/mdx/react/radio/examples/RefForwarding.tsx +2 -1
- package/dist/mdx/react/radio/examples/Required.tsx +2 -1
- package/dist/mdx/react/segmented-control/SegmentedControl.mdx +119 -18
- package/dist/mdx/react/segmented-control/examples/Basic.tsx +32 -28
- package/dist/mdx/{preview-react → react}/segmented-control/examples/Disabled.tsx +2 -2
- package/dist/mdx/{preview-react → react}/segmented-control/examples/Dynamic.tsx +3 -2
- package/dist/mdx/{preview-react → react}/segmented-control/examples/RTL.tsx +4 -4
- package/dist/mdx/{preview-react → react}/segmented-control/examples/Sizes.tsx +4 -3
- package/dist/mdx/{preview-react → react}/segmented-control/examples/TextAndIcon.tsx +2 -1
- package/dist/mdx/{preview-react → react}/segmented-control/examples/TextOnly.tsx +2 -1
- package/dist/mdx/{preview-react → react}/segmented-control/examples/Vertical.tsx +2 -2
- package/dist/mdx/react/select/Select.mdx +26 -20
- package/dist/mdx/react/select/examples/Basic.tsx +2 -1
- package/dist/mdx/react/select/examples/Caution.tsx +2 -1
- package/dist/mdx/react/select/examples/Complex.tsx +2 -1
- package/dist/mdx/react/select/examples/Controlled.tsx +3 -2
- package/dist/mdx/react/select/examples/Disabled.tsx +2 -1
- package/dist/mdx/react/select/examples/DisabledOption.tsx +2 -1
- package/dist/mdx/react/select/examples/Error.tsx +2 -1
- package/dist/mdx/react/select/examples/FetchingDynamicItems.tsx +4 -3
- package/dist/mdx/react/select/examples/GroupedItems.tsx +59 -0
- package/dist/mdx/react/select/examples/Grow.tsx +2 -1
- package/dist/mdx/react/select/examples/HoistedModel.tsx +1 -0
- package/dist/mdx/react/select/examples/InitialSelectedItem.tsx +2 -1
- package/dist/mdx/react/select/examples/LabelPosition.tsx +2 -1
- package/dist/mdx/react/select/examples/MenuHeight.tsx +1 -1
- package/dist/mdx/react/select/examples/Placeholder.tsx +2 -1
- package/dist/mdx/react/select/examples/RefForwarding.tsx +1 -0
- package/dist/mdx/react/select/examples/Required.tsx +2 -1
- package/dist/mdx/react/select/examples/WithIcons.tsx +6 -10
- package/dist/mdx/react/side-panel/SidePanel.mdx +287 -0
- package/dist/mdx/react/side-panel/examples/AlwaysOpen.tsx +50 -0
- package/dist/mdx/react/side-panel/examples/Basic.tsx +33 -0
- package/dist/mdx/react/side-panel/examples/ExternalControl.tsx +60 -0
- package/dist/mdx/react/side-panel/examples/Heading.tsx +43 -0
- package/dist/mdx/react/side-panel/examples/OnStateTransition.tsx +52 -0
- package/dist/mdx/react/side-panel/examples/RightOrigin.tsx +67 -0
- package/dist/mdx/react/side-panel/examples/Variant.tsx +51 -0
- package/dist/mdx/react/side-panel/examples/useDirection.ts +24 -0
- package/dist/mdx/react/skeleton/Skeleton.mdx +1 -1
- package/dist/mdx/react/skeleton/examples/Basic.tsx +8 -6
- package/dist/mdx/react/skeleton/examples/Color.tsx +13 -11
- package/dist/mdx/react/skeleton/examples/Header.tsx +1 -0
- package/dist/mdx/react/skeleton/examples/Shape.tsx +4 -3
- package/dist/mdx/react/skeleton/examples/Simulation.tsx +40 -25
- package/dist/mdx/react/skeleton/examples/Text.tsx +1 -0
- package/dist/mdx/react/status-indicator/StatusIndicator.mdx +1 -1
- package/dist/mdx/react/status-indicator/examples/Basic.tsx +6 -7
- package/dist/mdx/react/status-indicator/examples/Emphasis.tsx +6 -7
- package/dist/mdx/react/status-indicator/examples/Icon.tsx +3 -2
- package/dist/mdx/react/status-indicator/examples/MaxWidth.tsx +6 -7
- package/dist/mdx/react/switch/Switch.mdx +22 -9
- package/dist/mdx/react/switch/examples/Basic.tsx +1 -0
- package/dist/mdx/react/switch/examples/Caution.tsx +1 -0
- package/dist/mdx/react/switch/examples/Disabled.tsx +1 -0
- package/dist/mdx/react/switch/examples/Error.tsx +1 -0
- package/dist/mdx/react/switch/examples/LabelPosition.tsx +1 -0
- package/dist/mdx/react/switch/examples/RefForwarding.tsx +1 -0
- package/dist/mdx/react/table/examples/BaseHtmlTable.tsx +1 -3
- package/dist/mdx/react/table/examples/Basic.tsx +1 -3
- package/dist/mdx/react/table/examples/BasicWithHeading.tsx +3 -5
- package/dist/mdx/react/table/examples/FixedColumn.tsx +8 -8
- package/dist/mdx/react/table/examples/RightToLeft.tsx +3 -5
- package/dist/mdx/react/tabs/Tabs.mdx +10 -9
- package/dist/mdx/react/tabs/examples/AlternativeTabStop.tsx +3 -4
- package/dist/mdx/react/tabs/examples/Basic.tsx +3 -3
- package/dist/mdx/react/tabs/examples/DisabledTab.tsx +3 -3
- package/dist/mdx/react/tabs/examples/DynamicTabs.tsx +2 -1
- package/dist/mdx/react/tabs/examples/HoistedModel.tsx +3 -4
- package/dist/mdx/react/tabs/examples/Icons.tsx +4 -5
- package/dist/mdx/react/tabs/examples/NamedTabs.tsx +3 -3
- package/dist/mdx/react/tabs/examples/OverflowTabs.tsx +2 -2
- package/dist/mdx/react/tabs/examples/RightToLeft.tsx +5 -5
- package/dist/mdx/react/tabs/examples/SinglePanel.tsx +2 -4
- package/dist/mdx/react/testing/examples/Basic.tsx +3 -3
- package/dist/mdx/react/text/LabelText.mdx +1 -1
- package/dist/mdx/react/text/Text.mdx +1 -1
- package/dist/mdx/react/text/examples/BodyText/Basic.tsx +1 -0
- package/dist/mdx/react/text/examples/Heading/Basic.tsx +1 -0
- package/dist/mdx/react/text/examples/LabelText/Basic.tsx +1 -0
- package/dist/mdx/react/text/examples/LabelText/Cursor.tsx +1 -0
- package/dist/mdx/react/text/examples/LabelText/Disabled.tsx +3 -5
- package/dist/mdx/react/text/examples/Subtext/Basic.tsx +1 -0
- package/dist/mdx/react/text/examples/Text/Basic.tsx +12 -7
- package/dist/mdx/react/text/examples/Title/Basic.tsx +1 -0
- package/dist/mdx/react/text-area/TextArea.mdx +44 -18
- package/dist/mdx/react/text-area/examples/Basic.tsx +1 -0
- package/dist/mdx/react/text-area/examples/Disabled.tsx +1 -0
- package/dist/mdx/react/text-area/examples/Grow.tsx +1 -0
- package/dist/mdx/react/text-area/examples/LabelPosition.tsx +1 -0
- package/dist/mdx/react/text-area/examples/Placeholder.tsx +1 -0
- package/dist/mdx/react/text-area/examples/RefForwarding.tsx +1 -0
- package/dist/mdx/react/text-area/examples/Required.tsx +1 -0
- package/dist/mdx/react/text-area/examples/ResizeConstraints.tsx +1 -0
- package/dist/mdx/react/text-input/TextInput.mdx +43 -18
- package/dist/mdx/react/text-input/examples/Basic.tsx +1 -0
- package/dist/mdx/react/text-input/examples/Disabled.tsx +1 -0
- package/dist/mdx/react/text-input/examples/Grow.tsx +1 -0
- package/dist/mdx/react/text-input/examples/Icons.tsx +25 -21
- package/dist/mdx/react/text-input/examples/LabelPosition.tsx +1 -0
- package/dist/mdx/react/text-input/examples/Placeholder.tsx +1 -0
- package/dist/mdx/react/text-input/examples/RefForwarding.tsx +1 -0
- package/dist/mdx/react/text-input/examples/Required.tsx +1 -0
- package/dist/mdx/react/toast/examples/Basic.tsx +2 -1
- package/dist/mdx/react/toast/examples/RTL.tsx +4 -6
- package/dist/mdx/react/toast/examples/ToastAlert.tsx +2 -2
- package/dist/mdx/react/toast/examples/ToastDialog.tsx +2 -1
- package/dist/mdx/react/toast/examples/WithActionLinkAndCloseIcon.tsx +2 -4
- package/dist/mdx/react/toast/examples/WithPopper.tsx +4 -4
- package/dist/mdx/react/toast/toast.mdx +4 -3
- package/dist/mdx/react/tokens/Tokens.mdx +1 -1
- package/dist/mdx/react/tokens/examples/Overview.tsx +2 -2
- package/dist/mdx/react/tokens/examples/Tokens.tsx +4 -4
- package/dist/mdx/react/tooltip/Tooltip.mdx +31 -13
- package/dist/mdx/react/tooltip/examples/Default.tsx +1 -1
- package/dist/mdx/react/tooltip/examples/DescriptionType.tsx +3 -3
- package/dist/mdx/react/tooltip/examples/Ellipsis.tsx +8 -8
- package/dist/mdx/react/tooltip/examples/Placements.tsx +13 -14
- package/dist/mdx/react/tooltip/examples/UseTooltip.tsx +2 -2
- package/dist/mdx/style-props/STYLE_PROPS.mdx +1 -1
- package/dist/mdx/style-props/stylePropsMigrationCodemod.mdx +1 -1
- package/dist/mdx/style-props/stylePropsMigrationOverview.mdx +20 -20
- package/dist/mdx/styling/mdx/CreateStyles.mdx +32 -31
- package/dist/mdx/styling/mdx/CustomizingStyles.mdx +4 -4
- package/dist/mdx/styling/mdx/MergingStyles.mdx +6 -4
- package/dist/mdx/styling/mdx/Overview.mdx +15 -15
- package/dist/mdx/styling/mdx/Stencils.mdx +32 -30
- package/dist/mdx/styling/mdx/Utilities.mdx +135 -27
- package/dist/mdx/styling/mdx/examples/CSProp.tsx +7 -9
- package/dist/mdx/styling/mdx/examples/CreateModifiers.tsx +1 -1
- package/dist/mdx/styling/mdx/examples/CreateStencil.tsx +10 -9
- package/dist/mdx/styling/mdx/examples/CreateStyles.tsx +2 -4
- package/dist/mdx/styling/mdx/examples/CustomButton.tsx +16 -23
- package/dist/mdx/styling/mdx/examples/CustomIcon.tsx +5 -6
- package/dist/mdx/styling/mdx/examples/EmotionButton.tsx +1 -1
- package/dist/mdx/styling/mdx/examples/ManualStylesButton.tsx +1 -0
- package/dist/mdx/styling/mdx/examples/StyledButton.tsx +13 -15
- package/dist/mdx/styling/mdx/examples/StylingButton.tsx +2 -1
- package/dist/mdx/styling/mdx/examples/StylingOverrides.tsx +10 -10
- package/dist/mdx/tokens/TokenMigrationCodemod.mdx +9 -0
- package/dist/mdx/tokens/TokenMigrationFinal.mdx +35 -30
- package/dist/mdx/tokens/TokenMigrationInstall.mdx +17 -14
- package/dist/mdx/tokens/TokenMigrationMappingColors.mdx +434 -288
- package/dist/mdx/tokens/TokenMigrationMappingSystem.mdx +51 -199
- package/dist/mdx/tokens/TokenMigrationOverview.mdx +23 -41
- package/dist/mdx/welcome.mdx +14 -16
- package/lib/DescriptionTooltip.tsx +16 -11
- package/lib/DownloadLLMFile.tsx +12 -12
- package/lib/ExampleCodeBlock.tsx +38 -28
- package/lib/MDXElements.tsx +6 -5
- package/lib/MoreTooltip.tsx +12 -10
- package/lib/Specifications.tsx +30 -17
- package/lib/StorybookStatusIndicator.tsx +32 -20
- package/lib/StylePropsTable.tsx +2 -1
- package/lib/SymbolDoc.tsx +2 -1
- package/lib/Table.tsx +37 -39
- package/lib/Value.tsx +22 -15
- package/lib/docs.ts +1 -0
- package/lib/stackblitzFiles/App.tsx +7 -21
- package/lib/stackblitzFiles/main.tsx +6 -4
- package/lib/stackblitzFiles/packageJSONFile.ts +4 -2
- package/lib/stackblitzFiles/types/custom-imports.d.ts +0 -9
- package/lib/stackblitzFiles/vite.config.ts +1 -3
- package/lib/widgetUtils.tsx +42 -43
- package/lib/widgets/array.tsx +1 -1
- package/lib/widgets/callExpression.tsx +1 -2
- package/lib/widgets/canvasColor.tsx +2 -2
- package/lib/widgets/conditional.tsx +1 -1
- package/lib/widgets/enhancedComponent.tsx +12 -8
- package/lib/widgets/external.tsx +1 -2
- package/lib/widgets/function.tsx +3 -3
- package/lib/widgets/index.ts +1 -1
- package/lib/widgets/intersection.tsx +1 -1
- package/lib/widgets/model.tsx +1 -1
- package/lib/widgets/parenthesis.tsx +1 -1
- package/lib/widgets/primitives.tsx +3 -2
- package/lib/widgets/qualifiedName.tsx +1 -1
- package/lib/widgets/tuple.tsx +1 -1
- package/lib/widgets/typeParameter.tsx +1 -1
- package/lib/widgets/union.tsx +1 -1
- package/package.json +14 -12
- package/webpack/extract-exports.js +2 -1
- package/dist/mdx/labs-react/combobox/Combobox.mdx +0 -68
- package/dist/mdx/labs-react/combobox/examples/Basic.tsx +0 -88
- package/dist/mdx/labs-react/combobox/examples/DisabledItem.tsx +0 -88
- package/dist/mdx/labs-react/combobox/examples/GroupOfResult.tsx +0 -88
- package/dist/mdx/labs-react/combobox/examples/Grow.tsx +0 -88
- package/dist/mdx/labs-react/combobox/examples/NoClearButton.tsx +0 -88
- package/dist/mdx/labs-react/combobox/examples/RTL.tsx +0 -90
- package/dist/mdx/labs-react/search-form/SearchForm.mdx +0 -92
- package/dist/mdx/labs-react/search-form/examples/Basic.tsx +0 -63
- package/dist/mdx/labs-react/search-form/examples/Collapsed.tsx +0 -64
- package/dist/mdx/labs-react/search-form/examples/CustomStyles.tsx +0 -91
- package/dist/mdx/labs-react/search-form/examples/CustomTheme.tsx +0 -73
- package/dist/mdx/labs-react/search-form/examples/Grow.tsx +0 -64
- package/dist/mdx/labs-react/search-form/examples/RTL.tsx +0 -72
- package/dist/mdx/labs-react/search-form/examples/Theming.tsx +0 -66
- package/dist/mdx/preview-react/avatar/examples/Basic.tsx +0 -5
- package/dist/mdx/preview-react/avatar/examples/nicholas-avatar.png +0 -0
- package/dist/mdx/preview-react/information-highlight/InformationHighlight.mdx +0 -109
- package/dist/mdx/preview-react/pill/examples/CustomStyles.tsx +0 -53
- package/dist/mdx/preview-react/segmented-control/SegmentedControl.mdx +0 -139
- package/dist/mdx/preview-react/segmented-control/examples/Basic.tsx +0 -42
- package/dist/mdx/preview-react/select/Select.mdx +0 -107
- package/dist/mdx/preview-react/select/examples/Left Label/AlertLeft.tsx +0 -18
- package/dist/mdx/preview-react/select/examples/Left Label/DefaultLeft.tsx +0 -17
- package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithCustomOptionsLeft.tsx +0 -25
- package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithSimpleOptionsLeft.tsx +0 -17
- package/dist/mdx/preview-react/select/examples/Left Label/DisabledLeft.tsx +0 -19
- package/dist/mdx/preview-react/select/examples/Left Label/ErrorLeft.tsx +0 -18
- package/dist/mdx/preview-react/select/examples/Left Label/GrowLeft.tsx +0 -17
- package/dist/mdx/preview-react/select/examples/Left Label/ScrollableLeft.tsx +0 -17
- package/dist/mdx/preview-react/select/examples/Left Label/index.ts +0 -8
- package/dist/mdx/preview-react/select/examples/Top Label/Caution.tsx +0 -16
- package/dist/mdx/preview-react/select/examples/Top Label/Default.tsx +0 -15
- package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithCustomOptions.tsx +0 -23
- package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithSimpleOptions.tsx +0 -15
- package/dist/mdx/preview-react/select/examples/Top Label/Disabled.tsx +0 -17
- package/dist/mdx/preview-react/select/examples/Top Label/Error.tsx +0 -16
- package/dist/mdx/preview-react/select/examples/Top Label/Grow.tsx +0 -15
- package/dist/mdx/preview-react/select/examples/Top Label/Scrollable.tsx +0 -13
- package/dist/mdx/preview-react/select/examples/Top Label/index.ts +0 -8
- package/dist/mdx/preview-react/select/examples/storiesData.tsx +0 -92
- package/dist/mdx/react/_examples/mdx/examples/SegmentControlWithText.tsx +0 -119
- package/dist/mdx/react/avatar/avatar/Avatar.mdx +0 -109
- package/dist/mdx/react/avatar/avatar/examples/Basic.tsx +0 -17
- package/dist/mdx/react/avatar/avatar/examples/Button.tsx +0 -20
- package/dist/mdx/react/avatar/avatar/examples/CustomStyles.tsx +0 -34
- package/dist/mdx/react/avatar/avatar/examples/Image.tsx +0 -25
- package/dist/mdx/react/avatar/avatar/examples/LazyLoad.tsx +0 -20
- package/dist/mdx/react/avatar/avatar/examples/ObjectFit.tsx +0 -30
- package/dist/mdx/react/avatar/avatar/examples/Size.tsx +0 -27
- package/dist/mdx/react/avatar/avatar/examples/Variant.tsx +0 -10
- package/dist/mdx/react/avatar/avatar/examples/test-avatar.png +0 -0
- package/dist/mdx/react/icon/examples/Overview.tsx +0 -42
- package/dist/mdx/react/text-area/examples/Caution.tsx +0 -21
- package/dist/mdx/react/text-area/examples/Error.tsx +0 -21
- package/dist/mdx/react/text-input/examples/Caution.tsx +0 -21
- package/dist/mdx/react/text-input/examples/Error.tsx +0 -21
- /package/dist/mdx/accessibility/{AccessibilityTesting.mdx → TestingTableWithFormFields.mdx} +0 -0
- /package/dist/mdx/{preview-react → react}/pill/examples/test-avatar.png +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
4
|
+
import {Menu} from '@workday/canvas-kit-react/menu';
|
|
5
|
+
import {Select} from '@workday/canvas-kit-react/select';
|
|
6
|
+
|
|
7
|
+
const items = [
|
|
8
|
+
{
|
|
9
|
+
id: 'first',
|
|
10
|
+
text: 'First Item',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 'second',
|
|
14
|
+
text: 'Second Item',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'third',
|
|
18
|
+
text: 'Third Item',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'fourth',
|
|
22
|
+
text: 'Fourth Item',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export default () => {
|
|
27
|
+
const [selected, setSelected] = React.useState('');
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<FormField>
|
|
32
|
+
<FormField.Label>Contact</FormField.Label>
|
|
33
|
+
<FormField.Field>
|
|
34
|
+
<Select items={items} getId={item => item.id} getTextValue={item => item.text}>
|
|
35
|
+
<FormField.Input as={Select.Input} />
|
|
36
|
+
<Select.Popper>
|
|
37
|
+
<Select.Card>
|
|
38
|
+
<Select.List>
|
|
39
|
+
<Menu.Group title="First Group">
|
|
40
|
+
<Select.Item data-id="first">First Item</Select.Item>
|
|
41
|
+
<Select.Item data-id="second">Second Item</Select.Item>
|
|
42
|
+
</Menu.Group>
|
|
43
|
+
<Menu.Group title="Second Group">
|
|
44
|
+
<Select.Item data-id="third">
|
|
45
|
+
Third Item (with a really, really, really long label)
|
|
46
|
+
</Select.Item>
|
|
47
|
+
<Select.Item aria-disabled data-id="fourth">
|
|
48
|
+
Fourth Item
|
|
49
|
+
</Select.Item>
|
|
50
|
+
</Menu.Group>
|
|
51
|
+
</Select.List>
|
|
52
|
+
</Select.Card>
|
|
53
|
+
</Select.Popper>
|
|
54
|
+
</Select>
|
|
55
|
+
</FormField.Field>
|
|
56
|
+
</FormField>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
5
6
|
|
|
6
7
|
const options = [
|
|
7
8
|
'E-mail',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {Select} from '@workday/canvas-kit-react/select';
|
|
5
6
|
import {createStyles} from '@workday/canvas-kit-styling';
|
|
6
7
|
|
|
7
8
|
const parentContainerStyles = createStyles({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
5
6
|
|
|
6
7
|
const options = [
|
|
7
8
|
'E-mail',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
2
|
-
import {Select} from '@workday/canvas-kit-react/select';
|
|
3
2
|
import {Box} from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import {Select} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
5
5
|
|
|
6
6
|
const selectCardStyles = createStyles({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {Select} from '@workday/canvas-kit-react/select';
|
|
5
6
|
import {createStyles} from '@workday/canvas-kit-styling';
|
|
6
7
|
|
|
7
8
|
const parentContainerStyles = createStyles({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
+
import {Select} from '@workday/canvas-kit-react/select';
|
|
5
6
|
import {createStyles} from '@workday/canvas-kit-styling';
|
|
6
7
|
|
|
7
8
|
const parentContainerStyles = createStyles({
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
3
|
-
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
4
4
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
5
|
-
import {
|
|
6
|
-
activityStreamIcon,
|
|
7
|
-
avatarIcon,
|
|
8
|
-
uploadCloudIcon,
|
|
9
|
-
userIcon,
|
|
10
|
-
} from '@workday/canvas-system-icons-web';
|
|
5
|
+
import {Select, useSelectModel} from '@workday/canvas-kit-react/select';
|
|
11
6
|
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
7
|
+
import {cloudArrowUpIcon, cloudIcon, commentIcon, userIcon} from '@workday/canvas-system-icons-web';
|
|
12
8
|
|
|
13
9
|
const styleOverrides = {
|
|
14
10
|
formfieldInputStyles: createStyles({
|
|
@@ -20,9 +16,9 @@ const styleOverrides = {
|
|
|
20
16
|
};
|
|
21
17
|
|
|
22
18
|
const customOptions = [
|
|
23
|
-
{text: 'Activity Stream', id: 'activity-stream', icon:
|
|
24
|
-
{text: 'Avatar', id: 'avatar', icon:
|
|
25
|
-
{text: 'Upload Cloud', id: 'upload-cloud', icon:
|
|
19
|
+
{text: 'Activity Stream', id: 'activity-stream', icon: commentIcon},
|
|
20
|
+
{text: 'Avatar', id: 'avatar', icon: cloudIcon},
|
|
21
|
+
{text: 'Upload Cloud', id: 'upload-cloud', icon: cloudArrowUpIcon},
|
|
26
22
|
{text: 'User', id: 'user', icon: userIcon},
|
|
27
23
|
];
|
|
28
24
|
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExampleCodeBlock,
|
|
3
|
+
SymbolDoc,
|
|
4
|
+
Specifications,
|
|
5
|
+
StorybookStatusIndicator,
|
|
6
|
+
} from '@workday/canvas-kit-docs';
|
|
7
|
+
import Basic from './examples/Basic';
|
|
8
|
+
import Heading from './examples/Heading';
|
|
9
|
+
import AlternatePanel from './examples/Variant';
|
|
10
|
+
import ExternalControl from './examples/ExternalControl';
|
|
11
|
+
import RightOrigin from './examples/RightOrigin';
|
|
12
|
+
import AlwaysOpen from './examples/AlwaysOpen';
|
|
13
|
+
import OnStateTransition from './examples/OnStateTransition';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Canvas Kit Side Panel <StorybookStatusIndicator type="new" />
|
|
17
|
+
|
|
18
|
+
`SidePanel` is a collapsible container that anchors to the left or right side of the screen. It uses
|
|
19
|
+
the model pattern for state management and is fully accessible.
|
|
20
|
+
|
|
21
|
+
[> Workday Design Reference](https://design.workday.com/components/containers/side-panel)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
yarn add @workday/canvas-kit-react
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Migrating from Preview
|
|
30
|
+
|
|
31
|
+
If you're migrating from `@workday/canvas-kit-preview-react/side-panel`, here are the key API
|
|
32
|
+
changes:
|
|
33
|
+
|
|
34
|
+
### Import Changes
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
// Before (preview-react)
|
|
38
|
+
import {SidePanel, useSidePanel} from '@workday/canvas-kit-preview-react/side-panel';
|
|
39
|
+
|
|
40
|
+
// After (react)
|
|
41
|
+
import {SidePanel, useSidePanelModel} from '@workday/canvas-kit-react/side-panel';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Hook API Changes
|
|
45
|
+
|
|
46
|
+
| Preview (`useSidePanel`) | Main (`useSidePanelModel`) |
|
|
47
|
+
| -------------------------------- | ------------------------------------------------------- |
|
|
48
|
+
| `initialExpanded: boolean` | `initialTransitionState: 'expanded' \| 'collapsed'` |
|
|
49
|
+
| `origin: 'left' \| 'right'` | `origin: 'start' \| 'end'` |
|
|
50
|
+
| Returns `expanded: boolean` | Returns `model.state.transitionState` |
|
|
51
|
+
| Returns `setExpanded(bool)` | Use `model.events.expand()` / `model.events.collapse()` |
|
|
52
|
+
| Returns `panelProps` to spread | Props applied automatically via `elemPropsHook` |
|
|
53
|
+
| Returns `labelProps` to spread | Use `id={model.state.labelId}` on label element |
|
|
54
|
+
| Returns `controlProps` to spread | Props applied automatically to `SidePanel.ToggleButton` |
|
|
55
|
+
|
|
56
|
+
### Component API Changes
|
|
57
|
+
|
|
58
|
+
| Preview | Main |
|
|
59
|
+
| ---------------------------------------------- | ------------------------------------------------- |
|
|
60
|
+
| `<SidePanel {...panelProps}>` | `<SidePanel model={model}>` or just `<SidePanel>` |
|
|
61
|
+
| `<SidePanel.ToggleButton {...controlProps} />` | `<SidePanel.ToggleButton />` |
|
|
62
|
+
| `<Heading {...labelProps}>` | `<SidePanel.Heading>Panel Title</SidePanel.Heading>` |
|
|
63
|
+
| `expanded` prop on SidePanel | Managed by model's `transitionState` |
|
|
64
|
+
| `touched` prop on SidePanel | Managed internally |
|
|
65
|
+
| `onExpandedChange` callback | Use `onStateTransition` and derive expanded state |
|
|
66
|
+
| `onStateTransition` on component | `onStateTransition` on model config |
|
|
67
|
+
|
|
68
|
+
### Code Migration Example
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
// Before (preview-react)
|
|
72
|
+
const {expanded, panelProps, labelProps, controlProps} = useSidePanel({
|
|
73
|
+
initialExpanded: false,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
<SidePanel {...panelProps} origin="right" onExpandedChange={exp => console.log(exp)}>
|
|
77
|
+
<SidePanel.ToggleButton {...controlProps} />
|
|
78
|
+
<Heading {...labelProps}>Panel Title</Heading>
|
|
79
|
+
{expanded && <Content />}
|
|
80
|
+
</SidePanel>;
|
|
81
|
+
|
|
82
|
+
// After (react)
|
|
83
|
+
const model = useSidePanelModel({
|
|
84
|
+
initialTransitionState: 'collapsed',
|
|
85
|
+
origin: 'end',
|
|
86
|
+
onStateTransition: state => {
|
|
87
|
+
const isExpanded = state === 'expanded' || state === 'expanding';
|
|
88
|
+
console.log(isExpanded);
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
<SidePanel model={model}>
|
|
93
|
+
<SidePanel.ToggleButton />
|
|
94
|
+
<SidePanel.Heading>Panel Title</SidePanel.Heading>
|
|
95
|
+
{model.state.transitionState === 'expanded' && <Content />}
|
|
96
|
+
</SidePanel>;
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Checking Expanded State
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
// Before (preview-react)
|
|
103
|
+
if (expanded) {
|
|
104
|
+
/* ... */
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// After (react) - for exact state
|
|
108
|
+
if (model.state.transitionState === 'expanded') {
|
|
109
|
+
/* ... */
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// After (react) - including animation states
|
|
113
|
+
const isExpanded =
|
|
114
|
+
model.state.transitionState === 'expanded' || model.state.transitionState === 'expanding';
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
### Basic Example
|
|
120
|
+
|
|
121
|
+
`SidePanel` is composed of three parts:
|
|
122
|
+
|
|
123
|
+
- The panel container (with an optional `model` prop)
|
|
124
|
+
- A heading (`SidePanel.Heading`) for the panel that is visually hidden when the panel is collapsed
|
|
125
|
+
- A toggle button (`SidePanel.ToggleButton`) to control the expand / collapse states
|
|
126
|
+
|
|
127
|
+
Bidirectional support is built into `SidePanel`. As seen in the example below, CSS Flexbox flips the
|
|
128
|
+
page layout and the panel's contents. `SidePanel` also has logic to flip the position and direction
|
|
129
|
+
of the `ToggleButton` as well as the direction of the expand / collapse animation. If you're using
|
|
130
|
+
CSS Flexbox for layouts and using the provided components, you shouldn't have to provide any custom
|
|
131
|
+
logic or styling for bidirectional support.
|
|
132
|
+
|
|
133
|
+
<ExampleCodeBlock code={Basic} />
|
|
134
|
+
|
|
135
|
+
### Hidden Name
|
|
136
|
+
|
|
137
|
+
`SidePanel`'s `<section>` element container should always have an accessible name to help screen
|
|
138
|
+
reader users understand the purpose of the panel. For this reason, we recommend using the
|
|
139
|
+
`SidePanel.Heading` component and setting the `hidden` prop to `true`. This will visually hide the
|
|
140
|
+
heading while keeping it accessible to screen readers.
|
|
141
|
+
|
|
142
|
+
<ExampleCodeBlock code={Heading} />
|
|
143
|
+
|
|
144
|
+
### Alternate Variant
|
|
145
|
+
|
|
146
|
+
`SidePanel` has one variant, `alternate`, which you can supply as a top-level prop. Default depth of
|
|
147
|
+
`alternate` variant is 5, if `alternate` SidePanel has an overlay behavior the depth 6 should be
|
|
148
|
+
used (this case is covered in the Examples section).
|
|
149
|
+
|
|
150
|
+
<ExampleCodeBlock code={AlternatePanel} />
|
|
151
|
+
|
|
152
|
+
### External Control
|
|
153
|
+
|
|
154
|
+
Sometimes you'll want to control `SidePanel`'s expand / collapse behavior from outside the
|
|
155
|
+
component. You can use the model's events (`model.events.expand()` and `model.events.collapse()`) to
|
|
156
|
+
programmatically control the panel.
|
|
157
|
+
|
|
158
|
+
#### Notes about accessibility
|
|
159
|
+
|
|
160
|
+
When using external controls, be mindful of accessibility:
|
|
161
|
+
|
|
162
|
+
- Use `aria-pressed` on toggle buttons to indicate the current state
|
|
163
|
+
- The `SidePanel.ToggleButton` inside the panel automatically receives the correct ARIA attributes
|
|
164
|
+
- External buttons should have their own accessible labels (don't rely on `aria-labelledby` pointing
|
|
165
|
+
to the panel's label)
|
|
166
|
+
|
|
167
|
+
In the following example, we use the model's `transitionState` to determine the button's pressed
|
|
168
|
+
state and call `model.events.expand()` or `model.events.collapse()` on click.
|
|
169
|
+
|
|
170
|
+
<ExampleCodeBlock code={ExternalControl} />
|
|
171
|
+
|
|
172
|
+
### Right Origin
|
|
173
|
+
|
|
174
|
+
By default, `SidePanel` uses a `start` origin (left in LTR, right in RTL). This sets the
|
|
175
|
+
`ToggleButton`'s position and direction as well as the direction of the animation. You can set the
|
|
176
|
+
origin to `"end"` to flip these. The origin uses logical properties (`start`/`end`) for proper
|
|
177
|
+
bidirectional support.
|
|
178
|
+
|
|
179
|
+
<ExampleCodeBlock code={RightOrigin} />
|
|
180
|
+
|
|
181
|
+
### Always Open
|
|
182
|
+
|
|
183
|
+
If you do not need `SidePanel`'s expand / collapse behavior, you can simply omit the `ToggleButton`.
|
|
184
|
+
|
|
185
|
+
<ExampleCodeBlock code={AlwaysOpen} />
|
|
186
|
+
|
|
187
|
+
### Deriving Expanded State
|
|
188
|
+
|
|
189
|
+
If you need a simple boolean `expanded` state (similar to the preview-react `onExpandedChange`
|
|
190
|
+
callback), you can derive it from the `transitionState` using the `onStateTransition` callback on
|
|
191
|
+
the model.
|
|
192
|
+
|
|
193
|
+
### onStateTransition
|
|
194
|
+
|
|
195
|
+
The `onStateTransition` callback is called whenever the panel's transition state changes. This
|
|
196
|
+
includes all four states: `expanding`, `expanded`, `collapsing`, and `collapsed`. You can pass this
|
|
197
|
+
callback directly to the `SidePanel` component or to the `useSidePanelModel` hook.
|
|
198
|
+
|
|
199
|
+
The transition flow is:
|
|
200
|
+
|
|
201
|
+
1. **Collapsing**: `expanded` → `collapsing` → `collapsed`
|
|
202
|
+
2. **Expanding**: `collapsed` → `expanding` → `expanded`
|
|
203
|
+
|
|
204
|
+
This is useful for:
|
|
205
|
+
|
|
206
|
+
- Triggering side effects when the panel state changes
|
|
207
|
+
- Syncing the panel state with external state management
|
|
208
|
+
- Animating child components based on the transition state
|
|
209
|
+
|
|
210
|
+
<ExampleCodeBlock code={OnStateTransition} />
|
|
211
|
+
|
|
212
|
+
### Accessibility
|
|
213
|
+
|
|
214
|
+
`SidePanel` renders a `<section>` element with an accessible name provided by `aria-labelledby`,
|
|
215
|
+
which references the `SidePanel.Heading` component. This ensures screen reader users understand the
|
|
216
|
+
purpose of the panel.
|
|
217
|
+
|
|
218
|
+
#### Panel and Heading
|
|
219
|
+
|
|
220
|
+
- The `SidePanel.Heading` provides the accessible name for the panel via `aria-labelledby`
|
|
221
|
+
- When the panel is collapsed, the heading is automatically hidden visually but remains accessible
|
|
222
|
+
to screen readers
|
|
223
|
+
- Use the `hidden` prop on `SidePanel.Heading` if you want the heading always visually hidden
|
|
224
|
+
|
|
225
|
+
#### Toggle Button
|
|
226
|
+
|
|
227
|
+
- `SidePanel.ToggleButton` automatically includes `aria-controls` (references the panel's `id`),
|
|
228
|
+
`aria-pressed` (indicates current state), and `aria-describedby` (references the panel's heading)
|
|
229
|
+
- Developers must provide a static `aria-label` string on `SidePanel.ToggleButton` to describe the
|
|
230
|
+
button's purpose (e.g., "Collapse View"). Avoid using ambiguous terms like "Toggle" in the label.
|
|
231
|
+
Since `aria-pressed` communicates the state, avoid dynamically updating `aria-label`
|
|
232
|
+
- The button includes a Tooltip with customizable text via `tooltipTextExpand` and
|
|
233
|
+
`tooltipTextCollapse` props (defaults: "Expand View" and "Collapse View")
|
|
234
|
+
- For optimal keyboard navigation, place `SidePanel.ToggleButton` as the first focusable element in
|
|
235
|
+
the panel
|
|
236
|
+
|
|
237
|
+
## Component API
|
|
238
|
+
|
|
239
|
+
<SymbolDoc name="SidePanel" fileName="/react/" />
|
|
240
|
+
|
|
241
|
+
## Hooks
|
|
242
|
+
|
|
243
|
+
### useSidePanelModel
|
|
244
|
+
|
|
245
|
+
The `useSidePanelModel` hook creates a model for managing the SidePanel's state and events. You can
|
|
246
|
+
pass this model to the `SidePanel` component, or let the component create one internally.
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
import {useSidePanelModel} from '@workday/canvas-kit-react/side-panel';
|
|
250
|
+
|
|
251
|
+
// Create a model with custom configuration
|
|
252
|
+
const model = useSidePanelModel({
|
|
253
|
+
initialTransitionState: 'collapsed',
|
|
254
|
+
origin: 'end',
|
|
255
|
+
onStateTransition: state => console.log('State:', state),
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// Access state
|
|
259
|
+
model.state.transitionState; // 'expanded' | 'expanding' | 'collapsed' | 'collapsing'
|
|
260
|
+
model.state.panelId; // unique ID for the panel
|
|
261
|
+
model.state.labelId; // unique ID for the label
|
|
262
|
+
|
|
263
|
+
// Trigger events
|
|
264
|
+
model.events.expand(); // Set to expanded (no animation)
|
|
265
|
+
model.events.collapse(); // Set to collapsed (no animation)
|
|
266
|
+
model.events.handleAnimationStart(); // Start expand/collapse animation
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
<SymbolDoc name="useSidePanelModel" fileName="/react/" />
|
|
270
|
+
|
|
271
|
+
### useSidePanelContainer
|
|
272
|
+
|
|
273
|
+
The `useSidePanelContainer` elemProps hook provides the necessary props for the SidePanel container
|
|
274
|
+
element, including `id`, `aria-labelledby`, and `onTransitionEnd`.
|
|
275
|
+
|
|
276
|
+
<SymbolDoc name="useSidePanelContainer" fileName="/react/" />
|
|
277
|
+
|
|
278
|
+
### useSidePanelToggleButton
|
|
279
|
+
|
|
280
|
+
The `useSidePanelToggleButton` elemProps hook provides ARIA attributes for the toggle
|
|
281
|
+
button, including `aria-controls`, `aria-pressed`, and `aria-describedby`.
|
|
282
|
+
|
|
283
|
+
<SymbolDoc name="useSidePanelToggleButton" fileName="/react/" />
|
|
284
|
+
|
|
285
|
+
## Specifications
|
|
286
|
+
|
|
287
|
+
<Specifications file="SidePanel.spec.ts" name="Side Panel" />
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {rocketIcon} from '@workday/canvas-accent-icons-web';
|
|
2
|
+
import {AccentIcon} from '@workday/canvas-kit-react/icon';
|
|
3
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import {SidePanel} from '@workday/canvas-kit-react/side-panel';
|
|
5
|
+
import {Text} from '@workday/canvas-kit-react/text';
|
|
6
|
+
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
7
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
8
|
+
|
|
9
|
+
const stylesOverride = {
|
|
10
|
+
accentIcon: createStyles({
|
|
11
|
+
marginInlineEnd: system.gap.md,
|
|
12
|
+
}),
|
|
13
|
+
pageContainer: createStyles({
|
|
14
|
+
gap: system.gap.md,
|
|
15
|
+
height: px2rem(320),
|
|
16
|
+
}),
|
|
17
|
+
panelContainer: createStyles({
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
padding: system.padding.md,
|
|
20
|
+
}),
|
|
21
|
+
panelHeading: createStyles({
|
|
22
|
+
color: system.color.fg.default,
|
|
23
|
+
}),
|
|
24
|
+
mainContent: createStyles({
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
flexBasis: 'auto',
|
|
28
|
+
flex: 1,
|
|
29
|
+
}),
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default () => {
|
|
33
|
+
return (
|
|
34
|
+
<Flex cs={stylesOverride.pageContainer}>
|
|
35
|
+
<SidePanel initialTransitionState="expanded">
|
|
36
|
+
<Flex cs={stylesOverride.panelContainer}>
|
|
37
|
+
<AccentIcon icon={rocketIcon} cs={stylesOverride.accentIcon} />
|
|
38
|
+
<SidePanel.Heading size="small" cs={stylesOverride.panelHeading}>
|
|
39
|
+
Tasks Panel
|
|
40
|
+
</SidePanel.Heading>
|
|
41
|
+
</Flex>
|
|
42
|
+
</SidePanel>
|
|
43
|
+
<Flex as="main" cs={stylesOverride.mainContent}>
|
|
44
|
+
<Text as="p" typeLevel="body.large">
|
|
45
|
+
This is the main content section.
|
|
46
|
+
</Text>
|
|
47
|
+
</Flex>
|
|
48
|
+
</Flex>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {rocketIcon} from '@workday/canvas-accent-icons-web';
|
|
4
|
+
import {AccentIcon} from '@workday/canvas-kit-react/icon';
|
|
5
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
|
+
import {SidePanel, useSidePanelModel} from '@workday/canvas-kit-react/side-panel';
|
|
7
|
+
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
8
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
9
|
+
|
|
10
|
+
const flexHeadingStyles = createStyles({
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
gap: system.gap.sm,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const viewPortStyles = createStyles({
|
|
16
|
+
height: px2rem(320),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default () => {
|
|
20
|
+
return (
|
|
21
|
+
<Flex cs={viewPortStyles}>
|
|
22
|
+
<SidePanel>
|
|
23
|
+
<SidePanel.Heading size="small">
|
|
24
|
+
<Flex cs={flexHeadingStyles}>
|
|
25
|
+
<AccentIcon icon={rocketIcon} />
|
|
26
|
+
Tasks Panel
|
|
27
|
+
</Flex>
|
|
28
|
+
</SidePanel.Heading>
|
|
29
|
+
<SidePanel.ToggleButton aria-label="Collapse View" />
|
|
30
|
+
</SidePanel>
|
|
31
|
+
</Flex>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {SecondaryButton} from '@workday/canvas-kit-react/button';
|
|
2
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import {SidePanel, useSidePanelModel} from '@workday/canvas-kit-react/side-panel';
|
|
4
|
+
import {Text} from '@workday/canvas-kit-react/text';
|
|
5
|
+
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
6
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
|
|
8
|
+
const stylesOverride = {
|
|
9
|
+
viewport: createStyles({
|
|
10
|
+
height: px2rem(320),
|
|
11
|
+
}),
|
|
12
|
+
panel: createStyles({
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
padding: system.padding.md,
|
|
15
|
+
}),
|
|
16
|
+
panelHeading: createStyles({
|
|
17
|
+
color: system.color.fg.muted.strong,
|
|
18
|
+
}),
|
|
19
|
+
main: createStyles({
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
flex: 1,
|
|
24
|
+
flexBasis: 'auto',
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default () => {
|
|
29
|
+
const model = useSidePanelModel({
|
|
30
|
+
initialTransitionState: 'collapsed',
|
|
31
|
+
labelId: 'tasks-panel-label',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Flex cs={stylesOverride.viewport}>
|
|
36
|
+
<SidePanel model={model}>
|
|
37
|
+
<SidePanel.ToggleButton aria-label="Collapse View" />
|
|
38
|
+
<SidePanel.Heading size="small" cs={stylesOverride.panelHeading}>
|
|
39
|
+
Task Panel
|
|
40
|
+
</SidePanel.Heading>
|
|
41
|
+
{model.state.transitionState === 'expanded' && (
|
|
42
|
+
<Flex cs={stylesOverride.panel}>Contents</Flex>
|
|
43
|
+
)}
|
|
44
|
+
</SidePanel>
|
|
45
|
+
<Flex as="main" cs={stylesOverride.main}>
|
|
46
|
+
<Text as="p" typeLevel="body.large">
|
|
47
|
+
Control the panel externally
|
|
48
|
+
</Text>
|
|
49
|
+
<SecondaryButton
|
|
50
|
+
onClick={
|
|
51
|
+
model.state.transitionState === 'expanded' ? model.events.collapse : model.events.expand
|
|
52
|
+
}
|
|
53
|
+
aria-pressed={model.state.transitionState === 'expanded'}
|
|
54
|
+
>
|
|
55
|
+
{model.state.transitionState === 'expanded' ? 'Hide Side Panel' : 'Show Side Panel'}
|
|
56
|
+
</SecondaryButton>
|
|
57
|
+
</Flex>
|
|
58
|
+
</Flex>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import {SidePanel, useSidePanelModel} from '@workday/canvas-kit-react/side-panel';
|
|
5
|
+
import {Text} from '@workday/canvas-kit-react/text';
|
|
6
|
+
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
7
|
+
|
|
8
|
+
const stylesOverride = {
|
|
9
|
+
viewport: createStyles({
|
|
10
|
+
height: px2rem(320),
|
|
11
|
+
}),
|
|
12
|
+
main: createStyles({
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
flexDirection: 'column',
|
|
16
|
+
flex: 1,
|
|
17
|
+
flexBasis: 'auto',
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default () => {
|
|
22
|
+
const model = useSidePanelModel({
|
|
23
|
+
onStateTransition: state => {
|
|
24
|
+
console.log(`state is: ${state}`);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Flex cs={stylesOverride.viewport}>
|
|
30
|
+
<SidePanel model={model}>
|
|
31
|
+
<SidePanel.ToggleButton aria-label="Collapse View" />
|
|
32
|
+
<SidePanel.Heading hidden size="small">
|
|
33
|
+
Tasks Panel
|
|
34
|
+
</SidePanel.Heading>
|
|
35
|
+
</SidePanel>
|
|
36
|
+
<Flex as="main" cs={stylesOverride.main}>
|
|
37
|
+
<Text as="p" typeLevel="body.large">
|
|
38
|
+
Side Panel with a hidden title text.
|
|
39
|
+
</Text>
|
|
40
|
+
</Flex>
|
|
41
|
+
</Flex>
|
|
42
|
+
);
|
|
43
|
+
};
|