├── .editorconfig ├── .eslintignore ├── .eslintrc-prettier.js ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug.md │ ├── epic.md │ ├── feature.md │ ├── spike.md │ └── suggestion.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── canary.yml │ ├── close-related-issues.yml │ ├── dist-tag.yaml │ ├── enable-automerge.yml │ ├── forward-merge.yml │ ├── lint-pull-request.yml │ ├── new-issue.yml │ ├── project-automations.yml │ ├── pull-request.yml │ ├── release-major.yml │ ├── release-minor.yml │ ├── release.yml │ └── scorecard.yml ├── .gitignore ├── .npmrc ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .storybook ├── main.ts ├── manager-head.html ├── manager.js ├── mdx-code-block-rewrite.js ├── preview-head.html ├── preview.js ├── readme-panel │ ├── preset.js │ └── register.js ├── routes.js ├── style-transform-loader.js ├── symbol-doc-loader.js ├── theme.js ├── tsconfig.json ├── webpack-loader-redirect-mdx-to-github.js └── whole-source-loader.js ├── .vcmrc ├── .yarnrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── LICENSE ├── README.md ├── babel.config.js ├── cypress.config.ts ├── cypress ├── README.md ├── WHY_CYPRESS.md ├── component │ ├── ActionBar.spec.tsx │ ├── Autocomplete.spec.tsx │ ├── Avatar.spec.tsx │ ├── Banner.spec.tsx │ ├── Breadcrumbs.spec.tsx │ ├── Button.spec.tsx │ ├── Checkbox.spec.tsx │ ├── ColorPicker.spec.tsx │ ├── ComboboxLabs.spec.tsx │ ├── Dialog.spec.tsx │ ├── Examples.spec.tsx │ ├── ExpandableContainer.spec.tsx │ ├── FormField.spec.tsx │ ├── Hyperlink.spec.tsx │ ├── InformationHighlight.spec.tsx │ ├── Menu.spec.tsx │ ├── MenuPreview.tsx │ ├── Modal.spec.tsx │ ├── Pagination.spec.tsx │ ├── PillPreview.spec.tsx │ ├── Popup.spec.tsx │ ├── Radio.spec.tsx │ ├── RadioPreview.spec.tsx │ ├── SegmentedControl.spec.tsx │ ├── Select.spec.tsx │ ├── SelectPreview.spec.tsx │ ├── SidePanelPreview.spec.tsx │ ├── Switch.spec.tsx │ ├── Tabs.spec.tsx │ ├── TextArea.spec.tsx │ ├── TextAreaPreview.spec.tsx │ ├── TextInput.spec.tsx │ ├── TextInputPreview.spec.tsx │ ├── Toast.spec.tsx │ └── Tooltip.spec.tsx ├── fixtures │ └── example.json ├── helpers │ ├── index.ts │ ├── modal.ts │ ├── popup.ts │ └── selectPreview.ts ├── plugins │ └── index.js ├── support │ ├── commands.ts │ ├── component-index.html │ ├── component.ts │ ├── cypress-plugin-tab.d.ts │ ├── cypress-plugin-tab.js │ └── index.d.ts └── tsconfig.json ├── doc.config.json ├── jest.config.js ├── jest ├── setupTests.ts ├── testing-library__jest-dom.d.ts ├── verifyComponent.d.ts ├── verifyComponent.spec.tsx └── verifyComponent.tsx ├── lerna.json ├── modules ├── codemod │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── v11 │ │ │ ├── index.ts │ │ │ ├── renameHasErrorPreview.ts │ │ │ ├── replaceStylesIconProp.ts │ │ │ ├── spec │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── renameHasErrorPreview.spec.ts │ │ │ │ └── replaceStylesIconProp.spec.ts │ │ │ └── utils │ │ │ │ └── getImportRenameMap.ts │ │ ├── v12 │ │ │ ├── index.ts │ │ │ ├── promoteFormField.ts │ │ │ ├── renameFormFieldHorizontal.ts │ │ │ ├── spec │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── promoteFormField.spec.ts │ │ │ │ └── renameFormFieldHorizontal.spec.ts │ │ │ └── utils │ │ │ │ └── getImportRenameMap.ts │ │ ├── v13 │ │ │ ├── addPillLabel.ts │ │ │ ├── index.ts │ │ │ ├── promoteExpandable.ts │ │ │ ├── renameDubLogosImports.ts │ │ │ ├── renameDubLogosReferences.ts │ │ │ ├── spec │ │ │ │ ├── addPillLabel.spec.ts │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── promoteExpandable.spec.ts │ │ │ │ ├── renameDubLogosImports.spec.ts │ │ │ │ └── renameDubLogosReferences.spec.ts │ │ │ └── utils │ │ │ │ └── getImportRenameMap.ts │ │ ├── v5 │ │ │ ├── compoundCard.ts │ │ │ ├── getImportRenameMap.ts │ │ │ ├── index.ts │ │ │ ├── mapTypeTokensToNewHierarchy.ts │ │ │ ├── maps.ts │ │ │ ├── moveInputProvider.ts │ │ │ ├── recategorizeButtons.ts │ │ │ ├── removeButtonEnums.ts │ │ │ ├── removeDefaultImports.ts │ │ │ ├── renameButtonRefs.ts │ │ │ ├── renameCoreImports.ts │ │ │ ├── renameInputRefs.ts │ │ │ ├── renamePreviewTokenImports.ts │ │ │ ├── renameSpacing.ts │ │ │ ├── slashImports.ts │ │ │ └── spec │ │ │ │ ├── compoundCard.spec.ts │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── mapTypeTokensToNewHierarchy.spec.ts │ │ │ │ ├── moveInputProvider.spec.ts │ │ │ │ ├── recategorizeButtons.spec.ts │ │ │ │ ├── removeButtonEnums.spec.ts │ │ │ │ ├── removeDefaultImports.spec.ts │ │ │ │ ├── renameButtonRefs.spec.ts │ │ │ │ ├── renameCoreImports.spec.ts │ │ │ │ ├── renameInputRefs.spec.ts │ │ │ │ ├── renamePreviewTokenImports.spec.ts │ │ │ │ ├── renameSpacing.spec.ts │ │ │ │ ├── slashImport.spec.ts │ │ │ │ └── tsconfig.json │ │ ├── v6 │ │ │ ├── deprecateCookieBanner.ts │ │ │ ├── deprecateHeader.ts │ │ │ ├── deprecatePageHeader.ts │ │ │ ├── index.ts │ │ │ ├── moveAndRenameSearchBar.ts │ │ │ ├── renameCanvasDepthValue.ts │ │ │ ├── spec │ │ │ │ ├── deprecateCookieBanner.spec.ts │ │ │ │ ├── deprecateHeader.spec.ts │ │ │ │ ├── deprecatePageHeader.spec.ts │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── moveAndRenameSearchBar.spec.ts │ │ │ │ └── renameCanvasDepthValue.spec.ts │ │ │ └── utils │ │ │ │ └── index.ts │ │ ├── v7 │ │ │ ├── compoundActionBar.ts │ │ │ ├── compoundBanner.ts │ │ │ ├── index.ts │ │ │ ├── recategorizeIconButtons.ts │ │ │ ├── removePropFromPopper.ts │ │ │ ├── renameIconPosition.ts │ │ │ ├── renameIconRef.ts │ │ │ ├── renameLayoutImports.ts │ │ │ ├── spec │ │ │ │ ├── compoundActionBar.spec.ts │ │ │ │ ├── compoundBanner.spec.ts │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── recategorizeIconButtons.spec.ts │ │ │ │ ├── removePropFromPopper.spec.ts │ │ │ │ ├── renameIconPosition.spec.ts │ │ │ │ ├── renameIconRef.spec.ts │ │ │ │ ├── renameLayoutImports.spec.ts │ │ │ │ ├── updateDisclosureShowHide.spec.ts │ │ │ │ ├── updateModelSignatures.spec.ts │ │ │ │ ├── updateSegmentedControl.spec.ts │ │ │ │ └── updateTabs.spec.ts │ │ │ ├── updateDisclosureShowHide.ts │ │ │ ├── updateModelSignatures.ts │ │ │ ├── updateSegmentedControl.ts │ │ │ ├── updateTabs.ts │ │ │ └── utils │ │ │ │ ├── getImportRenameMap.ts │ │ │ │ └── hasImportSpecifiers.ts │ │ ├── v8 │ │ │ ├── index.ts │ │ │ ├── promoteBreadcrumbs.ts │ │ │ ├── promoteComponentsToTesting.ts │ │ │ ├── refactorActionBarOverflowButton.ts │ │ │ ├── removeDefaultImports.ts │ │ │ ├── renameLoadingAnimation.ts │ │ │ ├── restructureBreadcrumbs.ts │ │ │ ├── softDeprecateDrawer.ts │ │ │ ├── softDeprecateLayout.ts │ │ │ ├── softDeprecatePreviewMenu.ts │ │ │ └── spec │ │ │ │ ├── expectTransformFactory.ts │ │ │ │ ├── promoteBreadcrumbs.spec.ts │ │ │ │ ├── promoteComponentsToTesting.spec.ts │ │ │ │ ├── refactorActionBarOverflowButton.spec.ts │ │ │ │ ├── removeDefaultImports.spec.ts │ │ │ │ ├── renameLoadingAnimation.spec.ts │ │ │ │ ├── restructureBreadcrumbs.spec.ts │ │ │ │ ├── softDeprecateDrawer.spec.ts │ │ │ │ ├── softDeprecateLayout.spec.ts │ │ │ │ └── softDeprecatePreviewMenu.spec.ts │ │ └── v9 │ │ │ ├── compoundToast.ts │ │ │ ├── deprecateStack.ts │ │ │ ├── index.ts │ │ │ ├── promoteToast.ts │ │ │ ├── promoteUseThemedRing.ts │ │ │ └── spec │ │ │ ├── compoundToast.spec.ts │ │ │ ├── deprecateStack.spec.ts │ │ │ ├── expectTransformFactory.ts │ │ │ ├── promoteToast.spec.ts │ │ │ └── promoteUseThemedRing.spec.ts │ ├── package.json │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── css │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ └── package.json ├── docs │ ├── README.md │ ├── docgen │ │ ├── createDocProgram.js │ │ ├── createTraversals.ts │ │ ├── docParser.ts │ │ ├── docTypes.ts │ │ ├── fixtures │ │ │ ├── importedFrom.ts │ │ │ ├── primitives.ts │ │ │ └── useBaseModel.ts │ │ ├── getExternalSymbol.ts │ │ ├── plugins │ │ │ ├── componentParser.ts │ │ │ ├── customTypes.ts │ │ │ ├── enhancedComponentParser.ts │ │ │ └── modelParser.ts │ │ ├── spec │ │ │ ├── componentParser.spec.ts │ │ │ ├── createProgramFromSource.ts │ │ │ ├── docParser.spec.ts │ │ │ ├── enhancedComponentParser.spec.ts │ │ │ ├── modelParser.spec.ts │ │ │ └── tsconfig.json │ │ ├── traversals.ts │ │ └── traverse.ts │ ├── index.ts │ ├── lib │ │ ├── DescriptionTooltip.tsx │ │ ├── ExampleCodeBlock.tsx │ │ ├── MDXElements.tsx │ │ ├── MoreTooltip.tsx │ │ ├── Specifications.tsx │ │ ├── StylePropsTable.tsx │ │ ├── SymbolDoc.tsx │ │ ├── Table.tsx │ │ ├── Value.tsx │ │ ├── docs.ts │ │ ├── specs.ts │ │ ├── stackblitzFiles │ │ │ ├── .eslintrc.cjs.txt │ │ │ ├── App.tsx │ │ │ ├── Demo.tsx │ │ │ ├── index.html │ │ │ ├── main.tsx │ │ │ ├── packageJSONFile.ts │ │ │ ├── tsconfig.json │ │ │ ├── tsconfig.node.json │ │ │ ├── types │ │ │ │ └── custom-imports.d.ts │ │ │ ├── vite-env.d.ts │ │ │ └── vite.config.ts │ │ ├── widgetUtils.tsx │ │ └── widgets │ │ │ ├── array.tsx │ │ │ ├── callExpression.tsx │ │ │ ├── canvasColor.tsx │ │ │ ├── component.tsx │ │ │ ├── conditional.tsx │ │ │ ├── enhancedComponent.tsx │ │ │ ├── external.tsx │ │ │ ├── function.tsx │ │ │ ├── index.ts │ │ │ ├── intersection.tsx │ │ │ ├── model.tsx │ │ │ ├── object.tsx │ │ │ ├── parenthesis.tsx │ │ │ ├── primitives.tsx │ │ │ ├── qualifiedName.tsx │ │ │ ├── symbol.tsx │ │ │ ├── tuple.tsx │ │ │ ├── typeParameter.tsx │ │ │ └── union.tsx │ ├── mdx │ │ ├── 10.0-UPGRADE-GUIDE.mdx │ │ ├── 11.0-UPGRADE-GUIDE.mdx │ │ ├── 12.0-UPGRADE-GUIDE.mdx │ │ ├── 13.0-UPGRADE-GUIDE.mdx │ │ ├── 4.0-UPGRADE-GUIDE.mdx │ │ ├── 5.0-UPGRADE-GUIDE.mdx │ │ ├── 6.0-UPGRADE-GUIDE.mdx │ │ ├── 7.0-UPGRADE-GUIDE.mdx │ │ ├── 8.0-UPGRADE-GUIDE.mdx │ │ ├── 9.0-UPGRADE-GUIDE.mdx │ │ ├── API_PATTERN_GUIDELINES.mdx │ │ ├── CK-banner-temp.jpg │ │ ├── CODEMODS.mdx │ │ ├── COMPOUND_COMPONENTS.mdx │ │ ├── CONTRIBUTING.mdx │ │ ├── CREATING_COMPOUND_COMPONENTS.mdx │ │ ├── DOCUMENTATION_GUIDELINES.mdx │ │ ├── GETTING_STARTED.mdx │ │ ├── MAINTAINING.mdx │ │ ├── TESTING.mdx │ │ ├── Versions.mdx │ │ ├── changelog.mdx │ │ ├── installBlock.tsx │ │ ├── style-props │ │ │ ├── STYLE_PROPS.mdx │ │ │ └── examples │ │ │ │ ├── Background.tsx │ │ │ │ ├── Border.tsx │ │ │ │ ├── Color.tsx │ │ │ │ ├── Depth.tsx │ │ │ │ ├── Flex.tsx │ │ │ │ ├── FlexItem.tsx │ │ │ │ ├── Grid.tsx │ │ │ │ ├── GridItem.tsx │ │ │ │ ├── Layout.tsx │ │ │ │ ├── Other.tsx │ │ │ │ ├── Position.tsx │ │ │ │ ├── Space.tsx │ │ │ │ └── Text.tsx │ │ ├── versionsTable.tsx │ │ ├── welcome.mdx │ │ └── welcomePage.tsx │ ├── package.json │ ├── tsconfig.es6.json │ ├── tsconfig.json │ ├── utils │ │ ├── build-docs.js │ │ ├── build-mdx.js │ │ ├── build-specifications.js │ │ ├── get-component-prop-map.js │ │ └── get-specifications.js │ └── webpack │ │ ├── extract-exports.js │ │ └── inject-module-name-loader.js ├── labs-css │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ └── package.json ├── labs-react │ ├── LICENSE │ ├── README.md │ ├── combobox │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── AutocompleteList.tsx │ │ │ ├── Combobox.tsx │ │ │ └── Status.tsx │ │ ├── spec │ │ │ ├── Combobox.spec.tsx │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Combobox.mdx │ │ │ ├── Combobox.stories.tsx │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── DisabledItem.tsx │ │ │ ├── GroupOfResult.tsx │ │ │ ├── Grow.tsx │ │ │ ├── NoClearButton.tsx │ │ │ └── RTL.tsx │ │ │ └── tsconfig.json │ ├── common │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── theming │ │ │ │ ├── index.ts │ │ │ │ └── useThemeRTL.ts │ │ └── spec │ │ │ ├── tsconfig.json │ │ │ └── useThemeRTL.spec.ts │ ├── index.ts │ ├── package.json │ ├── search-form │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── SearchForm.tsx │ │ │ └── themes.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── SearchForm.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── SearchForm.mdx │ │ │ ├── SearchForm.stories.ts │ │ │ └── examples │ │ │ ├── Basic.tsx │ │ │ ├── CustomTheme.tsx │ │ │ ├── Grow.tsx │ │ │ ├── RTL.tsx │ │ │ └── Theming.tsx │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── popup-stack │ ├── LICENSE │ ├── README.md │ ├── index.ts │ ├── lib │ │ └── PopupStack.ts │ ├── package.json │ ├── spec │ │ ├── PopupStack.spec.ts │ │ └── tsconfig.json │ ├── stories │ │ └── stories.tsx │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── preview-css │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ └── package.json ├── preview-react │ ├── LICENSE │ ├── README.md │ ├── _examples │ │ └── stories │ │ │ └── mdx │ │ │ ├── FormLibraryExample.mdx │ │ │ ├── FormLibraryExample.stories.ts │ │ │ └── examples │ │ │ ├── TextInputWithFormik.tsx │ │ │ └── TextInputWithReactHookForm.tsx │ ├── color-picker │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── ColorPicker.tsx │ │ │ └── parts │ │ │ │ ├── ColorReset.tsx │ │ │ │ └── SwatchBook.tsx │ │ ├── spec │ │ │ ├── ColorPicker.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── ColorPicker.stories.tsx │ │ │ ├── examples │ │ │ ├── ColorInputPopup.tsx │ │ │ ├── IconButtonPopup.tsx │ │ │ └── InputInteraction.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── ColorPicker.stories.tsx │ ├── divider │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── Divider.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Divider.stories.mdx │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ └── CustomSpace.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── stories_Divider.tsx │ ├── index.ts │ ├── information-highlight │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── InformationHighlight.tsx │ │ │ ├── hooks │ │ │ │ └── useInformationHighlightModel.ts │ │ │ └── parts │ │ │ │ ├── Body.tsx │ │ │ │ ├── Heading.tsx │ │ │ │ ├── Icon.tsx │ │ │ │ └── Link.tsx │ │ ├── spec │ │ │ └── InformationHighlight.spec.tsx │ │ └── stories │ │ │ ├── InformationHighlight.mdx │ │ │ ├── InformationHighlight.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Body.tsx │ │ │ ├── Caution.tsx │ │ │ ├── Critical.tsx │ │ │ ├── CustomIconCritical.tsx │ │ │ ├── Heading.tsx │ │ │ ├── Informational.tsx │ │ │ └── RTL.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual_testing │ │ │ └── testing.stories.tsx │ ├── loading-sparkles │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── LoadingSparkles.tsx │ │ │ └── sparkleIcon.ts │ │ ├── spec │ │ │ ├── LoadingSparkles.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── LoadingSparkles.mdx │ │ │ ├── LoadingSparkles.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ └── RTL.tsx │ │ │ └── tsconfig.json │ ├── menu │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Menu.tsx │ │ │ └── MenuItem.tsx │ │ ├── spec │ │ │ ├── Menu.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Menu.mdx │ │ │ ├── Menu.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── ContextMenu.tsx │ │ │ ├── CustomMenuItem.tsx │ │ │ ├── Headers.tsx │ │ │ ├── Icons.tsx │ │ │ └── ManyItems.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── multi-select │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── MultiSelect.tsx │ │ │ ├── MultiSelectCard.tsx │ │ │ ├── MultiSelectInput.tsx │ │ │ ├── MultiSelectItem.tsx │ │ │ ├── MultiSelectedItem.tsx │ │ │ ├── MultiSelectedList.tsx │ │ │ ├── useMultiSelectItemRemove.ts │ │ │ └── useMultiSelectModel.ts │ │ ├── spec │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── MultiSelect.mdx │ │ │ ├── MultiSelect.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Complex.tsx │ │ │ ├── Controlled.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Icons.tsx │ │ │ └── Searching.tsx │ │ │ ├── tsconfig.json │ │ │ └── visualTesting.stories.tsx │ ├── package.json │ ├── pill │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Pill.tsx │ │ │ ├── PillAvatar.tsx │ │ │ ├── PillCount.tsx │ │ │ ├── PillIcon.tsx │ │ │ ├── PillIconButton.tsx │ │ │ ├── PillLabel.tsx │ │ │ └── usePillModel.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Pill.mdx │ │ │ ├── Pill.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CustomStyles.tsx │ │ │ ├── WithAvatar.tsx │ │ │ ├── WithCount.tsx │ │ │ ├── WithList.tsx │ │ │ ├── WithReadOnly.tsx │ │ │ ├── WithRemovable.tsx │ │ │ └── test-avatar.png │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── radio │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── RadioButton.tsx │ │ │ ├── RadioGroup.tsx │ │ │ ├── RadioInput.tsx │ │ │ ├── RadioLabel.tsx │ │ │ ├── RadioText.tsx │ │ │ ├── StyledRadioButton.tsx │ │ │ └── hooks │ │ │ │ └── useRadioModel.tsx │ │ ├── spec │ │ │ ├── RadioGroup.spec.tsx │ │ │ ├── RadioInput.spec.tsx │ │ │ ├── RadioLabel.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Radio.mdx │ │ │ ├── Radio.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Custom.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Inverse.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── NoValue.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ └── StandaloneRadio.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── segmented-control │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── SegmentedControl.tsx │ │ │ ├── SegmentedControlItem.tsx │ │ │ ├── SegmentedControlList.tsx │ │ │ └── hooks │ │ │ │ ├── useSegmentedControlItem.tsx │ │ │ │ └── useSegmentedControlModel.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── SegmentedControl.mdx │ │ │ ├── SegmentedControl.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Dynamic.tsx │ │ │ ├── RTL.tsx │ │ │ ├── Sizes.tsx │ │ │ ├── TextAndIcon.tsx │ │ │ ├── TextOnly.tsx │ │ │ └── Vertical.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── select │ │ ├── LICENSE │ │ ├── README.MD │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Select.tsx │ │ │ ├── SelectBase.tsx │ │ │ ├── SelectMenu.tsx │ │ │ ├── SelectOption.tsx │ │ │ ├── scrolling.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── Select.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Select.mdx │ │ │ ├── Select.stories.ts │ │ │ ├── examples │ │ │ ├── Left Label │ │ │ │ ├── AlertLeft.tsx │ │ │ │ ├── DefaultLeft.tsx │ │ │ │ ├── DefaultWithCustomOptionsLeft.tsx │ │ │ │ ├── DefaultWithSimpleOptionsLeft.tsx │ │ │ │ ├── DisabledLeft.tsx │ │ │ │ ├── ErrorLeft.tsx │ │ │ │ ├── GrowLeft.tsx │ │ │ │ ├── ScrollableLeft.tsx │ │ │ │ └── index.ts │ │ │ ├── Top Label │ │ │ │ ├── Alert.tsx │ │ │ │ ├── Default.tsx │ │ │ │ ├── DefaultWithCustomOptions.tsx │ │ │ │ ├── DefaultWithSimpleOptions.tsx │ │ │ │ ├── Disabled.tsx │ │ │ │ ├── Error.tsx │ │ │ │ ├── Grow.tsx │ │ │ │ ├── Scrollable.tsx │ │ │ │ └── index.ts │ │ │ └── storiesData.tsx │ │ │ ├── stories_CypressTesting.tsx │ │ │ ├── stories_VisualTesting.tsx │ │ │ └── tsconfig.json │ ├── side-panel │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── SidePanel.tsx │ │ │ ├── SidePanelToggleButton.tsx │ │ │ └── hooks.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── SidePanel.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── SidePanel.mdx │ │ │ ├── SidePanel.stories.ts │ │ │ ├── examples │ │ │ ├── AlwaysOpen.tsx │ │ │ ├── Basic.tsx │ │ │ ├── ExternalControl.tsx │ │ │ ├── HiddenName.tsx │ │ │ ├── OnExpandedChange.tsx │ │ │ ├── OnStateTransition.tsx │ │ │ ├── RightOrigin.tsx │ │ │ ├── Variant.tsx │ │ │ └── useDirection.ts │ │ │ ├── testingCypress.stories.tsx │ │ │ ├── testingVisual.stories.tsx │ │ │ └── tsconfig.json │ ├── status-indicator │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── StatusIndicator.tsx │ │ │ ├── StatusIndicatorIcon.tsx │ │ │ └── StatusIndicatorLabel.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── StatusIndicator.mdx │ │ │ ├── StatusIndicator.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Emphasis.tsx │ │ │ ├── Icon.tsx │ │ │ ├── Overflow.tsx │ │ │ └── Variants.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── testing.stories.tsx │ ├── text-area │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── TextArea.tsx │ │ │ └── TextAreaField.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── TextArea.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── TextArea.mdx │ │ │ ├── TextArea.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Grow.tsx │ │ │ ├── HiddenLabel.tsx │ │ │ ├── LabelPositionHorizontal.tsx │ │ │ ├── LabelPositionVertical.tsx │ │ │ ├── Placeholder.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ └── ResizeConstraints.tsx │ │ │ └── tsconfig.json │ ├── text-input │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── TextInput.tsx │ │ │ ├── TextInputField.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useTextInputField.tsx │ │ │ │ └── useTextInputModel.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── TextInput.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── TextInput.mdx │ │ │ ├── TextInput.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Grow.tsx │ │ │ ├── Hidden.tsx │ │ │ ├── HiddenLabel.tsx │ │ │ ├── LabelPositionHorizontal.tsx │ │ │ ├── LabelPositionVertical.tsx │ │ │ ├── Password.tsx │ │ │ ├── Placeholder.tsx │ │ │ ├── ReadOnly.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ ├── ThemedAlert.tsx │ │ │ └── ThemedError.tsx │ │ │ └── tsconfig.json │ ├── tokens │ │ └── stories │ │ │ └── tsconfig.json │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── react-fonts │ ├── LICENSE │ ├── README.md │ ├── index.ts │ ├── lib │ │ └── fonts.ts │ ├── package.json │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── react │ ├── LICENSE │ ├── README.md │ ├── _examples │ │ └── stories │ │ │ ├── GlobalHeader.stories.mdx │ │ │ ├── Tooltips.stories.mdx │ │ │ ├── examples │ │ │ └── Tooltips │ │ │ │ └── ListOfUploadedFiles.tsx │ │ │ └── mdx │ │ │ ├── AriaLiveRegions.mdx │ │ │ ├── CompoundComponent.mdx │ │ │ ├── CookieBanner.mdx │ │ │ ├── Density.mdx │ │ │ ├── FormsWithFormik.mdx │ │ │ ├── Headers.mdx │ │ │ ├── Layouts.mdx │ │ │ ├── MediaModal.mdx │ │ │ ├── SearchForm.mdx │ │ │ ├── SidePanel.mdx │ │ │ ├── TablesAdvanced.mdx │ │ │ └── examples │ │ │ ├── AriaLiveRegions │ │ │ ├── FilterListWithLiveStatus.tsx │ │ │ ├── HiddenLiveRegion.tsx │ │ │ ├── IconButtonsWithLiveBadges.tsx │ │ │ ├── TextInputWithLiveError.tsx │ │ │ └── VisibleLiveRegion.tsx │ │ │ ├── CookieBanner.tsx │ │ │ ├── Density.tsx │ │ │ ├── GlobalHeader.tsx │ │ │ ├── MediaModal.tsx │ │ │ ├── PageHeader.tsx │ │ │ ├── SearchFormBasic.tsx │ │ │ ├── SegmentControlWithText.tsx │ │ │ ├── SelectWithFormik.tsx │ │ │ ├── SidePanelWithNavigation.tsx │ │ │ ├── SidePanelWithOverlay.tsx │ │ │ ├── Table │ │ │ ├── WithExpandableRows.tsx │ │ │ ├── WithSelectableRows.tsx │ │ │ └── WithSortableColumnHeaders.tsx │ │ │ ├── common │ │ │ ├── FilterListWithLiveStatus.tsx │ │ │ ├── HiddenLiveRegion.tsx │ │ │ ├── IconButtonsWithLiveBadges.tsx │ │ │ ├── TextInputWithLiveError.tsx │ │ │ └── VisibleLiveRegion.tsx │ │ │ ├── compoundComponent │ │ │ └── CustomCard.tsx │ │ │ └── layout │ │ │ ├── AreaColumnPositioning.tsx │ │ │ ├── CustomColumnPositioning.tsx │ │ │ ├── CustomColumnWidth.tsx │ │ │ ├── FullWidthWith3Columns.tsx │ │ │ ├── FullWidthWith3Columns2Rows.tsx │ │ │ ├── Masonry.tsx │ │ │ ├── ResponsiveColumns.tsx │ │ │ ├── Tiled2and3Columns.tsx │ │ │ └── Tiled4and2Columns.tsx │ ├── action-bar │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── ActionBar.tsx │ │ │ ├── ActionBarItem.tsx │ │ │ ├── ActionBarList.tsx │ │ │ ├── ActionBarOverflowButton.tsx │ │ │ └── useActionBarModel.tsx │ │ ├── spec │ │ │ ├── ActionBar.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── ActionBar.mdx │ │ │ ├── ActionBar.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── DeleteAction.tsx │ │ │ ├── Icons.tsx │ │ │ ├── OverflowActionBar.tsx │ │ │ ├── OverflowActionBarCustomButtonCount.tsx │ │ │ └── index.ts │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── testing.stories.tsx │ ├── avatar │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── Avatar.tsx │ │ ├── spec │ │ │ ├── Avatar.spec.tsx │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── avatar │ │ │ ├── Avatar.mdx │ │ │ ├── Avatar.stories.tsx │ │ │ └── examples │ │ │ │ ├── Basic.tsx │ │ │ │ ├── Button.tsx │ │ │ │ ├── CustomStyles.tsx │ │ │ │ ├── Image.tsx │ │ │ │ ├── LazyLoad.tsx │ │ │ │ ├── ObjectFit.tsx │ │ │ │ ├── Size.tsx │ │ │ │ ├── Variant.tsx │ │ │ │ └── test-avatar.png │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── stories_visualTesting.tsx │ ├── badge │ │ ├── LICENSE │ │ ├── README.md │ │ ├── eslintrc.js │ │ ├── index.ts │ │ ├── lib │ │ │ └── CountBadge.tsx │ │ ├── spec │ │ │ ├── CountBadge.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── CountBadge.mdx │ │ │ ├── CountBadge.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CustomLimit.tsx │ │ │ └── NotificationBadge.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── banner │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Banner.tsx │ │ │ ├── BannerActionText.tsx │ │ │ ├── BannerIcon.tsx │ │ │ ├── BannerLabel.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useBannerActionText.tsx │ │ │ │ ├── useBannerIcon.tsx │ │ │ │ ├── useBannerLabel.tsx │ │ │ │ ├── useBannerModel.tsx │ │ │ │ └── useThemedPalette.ts │ │ ├── spec │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Banner.mdx │ │ │ ├── Banner.stories.ts │ │ │ ├── examples │ │ │ ├── ActionText.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Error.tsx │ │ │ ├── IconBanner.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Sticky.tsx │ │ │ ├── StickyAnimation.tsx │ │ │ ├── StickyRTL.tsx │ │ │ ├── ThemedAlert.tsx │ │ │ └── ThemedError.tsx │ │ │ └── tsconfig.json │ ├── breadcrumbs │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Breadcrumbs.tsx │ │ │ ├── BreadcrumbsCurrentItem.tsx │ │ │ ├── BreadcrumbsItem.tsx │ │ │ ├── BreadcrumbsLink.tsx │ │ │ ├── BreadcrumbsList.tsx │ │ │ ├── BreadcrumbsMenu.tsx │ │ │ ├── BreadcrumbsOverflowButton.tsx │ │ │ └── hooks │ │ │ │ ├── useBreadcrumbsModel.tsx │ │ │ │ └── utils │ │ │ │ └── index.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Breadcrumbs.mdx │ │ │ ├── Breadcrumbs.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CurrentItemTruncation.tsx │ │ │ ├── LinkTruncation.tsx │ │ │ ├── Overflow.tsx │ │ │ └── RTL.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── button │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── BaseButton.tsx │ │ │ ├── Button.tsx │ │ │ ├── DeleteButton.tsx │ │ │ ├── ExternalHyperlink.tsx │ │ │ ├── Hyperlink.tsx │ │ │ ├── PrimaryButton.tsx │ │ │ ├── SecondaryButton.tsx │ │ │ ├── TertiaryButton.tsx │ │ │ ├── ToolbarDropdownButton.tsx │ │ │ ├── ToolbarIconButton.tsx │ │ │ ├── deprecated_Button.tsx │ │ │ ├── parts │ │ │ │ ├── ButtonLabel.tsx │ │ │ │ ├── ButtonLabelIcon.tsx │ │ │ │ └── index.tsx │ │ │ └── types.ts │ │ ├── spec │ │ │ ├── Button.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── ToolbarButtons.stories.tsx │ │ │ ├── button │ │ │ ├── Button.mdx │ │ │ ├── Button.stories.tsx │ │ │ ├── Hyperlink.mdx │ │ │ ├── Hyperlink.stories.tsx │ │ │ └── examples │ │ │ │ ├── CustomStyles.tsx │ │ │ │ ├── Delete.tsx │ │ │ │ ├── ExternalHyperlink.tsx │ │ │ │ ├── ExternalHyperlinkInverse.tsx │ │ │ │ ├── Grow.tsx │ │ │ │ ├── Hyperlink.tsx │ │ │ │ ├── HyperlinkInverse.tsx │ │ │ │ ├── Primary.tsx │ │ │ │ ├── PrimaryInverse.tsx │ │ │ │ ├── Secondary.tsx │ │ │ │ ├── SecondaryInverse.tsx │ │ │ │ ├── Tertiary.tsx │ │ │ │ ├── TertiaryInverse.tsx │ │ │ │ └── ThemeOverrides.tsx │ │ │ ├── deprecatedButton.stories.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ ├── DeleteButton.stories.tsx │ │ │ ├── ExternalHyperlink.stories.tsx │ │ │ ├── Hyperlink.stories.tsx │ │ │ ├── PrimaryButton.stories.tsx │ │ │ ├── SecondaryButton.stories.tsx │ │ │ ├── TertiaryButton.stories.tsx │ │ │ ├── ToolbarDropdownButton.stories.tsx │ │ │ ├── ToolbarIconButton.stories.tsx │ │ │ ├── deprecatedButton.stories.tsx │ │ │ ├── stories_ButtonGrow.tsx │ │ │ ├── stories_ColorsOverride.tsx │ │ │ └── utils.tsx │ ├── card │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Card.tsx │ │ │ ├── CardBody.tsx │ │ │ └── CardHeading.tsx │ │ ├── spec │ │ │ ├── Card.spec.tsx │ │ │ ├── CardBody.spec.tsx │ │ │ ├── CardHeading.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── card.mdx │ │ │ ├── card.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CustomStyles.tsx │ │ │ └── Stencils.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── testing.stories.tsx │ ├── checkbox │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── CheckBackground.tsx │ │ │ ├── Checkbox.tsx │ │ │ ├── CheckboxCheck.tsx │ │ │ ├── CheckboxContainer.tsx │ │ │ ├── CheckboxInput.tsx │ │ │ └── CheckboxRipple.tsx │ │ ├── spec │ │ │ ├── Checkbox.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Checkbox.mdx │ │ │ ├── Checkbox.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Indeterminate.tsx │ │ │ ├── Inverse.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── RefForwarding.tsx │ │ │ └── Required.tsx │ │ │ └── visualTesting.stories.tsx │ ├── collection │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── ListBox.tsx │ │ │ ├── focusOnCurrentCursor.ts │ │ │ ├── keyUtils.ts │ │ │ ├── listItemRemove.ts │ │ │ ├── useBaseListModel.tsx │ │ │ ├── useCursorListModel.tsx │ │ │ ├── useGridModel.ts │ │ │ ├── useListActiveDescendant.ts │ │ │ ├── useListItemActiveDescendant.ts │ │ │ ├── useListItemAllowChildStrings.ts │ │ │ ├── useListItemRegister.tsx │ │ │ ├── useListItemRemoveOnDeleteKey.tsx │ │ │ ├── useListItemRemoveable.ts │ │ │ ├── useListItemRovingFocus.tsx │ │ │ ├── useListItemSelect.tsx │ │ │ ├── useListKeyboardHandler.ts │ │ │ ├── useListLoader.ts │ │ │ ├── useListModel.tsx │ │ │ ├── useListRenderItem.tsx │ │ │ ├── useListResetCursorOnBlur.tsx │ │ │ ├── useOverflowListItemMeasure.tsx │ │ │ ├── useOverflowListMeasure.ts │ │ │ ├── useOverflowListModel.tsx │ │ │ ├── useOverflowListTarget.tsx │ │ │ └── useSelectionListModel.tsx │ │ ├── spec │ │ │ ├── tsconfig.json │ │ │ ├── useCursorModel.spec.tsx │ │ │ ├── useListItemAllowChildStrings.spec.tsx │ │ │ ├── useListLoader.spec.ts │ │ │ └── useOverflowModel.spec.tsx │ │ └── stories │ │ │ ├── mdx │ │ │ ├── Collection.mdx │ │ │ └── examples │ │ │ │ ├── Basic.tsx │ │ │ │ ├── BasicGrid.tsx │ │ │ │ ├── BasicVirtual.tsx │ │ │ │ ├── DataLoader.tsx │ │ │ │ ├── DynamicItemsObjects.tsx │ │ │ │ ├── DynamicItemsStrings.tsx │ │ │ │ ├── IdentifiedItems.tsx │ │ │ │ ├── MultiSelection.tsx │ │ │ │ ├── OverflowVerticalList.tsx │ │ │ │ ├── RovingFocus.tsx │ │ │ │ ├── Selection.tsx │ │ │ │ ├── StringChildren.tsx │ │ │ │ ├── Virtualization.tsx │ │ │ │ └── WrappingGrid.tsx │ │ │ └── tsconfig.json │ ├── color-picker │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── ColorInput.tsx │ │ │ ├── ColorPreview.tsx │ │ │ └── parts │ │ │ │ └── ColorSwatch.tsx │ │ ├── spec │ │ │ ├── ColorInput.spec.tsx │ │ │ ├── ColorPreview.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── color-input │ │ │ ├── ColorInput.mdx │ │ │ ├── ColorInput.stories.ts │ │ │ └── examples │ │ │ │ ├── Alert.tsx │ │ │ │ ├── Basic.tsx │ │ │ │ ├── Checked.tsx │ │ │ │ ├── Disabled.tsx │ │ │ │ ├── Error.tsx │ │ │ │ ├── Grow.tsx │ │ │ │ ├── LabelPosition.tsx │ │ │ │ ├── RefForwarding.tsx │ │ │ │ ├── Required.tsx │ │ │ │ └── ValidColorChange.tsx │ │ │ ├── color-preview │ │ │ ├── ColorPreview.mdx │ │ │ ├── ColorPreview.stories.ts │ │ │ └── examples │ │ │ │ ├── Basic.tsx │ │ │ │ ├── LabelPosition.tsx │ │ │ │ └── RefForwarding.tsx │ │ │ └── visualTesting.stories.tsx │ ├── combobox │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Combobox.tsx │ │ │ ├── ComboboxCard.tsx │ │ │ ├── ComboboxInput.tsx │ │ │ ├── ComboboxMenu.tsx │ │ │ ├── ComboboxMenuItem.tsx │ │ │ ├── ComboboxMenuList.tsx │ │ │ ├── ComboboxPopper.tsx │ │ │ └── hooks │ │ │ │ ├── useComboboxInput.ts │ │ │ │ ├── useComboboxInputArbitrary.ts │ │ │ │ ├── useComboboxInputConstrained.ts │ │ │ │ ├── useComboboxInputOpenWithArrowKeys.ts │ │ │ │ ├── useComboboxKeyboardTypeAhead.ts │ │ │ │ ├── useComboboxListKeyboardHandler.ts │ │ │ │ ├── useComboboxLoader.ts │ │ │ │ ├── useComboboxModel.tsx │ │ │ │ ├── useComboboxMoveCursorToSelected.tsx │ │ │ │ ├── useComboboxResetCursorToSelected.tsx │ │ │ │ └── useSetPopupWidth.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Combobox.mdx │ │ │ ├── Combobox.stories.ts │ │ │ ├── examples │ │ │ └── Autocomplete.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── testing.stories.tsx │ ├── common │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── AccessibleHide.tsx │ │ │ ├── AriaLiveRegion.tsx │ │ │ ├── CanvasProvider.tsx │ │ │ ├── EllipsisText.tsx │ │ │ ├── InputProvider.tsx │ │ │ ├── genericStyles.ts │ │ │ ├── parts │ │ │ │ ├── _brand-assets.ts │ │ │ │ └── index.ts │ │ │ ├── responsive │ │ │ │ └── useResponsiveContainerStyles.ts │ │ │ ├── styles │ │ │ │ ├── errorRing.ts │ │ │ │ ├── focusRing.ts │ │ │ │ ├── hideMouseFocus.ts │ │ │ │ └── index.ts │ │ │ ├── theming │ │ │ │ ├── README.md │ │ │ │ ├── breakpoints.ts │ │ │ │ ├── createCanvasTheme.ts │ │ │ │ ├── getObjectProxy.ts │ │ │ │ ├── index.ts │ │ │ │ ├── styled.ts │ │ │ │ ├── theme.ts │ │ │ │ ├── types.ts │ │ │ │ ├── useIsRTL.ts │ │ │ │ ├── useTheme.ts │ │ │ │ └── useThemedRing.ts │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ ├── assert.ts │ │ │ │ ├── changeFocus.ts │ │ │ │ ├── colorUtils.ts │ │ │ │ ├── components.ts │ │ │ │ ├── deepMerge.ts │ │ │ │ ├── dispatchInputEvent.ts │ │ │ │ ├── elements.ts │ │ │ │ ├── getTranslateFromOrigin.ts │ │ │ │ ├── index.ts │ │ │ │ ├── isWithinBreakpoint.ts │ │ │ │ ├── makeMq.ts │ │ │ │ ├── memoize.ts │ │ │ │ ├── mergeCallback.ts │ │ │ │ ├── mergeProps.ts │ │ │ │ ├── models.ts │ │ │ │ ├── slugify.ts │ │ │ │ ├── useConstant.ts │ │ │ │ ├── useIsFullscreen.ts │ │ │ │ ├── useModalityType.ts │ │ │ │ ├── useMount.ts │ │ │ │ ├── useResizeObserver.ts │ │ │ │ ├── useUniqueId.ts │ │ │ │ └── useWindowSize.ts │ │ ├── spec │ │ │ ├── AccessibleHide.spec.tsx │ │ │ ├── AriaLiveRegion.spec.tsx │ │ │ ├── InputProvider.spec.tsx │ │ │ ├── SSR.spec.tsx │ │ │ ├── breakpoints.spec.tsx │ │ │ ├── colorUtils.spec.tsx │ │ │ ├── components.spec.tsx │ │ │ ├── components.test-d.tsx │ │ │ ├── createCanvasTheme.spec.tsx │ │ │ ├── getObjectProxy.spec.tsx │ │ │ ├── isWithinBreakpoint.spec.tsx │ │ │ ├── mergeProps.spec.tsx │ │ │ ├── models.spec.tsx │ │ │ ├── slugify.spec.ts │ │ │ ├── styled.spec.tsx │ │ │ ├── tsconfig.json │ │ │ ├── useIsRTL.spec.ts │ │ │ ├── useResponsiveContainerStyles.spec.tsx │ │ │ ├── useTheme.spec.tsx │ │ │ └── useUniqueId.spec.tsx │ │ └── stories │ │ │ ├── direction.stories.tsx │ │ │ ├── mdx │ │ │ ├── CompoundComponentUtilities.mdx │ │ │ ├── Responsive.mdx │ │ │ ├── examples │ │ │ │ ├── CreateComponent.tsx │ │ │ │ ├── CreateContainer.tsx │ │ │ │ ├── CreateElemPropsHook.tsx │ │ │ │ ├── CreateModelHook.tsx │ │ │ │ ├── CreateSubcomponent.tsx │ │ │ │ ├── ResponsiveStyles.tsx │ │ │ │ └── ResponsiveViewport.tsx │ │ │ └── theme.stories.tsx │ │ │ └── tsconfig.json │ ├── dialog │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Dialog.tsx │ │ │ ├── DialogCard.tsx │ │ │ ├── DialogPopper.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useDialogCard.ts │ │ │ │ ├── useDialogModel.ts │ │ │ │ └── useDialogPopper.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Dialog.mdx │ │ │ ├── Dialog.stories.ts │ │ │ ├── FallbackTesting.stories.tsx │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── DialogWithFallbackPlacements.tsx │ │ │ └── Focus.tsx │ │ │ └── tsconfig.json │ ├── disclosure │ │ ├── index.ts │ │ └── lib │ │ │ └── useDisclosureModel.tsx │ ├── expandable │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Expandable.tsx │ │ │ ├── ExpandableAvatar.tsx │ │ │ ├── ExpandableContent.tsx │ │ │ ├── ExpandableIcon.tsx │ │ │ ├── ExpandableTarget.tsx │ │ │ ├── ExpandableTitle.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useExpandableContent.ts │ │ │ │ ├── useExpandableIcon.ts │ │ │ │ ├── useExpandableModel.tsx │ │ │ │ └── useExpandableTarget.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Expandable.mdx │ │ │ ├── Expandable.stories.tsx │ │ │ ├── examples │ │ │ ├── Avatar.tsx │ │ │ ├── Depth.tsx │ │ │ ├── EndIcon.tsx │ │ │ ├── HoistedModel.tsx │ │ │ ├── LongTitle.tsx │ │ │ ├── RTL.tsx │ │ │ ├── StartIcon.tsx │ │ │ └── test-avatar.png │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── form-field │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── FormField.tsx │ │ │ ├── FormFieldContainer.tsx │ │ │ ├── FormFieldField.tsx │ │ │ ├── FormFieldGroup.tsx │ │ │ ├── FormFieldGroupInput.tsx │ │ │ ├── FormFieldGroupLabel.tsx │ │ │ ├── FormFieldGroupList.tsx │ │ │ ├── FormFieldHint.tsx │ │ │ ├── FormFieldInput.tsx │ │ │ ├── FormFieldLabel.tsx │ │ │ ├── formFieldStencil.ts │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useFormFieldHint.tsx │ │ │ │ ├── useFormFieldInput.tsx │ │ │ │ ├── useFormFieldLabel.tsx │ │ │ │ ├── useFormFieldModel.tsx │ │ │ │ └── useFormFieldOrientation.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── FormField.mdx │ │ │ ├── FormField.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── AllFields.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Custom.tsx │ │ │ ├── CustomId.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── GroupedInputs.tsx │ │ │ ├── Grow.tsx │ │ │ ├── HiddenLabel.tsx │ │ │ ├── Hint.tsx │ │ │ ├── LabelPositionHorizontalEnd.tsx │ │ │ ├── LabelPositionHorizontalStart.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ └── ThemedErrors.tsx │ │ │ ├── tsconfig.json │ │ │ └── visualTesting.stories.tsx │ ├── icon │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── AccentIcon.tsx │ │ │ ├── AppletIcon.tsx │ │ │ ├── Graphic.tsx │ │ │ ├── Svg.tsx │ │ │ ├── SystemIcon.tsx │ │ │ ├── SystemIconCircle.tsx │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── spec │ │ │ ├── AccentIcon.spec.tsx │ │ │ ├── AppletIcon.spec.tsx │ │ │ ├── Graphic.spec.tsx │ │ │ ├── Svg.spec.tsx │ │ │ ├── SystemIcon.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Assets.mdx │ │ │ ├── Assets.stories.tsx │ │ │ ├── Icons.stories.tsx │ │ │ ├── examples │ │ │ ├── AccentIconList.tsx │ │ │ ├── AppletIconList.tsx │ │ │ ├── IconList.tsx │ │ │ └── Overview.tsx │ │ │ ├── stories.visualTesting.tsx │ │ │ └── tsconfig.json │ ├── index.ts │ ├── layout │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Box.tsx │ │ │ ├── Flex.tsx │ │ │ ├── Grid.tsx │ │ │ └── utils │ │ │ │ ├── background.ts │ │ │ │ ├── border │ │ │ │ ├── color.ts │ │ │ │ ├── index.ts │ │ │ │ ├── lineStyle.ts │ │ │ │ ├── radius.ts │ │ │ │ ├── shorthand.ts │ │ │ │ └── width.ts │ │ │ │ ├── buildStyleFns.ts │ │ │ │ ├── color.ts │ │ │ │ ├── depth.ts │ │ │ │ ├── flex.ts │ │ │ │ ├── flexItem.ts │ │ │ │ ├── getValidChildren.ts │ │ │ │ ├── grid.ts │ │ │ │ ├── gridItem.ts │ │ │ │ ├── layout.ts │ │ │ │ ├── mergeStyles.ts │ │ │ │ ├── other.ts │ │ │ │ ├── position.ts │ │ │ │ ├── space.ts │ │ │ │ ├── styleProps.ts │ │ │ │ ├── systemProps.ts │ │ │ │ └── text.ts │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── background.spec.ts │ │ │ ├── border.spec.ts │ │ │ ├── color.spec.ts │ │ │ ├── depth.spec.ts │ │ │ ├── flex.spec.ts │ │ │ ├── flexItem.spec.ts │ │ │ ├── grid.spec.ts │ │ │ ├── gridItem.spec.ts │ │ │ ├── layout.spec.ts │ │ │ ├── mergeStyles.spec.tsx │ │ │ ├── other.spec.ts │ │ │ ├── permutateProps.spec.tsx │ │ │ ├── position.spec.ts │ │ │ ├── space.spec.ts │ │ │ ├── text.spec.ts │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Box.mdx │ │ │ ├── Box.stories.ts │ │ │ ├── Flex.mdx │ │ │ ├── Flex.stories.ts │ │ │ ├── Grid.mdx │ │ │ ├── Grid.stories.ts │ │ │ ├── examples │ │ │ ├── Box │ │ │ │ └── Basic.tsx │ │ │ ├── Flex │ │ │ │ └── Basic.tsx │ │ │ └── Grid │ │ │ │ ├── Basic.tsx │ │ │ │ ├── GridCard.tsx │ │ │ │ ├── GridLayout.tsx │ │ │ │ └── GridLayoutInteractive.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ ├── Box.stories.tsx │ │ │ ├── Flex.stories.tsx │ │ │ └── Grid.stories.tsx │ ├── loading-dots │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── LoadingDots.tsx │ │ ├── spec │ │ │ ├── LoadingDots.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── LoadingDots.mdx │ │ │ ├── LoadingDots.stories.ts │ │ │ ├── examples │ │ │ ├── Accessible.tsx │ │ │ ├── Basic.tsx │ │ │ ├── CustomColorAndAnimation.tsx │ │ │ ├── CustomShape.tsx │ │ │ └── RTL.tsx │ │ │ └── tsconfig.json │ ├── menu │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Menu.tsx │ │ │ ├── MenuCard.tsx │ │ │ ├── MenuContextTarget.tsx │ │ │ ├── MenuDivider.tsx │ │ │ ├── MenuGroup.tsx │ │ │ ├── MenuItem.tsx │ │ │ ├── MenuList.tsx │ │ │ ├── MenuOption.tsx │ │ │ ├── MenuPopper.tsx │ │ │ ├── MenuTarget.tsx │ │ │ ├── Submenu.tsx │ │ │ └── useMenuModel.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Menu.mdx │ │ │ ├── Menu.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── ContextMenu.tsx │ │ │ ├── Grouping.tsx │ │ │ ├── Icons.tsx │ │ │ ├── MenuWithFallbackPlacements.tsx │ │ │ ├── Nested.tsx │ │ │ ├── NestedDynamic.tsx │ │ │ └── SelectableMenu.tsx │ │ │ ├── testingFallback.stories.tsx │ │ │ ├── testingVisual.stories.tsx │ │ │ └── tsconfig.json │ ├── modal │ │ ├── .npmignore │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Modal.tsx │ │ │ ├── ModalBody.tsx │ │ │ ├── ModalCard.tsx │ │ │ ├── ModalHeading.tsx │ │ │ ├── ModalOverflowOverlay.tsx │ │ │ ├── ModalOverlay.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useCloseOnOverlayClick.ts │ │ │ │ ├── useModalCard.ts │ │ │ │ ├── useModalHeading.ts │ │ │ │ └── useModalModel.ts │ │ ├── spec │ │ │ ├── Modal.spec.tsx │ │ │ ├── ModalCard.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Modal.mdx │ │ │ ├── Modal.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── BodyOverflow.tsx │ │ │ ├── CustomFocus.tsx │ │ │ ├── CustomTarget.tsx │ │ │ ├── FormModal.tsx │ │ │ ├── FullOverflow.tsx │ │ │ ├── IframeTest.tsx │ │ │ ├── ModalWithPopup.tsx │ │ │ ├── ReturnFocus.tsx │ │ │ ├── StackedModals.tsx │ │ │ ├── WithRadioButtons.tsx │ │ │ ├── WithTooltips.tsx │ │ │ └── WithoutCloseIcon.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── package.json │ ├── pagination │ │ ├── LICENSE │ │ ├── MIGRATION_GUIDE.md │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── Pagination │ │ │ │ ├── AdditionalDetails.tsx │ │ │ │ ├── Controls.tsx │ │ │ │ ├── GoTo │ │ │ │ ├── Form.tsx │ │ │ │ ├── Label.tsx │ │ │ │ ├── TextInput.tsx │ │ │ │ └── useGoToForm.tsx │ │ │ │ ├── Nav.tsx │ │ │ │ ├── PageButton.tsx │ │ │ │ ├── PageList.tsx │ │ │ │ ├── Pagination.tsx │ │ │ │ ├── buildPageRange.ts │ │ │ │ ├── common │ │ │ │ ├── List.tsx │ │ │ │ ├── useLiveRegion.tsx │ │ │ │ └── utils │ │ │ │ │ ├── getValidChildren.ts │ │ │ │ │ ├── helpers.ts │ │ │ │ │ └── useRTL.ts │ │ │ │ ├── index.tsx │ │ │ │ ├── types.ts │ │ │ │ └── usePaginationModel.ts │ │ ├── spec │ │ │ ├── buildPageRange.spec.ts │ │ │ ├── helpers.spec.ts │ │ │ ├── tsconfig.json │ │ │ ├── useGoToForm.spec.ts │ │ │ └── usePaginationModel.spec.ts │ │ └── stories │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CustomRange.tsx │ │ │ ├── GoToForm.tsx │ │ │ ├── HoistedModel.tsx │ │ │ ├── JumpControls.tsx │ │ │ ├── RTL.tsx │ │ │ └── ResponsiveRange.tsx │ │ │ ├── pagination.mdx │ │ │ ├── pagination.stories.ts │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── popup │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Popper.tsx │ │ │ ├── Popup.tsx │ │ │ ├── PopupBody.tsx │ │ │ ├── PopupCard.tsx │ │ │ ├── PopupCloseButton.tsx │ │ │ ├── PopupCloseIcon.tsx │ │ │ ├── PopupHeading.tsx │ │ │ ├── PopupPopper.tsx │ │ │ ├── PopupTarget.tsx │ │ │ ├── fallbackPlacements.ts │ │ │ ├── getTransformFromPlacement.ts │ │ │ └── hooks │ │ │ │ ├── focus-trap-js.ts │ │ │ │ ├── index.ts │ │ │ │ ├── useAlwaysCloseOnOutsideClick.ts │ │ │ │ ├── useAssistiveHideSiblings.ts │ │ │ │ ├── useBringToTopOnClick.ts │ │ │ │ ├── useCloseOnEscape.ts │ │ │ │ ├── useCloseOnFullscreenExit.ts │ │ │ │ ├── useCloseOnOutsideClick.ts │ │ │ │ ├── useCloseOnTargetHidden.ts │ │ │ │ ├── useDisableBodyScroll.ts │ │ │ │ ├── useFocusRedirect.ts │ │ │ │ ├── useFocusTrap.ts │ │ │ │ ├── useInitialFocus.tsx │ │ │ │ ├── usePopupCard.ts │ │ │ │ ├── usePopupCloseButton.ts │ │ │ │ ├── usePopupHeading.ts │ │ │ │ ├── usePopupModel.ts │ │ │ │ ├── usePopupPopper.ts │ │ │ │ ├── usePopupStack.ts │ │ │ │ ├── usePopupTarget.ts │ │ │ │ ├── usePopupTargetContext.ts │ │ │ │ ├── useReturnFocus.tsx │ │ │ │ ├── useTransferOnFullscreenEnter.ts │ │ │ │ └── useTransferOnFullscreenExit.ts │ │ ├── spec │ │ │ ├── Popper.spec.tsx │ │ │ ├── Popup.spec.tsx │ │ │ ├── PopupCard.spec.tsx │ │ │ ├── PopupCloseButton.spec.tsx │ │ │ ├── PopupCloseIcon.spec.tsx │ │ │ ├── PopupHeading.spec.tsx │ │ │ ├── PopupTarget.spec.tsx │ │ │ ├── getTransformFromPopper.spec.ts │ │ │ ├── tsconfig.json │ │ │ ├── useAlwaysCloseOnOutsideClick.spec.tsx │ │ │ └── useCloseOnOutsideClick.spec.tsx │ │ └── stories │ │ │ ├── Popper.stories.tsx │ │ │ ├── Popup.mdx │ │ │ ├── Popup.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── CloseOnTargetHiddenTest.tsx │ │ │ ├── ComboboxWithinPopup.tsx │ │ │ ├── CustomTarget.tsx │ │ │ ├── ExternalWindow.tsx │ │ │ ├── FocusRedirect.tsx │ │ │ ├── FocusTrap.tsx │ │ │ ├── FullScreen.tsx │ │ │ ├── InitialFocus.tsx │ │ │ ├── MixedPopupTypes.tsx │ │ │ ├── MultiplePopups.tsx │ │ │ ├── NestedPopups.tsx │ │ │ ├── PopupWithFallbackPlacements.tsx │ │ │ ├── PopupWithNonHidablePopup.tsx │ │ │ ├── RTL.tsx │ │ │ ├── ReturnFocusTest.tsx │ │ │ └── TooltipReturnFocus.tsx │ │ │ ├── testing.stories.tsx │ │ │ ├── testingFallback.stories.tsx │ │ │ ├── testingPopper.stories.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ ├── Popper.stories.tsx │ │ │ └── Popup.stories.tsx │ ├── radio │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Radio.tsx │ │ │ └── RadioGroup.tsx │ │ ├── spec │ │ │ ├── Radio.spec.tsx │ │ │ ├── RadioGroup.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Radio.mdx │ │ │ ├── Radio.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Inverse.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── NoValue.tsx │ │ │ ├── RefForwarding.tsx │ │ │ └── Required.tsx │ │ │ └── visualTesting.stories.tsx │ ├── segmented-control │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── SegmentedControl.tsx │ │ │ └── SegmentedControlButton.tsx │ │ ├── spec │ │ │ ├── SegmentedControl.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── SegmentedControl.mdx │ │ │ ├── SegmentedControl.stories.ts │ │ │ ├── examples │ │ │ └── Basic.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── select │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Select.tsx │ │ │ ├── SelectCard.tsx │ │ │ ├── SelectInput.tsx │ │ │ ├── SelectItem.tsx │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── useSelectCard.ts │ │ │ │ ├── useSelectInput.ts │ │ │ │ └── useSelectModel.tsx │ │ ├── spec │ │ │ ├── Select.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Select.mdx │ │ │ ├── Select.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Complex.tsx │ │ │ ├── Controlled.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── DisabledOption.tsx │ │ │ ├── Error.tsx │ │ │ ├── FetchingDynamicItems.tsx │ │ │ ├── Grow.tsx │ │ │ ├── HoistedModel.tsx │ │ │ ├── InitialSelectedItem.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── MenuHeight.tsx │ │ │ ├── Placeholder.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ └── WithIcons.tsx │ │ │ ├── stories_VisualTesting.tsx │ │ │ └── testing.stories.tsx │ ├── side-panel │ │ ├── .npmignore │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── SidePanel.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ ├── SidePanel.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── stories.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── SidePanel.stories.tsx │ ├── skeleton │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Skeleton.tsx │ │ │ └── parts │ │ │ │ ├── SkeletonHeader.tsx │ │ │ │ ├── SkeletonShape.tsx │ │ │ │ └── SkeletonText.tsx │ │ ├── spec │ │ │ ├── skeleton.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Skeleton.mdx │ │ │ ├── Skeleton.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Color.tsx │ │ │ ├── Header.tsx │ │ │ ├── Shape.tsx │ │ │ ├── Simulation.tsx │ │ │ └── Text.tsx │ │ │ ├── tsconfig.json │ │ │ └── visual-testing │ │ │ └── Skeleton.stories.tsx │ ├── status-indicator │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── StatusIndicator.tsx │ │ ├── spec │ │ │ ├── StatusIndicator.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── StatusIndicator.mdx │ │ │ ├── StatusIndicator.stories.ts │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── Emphasis.tsx │ │ │ ├── Icon.tsx │ │ │ └── MaxWidth.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── switch │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── Switch.tsx │ │ ├── spec │ │ │ ├── Switch.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Switch.mdx │ │ │ ├── Switch.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── LabelPosition.tsx │ │ │ └── RefForwarding.tsx │ │ │ └── visualTesting.stories.tsx │ ├── table │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── BaseTable.tsx │ │ │ ├── Table.tsx │ │ │ └── parts │ │ │ │ ├── BaseTableBody.tsx │ │ │ │ ├── BaseTableCaption.tsx │ │ │ │ ├── BaseTableCell.tsx │ │ │ │ ├── BaseTableFooter.tsx │ │ │ │ ├── BaseTableHead.tsx │ │ │ │ ├── BaseTableHeader.tsx │ │ │ │ ├── BaseTableRow.tsx │ │ │ │ ├── css-grid-table │ │ │ │ ├── TableRow.tsx │ │ │ │ └── index.tsx │ │ │ │ └── index.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Table.mdx │ │ │ ├── Table.stories.ts │ │ │ ├── examples │ │ │ ├── BaseHtmlTable.tsx │ │ │ ├── Basic.tsx │ │ │ ├── BasicWithHeading.tsx │ │ │ ├── FixedColumn.tsx │ │ │ └── RightToLeft.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── tabs │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Tabs.tsx │ │ │ ├── TabsItem.tsx │ │ │ ├── TabsList.tsx │ │ │ ├── TabsMenuPopper.tsx │ │ │ ├── TabsOverflowButton.tsx │ │ │ ├── TabsPanel.tsx │ │ │ ├── TabsPanels.tsx │ │ │ └── useTabsModel.tsx │ │ ├── spec │ │ │ ├── Tab.spec.tsx │ │ │ ├── TabList.spec.tsx │ │ │ ├── TabPanel.spec.tsx │ │ │ ├── Tabs.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── Tabs.mdx │ │ │ ├── Tabs.stories.ts │ │ │ ├── examples │ │ │ ├── AlternativeTabStop.tsx │ │ │ ├── Basic.tsx │ │ │ ├── DisabledTab.tsx │ │ │ ├── DynamicTabs.tsx │ │ │ ├── HoistedModel.tsx │ │ │ ├── Icons.tsx │ │ │ ├── NamedTabs.tsx │ │ │ ├── OverflowTabs.tsx │ │ │ ├── RightToLeft.tsx │ │ │ └── SinglePanel.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── testing │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── ComponentStatesTable.tsx │ │ │ ├── StaticStates.tsx │ │ │ ├── permutateProps.ts │ │ │ └── propTypes.ts │ │ └── stories │ │ │ ├── Testing.mdx │ │ │ ├── Testing.stories.ts │ │ │ ├── examples │ │ │ └── Basic.tsx │ │ │ └── tsconfig.json │ ├── text-area │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ └── TextArea.tsx │ │ ├── spec │ │ │ ├── TextArea.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── TextArea.mdx │ │ │ ├── TextArea.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Grow.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── Placeholder.tsx │ │ │ ├── RefForwarding.tsx │ │ │ ├── Required.tsx │ │ │ └── ResizeConstraints.tsx │ │ │ └── visualTesting.stories.tsx │ ├── text-input │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── InputGroup.tsx │ │ │ └── TextInput.tsx │ │ ├── spec │ │ │ ├── InputGroup.spec.tsx │ │ │ ├── TextInput.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── TextInput.mdx │ │ │ ├── TextInput.stories.ts │ │ │ ├── examples │ │ │ ├── Alert.tsx │ │ │ ├── Basic.tsx │ │ │ ├── Disabled.tsx │ │ │ ├── Error.tsx │ │ │ ├── Grow.tsx │ │ │ ├── Icons.tsx │ │ │ ├── LabelPosition.tsx │ │ │ ├── Placeholder.tsx │ │ │ ├── RefForwarding.tsx │ │ │ └── Required.tsx │ │ │ └── visualTesting.stories.tsx │ ├── text │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── LabelText.tsx │ │ │ ├── Text.tsx │ │ │ └── TypeLevelComponents.tsx │ │ ├── spec │ │ │ ├── SSR.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── BodyText.mdx │ │ │ ├── BodyText.stories.ts │ │ │ ├── Heading.mdx │ │ │ ├── Heading.stories.ts │ │ │ ├── LabelText.mdx │ │ │ ├── LabelText.stories.ts │ │ │ ├── Subtext.mdx │ │ │ ├── Subtext.stories.ts │ │ │ ├── Text.mdx │ │ │ ├── Text.stories.ts │ │ │ ├── Title.mdx │ │ │ ├── Title.stories.ts │ │ │ ├── examples │ │ │ ├── BodyText │ │ │ │ └── Basic.tsx │ │ │ ├── Heading │ │ │ │ └── Basic.tsx │ │ │ ├── LabelText │ │ │ │ ├── Basic.tsx │ │ │ │ ├── Cursor.tsx │ │ │ │ └── Disabled.tsx │ │ │ ├── Subtext │ │ │ │ └── Basic.tsx │ │ │ ├── Text │ │ │ │ ├── Basic.tsx │ │ │ │ ├── TypeLevel.tsx │ │ │ │ └── Variant.tsx │ │ │ └── Title │ │ │ │ └── Basic.tsx │ │ │ ├── testing.stories.tsx │ │ │ └── tsconfig.json │ ├── toast │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── Toast.tsx │ │ │ ├── ToastBody.tsx │ │ │ ├── ToastCloseIcon.tsx │ │ │ ├── ToastIcon.tsx │ │ │ ├── ToastLink.tsx │ │ │ ├── ToastMessage.tsx │ │ │ └── hooks │ │ │ │ └── useToastModel.tsx │ │ ├── spec │ │ │ ├── Toast.spec.tsx │ │ │ ├── ToastCloseIcon.spec.tsx │ │ │ ├── ToastLink.spec.tsx │ │ │ └── tsconfig.json │ │ └── stories │ │ │ ├── examples │ │ │ ├── Basic.tsx │ │ │ ├── RTL.tsx │ │ │ ├── ToastAlert.tsx │ │ │ ├── ToastDialog.tsx │ │ │ ├── WithActionLinkAndCloseIcon.tsx │ │ │ └── WithPopper.tsx │ │ │ ├── testing.stories.tsx │ │ │ ├── toast.mdx │ │ │ ├── toast.stories.ts │ │ │ └── tsconfig.json │ ├── tokens │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── colors.types.ts │ │ │ ├── depth.ts │ │ │ ├── radius.ts │ │ │ ├── space.ts │ │ │ ├── type │ │ │ │ ├── fontFamilies.ts │ │ │ │ ├── fontSizes.ts │ │ │ │ ├── fontWeights.ts │ │ │ │ ├── index.ts │ │ │ │ ├── levels.ts │ │ │ │ └── variants.ts │ │ │ └── types.ts │ │ ├── spec │ │ │ ├── helpers.ts │ │ │ ├── tsconfig.json │ │ │ └── type.spec.ts │ │ └── stories │ │ │ ├── Tokens.mdx │ │ │ ├── Tokens.stories.tsx │ │ │ ├── examples │ │ │ ├── Overview.tsx │ │ │ └── Tokens.tsx │ │ │ └── tsconfig.json │ ├── tooltip │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.ts │ │ ├── lib │ │ │ ├── OverflowTooltip.tsx │ │ │ ├── Tooltip.tsx │ │ │ ├── TooltipContainer.tsx │ │ │ └── useTooltip.tsx │ │ ├── spec │ │ │ ├── OverflowTooltip.spec.tsx │ │ │ ├── SSR.spec.tsx │ │ │ ├── Tooltip.spec.tsx │ │ │ ├── tsconfig.json │ │ │ └── useTooltip.spec.tsx │ │ └── stories │ │ │ ├── Tooltip.mdx │ │ │ ├── Tooltip.stories.ts │ │ │ ├── examples │ │ │ ├── CustomContent.tsx │ │ │ ├── Default.tsx │ │ │ ├── DelayedTooltip.tsx │ │ │ ├── DescribeType.tsx │ │ │ ├── DescriptionType.tsx │ │ │ ├── Ellipsis.tsx │ │ │ ├── LineClamp.tsx │ │ │ ├── Muted.tsx │ │ │ ├── Placements.tsx │ │ │ └── UseTooltip.tsx │ │ │ ├── testing.stories.tsx │ │ │ ├── testingFallback.stories.tsx │ │ │ └── tsconfig.json │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── styling-transform │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── createObjectTransform.ts │ │ ├── createPropertyTransform.ts │ │ ├── styleTransform.ts │ │ └── utils │ │ │ ├── createStyleObjectNode.ts │ │ │ ├── getCssVariables.ts │ │ │ ├── getErrorMessage.ts │ │ │ ├── getFallbackVariable.ts │ │ │ ├── getHash.ts │ │ │ ├── getVarName.ts │ │ │ ├── handleCalc.ts │ │ │ ├── handleCreateStencil.ts │ │ │ ├── handleCreateStyles.ts │ │ │ ├── handleCreateVars.ts │ │ │ ├── handleCssVar.ts │ │ │ ├── handleInjectGlobal.ts │ │ │ ├── handleKeyframes.ts │ │ │ ├── handleParentModifier.ts │ │ │ ├── handlePx2Rem.ts │ │ │ ├── injectStyles.ts │ │ │ ├── isImportedFromStyling.ts │ │ │ ├── parseNodeToStaticValue.ts │ │ │ ├── parseObjectToStaticValue.ts │ │ │ ├── stylisFns.ts │ │ │ └── types.ts │ ├── package.json │ ├── spec │ │ ├── _variables.css │ │ ├── createProgramFromSource.ts │ │ ├── findNodes.ts │ │ ├── tsconfig.json │ │ └── utils │ │ │ ├── createStyleObjectNode.spec.ts │ │ │ ├── getCssVariables.spec.ts │ │ │ ├── getErrorMessage.spec.ts │ │ │ ├── getFallbackVariables.spec.ts │ │ │ ├── getVarName.spec.ts │ │ │ ├── handleCalc.spec.ts │ │ │ ├── handleCreateStencil.spec.ts │ │ │ ├── handleCreateStyles.spec.ts │ │ │ ├── handleCreateVars.spec.ts │ │ │ ├── handleCssVar.spec.ts │ │ │ ├── handleInjectGlobal.spec.ts │ │ │ ├── handleKeyframes.spec.ts │ │ │ ├── handleParentModifier.spec.ts │ │ │ ├── handlePx2Rem.spec.ts │ │ │ ├── parseNodeToStaticValue.spec.ts │ │ │ └── parseObjectToStaticValue.spec.ts │ ├── testing.ts │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json └── styling │ ├── LICENSE │ ├── README.md │ ├── index.ts │ ├── lib │ ├── calc.ts │ ├── cs.ts │ ├── px2rem.ts │ ├── slugify.ts │ └── uniqueId.ts │ ├── package.json │ ├── spec │ ├── calc.spec.ts │ ├── cs.spec.tsx │ ├── px2rem.spec.ts │ └── tsconfig.json │ ├── stories │ └── mdx │ │ ├── CreateStyles.mdx │ │ ├── CustomizingStyles.mdx │ │ ├── FromEmotion.mdx │ │ ├── MergingStyles.mdx │ │ ├── Overview.mdx │ │ ├── Stencils.mdx │ │ ├── Utilities.mdx │ │ ├── WhyCanvasStyling.mdx │ │ └── examples │ │ ├── CSProp.tsx │ │ ├── CreateModifiers.tsx │ │ ├── CreateStencil.tsx │ │ ├── CreateStyles.tsx │ │ ├── CreateVars.tsx │ │ ├── CustomButton.tsx │ │ ├── CustomIcon.tsx │ │ ├── EmotionButton.tsx │ │ ├── ManualStylesButton.tsx │ │ ├── StyledButton.tsx │ │ ├── StylingButton.tsx │ │ └── StylingOverrides.tsx │ ├── tsconfig.cjs.json │ ├── tsconfig.es6.json │ └── tsconfig.json ├── package.json ├── styling.config.ts ├── tsconfig.docs.json ├── tsconfig.eslint.json ├── tsconfig.expect-type.json ├── tsconfig.json ├── tsconfig.spec.json ├── tsconfig.stories.json ├── typings.d.ts ├── utils ├── check-dependencies-exist.js ├── check-lockfile.js ├── check-mismatched-dependencies.js ├── create-component │ ├── addExport.js │ ├── consoleUtils.js │ ├── createComponent.js │ ├── createReactComponent.js │ ├── nameUtils.js │ ├── templates │ │ └── react │ │ │ ├── SSR.js │ │ │ ├── component.content.js │ │ │ ├── component.js │ │ │ ├── component.target.js │ │ │ ├── hook.content.js │ │ │ ├── hook.index.js │ │ │ ├── hook.target.js │ │ │ ├── index.js │ │ │ ├── model.js │ │ │ ├── readme.js │ │ │ ├── stories.basic.js │ │ │ ├── stories.js │ │ │ ├── stories.mdx.js │ │ │ ├── stories.open.js │ │ │ ├── stories.visualTesting.js │ │ │ └── tsconfig.js │ └── writeModuleFiles.js ├── custom-lint-rules │ ├── index.js │ ├── package.json │ ├── restricted-imports.js │ ├── restricted-imports.spec.ts │ ├── use-ck-slash-imports.js │ └── use-ck-slash-imports.spec.ts ├── dist-tag.mjs ├── download-fonts.js ├── fix-package-json-versions.js ├── forward-merge.js ├── get-cypress-version.js ├── get-forward-merge-branch.js ├── get-package-names.js ├── promote-component.js ├── publish-canary.mjs ├── publish.js ├── report-failure.mjs ├── resolve-package-json.js ├── spec │ ├── fix-package-json-versions.spec.ts │ └── resolve-package-json.spec.ts ├── storybook │ ├── CanvasProviderDecorator.tsx │ ├── ControlledComponentWrapper.tsx │ ├── InputProviderDecorator.tsx │ ├── Markdown.tsx │ ├── PopperController.tsx │ ├── customThemes.ts │ ├── index.ts │ ├── testingOnly.ts │ └── withSnapshotsEnabled.ts ├── style-transform │ ├── handleFocusRing.ts │ └── spec │ │ └── handleFocusRing.spec.ts ├── update-changelog.js └── update-css-package-version.js ├── wallaby.js ├── webpack.config.ts └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tab 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | # 2 space indentation 15 | [*.{html,css,scss,js,ts,tsx,json,md,yml}] 16 | indent_style = space 17 | indent_size = 2 18 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | jest/ 3 | modules/**/dist 4 | node_modules 5 | -------------------------------------------------------------------------------- /.eslintrc-prettier.js: -------------------------------------------------------------------------------- 1 | const prettierConfig = require('./.prettierrc.js'); 2 | const baseConfig = require('./.eslintrc.js'); 3 | 4 | module.exports = { 5 | extends: './.eslintrc.js', 6 | rules: { 7 | 'prettier/prettier': ['warn', prettierConfig] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## 👉 [Please follow one of these issue templates](https://github.com/Workday/canvas-kit/issues/new/choose) 👈 2 | 3 | Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not 4 | follow one of the above issue templates. 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🚀 Feature Proposal 3 | labels: 'feature' 4 | about: Submit a proposal for a new feature 5 | --- 6 | 7 | ## 🚀 Feature Proposal 8 | 9 | A clear and concise description of what the feature is. 10 | 11 | ## Motivation 12 | 13 | Please outline the motivation for the proposal. 14 | 15 | ## Example 16 | 17 | Please provide an example for how this feature would be used. 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggestion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💡 Suggestion 3 | labels: 'suggestion' 4 | about: Submit a suggestion to help improve an area of Canvas-Kit 5 | --- 6 | 7 | ## 💡 Suggestion 8 | 9 | A clear and concise description of what the suggestion is. 10 | 11 | ## Motivation 12 | 13 | What are the key benefits if this suggest was included to Canvas-Kit? 14 | 15 | ## Example 16 | 17 | Please provide some examples of this suggestion in practice. 18 | -------------------------------------------------------------------------------- /.github/workflows/close-related-issues.yml: -------------------------------------------------------------------------------- 1 | name: Close Linked Issues 2 | 3 | on: 4 | pull_request_target: 5 | types: [closed] 6 | 7 | jobs: 8 | main: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: Workday/canvas-kit-actions/close-related-issues@v1 12 | with: 13 | token: ${{ secrets.GITHUB_TOKEN }} 14 | -------------------------------------------------------------------------------- /.github/workflows/enable-automerge.yml: -------------------------------------------------------------------------------- 1 | name: Enable Automerge 2 | 3 | on: 4 | pull_request_target: 5 | types: [ edited, labeled, synchronize ] 6 | 7 | jobs: 8 | enable-automerge: 9 | if: contains(github.event.pull_request.labels.*.name, 'automerge') 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Enable Automerge 14 | uses: Workday/canvas-kit-actions/enable-automerge@v1 15 | with: 16 | token: ${{ secrets.GH_RW_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/new-issue.yml: -------------------------------------------------------------------------------- 1 | name: New Issue 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | automate-project-columns: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: alex-page/github-project-automation-plus@v0.2.4 12 | with: 13 | project: Backlog 14 | column: Open 15 | repo-token: ${{ secrets.GH_RW_TOKEN }} 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # misc 5 | .DS_Store 6 | 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | 12 | .cache 13 | 14 | # build 15 | modules/**/dist 16 | modules/**/ts-tmp 17 | build/* 18 | *.tsbuildinfo 19 | 20 | # intellij 21 | .idea 22 | junit.xml 23 | 24 | # vscode 25 | .vscode 26 | 27 | # docs 28 | /docs 29 | 30 | # public 31 | /public 32 | 33 | # cypress 34 | cypress/videos 35 | cypress/screenshots 36 | 37 | # css 38 | .css 39 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16.20.0 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/CHANGELOG.md 2 | **/package.json 3 | .vscode 4 | .idea 5 | .travis.yml 6 | ./docs 7 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSpacing: false, 4 | jsxBracketSameLine: false, 5 | printWidth: 100, 6 | proseWrap: 'always', 7 | semi: true, 8 | singleQuote: true, 9 | tabWidth: 2, 10 | trailingComma: 'es5', 11 | useTabs: false, 12 | }; 13 | -------------------------------------------------------------------------------- /.storybook/manager.js: -------------------------------------------------------------------------------- 1 | import { addons } from '@storybook/manager-api'; 2 | import canvasTheme from './theme'; 3 | 4 | addons.setConfig({ 5 | theme: canvasTheme, 6 | }); 7 | -------------------------------------------------------------------------------- /.storybook/readme-panel/preset.js: -------------------------------------------------------------------------------- 1 | function managerEntries(entry = []) { 2 | return [...entry, require.resolve('./register')]; //👈 Addon implementation 3 | } 4 | 5 | module.exports = {managerEntries}; 6 | -------------------------------------------------------------------------------- /.storybook/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": ["../**/*.ts", "../**/*.tsx", "../**/*.d.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /.vcmrc: -------------------------------------------------------------------------------- 1 | { 2 | "types": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"], 3 | "scope": { 4 | "required": false, 5 | "allowed": ["*"], 6 | "validate": false, 7 | "multiple": false 8 | }, 9 | "warnOnFail": false, 10 | "maxSubjectLength": 100, 11 | "subjectPattern": ".+", 12 | "subjectPatternErrorMsg": "subject does not match subject pattern!", 13 | "helpMessage": "", 14 | "autoFix": false 15 | } 16 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | workspaces-experimental true 2 | --install.frozen-lockfile true 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Canvas 2 | 3 | You may read our contribution guidelines 4 | [here](https://workday.github.io/canvas-kit/?path=/docs/guides-contributing--docs). 5 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit contributors (sorted alphabetically) 2 | 3 | - Ajar Sagar 4 | - Alex Kong 5 | - Alex Nichols 6 | - Ana Chang 7 | - Angad Kaflay 8 | - Austin Zielinski 9 | - Chad Sahlhoff 10 | - Clara Chao 11 | - Cyril Sellam 12 | - Dan Bye 13 | - Elliot Brown 14 | - Jay Scheidt 15 | - Jesse Spencer 16 | - Joseph Le 17 | - Justin Olson 18 | - Justin Panté 19 | - Kendall Gassner 20 | - Kevin lee 21 | - Manuel Carrera 22 | - Matt Johnson 23 | - Matt Rust 24 | - Neema Mahdavi 25 | - Parker Ledoux 26 | - Phuoc Huynh 27 | - Robert Everett 28 | - Simon Taft 29 | - Stephane Rangaya 30 | - Tino Mejia 31 | - Yuqin Shao 32 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | sourceType: 'unambiguous', 3 | presets: [['@babel/preset-env'], '@babel/preset-typescript', '@babel/preset-react'], 4 | plugins: [], 5 | env: { 6 | test: { 7 | presets: [ 8 | '@babel/preset-env', 9 | '@babel/preset-typescript', 10 | ['@babel/preset-react', {runtime: 'automatic'}], 11 | ], 12 | plugins: ['@babel/plugin-transform-runtime'], 13 | }, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /cypress/component/Examples.spec.tsx: -------------------------------------------------------------------------------- 1 | import {TextInputWithReactHookForm} from '@workday/canvas-kit-preview-react/_examples/stories/mdx/examples/TextInputWithReactHookForm'; 2 | 3 | describe('TextInputWithReactHookForm', () => { 4 | context('given inputs using React Hook Form', () => { 5 | beforeEach(() => { 6 | cy.mount(); 7 | }); 8 | 9 | it('should not have any axe errors', () => { 10 | cy.checkA11y(); 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /cypress/helpers/index.ts: -------------------------------------------------------------------------------- 1 | import * as modal from './modal'; 2 | import * as selectPreview from './selectPreview'; 3 | import * as popup from './popup'; 4 | 5 | export {modal, popup, selectPreview}; 6 | -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | module.exports = on => { 2 | // plugin code goes here 3 | }; 4 | -------------------------------------------------------------------------------- /cypress/support/cypress-plugin-tab.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Cypress { 2 | interface Chainable { 3 | tab(options?: Partial<{shift: Boolean}>): Chainable; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /cypress/support/index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Workday/canvas-kit/60e23d05fa006d402e49a3abffa25038bca2960b/cypress/support/index.d.ts -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "types": ["cypress", "@testing-library/cypress"], 5 | "strictNullChecks": false, 6 | "noImplicitAny": false, 7 | "noImplicitReturns": false 8 | }, 9 | "exclude": [] 10 | } 11 | -------------------------------------------------------------------------------- /doc.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "glob": "modules/**/*.{ts,tsx}", 3 | "ignore": [ 4 | "**/examples/**", 5 | "**/spec/**", 6 | "**/stories/**", 7 | "**/codemod/**", 8 | "**/docs/**", 9 | "**/css/**", 10 | "**/dist/**", 11 | "*.d.ts", 12 | "*.js" 13 | ], 14 | "plugins": [ 15 | "modules/docs/docgen/plugins/enhancedComponentParser.ts", 16 | "modules/docs/docgen/plugins/componentParser.ts", 17 | "modules/docs/docgen/plugins/modelParser.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rootDir: '.', 3 | setupFilesAfterEnv: ['/jest/setupTests.ts'], 4 | verbose: true, 5 | moduleFileExtensions: ['tsx', 'ts', 'js', 'jsx', 'json'], 6 | testEnvironment: 'jsdom', 7 | testMatch: ['**/?(*.)+(spec|test).ts?(x)'], 8 | testPathIgnorePatterns: ['/cypress/'], 9 | transformIgnorePatterns: ['/node_modules/'], 10 | clearMocks: true, 11 | reporters: ['default', ['jest-junit', {suiteName: 'Canvas Kit tests'}]], 12 | setupFiles: ['core-js'], 13 | testEnvironmentOptions: { 14 | url: 'http://localhost', 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /jest/verifyComponent.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Test = React.forwardRef(({as: Element = 'div', ...props}: any, ref) => { 4 | return ; 5 | }); 6 | 7 | const useTestModel = function() {}; 8 | 9 | describe('Test', () => { 10 | verifyComponent(Test, {modelFn: useTestModel}); 11 | }); 12 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "modules/**" 4 | ], 5 | "version": "13.1.2", 6 | "npmClient": "yarn", 7 | "useWorkspaces": true, 8 | "command": { 9 | "version": { 10 | "gitTagVersion": false, 11 | "push": false, 12 | "message": "chore: Release %s [skip ci]", 13 | "forcePublish": "*" 14 | }, 15 | "publish": { 16 | "forcePublish": "*" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/codemod/lib/v11/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = 4 | (fn: Function) => (input: string, expected: string, options?: Record) => { 5 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/codemod/lib/v12/index.ts: -------------------------------------------------------------------------------- 1 | import {Transform} from 'jscodeshift'; 2 | 3 | import renameFormFieldHorizontal from './renameFormFieldHorizontal'; 4 | import promoteFormField from './promoteFormField'; 5 | 6 | const transform: Transform = (file, api, options) => { 7 | // These will run in order. If your transform depends on others, place yours after dependent transforms 8 | const fixes = [ 9 | // add codemods here 10 | promoteFormField, 11 | renameFormFieldHorizontal, 12 | ]; 13 | return fixes.reduce((source, fix) => fix({...file, source}, api, options) as string, file.source); 14 | }; 15 | 16 | export default transform; 17 | -------------------------------------------------------------------------------- /modules/codemod/lib/v12/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = 4 | (fn: Function) => (input: string, expected: string, options?: Record) => { 5 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/codemod/lib/v13/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = 4 | (fn: Function) => (input: string, expected: string, options?: Record) => { 5 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/codemod/lib/v5/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = (fn: Function) => ( 4 | input: string, 5 | expected: string, 6 | options?: Record 7 | ) => { 8 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/codemod/lib/v5/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/codemod/lib/v6/deprecateCookieBanner.ts: -------------------------------------------------------------------------------- 1 | import {Transform} from 'jscodeshift'; 2 | import {renameImports} from './utils'; 3 | 4 | const transform: Transform = (file, api) => { 5 | const j = api.jscodeshift; 6 | 7 | const root = j(file.source); 8 | 9 | return renameImports(api, root, '@workday/canvas-kit-react/cookie-banner', { 10 | CookieBanner: 'DeprecatedCookieBanner', 11 | CookieBannerProps: 'DeprecatedCookieBannerProps', 12 | }).toSource(); 13 | }; 14 | 15 | export default transform; 16 | -------------------------------------------------------------------------------- /modules/codemod/lib/v6/deprecatePageHeader.ts: -------------------------------------------------------------------------------- 1 | import {Transform} from 'jscodeshift'; 2 | import {renameImports} from './utils'; 3 | 4 | const transform: Transform = (file, api) => { 5 | const j = api.jscodeshift; 6 | 7 | const root = j(file.source); 8 | 9 | return renameImports(api, root, '@workday/canvas-kit-react/page-header', { 10 | PageHeader: 'DeprecatedPageHeader', 11 | PageHeaderProps: 'DeprecatedPageHeaderProps', 12 | }).toSource(); 13 | }; 14 | 15 | export default transform; 16 | -------------------------------------------------------------------------------- /modules/codemod/lib/v6/renameCanvasDepthValue.ts: -------------------------------------------------------------------------------- 1 | import {Transform} from 'jscodeshift'; 2 | import {renameImports} from './utils'; 3 | 4 | const transform: Transform = (file, api) => { 5 | const j = api.jscodeshift; 6 | 7 | const root = j(file.source); 8 | 9 | return renameImports(api, root, '@workday/canvas-kit-react/tokens', { 10 | CanvasDepthValue: 'CanvasDepthValues', 11 | }).toSource(); 12 | }; 13 | 14 | export default transform; 15 | -------------------------------------------------------------------------------- /modules/codemod/lib/v6/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = (fn: Function) => ( 4 | input: string, 5 | expected: string, 6 | options?: Record 7 | ) => { 8 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/codemod/lib/v7/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = (fn: Function) => ( 4 | input: string, 5 | expected: string, 6 | options?: Record 7 | ) => { 8 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/codemod/lib/v8/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = (fn: Function) => ( 4 | input: string, 5 | expected: string, 6 | options?: Record 7 | ) => { 8 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/codemod/lib/v9/spec/expectTransformFactory.ts: -------------------------------------------------------------------------------- 1 | import {runInlineTest} from 'jscodeshift/dist/testUtils'; 2 | 3 | export const expectTransformFactory = (fn: Function) => ( 4 | input: string, 5 | expected: string, 6 | options?: Record 7 | ) => { 8 | return runInlineTest(fn, options, {source: input}, expected, {parser: 'tsx'}); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/codemod/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/codemod/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/codemod/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "spec", "lib/**/spec"] 4 | } 5 | -------------------------------------------------------------------------------- /modules/css/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.css 3 | -------------------------------------------------------------------------------- /modules/css/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit CSS 2 | 3 | The bundle package containing all modules of the Canvas Kit CSS. The contents are auto-generated 4 | from the Canvas Kit React source code. 5 | -------------------------------------------------------------------------------- /modules/docs/docgen/fixtures/importedFrom.ts: -------------------------------------------------------------------------------- 1 | export const exportedString = 'foo'; 2 | -------------------------------------------------------------------------------- /modules/docs/docgen/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/docs/index.ts: -------------------------------------------------------------------------------- 1 | export {ExampleCodeBlock} from './lib/ExampleCodeBlock'; 2 | export * from './lib/specs'; 3 | export * from './lib/Specifications'; 4 | export * from './lib/StylePropsTable'; 5 | export * from './lib/docs'; 6 | export * from './lib/SymbolDoc'; 7 | export * from './lib/MDXElements'; 8 | -------------------------------------------------------------------------------- /modules/docs/lib/DescriptionTooltip.tsx: -------------------------------------------------------------------------------- 1 | import styled from '@emotion/styled'; 2 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 3 | import {colors} from '@workday/canvas-kit-react/tokens'; 4 | 5 | export const DescriptionTooltip = styled(Tooltip)({ 6 | ':before': { 7 | borderWidth: 1, 8 | borderStyle: 'solid', 9 | borderColor: colors.blackPepper500, 10 | backgroundColor: 'rgba(255,255,255,.85)', 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /modules/docs/lib/SymbolDoc.tsx: -------------------------------------------------------------------------------- 1 | export {SymbolDoc, SymbolDescription} from './widgetUtils'; 2 | import './widgets'; 3 | -------------------------------------------------------------------------------- /modules/docs/lib/specs.ts: -------------------------------------------------------------------------------- 1 | export interface SpecIt { 2 | type: 'it'; 3 | name: string; 4 | } 5 | 6 | export interface SpecDescribe { 7 | type: 'describe'; 8 | name: string; 9 | children: (SpecDescribe | SpecIt)[]; 10 | } 11 | 12 | export interface SpecFile { 13 | type: 'file'; 14 | name: string; 15 | children: (SpecDescribe | SpecIt)[]; 16 | } 17 | 18 | // prettier-ignore 19 | export const specifications: SpecFile[] = [/* SPEC_FILES_REPLACE_BY_WEBPACK */]; 20 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/.eslintrc.cjs.txt: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: {browser: true, es2020: true}, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | ignorePatterns: ['dist', '.eslintrc.cjs'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': ['warn', {allowConstantExport: true}], 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/Demo.tsx: -------------------------------------------------------------------------------- 1 | export const Demo = ({}) =>
; 2 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | 13 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/types/custom-imports.d.ts: -------------------------------------------------------------------------------- 1 | declare module '!!raw-loader!*' { 2 | const content: string; 3 | export default content; 4 | } 5 | 6 | declare module 'vite' { 7 | export function defineConfig(config: any): any; 8 | } 9 | 10 | declare module '@vitejs/plugin-react' { 11 | const react: any; 12 | export default react; 13 | } 14 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// ` 2 | -------------------------------------------------------------------------------- /modules/docs/lib/stackblitzFiles/vite.config.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import {defineConfig} from 'vite'; 4 | 5 | import react from '@vitejs/plugin-react'; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig({ 9 | plugins: [react()], 10 | }); 11 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/array.tsx: -------------------------------------------------------------------------------- 1 | import {ArrayValue} from '../../docgen/docTypes'; 2 | import {registerWidget, Value} from '../Value'; 3 | import {RenderContext} from '../widgetUtils'; 4 | 5 | registerWidget('array', ({value}) => { 6 | return ( 7 | 8 | 9 | [] 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/canvasColor.tsx: -------------------------------------------------------------------------------- 1 | import {colors} from '@workday/canvas-kit-react/tokens'; 2 | import {ColorPicker} from '@workday/canvas-kit-preview-react/color-picker'; 3 | 4 | import {CanvasColorValue} from '../../docgen/plugins/customTypes'; 5 | import {registerWidget} from '../Value'; 6 | 7 | registerWidget('canvasColor', () => { 8 | return ( 9 | {}} /> 10 | ); 11 | }); 12 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/component.tsx: -------------------------------------------------------------------------------- 1 | import {ComponentValue} from '../../docgen/plugins/customTypes'; 2 | import {PropertiesTable, registerWidget} from '../Value'; 3 | import {Heading} from '../widgetUtils'; 4 | 5 | registerWidget('component', ({value, doc, meta}) => { 6 | return ( 7 | <> 8 | 9 | Props 10 | 11 | 12 | 13 | ); 14 | }); 15 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/conditional.tsx: -------------------------------------------------------------------------------- 1 | import {ConditionalTypeValue} from '../../docgen/docTypes'; 2 | import {registerWidget, Value} from '../Value'; 3 | 4 | registerWidget('conditional', ({value}) => { 5 | return ( 6 | <> 7 | extends{' '} 8 | ? :{' '} 9 | 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/external.tsx: -------------------------------------------------------------------------------- 1 | import {ExternalHyperlink} from '@workday/canvas-kit-react/button'; 2 | 3 | import {renderTypeParameters} from '../widgetUtils'; 4 | import {ExternalSymbolValue} from '../../docgen/docTypes'; 5 | 6 | import {registerWidget} from '../Value'; 7 | 8 | registerWidget('external', ({value}) => ( 9 | <> 10 | 11 | {value.name} 12 | 13 | {renderTypeParameters(value.typeParameters)} 14 | 15 | )); 16 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/index.ts: -------------------------------------------------------------------------------- 1 | import './array'; 2 | import './callExpression'; 3 | import './canvasColor'; 4 | import './component'; 5 | import './conditional'; 6 | import './enhancedComponent'; 7 | import './external'; 8 | import './function'; 9 | import './model'; 10 | import './object'; 11 | import './intersection'; 12 | import './parenthesis'; 13 | import './primitives'; 14 | import './symbol'; 15 | import './tuple'; 16 | import './typeParameter'; 17 | import './union'; 18 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/parenthesis.tsx: -------------------------------------------------------------------------------- 1 | import {ParenthesisValue} from '../../docgen/docTypes'; 2 | import {registerWidget, Value} from '../Value'; 3 | 4 | registerWidget('parenthesis', ({value}) => { 5 | return ( 6 | 7 | ( 8 | 9 | ) 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/qualifiedName.tsx: -------------------------------------------------------------------------------- 1 | import {QualifiedNameValue} from '../../docgen/docTypes'; 2 | import {registerWidget, Value} from '../Value'; 3 | 4 | registerWidget('qualifiedName', ({value}) => { 5 | return ( 6 | <> 7 | 8 | . 9 | 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/symbol.tsx: -------------------------------------------------------------------------------- 1 | import {SymbolValue} from '../../docgen/docTypes'; 2 | import {registerWidget} from '../Value'; 3 | import {SymbolDialog} from '../widgetUtils'; 4 | 5 | registerWidget('symbol', ({value}) => { 6 | return ; 7 | }); 8 | -------------------------------------------------------------------------------- /modules/docs/lib/widgets/tuple.tsx: -------------------------------------------------------------------------------- 1 | import {TupleValue} from '../../docgen/docTypes'; 2 | import {registerWidget, Value} from '../Value'; 3 | import {RenderContext} from '../widgetUtils'; 4 | 5 | registerWidget('tuple', ({value}) => { 6 | return ( 7 | 8 | [ 9 | {value.value.map((v, i) => ( 10 | 11 | ))} 12 | ] 13 | 14 | ); 15 | }); 16 | -------------------------------------------------------------------------------- /modules/docs/mdx/CK-banner-temp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Workday/canvas-kit/60e23d05fa006d402e49a3abffa25038bca2960b/modules/docs/mdx/CK-banner-temp.jpg -------------------------------------------------------------------------------- /modules/docs/mdx/GETTING_STARTED.mdx: -------------------------------------------------------------------------------- 1 | import Readme from '../../../README.md'; 2 | import Markdown from '../../../utils/storybook/Markdown.tsx'; 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/docs/mdx/Versions.mdx: -------------------------------------------------------------------------------- 1 | import {Meta} from '@storybook/addon-docs'; 2 | import {VersionTable} from './versionsTable'; 3 | 4 | 5 | 6 | ## Released Versions 7 | 8 | Reference older versions documentation when needed. 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/docs/mdx/changelog.mdx: -------------------------------------------------------------------------------- 1 | import Changelog from '../../../CHANGELOG.md'; 2 | import Markdown from '../../../utils/storybook/Markdown.tsx'; 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/docs/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/fixtures", "**/stories", "**/lib/stackblitz"] 4 | } 5 | -------------------------------------------------------------------------------- /modules/docs/utils/build-specifications.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const util = require('util'); 3 | const path = require('path'); 4 | const writeFile = util.promisify(fs.writeFile); 5 | const getSpecifications = require('./get-specifications'); 6 | 7 | getSpecifications().then(async specs => { 8 | const contents = `module.exports = {specifications: ${JSON.stringify(specs, null, ' ')}};`; 9 | 10 | await writeFile(path.join(__dirname, '../dist/es6/lib/specs.js'), contents); 11 | }); 12 | -------------------------------------------------------------------------------- /modules/labs-css/.gitignore: -------------------------------------------------------------------------------- 1 | *.css 2 | -------------------------------------------------------------------------------- /modules/labs-css/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Labs CSS 2 | 3 | The bundle package containing all modules of the Canvas Kit Labs CSS. The contents are 4 | auto-generated from the Canvas Kit Labs React source code. 5 | -------------------------------------------------------------------------------- /modules/labs-react/combobox/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Combobox'; 2 | -------------------------------------------------------------------------------- /modules/labs-react/combobox/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/labs-react/combobox/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/labs-react/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/theming'; 2 | -------------------------------------------------------------------------------- /modules/labs-react/common/lib/theming/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useThemeRTL'; 2 | -------------------------------------------------------------------------------- /modules/labs-react/common/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/labs-react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './combobox'; 2 | export * from './search-form'; 3 | -------------------------------------------------------------------------------- /modules/labs-react/search-form/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Search Form 2 | 3 | A search form that contains a combobox for rendering search results 4 | 5 | For more detailed information on this component, please refer to the 6 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/labs-search-form) 7 | -------------------------------------------------------------------------------- /modules/labs-react/search-form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/SearchForm'; 2 | export * from './lib/themes'; 3 | -------------------------------------------------------------------------------- /modules/labs-react/search-form/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {SearchForm} from '../lib/SearchForm'; 7 | 8 | describe('SearchForm', () => { 9 | it('should render on a server without crashing', () => { 10 | // eslint-disable-next-line no-empty-function 11 | const handleSubmit = () => {}; 12 | const ssrRender = () => renderToString(); 13 | expect(ssrRender).not.toThrow(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /modules/labs-react/search-form/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/labs-react/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/labs-react/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/labs-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/stories"], 4 | "compilerOptions": { 5 | "plugins": [ 6 | { 7 | "transform": "../styling-transform" 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/popup-stack/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/PopupStack'; 2 | -------------------------------------------------------------------------------- /modules/popup-stack/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/popup-stack/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "declaration": true, 6 | "module": "commonjs", 7 | "outDir": "dist/commonjs", 8 | "skipLibCheck": true, 9 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/popup-stack/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "declaration": true, 6 | "outDir": "dist/es6", 7 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/popup-stack/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../tsconfig.json", 4 | "exclude": ["node_modules", "ts-tmp", "dist", "spec", "stories"] 5 | } 6 | -------------------------------------------------------------------------------- /modules/preview-css/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.css 3 | -------------------------------------------------------------------------------- /modules/preview-css/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Preview CSS 2 | 3 | The bundle package containing all modules of the Canvas Kit Preview CSS. The contents are 4 | auto-generated from the Canvas Kit Preview React source code. 5 | -------------------------------------------------------------------------------- /modules/preview-react/_examples/stories/mdx/FormLibraryExample.mdx: -------------------------------------------------------------------------------- 1 | import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; 2 | import {TextInputWithReactHookForm} from './examples/TextInputWithReactHookForm'; 3 | import * as FormStories from './FormLibraryExample.stories'; 4 | 5 | 6 | 7 | 8 | ## Uncontrolled Text Inputs Using React Hook Form 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/preview-react/_examples/stories/mdx/FormLibraryExample.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta} from '@storybook/react'; 2 | 3 | import {TextInputWithReactHookForm as TextInputWithReactHookFormExample} from './examples/TextInputWithReactHookForm'; 4 | 5 | export default { 6 | title: 'Examples/Forms', 7 | parameters: {}, 8 | } as Meta; 9 | 10 | export const TextInputWithReactHookForm = { 11 | render: TextInputWithReactHookFormExample, 12 | }; 13 | -------------------------------------------------------------------------------- /modules/preview-react/color-picker/index.ts: -------------------------------------------------------------------------------- 1 | export {ColorPicker, ColorPickerProps} from './lib/ColorPicker'; 2 | -------------------------------------------------------------------------------- /modules/preview-react/color-picker/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/color-picker/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/divider/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Canvas Kit Divider 3 | 4 | 5 | PREVIEW: Beta 6 | This component is work in progress and currently in prerelease. 7 | 8 | A divider to segment and visually organize content 9 | 10 | View the [documentation for Divider](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react) 11 | on Storybook. 12 | -------------------------------------------------------------------------------- /modules/preview-react/divider/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Divider'; 2 | -------------------------------------------------------------------------------- /modules/preview-react/divider/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Divider} from '../'; 7 | 8 | describe('Divider', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => renderToString(); 11 | expect(ssrRender).not.toThrow(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/preview-react/divider/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/divider/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './color-picker'; 2 | export * from './divider'; 3 | export * from './loading-sparkles'; 4 | export * from './menu'; 5 | export * from './pill'; 6 | export * from './radio'; 7 | export * from './segmented-control'; 8 | export * from './select'; 9 | export * from './side-panel'; 10 | export * from './status-indicator'; 11 | export * from './text-area'; 12 | export * from './text-input'; 13 | export * from './information-highlight'; 14 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Information Highlight 2 | 3 | 4 | PREVIEW: Beta 5 | This component is work in progress and currently in prerelease. 6 | 7 | A information highlight component to highlight and prioritize content 8 | 9 | View the [documentation for Information Highlight](https://workday.github.io/canvas-kit/?path=/docs/preview-information-highlight--docs) 10 | on Storybook. 11 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/InformationHighlight'; 2 | export * from './lib/parts/Body'; 3 | export * from './lib/parts/Heading'; 4 | export * from './lib/parts/Icon'; 5 | export * from './lib/parts/Link'; 6 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/lib/hooks/useInformationHighlightModel.ts: -------------------------------------------------------------------------------- 1 | import {createModelHook} from '@workday/canvas-kit-react/common'; 2 | 3 | export const useInformationHighlightModel = createModelHook({ 4 | defaultConfig: { 5 | variant: 'informational' as 'informational' | 'caution' | 'critical', 6 | emphasis: 'low' as 'low' | 'high', 7 | }, 8 | })(config => { 9 | return { 10 | state: { 11 | variant: config.variant, 12 | emphasis: config.emphasis, 13 | }, 14 | events: {}, 15 | }; 16 | }); 17 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/stories/examples/Body.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight'; 4 | 5 | export const Body = () => { 6 | return ( 7 | 8 | 9 | Only the body of an information highlight 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/stories/examples/Heading.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight'; 4 | 5 | export const Heading = () => { 6 | return ( 7 | 8 | Only Heading 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /modules/preview-react/information-highlight/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Loading Sparkles 2 | 3 | View the 4 | [documentation for Loading Sparkles](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-loading-sparkles-react--basic) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/LoadingSparkles'; 2 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/spec/LoadingSparkles.spec.tsx: -------------------------------------------------------------------------------- 1 | import {LoadingSparkles} from '../lib/LoadingSparkles'; 2 | 3 | describe('LoadingSparkles', () => { 4 | verifyComponent(LoadingSparkles, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/stories/examples/RTL.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {LoadingSparkles} from '@workday/canvas-kit-preview-react/loading-sparkles'; 3 | import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common'; 4 | 5 | export const RTL = () => { 6 | const theme = { 7 | canvas: { 8 | direction: ContentDirection.RTL, 9 | }, 10 | }; 11 | return ( 12 | 13 | 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /modules/preview-react/loading-sparkles/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/menu/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Menu 2 | 3 | View the 4 | [documentation for Menu](https://workday.github.io/canvas-kit/?path=/docs/preview-menu-react--default) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/popups/menus) 8 | -------------------------------------------------------------------------------- /modules/preview-react/menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Menu'; 2 | export * from './lib/MenuItem'; 3 | -------------------------------------------------------------------------------- /modules/preview-react/menu/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/menu/stories/examples/CustomMenuItem.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {DeprecatedMenu, DeprecatedMenuItem} from '@workday/canvas-kit-preview-react/menu'; 4 | 5 | export const CustomMenuItem = () => { 6 | return ( 7 | 8 | First Item 9 | Second Item 10 |
  • 11 | Third Item (custom) 12 |
  • 13 |
    14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /modules/preview-react/menu/stories/examples/ManyItems.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {DeprecatedMenu, DeprecatedMenuItem} from '@workday/canvas-kit-preview-react/menu'; 4 | 5 | export const ManyItems = () => { 6 | return ( 7 | 8 | {'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen' 9 | .split(' ') 10 | .map(item => { 11 | return Item {item}; 12 | })} 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /modules/preview-react/menu/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/multi-select/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Preview React MultiSelect 2 | 3 | View the 4 | [documentation for MultiSelect](https://workday.github.io/canvas-kit/?path=/docs/preview-multi-select-react--basic) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/preview-react/multi-select/index.ts: -------------------------------------------------------------------------------- 1 | export {useMultiSelectInput} from './lib/MultiSelectInput'; 2 | export {useMultiSelectModel} from './lib/useMultiSelectModel'; 3 | 4 | export {MultiSelect} from './lib/MultiSelect'; 5 | -------------------------------------------------------------------------------- /modules/preview-react/multi-select/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/multi-select/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/pill/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Preview React Pill 2 | 3 | View the 4 | [documentation for Pill](https://workday.github.io/canvas-kit/?path=/docs/preview-pill-react--basic) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/preview-react/pill/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Pill'; 2 | export * from './lib/usePillModel'; 3 | export {pillCountStencil} from './lib/PillCount'; 4 | export {pillIconButtonStencil} from './lib/PillIconButton'; 5 | export {pillIconStencil} from './lib/PillIcon'; 6 | export {pillLabelStencil} from './lib/PillLabel'; 7 | export {pillStencil, removeablePillStencil, readyOnlyPillStencil} from './lib/Pill'; 8 | -------------------------------------------------------------------------------- /modules/preview-react/pill/lib/usePillModel.tsx: -------------------------------------------------------------------------------- 1 | import {createModelHook, useUniqueId} from '@workday/canvas-kit-react/common'; 2 | 3 | export const usePillModel = createModelHook({ 4 | defaultConfig: { 5 | /** 6 | * Used to disable a pill and apply the correct styles. 7 | */ 8 | disabled: false, 9 | /** 10 | * ID used to add accessibility labels to pill elements. 11 | * @default `useUniqueId()` 12 | */ 13 | id: '', 14 | }, 15 | })(config => { 16 | const id = useUniqueId(config.id); 17 | const state = { 18 | ...config, 19 | id, 20 | }; 21 | 22 | return {state, events: {}}; 23 | }); 24 | -------------------------------------------------------------------------------- /modules/preview-react/pill/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Pill} from '../'; 7 | 8 | describe('Pill', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => 11 | renderToString( 12 | 13 | 14 | Pill Label 15 | 16 | ); 17 | expect(ssrRender).not.toThrow(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /modules/preview-react/pill/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/pill/stories/examples/test-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Workday/canvas-kit/60e23d05fa006d402e49a3abffa25038bca2960b/modules/preview-react/pill/stories/examples/test-avatar.png -------------------------------------------------------------------------------- /modules/preview-react/pill/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/radio/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/RadioGroup'; 2 | export * from './lib/hooks/useRadioModel'; 3 | export * from './lib/StyledRadioButton'; 4 | -------------------------------------------------------------------------------- /modules/preview-react/radio/spec/RadioLabel.spec.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {render} from '@testing-library/react'; 3 | import {RadioGroup} from '@workday/canvas-kit-preview-react/radio'; 4 | 5 | describe('RadioLabel', () => { 6 | it('should render a Label with text', () => { 7 | const testText = 'Test Radio'; 8 | const {getByText} = render({testText}); 9 | expect(getByText(testText)).toBeDefined(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /modules/preview-react/radio/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/radio/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/segmented-control/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Segmented Control 2 | 3 | `SegmentedControl` contains primary and secondary actions related to a page or task. 4 | 5 | For more detailed information on this component, please refer to the 6 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/preview-segmented-control-react--basic) 7 | -------------------------------------------------------------------------------- /modules/preview-react/segmented-control/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/SegmentedControl'; 2 | export * from './lib/hooks/useSegmentedControlModel'; 3 | export * from './lib/hooks/useSegmentedControlItem'; 4 | export {useSegmentedControlList} from './lib/SegmentedControlList'; 5 | -------------------------------------------------------------------------------- /modules/preview-react/segmented-control/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/segmented-control/stories/examples/TextOnly.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {SegmentedControl} from '@workday/canvas-kit-preview-react/segmented-control'; 3 | 4 | export const TextOnly = () => ( 5 | 6 | 7 | Table 8 | List 9 | Diagram 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /modules/preview-react/segmented-control/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/select/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Select'; 2 | 3 | export { 4 | Option, 5 | RenderableOption, 6 | RenderOptionFunction, 7 | RenderSelectedFunction, 8 | } from './lib/SelectBase'; 9 | -------------------------------------------------------------------------------- /modules/preview-react/select/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Select} from '../'; 7 | 8 | const options = [ 9 | {label: 'E-mail', value: 'email'}, 10 | {label: 'Phone', value: 'phone'}, 11 | ]; 12 | 13 | describe('Select', () => { 14 | it('should render on a server without crashing', () => { 15 | const ssrRender = () => renderToString( 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-area/stories/examples/Disabled.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextArea} from '@workday/canvas-kit-preview-react/text-area'; 3 | 4 | export const Disabled = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-area/stories/examples/Grow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextArea} from '@workday/canvas-kit-preview-react/text-area'; 3 | 4 | export const Grow = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-area/stories/examples/Required.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextArea} from '@workday/canvas-kit-preview-react/text-area'; 3 | 4 | export const Required = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-area/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Text Input 2 | 3 | View the 4 | [documentation for Text Input](https://workday.github.io/canvas-kit/?path=/docs/preview-inputs-text-input-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference: Text Input](https://design.workday.com/components/inputs/text-input) 8 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/TextInput'; 2 | export * from './lib/hooks'; 3 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useTextInputField'; 2 | export * from './useTextInputModel'; 3 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/lib/hooks/useTextInputModel.ts: -------------------------------------------------------------------------------- 1 | import {useFormFieldModel} from '@workday/canvas-kit-react/form-field'; 2 | 3 | /** 4 | * @deprecated ⚠️ `useTextInputModel` in Preview has been deprecated and will be removed in a future major version. Please use [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic) instead. 5 | */ 6 | export const useTextInputModel = useFormFieldModel; 7 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Basic = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Disabled.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Disabled = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Grow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Grow = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Street Address 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Hidden.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Hidden = () => { 5 | return ( 6 | <> 7 |

    Inspect Element to see the markup

    8 | 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/LabelPositionHorizontal.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const LabelPositionHorizontal = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/LabelPositionVertical.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const LabelPositionVertical = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Password.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Password = () => { 5 | const [value, setValue] = React.useState('SuperSecret1'); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Password 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Placeholder.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Placeholder = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/ReadOnly.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const ReadOnly = () => { 5 | return ( 6 | 7 | Unwavering Opinion 8 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/examples/Required.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {TextInput} from '@workday/canvas-kit-preview-react/text-input'; 3 | 4 | export const Required = () => { 5 | const [value, setValue] = React.useState(''); 6 | 7 | const handleChange = (event: React.ChangeEvent) => { 8 | setValue(event.target.value); 9 | }; 10 | 11 | return ( 12 | 13 | Email 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/preview-react/text-input/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/preview-react/tokens/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/preview-react/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/preview-react/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/preview-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/stories"], 4 | "compilerOptions": { 5 | "plugins": [ 6 | { 7 | "transform": "../styling-transform" 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/react-fonts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/fonts'; 2 | -------------------------------------------------------------------------------- /modules/react-fonts/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/react-fonts/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/react-fonts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "spec", "stories"] 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React 2 | 3 | The bundle package containing all modules of the Canvas Kit React. 4 | 5 | > Note: By default, no fonts are included with Canvas Kit modules. To use official Canvas Kit fonts, 6 | > install and import the `@workday/canvas-kit-react-fonts` module in addition to 7 | > `@workday/canvas-kit-react`. By installing `@workday/canvas-kit-react-fonts` you are opting in to 8 | > using the Workday CDN. 9 | -------------------------------------------------------------------------------- /modules/react/_examples/stories/mdx/CookieBanner.mdx: -------------------------------------------------------------------------------- 1 | import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; 2 | import {BasicExample} from './examples/CookieBanner'; 3 | 4 | 5 | 6 | # Canvas Kit Examples 7 | 8 | ## CookieBanner 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/react/_examples/stories/mdx/Density.mdx: -------------------------------------------------------------------------------- 1 | import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; 2 | import {Density} from './examples/Density'; 3 | 4 | 5 | 6 | # Canvas Kit Density Examples 7 | 8 | Although we currently don't support a density system, it's common practice to provide varying 9 | options to users, especially in the context of forms. Below is an example of how you can style our 10 | from elements to achieve the desired density. 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/react/_examples/stories/mdx/FormsWithFormik.mdx: -------------------------------------------------------------------------------- 1 | import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; 2 | import {SelectWithFormik} from './examples/SelectWithFormik'; 3 | 4 | 5 | 6 | # Canvas Kit Examples 7 | 8 | ## Select Using Formik 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/react/_examples/stories/mdx/MediaModal.mdx: -------------------------------------------------------------------------------- 1 | import {ExampleCodeBlock} from '@workday/canvas-kit-docs'; 2 | import {BasicExample} from './examples/MediaModal'; 3 | 4 | 5 | 6 | ## Media Modal example 7 | 8 | These are modals that have an image or video as the primary content. The example can use a special 9 | `MediaContainer` component that allows for media to take up more space in the Modal. 10 | 11 | 12 | -------------------------------------------------------------------------------- /modules/react/action-bar/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Action Bar 2 | 3 | `ActionBar` contains primary and secondary actions related to a page or task. 4 | 5 | For more detailed information on this component, please refer to the 6 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/components-buttons-action-bar-react--basic) -------------------------------------------------------------------------------- /modules/react/action-bar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/ActionBar'; 2 | export * from './lib/useActionBarModel'; 3 | -------------------------------------------------------------------------------- /modules/react/action-bar/spec/ActionBar.spec.tsx: -------------------------------------------------------------------------------- 1 | import {ActionBar} from '../lib/ActionBar'; 2 | import {useActionBarModel} from '../lib/useActionBarModel'; 3 | 4 | describe('ActionBar.Item', () => { 5 | verifyComponent(ActionBar.Item, {modelFn: useActionBarModel}); 6 | }); 7 | -------------------------------------------------------------------------------- /modules/react/action-bar/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/action-bar/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import {ActionBar} from '@workday/canvas-kit-react/action-bar'; 2 | import {PrimaryButton} from '@workday/canvas-kit-react/button'; 3 | 4 | export const Basic = () => { 5 | return ( 6 | 7 | 8 | console.log('first action')}> 9 | First Action 10 | 11 | Second Action 12 | 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /modules/react/action-bar/stories/examples/DeleteAction.tsx: -------------------------------------------------------------------------------- 1 | import {ActionBar} from '@workday/canvas-kit-react/action-bar'; 2 | import {DeleteButton} from '@workday/canvas-kit-react/button'; 3 | 4 | export const DeleteAction = () => { 5 | return ( 6 | 7 | 8 | Delete Action 9 | Second Action 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/action-bar/stories/examples/index.ts: -------------------------------------------------------------------------------- 1 | export {Basic} from './Basic'; 2 | export {DeleteAction} from './DeleteAction'; 3 | export {Icons} from './Icons'; 4 | export {OverflowActionBar} from './OverflowActionBar'; 5 | export {OverflowActionBarCustomButtonCount} from './OverflowActionBarCustomButtonCount'; 6 | -------------------------------------------------------------------------------- /modules/react/action-bar/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Avatar'; 2 | -------------------------------------------------------------------------------- /modules/react/avatar/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Avatar} from '../lib/Avatar'; 7 | 8 | describe('Avatar', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => renderToString(); 11 | expect(ssrRender).not.toThrow(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/avatar/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/avatar/stories/avatar/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import {Avatar} from '@workday/canvas-kit-react/avatar'; 2 | import {createStyles} from '@workday/canvas-kit-styling'; 3 | import {system} from '@workday/canvas-tokens-web'; 4 | 5 | const handleAvatarButtonClick = () => console.log('AvatarButton clicked'); 6 | 7 | const containerStyles = createStyles({ 8 | display: 'inline-flex', 9 | gap: system.space.x2, 10 | }); 11 | 12 | export const Basic = () => ( 13 |
    14 | 15 | 16 |
    17 | ); 18 | -------------------------------------------------------------------------------- /modules/react/avatar/stories/avatar/examples/LazyLoad.tsx: -------------------------------------------------------------------------------- 1 | import {Avatar} from '@workday/canvas-kit-react/avatar'; 2 | // @ts-ignore: Cannot find module error 3 | import testAvatar from './test-avatar.png'; 4 | 5 | export const LazyLoad = () => ( 6 |
    7 | {Array.from({length: 5}, (v, index) => ( 8 | <> 9 | ( 4 |
    5 |

    Light

    6 | 7 |

    Dark

    8 | 9 |
    10 | ); 11 | -------------------------------------------------------------------------------- /modules/react/avatar/stories/avatar/examples/test-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Workday/canvas-kit/60e23d05fa006d402e49a3abffa25038bca2960b/modules/react/avatar/stories/avatar/examples/test-avatar.png -------------------------------------------------------------------------------- /modules/react/avatar/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/badge/eslintrc.js: -------------------------------------------------------------------------------- 1 | require('../../../eslintrc.js'); 2 | -------------------------------------------------------------------------------- /modules/react/badge/index.ts: -------------------------------------------------------------------------------- 1 | export {CountBadge, CountBadgeProps} from './lib/CountBadge'; 2 | -------------------------------------------------------------------------------- /modules/react/badge/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/badge/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/banner/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Banner 2 | 3 | View the 4 | [documentation for Banner](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-banner-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/indicators/banners) -------------------------------------------------------------------------------- /modules/react/banner/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Banner'; 2 | export * from './lib/hooks/'; 3 | -------------------------------------------------------------------------------- /modules/react/banner/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | import {getPaletteColors} from './useThemedPalette'; 2 | export * from './useBannerModel'; 3 | export * from './useThemedPalette'; 4 | export * from './useBannerIcon'; 5 | export * from './useBannerLabel'; 6 | export * from './useBannerActionText'; 7 | export {getPaletteColors}; 8 | -------------------------------------------------------------------------------- /modules/react/banner/lib/hooks/useBannerActionText.tsx: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useBannerModel} from './useBannerModel'; 3 | 4 | /** 5 | * Adds the necessary props to a `ActionText` component. 6 | * Used by the Banner.ActionText subcomponent 7 | */ 8 | export const useBannerActionText = createElemPropsHook(useBannerModel)(({state}) => { 9 | return { 10 | id: `action-${state.id}`, 11 | }; 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/banner/lib/hooks/useBannerIcon.tsx: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {exclamationCircleIcon, exclamationTriangleIcon} from '@workday/canvas-system-icons-web'; 3 | import {useBannerModel} from './useBannerModel'; 4 | 5 | /** 6 | * Adds the necessary props to a `Icon` component. 7 | * Used by the Banner.Icon subcomponent 8 | */ 9 | export const useBannerIcon = createElemPropsHook(useBannerModel)(({state}) => { 10 | return { 11 | icon: state.hasError ? exclamationCircleIcon : exclamationTriangleIcon, 12 | size: 24, 13 | }; 14 | }); 15 | -------------------------------------------------------------------------------- /modules/react/banner/lib/hooks/useBannerLabel.tsx: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useBannerModel} from './useBannerModel'; 3 | 4 | /** 5 | * Adds the necessary props to a `Label` component. 6 | * Used by the Banner.Label subcomponent 7 | */ 8 | export const useBannerLabel = createElemPropsHook(useBannerModel)(({state}) => { 9 | return { 10 | id: `label-${state.id}`, 11 | }; 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/banner/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/banner/stories/examples/ActionText.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {Banner} from '@workday/canvas-kit-react/banner'; 4 | 5 | export const ActionText = () => { 6 | return ( 7 | 8 | 9 | 3 Warnings 10 | Show Details 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/banner/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {Banner} from '@workday/canvas-kit-react/banner'; 4 | 5 | export const Basic = () => { 6 | return ( 7 | console.log('clicked banner')}> 8 | 9 | 3 Warnings 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/banner/stories/examples/Error.tsx: -------------------------------------------------------------------------------- 1 | import {Banner} from '@workday/canvas-kit-react/banner'; 2 | 3 | export const Error = () => { 4 | return ( 5 | 6 | 7 | 3 Errors 8 | 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /modules/react/banner/stories/examples/IconBanner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {Banner} from '@workday/canvas-kit-react/banner'; 4 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 5 | import {styled} from '@workday/canvas-kit-react/common'; 6 | 7 | export const IconBanner = () => { 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /modules/react/banner/stories/examples/Sticky.tsx: -------------------------------------------------------------------------------- 1 | import {Box} from '@workday/canvas-kit-react/layout'; 2 | import {Banner} from '@workday/canvas-kit-react/banner'; 3 | import {styled} from '@workday/canvas-kit-react/common'; 4 | 5 | const StyledBanner = styled(Banner)({ 6 | position: 'absolute', 7 | right: 0, 8 | }); 9 | 10 | export const Sticky = () => { 11 | return ( 12 | 13 | 14 | 15 | 3 Errors 16 | 17 | 18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /modules/react/banner/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Breadcrumbs 2 | 3 | Breadcrumbs is a 4 | [compound component](/getting-started/for-developers/resources/compound-components/) that allows 5 | users to keep track and maintain awareness of their location as they navigate through pages, 6 | folders, files, etc. 7 | 8 | For more detailed information on this component, please refer to the 9 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/components-navigation-breadcrumbs-react--basic) 10 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Breadcrumbs'; 2 | export * from './lib/hooks/useBreadcrumbsModel'; 3 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Breadcrumbs} from '../'; 7 | 8 | describe('Breadcrumbs', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => 11 | renderToString( 12 | 13 | 14 | Item 15 | 16 | 17 | ); 18 | expect(ssrRender).not.toThrow(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/stories/examples/CurrentItemTruncation.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs'; 3 | 4 | export const CurrentItemTruncation = () => { 5 | return ( 6 | 7 | Foccacia Genovese 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/stories/examples/LinkTruncation.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {Breadcrumbs} from '@workday/canvas-kit-react/breadcrumbs'; 3 | 4 | export const LinkTruncation = () => { 5 | return ( 6 | 7 | Small Plates & Appetizers 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /modules/react/breadcrumbs/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/button/lib/parts/index.tsx: -------------------------------------------------------------------------------- 1 | export {ButtonLabel} from './ButtonLabel'; 2 | export {ButtonLabelIcon} from './ButtonLabelIcon'; 3 | -------------------------------------------------------------------------------- /modules/react/button/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/button/stories/button/examples/ExternalHyperlink.tsx: -------------------------------------------------------------------------------- 1 | import {ExternalHyperlink} from '@workday/canvas-kit-react/button'; 2 | 3 | export const ExternalLink = () => ( 4 | 5 | External Hyperlink 6 | 7 | ); 8 | -------------------------------------------------------------------------------- /modules/react/button/stories/button/examples/Hyperlink.tsx: -------------------------------------------------------------------------------- 1 | import {Hyperlink} from '@workday/canvas-kit-react/button'; 2 | 3 | export const Link = () => Hyperlink; 4 | -------------------------------------------------------------------------------- /modules/react/button/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/card/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Card 2 | 3 | View the 4 | [documentation for Card](https://workday.github.io/canvas-kit/?path=/docs/components-containers-card-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/containers/cards) 8 | -------------------------------------------------------------------------------- /modules/react/card/index.ts: -------------------------------------------------------------------------------- 1 | export {Card, cardStencil} from './lib/Card'; 2 | export {cardHeadingStencil} from './lib/CardHeading'; 3 | export {cardBodyStencil} from './lib/CardBody'; 4 | -------------------------------------------------------------------------------- /modules/react/card/spec/Card.spec.tsx: -------------------------------------------------------------------------------- 1 | import {Card} from '../lib/Card'; 2 | 3 | describe('Card', () => { 4 | verifyComponent(Card, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/react/card/spec/CardBody.spec.tsx: -------------------------------------------------------------------------------- 1 | import {CardBody} from '../lib/CardBody'; 2 | 3 | describe('CardBody', () => { 4 | verifyComponent(CardBody, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/react/card/spec/CardHeading.spec.tsx: -------------------------------------------------------------------------------- 1 | import {CardHeading} from '../lib/CardHeading'; 2 | 3 | describe('CardHeading', () => { 4 | verifyComponent(CardHeading, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/react/card/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/card/stories/card.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './card.mdx'; 4 | 5 | import {Card} from '@workday/canvas-kit-react/card'; 6 | 7 | import {Basic as BasicExample} from './examples/Basic'; 8 | 9 | export default { 10 | title: 'Components/Containers/Card', 11 | component: Card, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/card/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Card} from '@workday/canvas-kit-react/card'; 3 | 4 | export const Basic = () => { 5 | return ( 6 | 7 | Canvas Supreme 8 | 9 | Our house special supreme pizza includes pepperoni, sausage, bell peppers, mushrooms, 10 | onions, and oregano. 11 | 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /modules/react/card/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/checkbox/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Checkbox 2 | 3 | View the 4 | [documentation for Checkbox](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-checkbox-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/checkboxes) 8 | -------------------------------------------------------------------------------- /modules/react/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Checkbox'; 2 | -------------------------------------------------------------------------------- /modules/react/checkbox/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/collection/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Collection 2 | 3 | Collection System 4 | 5 | ## Installation 6 | 7 | ```sh 8 | yarn add @workday/canvas-kit-react 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```tsx 14 | import * as React from 'react'; 15 | import {Collection} from '@workday/canvas-kit-react/collection'; 16 | 17 | ; 18 | ``` 19 | 20 | ## Static Properties 21 | 22 | > None 23 | 24 | ## Component Props 25 | 26 | ### Required 27 | 28 | > None 29 | 30 | ### Optional 31 | 32 | > None 33 | -------------------------------------------------------------------------------- /modules/react/collection/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/collection/stories/mdx/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {ListBox} from '@workday/canvas-kit-react/collection'; 4 | 5 | export const Basic = () => { 6 | return ( 7 | 8 | First 9 | Second 10 | 11 | ); 12 | }; 13 | -------------------------------------------------------------------------------- /modules/react/collection/stories/mdx/examples/DynamicItemsStrings.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {ListBox} from '@workday/canvas-kit-react/collection'; 4 | 5 | const items = ['Pizza', 'Chocolate', 'Cheeseburgers']; 6 | 7 | export const DynamicItemsStrings = () => ( 8 | {item => {item}} 9 | ); 10 | -------------------------------------------------------------------------------- /modules/react/collection/stories/mdx/examples/IdentifiedItems.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {ListBox} from '@workday/canvas-kit-react/collection'; 4 | 5 | export const IdentifiedItems = () => { 6 | return ( 7 | 8 | First 9 | Second 10 | 11 | ); 12 | }; 13 | -------------------------------------------------------------------------------- /modules/react/collection/stories/mdx/examples/Virtualization.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {ListBox} from '@workday/canvas-kit-react/collection'; 4 | 5 | interface Item { 6 | id: string; 7 | text: string; 8 | } 9 | 10 | const items: Item[] = Array(1000) 11 | .fill(true) 12 | .map((_, index) => ({id: String(index + 1), text: `Item - ${index + 1}`})); 13 | 14 | export const Virtualization = () => { 15 | return ( 16 | 17 | {(item: Item) => {item.text}} 18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /modules/react/collection/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/color-picker/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Color Picker 2 | 3 | The Color Picker module includes two components: Color Input and Color Preview. 4 | 5 | View the 6 | [documentation for Color Input](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-color-picker-color-input-react--basic) 7 | on Storybook. 8 | 9 | View the 10 | [documentation for Color Preview](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-color-picker-color-preview-react--basic) 11 | on Storybook. 12 | 13 | [> Workday Design Reference](https://design.workday.com/components/inputs/color-input) 14 | -------------------------------------------------------------------------------- /modules/react/color-picker/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/ColorInput'; 2 | export * from './lib/ColorPreview'; 3 | export * from './lib/parts/ColorSwatch'; 4 | -------------------------------------------------------------------------------- /modules/react/color-picker/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/color-picker/stories/color-preview/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import {ColorPreview} from '@workday/canvas-kit-react/color-picker'; 2 | import {FormField} from '@workday/canvas-kit-react/form-field'; 3 | 4 | export const Basic = () => { 5 | return ( 6 | 7 | Current Color 8 | 9 | 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/color-picker/stories/color-preview/examples/LabelPosition.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {FormField} from '@workday/canvas-kit-react/form-field'; 3 | import {ColorPreview} from '@workday/canvas-kit-react/color-picker'; 4 | 5 | export const LabelPosition = () => { 6 | return ( 7 | 8 | Background Color 9 | 10 | 11 | 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /modules/react/combobox/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Combobox 2 | 3 | Combobox 4 | 5 | View the 6 | [documentation for Combobox](https://workday.github.io/canvas-kit/?path=/docs/features-combobox--autocomplete) 7 | on Storybook. 8 | -------------------------------------------------------------------------------- /modules/react/combobox/lib/ComboboxInput.tsx: -------------------------------------------------------------------------------- 1 | import {createSubcomponent, ExtractProps} from '@workday/canvas-kit-react/common'; 2 | import {TextInput} from '@workday/canvas-kit-react/text-input'; 3 | 4 | import {useComboboxModel} from './hooks/useComboboxModel'; 5 | import {useComboboxInput} from './hooks/useComboboxInput'; 6 | 7 | export const ComboboxInput = createSubcomponent(TextInput)({ 8 | modelHook: useComboboxModel, 9 | elemPropsHook: useComboboxInput, 10 | })>(({children, ...elemProps}, Element) => { 11 | return {children}; 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/combobox/lib/ComboboxMenuItem.tsx: -------------------------------------------------------------------------------- 1 | import {useMenuOption} from '@workday/canvas-kit-react/menu'; 2 | 3 | /** 4 | * @deprecated Use `useMenuOption` instead 5 | */ 6 | export const useComboboxMenuItem = useMenuOption; 7 | -------------------------------------------------------------------------------- /modules/react/combobox/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/combobox/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/common/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/parts'; 2 | export * from './lib/types'; 3 | export * from './lib/genericStyles'; 4 | export * from './lib/theming'; 5 | export * from './lib/styles'; 6 | export * from './lib/utils'; 7 | export * from './lib/AccessibleHide'; 8 | export * from './lib/AriaLiveRegion'; 9 | export * from './lib/CanvasProvider'; 10 | export * from './lib/InputProvider'; 11 | export * from './lib/EllipsisText'; 12 | export * from './lib/responsive/useResponsiveContainerStyles'; 13 | -------------------------------------------------------------------------------- /modules/react/common/lib/EllipsisText.tsx: -------------------------------------------------------------------------------- 1 | import styled, {CSSObject} from '@emotion/styled'; 2 | 3 | import {createComponent} from './utils'; 4 | 5 | export const ellipsisStyles: CSSObject = { 6 | whiteSpace: 'nowrap', 7 | textOverflow: 'ellipsis', 8 | overflow: 'hidden', 9 | }; 10 | 11 | const StyledEllipsisComponent = styled('span')(ellipsisStyles); 12 | 13 | export const EllipsisText = createComponent('span')({ 14 | displayName: 'EllipsisText', 15 | Component(elemProps = {}, ref, Element) { 16 | return ; 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /modules/react/common/lib/parts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './_brand-assets'; 2 | -------------------------------------------------------------------------------- /modules/react/common/lib/styles/index.ts: -------------------------------------------------------------------------------- 1 | export * from './errorRing'; 2 | export * from './focusRing'; 3 | export * from './hideMouseFocus'; 4 | -------------------------------------------------------------------------------- /modules/react/common/lib/theming/index.ts: -------------------------------------------------------------------------------- 1 | export * from './breakpoints'; 2 | export {createCanvasTheme} from './createCanvasTheme'; 3 | export * from './types'; 4 | export {default as styled, StyleRewriteFn, filterOutProps} from './styled'; 5 | export * from './theme'; 6 | export * from './useTheme'; 7 | export * from './useThemedRing'; 8 | export * from './useIsRTL'; 9 | export * from './getObjectProxy'; 10 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/assert.ts: -------------------------------------------------------------------------------- 1 | export function assert(value: boolean, message?: string): asserts value; 2 | export function assert(value: T | null | undefined, message?: string): asserts value is T; 3 | export function assert(value: any, message?: string) { 4 | if (value === false || value === null || typeof value === 'undefined') { 5 | throw new Error(message || 'Assertion failed'); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/isWithinBreakpoint.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This function determines whether or not a container's width is within two values. 3 | */ 4 | export const isWithinBreakpoint = (width: number, min: number, max?: number) => { 5 | return width >= min && (!max || (max && width <= max - 0.5)); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/makeMq.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generates a media queries given a set of named breakpoints 3 | * @param {Object} breakpoints Object of key-value pairs where the key is the name of 4 | * the breakpoint size and the value is the min-width of that breakpoint 5 | * @returns {Object} A set of CSS media queries for each breakpoint size 6 | */ 7 | export const makeMq = (breakpoints: {[key: string]: number}) => { 8 | const mq: {[key: string]: string} = {}; 9 | 10 | Object.keys(breakpoints).forEach(key => { 11 | mq[key] = `@media (min-width: ${breakpoints[key]}px)`; 12 | }); 13 | 14 | return mq; 15 | }; 16 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/slugify.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Function that takes a string and returns a "slug" which can be used in HTML 3 | */ 4 | export function slugify(input: string): string { 5 | return input 6 | .trim() 7 | .replace(/[\.\s_-]+/g, '-') 8 | .replace(/[^\w\s-]/g, '') 9 | .replace(/([A-Z])/g, m => { 10 | return '-' + m.toLowerCase(); 11 | }) 12 | .replace(/^-+|-+$/g, '') 13 | .toLowerCase(); 14 | } 15 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/useConstant.ts: -------------------------------------------------------------------------------- 1 | import {useRef} from 'react'; 2 | 3 | /** 4 | * Get a constant value in React, only running the callback function once. `React.useMemo` does not 5 | * guarantee that a function will only be run once. 6 | * 7 | * @example 8 | * const value = useConstant(generateUniqueId) 9 | */ 10 | export function useConstant(fn: () => T): T { 11 | const ref = useRef(); 12 | 13 | if (!ref.current) { 14 | ref.current = fn(); 15 | } 16 | 17 | return ref.current; 18 | } 19 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/useIsFullscreen.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import screenfull from 'screenfull'; 3 | 4 | export const useIsFullscreen = () => { 5 | const [isFullscreen, setIsFullscreen] = React.useState(false); 6 | 7 | const handler = React.useCallback(() => { 8 | setIsFullscreen(screenfull.isFullscreen); 9 | }, []); 10 | 11 | React.useEffect(() => { 12 | screenfull.on('change', handler); 13 | 14 | return () => { 15 | screenfull.off('change', handler); 16 | }; 17 | }, [handler]); 18 | 19 | return isFullscreen; 20 | }; 21 | -------------------------------------------------------------------------------- /modules/react/common/lib/utils/useResizeObserver.ts: -------------------------------------------------------------------------------- 1 | import useResizeObserver from 'use-resize-observer'; 2 | 3 | export {useResizeObserver}; 4 | -------------------------------------------------------------------------------- /modules/react/common/spec/AccessibleHide.spec.tsx: -------------------------------------------------------------------------------- 1 | import {AccessibleHide} from '../lib/AccessibleHide'; 2 | 3 | describe('AccessibleHide', () => { 4 | verifyComponent(AccessibleHide, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/react/common/spec/AriaLiveRegion.spec.tsx: -------------------------------------------------------------------------------- 1 | import {AriaLiveRegion} from '../lib/AriaLiveRegion'; 2 | 3 | describe('AriaLiveRegion', () => { 4 | verifyComponent(AriaLiveRegion, {}); 5 | }); 6 | -------------------------------------------------------------------------------- /modules/react/common/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import InputProvider from '../lib/InputProvider'; 7 | 8 | describe('InputProvider', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => renderToString(); 11 | expect(ssrRender).not.toThrow(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/common/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/common/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/dialog/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Dialog 2 | 3 | Dialog Component to create non-modal dialogs. Non-modal dialogs do not block the rest of the page 4 | while the dialog is active. 5 | 6 | ## Installation 7 | 8 | ```sh 9 | yarn add @workday/canvas-kit-react 10 | ``` 11 | -------------------------------------------------------------------------------- /modules/react/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Dialog'; 2 | export * from './lib/hooks'; 3 | -------------------------------------------------------------------------------- /modules/react/dialog/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useDialogCard'; 2 | export * from './useDialogModel'; 3 | export * from './useDialogPopper'; 4 | -------------------------------------------------------------------------------- /modules/react/dialog/lib/hooks/useDialogCard.ts: -------------------------------------------------------------------------------- 1 | import {composeHooks, createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {usePopupCard, usePopupModel} from '@workday/canvas-kit-react/popup'; 3 | 4 | export const useDialogCard = composeHooks( 5 | usePopupCard, 6 | createElemPropsHook(usePopupModel)(({state}) => { 7 | return { 8 | id: `dialog-${state.id}`, 9 | }; 10 | }) 11 | ); 12 | -------------------------------------------------------------------------------- /modules/react/dialog/lib/hooks/useDialogPopper.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {usePopupModel} from '@workday/canvas-kit-react/popup'; 3 | import {CSSProperties} from 'react'; 4 | 5 | export const useDialogPopper = createElemPropsHook(usePopupModel)(({state}) => { 6 | return { 7 | 'aria-owns': `dialog-${state.id}`, 8 | style: {position: 'absolute'} as CSSProperties, // make sure the element doesn't participate in Flex 9 | }; 10 | }); 11 | -------------------------------------------------------------------------------- /modules/react/dialog/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/dialog/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/disclosure/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/useDisclosureModel'; 2 | -------------------------------------------------------------------------------- /modules/react/expandable/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Expandable Container 2 | 3 | View the 4 | [documentation for Expandable](https://workday.github.io/canvas-kit/?path=/docs/components-expandable--docs) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/react/expandable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Expandable'; 2 | export * from './lib/hooks'; 3 | -------------------------------------------------------------------------------- /modules/react/expandable/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useExpandableContent'; 2 | export * from './useExpandableIcon'; 3 | export * from './useExpandableModel'; 4 | export * from './useExpandableTarget'; 5 | -------------------------------------------------------------------------------- /modules/react/expandable/lib/hooks/useExpandableContent.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useExpandableModel} from './useExpandableModel'; 3 | 4 | export const useExpandableContent = createElemPropsHook(useExpandableModel)(({state}) => { 5 | return { 6 | style: state.visibility !== 'hidden' ? {} : {display: 'none'}, 7 | id: state.id, 8 | }; 9 | }); 10 | -------------------------------------------------------------------------------- /modules/react/expandable/lib/hooks/useExpandableIcon.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useExpandableModel} from './useExpandableModel'; 3 | 4 | export const useExpandableIcon = createElemPropsHook(useExpandableModel)(({state}) => { 5 | return { 6 | visible: state.visibility !== 'hidden', 7 | }; 8 | }); 9 | -------------------------------------------------------------------------------- /modules/react/expandable/lib/hooks/useExpandableTarget.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useExpandableModel} from './useExpandableModel'; 3 | 4 | export const useExpandableTarget = createElemPropsHook(useExpandableModel)(({state, events}) => { 5 | return { 6 | 'aria-controls': state.id, 7 | 'aria-expanded': state.visibility !== 'hidden', 8 | onClick: (event: React.MouseEvent) => { 9 | if (state.visibility !== 'hidden') { 10 | events.hide(event); 11 | } else { 12 | events.show(event); 13 | } 14 | }, 15 | }; 16 | }); 17 | -------------------------------------------------------------------------------- /modules/react/expandable/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import {renderToString} from 'react-dom/server'; 5 | import {Expandable} from '../'; 6 | 7 | describe('ExpandableContainer', () => { 8 | it('should render on a server without crashing', () => { 9 | const ssrRender = () => 10 | renderToString( 11 | 12 | Target 13 | Content 14 | 15 | ); 16 | expect(ssrRender).not.toThrow(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /modules/react/expandable/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/expandable/stories/examples/Depth.tsx: -------------------------------------------------------------------------------- 1 | import {Expandable} from '@workday/canvas-kit-react/expandable'; 2 | 3 | export const Depth = () => { 4 | return ( 5 | 6 | 7 | Additional Information 8 | 9 | 10 | 11 | This Expandable Container has a depth of 3. 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /modules/react/expandable/stories/examples/EndIcon.tsx: -------------------------------------------------------------------------------- 1 | import {Expandable} from '@workday/canvas-kit-react/expandable'; 2 | 3 | export const EndIcon = () => ( 4 | 5 | 6 | Title 7 | 8 | 9 | 10 | Content 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /modules/react/expandable/stories/examples/StartIcon.tsx: -------------------------------------------------------------------------------- 1 | import {Expandable} from '@workday/canvas-kit-react/expandable'; 2 | 3 | export const StartIcon = () => ( 4 | 5 | 6 | 7 | Title 8 | 9 | 10 | Content 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /modules/react/expandable/stories/examples/test-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Workday/canvas-kit/60e23d05fa006d402e49a3abffa25038bca2960b/modules/react/expandable/stories/examples/test-avatar.png -------------------------------------------------------------------------------- /modules/react/expandable/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/form-field/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Form Field 2 | 3 | View the 4 | [documentation for Form Field](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-form-field--docs) 5 | on Storybook. 6 | 7 | [> Workday Design Reference: Text Area](https://design.workday.com/components/inputs/text-area) 8 | [> Workday Design Reference: Text Input](https://design.workday.com/components/inputs/text-input) 9 | -------------------------------------------------------------------------------- /modules/react/form-field/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/FormField'; 2 | export * from './lib/FormFieldGroup'; 3 | export * from './lib/hooks'; 4 | export * from './lib/FormFieldGroupLabel'; 5 | export * from './lib/FormFieldGroupInput'; 6 | export * from './lib/FormFieldGroupList'; 7 | export {formFieldStencil} from './lib/formFieldStencil'; 8 | export {formFieldContainerStencil} from './lib/FormFieldContainer'; 9 | export {formFieldHintStencil} from './lib/FormFieldHint'; 10 | export {formFieldLabelStencil} from './lib/FormFieldLabel'; 11 | export {useFormFieldGroupInput} from './lib/FormFieldGroupInput'; 12 | -------------------------------------------------------------------------------- /modules/react/form-field/lib/FormFieldInput.tsx: -------------------------------------------------------------------------------- 1 | import {createSubcomponent, ExtractProps} from '@workday/canvas-kit-react/common'; 2 | import {Box, mergeStyles} from '@workday/canvas-kit-react/layout'; 3 | 4 | import {useFormFieldInput, useFormFieldModel} from './hooks'; 5 | 6 | export const FormFieldInput = createSubcomponent('input')({ 7 | displayName: 'FormField.Input', 8 | modelHook: useFormFieldModel, 9 | elemPropsHook: useFormFieldInput, 10 | })>((elemProps, Element) => { 11 | return ; 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/form-field/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useFormFieldOrientation'; 2 | export * from './useFormFieldHint'; 3 | export * from './useFormFieldInput'; 4 | export * from './useFormFieldModel'; 5 | export * from './useFormFieldLabel'; 6 | -------------------------------------------------------------------------------- /modules/react/form-field/lib/hooks/useFormFieldHint.tsx: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useFormFieldModel} from './useFormFieldModel'; 3 | 4 | /** 5 | * Adds the necessary props to a `Hint` component. 6 | * Used by the FormField.Hint subcomponent and other input type components 7 | */ 8 | export const useFormFieldHint = createElemPropsHook(useFormFieldModel)(({state}) => { 9 | return { 10 | id: `hint-${state.id}`, 11 | }; 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/form-field/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/form-field/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/icon/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/AccentIcon'; 2 | export * from './lib/AppletIcon'; 3 | export * from './lib/SystemIcon'; 4 | export * from './lib/SystemIconCircle'; 5 | export * from './lib/Graphic'; 6 | export {Svg, SvgProps, svgStencil} from './lib/Svg'; 7 | -------------------------------------------------------------------------------- /modules/react/icon/lib/types.ts: -------------------------------------------------------------------------------- 1 | import {DetailedHTMLProps, HTMLAttributes} from 'react'; 2 | 3 | export type SpanProps = DetailedHTMLProps, HTMLSpanElement>; 4 | -------------------------------------------------------------------------------- /modules/react/icon/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import {CanvasIcon, CanvasIconTypes} from '@workday/design-assets-types'; 2 | 3 | export function validateIconType(icon: CanvasIcon, expectedType: CanvasIconTypes) { 4 | if (icon.type !== expectedType) { 5 | throw `${icon.name}: Icon type "${icon.type}" does not match expected type "${expectedType}"`; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/react/icon/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/icon/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/layout/lib/utils/getValidChildren.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export function getValidChildren(children: React.ReactNode) { 4 | return React.Children.toArray(children).filter(child => 5 | React.isValidElement(child) 6 | ) as React.ReactElement[]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/react/layout/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/layout/stories/Box.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Box.mdx'; 4 | 5 | import {Box} from '@workday/canvas-kit-react/layout'; 6 | // examples 7 | import {Basic as BasicExample} from './examples/Box/Basic'; 8 | 9 | export default { 10 | title: 'Components/Layout/Box', 11 | component: Box, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/layout/stories/Flex.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Flex.mdx'; 4 | 5 | import {Flex} from '@workday/canvas-kit-react/layout'; 6 | // examples 7 | import {Basic as BasicExample} from './examples/Flex/Basic'; 8 | 9 | export default { 10 | title: 'Components/Layout/Flex', 11 | component: Flex, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/layout/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/loading-dots/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Loading Dots 2 | 3 | View the 4 | [documentation for Loading Dots](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-loading-dots-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/indicators/loading-dots) 8 | -------------------------------------------------------------------------------- /modules/react/loading-dots/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/LoadingDots'; 2 | -------------------------------------------------------------------------------- /modules/react/loading-dots/spec/LoadingDots.spec.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {render} from '@testing-library/react'; 3 | 4 | import {LoadingDots} from '../lib/LoadingDots'; 5 | 6 | describe('LoadingDots', () => { 7 | it('should spread extra props to container', () => { 8 | const {container} = render(); 9 | 10 | expect(container.firstChild).toHaveAttribute('data-propspread', 'test'); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/loading-dots/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/loading-dots/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {LoadingDots} from '@workday/canvas-kit-react/loading-dots'; 3 | 4 | export const Basic = () => { 5 | return ; 6 | }; 7 | -------------------------------------------------------------------------------- /modules/react/loading-dots/stories/examples/RTL.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {LoadingDots} from '@workday/canvas-kit-react/loading-dots'; 3 | import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common'; 4 | 5 | export const RTL = () => { 6 | const theme = { 7 | canvas: { 8 | direction: ContentDirection.RTL, 9 | }, 10 | }; 11 | return ( 12 | 13 | 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /modules/react/loading-dots/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/menu/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Menu 2 | 3 | Canvas Kit Menu Component 4 | 5 | ## Installation 6 | 7 | ```sh 8 | yarn add @workday/canvas-kit-react 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```tsx 14 | import * as React from 'react'; 15 | import {Menu} from '@workday/canvas-kit-react/menu'; 16 | 17 | ; 18 | ``` 19 | 20 | ## Static Properties 21 | 22 | > None 23 | 24 | ## Component Props 25 | 26 | ### Required 27 | 28 | > None 29 | 30 | ### Optional 31 | 32 | > None 33 | -------------------------------------------------------------------------------- /modules/react/menu/index.ts: -------------------------------------------------------------------------------- 1 | export {useMenuModel} from './lib/useMenuModel'; 2 | export {Menu} from './lib/Menu'; 3 | 4 | export {useMenuCard, menuCardStencil} from './lib/MenuCard'; 5 | export {useMenuItem, menuItemStencil, StyledMenuItem} from './lib/MenuItem'; 6 | export {useMenuOption} from './lib/MenuOption'; 7 | export {useMenuList, menuListStencil} from './lib/MenuList'; 8 | export {useMenuPopper} from './lib/MenuPopper'; 9 | export {useMenuTarget, useMenuTargetContext} from './lib/MenuTarget'; 10 | export {menuDividerStencil} from './lib/MenuDivider'; 11 | -------------------------------------------------------------------------------- /modules/react/menu/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/menu/stories/testingFallback.stories.tsx: -------------------------------------------------------------------------------- 1 | import {customViewport} from '../../../../utils/storybook'; 2 | import {Menu} from '@workday/canvas-kit-react/menu'; 3 | import {MenuWithFallbackPlacements as MenuWithFallbackPlacementsExample} from './examples/MenuWithFallbackPlacements'; 4 | 5 | export default { 6 | title: 'Testing/Popups/Menu', 7 | component: Menu, 8 | parameters: { 9 | viewport: { 10 | viewports: customViewport, 11 | defaultViewport: 'landscape', 12 | }, 13 | }, 14 | }; 15 | 16 | export const MenuWithFallbackPlacements = { 17 | render: MenuWithFallbackPlacementsExample, 18 | }; 19 | -------------------------------------------------------------------------------- /modules/react/menu/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/modal/.npmignore: -------------------------------------------------------------------------------- 1 | tsconfig.json 2 | yarn.lock 3 | 4 | -------------------------------------------------------------------------------- /modules/react/modal/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Modal 2 | 3 | A Modal component that allows you to render a Popup with translucent overlays. 4 | 5 | ## Installation 6 | 7 | ```sh 8 | yarn add @workday/canvas-kit-react 9 | ``` 10 | 11 | For more detailed information on this component, please refer to the 12 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/components-popups-modal-react) 13 | -------------------------------------------------------------------------------- /modules/react/modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/hooks'; 2 | export * from './lib/Modal'; 3 | -------------------------------------------------------------------------------- /modules/react/modal/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useCloseOnOverlayClick'; 2 | export * from './useModalCard'; 3 | export * from './useModalHeading'; 4 | export * from './useModalModel'; 5 | -------------------------------------------------------------------------------- /modules/react/modal/spec/Modal.spec.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {renderToString} from 'react-dom/server'; 3 | 4 | import {Basic} from '../stories/examples/Basic'; 5 | 6 | describe('Modal', () => { 7 | it('should render on a server without crashing', () => { 8 | const ssrRender = () => renderToString(); 9 | 10 | expect(ssrRender).not.toThrow(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /modules/react/modal/spec/ModalCard.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Modal, useModalModel} from '@workday/canvas-kit-react/modal'; 4 | 5 | describe('Modal.Card', () => { 6 | verifyComponent(Modal.Card, {modelFn: useModalModel}); 7 | 8 | it('should have a role of "dialog"', () => { 9 | render(); 10 | 11 | expect(screen.getByRole('dialog')).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/modal/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/modal/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/pagination/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit React Pagination 2 | 3 | `Pagination` is a [Compound Component](../../docs/mdx/COMPOUND_COMPONENTS.mdx) for handling 4 | navigation between pages in a range. 5 | 6 | For more detailed information on this component, please refer to the 7 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/labs-pagination-react--step-controls) 8 | -------------------------------------------------------------------------------- /modules/react/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Pagination'; 2 | -------------------------------------------------------------------------------- /modules/react/pagination/lib/Pagination/Nav.tsx: -------------------------------------------------------------------------------- 1 | import {Flex, FlexProps} from '@workday/canvas-kit-react/layout'; 2 | 3 | export interface PaginationNavProps extends Omit { 4 | 'aria-label': string; 5 | } 6 | 7 | export const PaginationNav = (elemProps: PaginationNavProps) => { 8 | return ( 9 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /modules/react/pagination/lib/Pagination/common/utils/getValidChildren.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export function getValidChildren(children: React.ReactNode) { 4 | return React.Children.toArray(children).filter(child => 5 | React.isValidElement(child) 6 | ) as React.ReactElement[]; 7 | } 8 | -------------------------------------------------------------------------------- /modules/react/pagination/lib/Pagination/common/utils/useRTL.ts: -------------------------------------------------------------------------------- 1 | import { 2 | useTheme, 3 | PartialEmotionCanvasTheme, 4 | ContentDirection, 5 | } from '@workday/canvas-kit-react/common'; 6 | 7 | export const useRTL = (partialTheme?: PartialEmotionCanvasTheme) => { 8 | const theme = useTheme(partialTheme); 9 | const shouldUseRTL = theme.canvas.direction === ContentDirection.RTL; 10 | return { 11 | shouldUseRTL, 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/pagination/lib/Pagination/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './Pagination'; 2 | export * from './usePaginationModel'; 3 | export * from './types'; 4 | export * from './common/utils/helpers'; 5 | -------------------------------------------------------------------------------- /modules/react/pagination/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/pagination/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/popup/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Popups 2 | 3 | This package comes with everything you need to build Popup UIs. 4 | 5 | ## Installation 6 | 7 | ```sh 8 | yarn add @workday/canvas-kit-react 9 | ``` 10 | 11 | For more detailed information on this component, please refer to the 12 | [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/components-popups-popup-react) 13 | -------------------------------------------------------------------------------- /modules/react/popup/index.ts: -------------------------------------------------------------------------------- 1 | export {Popup} from './lib/Popup'; 2 | export * from './lib/Popper'; 3 | export * from './lib/getTransformFromPlacement'; 4 | export * from './lib/hooks'; 5 | -------------------------------------------------------------------------------- /modules/react/popup/lib/PopupTarget.tsx: -------------------------------------------------------------------------------- 1 | import {createSubcomponent} from '@workday/canvas-kit-react/common'; 2 | import {SecondaryButton} from '@workday/canvas-kit-react/button'; 3 | 4 | import {usePopupTarget, usePopupModel} from './hooks'; 5 | 6 | export interface PopupTargetProps {} 7 | 8 | export const PopupTarget = createSubcomponent(SecondaryButton)({ 9 | displayName: 'Popup.Target', 10 | modelHook: usePopupModel, 11 | elemPropsHook: usePopupTarget, 12 | })((elemProps, Element) => { 13 | return ; 14 | }); 15 | -------------------------------------------------------------------------------- /modules/react/popup/lib/hooks/usePopupCard.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | 3 | import {usePopupModel} from './usePopupModel'; 4 | 5 | /** 6 | * Adds the necessary props to a {@link PopupCard Popup.Card} subcomponent. 7 | */ 8 | export const usePopupCard = createElemPropsHook(usePopupModel)(({state}) => { 9 | return { 10 | role: 'dialog', 11 | 'aria-labelledby': state.id, 12 | }; 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/lib/hooks/usePopupCloseButton.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {usePopupModel} from './usePopupModel'; 3 | 4 | /** 5 | * Adds the necessary props to a close button component. Used by the 6 | * {@link PopupCloseButton Popup.CloseButton} subcomponent and 7 | * {@link PopupCloseIcon Popup.CloseIcon} subcomponent. 8 | */ 9 | export const usePopupCloseButton = createElemPropsHook(usePopupModel)(({events}) => { 10 | return { 11 | onClick: events.hide, 12 | }; 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/lib/hooks/usePopupHeading.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {usePopupModel} from './usePopupModel'; 3 | 4 | /** 5 | * Adds the necessary props to the {@link PopupHeading Popup.Heading} subcomponent. 6 | */ 7 | export const usePopupHeading = createElemPropsHook(usePopupModel)(({state}) => { 8 | return { 9 | id: state.id, 10 | }; 11 | }); 12 | -------------------------------------------------------------------------------- /modules/react/popup/spec/PopupCard.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Popup, usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | 5 | describe('Popup.Card', () => { 6 | verifyComponent(Popup.Card, {modelFn: usePopupModel}); 7 | 8 | it('should have a role of "dialog"', () => { 9 | render(); 10 | 11 | expect(screen.getByRole('dialog')).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/spec/PopupCloseButton.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Popup, usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | 5 | describe('Popup.CloseButton', () => { 6 | verifyComponent(Popup.CloseButton, {modelFn: usePopupModel}); 7 | 8 | it('should have a role of "button"', () => { 9 | render(Close); 10 | 11 | expect(screen.getByRole('button', {name: 'Close'})).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/spec/PopupCloseIcon.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Popup, usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | 5 | describe('Popup.CloseIcon', () => { 6 | verifyComponent(Popup.CloseIcon, {modelFn: usePopupModel}); 7 | 8 | it('should have a role of "button"', () => { 9 | render(); 10 | 11 | expect(screen.getByRole('button', {name: 'Close'})).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/spec/PopupHeading.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Popup, usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | 5 | describe('Popup.Heading', () => { 6 | verifyComponent(Popup.Heading, {modelFn: usePopupModel}); 7 | 8 | it('should have a role of "heading"', () => { 9 | render(Heading); 10 | 11 | expect(screen.getByRole('heading')).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/spec/PopupTarget.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {screen, render} from '@testing-library/react'; 3 | import {Popup, usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | 5 | describe('Popup.Target', () => { 6 | verifyComponent(Popup.Target, {modelFn: usePopupModel}); 7 | 8 | it('should have a role of "button"', () => { 9 | render(Open); 10 | 11 | expect(screen.getByRole('button', {name: 'Open'})).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/popup/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/popup/stories/testingFallback.stories.tsx: -------------------------------------------------------------------------------- 1 | import {customViewport} from '../../../../utils/storybook'; 2 | import {Popup} from '@workday/canvas-kit-react/popup'; 3 | import {PopupWithFallbackPlacements as PopupWithFallbackPlacementsExample} from './examples/PopupWithFallbackPlacements'; 4 | 5 | export default { 6 | title: 'Testing/Popups/Popup', 7 | component: Popup, 8 | parameters: { 9 | viewport: { 10 | viewports: customViewport, 11 | defaultViewport: 'landscape', 12 | }, 13 | }, 14 | }; 15 | 16 | export const PopupWithFallbackPlacements = { 17 | render: PopupWithFallbackPlacementsExample, 18 | }; 19 | -------------------------------------------------------------------------------- /modules/react/popup/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/radio/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Radio 2 | 3 | View the 4 | [documentation for Radio](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-radio-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/radio-buttons) 8 | -------------------------------------------------------------------------------- /modules/react/radio/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Radio'; 2 | export * from './lib/RadioGroup'; 3 | -------------------------------------------------------------------------------- /modules/react/radio/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/segmented-control/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/SegmentedControl'; 2 | -------------------------------------------------------------------------------- /modules/react/segmented-control/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/segmented-control/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/select/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Select 2 | 3 | View the 4 | [documentation for Select](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/select-drop-down) 8 | 9 | > Consider using the 10 | > [Select in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-select-react-top-label--default) 11 | > instead. It utilizes a Canvas-styled menu with theming support and a more flexible API for 12 | > defining options. The Select in Preview will replace this component in the future. 13 | -------------------------------------------------------------------------------- /modules/react/select/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Select'; 2 | export {selectInputStencil} from './lib/SelectInput'; 3 | export * from './lib/hooks'; 4 | -------------------------------------------------------------------------------- /modules/react/select/lib/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useSelectModel'; 2 | export * from './useSelectInput'; 3 | export * from './useSelectCard'; 4 | -------------------------------------------------------------------------------- /modules/react/select/lib/hooks/useSelectCard.ts: -------------------------------------------------------------------------------- 1 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 2 | import {useSelectModel} from './useSelectModel'; 3 | 4 | /** 5 | * Sets the width of the ` SelectCard` to the `Select.Input` width. 6 | */ 7 | export const useSelectCard = createElemPropsHook(useSelectModel)(model => { 8 | return { 9 | width: model.state.width, 10 | } as const; 11 | }); 12 | -------------------------------------------------------------------------------- /modules/react/select/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/side-panel/.npmignore: -------------------------------------------------------------------------------- 1 | tsconfig.json 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /modules/react/side-panel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/SidePanel'; 2 | -------------------------------------------------------------------------------- /modules/react/side-panel/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {SidePanel} from '../'; 7 | 8 | describe('Modal', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => renderToString(); 11 | expect(ssrRender).not.toThrow(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/side-panel/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/side-panel/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/skeleton/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Skeleton 2 | 3 | View the 4 | [documentation for Skeleton](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-skeleton-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/indicators/skeleton-loader) 8 | -------------------------------------------------------------------------------- /modules/react/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Skeleton'; 2 | export {skeletonTextStencil} from './lib/parts/SkeletonText'; 3 | export {skeletonShapeStencil} from './lib/parts/SkeletonShape'; 4 | export {skeletonHeaderStencil} from './lib/parts/SkeletonHeader'; 5 | -------------------------------------------------------------------------------- /modules/react/skeleton/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/skeleton/stories/examples/Header.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Skeleton} from '@workday/canvas-kit-react/skeleton'; 3 | 4 | export const Header = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /modules/react/skeleton/stories/examples/Shape.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Skeleton} from '@workday/canvas-kit-react/skeleton'; 3 | import {borderRadius, space} from '@workday/canvas-kit-react/tokens'; 4 | 5 | export const Shape = () => { 6 | return ( 7 | 8 | 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /modules/react/skeleton/stories/examples/Text.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Skeleton} from '@workday/canvas-kit-react/skeleton'; 3 | 4 | export const Text = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /modules/react/skeleton/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/status-indicator/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Status Indicator 2 | 3 | View the 4 | [documentation for Status Indicator](https://workday.github.io/canvas-kit/?path=/docs/components-indicators-status-indicator-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/indicators/status-indicators) 8 | -------------------------------------------------------------------------------- /modules/react/status-indicator/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/StatusIndicator'; 2 | -------------------------------------------------------------------------------- /modules/react/status-indicator/spec/StatusIndicator.spec.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {render} from '@testing-library/react'; 3 | 4 | import {StatusIndicator} from '../lib/StatusIndicator'; 5 | 6 | describe('StatusIndicator', () => { 7 | it('Card should spread extra props', () => { 8 | const {container} = render( 9 | 10 | ); 11 | 12 | // container is not a semantic element 13 | expect(container.firstChild).toHaveAttribute('data-propspread', 'test'); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /modules/react/status-indicator/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/status-indicator/stories/examples/Icon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {StatusIndicator} from '@workday/canvas-kit-react/status-indicator'; 3 | import {uploadCloudIcon} from '@workday/canvas-system-icons-web'; 4 | 5 | export const Icon = () => { 6 | return ( 7 | 8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/react/status-indicator/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/switch/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Switch 2 | 3 | View the 4 | [documentation for Switch](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-switch-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/switch) 8 | -------------------------------------------------------------------------------- /modules/react/switch/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Switch'; 2 | -------------------------------------------------------------------------------- /modules/react/switch/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/table/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Table 2 | 3 | View the 4 | [documentation for Table](https://workday.github.io/canvas-kit/?path=/docs/components-containers-table-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/containers/tables) 8 | -------------------------------------------------------------------------------- /modules/react/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Table'; 2 | export * from './lib/BaseTable'; 3 | export * from './lib/parts'; 4 | export * from './lib/parts/css-grid-table'; 5 | -------------------------------------------------------------------------------- /modules/react/table/lib/parts/BaseTableFooter.tsx: -------------------------------------------------------------------------------- 1 | import {createComponent} from '@workday/canvas-kit-react/common'; 2 | import {BoxProps} from '@workday/canvas-kit-react/layout'; 3 | 4 | export const BaseTableFooter = createComponent('tfoot')({ 5 | displayName: 'Table.Footer', 6 | Component: ({children, ...elemProps}: BoxProps, ref, Element) => { 7 | return ( 8 | 9 | {children} 10 | 11 | ); 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/table/lib/parts/BaseTableRow.tsx: -------------------------------------------------------------------------------- 1 | import {createComponent} from '@workday/canvas-kit-react/common'; 2 | import {BoxProps} from '@workday/canvas-kit-react/layout'; 3 | 4 | export const BaseTableRow = createComponent('tr')({ 5 | displayName: 'Table.Row', 6 | Component: ({children, ...elemProps}: BoxProps, ref, Element) => { 7 | return ( 8 | 9 | {children} 10 | 11 | ); 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/table/lib/parts/css-grid-table/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './TableRow'; 2 | -------------------------------------------------------------------------------- /modules/react/table/lib/parts/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './BaseTableBody'; 2 | export * from './BaseTableCaption'; 3 | export * from './BaseTableCell'; 4 | export * from './BaseTableFooter'; 5 | export * from './BaseTableHead'; 6 | export * from './BaseTableHeader'; 7 | export * from './BaseTableRow'; 8 | -------------------------------------------------------------------------------- /modules/react/table/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/table/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tabs/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Tabs 2 | 3 | View the 4 | [documentation for Tabs](https://workday.github.io/canvas-kit/?path=/docs/components-containers-tabs-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/navigation/tabs) 8 | -------------------------------------------------------------------------------- /modules/react/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Tabs'; 2 | export * from './lib/useTabsModel'; 3 | 4 | export {StyledTabItem, useTabsItem} from './lib/TabsItem'; 5 | export {useTabsList} from './lib/TabsList'; 6 | export {useTabsMenuPopper} from './lib/TabsMenuPopper'; 7 | export {useTabsOverflowButton} from './lib/TabsOverflowButton'; 8 | export {useTabsPanel} from './lib/TabsPanel'; 9 | -------------------------------------------------------------------------------- /modules/react/tabs/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tabs/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/testing/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Testing 2 | 3 | A package that provides components for testing 4 | 5 | View the [documentation for Testing](https://workday.github.io/canvas-kit/?path=/docs/testing-react) 6 | on Storybook. 7 | -------------------------------------------------------------------------------- /modules/react/testing/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/ComponentStatesTable'; 2 | export * from './lib/StaticStates'; 3 | export * from './lib/permutateProps'; 4 | export * from './lib/propTypes'; 5 | -------------------------------------------------------------------------------- /modules/react/testing/lib/propTypes.ts: -------------------------------------------------------------------------------- 1 | export type PropDeclaration = { 2 | value: any; 3 | label: string; 4 | }; 5 | 6 | export type PropsDeclaration = {[key: string]: PropDeclaration[]}; 7 | 8 | export type Props = { 9 | [key: string]: any; 10 | }; 11 | 12 | export type PropCombination = { 13 | label: string; 14 | props: Props; 15 | }; 16 | -------------------------------------------------------------------------------- /modules/react/testing/stories/Testing.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Testing.mdx'; 4 | 5 | import {Basic} from './examples/Basic'; 6 | 7 | export default { 8 | title: 'Hooks and Utilities/Testing', 9 | tags: ['autodocs'], 10 | parameters: { 11 | docs: { 12 | page: mdxDoc, 13 | }, 14 | }, 15 | } as Meta; 16 | 17 | type Story = StoryObj; 18 | 19 | export const Docs: Story = { 20 | render: Basic, 21 | }; 22 | -------------------------------------------------------------------------------- /modules/react/testing/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/text-area/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Text Area 2 | 3 | View the 4 | [documentation for Text Area](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-textarea-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/text-area) 8 | -------------------------------------------------------------------------------- /modules/react/text-area/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/TextArea'; 2 | -------------------------------------------------------------------------------- /modules/react/text-area/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/text-input/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Text Input 2 | 3 | View the 4 | [documentation for Text Input](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-text-input-react--basic) 5 | on Storybook. 6 | 7 | [> Workday Design Reference](https://design.workday.com/components/inputs/text-input) 8 | -------------------------------------------------------------------------------- /modules/react/text-input/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/TextInput'; 2 | export {InputGroup, useInputGroupModel} from './lib/InputGroup'; 3 | -------------------------------------------------------------------------------- /modules/react/text-input/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/text/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Text 2 | 3 | View the 4 | [documentation for Text](https://workday.github.io/canvas-kit/?path=/docs/preview-text-react--text) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/react/text/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Text'; 2 | export * from './lib/TypeLevelComponents'; 3 | export * from './lib/LabelText'; 4 | -------------------------------------------------------------------------------- /modules/react/text/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.spec.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/text/stories/BodyText.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './BodyText.mdx'; 4 | 5 | import {BodyText} from '@workday/canvas-kit-react/text'; 6 | 7 | import {Basic as BasicExample} from './examples/BodyText/Basic'; 8 | 9 | export default { 10 | title: 'Components/Text/Body Text', 11 | component: BodyText, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/text/stories/Heading.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Heading.mdx'; 4 | 5 | import {Heading} from '@workday/canvas-kit-react/text'; 6 | 7 | import {Basic as BasicExample} from './examples/Heading/Basic'; 8 | 9 | export default { 10 | title: 'Components/Text/Heading', 11 | component: Heading, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/text/stories/Subtext.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Subtext.mdx'; 4 | 5 | import {Subtext} from '@workday/canvas-kit-react/text'; 6 | 7 | import {Basic as BasicExample} from './examples/Subtext/Basic'; 8 | 9 | export default { 10 | title: 'Components/Text/Subtext', 11 | component: Subtext, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/text/stories/Title.stories.ts: -------------------------------------------------------------------------------- 1 | import {Meta, StoryObj} from '@storybook/react'; 2 | 3 | import mdxDoc from './Title.mdx'; 4 | 5 | import {Title} from '@workday/canvas-kit-react/text'; 6 | 7 | import {Basic as BasicExample} from './examples/Title/Basic'; 8 | 9 | export default { 10 | title: 'Components/Text/Title', 11 | component: Title, 12 | tags: ['autodocs'], 13 | parameters: { 14 | docs: { 15 | page: mdxDoc, 16 | }, 17 | }, 18 | } as Meta; 19 | 20 | type Story = StoryObj; 21 | 22 | export const Basic: Story = { 23 | render: BasicExample, 24 | }; 25 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/BodyText/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {BodyText} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Basic = () => ( 5 | <> 6 | Large Body Text 7 | Medium Body Text 8 | Small Body Text 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/Heading/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Heading} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Basic = () => ( 5 | <> 6 | 7 | Large Heading Text 8 | 9 | 10 | Medium Heading Text 11 | 12 | 13 | Small Heading Text 14 | 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/LabelText/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {LabelText} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Basic = () => Label; 5 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/LabelText/Cursor.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {LabelText} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Cursor = () => Label with Pointer; 5 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/Subtext/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Subtext} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Basic = () => ( 5 | <> 6 | Large Subtext 7 | Medium Subtext 8 | Small Subtext 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/Text/TypeLevel.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {Text} from '@workday/canvas-kit-react/text'; 4 | 5 | export const TypeLevel = () => ( 6 | 7 | Small Body level text 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/Text/Variant.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {Text} from '@workday/canvas-kit-react/text'; 4 | 5 | export const Variant = () => ( 6 | 7 | Error text 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /modules/react/text/stories/examples/Title/Basic.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Title} from '@workday/canvas-kit-react/text'; 3 | 4 | export const Basic = () => ( 5 | <> 6 | 7 | Large Title Text 8 | 9 | 10 | Medium Title Text 11 | 12 | 13 | Small Title Text 14 | 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /modules/react/text/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/toast/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Toast 2 | 3 | View the 4 | [documentation for Toast](https://workday.github.io/canvas-kit/?path=/docs/components-popups-toast-react--with-popper#canvas-kit-toast) 5 | on Storybook. 6 | -------------------------------------------------------------------------------- /modules/react/toast/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Toast'; 2 | export * from './lib/hooks/useToastModel'; 3 | -------------------------------------------------------------------------------- /modules/react/toast/lib/ToastLink.tsx: -------------------------------------------------------------------------------- 1 | import {createComponent} from '@workday/canvas-kit-react/common'; 2 | import {Hyperlink, HyperlinkProps} from '@workday/canvas-kit-react/button'; 3 | 4 | export interface ToastLinkProps extends HyperlinkProps {} 5 | 6 | export const ToastLink = createComponent('a')({ 7 | displayName: 'Toast.Link', 8 | Component: ({children, href, ...elemProps}: ToastLinkProps, ref, Element) => { 9 | return ( 10 | 11 | {children} 12 | 13 | ); 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /modules/react/toast/spec/ToastCloseIcon.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {render, screen} from '@testing-library/react'; 3 | import {usePopupModel} from '@workday/canvas-kit-react/popup'; 4 | import {Toast} from '../lib/Toast'; 5 | 6 | describe('Toast.Close', () => { 7 | verifyComponent(Toast.CloseIcon, {modelFn: usePopupModel}); 8 | 9 | it('should have a role of "button"', () => { 10 | render(); 11 | expect(screen.getByRole('button', {name: 'Close'})).toBeInTheDocument(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /modules/react/toast/spec/ToastLink.spec.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {render, screen} from '@testing-library/react'; 3 | import {Toast} from '../lib/Toast'; 4 | import {useToastModel} from '../lib/hooks/useToastModel'; 5 | 6 | describe('Toast.Link', () => { 7 | verifyComponent(Toast.CloseIcon, {modelFn: useToastModel}); 8 | 9 | it('should have a role of "link"', () => { 10 | render(Link Link); 11 | 12 | expect(screen.getByRole('link')).toBeInTheDocument(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /modules/react/toast/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/toast/stories/examples/Basic.tsx: -------------------------------------------------------------------------------- 1 | import {Toast} from '@workday/canvas-kit-react/toast'; 2 | import {checkIcon} from '@workday/canvas-system-icons-web'; 3 | 4 | export const Basic = () => { 5 | return ( 6 | 7 | 8 | 9 | Your workbook was successfully processed. 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /modules/react/toast/stories/examples/ToastAlert.tsx: -------------------------------------------------------------------------------- 1 | import {Toast} from '@workday/canvas-kit-react/toast'; 2 | import {exclamationCircleIcon} from '@workday/canvas-system-icons-web'; 3 | import {colors} from '@workday/canvas-kit-react/tokens'; 4 | 5 | export const ToastAlert = () => ( 6 | 7 | 8 | 9 | There was an error with your workbook. 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /modules/react/toast/stories/examples/ToastDialog.tsx: -------------------------------------------------------------------------------- 1 | import {Toast} from '@workday/canvas-kit-react/toast'; 2 | import {checkIcon} from '@workday/canvas-system-icons-web'; 3 | 4 | export const ToastDialog = () => ( 5 | 6 | 7 | 8 | Your workbook was successfully processed. 9 | Custom Link 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /modules/react/toast/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "../../../../tsconfig.stories.json" 4 | } 5 | -------------------------------------------------------------------------------- /modules/react/tokens/lib/types.ts: -------------------------------------------------------------------------------- 1 | import {CSSProperties as RCP} from 'react'; 2 | import {CSSObject} from '@emotion/styled'; 3 | 4 | export type CSSProperties = RCP & CSSObject; 5 | -------------------------------------------------------------------------------- /modules/react/tokens/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tokens/stories/examples/Overview.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import styled from '@emotion/styled'; 3 | 4 | import {colors, type, depth, space, borderRadius} from '@workday/canvas-kit-react/tokens'; 5 | import {Flex} from '@workday/canvas-kit-react/layout'; 6 | 7 | const StyledCard = styled('div')({ 8 | ...depth[3], 9 | padding: space.m, 10 | borderRadius: borderRadius.m, 11 | backgroundColor: colors.cinnamon300, 12 | ...type.levels.body.medium, 13 | }); 14 | 15 | export const Overview = () => ( 16 | 17 | Using Tokens To Style 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /modules/react/tokens/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/Tooltip'; 2 | export * from './lib/OverflowTooltip'; 3 | export * from './lib/TooltipContainer'; 4 | export * from './lib/useTooltip'; 5 | -------------------------------------------------------------------------------- /modules/react/tooltip/spec/OverflowTooltip.spec.tsx: -------------------------------------------------------------------------------- 1 | import {findEllipsisElement, findOverflowElement} from '..'; 2 | 3 | describe('findEllipsisElement', () => { 4 | it('returns null if element has no children attribute [SVG in IE 11]', () => { 5 | const el = document.createElement('svg'); 6 | expect(findEllipsisElement(el)).toBeNull(); 7 | }); 8 | }); 9 | 10 | describe('findOverflowElement', () => { 11 | it('returns null if element has no children attribute [SVG in IE 11]', () => { 12 | const el = document.createElement('svg'); 13 | expect(findOverflowElement(el)).toBeNull(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /modules/react/tooltip/spec/SSR.spec.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment node 3 | */ 4 | import React from 'react'; 5 | import {renderToString} from 'react-dom/server'; 6 | import {Tooltip} from '../'; 7 | 8 | describe('Tooltip', () => { 9 | it('should render on a server without crashing', () => { 10 | const ssrRender = () => 11 | renderToString( 12 | 13 | Test 14 | 15 | ); 16 | expect(ssrRender).not.toThrow(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /modules/react/tooltip/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tooltip/stories/examples/Default.tsx: -------------------------------------------------------------------------------- 1 | import {xIcon} from '@workday/canvas-system-icons-web'; 2 | import {TertiaryButton} from '@workday/canvas-kit-react/button'; 3 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 4 | 5 | export const Default = () => { 6 | return ( 7 | 8 | 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /modules/react/tooltip/stories/examples/DelayedTooltip.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {SecondaryButton} from '@workday/canvas-kit-react/button'; 4 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 5 | 6 | export const DelayedTooltip = () => { 7 | return ( 8 | 9 | 10 | 11 | Tooltip appears after 2 seconds and disappears after 1 second 12 | 13 | 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /modules/react/tooltip/stories/examples/DescribeType.tsx: -------------------------------------------------------------------------------- 1 | import {DeleteButton} from '@workday/canvas-kit-react/button'; 2 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 3 | 4 | export const DescribeType = () => { 5 | return ( 6 | 7 | Delete 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /modules/react/tooltip/stories/examples/Muted.tsx: -------------------------------------------------------------------------------- 1 | import {Tooltip} from '@workday/canvas-kit-react/tooltip'; 2 | 3 | export const Muted = () => { 4 | return ( 5 | 6 | Some text. The contents of the tooltip are invisible to screen reader users. 7 | 8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /modules/react/tooltip/stories/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.stories.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/react/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/react/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/stories"], 4 | "compilerOptions": { 5 | "plugins": [ 6 | { 7 | "transform": "../styling-transform" 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/styling-transform/lib/createPropertyTransform.ts: -------------------------------------------------------------------------------- 1 | import {PropertyTransform} from './utils/types'; 2 | 3 | /** 4 | * A property transform takes a style property node and will return a string. You can use 5 | * `parseNodeToStaticValue` to help you process properties that might be inputs to a function. 6 | */ 7 | export function createPropertyTransform(transformFn: PropertyTransform): PropertyTransform { 8 | return transformFn; 9 | } 10 | -------------------------------------------------------------------------------- /modules/styling-transform/lib/utils/getHash.ts: -------------------------------------------------------------------------------- 1 | import ts from 'typescript'; 2 | import crypto from 'node:crypto'; 3 | 4 | import {TransformerContext} from './types'; 5 | 6 | export function getHash(node: ts.Node, context: TransformerContext) { 7 | const fileName = context.getFileName(node.getSourceFile().fileName); 8 | return crypto 9 | .createHash('md5') 10 | .update(fileName + node.pos) // file name + position should be unique and repeatable 11 | .digest('hex') 12 | .substring(0, 6); 13 | } 14 | -------------------------------------------------------------------------------- /modules/styling-transform/lib/utils/injectStyles.ts: -------------------------------------------------------------------------------- 1 | import {TransformerContext} from './types'; 2 | 3 | export function injectStyles( 4 | {styles, cache}: TransformerContext, 5 | fileName: string, 6 | hash: string, 7 | styleOutput: string 8 | ) { 9 | if (!cache[hash]) { 10 | styles[fileName] = styles[fileName] || []; 11 | styles[fileName].push(styleOutput); 12 | cache[hash] = styleOutput; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/styling-transform/spec/_variables.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --var-1: red; 3 | } 4 | -------------------------------------------------------------------------------- /modules/styling-transform/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/styling-transform/spec/utils/createStyleObjectNode.spec.ts: -------------------------------------------------------------------------------- 1 | import ts from 'typescript'; 2 | 3 | import {createStyleObjectNode} from '../../lib/utils/createStyleObjectNode'; 4 | 5 | describe('createStyleObjectNode', () => { 6 | it('should serialize styles with a hard-coded name and styles', () => { 7 | const node = createStyleObjectNode('padding:12px;'); 8 | 9 | const printer = ts.createPrinter(); 10 | const output = printer.printNode(ts.EmitHint.Unspecified, node, {} as any); 11 | 12 | expect(output).toMatch(/{ name: "[a-z0-9]+", styles: "padding:12px;" }/); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /modules/styling-transform/testing.ts: -------------------------------------------------------------------------------- 1 | export {createProgramFromSource} from './spec/createProgramFromSource'; 2 | export {transform, _reset, withDefaultContext} from './lib/styleTransform'; 3 | export {findNodes} from './spec/findNodes'; 4 | -------------------------------------------------------------------------------- /modules/styling-transform/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/styling-transform/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/styling-transform/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/stories"] 4 | } 5 | -------------------------------------------------------------------------------- /modules/styling/README.md: -------------------------------------------------------------------------------- 1 | # Canvas Kit Styling 2 | 3 | This package contains everything needed to create CSS styling. This styling package contains a 4 | runtime for development and a static parsing process for build time. For more information, visit 5 | https://workday.github.io/canvas-kit/?path=/docs/styling-why-canvas-styling--docs 6 | -------------------------------------------------------------------------------- /modules/styling/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/calc'; 2 | export * from './lib/cs'; 3 | export * from './lib/px2rem'; 4 | export * from './lib/slugify'; 5 | export * from './lib/uniqueId'; 6 | -------------------------------------------------------------------------------- /modules/styling/lib/px2rem.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Function that converts a `px` value (number) to `rem` (string). 3 | * @example 4 | * ```ts 5 | * margin: px2rem(2); 6 | * // returns '0.125rem' 7 | * ``` 8 | */ 9 | export function px2rem(px: number, base = 16): string { 10 | return `${px / base}rem`; 11 | } 12 | -------------------------------------------------------------------------------- /modules/styling/lib/slugify.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Function that takes a string and returns a "slug" which can be used in HTML 3 | */ 4 | export function slugify(input: string): string { 5 | return input 6 | .trim() 7 | .replace(/[\.\s_-]+/g, '-') 8 | .replace(/[^\w\s-]/g, '') 9 | .replace(/([A-Z])/g, m => { 10 | return '-' + m.toLowerCase(); 11 | }) 12 | .replace(/^-+|-+$/g, '') 13 | .toLowerCase(); 14 | } 15 | -------------------------------------------------------------------------------- /modules/styling/spec/px2rem.spec.ts: -------------------------------------------------------------------------------- 1 | import {px2rem} from '../lib/px2rem'; 2 | 3 | describe('px2rem', () => { 4 | it('should ', () => { 5 | const pxValue = 4; 6 | const expected = px2rem(pxValue); 7 | 8 | expect(expected).toBe('0.25rem'); 9 | }); 10 | 11 | it('should support alternate base', () => { 12 | const pxValue = 16; 13 | const baseValue = 10; 14 | const expected = px2rem(pxValue, baseValue); 15 | 16 | expect(expected).toBe('1.6rem'); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /modules/styling/spec/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /modules/styling/stories/mdx/examples/CreateStyles.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {createStyles} from '@workday/canvas-kit-styling'; 4 | import {system} from '@workday/canvas-tokens-web'; 5 | 6 | const styles = createStyles({ 7 | background: system.color.bg.primary.default, 8 | color: system.color.text.inverse, 9 | }); 10 | 11 | export const CreateStyles = () => { 12 | return ; 13 | }; 14 | -------------------------------------------------------------------------------- /modules/styling/stories/mdx/examples/CreateVars.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import {createStyles, createVars, cssVar} from '@workday/canvas-kit-styling'; 4 | 5 | const myVars = createVars('background'); 6 | 7 | const styles = createStyles({ 8 | width: 100, 9 | height: 100, 10 | backgroundColor: cssVar(myVars.background), 11 | }); 12 | 13 | export const CreateVars = () => { 14 | return ( 15 | <> 16 |
    17 |
    18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /modules/styling/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "module": "commonjs", 6 | "outDir": "dist/commonjs", 7 | "skipLibCheck": true, 8 | "tsBuildInfoFile": "./.build-info/tsconfig.cjs.tsbuildinfo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/styling/tsconfig.es6.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "outDir": "dist/es6", 6 | "tsBuildInfoFile": "./.build-info/tsconfig.es6.tsbuildinfo" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/styling/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "exclude": ["node_modules", "ts-tmp", "dist", "**/spec", "**/stories"] 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.docs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["cypress", "node_modules", "modules/**/dist/*", "modules/**/ts-tmp/*", "docs"] 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.expect-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.spec.json", 3 | "include": ["**/*.test-d.ts*"], 4 | "exclude": [] 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.stories.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*stories*.tsx", "**/*stories*.ts", "**/examples/*.tsx"], 4 | "exclude": ["cypress"], 5 | "compilerOptions": { 6 | "declaration": false, 7 | "declarationMap": false, 8 | "noImplicitReturns": false, 9 | "noImplicitThis": true, 10 | "preserveConstEnums": true, 11 | "allowUnreachableCode": false, 12 | "noImplicitAny": false, 13 | "strictNullChecks": false, 14 | "noUnusedLocals": false, 15 | "types": ["mdx"], 16 | "incremental": false, 17 | "skipLibCheck": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /typings.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.jpg'; 2 | -------------------------------------------------------------------------------- /utils/create-component/consoleUtils.js: -------------------------------------------------------------------------------- 1 | const chalk = require('chalk'); 2 | 3 | const consoleMessage = (prefix, fileName, color = 'cyan') => { 4 | console.log(`${prefix} ${chalk[color](fileName)}`); 5 | } 6 | 7 | module.exports = { 8 | consoleMessage, 9 | }; 10 | -------------------------------------------------------------------------------- /utils/create-component/templates/react/hook.content.js: -------------------------------------------------------------------------------- 1 | module.exports = pascalCaseName => ` 2 | import {createElemPropsHook} from '@workday/canvas-kit-react/common'; 3 | import {use${pascalCaseName}Model} from './use${pascalCaseName}Model'; 4 | 5 | /** 6 | * Adds the necessary props to a \`Content\` component. 7 | * Used by the ${pascalCaseName}.Content subcomponent. 8 | */ 9 | export const use${pascalCaseName}Content = createElemPropsHook(use${pascalCaseName}Model)(({state}) => { 10 | return { 11 | ['data-is-it-open']: \`\${state.open ? 'yes' : 'no'}\`, 12 | }; 13 | }); 14 | `; 15 | -------------------------------------------------------------------------------- /utils/create-component/templates/react/hook.index.js: -------------------------------------------------------------------------------- 1 | module.exports = pascalCaseName => ` 2 | export * from './use${pascalCaseName}Model'; 3 | export * from './use${pascalCaseName}Content'; 4 | export * from './use${pascalCaseName}Target'; 5 | `; 6 | -------------------------------------------------------------------------------- /utils/create-component/templates/react/index.js: -------------------------------------------------------------------------------- 1 | module.exports = pascalCaseName => ` 2 | export * from './lib/${pascalCaseName}'; 3 | export * from './lib/hooks/'; 4 | `; 5 | -------------------------------------------------------------------------------- /utils/create-component/templates/react/stories.basic.js: -------------------------------------------------------------------------------- 1 | module.exports = (modulePath, pascalCaseName) => ` 2 | import React from 'react'; 3 | 4 | import {${pascalCaseName}} from '${modulePath}'; 5 | import {SecondaryButton} from '@workday/canvas-kit-react/button'; 6 | 7 | export const Basic = () => { 8 | return ( 9 | <${pascalCaseName}> 10 | <${pascalCaseName}.Target as={SecondaryButton}>Toggle 11 | <${pascalCaseName}.Content> 12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 13 | 14 | 15 | ); 16 | }; 17 | `; 18 | -------------------------------------------------------------------------------- /utils/custom-lint-rules/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Note: you need to run `yarn add -WD file:./utils/custom-lint-rules` after changes for them to be reflected locally 3 | */ 4 | const restrictedImports = require('./restricted-imports'); 5 | const useCKSlashImports = require('./use-ck-slash-imports'); 6 | 7 | module.exports = { 8 | rules: { 9 | 'restricted-imports': restrictedImports, 10 | 'use-ck-slash-imports': useCKSlashImports, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /utils/custom-lint-rules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-plugin-workday-custom-rules", 3 | "version": "0.0.1", 4 | "main": "index.js", 5 | "devDependencies": { 6 | "eslint": "~2.6.0" 7 | }, 8 | "engines": { 9 | "node": ">=0.10.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /utils/storybook/InputProviderDecorator.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {InputProvider} from '@workday/canvas-kit-react/common'; 3 | 4 | export default (storyFn: () => React.ReactNode) => {storyFn()}; 5 | -------------------------------------------------------------------------------- /utils/storybook/Markdown.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import 'github-markdown-css'; 3 | import emojijs from 'emoji-js'; 4 | import MarkdownToJSX from 'markdown-to-jsx'; 5 | 6 | const emoji = new emojijs.EmojiConvertor(); 7 | 8 | interface MarkdownProps { 9 | content: string; 10 | } 11 | 12 | export default class Markdown extends React.Component { 13 | render() { 14 | const convertedContent = emoji.replace_colons(this.props.content); 15 | 16 | return {convertedContent}; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /utils/storybook/customThemes.ts: -------------------------------------------------------------------------------- 1 | import {PartialCanvasTheme} from '@workday/canvas-kit-react/common'; 2 | 3 | export const customColorTheme: PartialCanvasTheme = { 4 | palette: { 5 | primary: { 6 | main: 'purple', 7 | contrast: 'turquoise', 8 | }, 9 | alert: { 10 | main: 'coral', 11 | }, 12 | error: { 13 | main: 'crimson', 14 | }, 15 | success: { 16 | main: 'aquamarine', 17 | }, 18 | neutral: { 19 | main: 'gray', 20 | }, 21 | common: { 22 | focusOutline: 'turquoise', 23 | }, 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /utils/storybook/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | ControlledComponentWrapper, 3 | controlComponent, 4 | useControlledValue, 5 | useControlledCheck, 6 | } from './ControlledComponentWrapper'; 7 | export {customColorTheme} from './customThemes'; 8 | export {withSnapshotsEnabled} from './withSnapshotsEnabled'; 9 | export {default as CanvasProviderDecorator} from './CanvasProviderDecorator'; 10 | export {PopperController, customViewport} from './PopperController'; 11 | export * from './testingOnly'; 12 | -------------------------------------------------------------------------------- /utils/storybook/testingOnly.ts: -------------------------------------------------------------------------------- 1 | export function testingOnly(fn: any) { 2 | fn.story = fn.story || {}; 3 | fn.story.name = `_hidden_`; // hides via style in .storybook/manager-head.html 4 | 5 | return fn; 6 | } 7 | --------------------------------------------------------------------------------