@orangesk/orange-design-system 3.2.0 → 3.3.1
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/build/components/Avatar/style.css +2 -0
- package/build/components/Avatar/style.css.map +1 -0
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Carousel/style.css.map +1 -1
- package/build/components/Countdown/style.css +2 -0
- package/build/components/Countdown/style.css.map +1 -0
- package/build/components/DocumentationSidebar/style.css +1 -1
- package/build/components/DocumentationSidebar/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/Megamenu/style.css +1 -1
- package/build/components/Megamenu/style.css.map +1 -1
- package/build/components/Pill/style.css +1 -1
- package/build/components/Pill/style.css.map +1 -1
- package/build/components/Preview/style.css +1 -1
- package/build/components/Preview/style.css.map +1 -1
- package/build/components/PromoBanner/style.css +1 -1
- package/build/components/PromoBanner/style.css.map +1 -1
- package/build/components/StarRating/style.css +2 -0
- package/build/components/StarRating/style.css.map +1 -0
- 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 +53 -13
- package/build/components/types/src/components/Avatar/Avatar.d.ts +7 -0
- package/build/components/types/src/components/Avatar/index.d.ts +2 -0
- package/build/components/types/src/components/Carousel/constants.d.ts +2 -0
- package/build/components/types/src/components/Countdown/Countdown.d.ts +10 -0
- package/build/components/types/src/components/Countdown/Countdown.react.d.ts +8 -0
- package/build/components/types/src/components/Countdown/Countdown.shared.d.ts +54 -0
- package/build/components/types/src/components/Countdown/Countdown.static.d.ts +21 -0
- package/build/components/types/src/components/Countdown/CountdownTag.d.ts +9 -0
- package/build/components/types/src/components/Countdown/CountdownTag.static.d.ts +16 -0
- package/build/components/types/src/components/Countdown/constants.d.ts +28 -0
- package/build/components/types/src/components/Countdown/index.d.ts +3 -0
- package/build/components/types/src/components/DocumentationSidebar/DocumentationSidebar.d.ts +1 -0
- package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +1 -0
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +8 -2
- package/build/components/types/src/components/StarRating/StarRating.d.ts +9 -0
- package/build/components/types/src/components/StarRating/index.d.ts +1 -0
- package/build/components/types/src/components/index.d.ts +4 -2
- package/build/components/types/src/scripts/index.d.ts +10 -0
- package/build/components/types/src/styles/export/color.d.ts +2 -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/megamenu.css +1 -1
- package/build/lib/megamenu.css.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/lib/utilities.css +1 -1
- package/build/lib/utilities.css.map +1 -1
- package/build/sprite.svg +1 -1
- package/package.json +31 -30
- package/src/assets/icons/quote.svg +1 -1
- package/src/assets/icons/star-empty-thin.svg +4 -0
- package/src/components/Avatar/Avatar.tsx +36 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Avatar/styles/config.scss +11 -0
- package/src/components/Avatar/styles/mixins.scss +53 -0
- package/src/components/Avatar/styles/style.scss +20 -0
- package/src/components/Avatar/tests/Avatar.conformance.test.jsx +23 -0
- package/src/components/Avatar/tests/Avatar.unit.test.jsx +45 -0
- package/src/components/Carousel/Carousel.static.ts +17 -3
- package/src/components/Carousel/Carousel.tsx +28 -24
- package/src/components/Carousel/constants.ts +2 -0
- package/src/components/Carousel/styles/config.scss +5 -8
- package/src/components/Carousel/styles/mixins.scss +48 -78
- package/src/components/Carousel/styles/style.scss +8 -21
- package/src/components/Carousel/tests/Carousel.unit.test.jsx +48 -5
- package/src/components/Countdown/Countdown.react.ts +67 -0
- package/src/components/Countdown/Countdown.shared.ts +228 -0
- package/src/components/Countdown/Countdown.static.ts +201 -0
- package/src/components/Countdown/Countdown.tsx +105 -0
- package/src/components/Countdown/CountdownTag.static.ts +140 -0
- package/src/components/Countdown/CountdownTag.tsx +99 -0
- package/src/components/Countdown/constants.ts +36 -0
- package/src/components/Countdown/index.ts +3 -0
- package/src/components/Countdown/styles/config.scss +17 -0
- package/src/components/Countdown/styles/mixins.scss +193 -0
- package/src/components/Countdown/styles/style.scss +82 -0
- package/src/components/{Testimonial/tests/Testimonial.conformance.test.jsx → Countdown/tests/Countdown.conformance.test.jsx} +7 -2
- package/src/components/Countdown/tests/Countdown.static.test.jsx +117 -0
- package/src/components/Countdown/tests/Countdown.unit.test.jsx +101 -0
- package/src/components/Countdown/tests/CountdownTag.conformance.test.jsx +21 -0
- package/src/components/Countdown/tests/CountdownTag.static.test.jsx +30 -0
- package/src/components/Countdown/tests/CountdownTag.unit.test.jsx +67 -0
- package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +14 -1
- package/src/components/DocumentationSidebar/styles/style.scss +11 -0
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +14 -1
- package/src/components/Forms/Autocomplete/styles/mixins.scss +1 -0
- package/src/components/Forms/Autocomplete/styles/style.scss +4 -0
- package/src/components/Forms/Autocomplete/tests/Autocomplete.styles.unit.test.jsx +3 -0
- package/src/components/Pill/styles/style.scss +2 -1
- package/src/components/Preview/PreviewGenerator.tsx +137 -103
- package/src/components/Preview/styles/style.scss +15 -9
- package/src/components/PromoBanner/PromoBanner.tsx +31 -7
- package/src/components/PromoBanner/styles/mixins.scss +16 -0
- package/src/components/PromoBanner/styles/style.scss +4 -0
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +49 -0
- package/src/components/StarRating/StarRating.tsx +52 -0
- package/src/components/StarRating/index.ts +1 -0
- package/src/components/StarRating/styles/style.scss +28 -0
- package/src/components/StarRating/tests/StarRating.unit.test.jsx +62 -0
- package/src/components/index.ts +7 -2
- package/src/styles/export/color.js +2 -0
- package/src/styles/tokens/color.scss +2 -0
- package/src/styles/utilities/text.scss +6 -0
- package/build/components/Testimonial/style.css +0 -2
- package/build/components/Testimonial/style.css.map +0 -1
- package/build/components/types/src/components/Testimonial/Testimonial.d.ts +0 -10
- package/build/components/types/src/components/Testimonial/index.d.ts +0 -1
- package/build/search-index.json +0 -430
- package/src/components/Testimonial/Testimonial.tsx +0 -38
- package/src/components/Testimonial/index.ts +0 -1
- package/src/components/Testimonial/styles/config.scss +0 -42
- package/src/components/Testimonial/styles/mixins.scss +0 -44
- package/src/components/Testimonial/styles/style.scss +0 -16
- package/src/components/Testimonial/tests/Testimonial.unit.test.jsx +0 -43
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import cx from "classnames";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
interface TestimonialProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
color?: "default" | "orange";
|
|
8
|
-
isDiv?: boolean;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const CLASS_ROOT = "testimonial";
|
|
13
|
-
|
|
14
|
-
export const Testimonial: React.FC<TestimonialProps> = ({
|
|
15
|
-
className,
|
|
16
|
-
children,
|
|
17
|
-
color = "default",
|
|
18
|
-
isDiv = false,
|
|
19
|
-
...other
|
|
20
|
-
}) => {
|
|
21
|
-
const Tag = isDiv ? "div" : "p";
|
|
22
|
-
|
|
23
|
-
const classes = cx(
|
|
24
|
-
CLASS_ROOT,
|
|
25
|
-
{
|
|
26
|
-
[`testimonial--${color}`]: color === "orange",
|
|
27
|
-
},
|
|
28
|
-
className,
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<Tag className={classes} {...other}>
|
|
33
|
-
{children}
|
|
34
|
-
</Tag>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
Testimonial.displayName = "Testimonial";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Testimonial } from "./Testimonial";
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
@use "../../../styles/tokens/color";
|
|
2
|
-
@use "../../../styles/tokens/space";
|
|
3
|
-
@use "../../../styles/tools/convert";
|
|
4
|
-
|
|
5
|
-
$black: var(--color-background-contrast);
|
|
6
|
-
$orange: var(--color-surface-secondary);
|
|
7
|
-
|
|
8
|
-
$quotation-mark-bottom: (
|
|
9
|
-
-webkit-mask-image:
|
|
10
|
-
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>'),
|
|
11
|
-
mask-image:
|
|
12
|
-
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>')
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
$quotation-mark-top: (
|
|
16
|
-
mask-image:
|
|
17
|
-
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
18
|
-
-webkit-mask-image:
|
|
19
|
-
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
$quotation-mark-top-position: (
|
|
23
|
-
default: (
|
|
24
|
-
top: 0,
|
|
25
|
-
right: 0,
|
|
26
|
-
),
|
|
27
|
-
oneline: (
|
|
28
|
-
top: 0,
|
|
29
|
-
right: 0,
|
|
30
|
-
),
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
$quotation-mark-bottom-position: (
|
|
34
|
-
default: (
|
|
35
|
-
left: 0,
|
|
36
|
-
bottom: 0,
|
|
37
|
-
),
|
|
38
|
-
oneline: (
|
|
39
|
-
left: 0,
|
|
40
|
-
bottom: 0,
|
|
41
|
-
),
|
|
42
|
-
);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
@use "./config";
|
|
2
|
-
@use "../../../styles/tokens/base";
|
|
3
|
-
@use "../../../styles/tokens/space";
|
|
4
|
-
@use "../../../styles/tools/generate";
|
|
5
|
-
@use "../../../styles/tools/convert";
|
|
6
|
-
|
|
7
|
-
@mixin base {
|
|
8
|
-
padding: space.get("small") space.get("large") space.get("small")
|
|
9
|
-
convert.to-rem(40px);
|
|
10
|
-
width: fit-content;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@mixin quotation-mark {
|
|
14
|
-
font-size: convert.to-rem(14px);
|
|
15
|
-
position: relative;
|
|
16
|
-
&::before,
|
|
17
|
-
&::after {
|
|
18
|
-
content: "";
|
|
19
|
-
display: block;
|
|
20
|
-
position: absolute;
|
|
21
|
-
height: convert.to-rem(18px);
|
|
22
|
-
width: convert.to-rem(20px);
|
|
23
|
-
background-repeat: no-repeat;
|
|
24
|
-
background-color: config.$black;
|
|
25
|
-
}
|
|
26
|
-
&::before {
|
|
27
|
-
@include generate.css-map(config.$quotation-mark-bottom);
|
|
28
|
-
@include generate.css-map(
|
|
29
|
-
config.$quotation-mark-bottom-position,
|
|
30
|
-
"default"
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
&::after {
|
|
34
|
-
@include generate.css-map(config.$quotation-mark-top);
|
|
35
|
-
@include generate.css-map(config.$quotation-mark-top-position, "default");
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin orange {
|
|
40
|
-
&::before,
|
|
41
|
-
&::after {
|
|
42
|
-
background-color: config.$orange;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@use "./config";
|
|
2
|
-
@use "./mixins";
|
|
3
|
-
@use "../../../styles/tokens/color";
|
|
4
|
-
@use "../../../styles/tools/generate";
|
|
5
|
-
@use "../../../styles/tokens/breakpoint";
|
|
6
|
-
|
|
7
|
-
@layer components {
|
|
8
|
-
.testimonial {
|
|
9
|
-
@include mixins.base;
|
|
10
|
-
@include mixins.quotation-mark;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.testimonial--orange {
|
|
14
|
-
@include mixins.orange;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { render } from "@testing-library/react";
|
|
2
|
-
|
|
3
|
-
import { Testimonial } from "../";
|
|
4
|
-
|
|
5
|
-
describe("rendering Testimonial", () => {
|
|
6
|
-
describe("initial state", () => {
|
|
7
|
-
it("has default class testimonial", () => {
|
|
8
|
-
const { getByTestId } = render(<Testimonial data-testid="test-id" />);
|
|
9
|
-
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
10
|
-
});
|
|
11
|
-
it("its rendered as paragraph", () => {
|
|
12
|
-
const { getByTestId } = render(<Testimonial data-testid="test-id" />);
|
|
13
|
-
expect(getByTestId("test-id").tagName).toBe("P");
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
describe("passed props", () => {
|
|
18
|
-
it("renders children", () => {
|
|
19
|
-
const { getByText } = render(<Testimonial>test</Testimonial>);
|
|
20
|
-
expect(getByText("test")).toBeInTheDocument();
|
|
21
|
-
});
|
|
22
|
-
it("has additional class when className is set", () => {
|
|
23
|
-
const { getByTestId } = render(
|
|
24
|
-
<Testimonial className="test" data-testid="test-id" />,
|
|
25
|
-
);
|
|
26
|
-
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
27
|
-
expect(getByTestId("test-id")).toHaveClass("test");
|
|
28
|
-
});
|
|
29
|
-
it("has additional className testimonial--orange prop color with value orange is passed", () => {
|
|
30
|
-
const { getByTestId } = render(
|
|
31
|
-
<Testimonial className="test" data-testid="test-id" color="orange" />,
|
|
32
|
-
);
|
|
33
|
-
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
34
|
-
expect(getByTestId("test-id")).toHaveClass("testimonial--orange");
|
|
35
|
-
});
|
|
36
|
-
it("its rendered as div when isDiv prop is passed", () => {
|
|
37
|
-
const { getByTestId } = render(
|
|
38
|
-
<Testimonial data-testid="test-id" isDiv />,
|
|
39
|
-
);
|
|
40
|
-
expect(getByTestId("test-id").tagName).toBe("DIV");
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
});
|