@goodhood-web/ui 0.0.4 → 0.0.5
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/{src/index.ts → index.d.ts} +1 -24
- package/index.js +48 -0
- package/index.mjs +2331 -0
- package/lib/BaseButton/BaseButton.d.ts +11 -0
- package/lib/Card/Card.d.ts +3 -0
- package/lib/Card/Card.types.d.ts +10 -0
- package/lib/Card/Card.utils.d.ts +3 -0
- package/lib/Card/CardBody/CardBody.d.ts +3 -0
- package/lib/Card/CardBody/CardBody.types.d.ts +5 -0
- package/lib/Card/CardHeader/CardHeader.d.ts +3 -0
- package/lib/Card/CardHeader/CardHeader.type.d.ts +10 -0
- package/lib/ContentCreatorButton/ContentCreatorButton.d.ts +3 -0
- package/{src/lib/ContentCreatorButton/ContentCreatorButton.types.ts → lib/ContentCreatorButton/ContentCreatorButton.types.d.ts} +2 -3
- package/lib/Divider/Divider.d.ts +3 -0
- package/lib/Divider/Divider.types.d.ts +6 -0
- package/lib/Fieldset/Fieldset.d.ts +3 -0
- package/lib/Fieldset/Fieldset.types.d.ts +8 -0
- package/lib/Form/Form.d.ts +3 -0
- package/lib/Form/Form.types.d.ts +10 -0
- package/lib/Icon/Icon.d.ts +4 -0
- package/lib/Icon/Icon.types.d.ts +18 -0
- package/lib/Icon/icons/24x24/index.d.ts +130 -0
- package/lib/Icon/icons/32x32/index.d.ts +265 -0
- package/lib/Icon/icons/index.d.ts +395 -0
- package/lib/IconButton/IconButton.d.ts +3 -0
- package/{src/lib/IconButton/IconButton.types.ts → lib/IconButton/IconButton.types.d.ts} +10 -10
- package/lib/IconButton/utils.d.ts +3 -0
- package/lib/Image/Image.d.ts +3 -0
- package/lib/Image/Image.type.d.ts +5 -0
- package/lib/LabelPill/LabelPill.d.ts +3 -0
- package/lib/LabelPill/LabelPill.types.d.ts +4 -0
- package/lib/Legend/Legend.d.ts +3 -0
- package/lib/Legend/Legend.types.d.ts +5 -0
- package/lib/MenuItem/MenuItem.d.ts +3 -0
- package/lib/MenuItem/MenuItem.types.d.ts +9 -0
- package/lib/NotificationBubble/NotificationBubble.d.ts +3 -0
- package/{src/lib/NotificationBubble/NotificationBubble.types.tsx → lib/NotificationBubble/NotificationBubble.types.d.ts} +2 -3
- package/lib/Thumbnail/Thumbnail.d.ts +3 -0
- package/{src/lib/Thumbnail/Thumbnail.type.tsx → lib/Thumbnail/Thumbnail.type.d.ts} +6 -9
- package/lib/Toggle/Toggle.d.ts +3 -0
- package/{src/lib/Toggle/Toggle.types.ts → lib/Toggle/Toggle.types.d.ts} +2 -3
- package/lib/ToggleInput/ToggleInput.d.ts +3 -0
- package/{src/lib/ToggleInput/ToggleInput.types.ts → lib/ToggleInput/ToggleInput.types.d.ts} +3 -5
- package/lib/Typography/Typography.d.ts +3 -0
- package/lib/Typography/Typography.types.d.ts +8 -0
- package/package.json +1 -1
- package/style.css +1 -0
- package/.babelrc +0 -12
- package/.eslintrc.json +0 -25
- package/.storybook/main.ts +0 -31
- package/.storybook/manager-head.html +0 -1
- package/.storybook/manager.ts +0 -7
- package/.storybook/nebenanTheme.ts +0 -17
- package/.storybook/preview.ts +0 -9
- package/.stylelintrc.json +0 -14
- package/README.md +0 -7
- package/__mocks__/svg.js +0 -2
- package/images/favicon.ico +0 -0
- package/images/logo.svg +0 -11
- package/jest.config.ts +0 -16
- package/project.json +0 -88
- package/src/lib/BaseButton/BaseButton.module.scss +0 -11
- package/src/lib/BaseButton/BaseButton.spec.tsx +0 -12
- package/src/lib/BaseButton/BaseButton.stories.tsx +0 -26
- package/src/lib/BaseButton/BaseButton.tsx +0 -39
- package/src/lib/Card/Card.module.scss +0 -15
- package/src/lib/Card/Card.spec.tsx +0 -15
- package/src/lib/Card/Card.stories.tsx +0 -159
- package/src/lib/Card/Card.tsx +0 -31
- package/src/lib/Card/Card.types.ts +0 -12
- package/src/lib/Card/Card.utils.spec.tsx +0 -51
- package/src/lib/Card/Card.utils.ts +0 -23
- package/src/lib/Card/CardBody/CardBody.module.scss +0 -4
- package/src/lib/Card/CardBody/CardBody.spec.tsx +0 -15
- package/src/lib/Card/CardBody/CardBody.stories.tsx +0 -108
- package/src/lib/Card/CardBody/CardBody.tsx +0 -9
- package/src/lib/Card/CardBody/CardBody.types.ts +0 -4
- package/src/lib/Card/CardHeader/CardHeader.module.scss +0 -12
- package/src/lib/Card/CardHeader/CardHeader.spec.tsx +0 -72
- package/src/lib/Card/CardHeader/CardHeader.stories.tsx +0 -77
- package/src/lib/Card/CardHeader/CardHeader.tsx +0 -29
- package/src/lib/Card/CardHeader/CardHeader.type.ts +0 -14
- package/src/lib/ContentCreatorButton/ContentCreatorButton.module.scss +0 -13
- package/src/lib/ContentCreatorButton/ContentCreatorButton.spec.tsx +0 -14
- package/src/lib/ContentCreatorButton/ContentCreatorButton.stories.tsx +0 -29
- package/src/lib/ContentCreatorButton/ContentCreatorButton.tsx +0 -35
- package/src/lib/Divider/Divider.module.scss +0 -10
- package/src/lib/Divider/Divider.spec.tsx +0 -46
- package/src/lib/Divider/Divider.stories.tsx +0 -35
- package/src/lib/Divider/Divider.tsx +0 -17
- package/src/lib/Divider/Divider.types.ts +0 -6
- package/src/lib/Fieldset/Fieldset.module.scss +0 -3
- package/src/lib/Fieldset/Fieldset.spec.tsx +0 -68
- package/src/lib/Fieldset/Fieldset.stories.tsx +0 -60
- package/src/lib/Fieldset/Fieldset.tsx +0 -28
- package/src/lib/Fieldset/Fieldset.types.ts +0 -7
- package/src/lib/Form/Form.spec.tsx +0 -15
- package/src/lib/Form/Form.stories.tsx +0 -53
- package/src/lib/Form/Form.tsx +0 -14
- package/src/lib/Form/Form.types.ts +0 -11
- package/src/lib/Icon/Icon.module.scss +0 -7
- package/src/lib/Icon/Icon.spec.tsx +0 -28
- package/src/lib/Icon/Icon.stories.tsx +0 -88
- package/src/lib/Icon/Icon.tsx +0 -29
- package/src/lib/Icon/Icon.types.ts +0 -23
- package/src/lib/Icon/icons/24x24/index.ts +0 -89
- package/src/lib/Icon/icons/24x24/svg/arrow_left.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/arrow_right.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/bookmark.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/bookmarked.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/burger_menu.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/camera.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/checkmark.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/checkmark_circle.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/chevron_down.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/chevron_left.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/chevron_right.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/chevron_up.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/comment_bubble.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/cross.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/cross_circle.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/envelope.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/event_calendar.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/external_link.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/eye.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/eye_crossed.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/filter.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/globe.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/heart.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/image.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/loudspeaker.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/marketplace.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/more_dots.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/more_dots_alt.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/mute.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/notification_bell.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/paperclip.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/pencil.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/pin.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/plus.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/plus_circle.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/privacy_lock.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/search.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/share_arrow.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/share_arrow_outline.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/sort.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/thanks.svg +0 -1
- package/src/lib/Icon/icons/24x24/svg/trash_can.svg +0 -1
- package/src/lib/Icon/icons/32x32/index.ts +0 -179
- package/src/lib/Icon/icons/32x32/svg/address_book.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/baby_toy.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/bicycle.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/bookmark.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/books.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/bubble_heart_filled.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/bubble_heart_outline.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/buildings.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/burger_menu.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/business.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/business_profile.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/camera.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/camera_crossed.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/car.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/carrot.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/chat.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/checkmark_circle.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/christmas_tree.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/clipboard.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/clothing.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/cocktail.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/comment_bubble.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/compass.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/computer.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/couch.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/credit_card.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/cross_circle.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/cutlery.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/drill_tool.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/email.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/envelope.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/event_calendar_check.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/event_calendar_date.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/event_calendar_plus.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/exchange.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/eye.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/eye_crossed.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/gift.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/group.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/healthcare.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/heart.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/house.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/image.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/info.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/invite_neighbour.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/key.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/kitchen_pot.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/list.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/log_out.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/loudspeaker.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/map.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/marketplace.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/miscellaneous_other.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/more_dots.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/more_dots_alt.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/music.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/nebenan.de.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/neighbour.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/notification_bell.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/organisation.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/paper_form_empty.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/paper_form_filled.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/paperclip.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/paw.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/pencil.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/pin.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/pins.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/plant.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/plus.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/plus_circle.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/post.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/privacy_lock.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/qr_code.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/search.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/settings_cog.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/shopping_bag.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/shopping_cart.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/special_place.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/suitcase.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/supporter.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/tennis_ball.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/thanks.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/trash_can.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/truck.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/user.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/user_profile.svg +0 -1
- package/src/lib/Icon/icons/32x32/svg/wellness.svg +0 -1
- package/src/lib/Icon/icons/index.ts +0 -9
- package/src/lib/IconButton/IconButton.module.scss +0 -36
- package/src/lib/IconButton/IconButton.spec.tsx +0 -56
- package/src/lib/IconButton/IconButton.stories.tsx +0 -36
- package/src/lib/IconButton/IconButton.tsx +0 -25
- package/src/lib/IconButton/utils.ts +0 -6
- package/src/lib/Image/Image.spec.tsx +0 -10
- package/src/lib/Image/Image.tsx +0 -7
- package/src/lib/Image/Image.type.tsx +0 -5
- package/src/lib/LabelPill/LabelPill.module.scss +0 -33
- package/src/lib/LabelPill/LabelPill.spec.tsx +0 -23
- package/src/lib/LabelPill/LabelPill.stories.tsx +0 -31
- package/src/lib/LabelPill/LabelPill.tsx +0 -16
- package/src/lib/LabelPill/LabelPill.types.ts +0 -4
- package/src/lib/Legend/Legend.module.scss +0 -9
- package/src/lib/Legend/Legend.spec.tsx +0 -39
- package/src/lib/Legend/Legend.stories.ts +0 -39
- package/src/lib/Legend/Legend.tsx +0 -19
- package/src/lib/Legend/Legend.types.ts +0 -5
- package/src/lib/MenuItem/MenuItem.module.scss +0 -70
- package/src/lib/MenuItem/MenuItem.spec.tsx +0 -47
- package/src/lib/MenuItem/MenuItem.stories.tsx +0 -97
- package/src/lib/MenuItem/MenuItem.tsx +0 -34
- package/src/lib/MenuItem/MenuItem.types.ts +0 -10
- package/src/lib/NotificationBubble/NotificationBubble.module.scss +0 -30
- package/src/lib/NotificationBubble/NotificationBubble.spec.tsx +0 -36
- package/src/lib/NotificationBubble/NotificationBubble.stories.tsx +0 -56
- package/src/lib/NotificationBubble/NotificationBubble.tsx +0 -34
- package/src/lib/Thumbnail/Thumbnail.module.scss +0 -67
- package/src/lib/Thumbnail/Thumbnail.spec.tsx +0 -51
- package/src/lib/Thumbnail/Thumbnail.stories.tsx +0 -242
- package/src/lib/Thumbnail/Thumbnail.tsx +0 -28
- package/src/lib/Toggle/Toggle.module.scss +0 -53
- package/src/lib/Toggle/Toggle.spec.tsx +0 -23
- package/src/lib/Toggle/Toggle.stories.tsx +0 -38
- package/src/lib/Toggle/Toggle.tsx +0 -32
- package/src/lib/ToggleInput/ToggleInput.module.scss +0 -33
- package/src/lib/ToggleInput/ToggleInput.spec.tsx +0 -45
- package/src/lib/ToggleInput/ToggleInput.stories.tsx +0 -62
- package/src/lib/ToggleInput/ToggleInput.tsx +0 -40
- package/src/lib/Typography/Typography.module.scss +0 -61
- package/src/lib/Typography/Typography.spec.tsx +0 -60
- package/src/lib/Typography/Typography.stories.tsx +0 -45
- package/src/lib/Typography/Typography.tsx +0 -26
- package/src/lib/Typography/Typography.types.ts +0 -28
- package/src/styles/_design-tokens.scss +0 -1
- package/src/styles/_fonts.scss +0 -0
- package/src/styles/_functions.scss +0 -17
- package/src/styles/_mixins.scss +0 -33
- package/src/styles/index.scss +0 -3
- package/src/styles/reset.scss +0 -65
- package/tsconfig.json +0 -24
- package/tsconfig.lib.json +0 -35
- package/tsconfig.spec.json +0 -20
- package/tsconfig.storybook.json +0 -31
- package/vite.config.ts +0 -57
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.toggleInput {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
padding: getSpacing('sm') getSpacing('lg');
|
|
5
|
-
background-color: getSemanticColor('surface', 'surface');
|
|
6
|
-
gap: getSpacing('md');
|
|
7
|
-
|
|
8
|
-
color: getSemanticColor('surface', 'onSurfaceVariant');
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
width: 100%;
|
|
11
|
-
|
|
12
|
-
svg {
|
|
13
|
-
flex-shrink: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.textLabel {
|
|
17
|
-
flex-grow: 1;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.switch {
|
|
21
|
-
flex-shrink: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&--checked {
|
|
25
|
-
color: getSemanticColor('surface', 'onSurface');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&--withBorder {
|
|
29
|
-
padding: getSpacing('md') getSpacing('lg');
|
|
30
|
-
border-radius: getBorderRadius('lg');
|
|
31
|
-
box-shadow: inset 0px 0px 0px 1px getSemanticColor('outline', 'outlineVariant');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import ToggleInput from './ToggleInput';
|
|
4
|
-
import { ToggleInputProps } from './ToggleInput.types';
|
|
5
|
-
|
|
6
|
-
describe('ToggleInput Component', () => {
|
|
7
|
-
const mockProps = {
|
|
8
|
-
checked: false,
|
|
9
|
-
defaultChecked: false,
|
|
10
|
-
disabled: false,
|
|
11
|
-
icon: 'notification_bell',
|
|
12
|
-
label: 'Test Label',
|
|
13
|
-
onChange: jest.fn(),
|
|
14
|
-
variant: 'rounded',
|
|
15
|
-
} as ToggleInputProps;
|
|
16
|
-
|
|
17
|
-
it('renders without crashing', () => {
|
|
18
|
-
render(<ToggleInput {...mockProps} />);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('renders label and icon correctly', () => {
|
|
22
|
-
render(<ToggleInput {...mockProps} />);
|
|
23
|
-
const labelElement = screen.getByText('Test Label');
|
|
24
|
-
const iconElement = screen.getByRole('presentation');
|
|
25
|
-
|
|
26
|
-
expect(labelElement).toBeInTheDocument();
|
|
27
|
-
expect(iconElement).toBeInTheDocument();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('calls onChange when the toggle switch is clicked', () => {
|
|
31
|
-
render(<ToggleInput {...mockProps} />);
|
|
32
|
-
const toggleSwitch = screen.getByTestId('toggle-switch');
|
|
33
|
-
|
|
34
|
-
fireEvent.click(toggleSwitch);
|
|
35
|
-
|
|
36
|
-
expect(mockProps.onChange).toHaveBeenCalledTimes(1);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('renders disabled state correctly', () => {
|
|
40
|
-
render(<ToggleInput {...mockProps} disabled={true} />);
|
|
41
|
-
const toggleSwitch = screen.getByTestId('toggle-switch');
|
|
42
|
-
|
|
43
|
-
expect(toggleSwitch).toBeDisabled();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import Icons32 from '../Icon/icons/32x32';
|
|
5
|
-
|
|
6
|
-
import ToggleInput from './ToggleInput';
|
|
7
|
-
import { ToggleInputProps } from './ToggleInput.types';
|
|
8
|
-
|
|
9
|
-
const meta: Meta<typeof ToggleInput> = {
|
|
10
|
-
argTypes: {
|
|
11
|
-
icon: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'select',
|
|
14
|
-
},
|
|
15
|
-
description: 'This will be icon of the toggle input',
|
|
16
|
-
options: [undefined, ...Object.keys(Icons32)],
|
|
17
|
-
},
|
|
18
|
-
label: {
|
|
19
|
-
control: {
|
|
20
|
-
type: 'text',
|
|
21
|
-
},
|
|
22
|
-
description: 'This will be text of the toggle input',
|
|
23
|
-
},
|
|
24
|
-
onChange: { action: 'clicked', description: 'On click event callback' },
|
|
25
|
-
|
|
26
|
-
withBorder: {
|
|
27
|
-
defaultValue: 'false',
|
|
28
|
-
description: 'This will be variant of the toggle input',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
component: ToggleInput,
|
|
32
|
-
title: 'Components/ToggleInput',
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default meta;
|
|
36
|
-
|
|
37
|
-
type Story = StoryObj<typeof ToggleInput>;
|
|
38
|
-
|
|
39
|
-
const WrapperToggle = (props: ToggleInputProps) => {
|
|
40
|
-
const [checked, setChecked] = useState(false);
|
|
41
|
-
|
|
42
|
-
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
43
|
-
setChecked(e.target.checked);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return <ToggleInput {...props} checked={checked} onChange={handleChange} />;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const Primary: Story = {
|
|
50
|
-
args: {
|
|
51
|
-
icon: 'notification_bell',
|
|
52
|
-
label: 'Toggle Input',
|
|
53
|
-
withBorder: false,
|
|
54
|
-
},
|
|
55
|
-
parameters: {
|
|
56
|
-
design: {
|
|
57
|
-
type: 'figma',
|
|
58
|
-
url: 'https://www.figma.com/file/hN7xJ3rRAemUJT9T0uEfUS/Product-Design-System?node-id=181%3A2876&mode=dev',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
render: WrapperToggle,
|
|
62
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
|
|
3
|
-
import Icon from '../Icon/Icon';
|
|
4
|
-
import Toggle from '../Toggle/Toggle';
|
|
5
|
-
import Typography from '../Typography/Typography';
|
|
6
|
-
|
|
7
|
-
import styles from './ToggleInput.module.scss';
|
|
8
|
-
import { ToggleInputProps } from './ToggleInput.types';
|
|
9
|
-
|
|
10
|
-
const ToggleInput = ({
|
|
11
|
-
checked,
|
|
12
|
-
defaultChecked,
|
|
13
|
-
disabled,
|
|
14
|
-
icon,
|
|
15
|
-
label,
|
|
16
|
-
onChange,
|
|
17
|
-
withBorder,
|
|
18
|
-
}: ToggleInputProps) => {
|
|
19
|
-
return (
|
|
20
|
-
<label
|
|
21
|
-
className={clsx(styles.toggleInput, {
|
|
22
|
-
[styles[`toggleInput--withBorder`]]: withBorder,
|
|
23
|
-
[styles[`toggleInput--checked`]]: checked,
|
|
24
|
-
})}
|
|
25
|
-
>
|
|
26
|
-
{icon && <Icon name={icon} size="32" />}
|
|
27
|
-
<Typography type="body-large" className={styles.textLabel}>
|
|
28
|
-
{label}
|
|
29
|
-
</Typography>
|
|
30
|
-
<Toggle
|
|
31
|
-
onChange={onChange}
|
|
32
|
-
disabled={disabled}
|
|
33
|
-
defaultChecked={defaultChecked}
|
|
34
|
-
className={styles.switch}
|
|
35
|
-
/>
|
|
36
|
-
</label>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default ToggleInput;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
.h1 {
|
|
2
|
-
@include typography('headings', 'H1');
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.h2 {
|
|
6
|
-
@include typography('headings', 'H2');
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.h3 {
|
|
10
|
-
@include typography('headings', 'H3');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.h4 {
|
|
14
|
-
@include typography('headings', 'H4');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.h5 {
|
|
18
|
-
@include typography('headings', 'H5');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.h6 {
|
|
22
|
-
@include typography('headings', 'H6');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.h7 {
|
|
26
|
-
@include typography('headings', 'H7');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.h8 {
|
|
30
|
-
@include typography('headings', 'H8');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Body
|
|
34
|
-
.body-large {
|
|
35
|
-
@include typography('body', 'Large');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.body-regular {
|
|
39
|
-
@include typography('body', 'Regular');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.body-semibold {
|
|
43
|
-
@include typography('body', 'Semibold');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.body-italic {
|
|
47
|
-
@include typography('body', 'Italic');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Detail
|
|
51
|
-
.detail-medium {
|
|
52
|
-
@include typography('detail', 'Medium');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.detail-bold {
|
|
56
|
-
@include typography('detail', 'Bold');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.detail-upper-case {
|
|
60
|
-
@include typography('detail', 'Upper Case');
|
|
61
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import Typography from './Typography';
|
|
4
|
-
import { TypographyType } from './Typography.types';
|
|
5
|
-
|
|
6
|
-
describe('<Typography />', () => {
|
|
7
|
-
const types: TypographyType[] = [
|
|
8
|
-
'h1',
|
|
9
|
-
'h2',
|
|
10
|
-
'h3',
|
|
11
|
-
'h4',
|
|
12
|
-
'h5',
|
|
13
|
-
'h6',
|
|
14
|
-
'h7',
|
|
15
|
-
'h8',
|
|
16
|
-
'body-large',
|
|
17
|
-
'body-regular',
|
|
18
|
-
'body-semibold',
|
|
19
|
-
'body-italic',
|
|
20
|
-
'detail-medium',
|
|
21
|
-
'detail-bold',
|
|
22
|
-
'detail-upper-case',
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
types.forEach((type) => {
|
|
26
|
-
it(`renders correctly for type "${type}"`, () => {
|
|
27
|
-
const { getByText } = render(<Typography type={type}>Sample Text</Typography>);
|
|
28
|
-
const element = getByText('Sample Text');
|
|
29
|
-
|
|
30
|
-
if (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(type)) {
|
|
31
|
-
expect(element.tagName).toBe(type.toUpperCase());
|
|
32
|
-
} else {
|
|
33
|
-
expect(element.tagName).toBe('SPAN');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
expect(element).toHaveClass(type);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('renders correctly with "as" prop', () => {
|
|
41
|
-
const { getByText } = render(
|
|
42
|
-
<Typography type="body-large" as="p">
|
|
43
|
-
Sample Text
|
|
44
|
-
</Typography>,
|
|
45
|
-
);
|
|
46
|
-
const element = getByText('Sample Text');
|
|
47
|
-
expect(element.tagName).toBe('P');
|
|
48
|
-
expect(element).toHaveClass('body-large');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('take a custom classname and adds it properly to the element', () => {
|
|
52
|
-
const { getByText } = render(
|
|
53
|
-
<Typography type="body-large" className="custom-classname">
|
|
54
|
-
Sample Text
|
|
55
|
-
</Typography>,
|
|
56
|
-
);
|
|
57
|
-
const element = getByText('Sample Text');
|
|
58
|
-
expect(element).toHaveClass('custom-classname');
|
|
59
|
-
});
|
|
60
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import Typography from './Typography';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Typography> = {
|
|
6
|
-
component: Typography,
|
|
7
|
-
title: 'Components/Typography',
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof Typography>;
|
|
11
|
-
|
|
12
|
-
export const Heading1: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
children: 'Heading 1',
|
|
15
|
-
type: 'h1',
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Heading2: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
children: 'Heading 2',
|
|
22
|
-
type: 'h2',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const BodyLarge: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
children: 'Body Large Text',
|
|
29
|
-
type: 'body-large',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const BodyRegular: Story = {
|
|
34
|
-
args: {
|
|
35
|
-
children: 'Body Regular Text',
|
|
36
|
-
type: 'body-regular',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const DetailBold: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
children: 'Detail Bold Text',
|
|
43
|
-
type: 'detail-bold',
|
|
44
|
-
},
|
|
45
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
import React, { JSX } from 'react';
|
|
3
|
-
|
|
4
|
-
import styles from './Typography.module.scss';
|
|
5
|
-
import { TypographyProps, TypographyType } from './Typography.types';
|
|
6
|
-
|
|
7
|
-
function deriveTagFromType(type: TypographyType): keyof JSX.IntrinsicElements {
|
|
8
|
-
switch (type) {
|
|
9
|
-
case 'h1':
|
|
10
|
-
case 'h2':
|
|
11
|
-
case 'h3':
|
|
12
|
-
case 'h4':
|
|
13
|
-
case 'h5':
|
|
14
|
-
case 'h6':
|
|
15
|
-
return type as keyof JSX.IntrinsicElements;
|
|
16
|
-
default:
|
|
17
|
-
return 'span';
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function Typography({ as, children, className, type }: TypographyProps) {
|
|
22
|
-
const ElementTag = as || deriveTagFromType(type);
|
|
23
|
-
return <ElementTag className={clsx(styles[type], className)}>{children}</ElementTag>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default Typography;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
|
|
3
|
-
export type TypographyType =
|
|
4
|
-
| 'h1'
|
|
5
|
-
| 'h2'
|
|
6
|
-
| 'h3'
|
|
7
|
-
| 'h4'
|
|
8
|
-
| 'h5'
|
|
9
|
-
| 'h6'
|
|
10
|
-
| 'h7'
|
|
11
|
-
| 'h8'
|
|
12
|
-
| 'body-large'
|
|
13
|
-
| 'body-regular'
|
|
14
|
-
| 'body-semibold'
|
|
15
|
-
| 'body-italic'
|
|
16
|
-
| 'detail-medium'
|
|
17
|
-
| 'detail-bold'
|
|
18
|
-
| 'detail-upper-case';
|
|
19
|
-
|
|
20
|
-
export interface TypographyProps {
|
|
21
|
-
as?: Extract<
|
|
22
|
-
keyof JSX.IntrinsicElements,
|
|
23
|
-
'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
|
|
24
|
-
>;
|
|
25
|
-
children: string;
|
|
26
|
-
className?: string;
|
|
27
|
-
type: TypographyType;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@forward '@goodhood/design-tokens/lib/web/index';
|
package/src/styles/_fonts.scss
DELETED
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@function mapGet($map, $keys...) {
|
|
4
|
-
@return map.get($map, $keys...);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@function getSemanticColor($color, $shade) {
|
|
8
|
-
@return mapGet($tokens, color, semantic, $color, $shade);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@function getSpacing($spacingType) {
|
|
12
|
-
@return mapGet($tokens, spacing, $spacingType);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@function getBorderRadius($spacingType) {
|
|
16
|
-
@return mapGet($tokens, borderRadius, $spacingType);
|
|
17
|
-
}
|
package/src/styles/_mixins.scss
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@mixin spacing($properties, $map: map.get($tokens, 'spacing')) {
|
|
4
|
-
// Extract the correct spacing settings;
|
|
5
|
-
@each $size, $i in $map {
|
|
6
|
-
$value: map.get($tokens, 'spacing', $size);
|
|
7
|
-
&-#{$size} {
|
|
8
|
-
@each $property in $properties {
|
|
9
|
-
#{$property}: #{$value};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@mixin typography($type, $level) {
|
|
16
|
-
// Extract the correct typography settings based on the provided type and level
|
|
17
|
-
$typo-settings: map.get(map.get($tokens, $type), $level);
|
|
18
|
-
|
|
19
|
-
// Ensure the level exists
|
|
20
|
-
@if $typo-settings {
|
|
21
|
-
margin-bottom: mapGet($typo-settings, 'paragraphSpacing');
|
|
22
|
-
font-family: mapGet($typo-settings, 'fontFamily');
|
|
23
|
-
font-size: mapGet($typo-settings, 'fontSize');
|
|
24
|
-
font-weight: mapGet($typo-settings, 'fontWeight');
|
|
25
|
-
letter-spacing: mapGet($typo-settings, 'letterSpacing');
|
|
26
|
-
line-height: mapGet($typo-settings, 'lineHeight');
|
|
27
|
-
text-decoration: mapGet($typo-settings, 'textDecoration');
|
|
28
|
-
text-indent: mapGet($typo-settings, 'paragraphIndent');
|
|
29
|
-
text-transform: mapGet($typo-settings, 'textCase');
|
|
30
|
-
} @else {
|
|
31
|
-
@error "Unknown typography type: #{$type} or level: #{$level}.";
|
|
32
|
-
}
|
|
33
|
-
}
|
package/src/styles/index.scss
DELETED
package/src/styles/reset.scss
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
*, :after, :before {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
padding: 0;
|
|
4
|
-
margin: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[hidden] {
|
|
8
|
-
display: none !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
input {
|
|
13
|
-
border: none;
|
|
14
|
-
appearance: none;
|
|
15
|
-
|
|
16
|
-
&[type="search"] {
|
|
17
|
-
appearance: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&[type="file"]::-webkit-file-upload-button {
|
|
21
|
-
display: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&[type="number"] {
|
|
25
|
-
appearance: textfield;
|
|
26
|
-
|
|
27
|
-
&::-webkit-inner-spin-button,
|
|
28
|
-
&::-webkit-outer-spin-button {
|
|
29
|
-
appearance: none;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
select {
|
|
35
|
-
border: none;
|
|
36
|
-
appearance: none;
|
|
37
|
-
background-color: transparent;
|
|
38
|
-
|
|
39
|
-
&::-ms-expand {
|
|
40
|
-
display: none;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
textarea {
|
|
45
|
-
border: none;
|
|
46
|
-
appearance: none;
|
|
47
|
-
-ms-overflow-style: none;
|
|
48
|
-
resize: vertical;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
button {
|
|
52
|
-
border: none;
|
|
53
|
-
background-color: transparent;
|
|
54
|
-
text-align: left;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
ul,
|
|
58
|
-
ol {
|
|
59
|
-
list-style-type: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
img, svg{
|
|
63
|
-
display: block;
|
|
64
|
-
max-width: 100%;
|
|
65
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"jsx": "react-jsx",
|
|
4
|
-
"allowJs": false,
|
|
5
|
-
"esModuleInterop": false,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"types": ["vite/client"]
|
|
9
|
-
},
|
|
10
|
-
"files": [],
|
|
11
|
-
"include": [],
|
|
12
|
-
"references": [
|
|
13
|
-
{
|
|
14
|
-
"path": "./tsconfig.lib.json"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"path": "./tsconfig.spec.json"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "./tsconfig.storybook.json"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"extends": "../../tsconfig.base.json"
|
|
24
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"types": ["node", "vite/client"]
|
|
6
|
-
},
|
|
7
|
-
"files": [
|
|
8
|
-
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
9
|
-
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
10
|
-
],
|
|
11
|
-
"exclude": [
|
|
12
|
-
"jest.config.ts",
|
|
13
|
-
"src/**/*.spec.ts",
|
|
14
|
-
"src/**/*.test.ts",
|
|
15
|
-
"src/**/*.spec.tsx",
|
|
16
|
-
"src/**/*.test.tsx",
|
|
17
|
-
"src/**/*.spec.js",
|
|
18
|
-
"src/**/*.test.js",
|
|
19
|
-
"src/**/*.spec.jsx",
|
|
20
|
-
"src/**/*.test.jsx",
|
|
21
|
-
"**/*.stories.ts",
|
|
22
|
-
"**/*.stories.js",
|
|
23
|
-
"**/*.stories.jsx",
|
|
24
|
-
"**/*.stories.tsx"
|
|
25
|
-
],
|
|
26
|
-
"include": [
|
|
27
|
-
"vite.config.ts",
|
|
28
|
-
"src/**/*.js",
|
|
29
|
-
"src/**/*.jsx",
|
|
30
|
-
"src/**/*.ts",
|
|
31
|
-
"src/**/*.tsx",
|
|
32
|
-
"__mocks__/**/*.js",
|
|
33
|
-
"__mocks__/**/*.ts"
|
|
34
|
-
]
|
|
35
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"types": ["jest", "node", "@testing-library/jest-dom"]
|
|
7
|
-
},
|
|
8
|
-
"include": [
|
|
9
|
-
"jest.config.ts",
|
|
10
|
-
"src/**/*.test.ts",
|
|
11
|
-
"src/**/*.spec.ts",
|
|
12
|
-
"src/**/*.test.tsx",
|
|
13
|
-
"src/**/*.spec.tsx",
|
|
14
|
-
"src/**/*.test.js",
|
|
15
|
-
"src/**/*.spec.js",
|
|
16
|
-
"src/**/*.test.jsx",
|
|
17
|
-
"src/**/*.spec.jsx",
|
|
18
|
-
"src/**/*.d.ts"
|
|
19
|
-
]
|
|
20
|
-
}
|
package/tsconfig.storybook.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"emitDecoratorMetadata": true,
|
|
5
|
-
"outDir": ""
|
|
6
|
-
},
|
|
7
|
-
"files": [
|
|
8
|
-
"../../node_modules/@nx/react/typings/styled-jsx.d.ts",
|
|
9
|
-
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
10
|
-
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
11
|
-
],
|
|
12
|
-
"exclude": [
|
|
13
|
-
"src/**/*.spec.ts",
|
|
14
|
-
"src/**/*.test.ts",
|
|
15
|
-
"src/**/*.spec.js",
|
|
16
|
-
"src/**/*.test.js",
|
|
17
|
-
"src/**/*.spec.tsx",
|
|
18
|
-
"src/**/*.test.tsx",
|
|
19
|
-
"src/**/*.spec.jsx",
|
|
20
|
-
"src/**/*.test.js"
|
|
21
|
-
],
|
|
22
|
-
"include": [
|
|
23
|
-
"src/**/*.stories.ts",
|
|
24
|
-
"src/**/*.stories.js",
|
|
25
|
-
"src/**/*.stories.jsx",
|
|
26
|
-
"src/**/*.stories.tsx",
|
|
27
|
-
"src/**/*.stories.mdx",
|
|
28
|
-
".storybook/*.js",
|
|
29
|
-
".storybook/*.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|