@orangesk/orange-design-system 2.0.1 → 2.2.0
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 +4 -2
- package/build/components/Accordion/style.css +1 -1
- package/build/components/Accordion/style.css.map +1 -1
- package/build/components/BlockAction/style.css +1 -1
- package/build/components/BlockAction/style.css.map +1 -1
- package/build/components/Card/style.css +1 -1
- package/build/components/Card/style.css.map +1 -1
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Carousel/style.css.map +1 -1
- package/build/components/CarouselHero/style.css +1 -1
- package/build/components/CarouselHero/style.css.map +1 -1
- package/build/components/CarouselPromotions/style.css +1 -1
- package/build/components/CarouselPromotions/style.css.map +1 -1
- package/build/components/Dropdown/style.css +1 -1
- package/build/components/Dropdown/style.css.map +1 -1
- package/build/components/FeatureAccordion/style.css +1 -1
- package/build/components/FeatureAccordion/style.css.map +1 -1
- package/build/components/Footer/style.css +1 -1
- package/build/components/Footer/style.css.map +1 -1
- package/build/components/Icon/style.css +1 -1
- package/build/components/Icon/style.css.map +1 -1
- package/build/components/Link/style.css +1 -1
- package/build/components/Link/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/Tile/style.css +1 -1
- package/build/components/Tile/style.css.map +1 -1
- package/build/components/Tooltip/style.css +1 -1
- package/build/components/Tooltip/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 +3 -3
- package/build/components/types/src/components/Card/CardSection.d.ts +2 -2
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +1 -1
- package/build/images/card-device-example.png +0 -0
- package/build/lib/base.css +1 -1
- package/build/lib/base.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.css +1 -1
- package/build/lib/footer.css.map +1 -1
- package/build/lib/footer.js +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 +6 -6
- package/build/sprite.svg +1 -1
- package/package.json +22 -22
- package/src/assets/icons/pictogram-communication--dark.svg +4 -0
- package/src/assets/icons/pictogram-communication.svg +4 -0
- package/src/assets/icons/pictogram-coverage--dark.svg +5 -0
- package/src/assets/icons/pictogram-coverage.svg +5 -0
- package/src/assets/icons/pictogram-credit--dark.svg +7 -0
- package/src/assets/icons/pictogram-credit.svg +6 -0
- package/src/assets/icons/pictogram-modem--dark.svg +9 -0
- package/src/assets/icons/pictogram-modem.svg +9 -0
- package/src/assets/icons/pictogram-speed--dark.svg +7 -0
- package/src/assets/icons/pictogram-speed.svg +7 -0
- package/src/assets/icons/pictogram-sunset--dark.svg +10 -0
- package/src/assets/icons/pictogram-sunset.svg +10 -0
- package/src/assets/icons/pictogram-wallet--dark.svg +6 -0
- package/src/assets/icons/pictogram-wallet.svg +6 -0
- package/src/components/BlockAction/styles/mixins.scss +1 -1
- package/src/components/BlockAction/styles/style.scss +1 -1
- package/src/components/BlockAction/tests/BlockAction.styles.unit.test.jsx +18 -0
- package/src/components/Button/IconButton.tsx +3 -1
- package/src/components/Button/tests/IconButton.unit.test.jsx +6 -2
- package/src/components/Card/CardSection.tsx +3 -2
- package/src/components/Card/styles/mixins.scss +2 -0
- package/src/components/Card/styles/style.scss +8 -0
- package/src/components/Card/tests/CardSection.unit.test.jsx +12 -0
- package/src/components/Carousel/Carousel.static.ts +2 -2
- package/src/components/Carousel/Carousel.tsx +6 -3
- package/src/components/Carousel/tests/Carousel.static.test.jsx +7 -4
- package/src/components/CarouselHero/styles/mixins.scss +1 -1
- package/src/components/CarouselPromotions/styles/mixins.scss +2 -2
- package/src/components/FeatureAccordion/styles/mixins.scss +3 -3
- package/src/components/Forms/Autocomplete/Autocomplete.tsx +8 -0
- package/src/components/Forms/Autocomplete/tests/Autocomplete.unit.test.jsx +48 -0
- package/src/components/Forms/File/styles/style.scss +1 -1
- package/src/components/Forms/styles/mixins.scss +1 -1
- package/src/components/Icon/styles/mixins.scss +4 -4
- package/src/components/Link/styles/style.scss +4 -1
- package/src/components/PromoBanner/PromoBanner.tsx +2 -1
- package/src/components/Tile/styles/mixins.scss +25 -7
- package/src/components/Tile/styles/style.scss +5 -1
- package/src/styles/tokens/base.scss +0 -16
- package/src/styles/typography/mixins.scss +10 -1
- package/src/components/Card/CHANGELOG.md +0 -19
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
2
|
+
|
|
3
|
+
import { Autocomplete } from "../Autocomplete";
|
|
4
|
+
|
|
5
|
+
describe("rendering Autocomplete", () => {
|
|
6
|
+
it("serializes autocompleteConfig to data-autocomplete-config for SSR output", () => {
|
|
7
|
+
const { container } = render(
|
|
8
|
+
<Autocomplete
|
|
9
|
+
id="search-autocomplete"
|
|
10
|
+
options={["", "apple", "apricot"]}
|
|
11
|
+
placeholder=""
|
|
12
|
+
autocompleteConfig={{
|
|
13
|
+
customInputClassName: "input--search-icon",
|
|
14
|
+
}}
|
|
15
|
+
/>,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const select = container.querySelector("select");
|
|
19
|
+
|
|
20
|
+
expect(select).toHaveAttribute(
|
|
21
|
+
"data-autocomplete-config",
|
|
22
|
+
JSON.stringify({
|
|
23
|
+
customInputClassName: "input--search-icon",
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("keeps explicit data-autocomplete-config attribute when provided", () => {
|
|
29
|
+
const { container } = render(
|
|
30
|
+
<Autocomplete
|
|
31
|
+
id="search-autocomplete"
|
|
32
|
+
options={["", "apple", "apricot"]}
|
|
33
|
+
placeholder=""
|
|
34
|
+
autocompleteConfig={{
|
|
35
|
+
customInputClassName: "input--search-icon",
|
|
36
|
+
}}
|
|
37
|
+
data-autocomplete-config='{"customInputClassName":"input--search-icon-with-placeholder"}'
|
|
38
|
+
/>,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const select = container.querySelector("select");
|
|
42
|
+
|
|
43
|
+
expect(select).toHaveAttribute(
|
|
44
|
+
"data-autocomplete-config",
|
|
45
|
+
'{"customInputClassName":"input--search-icon-with-placeholder"}',
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
@use "../../../styles/tools/generate";
|
|
4
4
|
|
|
5
5
|
@mixin base() {
|
|
6
|
+
--icon-size: 1em;
|
|
6
7
|
fill: currentColor;
|
|
7
|
-
width:
|
|
8
|
-
height:
|
|
8
|
+
width: var(--icon-size);
|
|
9
|
+
height: var(--icon-size);
|
|
9
10
|
vertical-align: text-bottom;
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -14,8 +15,7 @@
|
|
|
14
15
|
@include breakpoint.get($breakpoint) {
|
|
15
16
|
@each $variant, $size in $props {
|
|
16
17
|
&#{generate.variant-name($variant)} {
|
|
17
|
-
|
|
18
|
-
height: $size;
|
|
18
|
+
--icon-size: #{$size};
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
color: var(--color-text-accent);
|
|
28
28
|
text-decoration: underline;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
&.text-accent:hover {
|
|
31
|
+
color: var(--color-text-default) !important;
|
|
32
|
+
}
|
|
33
|
+
&:focus-visible {
|
|
31
34
|
outline: 2px solid var(--color-border-contrast);
|
|
32
35
|
outline-offset: 2px;
|
|
33
36
|
}
|
|
@@ -33,6 +33,7 @@ export const PromoBanner = ({
|
|
|
33
33
|
imageClassName,
|
|
34
34
|
variant,
|
|
35
35
|
imageFullWidth,
|
|
36
|
+
...other
|
|
36
37
|
}: PromoBannerProps) => {
|
|
37
38
|
const classes = cx(CLASS_ROOT, className, {
|
|
38
39
|
[`${CLASS_ROOT}--flush-top-sm-down`]: flushTopSmDown,
|
|
@@ -41,7 +42,7 @@ export const PromoBanner = ({
|
|
|
41
42
|
[`${CLASS_ROOT}--vertical`]: variant === "vertical",
|
|
42
43
|
});
|
|
43
44
|
return (
|
|
44
|
-
<div className={classes}>
|
|
45
|
+
<div className={classes} {...other}>
|
|
45
46
|
<Grid columnGapSize="large">
|
|
46
47
|
{variant === "reverse" && image && (
|
|
47
48
|
<GridCol
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use "../../../styles/tokens/space";
|
|
2
3
|
@use "../../../styles/tokens/breakpoint";
|
|
3
4
|
@use "../../../styles/tools/convert";
|
|
5
|
+
@use "../../Icon/styles/config" as icon-config;
|
|
6
|
+
|
|
7
|
+
@function build-unsized-icon-selector($selector) {
|
|
8
|
+
$result: $selector;
|
|
9
|
+
|
|
10
|
+
@each $size-name in map.keys(map.get(icon-config.$sizes, default)) {
|
|
11
|
+
$result: "#{$result}:not(.icon--#{$size-name})";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@return $result;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$tile-unsized-icon-selector: build-unsized-icon-selector(">.icon") + ", " +
|
|
18
|
+
build-unsized-icon-selector(">svg");
|
|
4
19
|
|
|
5
20
|
@mixin tile-base {
|
|
6
21
|
display: flex;
|
|
@@ -19,6 +34,7 @@
|
|
|
19
34
|
display: flex;
|
|
20
35
|
flex-direction: column;
|
|
21
36
|
align-items: flex-start;
|
|
37
|
+
justify-content: space-between;
|
|
22
38
|
gap: space.get("medium");
|
|
23
39
|
padding: space.get("medium");
|
|
24
40
|
z-index: 1;
|
|
@@ -27,18 +43,20 @@
|
|
|
27
43
|
margin-bottom: 0;
|
|
28
44
|
}
|
|
29
45
|
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
@include breakpoint.get("md") {
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
padding: space.get("large");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@mixin tile-body-icon-ratio {
|
|
53
|
+
#{$tile-unsized-icon-selector} {
|
|
32
54
|
width: convert.to-rem(24px);
|
|
33
55
|
height: convert.to-rem(24px);
|
|
34
56
|
}
|
|
35
57
|
|
|
36
58
|
@include breakpoint.get("md") {
|
|
37
|
-
|
|
38
|
-
padding: space.get("large");
|
|
39
|
-
|
|
40
|
-
> .icon,
|
|
41
|
-
> svg {
|
|
59
|
+
#{$tile-unsized-icon-selector} {
|
|
42
60
|
width: convert.to-rem(32px);
|
|
43
61
|
height: convert.to-rem(32px);
|
|
44
62
|
}
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
@include mixins.tile-body;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
&:not(.tile--action) .tile__body {
|
|
12
|
+
@include mixins.tile-body-icon-ratio;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
&--compact .tile__body {
|
|
12
16
|
@include mixins.tile-body-compact;
|
|
13
17
|
}
|
|
@@ -19,7 +23,7 @@
|
|
|
19
23
|
@include mixins.tile-action;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
.icon {
|
|
26
|
+
.tile__body > .icon:last-child {
|
|
23
27
|
@include mixins.tile-action-icon;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -19,11 +19,6 @@ $focus-shadow:
|
|
|
19
19
|
$selection-background: sasscolor.adjust(color.$orange-dark, $alpha: -0.1);
|
|
20
20
|
|
|
21
21
|
@mixin focusring {
|
|
22
|
-
&:focus {
|
|
23
|
-
outline: $focus-outline;
|
|
24
|
-
outline-offset: $focusring-offset;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
&:focus-visible {
|
|
28
23
|
outline: $focus-outline;
|
|
29
24
|
outline-offset: $focusring-offset;
|
|
@@ -36,11 +31,6 @@ $selection-background: sasscolor.adjust(color.$orange-dark, $alpha: -0.1);
|
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
@mixin focusring-flush {
|
|
39
|
-
&:focus {
|
|
40
|
-
outline: $focus-outline;
|
|
41
|
-
outline-offset: 0 !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
34
|
&:focus-visible {
|
|
45
35
|
outline: $focus-outline;
|
|
46
36
|
outline-offset: 0 !important;
|
|
@@ -55,12 +45,6 @@ $selection-background: sasscolor.adjust(color.$orange-dark, $alpha: -0.1);
|
|
|
55
45
|
@mixin focusring-round {
|
|
56
46
|
border-radius: 100%;
|
|
57
47
|
|
|
58
|
-
&:focus {
|
|
59
|
-
outline-width: 0 !important;
|
|
60
|
-
outline-color: transparent !important;
|
|
61
|
-
box-shadow: $focus-shadow;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
48
|
&:focus-visible {
|
|
65
49
|
outline-width: 0 !important;
|
|
66
50
|
outline-color: transparent !important;
|
|
@@ -50,7 +50,16 @@
|
|
|
50
50
|
// Default štýly pre všetky p elementy
|
|
51
51
|
@include generate.responsive-css-map(map.get($config, "default"));
|
|
52
52
|
|
|
53
|
-
a {
|
|
53
|
+
a:not(.no-underline):not(.underline-hover) {
|
|
54
|
+
text-decoration: underline !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
a.no-underline,
|
|
58
|
+
a.underline-hover {
|
|
59
|
+
text-decoration: none !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
a.underline-hover:hover {
|
|
54
63
|
text-decoration: underline !important;
|
|
55
64
|
}
|
|
56
65
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Changelog for Card Component
|
|
2
|
-
|
|
3
|
-
## [Unreleased]
|
|
4
|
-
|
|
5
|
-
### Breaking Changes
|
|
6
|
-
|
|
7
|
-
- **Removed**: `CardHeader` component has been removed from the Card module.
|
|
8
|
-
- **Added**: `CardProductHeader` component has been introduced as a new header variant for product cards.
|
|
9
|
-
- **Added**: `space` prop to `CardSection` and `CardProductHeader` for small spacing option. When set to `"small"`, applies compact spacing via a modifier class.
|
|
10
|
-
|
|
11
|
-
### Other Notable Changes
|
|
12
|
-
|
|
13
|
-
- Card documentation and usage examples updated to use `CardProductHeader` instead of `CardHeader`.
|
|
14
|
-
- Card exports and tests updated to reflect the removal of `CardHeader` and addition of `CardProductHeader`.
|
|
15
|
-
- No changes to the main `Card` or `CardSection` API except for the new `space` prop.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
**Note:** If you were using `CardHeader`, please migrate to `CardProductHeader` or use `CardSection` for custom header content as needed.
|