@goodhood-web/ui 0.0.6 → 1.0.0-development.2
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 +2341 -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 +12 -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} +12 -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 +3 -2
- 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 -95
- package/release.config.js +0 -30
- 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 -14
- 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 -33
- 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 -37
- 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 -35
- 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 -73
- 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 -68
- 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 -32
- 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 -67
- 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 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none"><path stroke="#201649" stroke-width="1.5" d="M20.5 10.5v-3a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h1m14.5-14h3.882a1 1 0 0 1 .894.553l2.618 5.236c.07.139.106.292.106.447V23.5a1 1 0 0 1-1 1h-4m-2.5-14v6m0 0h7m-7 0V22M6 24.5a2.5 2.5 0 0 0 5 0m-5 0a2.5 2.5 0 0 1 5 0m0 0h7m5 0a2.5 2.5 0 0 1-5 0m5 0c0-1.5-1-2.5-2.5-2.5M18 24.5c0-1.5 1-2.5 2.5-2.5"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none"><path stroke="#201649" stroke-width="1.5" d="M16 14.5a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 0a8 8 0 0 0-8 8v2.114c0 .834.517 1.578 1.316 1.814C10.821 26.87 13.41 27.5 16 27.5s5.18-.629 6.684-1.072c.8-.236 1.316-.98 1.316-1.814V22.5a8 8 0 0 0-8-8Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none"><path stroke="#201649" stroke-width="1.5" d="M16 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 0c-3.866 0-7 3.5-7 7 0 .263.015 1.523.043 1.779M16 17c3.866 0 6.957 3.5 7 7 .003.263-.015 1.523-.043 1.779m-13.914 0A11.945 11.945 0 0 0 16 28c2.593 0 4.995-.823 6.957-2.221m-13.914 0A11.985 11.985 0 0 1 4 16C4 9.373 9.373 4 16 4s12 5.373 12 12c0 4.034-1.99 7.603-5.043 9.779"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none"><path stroke="#201649" stroke-linecap="round" stroke-miterlimit="16" stroke-width="1.5" d="M16 25.5S11 21 11 16c0-3.881 3.013-7.461 4.361-8.869a.875.875 0 0 1 1.278 0C17.987 8.54 21 12.12 21 16c0 5-5 9.5-5 9.5Zm0 0c8.398 0 11.725-4.087 11.983-11.529a.926.926 0 0 0-.95-.966c-1.358.038-3.9.22-6.033 1.007M16 25.5c-8.267 0-11.713-4.137-11.983-11.529a.925.925 0 0 1 .95-.966c1.358.038 3.9.22 6.033 1.007"/></svg>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@mixin iconButtonSize($size) {
|
|
2
|
-
width: $size;
|
|
3
|
-
height: $size;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.iconButton {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
border-radius: 50%;
|
|
12
|
-
background: getSemanticColor('primary', 'primary');
|
|
13
|
-
|
|
14
|
-
&:disabled {
|
|
15
|
-
background: getSemanticColor('surface', 'surface');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
background: getSemanticColor('primary', 'primaryVariant');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:active {
|
|
23
|
-
background: getSemanticColor('primary', 'primary');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&--small {
|
|
27
|
-
@include iconButtonSize(40px);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&--medium {
|
|
31
|
-
@include iconButtonSize(48px);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&--large {
|
|
35
|
-
@include iconButtonSize(56px);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
|
|
4
|
-
import IconButton from './IconButton';
|
|
5
|
-
|
|
6
|
-
describe('IconButton', () => {
|
|
7
|
-
it('should render a medium sized icon button by default', () => {
|
|
8
|
-
const { baseElement } = render(
|
|
9
|
-
<IconButton
|
|
10
|
-
icon="pencil"
|
|
11
|
-
ariaLabel="create post"
|
|
12
|
-
onClick={() => {
|
|
13
|
-
// empty body
|
|
14
|
-
}}
|
|
15
|
-
/>,
|
|
16
|
-
);
|
|
17
|
-
const iconButtonEl = baseElement.querySelector('[type=button]');
|
|
18
|
-
|
|
19
|
-
expect(iconButtonEl).toBeInTheDocument();
|
|
20
|
-
expect(iconButtonEl).not.toBeEmptyDOMElement();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('should render a empty button if icon and size are incompatible', () => {
|
|
24
|
-
const { baseElement } = render(
|
|
25
|
-
// @ts-expect-error no small icon for address_book
|
|
26
|
-
<IconButton
|
|
27
|
-
size="small"
|
|
28
|
-
icon="address_book"
|
|
29
|
-
onClick={() => {
|
|
30
|
-
// empty body
|
|
31
|
-
}}
|
|
32
|
-
/>,
|
|
33
|
-
);
|
|
34
|
-
const iconButtonEl = baseElement.querySelector('[type=button]');
|
|
35
|
-
|
|
36
|
-
expect(iconButtonEl).toBeInTheDocument();
|
|
37
|
-
expect(iconButtonEl).toBeEmptyDOMElement();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('should handle button click', async () => {
|
|
41
|
-
const handleClick = jest.fn();
|
|
42
|
-
|
|
43
|
-
const { baseElement } = render(
|
|
44
|
-
<IconButton
|
|
45
|
-
icon="pencil"
|
|
46
|
-
size="medium"
|
|
47
|
-
onClick={handleClick}
|
|
48
|
-
ariaLabel="create new post"
|
|
49
|
-
/>,
|
|
50
|
-
);
|
|
51
|
-
const iconButtonEl = baseElement.querySelector('[type=button]');
|
|
52
|
-
|
|
53
|
-
await userEvent.click(iconButtonEl as HTMLButtonElement);
|
|
54
|
-
expect(handleClick).toHaveBeenCalled();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import Icons24 from '../Icon/icons/24x24';
|
|
4
|
-
import Icons32 from '../Icon/icons/32x32';
|
|
5
|
-
|
|
6
|
-
import IconButton from './IconButton';
|
|
7
|
-
|
|
8
|
-
const iconNames24 = Object.keys(Icons24);
|
|
9
|
-
const iconName32 = Object.keys(Icons32);
|
|
10
|
-
const allIconNames = Array.from(new Set([...iconNames24, ...iconName32]));
|
|
11
|
-
|
|
12
|
-
const meta: Meta<typeof IconButton> = {
|
|
13
|
-
argTypes: {
|
|
14
|
-
icon: {
|
|
15
|
-
control: { type: 'select' },
|
|
16
|
-
options: allIconNames,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
component: IconButton,
|
|
20
|
-
title: 'Components/IconButton',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default meta;
|
|
24
|
-
type Story = StoryObj<typeof IconButton>;
|
|
25
|
-
|
|
26
|
-
export const Primary: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
icon: 'pencil',
|
|
29
|
-
},
|
|
30
|
-
parameters: {
|
|
31
|
-
design: {
|
|
32
|
-
type: 'figma',
|
|
33
|
-
url: 'https://www.figma.com/file/hN7xJ3rRAemUJT9T0uEfUS/Product-Design-System?type=design&node-id=6952-1150&mode=design&t=3J2DmPvWcXt6Hs2q-4',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import BaseButton from '../BaseButton/BaseButton';
|
|
5
|
-
import Icon from '../Icon/Icon';
|
|
6
|
-
|
|
7
|
-
import styles from './IconButton.module.scss';
|
|
8
|
-
import { IconButtonProps } from './IconButton.types';
|
|
9
|
-
import { getIconSize } from './utils';
|
|
10
|
-
|
|
11
|
-
const IconButton = ({ icon, size = 'medium', ...baseButtonProps }: IconButtonProps) => {
|
|
12
|
-
const iconSize = getIconSize(size);
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<BaseButton
|
|
16
|
-
{...baseButtonProps}
|
|
17
|
-
className={clsx(styles.iconButton, styles[`iconButton--${size}`])}
|
|
18
|
-
>
|
|
19
|
-
{/* @ts-expect-error Icon validates props */}
|
|
20
|
-
<Icon size={iconSize} name={icon} />
|
|
21
|
-
</BaseButton>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default IconButton;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import Image from './Image';
|
|
4
|
-
|
|
5
|
-
describe('Image', () => {
|
|
6
|
-
it('should render successfully', () => {
|
|
7
|
-
const { baseElement } = render(<Image src="" alt="" />);
|
|
8
|
-
expect(baseElement).toBeTruthy();
|
|
9
|
-
});
|
|
10
|
-
});
|
package/src/lib/Image/Image.tsx
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.labelPill {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
border-radius: mapGet($tokens, borderRadius, lg);
|
|
6
|
-
background: getSemanticColor('secondary2', 'secondary2');
|
|
7
|
-
|
|
8
|
-
span {
|
|
9
|
-
color: getSemanticColor('secondary2', 'onSecondary2');
|
|
10
|
-
line-height: mapGet($tokens, lineHeight, sm);
|
|
11
|
-
text-align: center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&--small {
|
|
15
|
-
height: 20px;
|
|
16
|
-
padding: 0 8px;
|
|
17
|
-
|
|
18
|
-
span {
|
|
19
|
-
font-size: 10px;
|
|
20
|
-
font-weight: 800;
|
|
21
|
-
text-transform: uppercase;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&--medium {
|
|
26
|
-
padding: 4px 8px;
|
|
27
|
-
|
|
28
|
-
span {
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
font-weight: 700;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import LabelPill from './LabelPill';
|
|
4
|
-
|
|
5
|
-
describe('LabelPill', () => {
|
|
6
|
-
it('should render with "small" size', () => {
|
|
7
|
-
const { baseElement } = render(<LabelPill label="New" size="small" />);
|
|
8
|
-
const spanElement = baseElement.querySelector('span.labelPill span');
|
|
9
|
-
|
|
10
|
-
expect(spanElement?.innerHTML).toBe('New');
|
|
11
|
-
|
|
12
|
-
const elementWithClassName = baseElement.querySelector('.labelPill--small');
|
|
13
|
-
|
|
14
|
-
expect(elementWithClassName).not.toBeNull();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('should renders with "medium" size', () => {
|
|
18
|
-
const { baseElement } = render(<LabelPill label="New" size="medium" />);
|
|
19
|
-
const elementWithClassName = baseElement.querySelector('.labelPill--medium');
|
|
20
|
-
|
|
21
|
-
expect(elementWithClassName).not.toBeNull();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import LabelPill from './LabelPill';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof LabelPill> = {
|
|
6
|
-
argTypes: {
|
|
7
|
-
size: {
|
|
8
|
-
control: { type: 'select' },
|
|
9
|
-
options: ['small', 'medium'],
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
component: LabelPill,
|
|
13
|
-
title: 'Components/LabelPill',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
|
|
18
|
-
type Story = StoryObj<typeof LabelPill>;
|
|
19
|
-
|
|
20
|
-
export const Primary: Story = {
|
|
21
|
-
args: {
|
|
22
|
-
label: 'new',
|
|
23
|
-
size: 'small',
|
|
24
|
-
},
|
|
25
|
-
parameters: {
|
|
26
|
-
design: {
|
|
27
|
-
type: 'figma',
|
|
28
|
-
url: 'https://www.figma.com/file/hN7xJ3rRAemUJT9T0uEfUS/Product-Design-System?node-id=1680%3A6106&mode=dev',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
|
|
3
|
-
import styles from './LabelPill.module.scss';
|
|
4
|
-
import { LabelPillProps } from './LabelPill.types';
|
|
5
|
-
|
|
6
|
-
const LabelPill = ({ label, size }: LabelPillProps) => {
|
|
7
|
-
const pillClass = styles[`labelPill--${size}`];
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<span className={clsx(styles.labelPill, pillClass)}>
|
|
11
|
-
<span>{label}</span>
|
|
12
|
-
</span>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default LabelPill;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import Legend from './Legend';
|
|
4
|
-
|
|
5
|
-
describe('Legend', () => {
|
|
6
|
-
it('should render with a headline', () => {
|
|
7
|
-
const { getByText } = render(<Legend headline="Example Headline" />);
|
|
8
|
-
const headlineElement = getByText('Example Headline');
|
|
9
|
-
|
|
10
|
-
expect(headlineElement).toBeInTheDocument();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should render with optional text when provided', () => {
|
|
14
|
-
const testText = 'Additional information';
|
|
15
|
-
const { getByText } = render(<Legend headline="Headline" text={testText} />);
|
|
16
|
-
const textElement = getByText(testText);
|
|
17
|
-
|
|
18
|
-
expect(textElement).toBeInTheDocument();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('should not render optional text when not provided', () => {
|
|
22
|
-
const { queryByText } = render(<Legend headline="Headline" />);
|
|
23
|
-
const textElement = queryByText('Additional information');
|
|
24
|
-
|
|
25
|
-
expect(textElement).toBeNull();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('should apply custom className if provided', () => {
|
|
29
|
-
const customClass = 'custom-legend-class';
|
|
30
|
-
const { container } = render(<Legend headline="Headline" className={customClass} />);
|
|
31
|
-
const legendElement = container.firstChild;
|
|
32
|
-
|
|
33
|
-
expect(legendElement).toHaveClass(customClass);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import Legend from './Legend';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Legend> = {
|
|
6
|
-
argTypes: {
|
|
7
|
-
className: {
|
|
8
|
-
control: { type: 'text' },
|
|
9
|
-
description: 'Additional CSS class name',
|
|
10
|
-
},
|
|
11
|
-
headline: {
|
|
12
|
-
control: { type: 'text' },
|
|
13
|
-
description: 'Headline of the legend',
|
|
14
|
-
},
|
|
15
|
-
text: {
|
|
16
|
-
control: { type: 'text' },
|
|
17
|
-
description: 'Text of the legend',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
component: Legend,
|
|
21
|
-
title: 'Components/Legend',
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<typeof Legend>;
|
|
27
|
-
|
|
28
|
-
export const Primary: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
headline: 'Test Headline',
|
|
31
|
-
text: 'Test Text',
|
|
32
|
-
},
|
|
33
|
-
parameters: {
|
|
34
|
-
design: {
|
|
35
|
-
type: 'figma',
|
|
36
|
-
url: 'https://www.figma.com/file/Q0LB4cf1uDAOQlRv79mj2W/User-Settings?type=design&node-id=5534-27808&mode=design&t=twDm2lPGITVsLdiy-0',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
|
|
3
|
-
import { Typography } from '@goodhood-web/ui';
|
|
4
|
-
|
|
5
|
-
import styles from './Legend.module.scss';
|
|
6
|
-
import { LegendProps } from './Legend.types';
|
|
7
|
-
|
|
8
|
-
const Legend = ({ className, headline, text }: LegendProps) => (
|
|
9
|
-
<legend className={clsx(styles.legend, className)}>
|
|
10
|
-
<Typography type="h5">{headline}</Typography>
|
|
11
|
-
{text && (
|
|
12
|
-
<Typography className={styles.text} type="body-regular" as="p">
|
|
13
|
-
{text}
|
|
14
|
-
</Typography>
|
|
15
|
-
)}
|
|
16
|
-
</legend>
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default Legend;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
$color-surface: getSemanticColor('surface', 'surface');
|
|
2
|
-
$color-on-surface: getSemanticColor('surface', 'onSurface');
|
|
3
|
-
$color-on-surface-variant: getSemanticColor('surface', 'onSurfaceVariant');
|
|
4
|
-
$color-surface-container: getSemanticColor('surface', 'surfaceContainer');
|
|
5
|
-
|
|
6
|
-
$color-primary: getSemanticColor('primary', 'primary');
|
|
7
|
-
$color-on-primary-container: getSemanticColor('primary', 'onPrimaryContainer');
|
|
8
|
-
$color-primary-container: getSemanticColor('primary', 'primaryContainer');
|
|
9
|
-
|
|
10
|
-
$border-radius-sm: mapGet($tokens, borderRadius, sm);
|
|
11
|
-
|
|
12
|
-
$spacing-sm: getSpacing('sm');
|
|
13
|
-
|
|
14
|
-
.menuItem {
|
|
15
|
-
display: flex;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex-shrink: 0;
|
|
18
|
-
align-items: center;
|
|
19
|
-
padding: 0 $spacing-sm;
|
|
20
|
-
background-color: $color-surface;
|
|
21
|
-
color: $color-on-surface;
|
|
22
|
-
gap: $spacing-sm;
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
|
|
26
|
-
.highlightFrame {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex: 1;
|
|
29
|
-
align-items: center;
|
|
30
|
-
padding: $spacing-sm;
|
|
31
|
-
border-radius: $border-radius-sm;
|
|
32
|
-
gap: $spacing-sm;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.rightIcon {
|
|
36
|
-
display: inherit;
|
|
37
|
-
margin-left: auto;
|
|
38
|
-
|
|
39
|
-
svg path {
|
|
40
|
-
stroke: $color-on-surface-variant !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&--selected {
|
|
45
|
-
.highlightFrame {
|
|
46
|
-
background-color: $color-primary-container;
|
|
47
|
-
|
|
48
|
-
svg path {
|
|
49
|
-
stroke: $color-on-primary-container;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
&:hover {
|
|
53
|
-
color: $color-on-primary-container;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:not(&--selected) {
|
|
58
|
-
&:active {
|
|
59
|
-
background-color: $color-surface-container;
|
|
60
|
-
}
|
|
61
|
-
&:hover {
|
|
62
|
-
color: $color-on-surface-variant;
|
|
63
|
-
|
|
64
|
-
svg path {
|
|
65
|
-
stroke: $color-on-surface-variant;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.highlightFrame {
|
|
69
|
-
background-color: $color-surface-container;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import MenuItem from './MenuItem';
|
|
4
|
-
import { MenuItemProps } from './MenuItem.types';
|
|
5
|
-
|
|
6
|
-
describe('MenuItem Component', () => {
|
|
7
|
-
const defaultProps: MenuItemProps = {
|
|
8
|
-
labelPillText: 'Label',
|
|
9
|
-
leftIcon: null,
|
|
10
|
-
onClick: jest.fn(),
|
|
11
|
-
rightIcon: null,
|
|
12
|
-
text: 'Test Menu Item',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
it('renders with the correct props', () => {
|
|
16
|
-
render(<MenuItem {...defaultProps} />);
|
|
17
|
-
|
|
18
|
-
const textElement = screen.getByText(defaultProps.text);
|
|
19
|
-
const labelPillElement = screen.getByText(defaultProps.labelPillText);
|
|
20
|
-
|
|
21
|
-
expect(textElement).toBeInTheDocument();
|
|
22
|
-
expect(labelPillElement).toBeInTheDocument();
|
|
23
|
-
expect(textElement.textContent).toBe(defaultProps.text);
|
|
24
|
-
expect(labelPillElement.textContent).toBe(defaultProps.labelPillText);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('renders left and right icons when provided', () => {
|
|
28
|
-
const mockLeftIcon = <span>Left Icon</span>;
|
|
29
|
-
const mockRightIcon = <span>Right Icon</span>;
|
|
30
|
-
render(
|
|
31
|
-
<MenuItem {...defaultProps} leftIcon={mockLeftIcon} rightIcon={mockRightIcon} />,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
expect(screen.getByText('Left Icon')).toBeInTheDocument();
|
|
35
|
-
expect(screen.getByText('Right Icon')).toBeInTheDocument();
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('calls onClick when clicked', () => {
|
|
39
|
-
render(<MenuItem {...defaultProps} />);
|
|
40
|
-
|
|
41
|
-
const menuItem = screen.getByRole('button');
|
|
42
|
-
|
|
43
|
-
fireEvent.click(menuItem);
|
|
44
|
-
|
|
45
|
-
expect(defaultProps.onClick).toHaveBeenCalledTimes(1);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
import Icon from '../Icon/Icon';
|
|
5
|
-
import NotificationBubble from '../NotificationBubble/NotificationBubble';
|
|
6
|
-
|
|
7
|
-
import MenuItem from './MenuItem';
|
|
8
|
-
|
|
9
|
-
const meta: Meta<typeof MenuItem> = {
|
|
10
|
-
argTypes: {
|
|
11
|
-
labelPillText: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'text',
|
|
14
|
-
},
|
|
15
|
-
description: 'This will be text of the label pill',
|
|
16
|
-
},
|
|
17
|
-
leftIcon: {
|
|
18
|
-
control: false,
|
|
19
|
-
description: 'This will be left icon of the menu item',
|
|
20
|
-
},
|
|
21
|
-
onBlur: {
|
|
22
|
-
action: 'blurred',
|
|
23
|
-
description: 'On blur event callback',
|
|
24
|
-
},
|
|
25
|
-
onClick: { action: 'clicked', description: 'On click event callback' },
|
|
26
|
-
referrerPolicy: {
|
|
27
|
-
control: {
|
|
28
|
-
type: 'select',
|
|
29
|
-
},
|
|
30
|
-
defaultValue: 'no-referrer',
|
|
31
|
-
description: 'Referrer policy for the link',
|
|
32
|
-
options: ['no-referrer', 'origin', 'unsafe-url'],
|
|
33
|
-
},
|
|
34
|
-
rightIcon: {
|
|
35
|
-
control: false,
|
|
36
|
-
description: 'This will be right icon of the menu item',
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
target: {
|
|
40
|
-
control: {
|
|
41
|
-
type: 'select',
|
|
42
|
-
},
|
|
43
|
-
defaultValue: '_self',
|
|
44
|
-
description:
|
|
45
|
-
"Target attribute for the link '_blank' | '_self' | '_parent' | '_top'",
|
|
46
|
-
options: ['_blank', '_self', '_parent', '_top'],
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
text: {
|
|
50
|
-
control: {
|
|
51
|
-
type: 'text',
|
|
52
|
-
},
|
|
53
|
-
defaultValue: 'Home',
|
|
54
|
-
description: 'This will be text of the menu item',
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
to: {
|
|
58
|
-
control: {
|
|
59
|
-
type: 'text',
|
|
60
|
-
},
|
|
61
|
-
description: 'This will be the link of the menu item',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
component: MenuItem,
|
|
65
|
-
decorators: [
|
|
66
|
-
(Story) => (
|
|
67
|
-
<BrowserRouter>
|
|
68
|
-
<Story />
|
|
69
|
-
</BrowserRouter>
|
|
70
|
-
),
|
|
71
|
-
],
|
|
72
|
-
title: 'Components/MenuItem',
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export default meta;
|
|
76
|
-
|
|
77
|
-
type Story = StoryObj<typeof MenuItem>;
|
|
78
|
-
|
|
79
|
-
export const Primary: Story = {
|
|
80
|
-
args: {
|
|
81
|
-
labelPillText: 'New',
|
|
82
|
-
leftIcon: (
|
|
83
|
-
<NotificationBubble ariaLabel="Notifications">
|
|
84
|
-
<Icon name="nebenan_de" size="32" />
|
|
85
|
-
</NotificationBubble>
|
|
86
|
-
),
|
|
87
|
-
rightIcon: <Icon name="chevron_down" size="24" />,
|
|
88
|
-
text: 'Home',
|
|
89
|
-
to: '/',
|
|
90
|
-
},
|
|
91
|
-
parameters: {
|
|
92
|
-
design: {
|
|
93
|
-
type: 'figma',
|
|
94
|
-
url: 'https://www.figma.com/file/hN7xJ3rRAemUJT9T0uEfUS/Product-Design-System?type=design&node-id=3709-7139&mode=design&t=ugANsqRffu1KkyuR-0',
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
};
|