diff --git a/packages/core/package.json b/packages/core/package.json index da2ed9aac5..130a463794 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,7 +31,6 @@ "copyfiles": "2.2.0", "cssnano": "4.1.10", "hds-design-tokens": "3.4.0", - "normalize.css": "8.0.1", "postcss": "8.2.15", "postcss-cli": "8.3.1", "postcss-import": "12.0.1", diff --git a/packages/core/src/base.css b/packages/core/src/base.css index 36b08b552d..bdbfc59f4f 100644 --- a/packages/core/src/base.css +++ b/packages/core/src/base.css @@ -1,4 +1,12 @@ -@import url("normalize.css"); @import url("hds-design-tokens"); @import url("utils/animations.css"); @import url("utils/helpers.css"); + +/* + * Normalize.css rule + * 1. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + -webkit-text-size-adjust: 100%; /* 1 */ +} \ No newline at end of file diff --git a/packages/react/.templates/new-component/NewComponent.tsx b/packages/react/.templates/new-component/NewComponent.tsx index 8ee25c8036..fd45243c53 100644 --- a/packages/react/.templates/new-component/NewComponent.tsx +++ b/packages/react/.templates/new-component/NewComponent.tsx @@ -1,6 +1,5 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; import styles from './[-replace-name-capital-].module.scss'; diff --git a/packages/react/src/components/accordion/Accordion.tsx b/packages/react/src/components/accordion/Accordion.tsx index 3861239883..6af11e6acc 100644 --- a/packages/react/src/components/accordion/Accordion.tsx +++ b/packages/react/src/components/accordion/Accordion.tsx @@ -2,9 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; import uniqueId from 'lodash.uniqueid'; import pickBy from 'lodash.pickby'; -// import base styles import '../../styles/base.css'; - import styles from './Accordion.module.scss'; import classNames from '../../utils/classNames'; import { IconAngleDown, IconAngleUp } from '../../icons'; diff --git a/packages/react/src/components/breadcrumb/Breadcrumb.tsx b/packages/react/src/components/breadcrumb/Breadcrumb.tsx index ab818aac4e..49d1a9c477 100644 --- a/packages/react/src/components/breadcrumb/Breadcrumb.tsx +++ b/packages/react/src/components/breadcrumb/Breadcrumb.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Breadcrumb.module.scss'; import { Link } from '../link'; import { IconAngleLeft, IconAngleRight } from '../../icons'; diff --git a/packages/react/src/components/button/Button.tsx b/packages/react/src/components/button/Button.tsx index aa841b2240..6a36fe3872 100644 --- a/packages/react/src/components/button/Button.tsx +++ b/packages/react/src/components/button/Button.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import { LoadingSpinner } from '../loadingSpinner'; import styles from './Button.module.scss'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/card/Card.module.scss b/packages/react/src/components/card/Card.module.scss index 17645443df..5227822208 100644 --- a/packages/react/src/components/card/Card.module.scss +++ b/packages/react/src/components/card/Card.module.scss @@ -1,14 +1,5 @@ .card { - --background-color: var(--color-white); - --border-color: var(--color-black-90); - --color: var(--color-black-90); - --border-width: 2px; - --padding-horizontal: var(--spacing-l); - --padding-vertical: var(--spacing-m); - - background-color: var(--background-color); - color: var(--color); - padding: var(--padding-vertical) var(--padding-horizontal); + composes: hds-card from 'hds-core/lib/components/card/card.css'; } .boxShadow { diff --git a/packages/react/src/components/card/Card.tsx b/packages/react/src/components/card/Card.tsx index 6f094a647e..0f44a00ab8 100644 --- a/packages/react/src/components/card/Card.tsx +++ b/packages/react/src/components/card/Card.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Card.module.scss'; import classNames from '../../utils/classNames'; import { useTheme } from '../../hooks/useTheme'; diff --git a/packages/react/src/components/checkbox/Checkbox.tsx b/packages/react/src/components/checkbox/Checkbox.tsx index dd773eeac9..3f132a77b0 100644 --- a/packages/react/src/components/checkbox/Checkbox.tsx +++ b/packages/react/src/components/checkbox/Checkbox.tsx @@ -1,8 +1,6 @@ import React, { useEffect, useRef } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Checkbox.module.css'; import classNames from '../../utils/classNames'; import mergeRefWithInternalRef from '../../utils/mergeRefWithInternalRef'; diff --git a/packages/react/src/components/columns/Columns.tsx b/packages/react/src/components/columns/Columns.tsx index ee46816f05..200b783dd0 100644 --- a/packages/react/src/components/columns/Columns.tsx +++ b/packages/react/src/components/columns/Columns.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Columns.module.css'; export type ColumnsProps = React.PropsWithChildren>; diff --git a/packages/react/src/components/container/Container.tsx b/packages/react/src/components/container/Container.tsx index ae9dece381..6ff38edb07 100644 --- a/packages/react/src/components/container/Container.tsx +++ b/packages/react/src/components/container/Container.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Container.module.scss'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/dialog/Dialog.tsx b/packages/react/src/components/dialog/Dialog.tsx index be7aaa4e68..d1451d702f 100644 --- a/packages/react/src/components/dialog/Dialog.tsx +++ b/packages/react/src/components/dialog/Dialog.tsx @@ -1,9 +1,7 @@ import React, { useEffect, RefObject, useCallback, useState, useRef, createRef } from 'react'; import ReactDOM from 'react-dom'; -// import base styles import '../../styles/base.css'; - import styles from './Dialog.module.scss'; import classNames from '../../utils/classNames'; import { useTheme } from '../../hooks/useTheme'; diff --git a/packages/react/src/components/dropdown/combobox/Combobox.tsx b/packages/react/src/components/dropdown/combobox/Combobox.tsx index c7e4294970..9a39483d09 100644 --- a/packages/react/src/components/dropdown/combobox/Combobox.tsx +++ b/packages/react/src/components/dropdown/combobox/Combobox.tsx @@ -6,9 +6,7 @@ import isEqual from 'lodash.isequal'; import uniqueId from 'lodash.uniqueid'; import { useVirtual } from 'react-virtual'; -// import base styles import '../../../styles/base.css'; - import styles from './Combobox.module.scss'; import { FieldLabel } from '../../../internal/field-label/FieldLabel'; import classNames from '../../../utils/classNames'; diff --git a/packages/react/src/components/dropdown/select/Select.tsx b/packages/react/src/components/dropdown/select/Select.tsx index 6681fec868..a84f347554 100644 --- a/packages/react/src/components/dropdown/select/Select.tsx +++ b/packages/react/src/components/dropdown/select/Select.tsx @@ -13,9 +13,7 @@ import isEqual from 'lodash.isequal'; import uniqueId from 'lodash.uniqueid'; import { useVirtual } from 'react-virtual'; -// import base styles import '../../../styles/base.css'; - import styles from './Select.module.scss'; import { FieldLabel } from '../../../internal/field-label/FieldLabel'; import classNames from '../../../utils/classNames'; diff --git a/packages/react/src/components/errorSummary/ErrorSummary.tsx b/packages/react/src/components/errorSummary/ErrorSummary.tsx index b3782a28b4..70a385c478 100644 --- a/packages/react/src/components/errorSummary/ErrorSummary.tsx +++ b/packages/react/src/components/errorSummary/ErrorSummary.tsx @@ -1,8 +1,6 @@ import React, { useRef, useEffect } from 'react'; -// import base styles import '../../styles/base.css'; - import notificationStyles from '../notification/Notification.module.css'; import errorSummaryStyles from './ErrorSummary.module.scss'; import { IconAlertCircleFill } from '../../icons'; diff --git a/packages/react/src/components/fieldset/Fieldset.tsx b/packages/react/src/components/fieldset/Fieldset.tsx index 54c479ab1c..3993ca5ba0 100644 --- a/packages/react/src/components/fieldset/Fieldset.tsx +++ b/packages/react/src/components/fieldset/Fieldset.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Fieldset.module.scss'; import classNames from '../../utils/classNames'; import { Tooltip } from '../tooltip'; diff --git a/packages/react/src/components/fileInput/FileInput.tsx b/packages/react/src/components/fileInput/FileInput.tsx index 3e4b7da4a9..f024e81579 100644 --- a/packages/react/src/components/fileInput/FileInput.tsx +++ b/packages/react/src/components/fileInput/FileInput.tsx @@ -1,9 +1,7 @@ import React, { ChangeEvent, useEffect, useRef, useState } from 'react'; import uniqueId from 'lodash.uniqueid'; -// import base styles import '../../styles/base.css'; - import composeAriaDescribedBy from '../../utils/composeAriaDescribedBy'; import classNames from '../../utils/classNames'; import { Button } from '../button'; diff --git a/packages/react/src/components/footer/Footer.tsx b/packages/react/src/components/footer/Footer.tsx index 0005e5d2c6..d027ea4439 100644 --- a/packages/react/src/components/footer/Footer.tsx +++ b/packages/react/src/components/footer/Footer.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Footer.module.scss'; import { Koros, KorosType } from '../koros'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/footer/components/footerBase/FooterBase.tsx b/packages/react/src/components/footer/components/footerBase/FooterBase.tsx index 8e45ea8fa5..92f77613f9 100644 --- a/packages/react/src/components/footer/components/footerBase/FooterBase.tsx +++ b/packages/react/src/components/footer/components/footerBase/FooterBase.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, Fragment, isValidElement, MouseEventHandler } from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterBase.module.scss'; import { Logo } from '../../../logo'; import { IconArrowUp } from '../../../../icons'; diff --git a/packages/react/src/components/footer/components/footerCustom/FooterCustom.tsx b/packages/react/src/components/footer/components/footerCustom/FooterCustom.tsx index 4257949ce9..e0ce416d72 100644 --- a/packages/react/src/components/footer/components/footerCustom/FooterCustom.tsx +++ b/packages/react/src/components/footer/components/footerCustom/FooterCustom.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterCustom.module.scss'; import classNames from '../../../../utils/classNames'; diff --git a/packages/react/src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx b/packages/react/src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx index 93b9be2b2b..98113d52df 100644 --- a/packages/react/src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx +++ b/packages/react/src/components/footer/components/footerGroupHeading/FooterGroupHeading.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterGroupHeading.module.scss'; import { MergeElementProps } from '../../../../common/types'; import classNames from '../../../../utils/classNames'; diff --git a/packages/react/src/components/footer/components/footerLink/FooterLink.tsx b/packages/react/src/components/footer/components/footerLink/FooterLink.tsx index e60e7111ec..caa3d3a8d9 100644 --- a/packages/react/src/components/footer/components/footerLink/FooterLink.tsx +++ b/packages/react/src/components/footer/components/footerLink/FooterLink.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterLink.module.scss'; import { Link } from '../../../link'; import { MergeElementProps } from '../../../../common/types'; diff --git a/packages/react/src/components/footer/components/footerNavigation/FooterNavigation.tsx b/packages/react/src/components/footer/components/footerNavigation/FooterNavigation.tsx index 244372db40..b693c65b78 100644 --- a/packages/react/src/components/footer/components/footerNavigation/FooterNavigation.tsx +++ b/packages/react/src/components/footer/components/footerNavigation/FooterNavigation.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, Fragment, isValidElement } from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterNavigation.module.scss'; import { getChildElementsEvenIfContainersInbetween } from '../../../../utils/getChildren'; import { FooterVariant } from '../../Footer.interface'; diff --git a/packages/react/src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx b/packages/react/src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx index 885599a170..6d17f83069 100644 --- a/packages/react/src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx +++ b/packages/react/src/components/footer/components/footerNavigationGroup/FooterNavigationGroup.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, Fragment, isValidElement } from 'react'; -// import base styles import '../../../../styles/base.css'; - import { FooterVariant } from '../../Footer.interface'; import { useMediaQueryLessThan } from '../../../../hooks/useMediaQuery'; import styles from './FooterNavigationGroup.module.scss'; diff --git a/packages/react/src/components/footer/components/footerUtilities/FooterUtilities.tsx b/packages/react/src/components/footer/components/footerUtilities/FooterUtilities.tsx index 0fc7bccf94..0fe9aea349 100644 --- a/packages/react/src/components/footer/components/footerUtilities/FooterUtilities.tsx +++ b/packages/react/src/components/footer/components/footerUtilities/FooterUtilities.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, Fragment, isValidElement } from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterUtilities.module.scss'; import classNames from '../../../../utils/classNames'; import { getChildElementsEvenIfContainersInbetween } from '../../../../utils/getChildren'; diff --git a/packages/react/src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx b/packages/react/src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx index c443a88b5b..b794b3440c 100644 --- a/packages/react/src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx +++ b/packages/react/src/components/footer/components/footerUtilityGroup/FooterUtilityGroup.tsx @@ -1,8 +1,6 @@ import React, { Fragment, cloneElement, isValidElement } from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from './FooterUtilityGroup.module.scss'; import classNames from '../../../../utils/classNames'; import { getChildElementsEvenIfContainersInbetween } from '../../../../utils/getChildren'; diff --git a/packages/react/src/components/header/Header.module.scss b/packages/react/src/components/header/Header.module.scss index 181de6777c..3146dd18c3 100644 --- a/packages/react/src/components/header/Header.module.scss +++ b/packages/react/src/components/header/Header.module.scss @@ -62,6 +62,78 @@ --header-margin: var(--spacing-xs); } + /** + * Normalize.css rules + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ + } + + /** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + + button, + input { /* 1 */ + overflow: visible; + } + + /** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + + button, + select { /* 1 */ + text-transform: none; + } + + /** + * Correct the inability to style clickable types in iOS and Safari. + */ + + button, + [type="button"], + [type="reset"], + [type="submit"] { + -webkit-appearance: button; + } + + /** + * Remove the inner border and padding in Firefox. + */ + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + /** + * Restore the focus styles unset by the previous rule. + */ + + button:-moz-focusring, + [type="button"]:-moz-focusring, + [type="reset"]:-moz-focusring, + [type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; + } + + &.theme-dark { --color-focus-outline: var(--color-white); --header-color: var(--color-white); diff --git a/packages/react/src/components/header/Header.tsx b/packages/react/src/components/header/Header.tsx index 96dce0919b..4cd317da9b 100644 --- a/packages/react/src/components/header/Header.tsx +++ b/packages/react/src/components/header/Header.tsx @@ -12,7 +12,6 @@ import { HeaderSearch } from './components/headerSearch'; import { SkipLink } from '../../internal/skipLink'; import { LanguageProvider, LanguageProviderProps } from './LanguageContext'; import { HeaderTheme } from './Header.type'; -// import base styles import '../../styles/base.css'; import styles from './Header.module.scss'; import { useTheme } from '../../hooks/useTheme'; diff --git a/packages/react/src/components/header/components/headerLink/HeaderLink.tsx b/packages/react/src/components/header/components/headerLink/HeaderLink.tsx index e96417d5db..84ac6c89dd 100644 --- a/packages/react/src/components/header/components/headerLink/HeaderLink.tsx +++ b/packages/react/src/components/header/components/headerLink/HeaderLink.tsx @@ -1,7 +1,6 @@ import React, { cloneElement, useCallback, useEffect, useRef, useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; -// import base styles import '../../../../styles/base.css'; import styles from './HeaderLink.module.scss'; import { styleBoundClassNames } from '../../../../utils/classNames'; diff --git a/packages/react/src/components/header/components/headerLink/headerLinkDropdown/HeaderLinkDropdown.tsx b/packages/react/src/components/header/components/headerLink/headerLinkDropdown/HeaderLinkDropdown.tsx index 0a3ced537f..ddb61ef242 100644 --- a/packages/react/src/components/header/components/headerLink/headerLinkDropdown/HeaderLinkDropdown.tsx +++ b/packages/react/src/components/header/components/headerLink/headerLinkDropdown/HeaderLinkDropdown.tsx @@ -1,6 +1,5 @@ import React, { cloneElement, isValidElement, useRef, useState } from 'react'; -// import base styles import '../../../../../styles/base.css'; import styles from './HeaderLinkDropdown.module.scss'; import { IconAngleDown, IconAngleLeft, IconAngleRight } from '../../../../../icons'; diff --git a/packages/react/src/components/header/components/headerNavigationMenu/HeaderNavigationMenu.tsx b/packages/react/src/components/header/components/headerNavigationMenu/HeaderNavigationMenu.tsx index 9e9f74e1ef..a91e6bd089 100644 --- a/packages/react/src/components/header/components/headerNavigationMenu/HeaderNavigationMenu.tsx +++ b/packages/react/src/components/header/components/headerNavigationMenu/HeaderNavigationMenu.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, isValidElement, useEffect } from 'react'; -// import base styles import '../../../../styles/base.css'; - import { useHeaderContext, useSetHeaderContext } from '../../HeaderContext'; import classNames from '../../../../utils/classNames'; import { getChildElementsEvenIfContainersInbetween, getChildrenAsArray } from '../../../../utils/getChildren'; diff --git a/packages/react/src/components/header/components/headerUniversalBar/HeaderUniversalBar.tsx b/packages/react/src/components/header/components/headerUniversalBar/HeaderUniversalBar.tsx index a6231ab2a5..8ddc8a2014 100644 --- a/packages/react/src/components/header/components/headerUniversalBar/HeaderUniversalBar.tsx +++ b/packages/react/src/components/header/components/headerUniversalBar/HeaderUniversalBar.tsx @@ -1,6 +1,5 @@ import React, { cloneElement, useEffect } from 'react'; -// import base styles import '../../../../styles/base.css'; import styles from './HeaderUniversalBar.module.scss'; import { HeaderLink } from '../headerLink/HeaderLink'; diff --git a/packages/react/src/components/hero/Hero.tsx b/packages/react/src/components/hero/Hero.tsx index 8163922532..dce05fb844 100644 --- a/packages/react/src/components/hero/Hero.tsx +++ b/packages/react/src/components/hero/Hero.tsx @@ -1,7 +1,6 @@ /* eslint-disable prettier/prettier */ import React from 'react'; -// import base styles import '../../styles/base.css'; import styles from './Hero.module.scss'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/highlight/Highlight.tsx b/packages/react/src/components/highlight/Highlight.tsx index bc976ac6e5..f85f79324e 100644 --- a/packages/react/src/components/highlight/Highlight.tsx +++ b/packages/react/src/components/highlight/Highlight.tsx @@ -1,7 +1,6 @@ import React from 'react'; -// import core base styles -import 'hds-core'; +import '../../styles/base.css'; import classNames from '../../utils/classNames'; import { useTheme } from '../../hooks/useTheme'; import styles from './Highlight.module.scss'; diff --git a/packages/react/src/components/imageWithCard/ImageWithCard.tsx b/packages/react/src/components/imageWithCard/ImageWithCard.tsx index bd385e4b23..7989a9fed7 100644 --- a/packages/react/src/components/imageWithCard/ImageWithCard.tsx +++ b/packages/react/src/components/imageWithCard/ImageWithCard.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import classNames from '../../utils/classNames'; import styles from './ImageWithCard.module.css'; diff --git a/packages/react/src/components/koros/Koros.tsx b/packages/react/src/components/koros/Koros.tsx index 68c605536c..cfb0200161 100644 --- a/packages/react/src/components/koros/Koros.tsx +++ b/packages/react/src/components/koros/Koros.tsx @@ -1,9 +1,7 @@ import React, { useState } from 'react'; import uniqueId from 'lodash.uniqueid'; -// import base styles import '../../styles/base.css'; - import classNames from '../../utils/classNames'; import styles from './Koros.module.css'; diff --git a/packages/react/src/components/link/Link.tsx b/packages/react/src/components/link/Link.tsx index 4f119500b1..54f4615918 100644 --- a/packages/react/src/components/link/Link.tsx +++ b/packages/react/src/components/link/Link.tsx @@ -1,7 +1,7 @@ import React from 'react'; -// import base styles -import '../../styles/base.css'; +// import core base styles +import 'hds-core/lib/base.min.css'; import styles from './Link.module.scss'; import { IconLinkExternal } from '../../icons'; diff --git a/packages/react/src/components/linkbox/Linkbox.tsx b/packages/react/src/components/linkbox/Linkbox.tsx index 1e6396ebc3..d205f8b074 100644 --- a/packages/react/src/components/linkbox/Linkbox.tsx +++ b/packages/react/src/components/linkbox/Linkbox.tsx @@ -1,8 +1,6 @@ import React, { useRef } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Linkbox.module.scss'; import { IconArrowRight, IconLinkExternal } from '../../icons'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/loadingSpinner/LoadingSpinner.tsx b/packages/react/src/components/loadingSpinner/LoadingSpinner.tsx index 45a7e27cea..0766cf3964 100644 --- a/packages/react/src/components/loadingSpinner/LoadingSpinner.tsx +++ b/packages/react/src/components/loadingSpinner/LoadingSpinner.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './LoadingSpinner.module.scss'; import classNames from '../../utils/classNames'; import { useTheme } from '../../hooks/useTheme'; diff --git a/packages/react/src/components/notification/Notification.tsx b/packages/react/src/components/notification/Notification.tsx index b0f583ec46..36546bdd2a 100644 --- a/packages/react/src/components/notification/Notification.tsx +++ b/packages/react/src/components/notification/Notification.tsx @@ -2,9 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { animated, useSpring } from 'react-spring'; import { VisuallyHidden } from '@react-aria/visually-hidden'; -// import base styles import '../../styles/base.css'; - import classNames from '../../utils/classNames'; import styles from './Notification.module.css'; import { IconInfoCircleFill, IconErrorFill, IconAlertCircleFill, IconCheckCircleFill, IconCross } from '../../icons'; diff --git a/packages/react/src/components/numberInput/NumberInput.tsx b/packages/react/src/components/numberInput/NumberInput.tsx index c0d792af5d..9cbca8dd21 100644 --- a/packages/react/src/components/numberInput/NumberInput.tsx +++ b/packages/react/src/components/numberInput/NumberInput.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useRef, useState } from 'react'; import { VisuallyHidden } from '@react-aria/visually-hidden'; import useThrottledWheel from '../../hooks/useThrottledWheel'; -// import base styles import '../../styles/base.css'; import styles from './NumberInput.module.scss'; import { IconMinus, IconPlus } from '../../icons'; diff --git a/packages/react/src/components/pagination/Pagination.tsx b/packages/react/src/components/pagination/Pagination.tsx index 7d899d3500..590434fa66 100644 --- a/packages/react/src/components/pagination/Pagination.tsx +++ b/packages/react/src/components/pagination/Pagination.tsx @@ -1,7 +1,6 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { VisuallyHidden } from '@react-aria/visually-hidden'; -// import base styles import '../../styles/base.css'; import styles from './Pagination.module.scss'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/passwordInput/PasswordInput.tsx b/packages/react/src/components/passwordInput/PasswordInput.tsx index 889e26c7f8..0d2bd5dadf 100644 --- a/packages/react/src/components/passwordInput/PasswordInput.tsx +++ b/packages/react/src/components/passwordInput/PasswordInput.tsx @@ -1,6 +1,5 @@ import React, { useState } from 'react'; -// import base styles import '../../styles/base.css'; import styles from './PasswordInput.module.scss'; import { TextInputProps } from '../textInput'; diff --git a/packages/react/src/components/phoneInput/PhoneInput.tsx b/packages/react/src/components/phoneInput/PhoneInput.tsx index 03123d21bb..60f019a0d4 100644 --- a/packages/react/src/components/phoneInput/PhoneInput.tsx +++ b/packages/react/src/components/phoneInput/PhoneInput.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import { InputWrapper } from '../../internal/input-wrapper/InputWrapper'; import { TextInputProps } from '../textInput'; import textInputStyles from '../textInput/TextInput.module.css'; diff --git a/packages/react/src/components/radioButton/RadioButton.tsx b/packages/react/src/components/radioButton/RadioButton.tsx index f7c06ae15e..a673d4863d 100644 --- a/packages/react/src/components/radioButton/RadioButton.tsx +++ b/packages/react/src/components/radioButton/RadioButton.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './RadioButton.module.css'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/searchInput/SearchInput.tsx b/packages/react/src/components/searchInput/SearchInput.tsx index 2aa1946044..fe79d219e6 100644 --- a/packages/react/src/components/searchInput/SearchInput.tsx +++ b/packages/react/src/components/searchInput/SearchInput.tsx @@ -1,9 +1,7 @@ import React, { KeyboardEvent, useState, useRef, useEffect } from 'react'; import { useCombobox, UseComboboxStateChangeTypes } from 'downshift'; -// import base styles import '../../styles/base.css'; - import styles from './SearchInput.module.scss'; import { FieldLabel } from '../../internal/field-label/FieldLabel'; import { DropdownMenu } from '../../internal/dropdownMenu/DropdownMenu'; diff --git a/packages/react/src/components/section/Section.tsx b/packages/react/src/components/section/Section.tsx index d05ded6385..e47d308efa 100644 --- a/packages/react/src/components/section/Section.tsx +++ b/packages/react/src/components/section/Section.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import classNames from '../../utils/classNames'; import { Koros, KorosType } from '../koros'; import styles from './Section.module.css'; diff --git a/packages/react/src/components/selectionGroup/SelectionGroup.tsx b/packages/react/src/components/selectionGroup/SelectionGroup.tsx index 0b1ce6c8c9..b4ae4abc53 100644 --- a/packages/react/src/components/selectionGroup/SelectionGroup.tsx +++ b/packages/react/src/components/selectionGroup/SelectionGroup.tsx @@ -1,8 +1,6 @@ import React, { isValidElement, useEffect } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './SelectionGroup.module.scss'; import classNames from '../../utils/classNames'; import { RequiredIndicator } from '../../internal/required-indicator/RequiredIndicator'; diff --git a/packages/react/src/components/sideNavigation/SideNavigation.tsx b/packages/react/src/components/sideNavigation/SideNavigation.tsx index 2801807064..21f37f5111 100644 --- a/packages/react/src/components/sideNavigation/SideNavigation.tsx +++ b/packages/react/src/components/sideNavigation/SideNavigation.tsx @@ -1,8 +1,6 @@ import React, { cloneElement, isValidElement, useEffect } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './SideNavigation.module.scss'; import SideNavigationContext from './SideNavigationContext'; import { FCWithName } from '../../common/types'; diff --git a/packages/react/src/components/statusLabel/StatusLabel.tsx b/packages/react/src/components/statusLabel/StatusLabel.tsx index 4f3cb74242..0e124a7444 100644 --- a/packages/react/src/components/statusLabel/StatusLabel.tsx +++ b/packages/react/src/components/statusLabel/StatusLabel.tsx @@ -1,7 +1,6 @@ import React from 'react'; -// import base styles -import '../../styles/base.css'; +import '../../styles/base.css'; import styles from './StatusLabel.module.css'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/stepByStep/StepByStep.tsx b/packages/react/src/components/stepByStep/StepByStep.tsx index 4cdadf63f8..0f36a7aed8 100644 --- a/packages/react/src/components/stepByStep/StepByStep.tsx +++ b/packages/react/src/components/stepByStep/StepByStep.tsx @@ -1,8 +1,6 @@ import React, { FC } from 'react'; -// import base styles import '../../styles/base.css'; - import { Button, ButtonProps } from '../button'; import classNames from '../../utils/classNames'; import { Link, LinkProps } from '../link'; diff --git a/packages/react/src/components/stepper/Step.tsx b/packages/react/src/components/stepper/Step.tsx index 05c36dc952..621d969d47 100644 --- a/packages/react/src/components/stepper/Step.tsx +++ b/packages/react/src/components/stepper/Step.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import { IconCheck, IconError, IconPlaybackPause } from '../../icons'; -// import base styles import '../../styles/base.css'; +import { IconCheck, IconError, IconPlaybackPause } from '../../icons'; import styles from './Stepper.module.scss'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/stepper/Stepper.tsx b/packages/react/src/components/stepper/Stepper.tsx index e1ec27bd1b..e5a24d5cc9 100644 --- a/packages/react/src/components/stepper/Stepper.tsx +++ b/packages/react/src/components/stepper/Stepper.tsx @@ -1,6 +1,5 @@ import React, { createRef, useEffect, useRef, useState } from 'react'; -// import base styles import '../../styles/base.css'; import styles from './Stepper.module.scss'; import { Step, StepState } from './Step'; diff --git a/packages/react/src/components/table/Table.tsx b/packages/react/src/components/table/Table.tsx index 8e467f94b3..1e72c2c31c 100644 --- a/packages/react/src/components/table/Table.tsx +++ b/packages/react/src/components/table/Table.tsx @@ -1,8 +1,6 @@ import React, { useMemo, useState } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Table.module.scss'; import { TableContainer } from './components/TableContainer'; import { HeaderRow } from './components/HeaderRow'; diff --git a/packages/react/src/components/table/components/SortingHeaderCell/SortingHeaderCell.tsx b/packages/react/src/components/table/components/SortingHeaderCell/SortingHeaderCell.tsx index cf6c0fba71..e2914e2945 100644 --- a/packages/react/src/components/table/components/SortingHeaderCell/SortingHeaderCell.tsx +++ b/packages/react/src/components/table/components/SortingHeaderCell/SortingHeaderCell.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../../../styles/base.css'; - import styles from '../../Table.module.scss'; import { IconSort, diff --git a/packages/react/src/components/table/components/TableContainer/TableContainer.tsx b/packages/react/src/components/table/components/TableContainer/TableContainer.tsx index bc07bf8358..60bb38fa22 100644 --- a/packages/react/src/components/table/components/TableContainer/TableContainer.tsx +++ b/packages/react/src/components/table/components/TableContainer/TableContainer.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../../../styles/base.css'; - import classNames from '../../../../utils/classNames'; import styles from '../../Table.module.scss'; diff --git a/packages/react/src/components/tabs/Tab.tsx b/packages/react/src/components/tabs/Tab.tsx index 7f3ab48abb..20900a05ec 100644 --- a/packages/react/src/components/tabs/Tab.tsx +++ b/packages/react/src/components/tabs/Tab.tsx @@ -1,8 +1,6 @@ import React, { useContext, useEffect, useRef } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Tabs.module.scss'; import classNames from '../../utils/classNames'; import { TabsContext } from './TabsContext'; diff --git a/packages/react/src/components/tabs/TabList.tsx b/packages/react/src/components/tabs/TabList.tsx index 456274e9dd..68e3ca91cf 100644 --- a/packages/react/src/components/tabs/TabList.tsx +++ b/packages/react/src/components/tabs/TabList.tsx @@ -1,8 +1,6 @@ import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Tabs.module.scss'; import classNames from '../../utils/classNames'; import { FCWithName } from '../../common/types'; diff --git a/packages/react/src/components/tabs/TabPanel.tsx b/packages/react/src/components/tabs/TabPanel.tsx index 764a66e6d9..286d3f7f00 100644 --- a/packages/react/src/components/tabs/TabPanel.tsx +++ b/packages/react/src/components/tabs/TabPanel.tsx @@ -1,8 +1,6 @@ import React, { useContext } from 'react'; -// import base styles import '../../styles/base.css'; - import { TabsContext } from './TabsContext'; export type TabPanelProps = React.PropsWithChildren<{ diff --git a/packages/react/src/components/tabs/Tabs.tsx b/packages/react/src/components/tabs/Tabs.tsx index 43cdc5457d..d7cdd5cff7 100644 --- a/packages/react/src/components/tabs/Tabs.tsx +++ b/packages/react/src/components/tabs/Tabs.tsx @@ -1,8 +1,6 @@ import React, { useState } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './Tabs.module.scss'; import classNames from '../../utils/classNames'; import { TabsContext } from './TabsContext'; diff --git a/packages/react/src/components/tag/Tag.tsx b/packages/react/src/components/tag/Tag.tsx index dc9a3beb5d..3a6e4f99db 100644 --- a/packages/react/src/components/tag/Tag.tsx +++ b/packages/react/src/components/tag/Tag.tsx @@ -1,7 +1,6 @@ // eslint-disable-next-line import/order import React, { forwardRef } from 'react'; -// import base styles import '../../styles/base.css'; import styles from './Tag.module.scss'; import { IconCross } from '../../icons'; diff --git a/packages/react/src/components/textInput/TextInput.tsx b/packages/react/src/components/textInput/TextInput.tsx index 0b6d2451ff..885f01e006 100644 --- a/packages/react/src/components/textInput/TextInput.tsx +++ b/packages/react/src/components/textInput/TextInput.tsx @@ -1,8 +1,6 @@ import React, { SyntheticEvent } from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './TextInput.module.css'; import { InputWrapper } from '../../internal/input-wrapper/InputWrapper'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/components/textarea/TextArea.tsx b/packages/react/src/components/textarea/TextArea.tsx index d04fa462b1..8de1ed572d 100644 --- a/packages/react/src/components/textarea/TextArea.tsx +++ b/packages/react/src/components/textarea/TextArea.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from '../textInput/TextInput.module.css'; import { InputWrapper } from '../../internal/input-wrapper/InputWrapper'; import composeAriaDescribedBy from '../../utils/composeAriaDescribedBy'; diff --git a/packages/react/src/components/timeInput/TimeInput.tsx b/packages/react/src/components/timeInput/TimeInput.tsx index 6c26f6097f..c8b2131206 100644 --- a/packages/react/src/components/timeInput/TimeInput.tsx +++ b/packages/react/src/components/timeInput/TimeInput.tsx @@ -1,8 +1,6 @@ import React, { FocusEventHandler, useEffect, useRef, useState } from 'react'; -// import base styles import '../../styles/base.css'; - import { InputWrapper } from '../../internal/input-wrapper/InputWrapper'; import { TextInputProps } from '../textInput/TextInput'; import textInputStyles from '../textInput/TextInput.module.css'; diff --git a/packages/react/src/components/toggleButton/ToggleButton.tsx b/packages/react/src/components/toggleButton/ToggleButton.tsx index 9ec34beb18..072e3d4150 100644 --- a/packages/react/src/components/toggleButton/ToggleButton.tsx +++ b/packages/react/src/components/toggleButton/ToggleButton.tsx @@ -1,8 +1,6 @@ import React from 'react'; -// import base styles import '../../styles/base.css'; - import styles from './ToggleButton.module.scss'; import classNames from '../../utils/classNames'; import { IconCrossCircleFill, IconCheckCircleFill } from '../../icons'; diff --git a/packages/react/src/components/tooltip/Tooltip.tsx b/packages/react/src/components/tooltip/Tooltip.tsx index 89950f0fea..bc729164e0 100644 --- a/packages/react/src/components/tooltip/Tooltip.tsx +++ b/packages/react/src/components/tooltip/Tooltip.tsx @@ -2,9 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'; import { Placement } from '@popperjs/core'; import { usePopper } from 'react-popper'; -// import base styles import '../../styles/base.css'; - import styles from './Tooltip.module.scss'; import { IconQuestionCircle } from '../../icons/IconQuestionCircle'; import classNames from '../../utils/classNames'; diff --git a/packages/react/src/internal/menuButton/MenuButton.tsx b/packages/react/src/internal/menuButton/MenuButton.tsx index d53580240d..986dd93708 100644 --- a/packages/react/src/internal/menuButton/MenuButton.tsx +++ b/packages/react/src/internal/menuButton/MenuButton.tsx @@ -4,9 +4,7 @@ import mergeRefs from 'react-merge-refs'; import useMeasure from 'react-use-measure'; import { ResizeObserver } from '@juggle/resize-observer'; -// import base styles import '../../styles/base.css'; - import styles from './MenuButton.module.scss'; import { Menu } from './menu/Menu'; import { IconAngleDown, IconAngleUp } from '../../icons'; diff --git a/packages/react/src/internal/skipLink/SkipLink.tsx b/packages/react/src/internal/skipLink/SkipLink.tsx index 383005cf12..5f861eae63 100644 --- a/packages/react/src/internal/skipLink/SkipLink.tsx +++ b/packages/react/src/internal/skipLink/SkipLink.tsx @@ -1,6 +1,5 @@ import React from 'react'; -// import core base styles import '../../styles/base.css'; import styles from './SkipLink.module.scss'; import { useTheme } from '../../hooks/useTheme'; diff --git a/packages/react/src/styles/base.css b/packages/react/src/styles/base.css index 5812a8f3e9..857a06a626 100644 --- a/packages/react/src/styles/base.css +++ b/packages/react/src/styles/base.css @@ -1,12 +1 @@ -@import 'hds-design-tokens/lib/all.css'; -@import 'hds-core/lib/utils/animations.css'; -@import 'hds-core/lib/utils/helpers.css'; - -/* - * Normalize.css rule - * 1. Prevent adjustments of font size after orientation changes in iOS. - */ - -html { - -webkit-text-size-adjust: 100%; /* 1 */ -} +@import 'hds-core/lib/base.min.css'; \ No newline at end of file diff --git a/site/src/components/layout.js b/site/src/components/layout.js index 2dad607b21..4e7730b006 100644 --- a/site/src/components/layout.js +++ b/site/src/components/layout.js @@ -5,7 +5,6 @@ * See: https://www.gatsbyjs.com/docs/use-static-query/ */ -import 'hds-core'; import * as React from 'react'; import PropTypes from 'prop-types'; import { useStaticQuery, graphql, withPrefix, Link as GatsbyLink, navigate } from 'gatsby'; diff --git a/yarn.lock b/yarn.lock index 0635912f3e..85f286e3d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20591,11 +20591,6 @@ normalize-url@^8.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.0.tgz#593dbd284f743e8dcf6a5ddf8fadff149c82701a" integrity sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw== -normalize.css@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" - integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== - not@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/not/-/not-0.1.0.tgz#c9691c1746c55dcfbe54cbd8bd4ff041bc2b519d"