From 083acd26aca07c64193d4892e137a4dbd8596104 Mon Sep 17 00:00:00 2001
From: Elizabeth Craig
Date: Thu, 5 Dec 2019 19:33:57 -0800
Subject: [PATCH 1/5] Rename all lib folders to utils
---
.eslintignore | 8 +-----
.github/CONTRIBUTING.md | 26 +++++++++----------
.github/add-a-feature.md | 7 +++--
.gitignore | 1 +
.nowignore | 6 +----
.prettierignore | 8 +-----
README.md | 26 +++++++++++--------
docs/src/app.tsx | 2 +-
.../ComponentDoc/ComponentDocLinks.tsx | 2 +-
.../ComponentExample/ComponentExample.tsx | 2 +-
.../ComponentExampleVariables.tsx | 2 +-
.../ComponentDoc/ContributionPrompt.tsx | 2 +-
docs/src/components/DocsLayout.tsx | 2 +-
docs/src/components/Sidebar/Sidebar.tsx | 2 +-
docs/src/views/AccessibilityBehaviors.tsx | 6 ++---
docs/src/views/AutoFocusZoneDoc.tsx | 4 +--
docs/src/views/FocusTrapZoneDoc.tsx | 4 +--
docs/src/views/FocusZoneDoc.tsx | 12 ++++-----
.../src/knobs/defaultComponents.tsx | 2 +-
.../docs-components/src/knobs/useRangeKnob.ts | 2 +-
.../knobs/{lib => utils}/parseRangeValue.ts | 0
.../src/NestingRoot.tsx | 2 +-
.../src/hooks/useNestingRoot.ts | 2 +-
.../src/{lib => utils}/RefStack.ts | 0
.../src/components/Accordion/Accordion.tsx | 4 +--
.../components/Accordion/AccordionContent.tsx | 2 +-
.../components/Accordion/AccordionTitle.tsx | 2 +-
packages/react/src/components/Alert/Alert.tsx | 4 +--
.../src/components/Animation/Animation.tsx | 2 +-
.../src/components/Attachment/Attachment.tsx | 4 +--
.../react/src/components/Avatar/Avatar.tsx | 2 +-
packages/react/src/components/Box/Box.tsx | 4 +--
.../react/src/components/Button/Button.tsx | 2 +-
.../src/components/Button/ButtonGroup.tsx | 2 +-
.../src/components/Carousel/Carousel.tsx | 2 +-
.../src/components/Carousel/CarouselItem.tsx | 4 +--
.../Carousel/CarouselNavigation.tsx | 6 ++---
.../Carousel/CarouselNavigationItem.tsx | 2 +-
packages/react/src/components/Chat/Chat.tsx | 4 +--
.../react/src/components/Chat/ChatItem.tsx | 2 +-
.../react/src/components/Chat/ChatMessage.tsx | 4 +--
.../src/components/Checkbox/Checkbox.tsx | 4 +--
packages/react/src/components/Debug/Debug.tsx | 4 +--
.../src/components/Debug/DebugPanelItem.tsx | 2 +-
.../react/src/components/Dialog/Dialog.tsx | 2 +-
.../src/components/Dialog/DialogFooter.tsx | 2 +-
.../react/src/components/Divider/Divider.tsx | 2 +-
.../src/components/Dropdown/Dropdown.tsx | 6 ++---
.../src/components/Dropdown/DropdownItem.tsx | 4 +--
.../Dropdown/DropdownSearchInput.tsx | 4 +--
.../Dropdown/DropdownSelectedItem.tsx | 4 +--
packages/react/src/components/Embed/Embed.tsx | 2 +-
packages/react/src/components/Flex/Flex.tsx | 2 +-
.../react/src/components/Flex/FlexItem.tsx | 4 +--
packages/react/src/components/Form/Form.tsx | 2 +-
.../react/src/components/Form/FormField.tsx | 2 +-
packages/react/src/components/Grid/Grid.tsx | 2 +-
.../react/src/components/Header/Header.tsx | 2 +-
.../components/Header/HeaderDescription.tsx | 2 +-
.../HierarchicalTree/HierarchicalTree.tsx | 2 +-
.../HierarchicalTree/HierarchicalTreeItem.tsx | 2 +-
.../HierarchicalTreeTitle.tsx | 2 +-
packages/react/src/components/Icon/Icon.tsx | 2 +-
packages/react/src/components/Image/Image.tsx | 2 +-
packages/react/src/components/Input/Input.tsx | 4 +--
.../src/components/ItemLayout/ItemLayout.tsx | 2 +-
packages/react/src/components/Label/Label.tsx | 2 +-
.../react/src/components/Layout/Layout.tsx | 2 +-
packages/react/src/components/List/List.tsx | 2 +-
.../react/src/components/List/ListItem.tsx | 2 +-
.../react/src/components/Loader/Loader.tsx | 2 +-
packages/react/src/components/Menu/Menu.tsx | 6 ++---
.../react/src/components/Menu/MenuDivider.tsx | 2 +-
.../react/src/components/Menu/MenuItem.tsx | 4 +--
.../src/components/MenuButton/MenuButton.tsx | 6 ++---
packages/react/src/components/Popup/Popup.tsx | 10 +++----
.../src/components/Popup/PopupContent.tsx | 4 +--
.../react/src/components/Portal/Portal.tsx | 4 +--
.../src/components/Portal/PortalInner.tsx | 2 +-
.../src/components/Provider/Provider.tsx | 8 +++---
.../src/components/Provider/ProviderBox.tsx | 4 +--
.../src/components/RadioGroup/RadioGroup.tsx | 2 +-
.../components/RadioGroup/RadioGroupItem.tsx | 2 +-
.../src/components/Reaction/Reaction.tsx | 2 +-
.../src/components/Reaction/ReactionGroup.tsx | 2 +-
.../react/src/components/Segment/Segment.tsx | 2 +-
.../react/src/components/Slider/Slider.tsx | 4 +--
.../components/SplitButton/SplitButton.tsx | 2 +-
.../react/src/components/Status/Status.tsx | 2 +-
packages/react/src/components/Table/Table.tsx | 6 ++---
.../react/src/components/Table/TableCell.tsx | 2 +-
.../react/src/components/Table/TableRow.tsx | 4 +--
packages/react/src/components/Text/Text.tsx | 2 +-
.../src/components/TextArea/TextArea.tsx | 2 +-
.../react/src/components/Toolbar/Toolbar.tsx | 4 +--
.../components/Toolbar/ToolbarCustomItem.tsx | 2 +-
.../src/components/Toolbar/ToolbarDivider.tsx | 2 +-
.../src/components/Toolbar/ToolbarItem.tsx | 6 ++---
.../src/components/Toolbar/ToolbarMenu.tsx | 4 +--
.../components/Toolbar/ToolbarMenuDivider.tsx | 2 +-
.../components/Toolbar/ToolbarMenuItem.tsx | 4 +--
.../Toolbar/ToolbarMenuRadioGroup.tsx | 4 +--
.../components/Toolbar/ToolbarRadioGroup.tsx | 4 +--
.../react/src/components/Tooltip/Tooltip.tsx | 6 ++---
.../src/components/Tooltip/TooltipContent.tsx | 4 +--
packages/react/src/components/Tree/Tree.tsx | 6 ++---
.../react/src/components/Tree/TreeItem.tsx | 6 ++---
.../react/src/components/Tree/TreeTitle.tsx | 2 +-
.../components/Tree/{lib => utils}/index.ts | 0
packages/react/src/components/Video/Video.tsx | 2 +-
packages/react/src/index.ts | 10 +++----
.../react/src/styles/translateAlignProp.ts | 2 +-
packages/react/src/themes/createTheme.ts | 2 +-
packages/react/src/themes/teams-dark/index.ts | 2 +-
.../components/Dropdown/dropdownVariables.ts | 2 +-
.../components/Input/inputVariables.ts | 2 +-
.../components/TextArea/textAreaVariables.ts | 2 +-
.../src/themes/teams-high-contrast/index.ts | 2 +-
.../teams/components/Alert/alertVariables.ts | 2 +-
.../components/Animation/animationStyles.ts | 2 +-
.../components/Attachment/attachmentStyles.ts | 2 +-
.../Attachment/attachmentVariables.ts | 2 +-
.../teams/components/Avatar/avatarStyles.ts | 2 +-
.../components/Button/buttonGroupStyles.ts | 2 +-
.../teams/components/Button/buttonStyles.ts | 2 +-
.../components/Button/buttonVariables.ts | 2 +-
.../components/Carousel/carouselItemStyles.ts | 2 +-
.../Carousel/carouselNavigationItemStyles.ts | 2 +-
.../Carousel/carouselNavigationStyles.ts | 2 +-
.../Carousel/carouselNavigationVariables.ts | 2 +-
.../components/Carousel/carouselStyles.ts | 2 +-
.../teams/components/Chat/chatItemStyles.ts | 2 +-
.../components/Chat/chatItemVariables.ts | 2 +-
.../components/Chat/chatMessageStyles.ts | 4 +--
.../components/Chat/chatMessageVariables.ts | 2 +-
.../teams/components/Chat/chatStyles.ts | 2 +-
.../components/Checkbox/checkboxVariables.ts | 2 +-
.../components/Dialog/dialogVariables.ts | 2 +-
.../teams/components/Divider/dividerStyles.ts | 2 +-
.../components/Divider/dividerVariables.ts | 2 +-
.../components/Dropdown/dropdownItemStyles.ts | 2 +-
.../components/Dropdown/dropdownStyles.ts | 2 +-
.../components/Dropdown/dropdownVariables.ts | 2 +-
.../teams/components/Embed/embedStyles.ts | 2 +-
.../components/Flex/flexItemVariables.ts | 2 +-
.../teams/components/Flex/flexVariables.ts | 2 +-
.../teams/components/Form/formFieldStyles.ts | 2 +-
.../teams/components/Form/formStyles.ts | 2 +-
.../Header/headerDescriptionStyles.ts | 2 +-
.../Header/headerDescriptionVariables.ts | 2 +-
.../components/Header/headerVariables.ts | 2 +-
.../hierarchicalTreeItemStyles.ts | 2 +-
.../hierarchicalTreeStyles.ts | 2 +-
.../hierarchicalTreeTitleStyles.ts | 2 +-
.../teams/components/Icon/iconStyles.ts | 2 +-
.../teams/components/Icon/iconVariables.ts | 2 +-
.../teams/components/Image/imageVariables.ts | 2 +-
.../teams/components/Input/inputVariables.ts | 2 +-
.../ItemLayout/itemLayoutVariables.ts | 2 +-
.../teams/components/Label/labelStyles.ts | 2 +-
.../teams/components/Label/labelVariables.ts | 2 +-
.../teams/components/List/listItemStyles.ts | 4 +--
.../components/List/listItemVariables.ts | 2 +-
.../teams/components/Loader/loaderStyles.ts | 2 +-
.../components/Loader/loaderVariables.ts | 2 +-
.../teams/components/Menu/menuItemStyles.ts | 2 +-
.../teams/components/Menu/menuStyles.ts | 2 +-
.../teams/components/Menu/menuVariables.ts | 2 +-
.../components/Popup/popupContentVariables.ts | 2 +-
.../Provider/providerBoxVariables.ts | 2 +-
.../RadioGroup/radioGroupItemStyles.ts | 2 +-
.../RadioGroup/radioGroupItemVariables.ts | 2 +-
.../Reaction/reactionGroupVariables.ts | 2 +-
.../components/Reaction/reactionStyles.ts | 2 +-
.../components/Reaction/reactionVariables.ts | 2 +-
.../components/Segment/segmentVariables.ts | 2 +-
.../components/Slider/sliderVariables.ts | 2 +-
.../SplitButton/splitButtonVariables.ts | 2 +-
.../teams/components/Status/statusStyles.ts | 2 +-
.../teams/components/Table/tableVariables.ts | 2 +-
.../teams/components/Text/textVariables.ts | 2 +-
.../components/TextArea/textAreaVariables.ts | 2 +-
.../Toolbar/toolbarMenuItemStyles.ts | 2 +-
.../components/Toolbar/toolbarVariables.ts | 2 +-
.../Tooltip/tooltipContentStyles.ts | 2 +-
.../Tooltip/tooltipContentVariables.ts | 2 +-
.../teams/components/Tree/treeItemStyles.ts | 2 +-
.../teams/components/Tree/treeStyles.ts | 2 +-
.../components/Tree/treeTitleVariables.ts | 2 +-
.../src/themes/teams/getPointerStyles.ts | 2 +-
.../react/src/themes/teams/siteVariables.ts | 2 +-
packages/react/src/types.ts | 2 +-
.../AutoControlledComponent.tsx | 0
.../react/src/{lib => utils}/Telemetry.ts | 0
.../react/src/{lib => utils}/UIComponent.tsx | 0
.../FocusHandling/FocusContainer.ts | 0
.../Styles/accessibilityStyles.ts | 0
.../accessibility/reactTypes.ts | 0
.../applyAccessibilityKeyHandlers.ts | 0
.../react/src/{lib => utils}/childrenExist.ts | 0
.../{lib => utils}/commonPropInterfaces.ts | 0
.../src/{lib => utils}/commonPropTypes.ts | 0
.../react/src/{lib => utils}/constants.ts | 0
.../{lib => utils}/createAnimationStyles.tsx | 0
.../src/{lib => utils}/createComponent.ts | 0
.../createStardustComponent.tsx | 0
.../src/{lib => utils}/cssExpandShorthand.ts | 0
packages/react/src/{lib => utils}/debounce.ts | 0
.../src/{lib => utils}/debug/debugData.ts | 0
.../src/{lib => utils}/debug/debugEnabled.ts | 0
.../react/src/{lib => utils}/deepmerge.ts | 0
.../{lib => utils}/doesNodeContainClick.tsx | 0
.../react/src/{lib => utils}/factories.ts | 0
.../felaDisableAnimationsPlugin.ts | 0
.../felaExpandCssShorthandsPlugin.ts | 0
.../felaFocusVisibleEnhancer.ts | 0
.../felaInvokeKeyframesPlugin.ts | 0
.../react/src/{lib => utils}/felaRenderer.tsx | 0
.../{lib => utils}/felaSanitizeCssPlugin.ts | 0
.../src/{lib => utils}/fontSizeUtility.ts | 0
.../react/src/{lib => utils}/getClasses.ts | 0
.../src/{lib => utils}/getElementProp.ts | 0
.../src/{lib => utils}/getKeyDownHandlers.ts | 0
.../react/src/{lib => utils}/getKindProp.ts | 0
.../getOrGenerateIdFromShorthand.ts | 0
.../src/{lib => utils}/htmlPropsUtils.tsx | 0
packages/react/src/{lib => utils}/index.ts | 0
.../react/src/{lib => utils}/isBrowser.tsx | 0
.../react/src/{lib => utils}/isRightClick.ts | 0
.../{lib => utils}/mergeProviderContexts.ts | 0
.../react/src/{lib => utils}/mergeThemes.ts | 0
.../src/{lib => utils}/objectKeysToValues.ts | 0
.../src/{lib => utils}/positioner/Popper.tsx | 0
.../positioner/getScrollParent.ts | 0
.../src/{lib => utils}/positioner/index.ts | 0
.../positioner/positioningHelper.ts | 0
.../positioner/types.internal.ts | 0
.../src/{lib => utils}/positioner/types.ts | 0
.../{lib => utils}/providerMissingHandler.ts | 0
.../src/{lib => utils}/renderComponent.tsx | 0
.../{lib => utils}/resolveStylesAndClasses.ts | 0
.../src/{lib => utils}/rtlTextContainer.tsx | 0
.../src/{lib => utils}/shouldHandleOnKeys.ts | 0
.../src/{lib => utils}/stringLiteralsArray.ts | 0
.../src/{lib => utils}/toCompactArray.ts | 0
.../react/src/{lib => utils}/whatInput.ts | 0
.../react/src/{lib => utils}/withDebugId.ts | 0
.../commonTests/handlesAccessibility.tsx | 2 +-
.../specs/commonTests/stylesFunction-test.tsx | 2 +-
.../AutoControlledComponent-test.tsx | 0
.../felaFocusVisibleEnhancer-test.ts.snap | 0
.../__snapshots__/felaRenderer-test.tsx.snap | 0
.../accessibility/FocusContainer-test.ts | 0
.../{lib => utils}/childrenExist-test.tsx | 0
.../createAnimationStyles-test.ts | 0
.../{lib => utils}/createComponent-test.tsx | 0
.../specs/{lib => utils}/deepmerge-test.ts | 0
.../doesNodeContainClick-test.ts | 0
.../specs/{lib => utils}/factories-test.tsx | 0
.../felaDisableAnimationsPlugin-test.ts | 0
.../felaExpandCssShorthandsPlugin-test.ts | 0
.../felaFocusVisibleEnhancer-test.ts | 0
.../felaInvokeKeyframesPlugin-test.ts | 0
.../{lib => utils}/felaRenderer-test.tsx | 0
.../felaSanitizeCssPlugin-test.ts | 0
.../{lib => utils}/fontSizeUtility-test.ts | 0
.../{lib => utils}/getKeyDownHandlers-test.ts | 0
.../htmlInputPropsUtils-test.ts | 0
.../specs/{lib => utils}/isBrowser-test.ts | 0
.../mergeBooleanValues-test.ts | 2 +-
.../mergeProviderContexts-test.ts | 0
.../mergeThemes/mergeComponentStyles-test.ts | 0
.../mergeComponentVariables-test.ts | 0
.../mergeThemes/mergeFontFaces-test.ts | 0
.../mergeThemes/mergeSiteVariables-test.ts | 0
.../mergeThemes/mergeStaticStyles-test.ts | 0
.../mergeThemes/mergeThemeVariables-test.ts | 0
.../mergeThemes/mergeThemes-test.ts | 0
.../{lib => utils}/objectKeysToValues-test.ts | 0
.../positioner/getScrollParent-test.ts | 0
.../positioner/positioningHelper-test.ts | 0
.../resolveStylesAndClasses-test.ts | 0
.../{lib => utils}/shouldHandleOnKeys-test.ts | 0
283 files changed, 285 insertions(+), 299 deletions(-)
rename packages/docs-components/src/knobs/{lib => utils}/parseRangeValue.ts (100%)
rename packages/react-component-nesting-registry/src/{lib => utils}/RefStack.ts (100%)
rename packages/react/src/components/Tree/{lib => utils}/index.ts (100%)
rename packages/react/src/{lib => utils}/AutoControlledComponent.tsx (100%)
rename packages/react/src/{lib => utils}/Telemetry.ts (100%)
rename packages/react/src/{lib => utils}/UIComponent.tsx (100%)
rename packages/react/src/{lib => utils}/accessibility/FocusHandling/FocusContainer.ts (100%)
rename packages/react/src/{lib => utils}/accessibility/Styles/accessibilityStyles.ts (100%)
rename packages/react/src/{lib => utils}/accessibility/reactTypes.ts (100%)
rename packages/react/src/{lib => utils}/applyAccessibilityKeyHandlers.ts (100%)
rename packages/react/src/{lib => utils}/childrenExist.ts (100%)
rename packages/react/src/{lib => utils}/commonPropInterfaces.ts (100%)
rename packages/react/src/{lib => utils}/commonPropTypes.ts (100%)
rename packages/react/src/{lib => utils}/constants.ts (100%)
rename packages/react/src/{lib => utils}/createAnimationStyles.tsx (100%)
rename packages/react/src/{lib => utils}/createComponent.ts (100%)
rename packages/react/src/{lib => utils}/createStardustComponent.tsx (100%)
rename packages/react/src/{lib => utils}/cssExpandShorthand.ts (100%)
rename packages/react/src/{lib => utils}/debounce.ts (100%)
rename packages/react/src/{lib => utils}/debug/debugData.ts (100%)
rename packages/react/src/{lib => utils}/debug/debugEnabled.ts (100%)
rename packages/react/src/{lib => utils}/deepmerge.ts (100%)
rename packages/react/src/{lib => utils}/doesNodeContainClick.tsx (100%)
rename packages/react/src/{lib => utils}/factories.ts (100%)
rename packages/react/src/{lib => utils}/felaDisableAnimationsPlugin.ts (100%)
rename packages/react/src/{lib => utils}/felaExpandCssShorthandsPlugin.ts (100%)
rename packages/react/src/{lib => utils}/felaFocusVisibleEnhancer.ts (100%)
rename packages/react/src/{lib => utils}/felaInvokeKeyframesPlugin.ts (100%)
rename packages/react/src/{lib => utils}/felaRenderer.tsx (100%)
rename packages/react/src/{lib => utils}/felaSanitizeCssPlugin.ts (100%)
rename packages/react/src/{lib => utils}/fontSizeUtility.ts (100%)
rename packages/react/src/{lib => utils}/getClasses.ts (100%)
rename packages/react/src/{lib => utils}/getElementProp.ts (100%)
rename packages/react/src/{lib => utils}/getKeyDownHandlers.ts (100%)
rename packages/react/src/{lib => utils}/getKindProp.ts (100%)
rename packages/react/src/{lib => utils}/getOrGenerateIdFromShorthand.ts (100%)
rename packages/react/src/{lib => utils}/htmlPropsUtils.tsx (100%)
rename packages/react/src/{lib => utils}/index.ts (100%)
rename packages/react/src/{lib => utils}/isBrowser.tsx (100%)
rename packages/react/src/{lib => utils}/isRightClick.ts (100%)
rename packages/react/src/{lib => utils}/mergeProviderContexts.ts (100%)
rename packages/react/src/{lib => utils}/mergeThemes.ts (100%)
rename packages/react/src/{lib => utils}/objectKeysToValues.ts (100%)
rename packages/react/src/{lib => utils}/positioner/Popper.tsx (100%)
rename packages/react/src/{lib => utils}/positioner/getScrollParent.ts (100%)
rename packages/react/src/{lib => utils}/positioner/index.ts (100%)
rename packages/react/src/{lib => utils}/positioner/positioningHelper.ts (100%)
rename packages/react/src/{lib => utils}/positioner/types.internal.ts (100%)
rename packages/react/src/{lib => utils}/positioner/types.ts (100%)
rename packages/react/src/{lib => utils}/providerMissingHandler.ts (100%)
rename packages/react/src/{lib => utils}/renderComponent.tsx (100%)
rename packages/react/src/{lib => utils}/resolveStylesAndClasses.ts (100%)
rename packages/react/src/{lib => utils}/rtlTextContainer.tsx (100%)
rename packages/react/src/{lib => utils}/shouldHandleOnKeys.ts (100%)
rename packages/react/src/{lib => utils}/stringLiteralsArray.ts (100%)
rename packages/react/src/{lib => utils}/toCompactArray.ts (100%)
rename packages/react/src/{lib => utils}/whatInput.ts (100%)
rename packages/react/src/{lib => utils}/withDebugId.ts (100%)
rename packages/react/test/specs/{lib => utils}/AutoControlledComponent-test.tsx (100%)
rename packages/react/test/specs/{lib => utils}/__snapshots__/felaFocusVisibleEnhancer-test.ts.snap (100%)
rename packages/react/test/specs/{lib => utils}/__snapshots__/felaRenderer-test.tsx.snap (100%)
rename packages/react/test/specs/{lib => utils}/accessibility/FocusContainer-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/childrenExist-test.tsx (100%)
rename packages/react/test/specs/{lib => utils}/createAnimationStyles-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/createComponent-test.tsx (100%)
rename packages/react/test/specs/{lib => utils}/deepmerge-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/doesNodeContainClick-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/factories-test.tsx (100%)
rename packages/react/test/specs/{lib => utils}/felaDisableAnimationsPlugin-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/felaExpandCssShorthandsPlugin-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/felaFocusVisibleEnhancer-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/felaInvokeKeyframesPlugin-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/felaRenderer-test.tsx (100%)
rename packages/react/test/specs/{lib => utils}/felaSanitizeCssPlugin-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/fontSizeUtility-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/getKeyDownHandlers-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/htmlInputPropsUtils-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/isBrowser-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeProviderContexts/mergeBooleanValues-test.ts (94%)
rename packages/react/test/specs/{lib => utils}/mergeProviderContexts/mergeProviderContexts-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeComponentStyles-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeComponentVariables-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeFontFaces-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeSiteVariables-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeStaticStyles-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeThemeVariables-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/mergeThemes/mergeThemes-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/objectKeysToValues-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/positioner/getScrollParent-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/positioner/positioningHelper-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/resolveStylesAndClasses-test.ts (100%)
rename packages/react/test/specs/{lib => utils}/shouldHandleOnKeys-test.ts (100%)
diff --git a/.eslintignore b/.eslintignore
index a719533e5c..b08f6bfbd8 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,10 +1,4 @@
coverage/
dist/
+lib/
node_modules/
-
-# packages that have lib as the output
-packages/digest/lib
-packages/perf-test/lib
-packages/playground/lib
-packages/react-theming/lib
-
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index b5cb5e7199..5cee003198 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,10 +1,8 @@
-CONTRIBUTING
-============
+# CONTRIBUTING
-
- [Getting started](#getting-started)
- [Useful Commands](#useful-commands)
- [Workflow](#workflow)
@@ -31,7 +29,7 @@ You can contribute to Stardust by being an official [contributor](setup-local-de
### Useful Commands
->This list contains the most useful commands. You should run `yarn run` to see all scripts.
+> This list contains the most useful commands. You should run `yarn run` to see all scripts.
```sh
yarn start // run doc site
@@ -66,7 +64,7 @@ These guides will walk your through various activities for contributing:
## Accessibility
-Stardust implements accessibility using accessibility behaviors. The behaviors add attributes to the DOM elements (mainly role and aria-* properties) as well as handle keyboard interaction and focus. Every accessible component has a default behavior, which can be overriden using the `accessibility` prop. You can choose a behavior from the ones provided by Stardust or you can implement a new behavior.
+Stardust implements accessibility using accessibility behaviors. The behaviors add attributes to the DOM elements (mainly role and aria-\* properties) as well as handle keyboard interaction and focus. Every accessible component has a default behavior, which can be overriden using the `accessibility` prop. You can choose a behavior from the ones provided by Stardust or you can implement a new behavior.
Behaviors apply properties, focus handling and keyboard handlers to the component slots. When developing a component, the properties and keyboard handlers need to be spread to the corresponding slots.
@@ -83,13 +81,15 @@ ARIA [roles][3] and [attributes][4] provide necessary semantics for assistive te
In addition to behaviors, ARIA [landmarks][5] and [naming props][6] need to be added to the components/elements to form the page structure and provide textual information.
For example, to make an icon-only Button accessible, `aria-label` prop needs to be used:
+
```html
-
+
```
### Focus
An application should always have an element with [focus][7] when in use. The user can change the focused element by:
+
- pressing TAB/shift+TAB keys to navigate through the components
- pressing arrow keys to navigate through children (for example menu items in menu)
- using the screen reader with or without virtual cursor
@@ -98,7 +98,7 @@ Stardust uses Office UI Fabric [FocusZone][8] for basic TAB and arrow key focus
Focused component needs to be clearly visible. This is handled in Stardust by focus indicator functionality. Focus indicator will be displayed only if the application is in keyboard mode. Application switches to keyboard mode when a key relevant to navigation is pressed. It disables keyboard mode on mouse click events.
- To style the focused component, you can use the `isFromKeyboard` utility and prop. See [Button component][10] and [Button style][11] for reference.
+To style the focused component, you can use the `isFromKeyboard` utility and prop. See [Button component][10] and [Button style][11] for reference.
### Keyboard handling
@@ -111,7 +111,7 @@ We are using [Lerna][14] to manage our packages and [Yarn Workspaces][15] to lin
### Add a new package
#### Run `lerna create`
-
+
You should to run `lerna create` command to create a new package
- we are using `@fluentui` namespace on NPM to publish our packages
@@ -126,6 +126,7 @@ lerna create @fluentui/react-proptypes react-proptypes
```
##### Example input
+
```
lerna notice cli v3.11.1
package name: (@fluentui/react-proptypes)
@@ -179,10 +180,7 @@ If your package uses TypeScript, please also create a new `tsconfig.json` and pl
```json
{
"extends": "../../build/tsconfig.common",
- "include": [
- "src",
- "test"
- ]
+ "include": ["src", "test"]
}
```
@@ -225,10 +223,10 @@ lerna add @fluentui/react-proptypes packages/react
[6]: https://www.w3.org/TR/wai-aria-1.1/#namecalculation
[7]: https://www.w3.org/TR/wai-aria-1.1/#managingfocus
[8]: https://developer.microsoft.com/en-us/fabric#/components/focuszone
-[9]: https://github.com/stardust-ui/react/blob/master/src/lib/accessibility/Behaviors/Menu/MenuBehavior.ts
+[9]: https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/Behaviors/Menu/MenuBehavior.ts
[10]: https://github.com/stardust-ui/react/blob/master/src/components/Button/Button.tsx
[11]: https://github.com/stardust-ui/react/blob/master/src/themes/teams/components/Button/buttonStyles.ts
-[12]: https://github.com/stardust-ui/react/blob/master/src/lib/accessibility/Behaviors/Menu/MenuItemBehavior.ts
+[12]: https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/Behaviors/Menu/MenuItemBehavior.ts
[13]: https://github.com/stardust-ui/react/blob/master/src/components/Menu/MenuItem.tsx
[14]: https://lernajs.io/
[15]: https://yarnpkg.com/en/docs/workspaces
diff --git a/.github/add-a-feature.md b/.github/add-a-feature.md
index 02f568e43e..754f2c90d9 100644
--- a/.github/add-a-feature.md
+++ b/.github/add-a-feature.md
@@ -3,7 +3,6 @@
-
- [Propose feature](#propose-feature)
- [Prototype](#prototype)
- [Spec out the API](#spec-out-the-api)
@@ -67,7 +66,7 @@ const Button: React.FunctionalComponent = props => {
Stateful components should be classes:
```tsx
-import { AutoControlledComponent as Component } from '../../lib'
+import { AutoControlledComponent as Component } from '../../utils'
class Dropdown extends AutoControlledComponent {
// ...
@@ -100,7 +99,7 @@ import {
ContentComponentProps,
UIComponentProps,
commonPropTypes,
-} from '../../lib'
+} from '../../utils'
export interface DividerProps
extends UIComponentProps,
@@ -188,7 +187,7 @@ After iterating on the feature with the maintainers, you will add full test cove
[1]: https://github.com/stardust-ui/react/issues
[2]: https://github.com/stardust-ui/react/pull/73
-[3]: https://github.com/stardust-ui/react/blob/master/src/lib/AutoControlledComponent.tsx
+[3]: https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/AutoControlledComponent.tsx
[4]: https://facebook.github.io/react/docs/forms.html#controlled-components
[5]: https://facebook.github.io/react/docs/forms.html#uncontrolled-components
[6]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
diff --git a/.gitignore b/.gitignore
index 2172c790e9..d8a72292dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@ docs/src/currentBundleStats.json
docs/src/exampleMenus
docs/src/exampleSources
docs/dist/
+# lib/
node_modules/
report.*.json
stats/
diff --git a/.nowignore b/.nowignore
index 5006f48e03..be1f4dc3b8 100644
--- a/.nowignore
+++ b/.nowignore
@@ -9,16 +9,12 @@ docs/src/currentBundleStats.json
docs/src/exampleMenus
docs/src/exampleSources
e2e
+lib/
node_modules
packages/**/dist
packages/**/test
perf/dist
-packages/digest/lib
-packages/perf-test/lib
-packages/playground/lib
-packages/react-theming/lib
-
.editorconfig
.gitignore
.prettierignore
diff --git a/.prettierignore b/.prettierignore
index 3b96975963..74d279c852 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,17 +2,11 @@
.idea/
.vscode/
-
coverage/
dist/
+lib/
stats/
-# packages that have lib as the output
-packages/digest/lib
-packages/perf-test/lib
-packages/playground/lib
-packages/react-theming/lib
-
package.json
packages/ability-attributes/src/schema.ts
diff --git a/README.md b/README.md
index 6456f90a1e..b59b3aa4c0 100644
--- a/README.md
+++ b/README.md
@@ -29,14 +29,14 @@
->Hey, we're in development:
+> Hey, we're in development:
>
->1. **MINOR** versions represent **breaking changes**
->1. **PATCH** versions represent **fixes _and_ features**
->1. There are **no deprecation warnings** between releases
->1. Consult the [**CHANGELOG**][4] and related issues/PRs for more information
+> 1. **MINOR** versions represent **breaking changes**
+> 1. **PATCH** versions represent **fixes _and_ features**
+> 1. There are **no deprecation warnings** between releases
+> 1. Consult the [**CHANGELOG**][4] and related issues/PRs for more information
-***
+---
Fluent UI React represents a set of specifications and tools for building UI libraries.
@@ -44,7 +44,7 @@ Fluent UI React represents a set of specifications and tools for building UI lib
### [Voice Your Opinion][101]
-Help shape this library by weighing in on our [RFC (request for comments)][101] issues.
+Help shape this library by weighing in on our [RFC (request for comments)][101] issues.
### [Contribute][3]
@@ -52,11 +52,11 @@ Our [CONTRIBUTING.md][3] is a step-by-step setup and development guide.
### [Good First Issue][103]
-Issues labeled [`good first issue`][103] are a great way to ease into development on this project.
+Issues labeled [`good first issue`][103] are a great way to ease into development on this project.
### [New Components][102]
-There is an issue for every new component labeled [`new component`][102]. Just comment on the issue you'd like to take.
+There is an issue for every new component labeled [`new component`][102]. Just comment on the issue you'd like to take.
### [Help Wanted Label][100]
@@ -64,7 +64,7 @@ Any other issue labeled [`help wanted`][100] is also ready for a PR.
## Why?
-There are a number of packages that a UI library needs to create great UI components. Take a look at SUIR's [`/src/lib`][201] as an example. This core library enables the SUIR features we love today such as shorthand props, event stack handling, auto controlled state, controlling the rendered component, and more.
+There are a number of packages that a UI library needs to create great UI components. Take a look at SUIR's [`/src/utils`][201] as an example. This core library enables the SUIR features we love today such as shorthand props, event stack handling, auto controlled state, controlling the rendered component, and more.
Other libraries in the wild have some of these features and some of their own. It is our desire that the community share the best UI component practices in a core library to the greater benefit of the web.
@@ -95,6 +95,7 @@ You can find Stardust usage examples by accessing the [doc site][5]
See the [MANIFESTO.md][1] for details. SUIR v2 will be built on the specifications and tools from Stardust.
+
[1]: https://github.com/microsoft/fluent-ui-react/blob/master/MANIFESTO.md
[2]: https://github.com/microsoft/fluent-ui-react/issues/new/choose
[3]: https://github.com/microsoft/fluent-ui-react/blob/master/.github/CONTRIBUTING.md
@@ -102,15 +103,18 @@ See the [MANIFESTO.md][1] for details. SUIR v2 will be built on the specificatio
[5]: https://microsoft.github.io/fluent-ui-react
+
[100]: https://github.com/microsoft/fluent-ui-react/labels/help%20wanted
[101]: https://github.com/microsoft/fluent-ui-react/issues?q=is%3Aopen+RFC+label%3ARFC
[102]: https://github.com/microsoft/fluent-ui-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+component%22
[103]: https://github.com/microsoft/fluent-ui-react/labels/good%20first%20issue
+
[200]: https://github.com/Semantic-Org/Semantic-UI-React
-[201]: https://github.com/Semantic-Org/Semantic-UI-React/tree/master/src/lib
+[201]: https://github.com/Semantic-Org/Semantic-UI-React/tree/master/packages/react/src/utils
+
[300]: https://developer.microsoft.com/en-us/fabric
[301]: https://products.office.com/en-US/microsoft-teams/group-chat-software
diff --git a/docs/src/app.tsx b/docs/src/app.tsx
index 08579fbe44..9166657fed 100644
--- a/docs/src/app.tsx
+++ b/docs/src/app.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import { hot } from 'react-hot-loader/root'
import { Provider, Debug, themes } from '@fluentui/react'
-import { mergeThemes } from 'src/lib'
+import { mergeThemes } from '@fluentui/react/src/utils'
import { ThemeContext, ThemeContextData, themeContextDefaults } from './context/ThemeContext'
import Routes from './routes'
import { PerfDataProvider } from './components/ComponentDoc/PerfChart'
diff --git a/docs/src/components/ComponentDoc/ComponentDocLinks.tsx b/docs/src/components/ComponentDoc/ComponentDocLinks.tsx
index 533921de2a..cecfe39d36 100644
--- a/docs/src/components/ComponentDoc/ComponentDocLinks.tsx
+++ b/docs/src/components/ComponentDoc/ComponentDocLinks.tsx
@@ -1,7 +1,7 @@
import * as PropTypes from 'prop-types'
import * as React from 'react'
import { Flex, Icon } from '@fluentui/react'
-import { constants } from 'src/lib'
+import { constants } from '@fluentui/react/src/utils'
export default class ComponentDocLinks extends React.PureComponent {
static propTypes = {
diff --git a/docs/src/components/ComponentDoc/ComponentExample/ComponentExample.tsx b/docs/src/components/ComponentDoc/ComponentExample/ComponentExample.tsx
index bcf9058881..6df9c177a4 100644
--- a/docs/src/components/ComponentDoc/ComponentExample/ComponentExample.tsx
+++ b/docs/src/components/ComponentDoc/ComponentExample/ComponentExample.tsx
@@ -14,7 +14,7 @@ import qs from 'qs'
import SourceRender from 'react-source-render'
import { examplePathToHash, getFormattedHash, scrollToAnchor } from 'docs/src/utils'
-import { constants } from 'src/lib'
+import { constants } from '@fluentui/react/src/utils'
import Editor, { EDITOR_BACKGROUND_COLOR, EDITOR_GUTTER_COLOR } from 'docs/src/components/Editor'
import { babelConfig, importResolver } from 'docs/src/components/Playground/renderConfig'
import ExampleContext, { ExampleContextValue } from 'docs/src/context/ExampleContext'
diff --git a/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleVariables.tsx b/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleVariables.tsx
index 85eaaec36a..fed16d3f99 100644
--- a/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleVariables.tsx
+++ b/docs/src/components/ComponentDoc/ComponentExample/ComponentExampleVariables.tsx
@@ -12,7 +12,7 @@ import * as React from 'react'
import { ThemeContext } from 'react-fela'
import ComponentExampleVariable, { ComponentExampleVariableProps } from './ComponentExampleVariable'
-import { mergeThemeVariables } from 'src/lib/mergeThemes'
+import { mergeThemeVariables } from '@fluentui/react/src/utils/mergeThemes'
type ComponentExampleVariablesProps = {
onChange: ComponentExampleVariableProps['onChange']
diff --git a/docs/src/components/ComponentDoc/ContributionPrompt.tsx b/docs/src/components/ComponentDoc/ContributionPrompt.tsx
index 05a7aa69be..b86975f10a 100644
--- a/docs/src/components/ComponentDoc/ContributionPrompt.tsx
+++ b/docs/src/components/ComponentDoc/ContributionPrompt.tsx
@@ -2,7 +2,7 @@ import * as PropTypes from 'prop-types'
import * as React from 'react'
import { Icon, Segment, Text, ICSSInJSStyle } from '@fluentui/react'
-import { constants } from 'src/lib'
+import { constants } from '@fluentui/react/src/utils'
const wrapStyle: ICSSInJSStyle = { wordBreak: 'break-word' }
diff --git a/docs/src/components/DocsLayout.tsx b/docs/src/components/DocsLayout.tsx
index e54aa078ca..17856828b7 100644
--- a/docs/src/components/DocsLayout.tsx
+++ b/docs/src/components/DocsLayout.tsx
@@ -6,7 +6,7 @@ import { withRouter } from 'react-router-dom'
import Sidebar from 'docs/src/components/Sidebar/Sidebar'
import { scrollToAnchor } from 'docs/src/utils'
-import { mergeThemes } from 'src/lib'
+import { mergeThemes } from '@fluentui/react/src/utils'
const anchors = new AnchorJS({
class: 'anchor-link',
diff --git a/docs/src/components/Sidebar/Sidebar.tsx b/docs/src/components/Sidebar/Sidebar.tsx
index 354a162984..590c0cfcb1 100644
--- a/docs/src/components/Sidebar/Sidebar.tsx
+++ b/docs/src/components/Sidebar/Sidebar.tsx
@@ -20,7 +20,7 @@ import * as PropTypes from 'prop-types'
import * as React from 'react'
import { NavLink, NavLinkProps, withRouter } from 'react-router-dom'
-import { constants } from 'src/lib'
+import { constants } from '@fluentui/react/src/utils'
type ComponentMenuItem = { displayName: string; type: string }
diff --git a/docs/src/views/AccessibilityBehaviors.tsx b/docs/src/views/AccessibilityBehaviors.tsx
index 0311183e45..a48697a8c0 100644
--- a/docs/src/views/AccessibilityBehaviors.tsx
+++ b/docs/src/views/AccessibilityBehaviors.tsx
@@ -217,11 +217,11 @@ export default () => (
value={`
const overridenMenuBehavior: Accessibility = (props: any) => {
const behavior = menuBehavior(props)
-
+
behavior.focusZone.props.defaultTabbableElement = (root: HTMLElement): HTMLElement => {
return root.querySelector(".ui-menu__item__wrapper:last-child")
}
-
+
return behavior
}
`}
@@ -232,7 +232,7 @@ export default () => (
All Stardust behaviors implementations can be found on the{' '}
{link(
'GitHub',
- 'https://github.com/stardust-ui/react/tree/master/packages/react/src/lib/accessibility/Behaviors',
+ 'https://github.com/stardust-ui/react/tree/master/packages/react/src/utils/accessibility/Behaviors',
)}
.
diff --git a/docs/src/views/AutoFocusZoneDoc.tsx b/docs/src/views/AutoFocusZoneDoc.tsx
index 81d14603c5..5dae4e7b4f 100644
--- a/docs/src/views/AutoFocusZoneDoc.tsx
+++ b/docs/src/views/AutoFocusZoneDoc.tsx
@@ -36,7 +36,7 @@ export default () => (
{code('AutoFocusZone')}'s props which can be applied to {code('autoFocus')} prop (
{link(
'lookup for API on GitHub',
- 'https://github.com/stardust-ui/react/blob/master/packages/react/src/lib/accessibility/AutoFocusZone/AutoFocusZone.types.tsx',
+ 'https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/AutoFocusZone/AutoFocusZone.types.tsx',
)}
):
@@ -70,7 +70,7 @@ export default () => (
{code('AutoFocusZone')} code on{' '}
{link(
'GitHub.',
- 'https://github.com/stardust-ui/react/blob/master/packages/react/src/lib/accessibility/FocusZone/AutoFocusZone.tsx',
+ 'https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/FocusZone/AutoFocusZone.tsx',
)}
diff --git a/docs/src/views/FocusTrapZoneDoc.tsx b/docs/src/views/FocusTrapZoneDoc.tsx
index 74b79ee571..833b3a5da7 100644
--- a/docs/src/views/FocusTrapZoneDoc.tsx
+++ b/docs/src/views/FocusTrapZoneDoc.tsx
@@ -47,7 +47,7 @@ export default () => (
{code('FocusTrapZone')}'s props which can be applied to {code('trapFocus')} prop (
{link(
'lookup for API on GitHub',
- 'https://github.com/stardust-ui/react/blob/master/packages/react/src/lib/accessibility/FocusTrapZone/FocusTrapZone.types.tsx',
+ 'https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/FocusTrapZone/FocusTrapZone.types.tsx',
)}
):
@@ -88,7 +88,7 @@ export default () => (
{code('FocusTrapZone')} code on{' '}
{link(
'GitHub.',
- 'https://github.com/stardust-ui/react/blob/master/packages/react/src/lib/accessibility/FocusZone/FocusTrapZone.tsx',
+ 'https://github.com/stardust-ui/react/blob/master/packages/react/src/utils/accessibility/FocusZone/FocusTrapZone.tsx',
)}
diff --git a/docs/src/views/FocusZoneDoc.tsx b/docs/src/views/FocusZoneDoc.tsx
index b1071d10de..13eca3ea89 100644
--- a/docs/src/views/FocusZoneDoc.tsx
+++ b/docs/src/views/FocusZoneDoc.tsx
@@ -92,7 +92,7 @@ export default () => (
---> FocusZone's attributes/events listeners applied here
+
---> FocusZone's attributes/events listeners applied here