@openedx/paragon 23.0.0-alpha.2 → 23.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/paragon-scripts.js +10 -0
- package/dist/Annotation/index.scss +16 -0
- package/dist/Button/index.d.ts +35 -0
- package/dist/Button/index.js +37 -15
- package/dist/Button/index.js.map +1 -1
- package/dist/Card/CardDeck.js +0 -2
- package/dist/Card/CardDeck.js.map +1 -1
- package/dist/Card/index.scss +6 -6
- package/dist/Carousel/index.scss +24 -1
- package/dist/Chip/ChipIcon.d.ts +13 -8
- package/dist/Chip/ChipIcon.js +0 -2
- package/dist/Chip/ChipIcon.js.map +1 -1
- package/dist/Chip/constants.d.ts +4 -0
- package/dist/Chip/constants.js +3 -2
- package/dist/Chip/constants.js.map +1 -0
- package/dist/Chip/index.d.ts +4 -3
- package/dist/Chip/index.js +2 -4
- package/dist/Chip/index.js.map +1 -1
- package/dist/ChipCarousel/index.js +0 -2
- package/dist/ChipCarousel/index.js.map +1 -1
- package/dist/CloseButton/index.scss +8 -0
- package/dist/ColorPicker/index.scss +1 -1
- package/dist/DataTable/index.scss +12 -0
- package/dist/Dropdown/dropdown-bootstrap.scss +6 -0
- package/dist/Dropzone/index.scss +34 -0
- package/dist/Form/_FormText.scss +1 -1
- package/dist/Form/_bootstrap-custom-forms.scss +40 -0
- package/dist/Form/_index.scss +9 -0
- package/dist/Form/_mixins.scss +22 -0
- package/dist/Hyperlink/index.d.ts +24 -0
- package/dist/Hyperlink/index.js +20 -32
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Icon/index.d.ts +4 -2
- package/dist/Icon/index.js +1 -1
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.d.ts +342 -0
- package/dist/IconButton/index.js +18 -26
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.scss +146 -0
- package/dist/Menu/index.scss +8 -0
- package/dist/Modal/ModalDialog.js +8 -4
- package/dist/Modal/ModalDialog.js.map +1 -1
- package/dist/Modal/ModalPopup.js +7 -1
- package/dist/Modal/ModalPopup.js.map +1 -1
- package/dist/Modal/_ModalDialog.scss +26 -2
- package/dist/Nav/index.scss +8 -0
- package/dist/Overlay/index.d.ts +128 -0
- package/dist/Overlay/index.js +8 -2
- package/dist/Overlay/index.js.map +1 -1
- package/dist/PageBanner/index.scss +2 -2
- package/dist/Pagination/pagination-bootstrap.scss +9 -0
- package/dist/Popover/index.scss +1 -1
- package/dist/ProductTour/Checkpoint.scss +1 -1
- package/dist/ProgressBar/bootstrap-progress.scss +20 -5
- package/dist/ProgressBar/index.scss +3 -3
- package/dist/Stepper/index.scss +1 -1
- package/dist/Sticky/index.scss +12 -0
- package/dist/Toast/index.scss +13 -1
- package/dist/Tooltip/index.d.ts +7 -0
- package/dist/Tooltip/index.js.map +1 -1
- package/dist/Tooltip/index.scss +16 -0
- package/dist/core.css +914 -470
- package/dist/core.css.map +1 -1
- package/dist/core.min.css +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/light.css +2035 -1315
- package/dist/light.css.map +1 -1
- package/dist/light.min.css +1 -1
- package/dist/setupTest.d.ts +2 -0
- package/dist/setupTest.js.map +1 -0
- package/dist/utils/types/bootstrap.d.ts +39 -0
- package/dist/utils/types/bootstrap.js +2 -0
- package/dist/utils/types/bootstrap.js.map +1 -0
- package/lib/build-tokens.js +67 -31
- package/package.json +11 -8
- package/src/Annotation/index.scss +16 -0
- package/src/Button/{Button.test.jsx → Button.test.tsx} +14 -2
- package/src/Button/__snapshots__/{Button.test.jsx.snap → Button.test.tsx.snap} +19 -2
- package/src/Button/{index.jsx → index.tsx} +58 -16
- package/src/Card/CardDeck.jsx +0 -3
- package/src/Card/README.md +0 -31
- package/src/Card/index.scss +6 -6
- package/src/Carousel/index.scss +24 -1
- package/src/Chip/{Chip.test.jsx → Chip.test.tsx} +5 -7
- package/src/Chip/ChipIcon.tsx +8 -8
- package/src/Chip/{constants.js → constants.ts} +1 -1
- package/src/Chip/index.tsx +6 -8
- package/src/ChipCarousel/index.tsx +0 -2
- package/src/CloseButton/index.scss +8 -0
- package/src/ColorPicker/index.scss +1 -1
- package/src/DataTable/index.scss +12 -0
- package/src/Dropdown/dropdown-bootstrap.scss +6 -0
- package/src/Dropzone/index.scss +34 -0
- package/src/Form/_FormText.scss +1 -1
- package/src/Form/_bootstrap-custom-forms.scss +40 -0
- package/src/Form/_index.scss +9 -0
- package/src/Form/_mixins.scss +22 -0
- package/src/Hyperlink/{Hyperlink.test.jsx → Hyperlink.test.tsx} +21 -10
- package/src/Hyperlink/{index.jsx → index.tsx} +41 -37
- package/src/Icon/index.d.ts +4 -2
- package/src/Icon/index.jsx +1 -1
- package/src/IconButton/{IconButton.test.jsx → IconButton.test.tsx} +24 -3
- package/src/IconButton/__snapshots__/IconButton.test.tsx.snap +90 -0
- package/src/IconButton/index.scss +146 -0
- package/src/IconButton/{index.jsx → index.tsx} +66 -26
- package/src/Menu/index.scss +8 -0
- package/src/Modal/ModalDialog.jsx +7 -3
- package/src/Modal/ModalPopup.jsx +9 -1
- package/src/Modal/_ModalDialog.scss +26 -2
- package/src/Modal/modal-dialog.mdx +95 -6
- package/src/Modal/tests/ModalDialog.test.jsx +2 -0
- package/src/Modal/tests/ModalPopupNoMock.test.jsx +29 -0
- package/src/Nav/index.scss +8 -0
- package/src/Overlay/{index.jsx → index.tsx} +13 -8
- package/src/PageBanner/index.scss +2 -2
- package/src/Pagination/pagination-bootstrap.scss +9 -0
- package/src/Popover/index.scss +1 -1
- package/src/ProductTour/Checkpoint.scss +1 -1
- package/src/ProgressBar/bootstrap-progress.scss +20 -5
- package/src/ProgressBar/index.scss +3 -3
- package/src/Stepper/index.scss +1 -1
- package/src/Sticky/index.scss +12 -0
- package/src/Toast/index.scss +13 -1
- package/src/Tooltip/index.scss +16 -0
- package/src/Tooltip/{index.jsx → index.tsx} +9 -3
- package/src/index.d.ts +5 -5
- package/src/index.js +7 -7
- package/src/{setupTest.js → setupTest.ts} +1 -0
- package/src/utils/types/bootstrap.test.tsx +86 -0
- package/src/utils/types/bootstrap.ts +43 -0
- package/styles/css/core/abstraction-variables.css +44 -0
- package/styles/css/core/custom-media-breakpoints.css +3 -4
- package/styles/css/core/index.css +2 -1
- package/styles/css/core/variables.css +494 -430
- package/styles/css/themes/light/abstraction-variables.css +304 -0
- package/styles/css/themes/light/index.css +1 -0
- package/styles/css/themes/light/utility-classes.css +2 -3
- package/styles/css/themes/light/variables.css +1753 -1334
- package/styles/scss/core/_typography.scss +16 -4
- package/styles/scss/core/_utilities.scss +7 -3
- package/styles/scss/core/_variables.scss +43 -30
- package/styles/scss/core/core.scss +1 -0
- package/tokens/src/core/alias/size.json +6 -5
- package/tokens/src/core/components/ActionRow.json +3 -2
- package/tokens/src/core/components/Alert.json +12 -10
- package/tokens/src/core/components/Annotation.json +9 -7
- package/tokens/src/core/components/Avatar.json +9 -9
- package/tokens/src/core/components/AvatarButton.json +4 -3
- package/tokens/src/core/components/Badge.json +12 -9
- package/tokens/src/core/components/Breadcrumb.json +7 -5
- package/tokens/src/core/components/Bubble.json +4 -3
- package/tokens/src/core/components/Button/core.json +35 -59
- package/tokens/src/core/components/Card.json +33 -44
- package/tokens/src/core/components/Carousel.json +39 -13
- package/tokens/src/core/components/Chip.json +13 -21
- package/tokens/src/core/components/ChipCarousel.json +4 -5
- package/tokens/src/core/components/CloseButton.json +2 -6
- package/tokens/src/core/components/Code.json +9 -8
- package/tokens/src/core/components/Collapsible.json +10 -13
- package/tokens/src/core/components/ColorPicker.json +3 -2
- package/tokens/src/core/components/Container.json +6 -5
- package/tokens/src/core/components/DataTable.json +17 -9
- package/tokens/src/core/components/Dropdown.json +24 -29
- package/tokens/src/core/components/Dropzone.json +5 -7
- package/tokens/src/core/components/Form/other.json +5 -4
- package/tokens/src/core/components/Form/size.json +72 -119
- package/tokens/src/core/components/Form/spacing.json +39 -83
- package/tokens/src/core/components/Form/transition.json +43 -7
- package/tokens/src/core/components/Form/typography.json +24 -88
- package/tokens/src/core/components/Icon.json +6 -5
- package/tokens/src/core/components/IconButton.json +4 -7
- package/tokens/src/core/components/Image.json +7 -6
- package/tokens/src/core/components/Menu.json +14 -12
- package/tokens/src/core/components/Modal.json +26 -21
- package/tokens/src/core/components/Nav.json +14 -16
- package/tokens/src/core/components/Navbar.json +15 -30
- package/tokens/src/core/components/Pagination.json +23 -24
- package/tokens/src/core/components/Popover.json +18 -14
- package/tokens/src/core/components/ProductTour.json +8 -14
- package/tokens/src/core/components/ProgressBar.json +29 -14
- package/tokens/src/core/components/SearchField.json +7 -9
- package/tokens/src/core/components/SelectableBox.json +4 -3
- package/tokens/src/core/components/Sheet.json +3 -2
- package/tokens/src/core/components/Spinner.json +9 -7
- package/tokens/src/core/components/Stack.json +2 -1
- package/tokens/src/core/components/Stepper.json +12 -14
- package/tokens/src/core/components/Sticky.json +2 -1
- package/tokens/src/core/components/Tab.json +8 -7
- package/tokens/src/core/components/Tabs.json +5 -5
- package/tokens/src/core/components/Toast.json +11 -8
- package/tokens/src/core/components/Tooltip.json +13 -11
- package/tokens/src/core/components/general/caret.json +5 -3
- package/tokens/src/core/components/general/headings.json +5 -4
- package/tokens/src/core/components/general/hr.json +3 -2
- package/tokens/src/core/components/general/input.json +19 -19
- package/tokens/src/core/components/general/link.json +13 -12
- package/tokens/src/core/components/general/list.json +9 -6
- package/tokens/src/core/components/general/text.json +6 -12
- package/tokens/src/core/global/breakpoints.json +25 -6
- package/tokens/src/core/global/elevation.json +55 -13
- package/tokens/src/core/global/other.json +5 -1
- package/tokens/src/core/global/spacing.json +70 -17
- package/tokens/src/core/global/transition.json +41 -4
- package/tokens/src/core/global/typography.json +248 -53
- package/tokens/src/core/utilities/color.json +35 -4
- package/tokens/src/themes/light/alias/color.json +276 -75
- package/tokens/src/themes/light/components/Alert.json +15 -26
- package/tokens/src/themes/light/components/Annotation.json +27 -13
- package/tokens/src/themes/light/components/Avatar.json +2 -1
- package/tokens/src/themes/light/components/Badge.json +57 -122
- package/tokens/src/themes/light/components/Breadcrumb.json +6 -5
- package/tokens/src/themes/light/components/Bubble.json +9 -8
- package/tokens/src/themes/light/components/Button/brand.json +171 -119
- package/tokens/src/themes/light/components/Button/core.json +8 -9
- package/tokens/src/themes/light/components/Button/danger.json +171 -112
- package/tokens/src/themes/light/components/Button/dark.json +188 -106
- package/tokens/src/themes/light/components/Button/info.json +186 -112
- package/tokens/src/themes/light/components/Button/light.json +186 -110
- package/tokens/src/themes/light/components/Button/primary.json +178 -116
- package/tokens/src/themes/light/components/Button/secondary.json +166 -132
- package/tokens/src/themes/light/components/Button/success.json +176 -117
- package/tokens/src/themes/light/components/Button/tertiary.json +34 -60
- package/tokens/src/themes/light/components/Button/warning.json +164 -128
- package/tokens/src/themes/light/components/Card.json +10 -21
- package/tokens/src/themes/light/components/Carousel.json +12 -11
- package/tokens/src/themes/light/components/Chip.json +14 -26
- package/tokens/src/themes/light/components/CloseButton.json +12 -2
- package/tokens/src/themes/light/components/Code.json +7 -9
- package/tokens/src/themes/light/components/DataTable.json +7 -11
- package/tokens/src/themes/light/components/Dropdown.json +17 -20
- package/tokens/src/themes/light/components/Dropzone.json +49 -11
- package/tokens/src/themes/light/components/Form/color.json +101 -155
- package/tokens/src/themes/light/components/Form/elevation.json +38 -42
- package/tokens/src/themes/light/components/Form/other.json +44 -41
- package/tokens/src/themes/light/components/IconButton.json +408 -256
- package/tokens/src/themes/light/components/Image.json +7 -4
- package/tokens/src/themes/light/components/Menu.json +12 -10
- package/tokens/src/themes/light/components/Modal.json +22 -12
- package/tokens/src/themes/light/components/Nav.json +82 -94
- package/tokens/src/themes/light/components/Navbar.json +32 -76
- package/tokens/src/themes/light/components/OverflowScroll.json +3 -1
- package/tokens/src/themes/light/components/PageBanner.json +11 -10
- package/tokens/src/themes/light/components/Pagination.json +19 -23
- package/tokens/src/themes/light/components/Popover.json +22 -27
- package/tokens/src/themes/light/components/ProductTour.json +9 -20
- package/tokens/src/themes/light/components/ProgressBar.json +12 -10
- package/tokens/src/themes/light/components/Scrollable.json +3 -3
- package/tokens/src/themes/light/components/SearchField.json +9 -9
- package/tokens/src/themes/light/components/Sheet.json +6 -7
- package/tokens/src/themes/light/components/Stepper.json +12 -17
- package/tokens/src/themes/light/components/Sticky.json +31 -6
- package/tokens/src/themes/light/components/Tab.json +47 -24
- package/tokens/src/themes/light/components/Toast.json +26 -14
- package/tokens/src/themes/light/components/Tooltip.json +25 -10
- package/tokens/src/themes/light/components/general/body.json +3 -2
- package/tokens/src/themes/light/components/general/headings.json +2 -1
- package/tokens/src/themes/light/components/general/hr.json +3 -6
- package/tokens/src/themes/light/components/general/input.json +11 -4
- package/tokens/src/themes/light/components/general/link.json +34 -43
- package/tokens/src/themes/light/components/general/list.json +15 -19
- package/tokens/src/themes/light/components/general/text.json +5 -6
- package/tokens/src/themes/light/global/color.json +1592 -867
- package/tokens/src/themes/light/global/elevation.json +481 -93
- package/tokens/style-dictionary.js +342 -144
- package/tokens/utils.js +176 -6
- package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +0 -20
- package/tokens/src/core/global/display.json +0 -22
- /package/src/Button/{ButtonGroup.test.jsx → ButtonGroup.test.tsx} +0 -0
- /package/src/Button/{ButtonToolbar.test.jsx → ButtonToolbar.test.tsx} +0 -0
- /package/src/Button/__snapshots__/{ButtonGroup.test.jsx.snap → ButtonGroup.test.tsx.snap} +0 -0
- /package/src/Button/__snapshots__/{ButtonToolbar.test.jsx.snap → ButtonToolbar.test.tsx.snap} +0 -0
- /package/src/Chip/__snapshots__/{Chip.test.jsx.snap → Chip.test.tsx.snap} +0 -0
- /package/src/Tooltip/{Tooltip.test.jsx → Tooltip.test.tsx} +0 -0
|
@@ -7,7 +7,7 @@ import { Close } from '../../icons';
|
|
|
7
7
|
import { STYLE_VARIANTS } from './constants';
|
|
8
8
|
import Chip from '.';
|
|
9
9
|
|
|
10
|
-
function TestChip(props) {
|
|
10
|
+
function TestChip(props: Omit<React.ComponentProps<typeof Chip>, 'children'>) {
|
|
11
11
|
return (
|
|
12
12
|
<Chip {...props}>
|
|
13
13
|
Test
|
|
@@ -42,15 +42,13 @@ describe('<Chip />', () => {
|
|
|
42
42
|
iconBeforeAlt="close icon"
|
|
43
43
|
iconAfter={Close}
|
|
44
44
|
iconAfterAlt="close icon"
|
|
45
|
-
|
|
46
|
-
Chip
|
|
47
|
-
</TestChip>
|
|
45
|
+
/>
|
|
48
46
|
)).toJSON();
|
|
49
47
|
expect(tree).toMatchSnapshot();
|
|
50
48
|
});
|
|
51
49
|
it('renders div with "button" role when onClick is provided', () => {
|
|
52
50
|
const tree = renderer.create((
|
|
53
|
-
<TestChip onClick={jest.fn}
|
|
51
|
+
<TestChip onClick={jest.fn} />
|
|
54
52
|
)).toJSON();
|
|
55
53
|
expect(tree).toMatchSnapshot();
|
|
56
54
|
});
|
|
@@ -104,7 +102,7 @@ describe('<Chip />', () => {
|
|
|
104
102
|
/>,
|
|
105
103
|
);
|
|
106
104
|
const iconAfter = screen.getByLabelText('icon-after');
|
|
107
|
-
await userEvent.click(iconAfter
|
|
105
|
+
await userEvent.click(iconAfter);
|
|
108
106
|
expect(func).toHaveBeenCalledTimes(1);
|
|
109
107
|
});
|
|
110
108
|
it('onIconBeforeClick is triggered', async () => {
|
|
@@ -130,7 +128,7 @@ describe('<Chip />', () => {
|
|
|
130
128
|
/>,
|
|
131
129
|
);
|
|
132
130
|
const iconBefore = screen.getByLabelText('icon-before');
|
|
133
|
-
await userEvent.click(iconBefore
|
|
131
|
+
await userEvent.click(iconBefore);
|
|
134
132
|
expect(func).toHaveBeenCalledTimes(1);
|
|
135
133
|
});
|
|
136
134
|
it('checks the absence of the `selected` class in the chip', async () => {
|
package/src/Chip/ChipIcon.tsx
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React, { KeyboardEventHandler, MouseEventHandler } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Icon from '../Icon';
|
|
4
|
-
// @ts-ignore
|
|
5
4
|
import IconButton from '../IconButton';
|
|
6
|
-
// @ts-ignore
|
|
7
5
|
import { STYLE_VARIANTS } from './constants';
|
|
8
6
|
|
|
9
|
-
export
|
|
7
|
+
export type ChipIconProps = {
|
|
10
8
|
className: string,
|
|
11
|
-
src: React.
|
|
12
|
-
|
|
13
|
-
alt?: string,
|
|
14
|
-
variant: string,
|
|
9
|
+
src: React.ComponentType,
|
|
10
|
+
variant: typeof STYLE_VARIANTS[keyof typeof STYLE_VARIANTS],
|
|
15
11
|
disabled?: boolean,
|
|
16
|
-
}
|
|
12
|
+
} & (
|
|
13
|
+
// Either _both_ onClick and alt are provided, or neither is:
|
|
14
|
+
| { onClick: KeyboardEventHandler<HTMLButtonElement> & MouseEventHandler<HTMLButtonElement>, alt: string }
|
|
15
|
+
| { onClick?: undefined, alt?: undefined }
|
|
16
|
+
);
|
|
17
17
|
|
|
18
18
|
function ChipIcon({
|
|
19
19
|
className, src, onClick, alt, variant, disabled,
|
package/src/Chip/index.tsx
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { ForwardedRef, KeyboardEventHandler, MouseEventHandler } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import PropTypes, { type Requireable } from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import { requiredWhen } from '../utils/propTypes';
|
|
6
|
-
// @ts-ignore
|
|
7
6
|
import { STYLE_VARIANTS } from './constants';
|
|
8
|
-
// @ts-ignore
|
|
9
7
|
import ChipIcon from './ChipIcon';
|
|
10
8
|
|
|
11
9
|
export const CHIP_PGN_CLASS = 'pgn__chip';
|
|
@@ -14,10 +12,10 @@ export interface IChip {
|
|
|
14
12
|
children: React.ReactNode,
|
|
15
13
|
onClick?: KeyboardEventHandler & MouseEventHandler,
|
|
16
14
|
className?: string,
|
|
17
|
-
variant?:
|
|
18
|
-
iconBefore?: React.
|
|
15
|
+
variant?: typeof STYLE_VARIANTS[keyof typeof STYLE_VARIANTS],
|
|
16
|
+
iconBefore?: React.ComponentType,
|
|
19
17
|
iconBeforeAlt?: string,
|
|
20
|
-
iconAfter?: React.
|
|
18
|
+
iconAfter?: React.ComponentType,
|
|
21
19
|
iconAfterAlt?: string,
|
|
22
20
|
onIconBeforeClick?: KeyboardEventHandler & MouseEventHandler,
|
|
23
21
|
onIconAfterClick?: KeyboardEventHandler & MouseEventHandler,
|
|
@@ -111,7 +109,7 @@ Chip.propTypes = {
|
|
|
111
109
|
*
|
|
112
110
|
* `import { Check } from '@openedx/paragon/icons';`
|
|
113
111
|
*/
|
|
114
|
-
iconBefore: PropTypes.
|
|
112
|
+
iconBefore: PropTypes.elementType as Requireable<React.ComponentType>,
|
|
115
113
|
/** Specifies icon alt text. */
|
|
116
114
|
iconBeforeAlt: requiredWhen(PropTypes.string, ['iconBefore', 'onIconBeforeClick']),
|
|
117
115
|
/** A click handler for the `Chip` icon before. */
|
|
@@ -122,7 +120,7 @@ Chip.propTypes = {
|
|
|
122
120
|
*
|
|
123
121
|
* `import { Check } from '@openedx/paragon/icons';`
|
|
124
122
|
*/
|
|
125
|
-
iconAfter: PropTypes.
|
|
123
|
+
iconAfter: PropTypes.elementType as Requireable<React.ComponentType>,
|
|
126
124
|
/** Specifies icon alt text. */
|
|
127
125
|
iconAfterAlt: requiredWhen(PropTypes.string, ['iconAfter', 'onIconAfterClick']),
|
|
128
126
|
/** A click handler for the `Chip` icon after. */
|
|
@@ -4,9 +4,7 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import { OverflowScroll, OverflowScrollContext } from '../OverflowScroll';
|
|
7
|
-
// @ts-ignore
|
|
8
7
|
import IconButton from '../IconButton';
|
|
9
|
-
// @ts-ignore
|
|
10
8
|
import Icon from '../Icon';
|
|
11
9
|
// @ts-ignore
|
|
12
10
|
import { ArrowForward, ArrowBack } from '../../icons';
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--pgn-elevation-close-button-text-shadow:
|
|
3
|
+
var(--pgn-elevation-close-button-text-shadow-offset-x)
|
|
4
|
+
var(--pgn-elevation-close-button-text-shadow-offset-y)
|
|
5
|
+
var(--pgn-elevation-close-button-text-shadow-blur)
|
|
6
|
+
var(--pgn-elevation-close-button-text-shadow-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
.close {
|
|
2
10
|
float: right;
|
|
3
11
|
font-weight: var(--pgn-typography-close-button-font-weight);
|
package/src/DataTable/index.scss
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--pgn-elevation-data-table-box-shadow:
|
|
3
|
+
var(--pgn-elevation-data-table-box-shadow-offset-x)
|
|
4
|
+
var(--pgn-elevation-data-table-box-shadow-offset-y)
|
|
5
|
+
var(--pgn-elevation-data-table-box-shadow-blur)
|
|
6
|
+
var(--pgn-elevation-data-table-box-shadow-color);
|
|
7
|
+
|
|
8
|
+
--pgn-spacing-data-table-padding-cell:
|
|
9
|
+
var(--pgn-spacing-data-table-padding-cell-x)
|
|
10
|
+
var(--pgn-spacing-data-table-padding-cell-y);
|
|
11
|
+
}
|
|
12
|
+
|
|
1
13
|
.pgn__data-table-wrapper {
|
|
2
14
|
font-size: var(--pgn-typography-font-size-sm);
|
|
3
15
|
border-radius: var(--pgn-size-border-radius-base);
|
package/src/Dropzone/index.scss
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--pgn-elevation-dropzone-hover:
|
|
3
|
+
var(--pgn-elevation-dropzone-hover-inset)
|
|
4
|
+
var(--pgn-elevation-dropzone-hover-offset-x)
|
|
5
|
+
var(--pgn-elevation-dropzone-hover-offset-y)
|
|
6
|
+
var(--pgn-elevation-dropzone-hover-blur)
|
|
7
|
+
var(--pgn-elevation-dropzone-hover-spread)
|
|
8
|
+
var(--pgn-elevation-dropzone-hover-color);
|
|
9
|
+
|
|
10
|
+
--pgn-elevation-dropzone-focus:
|
|
11
|
+
var(--pgn-elevation-dropzone-focus-inset)
|
|
12
|
+
var(--pgn-elevation-dropzone-focus-offset-x)
|
|
13
|
+
var(--pgn-elevation-dropzone-focus-offset-y)
|
|
14
|
+
var(--pgn-elevation-dropzone-focus-blur)
|
|
15
|
+
var(--pgn-elevation-dropzone-focus-spread)
|
|
16
|
+
var(--pgn-elevation-dropzone-focus-color);
|
|
17
|
+
|
|
18
|
+
--pgn-elevation-dropzone-error:
|
|
19
|
+
var(--pgn-elevation-dropzone-error-inset)
|
|
20
|
+
var(--pgn-elevation-dropzone-error-offset-x)
|
|
21
|
+
var(--pgn-elevation-dropzone-error-offset-y)
|
|
22
|
+
var(--pgn-elevation-dropzone-error-blur)
|
|
23
|
+
var(--pgn-elevation-dropzone-error-spread)
|
|
24
|
+
var(--pgn-elevation-dropzone-error-color);
|
|
25
|
+
|
|
26
|
+
--pgn-elevation-dropzone-active:
|
|
27
|
+
var(--pgn-elevation-dropzone-active-inset)
|
|
28
|
+
var(--pgn-elevation-dropzone-active-offset-x)
|
|
29
|
+
var(--pgn-elevation-dropzone-active-offset-y)
|
|
30
|
+
var(--pgn-elevation-dropzone-active-blur)
|
|
31
|
+
var(--pgn-elevation-dropzone-active-spread)
|
|
32
|
+
var(--pgn-elevation-dropzone-active-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
1
35
|
.pgn__dropzone {
|
|
2
36
|
display: flex;
|
|
3
37
|
justify-content: center;
|
package/src/Form/_FormText.scss
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--pgn-elevation-form-control-indicator-checked-focus:
|
|
3
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-offset-x)
|
|
4
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-offset-y)
|
|
5
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-blur)
|
|
6
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-spread)
|
|
7
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-color);
|
|
8
|
+
|
|
9
|
+
--pgn-elevation-form-control-select-border-focus:
|
|
10
|
+
var(--pgn-elevation-form-control-select-border-focus-offset-x)
|
|
11
|
+
var(--pgn-elevation-form-control-select-border-focus-offset-y)
|
|
12
|
+
var(--pgn-elevation-form-control-select-border-focus-blur)
|
|
13
|
+
var(--pgn-elevation-form-control-select-border-focus-spread)
|
|
14
|
+
var(--pgn-elevation-form-control-select-border-focus-color);
|
|
15
|
+
|
|
16
|
+
--pgn-elevation-form-control-file-focus:
|
|
17
|
+
var(--pgn-elevation-form-control-file-focus-offset-x)
|
|
18
|
+
var(--pgn-elevation-form-control-file-focus-offset-y)
|
|
19
|
+
var(--pgn-elevation-form-control-file-focus-blur)
|
|
20
|
+
var(--pgn-elevation-form-control-file-focus-spread)
|
|
21
|
+
var(--pgn-elevation-form-control-file-focus-color);
|
|
22
|
+
|
|
23
|
+
--pgn-transition-form-control:
|
|
24
|
+
var(--pgn-transition-form-control-1-property)
|
|
25
|
+
var(--pgn-transition-form-control-1-duration)
|
|
26
|
+
var(--pgn-transition-form-control-1-timing-function)
|
|
27
|
+
var(--pgn-transition-form-control-1-delay)
|
|
28
|
+
var(--pgn-transition-form-control-1-behavior),
|
|
29
|
+
var(--pgn-transition-form-control-2-property)
|
|
30
|
+
var(--pgn-transition-form-control-2-duration)
|
|
31
|
+
var(--pgn-transition-form-control-2-timing-function)
|
|
32
|
+
var(--pgn-transition-form-control-2-delay)
|
|
33
|
+
var(--pgn-transition-form-control-2-behavior),
|
|
34
|
+
var(--pgn-transition-form-control-3-property)
|
|
35
|
+
var(--pgn-transition-form-control-3-duration)
|
|
36
|
+
var(--pgn-transition-form-control-3-timing-function)
|
|
37
|
+
var(--pgn-transition-form-control-3-delay)
|
|
38
|
+
var(--pgn-transition-form-control-3-behavior);
|
|
39
|
+
}
|
|
40
|
+
|
|
1
41
|
// Embedded icons from Open Iconic.
|
|
2
42
|
// Released under MIT and copyright 2014 Waybury.
|
|
3
43
|
// https://useiconic.com/open
|
package/src/Form/_index.scss
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
@import "FormText";
|
|
6
6
|
@import "FormControlSet";
|
|
7
7
|
|
|
8
|
+
:root {
|
|
9
|
+
--pgn-elevation-form-control-indicator-checked-focus:
|
|
10
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-offset-x)
|
|
11
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-offset-y)
|
|
12
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-blur)
|
|
13
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-spread)
|
|
14
|
+
var(--pgn-elevation-form-control-indicator-checked-focus-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
8
17
|
// A form input state used by the now deprecate Fieldset and asInput
|
|
9
18
|
// we can remove this when they are deleted.
|
|
10
19
|
.form-control.is-invalid.is-invalid-nodanger {
|
package/src/Form/_mixins.scss
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--pgn-elevation-form-input-focus:
|
|
3
|
+
var(--pgn-elevation-form-input-focus-offset-x)
|
|
4
|
+
var(--pgn-elevation-form-input-focus-offset-y)
|
|
5
|
+
var(--pgn-elevation-form-input-focus-blur)
|
|
6
|
+
var(--pgn-elevation-form-input-focus-spread)
|
|
7
|
+
var(--pgn-elevation-form-input-focus-color);
|
|
8
|
+
|
|
9
|
+
--pgn-spacing-form-control-select-feedback-icon-position:
|
|
10
|
+
var(--pgn-spacing-form-control-select-feedback-icon-position-position-y)
|
|
11
|
+
var(--pgn-spacing-form-control-select-feedback-icon-position-position-x)
|
|
12
|
+
var(--pgn-spacing-form-control-select-feedback-icon-position-offset-x)
|
|
13
|
+
var(--pgn-spacing-form-control-select-feedback-icon-position-offset-y);
|
|
14
|
+
|
|
15
|
+
--pgn-other-content-form-control-select-bg:
|
|
16
|
+
var(--pgn-other-content-form-control-select-bg-image)
|
|
17
|
+
var(--pgn-other-content-form-control-select-bg-position-x)
|
|
18
|
+
var(--pgn-other-content-form-control-select-bg-offset-y)
|
|
19
|
+
var(--pgn-other-content-form-control-select-bg-position-y)
|
|
20
|
+
/ var(--pgn-other-content-form-control-select-bg-color); // stylelint-disable-line scss/operator-no-newline-before
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
@mixin form-control-floating-label-initial(
|
|
2
24
|
$padding-x,
|
|
3
25
|
$padding-y,
|
|
@@ -4,30 +4,34 @@ import userEvent from '@testing-library/user-event';
|
|
|
4
4
|
|
|
5
5
|
import Hyperlink from '.';
|
|
6
6
|
|
|
7
|
-
const content = 'content';
|
|
8
7
|
const destination = 'destination';
|
|
8
|
+
const content = 'content';
|
|
9
9
|
const onClick = jest.fn();
|
|
10
10
|
const props = {
|
|
11
|
-
content,
|
|
12
11
|
destination,
|
|
13
12
|
onClick,
|
|
14
13
|
};
|
|
15
14
|
const externalLinkAlternativeText = 'externalLinkAlternativeText';
|
|
16
15
|
const externalLinkTitle = 'externalLinkTitle';
|
|
17
16
|
const externalLinkProps = {
|
|
18
|
-
target: '_blank',
|
|
17
|
+
target: '_blank' as const,
|
|
19
18
|
externalLinkAlternativeText,
|
|
20
19
|
externalLinkTitle,
|
|
21
20
|
...props,
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
describe('correct rendering', () => {
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
onClick.mockClear();
|
|
26
|
+
});
|
|
27
|
+
|
|
25
28
|
it('renders Hyperlink', async () => {
|
|
26
|
-
const { getByRole } = render(<Hyperlink {...props}
|
|
29
|
+
const { getByRole } = render(<Hyperlink {...props}>{content}</Hyperlink>);
|
|
27
30
|
const wrapper = getByRole('link');
|
|
28
31
|
expect(wrapper).toBeInTheDocument();
|
|
29
32
|
|
|
30
33
|
expect(wrapper).toHaveClass('pgn__hyperlink');
|
|
34
|
+
expect(wrapper).toHaveClass('standalone-link');
|
|
31
35
|
expect(wrapper).toHaveTextContent(content);
|
|
32
36
|
expect(wrapper).toHaveAttribute('href', destination);
|
|
33
37
|
expect(wrapper).toHaveAttribute('target', '_self');
|
|
@@ -36,8 +40,17 @@ describe('correct rendering', () => {
|
|
|
36
40
|
expect(onClick).toHaveBeenCalledTimes(1);
|
|
37
41
|
});
|
|
38
42
|
|
|
43
|
+
it('renders an underlined Hyperlink', async () => {
|
|
44
|
+
const { getByRole } = render(<Hyperlink isInline {...props}>{content}</Hyperlink>);
|
|
45
|
+
const wrapper = getByRole('link');
|
|
46
|
+
expect(wrapper).toBeInTheDocument();
|
|
47
|
+
expect(wrapper).toHaveClass('pgn__hyperlink');
|
|
48
|
+
expect(wrapper).not.toHaveClass('standalone-link');
|
|
49
|
+
expect(wrapper).toHaveClass('inline-link');
|
|
50
|
+
});
|
|
51
|
+
|
|
39
52
|
it('renders external Hyperlink', () => {
|
|
40
|
-
const { getByRole, getByTestId } = render(<Hyperlink {...externalLinkProps}
|
|
53
|
+
const { getByRole, getByTestId } = render(<Hyperlink {...externalLinkProps}>{content}</Hyperlink>);
|
|
41
54
|
const wrapper = getByRole('link');
|
|
42
55
|
const icon = getByTestId('hyperlink-icon');
|
|
43
56
|
const iconSvg = icon.querySelector('svg');
|
|
@@ -53,18 +66,16 @@ describe('correct rendering', () => {
|
|
|
53
66
|
|
|
54
67
|
describe('security', () => {
|
|
55
68
|
it('prevents reverse tabnabbing for links with target="_blank"', () => {
|
|
56
|
-
const { getByRole } = render(<Hyperlink {...externalLinkProps}
|
|
69
|
+
const { getByRole } = render(<Hyperlink {...externalLinkProps}>{content}</Hyperlink>);
|
|
57
70
|
const wrapper = getByRole('link');
|
|
58
71
|
expect(wrapper).toHaveAttribute('rel', 'noopener noreferrer');
|
|
59
72
|
});
|
|
60
73
|
});
|
|
61
74
|
|
|
62
75
|
describe('event handlers are triggered correctly', () => {
|
|
63
|
-
let spy;
|
|
64
|
-
beforeEach(() => { spy = jest.fn(); });
|
|
65
|
-
|
|
66
76
|
it('should fire onClick', async () => {
|
|
67
|
-
const
|
|
77
|
+
const spy = jest.fn();
|
|
78
|
+
const { getByRole } = render(<Hyperlink {...props} onClick={spy}>{content}</Hyperlink>);
|
|
68
79
|
const wrapper = getByRole('link');
|
|
69
80
|
expect(spy).toHaveBeenCalledTimes(0);
|
|
70
81
|
await userEvent.click(wrapper);
|
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import isRequiredIf from 'react-proptype-conditional-require';
|
|
5
4
|
import { Launch } from '../../icons';
|
|
6
5
|
import Icon from '../Icon';
|
|
7
6
|
|
|
8
|
-
import withDeprecatedProps, { DeprTypes } from '../withDeprecatedProps';
|
|
9
|
-
|
|
10
7
|
export const HYPER_LINK_EXTERNAL_LINK_ALT_TEXT = 'in a new tab';
|
|
11
8
|
export const HYPER_LINK_EXTERNAL_LINK_TITLE = 'Opens in a new tab';
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
interface Props extends Omit<React.ComponentPropsWithRef<'a'>, 'href' | 'target'> {
|
|
11
|
+
/** specifies the URL */
|
|
12
|
+
destination: string;
|
|
13
|
+
/** Content of the hyperlink */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/** Custom class names for the hyperlink */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Alt text for the icon indicating that this link opens in a new tab, if target="_blank". e.g. _("in a new tab") */
|
|
18
|
+
externalLinkAlternativeText?: string;
|
|
19
|
+
/** Tooltip text for the "opens in new tab" icon, if target="_blank". e.g. _("Opens in a new tab"). */
|
|
20
|
+
externalLinkTitle?: string;
|
|
21
|
+
/** type of hyperlink */
|
|
22
|
+
variant?: 'default' | 'muted' | 'brand';
|
|
23
|
+
/** Display the link with an underline. By default, it is only underlined on hover. */
|
|
24
|
+
isInline?: boolean;
|
|
25
|
+
/** specify if we need to show launch Icon. By default, it will be visible. */
|
|
26
|
+
showLaunchIcon?: boolean;
|
|
27
|
+
target?: '_blank' | '_self';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const Hyperlink = React.forwardRef<HTMLAnchorElement, Props>(({
|
|
31
|
+
className,
|
|
32
|
+
destination,
|
|
33
|
+
children,
|
|
34
|
+
target,
|
|
35
|
+
onClick,
|
|
36
|
+
externalLinkAlternativeText,
|
|
37
|
+
externalLinkTitle,
|
|
38
|
+
variant,
|
|
39
|
+
isInline,
|
|
40
|
+
showLaunchIcon,
|
|
41
|
+
...attrs
|
|
42
|
+
}, ref) => {
|
|
27
43
|
let externalLinkIcon;
|
|
28
44
|
|
|
29
45
|
if (target === '_blank') {
|
|
@@ -105,32 +121,20 @@ Hyperlink.propTypes = {
|
|
|
105
121
|
* loaded into the same browsing context as the current one.
|
|
106
122
|
* If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent
|
|
107
123
|
* any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing).
|
|
108
|
-
|
|
109
|
-
target: PropTypes.
|
|
124
|
+
*/
|
|
125
|
+
target: PropTypes.oneOf(['_blank', '_self']),
|
|
110
126
|
/** specifies the callback function when the link is clicked */
|
|
111
127
|
onClick: PropTypes.func,
|
|
112
|
-
/**
|
|
113
|
-
externalLinkAlternativeText:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
),
|
|
117
|
-
/** specifies the title for links with a `_blank` target (which loads the URL in a new browsing context). */
|
|
118
|
-
externalLinkTitle: isRequiredIf(
|
|
119
|
-
PropTypes.string,
|
|
120
|
-
props => props.target === '_blank',
|
|
121
|
-
),
|
|
128
|
+
/** Alt text for the icon indicating that this link opens in a new tab, if target="_blank". e.g. _("in a new tab") */
|
|
129
|
+
externalLinkAlternativeText: PropTypes.string,
|
|
130
|
+
/** Tooltip text for the "opens in new tab" icon, if target="_blank". e.g. _("Opens in a new tab"). */
|
|
131
|
+
externalLinkTitle: PropTypes.string,
|
|
122
132
|
/** type of hyperlink */
|
|
123
133
|
variant: PropTypes.oneOf(['default', 'muted', 'brand']),
|
|
124
|
-
/**
|
|
134
|
+
/** Display the link with an underline. By default, it is only underlined on hover. */
|
|
125
135
|
isInline: PropTypes.bool,
|
|
126
136
|
/** specify if we need to show launch Icon. By default, it will be visible. */
|
|
127
137
|
showLaunchIcon: PropTypes.bool,
|
|
128
138
|
};
|
|
129
139
|
|
|
130
|
-
export default
|
|
131
|
-
/** specifies the text or element that a URL should be associated with */
|
|
132
|
-
content: {
|
|
133
|
-
deprType: DeprTypes.MOVED,
|
|
134
|
-
newName: 'children',
|
|
135
|
-
},
|
|
136
|
-
});
|
|
140
|
+
export default Hyperlink;
|
package/src/Icon/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
export interface IconProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
4
|
-
|
|
4
|
+
// Note: React.ComponentType is what we want here. React.ElementType would allow some element type strings like "div",
|
|
5
|
+
// but we only want to allow components like 'Add' (a specific icon component function/class)
|
|
6
|
+
src?: React.ComponentType;
|
|
5
7
|
svgAttrs?: {
|
|
6
8
|
'aria-label'?: string;
|
|
7
9
|
'aria-labelledby'?: string;
|
|
8
10
|
};
|
|
9
11
|
id?: string | null;
|
|
10
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
12
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'inline';
|
|
11
13
|
className?: string | string[];
|
|
12
14
|
hidden?: boolean;
|
|
13
15
|
screenReaderText?: React.ReactNode;
|
package/src/Icon/index.jsx
CHANGED
|
@@ -74,7 +74,7 @@ Icon.propTypes = {
|
|
|
74
74
|
* An icon component to render.
|
|
75
75
|
* Example import of a Paragon icon component: `import { Check } from '@openedx/paragon/icons';`
|
|
76
76
|
*/
|
|
77
|
-
src: PropTypes.
|
|
77
|
+
src: PropTypes.elementType,
|
|
78
78
|
/** HTML element attributes to pass through to the underlying svg element */
|
|
79
79
|
svgAttrs: PropTypes.shape({
|
|
80
80
|
'aria-label': PropTypes.string,
|
|
@@ -11,21 +11,27 @@ describe('<IconButton />', () => {
|
|
|
11
11
|
const alt = 'alternative';
|
|
12
12
|
const iconAs = Icon;
|
|
13
13
|
const src = InfoOutline;
|
|
14
|
-
const variant = 'secondary';
|
|
14
|
+
const variant = 'secondary' as const;
|
|
15
15
|
const props = {
|
|
16
16
|
alt,
|
|
17
17
|
src,
|
|
18
18
|
iconAs,
|
|
19
19
|
variant,
|
|
20
20
|
};
|
|
21
|
-
const
|
|
21
|
+
const deprecatedFontAwesomeExample = {
|
|
22
22
|
prefix: 'pgn',
|
|
23
23
|
iconName: 'InfoOutlineIcon',
|
|
24
24
|
icon: [InfoOutline],
|
|
25
25
|
};
|
|
26
26
|
it('renders with required props', () => {
|
|
27
27
|
const tree = renderer.create((
|
|
28
|
-
<IconButton
|
|
28
|
+
<IconButton iconAs={Icon} src={InfoOutline} alt={alt} />
|
|
29
|
+
)).toJSON();
|
|
30
|
+
expect(tree).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it('renders with deprecated props', () => {
|
|
33
|
+
const tree = renderer.create((
|
|
34
|
+
<IconButton icon={deprecatedFontAwesomeExample} alt={alt} />
|
|
29
35
|
)).toJSON();
|
|
30
36
|
expect(tree).toMatchSnapshot();
|
|
31
37
|
});
|
|
@@ -94,4 +100,19 @@ describe('<IconButton />', () => {
|
|
|
94
100
|
expect(spy2).toHaveBeenCalledTimes(1);
|
|
95
101
|
});
|
|
96
102
|
});
|
|
103
|
+
|
|
104
|
+
describe('<IconButton.IconButtonWithTooltip>', () => {
|
|
105
|
+
it('renders with required props', () => {
|
|
106
|
+
const tree = renderer.create((
|
|
107
|
+
<IconButton.IconButtonWithTooltip
|
|
108
|
+
iconAs={Icon}
|
|
109
|
+
src={InfoOutline}
|
|
110
|
+
alt={alt}
|
|
111
|
+
tooltipContent="Hello"
|
|
112
|
+
tooltipPlacement="left-end"
|
|
113
|
+
/>
|
|
114
|
+
)).toJSON();
|
|
115
|
+
expect(tree).toMatchSnapshot();
|
|
116
|
+
});
|
|
117
|
+
});
|
|
97
118
|
});
|