@orangesk/orange-design-system 2.0.0-beta.34 → 2.0.0-beta.35
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/README.md +3 -3
- package/build/components/BodyBanner/style.css +1 -1
- package/build/components/BodyBanner/style.css.map +1 -1
- package/build/components/Megamenu/style.css +1 -1
- package/build/components/Megamenu/style.css.map +1 -1
- package/build/components/Table/style.css +1 -1
- package/build/components/Table/style.css.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +11 -1
- package/build/components/types/src/components/Forms/TextInput/TextInput.d.ts +3 -0
- package/build/components/types/src/components/Icon/index.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +2 -0
- package/build/components/types/src/components/Megamenu/constants.d.ts +3 -0
- package/build/components/types/src/components/index.d.ts +2 -2
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.js.map +1 -1
- package/build/lib/megamenu.css +1 -1
- package/build/lib/megamenu.css.map +1 -1
- package/build/lib/megamenu.js +1 -1
- package/build/lib/megamenu.js.map +1 -1
- package/build/lib/scripts.js +1 -1
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/build/search-index.json +4 -4
- package/package.json +13 -12
- package/src/components/Accordion/tests/{Accordion.static.test.js → Accordion.static.test.jsx} +23 -23
- package/src/components/Accordion/tests/{Accordion.unit.test.js → Accordion.unit.test.jsx} +1 -1
- package/src/components/Alert/tests/{Alert.conformance.test.js → Alert.conformance.test.jsx} +1 -1
- package/src/components/Alert/tests/{Alert.test.js → Alert.test.jsx} +1 -1
- package/src/components/AnchorNavigation/tests/{AnchorNavigation.conformance.test.js → AnchorNavigation.conformance.test.jsx} +1 -1
- package/src/components/Bar/tests/{Bar.conformance.test.js → Bar.conformance.test.jsx} +1 -1
- package/src/components/BlockAction/tests/{BlockAction.conformance.test.js → BlockAction.conformance.test.jsx} +1 -1
- package/src/components/BlockAction/tests/{BlockActionControl.unit.test.js → BlockActionControl.unit.test.jsx} +2 -2
- package/src/components/BodyBanner/styles/mixins.scss +1 -5
- package/src/components/BodyBanner/tests/{BodyBanner.conformance.test.js → BodyBanner.conformance.test.jsx} +1 -1
- package/src/components/Breadcrumbs/tests/{Breadcrumbs.conformance.test.js → Breadcrumbs.conformance.test.jsx} +1 -1
- package/src/components/Button/tests/{Button.conformance.test.js → Button.conformance.test.jsx} +1 -1
- package/src/components/Button/tests/{Button.test.js → Button.test.jsx} +1 -1
- package/src/components/Buttons/tests/{Buttons.conformance.test.js → Buttons.conformance.test.jsx} +1 -1
- package/src/components/Card/tests/{Card.conformance.test.js → Card.conformance.test.jsx} +1 -1
- package/src/components/Carousel/tests/{Carousel.conformance.test.js → Carousel.conformance.test.jsx} +1 -1
- package/src/components/Carousel/tests/{Carousel.static.test.js → Carousel.static.test.jsx} +49 -42
- package/src/components/CarouselHero/tests/{CarouselHero.conformance.test.js → CarouselHero.conformance.test.jsx} +25 -9
- package/src/components/CarouselHero/tests/{CarouselHeroItem.conformance.test.js → CarouselHeroItem.conformance.test.jsx} +1 -1
- package/src/components/CarouselPromotions/tests/{CarouselPromotions.conformance.test.js → CarouselPromotions.conformance.test.jsx} +12 -3
- package/src/components/CarouselPromotions/tests/{CarouselPromotions.unit.test.js → CarouselPromotions.unit.test.jsx} +2 -3
- package/src/components/CartTable/tests/{CartTable.conformance.test.js → CartTable.conformance.test.jsx} +1 -1
- package/src/components/Container/tests/{Container.conformance.test.js → Container.conformance.test.jsx} +2 -6
- package/src/components/Container/tests/{Container.unit.test.js → Container.unit.test.jsx} +2 -2
- package/src/components/Controls/tests/{Controls.test.js → Controls.test.jsx} +12 -12
- package/src/components/Cover/tests/{Cover.conformance.test.js → Cover.conformance.test.jsx} +1 -1
- package/src/components/Divider/tests/{Divider.conformance.test.js → Divider.conformance.test.jsx} +1 -1
- package/src/components/Dropdown/tests/{Dropdown.conformance.test.js → Dropdown.conformance.test.jsx} +1 -1
- package/src/components/Expander/tests/{Expander.conformance.test.js → Expander.conformance.test.jsx} +1 -1
- package/src/components/FeatureAccordion/tests/{FeatureAccordion.conformance.test.js → FeatureAccordion.conformance.test.jsx} +1 -1
- package/src/components/Footer/tests/{Footer.conformance.test.js → Footer.conformance.test.jsx} +1 -5
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +36 -0
- package/src/components/Forms/Autocomplete/styles/style.scss +42 -0
- package/src/components/Forms/Field/tests/{Autocomplete.Field.conformance.test.js → Autocomplete.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Checkbox.Field.conformance.test.js → Checkbox.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{File.Field.conformance.test.js → File.Field.conformance.test.jsx} +2 -2
- package/src/components/Forms/Field/tests/{Group.Field.conformance.test.js → Group.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Radio.Field.conformance.test.js → Radio.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Rangeslider.Field.test.js → Rangeslider.Field.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Select.Field.conformance.test.js → Select.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Text.Field.conformance.test.js → Text.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/Field/tests/{Textarea.Field.conformance.test.js → Textarea.Field.conformance.test.jsx} +1 -1
- package/src/components/Forms/TextInput/TextInput.tsx +30 -3
- package/src/components/Forms/TextInput/styles/style.scss +62 -0
- package/src/components/Grid/tests/{GridCol.unit.test.js → GridCol.unit.test.jsx} +1 -1
- package/src/components/Hero/tests/{Hero.conformance.test.js → Hero.conformance.test.jsx} +1 -1
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Icon/tests/{Icon.conformance.test.js → Icon.conformance.test.jsx} +1 -1
- package/src/components/Icon/tests/{Icon.unit.test.js → Icon.unit.test.jsx} +1 -1
- package/src/components/Icon/tests/{Pictogram.unit.test.js → Pictogram.unit.test.jsx} +2 -20
- package/src/components/IconList/tests/{IconList.conformance.test.js → IconList.conformance.test.jsx} +2 -2
- package/src/components/IconList/tests/{IconList.unit.test.js → IconList.unit.test.jsx} +1 -1
- package/src/components/IconList/tests/{Item.unit.test.js → Item.unit.test.jsx} +1 -1
- package/src/components/Image/tests/{Image.conformance.test.js → Image.conformance.test.jsx} +1 -1
- package/src/components/Image/tests/{Image.unit.test.js → Image.unit.test.jsx} +12 -3
- package/src/components/Link/tests/{Link.conformance.test.js → Link.conformance.test.jsx} +2 -2
- package/src/components/Link/tests/{Link.unit.test.js → Link.unit.test.jsx} +5 -5
- package/src/components/List/tests/{List.conformance.test.js → List.conformance.test.jsx} +1 -1
- package/src/components/Loader/tests/{Loader.conformance.test.js → Loader.conformance.test.jsx} +1 -1
- package/src/components/Megamenu/Megamenu.static.ts +59 -8
- package/src/components/Megamenu/MegamenuSearchContent.tsx +22 -14
- package/src/components/Megamenu/constants.ts +3 -0
- package/src/components/Megamenu/styles/mixins.scss +33 -2
- package/src/components/Megamenu/styles/style.scss +4 -0
- package/src/components/Modal/tests/{Modal.conformance.test.js → Modal.conformance.test.jsx} +2 -2
- package/src/components/Pagination/tests/{Item.unit.test.js → Item.unit.test.jsx} +1 -1
- package/src/components/Pagination/tests/{Pagination.conformance.test.js → Pagination.conformance.test.jsx} +1 -1
- package/src/components/Pagination/tests/{Separator.unit.test.js → Separator.unit.test.jsx} +1 -1
- package/src/components/Pill/tests/{Pill.conformance.test.js → Pill.conformance.test.jsx} +1 -1
- package/src/components/Progress/tests/{Progress.conformance.test.js → Progress.conformance.test.jsx} +1 -1
- package/src/components/PromoBanner/tests/{PromoBanner.conformance.test.js → PromoBanner.conformance.test.jsx} +7 -7
- package/src/components/PromoBanner/tests/{PromoBanner.unit.test.js → PromoBanner.unit.test.jsx} +1 -1
- package/src/components/PromotionCard/tests/{PromotionCard.conformance.test.js → PromotionCard.conformance.test.jsx} +4 -4
- package/src/components/PromotionCard/tests/{PromotionCard.unit.test.js → PromotionCard.unit.test.jsx} +1 -1
- package/src/components/Section/tests/{Section.conformance.test.js → Section.conformance.test.jsx} +4 -4
- package/src/components/Section/tests/{Section.unit.test.js → Section.unit.test.jsx} +1 -1
- package/src/components/Skeleton/tests/{Skeleton.conformance.test.js → Skeleton.conformance.test.jsx} +1 -1
- package/src/components/SkipLink/tests/{SkipLink.unit.test.js → SkipLink.unit.test.jsx} +2 -2
- package/src/components/SocialButton/tests/{SocialButton.unit.test.js → SocialButton.unit.test.jsx} +2 -2
- package/src/components/Stepbar/tests/{Stepbar.conformance.test.js → Stepbar.conformance.test.jsx} +1 -1
- package/src/components/Sticker/tests/{Sticker.conformance.test.js → Sticker.conformance.test.jsx} +1 -1
- package/src/components/Table/styles/mixins.scss +0 -4
- package/src/components/Table/styles/style.scss +0 -4
- package/src/components/Table/tests/{Table.conformance.test.js → Table.conformance.test.jsx} +1 -1
- package/src/components/Tabs/tests/{Tabs.unit.test.js → Tabs.unit.test.jsx} +1 -1
- package/src/components/Tag/tests/{Tag.conformance.test.js → Tag.conformance.test.jsx} +1 -1
- package/src/components/Tag/tests/{Tag.unit.test.js → Tag.unit.test.jsx} +4 -4
- package/src/components/Tag/tests/{TagButton.conformance.test.js → TagButton.conformance.test.jsx} +1 -1
- package/src/components/Tag/tests/{TagButton.unit.test.js → TagButton.unit.test.jsx} +3 -2
- package/src/components/Testimonial/tests/{Testimonial.conformance.test.js → Testimonial.conformance.test.jsx} +1 -1
- package/src/components/Tile/tests/{Tile.conformance.test.js → Tile.conformance.test.jsx} +1 -1
- package/src/components/Tile/tests/{Tile.unit.test.js → Tile.unit.test.jsx} +2 -2
- package/src/components/Tooltip/tests/{Tooltip.conformance.test.js → Tooltip.conformance.test.jsx} +1 -1
- package/src/components/Tooltip/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +9 -5
- package/src/components/index.ts +3 -1
- /package/src/components/AnchorNavigation/tests/{AnchorNavigation.unit.test.js → AnchorNavigation.unit.test.jsx} +0 -0
- /package/src/components/Bar/tests/{Bar.unit.test.js → Bar.unit.test.jsx} +0 -0
- /package/src/components/Bar/tests/{BarBreak.unit.test.js → BarBreak.unit.test.jsx} +0 -0
- /package/src/components/Bar/tests/{BarItem.unit.test.js → BarItem.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{BlockAction.unit.test.js → BlockAction.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{BlockActionIndicator.unit.test.js → BlockActionIndicator.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{CloneElementWithClassName.unit.test.js → CloneElementWithClassName.unit.test.jsx} +0 -0
- /package/src/components/BodyBanner/tests/{BodyBanner.unit.test.js → BodyBanner.unit.test.jsx} +0 -0
- /package/src/components/Breadcrumbs/tests/{BreadcrumbItem.unit.test.js → BreadcrumbItem.unit.test.jsx} +0 -0
- /package/src/components/Breadcrumbs/tests/{Breadcrumbs.integration.test.js → Breadcrumbs.integration.test.jsx} +0 -0
- /package/src/components/Breadcrumbs/tests/{Breadcrumbs.unit.test.js → Breadcrumbs.unit.test.jsx} +0 -0
- /package/src/components/Button/tests/{IconButton.unit.test.js → IconButton.unit.test.jsx} +0 -0
- /package/src/components/Buttons/tests/{Buttons.unit.test.js → Buttons.unit.test.jsx} +0 -0
- /package/src/components/Card/tests/{Card.unit.test.js → Card.unit.test.jsx} +0 -0
- /package/src/components/Card/tests/{CardProductHeader.unit.test.js → CardProductHeader.unit.test.jsx} +0 -0
- /package/src/components/Card/tests/{CardSection.unit.test.js → CardSection.unit.test.jsx} +0 -0
- /package/src/components/Carousel/tests/{Carousel.unit.test.js → Carousel.unit.test.jsx} +0 -0
- /package/src/components/Carousel/tests/{CarouselItem.unit.test.js → CarouselItem.unit.test.jsx} +0 -0
- /package/src/components/CarouselHero/tests/{CarouselHero.unit.test.js → CarouselHero.unit.test.jsx} +0 -0
- /package/src/components/CarouselHero/tests/{CarouselHeroItem.unit.test.js → CarouselHeroItem.unit.test.jsx} +0 -0
- /package/src/components/CarouselPromotions/tests/{CarouselPromotionsItem.unit.test.js → CarouselPromotionsItem.unit.test.jsx} +0 -0
- /package/src/components/Cover/tests/{Cover.unit.test.js → Cover.unit.test.jsx} +0 -0
- /package/src/components/Divider/tests/{Divider.unit.test.js → Divider.unit.test.jsx} +0 -0
- /package/src/components/Dropdown/tests/{Dropdown.unit.test.js → Dropdown.unit.test.jsx} +0 -0
- /package/src/components/Expander/tests/{Expander.unit.test.js → Expander.unit.test.jsx} +0 -0
- /package/src/components/FeatureAccordion/tests/{FeatureAccordion.unit.test.js → FeatureAccordion.unit.test.jsx} +0 -0
- /package/src/components/Footer/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +0 -0
- /package/src/components/Forms/Checkbox/tests/{Checkbox.unit.test.js → Checkbox.unit.test.jsx} +0 -0
- /package/src/components/Forms/DatePicker/tests/{DatePicker.unit.test.js → DatePicker.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Field.unit.test.js → Field.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Messages.unit.test.js → Messages.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +0 -0
- /package/src/components/Forms/Fieldset/tests/{Fieldset.unit.test.js → Fieldset.unit.test.jsx} +0 -0
- /package/src/components/Forms/Group/tests/{Group.unit.test.js → Group.unit.test.jsx} +0 -0
- /package/src/components/Forms/Group/tests/{Item.unit.test.js → Item.unit.test.jsx} +0 -0
- /package/src/components/Forms/Hint/tests/{Hint.unit.test.js → Hint.unit.test.jsx} +0 -0
- /package/src/components/Forms/InputStepper/tests/{InputStepper.unit.test.js → InputStepper.unit.test.jsx} +0 -0
- /package/src/components/Forms/Label/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
- /package/src/components/Forms/Message/tests/{Message.unit.test.js → Message.unit.test.jsx} +0 -0
- /package/src/components/Forms/Radio/tests/{Radio.unit.test.js → Radio.unit.test.jsx} +0 -0
- /package/src/components/Forms/Select/tests/{Select.unit.test.js → Select.unit.test.jsx} +0 -0
- /package/src/components/Forms/TextArea/tests/{TextArea.unit.test.js → TextArea.unit.test.jsx} +0 -0
- /package/src/components/Forms/TextInput/tests/{TextInput.unit.test.js → TextInput.unit.test.jsx} +0 -0
- /package/src/components/Gauge/tests/{Gauge.conformance.test.js → Gauge.conformance.test.jsx} +0 -0
- /package/src/components/Gauge/tests/{Gauge.unit.test.js → Gauge.unit.test.jsx} +0 -0
- /package/src/components/Grid/tests/{Grid.unit.test.js → Grid.unit.test.jsx} +0 -0
- /package/src/components/Hero/tests/{Hero.unit.test.js → Hero.unit.test.jsx} +0 -0
- /package/src/components/List/tests/{ClickableControl.unit.test.js → ClickableControl.unit.test.jsx} +0 -0
- /package/src/components/List/tests/{List.unit.test.js → List.unit.test.jsx} +0 -0
- /package/src/components/List/tests/{ListItem.unit.test.js → ListItem.unit.test.jsx} +0 -0
- /package/src/components/Loader/tests/{Loader.unit.test.js → Loader.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{Modal.unit.test.js → Modal.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{ModalBody.unit.test.js → ModalBody.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{ModalCloseButton.unit.test.js → ModalCloseButton.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{ModalProductHeader.unit.test.js → ModalProductHeader.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{ModalTitle.unit.test.js → ModalTitle.unit.test.jsx} +0 -0
- /package/src/components/Pagination/tests/{Pagination.unit.test.js → Pagination.unit.test.jsx} +0 -0
- /package/src/components/Pill/tests/{Pill.unit.test.js → Pill.unit.test.jsx} +0 -0
- /package/src/components/Progress/tests/{Progress.unit.test.js → Progress.unit.test.jsx} +0 -0
- /package/src/components/Skeleton/tests/{Skeleton.unit.test.js → Skeleton.unit.test.jsx} +0 -0
- /package/src/components/Stepbar/tests/{Stepbar.unit.test.js → Stepbar.unit.test.jsx} +0 -0
- /package/src/components/Sticker/tests/{Sticker.unit.test.js → Sticker.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Cell.unit.test.js → Cell.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Header.unit.test.js → Header.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Row.unit.test.js → Row.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Rows.unit.test.js → Rows.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Table.unit.test.js → Table.unit.test.jsx} +0 -0
- /package/src/components/Tabs/tests/{Tab.unit.test.js → Tab.unit.test.jsx} +0 -0
- /package/src/components/Tabs/tests/{TabPanel.unit.test.js → TabPanel.unit.test.jsx} +0 -0
- /package/src/components/Testimonial/tests/{Testimonial.unit.test.js → Testimonial.unit.test.jsx} +0 -0
- /package/src/components/Tooltip/tests/{InfoTooltip.unit.test.js → InfoTooltip.unit.test.jsx} +0 -0
|
@@ -2,12 +2,14 @@ import cx from "classnames";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
CLASS_INPUT,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
CLASS_INPUT_WRAPPER,
|
|
6
|
+
CLASS_INPUT_WRAPPER_SEARCH_RESPONSIVE,
|
|
7
|
+
CLASS_INPUT_WRAPPER_SEARCH_ICON_WITH_PLACEHOLDER,
|
|
7
8
|
CLASS_LIST_INLINE,
|
|
8
9
|
CLASS_SUBNAV,
|
|
9
10
|
CLASS_SUBNAV_ITEM,
|
|
10
11
|
CLASS_TAG,
|
|
12
|
+
CLASS_CAPTION,
|
|
11
13
|
} from "./constants";
|
|
12
14
|
import { searchResultItems, searchTerms } from "./data";
|
|
13
15
|
|
|
@@ -34,22 +36,26 @@ export const MegamenuSearchContent = ({
|
|
|
34
36
|
{inputLabel}
|
|
35
37
|
</label>
|
|
36
38
|
|
|
37
|
-
<
|
|
39
|
+
<span
|
|
38
40
|
className={cx(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
CLASS_INPUT_WRAPPER,
|
|
42
|
+
CLASS_INPUT_WRAPPER_SEARCH_RESPONSIVE,
|
|
43
|
+
CLASS_INPUT_WRAPPER_SEARCH_ICON_WITH_PLACEHOLDER,
|
|
42
44
|
)}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
>
|
|
46
|
+
<input
|
|
47
|
+
className={CLASS_INPUT}
|
|
48
|
+
id={inputId}
|
|
49
|
+
type="text"
|
|
50
|
+
placeholder="Hľadať"
|
|
51
|
+
name="search"
|
|
52
|
+
defaultValue={searchValue}
|
|
53
|
+
/>
|
|
54
|
+
</span>
|
|
49
55
|
|
|
50
56
|
{hasSearchEmpty ? (
|
|
51
57
|
<>
|
|
52
|
-
<p>Najhľadanejši výrazy</p>
|
|
58
|
+
<p className={CLASS_CAPTION}>Najhľadanejši výrazy</p>
|
|
53
59
|
<ul className={CLASS_LIST_INLINE}>
|
|
54
60
|
{searchTerms.map((item) => (
|
|
55
61
|
<li key={item}>
|
|
@@ -64,7 +70,9 @@ export const MegamenuSearchContent = ({
|
|
|
64
70
|
<ul className={CLASS_SUBNAV}>
|
|
65
71
|
{searchResultItems.map((item) => (
|
|
66
72
|
<li key={item} className={CLASS_SUBNAV_ITEM}>
|
|
67
|
-
<a href="#">
|
|
73
|
+
<a href="#" className="no-underline">
|
|
74
|
+
{item}
|
|
75
|
+
</a>
|
|
68
76
|
</li>
|
|
69
77
|
))}
|
|
70
78
|
</ul>
|
|
@@ -60,6 +60,9 @@ export const CLASS_ACCORDION_ICON = `${CLASS_ROOT}__accordion-icon`;
|
|
|
60
60
|
export const CLASS_ACCORDION_BODY = `${CLASS_ROOT}__accordion-body`;
|
|
61
61
|
|
|
62
62
|
export const CLASS_INPUT = `${CLASS_ROOT}__input`;
|
|
63
|
+
export const CLASS_INPUT_WRAPPER = `${CLASS_ROOT}__input-wrapper`;
|
|
64
|
+
export const CLASS_INPUT_WRAPPER_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input-wrapper--search-icon-with-placeholder`;
|
|
65
|
+
export const CLASS_INPUT_WRAPPER_SEARCH_RESPONSIVE = `${CLASS_ROOT}__input-wrapper--search-responsive`;
|
|
63
66
|
export const CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input--search-icon-with-placeholder`;
|
|
64
67
|
export const CLASS_INPUT_SEARCH_RESPONSIVE = `${CLASS_ROOT}__input--search-responsive`;
|
|
65
68
|
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
margin-top: 0 !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.no-underline {
|
|
40
|
+
text-decoration: none !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
ul {
|
|
40
44
|
@include typography.list-unstyled();
|
|
41
45
|
margin-bottom: convert.to-rem(30px);
|
|
@@ -458,7 +462,7 @@
|
|
|
458
462
|
@mixin subnav-item {
|
|
459
463
|
display: flex;
|
|
460
464
|
gap: convert.to-rem(10px);
|
|
461
|
-
margin-bottom: convert.to-rem(
|
|
465
|
+
margin-bottom: convert.to-rem(10px) !important;
|
|
462
466
|
|
|
463
467
|
&:last-child {
|
|
464
468
|
margin-bottom: 0 !important;
|
|
@@ -876,9 +880,36 @@
|
|
|
876
880
|
@include input.width($width);
|
|
877
881
|
}
|
|
878
882
|
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
@mixin input-wrapper {
|
|
886
|
+
position: relative;
|
|
887
|
+
display: inline-block;
|
|
888
|
+
width: 100%;
|
|
889
|
+
margin-bottom: convert.to-rem(30px);
|
|
879
890
|
|
|
880
891
|
&--search-icon-with-placeholder {
|
|
881
|
-
|
|
892
|
+
isolation: isolate;
|
|
893
|
+
|
|
894
|
+
&::before {
|
|
895
|
+
content: "";
|
|
896
|
+
position: absolute;
|
|
897
|
+
top: 50%;
|
|
898
|
+
left: convert.to-rem(8px);
|
|
899
|
+
width: convert.to-rem(20px);
|
|
900
|
+
height: convert.to-rem(20px);
|
|
901
|
+
transform: translateY(-50%);
|
|
902
|
+
background-image: inputConfig.$background-image-search-icon;
|
|
903
|
+
background-repeat: no-repeat;
|
|
904
|
+
pointer-events: none;
|
|
905
|
+
z-index: 2;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
#{config.$class-root}__input {
|
|
909
|
+
background-image: none !important;
|
|
910
|
+
padding-left: convert.to-rem(40px);
|
|
911
|
+
margin-bottom: 0;
|
|
912
|
+
}
|
|
882
913
|
}
|
|
883
914
|
|
|
884
915
|
&--search-responsive {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, fireEvent } from "@testing-library/react";
|
|
3
|
-
import { axe } from
|
|
3
|
+
import { axe } from 'vitest-axe';
|
|
4
4
|
|
|
5
5
|
import { Button } from "../../Button";
|
|
6
6
|
import { Modal, ModalProductHeader } from "../";
|
|
@@ -40,7 +40,7 @@ it("is valid html", () => {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it("is accessible", async () => {
|
|
43
|
-
window.scrollTo =
|
|
43
|
+
window.scrollTo = vi.fn();
|
|
44
44
|
const { container } = render(example);
|
|
45
45
|
|
|
46
46
|
fireEvent.click(container.querySelector('[data-test-id="open-button"]'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
|
-
import { axe } from
|
|
3
|
+
import { axe } from 'vitest-axe';
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
6
|
import { PromoBanner } from "../";
|
|
@@ -18,7 +18,7 @@ import { PromoBanner } from "../";
|
|
|
18
18
|
* - Image element validation
|
|
19
19
|
*
|
|
20
20
|
* ♿ ACCESSIBILITY (A11y)
|
|
21
|
-
* - WCAG 2.1 compliance
|
|
21
|
+
* - WCAG 2.1 compliance checks
|
|
22
22
|
* - Proper use of semantic HTML elements
|
|
23
23
|
* - Image alt attributes
|
|
24
24
|
* - Interactive elements (buttons, links)
|
|
@@ -621,7 +621,7 @@ describe("PromoBanner Component Conformance Tests", () => {
|
|
|
621
621
|
describe("Integration Tests", () => {
|
|
622
622
|
it("works with interactive elements", async () => {
|
|
623
623
|
const user = userEvent.setup();
|
|
624
|
-
const handleClick =
|
|
624
|
+
const handleClick = vi.fn();
|
|
625
625
|
|
|
626
626
|
render(
|
|
627
627
|
<PromoBanner>
|
|
@@ -639,7 +639,7 @@ describe("PromoBanner Component Conformance Tests", () => {
|
|
|
639
639
|
|
|
640
640
|
it("handles form submission within banner", async () => {
|
|
641
641
|
const user = userEvent.setup();
|
|
642
|
-
const handleSubmit =
|
|
642
|
+
const handleSubmit = vi.fn((e) => e.preventDefault());
|
|
643
643
|
|
|
644
644
|
render(
|
|
645
645
|
<PromoBanner>
|
|
@@ -688,7 +688,7 @@ describe("PromoBanner Component Conformance Tests", () => {
|
|
|
688
688
|
|
|
689
689
|
it("works with keyboard navigation", async () => {
|
|
690
690
|
const user = userEvent.setup();
|
|
691
|
-
const handleClick =
|
|
691
|
+
const handleClick = vi.fn();
|
|
692
692
|
|
|
693
693
|
render(
|
|
694
694
|
<PromoBanner>
|
|
@@ -725,8 +725,8 @@ describe("PromoBanner Component Conformance Tests", () => {
|
|
|
725
725
|
|
|
726
726
|
it("handles event propagation correctly", async () => {
|
|
727
727
|
const user = userEvent.setup();
|
|
728
|
-
const bannerClick =
|
|
729
|
-
const buttonClick =
|
|
728
|
+
const bannerClick = vi.fn();
|
|
729
|
+
const buttonClick = vi.fn((e) => e.stopPropagation());
|
|
730
730
|
|
|
731
731
|
render(
|
|
732
732
|
<PromoBanner onClick={bannerClick}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
|
-
import { axe } from
|
|
3
|
+
import { axe } from 'vitest-axe';
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
6
|
import { PromotionCard } from "../";
|
|
@@ -17,7 +17,7 @@ import { PromotionCard } from "../";
|
|
|
17
17
|
* - Card wrapper structure
|
|
18
18
|
*
|
|
19
19
|
* ♿ ACCESSIBILITY (A11y)
|
|
20
|
-
* - WCAG 2.1 compliance
|
|
20
|
+
* - WCAG 2.1 compliance checks
|
|
21
21
|
* - Proper use of semantic HTML elements
|
|
22
22
|
* - ARIA attributes and their validity
|
|
23
23
|
* - Interactive elements (buttons, links)
|
|
@@ -455,7 +455,7 @@ describe("PromotionCard Component Conformance Tests", () => {
|
|
|
455
455
|
describe("Integration Tests", () => {
|
|
456
456
|
it("works with interactive elements", async () => {
|
|
457
457
|
const user = userEvent.setup();
|
|
458
|
-
const handleClick =
|
|
458
|
+
const handleClick = vi.fn();
|
|
459
459
|
|
|
460
460
|
render(
|
|
461
461
|
<PromotionCard>
|
|
@@ -518,7 +518,7 @@ describe("PromotionCard Component Conformance Tests", () => {
|
|
|
518
518
|
|
|
519
519
|
it("works with Card integration for complex interactions", async () => {
|
|
520
520
|
const user = userEvent.setup();
|
|
521
|
-
const handleSubmit =
|
|
521
|
+
const handleSubmit = vi.fn((e) => e.preventDefault());
|
|
522
522
|
|
|
523
523
|
render(
|
|
524
524
|
<PromotionCard color="background-contrast">
|
|
@@ -338,7 +338,7 @@ describe("PromotionCard Component Unit Tests", () => {
|
|
|
338
338
|
});
|
|
339
339
|
|
|
340
340
|
it("passes through event handlers", () => {
|
|
341
|
-
const handleClick =
|
|
341
|
+
const handleClick = vi.fn();
|
|
342
342
|
const { getByTestId } = render(
|
|
343
343
|
<PromotionCard
|
|
344
344
|
data-testid="test-promotion-card"
|
package/src/components/Section/tests/{Section.conformance.test.js → Section.conformance.test.jsx}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
|
-
import { axe } from
|
|
3
|
+
import { axe } from 'vitest-axe';
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
6
|
import { Section } from "../";
|
|
@@ -17,7 +17,7 @@ import { Section } from "../";
|
|
|
17
17
|
* - Container wrapper structure
|
|
18
18
|
*
|
|
19
19
|
* ♿ ACCESSIBILITY (A11y)
|
|
20
|
-
* - WCAG 2.1 compliance
|
|
20
|
+
* - WCAG 2.1 compliance checks
|
|
21
21
|
* - Proper use of semantic HTML tags
|
|
22
22
|
* - ARIA attributes and their validity
|
|
23
23
|
* - Interactive elements (buttons, inputs, selects)
|
|
@@ -450,7 +450,7 @@ describe("Section Conformance Tests", () => {
|
|
|
450
450
|
|
|
451
451
|
it("works with interactive components", async () => {
|
|
452
452
|
const user = userEvent.setup();
|
|
453
|
-
const handleClick =
|
|
453
|
+
const handleClick = vi.fn();
|
|
454
454
|
|
|
455
455
|
render(
|
|
456
456
|
<Section>
|
|
@@ -487,7 +487,7 @@ describe("Section Conformance Tests", () => {
|
|
|
487
487
|
|
|
488
488
|
it("works with Container wrapper for complex interactions", async () => {
|
|
489
489
|
const user = userEvent.setup();
|
|
490
|
-
const handleSubmit =
|
|
490
|
+
const handleSubmit = vi.fn((e) => {
|
|
491
491
|
e.preventDefault();
|
|
492
492
|
});
|
|
493
493
|
|
|
@@ -618,7 +618,7 @@ describe("Section Component Unit Tests", () => {
|
|
|
618
618
|
});
|
|
619
619
|
|
|
620
620
|
it("passes through event handlers", () => {
|
|
621
|
-
const handleClick =
|
|
621
|
+
const handleClick = vi.fn();
|
|
622
622
|
const { getByTestId } = render(
|
|
623
623
|
<Section data-testid="test-section" onClick={handleClick} />,
|
|
624
624
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
3
|
*/
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { render, screen } from "@testing-library/react";
|
|
@@ -76,7 +76,7 @@ describe("keyboard navigation", () => {
|
|
|
76
76
|
expect(screen.getByTestId("skip-link")).toHaveFocus();
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
it.
|
|
79
|
+
it.fails("focuses main on click", async () => {
|
|
80
80
|
render(<TestBase />);
|
|
81
81
|
|
|
82
82
|
const { tab, keyboard } = userEvent.setup();
|
package/src/components/SocialButton/tests/{SocialButton.unit.test.js → SocialButton.unit.test.jsx}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import React from "react";
|
|
@@ -64,7 +64,7 @@ describe("rendering SocialButton", () => {
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
it("passes onClick handler", () => {
|
|
67
|
-
const onClick =
|
|
67
|
+
const onClick = vi.fn();
|
|
68
68
|
const { getByRole } = render(<SocialButton name="x" onClick={onClick} />);
|
|
69
69
|
getByRole("button").click();
|
|
70
70
|
expect(onClick).toHaveBeenCalled();
|
|
@@ -181,7 +181,7 @@ describe("rendering Tabs", () => {
|
|
|
181
181
|
tabs = screen.getAllByRole("tab");
|
|
182
182
|
});
|
|
183
183
|
beforeAll(() => {
|
|
184
|
-
window.document.getSelection =
|
|
184
|
+
window.document.getSelection = vi.fn();
|
|
185
185
|
});
|
|
186
186
|
it('"ArrowLeft" moves focus left and loops from first to last item', async () => {
|
|
187
187
|
expect.assertions(3);
|
|
@@ -58,7 +58,7 @@ describe("rendering", () => {
|
|
|
58
58
|
describe("interactive functionality", () => {
|
|
59
59
|
describe("onClick prop", () => {
|
|
60
60
|
it("renders as button when onClick is provided", () => {
|
|
61
|
-
const handleClick =
|
|
61
|
+
const handleClick = vi.fn();
|
|
62
62
|
const { getByRole } = render(
|
|
63
63
|
<Tag onClick={handleClick}>Clickable Tag</Tag>,
|
|
64
64
|
);
|
|
@@ -67,7 +67,7 @@ describe("rendering", () => {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
it("calls onClick when clicked", () => {
|
|
70
|
-
const handleClick =
|
|
70
|
+
const handleClick = vi.fn();
|
|
71
71
|
const { getByRole } = render(
|
|
72
72
|
<Tag onClick={handleClick}>Clickable Tag</Tag>,
|
|
73
73
|
);
|
|
@@ -76,7 +76,7 @@ describe("rendering", () => {
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
it("does not call onClick when disabled", () => {
|
|
79
|
-
const handleClick =
|
|
79
|
+
const handleClick = vi.fn();
|
|
80
80
|
const { getByRole } = render(
|
|
81
81
|
<Tag onClick={handleClick} isDisabled>
|
|
82
82
|
Disabled Clickable Tag
|
|
@@ -87,7 +87,7 @@ describe("rendering", () => {
|
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
it("has button type set to 'button'", () => {
|
|
90
|
-
const handleClick =
|
|
90
|
+
const handleClick = vi.fn();
|
|
91
91
|
const { getByRole } = render(
|
|
92
92
|
<Tag onClick={handleClick}>Clickable Tag</Tag>,
|
|
93
93
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { render, fireEvent } from "@testing-library/react";
|
|
2
3
|
|
|
3
4
|
import { TagButton } from "../TagButton";
|
|
@@ -61,7 +62,7 @@ describe("TagButton", () => {
|
|
|
61
62
|
|
|
62
63
|
describe("interaction", () => {
|
|
63
64
|
it("calls onClick when clicked", () => {
|
|
64
|
-
const handleClick =
|
|
65
|
+
const handleClick = vi.fn();
|
|
65
66
|
const { getByRole } = render(
|
|
66
67
|
<TagButton iconName="close" ariaLabel="Close" onClick={handleClick} />,
|
|
67
68
|
);
|
|
@@ -71,7 +72,7 @@ describe("TagButton", () => {
|
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
it("does not call onClick when disabled", () => {
|
|
74
|
-
const handleClick =
|
|
75
|
+
const handleClick = vi.fn();
|
|
75
76
|
const { getByRole } = render(
|
|
76
77
|
<TagButton
|
|
77
78
|
iconName="close"
|
|
@@ -60,8 +60,8 @@ describe("rendering Tile", () => {
|
|
|
60
60
|
backgroundImage={{ src: "./test.png", alt: "test" }}
|
|
61
61
|
/>,
|
|
62
62
|
);
|
|
63
|
-
expect(container.querySelector("img").src).toBe(
|
|
64
|
-
"
|
|
63
|
+
expect(new URL(container.querySelector("img").src).pathname).toBe(
|
|
64
|
+
"/test.png",
|
|
65
65
|
);
|
|
66
66
|
});
|
|
67
67
|
it("background image has alt set to backgroundImage.alt", () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { render, fireEvent } from "@testing-library/react";
|
|
1
|
+
import { render, fireEvent, waitFor } from "@testing-library/react";
|
|
2
2
|
|
|
3
3
|
import { Tooltip } from "../Tooltip";
|
|
4
4
|
|
|
@@ -281,17 +281,21 @@ describe("rendering Tooltip", () => {
|
|
|
281
281
|
fireEvent.mouseLeave(container.querySelector("button"));
|
|
282
282
|
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
283
283
|
});
|
|
284
|
-
it("
|
|
284
|
+
it("keeps hidden attribute unset after mouse leaves button", async () => {
|
|
285
285
|
const { getByTestId, container } = tooltip;
|
|
286
286
|
fireEvent.mouseEnter(container.querySelector("button"));
|
|
287
287
|
fireEvent.mouseLeave(container.querySelector("button"));
|
|
288
|
-
|
|
288
|
+
await waitFor(() => {
|
|
289
|
+
expect(getByTestId("test-id").hidden).toBe(false);
|
|
290
|
+
});
|
|
289
291
|
});
|
|
290
|
-
it("
|
|
292
|
+
it("keeps hidden attribute unset after button blur", async () => {
|
|
291
293
|
const { getByTestId, container } = tooltip;
|
|
292
294
|
fireEvent.focus(container.querySelector("button"));
|
|
293
295
|
fireEvent.blur(container.querySelector("button"));
|
|
294
|
-
|
|
296
|
+
await waitFor(() => {
|
|
297
|
+
expect(getByTestId("test-id").hidden).toBe(false);
|
|
298
|
+
});
|
|
295
299
|
});
|
|
296
300
|
});
|
|
297
301
|
});
|
package/src/components/index.ts
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import { Expander } from "./Expander/Expander";
|
|
36
36
|
import { FeatureAccordion, FeatureAccordionItem } from "./FeatureAccordion";
|
|
37
37
|
import { Card, CardSection, CardProductHeader } from "./Card";
|
|
38
|
-
import { Icon, Pictogram } from "./Icon";
|
|
38
|
+
import { Icon, Pictogram, SpritePathContext, SpritePathProvider } from "./Icon";
|
|
39
39
|
import { Gauge } from "./Gauge";
|
|
40
40
|
import { Grid, GridCol } from "./Grid";
|
|
41
41
|
import { Image } from "./Image";
|
|
@@ -166,6 +166,8 @@ export {
|
|
|
166
166
|
ModalTitle,
|
|
167
167
|
Pagination,
|
|
168
168
|
Pictogram,
|
|
169
|
+
SpritePathContext,
|
|
170
|
+
SpritePathProvider,
|
|
169
171
|
Pill,
|
|
170
172
|
Progress,
|
|
171
173
|
PromoBanner,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/BlockAction/tests/{BlockAction.unit.test.js → BlockAction.unit.test.jsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/BodyBanner/tests/{BodyBanner.unit.test.js → BodyBanner.unit.test.jsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|