@orangesk/orange-design-system 2.0.0-beta.12 → 2.0.0-beta.14
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/index.js +5 -5
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +20 -16
- package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +10 -10
- package/build/components/types/src/components/Modal/Modal.d.ts +0 -2
- package/build/components/types/src/components/Modal/index.d.ts +0 -1
- package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
- package/build/components/types/src/components/Tag/Tag.d.ts +0 -2
- package/build/components/types/src/components/index.d.ts +2 -2
- package/build/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/build/lib/after-components.css +1 -1
- package/build/lib/after-components.css.map +1 -1
- package/build/lib/before-components.css +1 -1
- package/build/lib/before-components.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/scripts.js +4 -4
- 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/package.json +15 -13
- package/public/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/src/components/AnchorNavigation/styles/mixins.scss +4 -4
- package/src/components/BodyBanner/BodyBanner.tsx +52 -73
- package/src/components/BodyBanner/styles/mixins.scss +34 -32
- package/src/components/BodyBanner/styles/style.scss +4 -18
- package/src/components/BodyBanner/tests/BodyBanner.conformance.test.js +67 -0
- package/src/components/BodyBanner/tests/BodyBanner.unit.test.js +194 -0
- package/src/components/Carousel/Carousel.static.ts +1 -0
- package/src/components/Carousel/styles/mixins.scss +11 -5
- package/src/components/FeatureAccordion/FeatureAccordion.tsx +1 -1
- package/src/components/Link/styles/mixins.scss +8 -2
- package/src/components/Modal/Modal.tsx +1 -9
- package/src/components/Modal/index.ts +0 -1
- package/src/components/Modal/styles/config.scss +4 -4
- package/src/components/Modal/styles/mixins.scss +13 -59
- package/src/components/Modal/styles/style.scss +0 -16
- package/src/components/Modal/tests/Modal.unit.test.js +0 -37
- package/src/components/Pill/Pill.tsx +3 -0
- package/src/components/Pill/styles/style.scss +3 -1
- package/src/components/PromoBanner/styles/mixins.scss +1 -1
- package/src/components/Tag/Tag.tsx +0 -2
- package/src/components/Tag/styles/style.scss +32 -0
- package/src/components/index.ts +2 -0
- package/src/styles/typography/mixins.scss +0 -5
- package/src/styles/utilities/layout.scss +19 -0
- package/src/styles/utilities/visibility.scss +2 -4
- package/build/components/types/src/components/Modal/ModalProductBody.d.ts +0 -10
- package/src/components/Modal/ModalProductBody.tsx +0 -52
|
@@ -9,7 +9,10 @@ export const pillColors = [
|
|
|
9
9
|
"surface-tertiary",
|
|
10
10
|
"surface-subtle",
|
|
11
11
|
"surface-moderate",
|
|
12
|
+
"surface-contrast",
|
|
12
13
|
"surface-accent",
|
|
14
|
+
"fill-moderate",
|
|
15
|
+
"fill-disabled",
|
|
13
16
|
"transparent",
|
|
14
17
|
] as const;
|
|
15
18
|
export type PillColor = (typeof pillColors)[number];
|
|
@@ -20,6 +20,38 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// Special styling for default tags inside .background-secondary parent
|
|
24
|
+
.background-secondary & {
|
|
25
|
+
// Target tags that don't have any color variant class
|
|
26
|
+
// Use negative lookahead-like approach: exclude if class contains any color variant
|
|
27
|
+
&:not([class*="--orange"]):not([class*="--black"]):not(
|
|
28
|
+
[class*="--yellow"]
|
|
29
|
+
):not([class*="--green"]):not([class*="--blue"]):not(
|
|
30
|
+
[class*="--success"]
|
|
31
|
+
):not([class*="--danger"]):not([class*="--info"]):not(
|
|
32
|
+
[class*="--warning"]
|
|
33
|
+
):not([class*="--transparent"]) {
|
|
34
|
+
background-color: var(--color-surface-moderate);
|
|
35
|
+
|
|
36
|
+
// Clickable tags should have same default background but keep normal interactive states
|
|
37
|
+
&:where(button),
|
|
38
|
+
&:where(a) {
|
|
39
|
+
background-color: var(--color-surface-moderate);
|
|
40
|
+
|
|
41
|
+
&:focus-visible,
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: color.$gray-600;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:active,
|
|
47
|
+
&.is-active {
|
|
48
|
+
color: var(--color-text-inverse);
|
|
49
|
+
background-color: var(--color-background-contrast);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
23
55
|
// Transparent class is a special variant of color, it's not possible to make transparent variant for each color at the moment.
|
|
24
56
|
&--transparent {
|
|
25
57
|
@include mixins.color-transparent();
|
package/src/components/index.ts
CHANGED
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
ModalCloseButton,
|
|
48
48
|
ModalTitle,
|
|
49
49
|
ModalProductHeader,
|
|
50
|
+
ModalProductFooter,
|
|
50
51
|
} from "./Modal";
|
|
51
52
|
import { Section } from "./Section";
|
|
52
53
|
import { Sticker } from "./Sticker";
|
|
@@ -156,6 +157,7 @@ export {
|
|
|
156
157
|
Modal,
|
|
157
158
|
ModalBody,
|
|
158
159
|
ModalCloseButton,
|
|
160
|
+
ModalProductFooter,
|
|
159
161
|
ModalProductHeader,
|
|
160
162
|
ModalTitle,
|
|
161
163
|
Pagination,
|
|
@@ -189,6 +189,12 @@
|
|
|
189
189
|
width: 100% !important;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
.fullwidth-xs-only {
|
|
193
|
+
@include breakpoint.get("xs", "only") {
|
|
194
|
+
width: 100% !important;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
192
198
|
.fullheight {
|
|
193
199
|
height: 100% !important;
|
|
194
200
|
}
|
|
@@ -200,4 +206,17 @@
|
|
|
200
206
|
}
|
|
201
207
|
|
|
202
208
|
@include block-classes();
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
@mixin position-classes {
|
|
212
|
+
.relative {
|
|
213
|
+
position: relative !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.absolute {
|
|
217
|
+
position: absolute !important;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@include position-classes();
|
|
203
222
|
}
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@mixin show-for($breakpoint) {
|
|
13
|
-
display: none !important;
|
|
14
13
|
@if sassmap.get(breakpoint.$map, $breakpoint) {
|
|
15
|
-
@include breakpoint.get($breakpoint) {
|
|
16
|
-
display:
|
|
14
|
+
@include breakpoint.get($breakpoint, downfrom) {
|
|
15
|
+
display: none !important;
|
|
17
16
|
}
|
|
18
17
|
} @else {
|
|
19
18
|
@warn 'show-for() parameter breakpoint is not defined in the breakpoint.$map map';
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
@mixin hide-for($breakpoint) {
|
|
24
|
-
display: inherit !important;
|
|
25
23
|
@if sassmap.get(breakpoint.$map, $breakpoint) {
|
|
26
24
|
@include breakpoint.get($breakpoint) {
|
|
27
25
|
display: none !important;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface ModalProductBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
subtitleSection?: React.ReactNode;
|
|
4
|
-
listSection?: React.ReactNode;
|
|
5
|
-
benefitsSection?: React.ReactNode;
|
|
6
|
-
extraPaymentsSection?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const CLASS_ROOT = "modal__product-body";
|
|
9
|
-
declare const ModalProductBody: React.ForwardRefExoticComponent<ModalProductBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export { ModalProductBody };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import cx from "classnames";
|
|
3
|
-
|
|
4
|
-
interface ModalProductBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
subtitleSection?: React.ReactNode;
|
|
6
|
-
listSection?: React.ReactNode;
|
|
7
|
-
benefitsSection?: React.ReactNode;
|
|
8
|
-
extraPaymentsSection?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const CLASS_ROOT = "modal__product-body";
|
|
12
|
-
|
|
13
|
-
const ModalProductBody = React.forwardRef<
|
|
14
|
-
HTMLDivElement,
|
|
15
|
-
ModalProductBodyProps
|
|
16
|
-
>(
|
|
17
|
-
(
|
|
18
|
-
{
|
|
19
|
-
className,
|
|
20
|
-
subtitleSection,
|
|
21
|
-
listSection,
|
|
22
|
-
benefitsSection,
|
|
23
|
-
extraPaymentsSection,
|
|
24
|
-
...other
|
|
25
|
-
},
|
|
26
|
-
ref,
|
|
27
|
-
) => {
|
|
28
|
-
const classes = cx(CLASS_ROOT, className);
|
|
29
|
-
|
|
30
|
-
const subtitleSectionClass = `${CLASS_ROOT}-subtitle-section`;
|
|
31
|
-
const listSectionClass = `${CLASS_ROOT}-list-section`;
|
|
32
|
-
const accordionSectionClass = `${CLASS_ROOT}-accordion-section`;
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<div className={classes} ref={ref} {...other}>
|
|
36
|
-
{subtitleSection && (
|
|
37
|
-
<div className={subtitleSectionClass}>{subtitleSection}</div>
|
|
38
|
-
)}
|
|
39
|
-
{listSection && <div className={listSectionClass}>{listSection}</div>}
|
|
40
|
-
{benefitsSection && (
|
|
41
|
-
<div className={accordionSectionClass}>{benefitsSection}</div>
|
|
42
|
-
)}
|
|
43
|
-
{extraPaymentsSection && (
|
|
44
|
-
<div className={listSectionClass}>{extraPaymentsSection}</div>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
},
|
|
49
|
-
);
|
|
50
|
-
ModalProductBody.displayName = "ModalProductBody";
|
|
51
|
-
|
|
52
|
-
export { ModalProductBody };
|