@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.
Files changed (55) hide show
  1. package/build/components/index.js +5 -5
  2. package/build/components/index.js.map +1 -1
  3. package/build/components/tsconfig.tsbuildinfo +1 -1
  4. package/build/components/types/index.d.ts +20 -16
  5. package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +10 -10
  6. package/build/components/types/src/components/Modal/Modal.d.ts +0 -2
  7. package/build/components/types/src/components/Modal/index.d.ts +0 -1
  8. package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
  9. package/build/components/types/src/components/Tag/Tag.d.ts +0 -2
  10. package/build/components/types/src/components/index.d.ts +2 -2
  11. package/build/fonts/HelveticaNeue-Bold.woff2 +0 -0
  12. package/build/fonts/HelveticaNeue-Light.woff2 +0 -0
  13. package/build/fonts/HelveticaNeue-Roman.woff2 +0 -0
  14. package/build/lib/after-components.css +1 -1
  15. package/build/lib/after-components.css.map +1 -1
  16. package/build/lib/before-components.css +1 -1
  17. package/build/lib/before-components.css.map +1 -1
  18. package/build/lib/components.css +1 -1
  19. package/build/lib/components.css.map +1 -1
  20. package/build/lib/scripts.js +4 -4
  21. package/build/lib/scripts.js.map +1 -1
  22. package/build/lib/style.css +1 -1
  23. package/build/lib/style.css.map +1 -1
  24. package/build/lib/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +15 -13
  26. package/public/fonts/HelveticaNeue-Bold.woff2 +0 -0
  27. package/public/fonts/HelveticaNeue-Light.woff2 +0 -0
  28. package/public/fonts/HelveticaNeue-Roman.woff2 +0 -0
  29. package/src/components/AnchorNavigation/styles/mixins.scss +4 -4
  30. package/src/components/BodyBanner/BodyBanner.tsx +52 -73
  31. package/src/components/BodyBanner/styles/mixins.scss +34 -32
  32. package/src/components/BodyBanner/styles/style.scss +4 -18
  33. package/src/components/BodyBanner/tests/BodyBanner.conformance.test.js +67 -0
  34. package/src/components/BodyBanner/tests/BodyBanner.unit.test.js +194 -0
  35. package/src/components/Carousel/Carousel.static.ts +1 -0
  36. package/src/components/Carousel/styles/mixins.scss +11 -5
  37. package/src/components/FeatureAccordion/FeatureAccordion.tsx +1 -1
  38. package/src/components/Link/styles/mixins.scss +8 -2
  39. package/src/components/Modal/Modal.tsx +1 -9
  40. package/src/components/Modal/index.ts +0 -1
  41. package/src/components/Modal/styles/config.scss +4 -4
  42. package/src/components/Modal/styles/mixins.scss +13 -59
  43. package/src/components/Modal/styles/style.scss +0 -16
  44. package/src/components/Modal/tests/Modal.unit.test.js +0 -37
  45. package/src/components/Pill/Pill.tsx +3 -0
  46. package/src/components/Pill/styles/style.scss +3 -1
  47. package/src/components/PromoBanner/styles/mixins.scss +1 -1
  48. package/src/components/Tag/Tag.tsx +0 -2
  49. package/src/components/Tag/styles/style.scss +32 -0
  50. package/src/components/index.ts +2 -0
  51. package/src/styles/typography/mixins.scss +0 -5
  52. package/src/styles/utilities/layout.scss +19 -0
  53. package/src/styles/utilities/visibility.scss +2 -4
  54. package/build/components/types/src/components/Modal/ModalProductBody.d.ts +0 -10
  55. 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];
@@ -17,7 +17,9 @@
17
17
  }
18
18
 
19
19
  &.surface-secondary,
20
- &.surface-tertiary {
20
+ &.surface-tertiary,
21
+ &.fill-moderate,
22
+ &.fill-disabled {
21
23
  color: color.$white;
22
24
  }
23
25
 
@@ -20,7 +20,7 @@
20
20
  justify-content: center;
21
21
 
22
22
  > * {
23
- width: fit-content !important;
23
+ width: fit-content;
24
24
  }
25
25
  }
26
26
 
@@ -21,8 +21,6 @@ export type TagSize = "small" | "large";
21
21
  interface CommonProps {
22
22
  color?: TagColor;
23
23
  size?: TagSize;
24
- /** @deprecated */
25
- isInverse?: boolean;
26
24
  isDisabled?: boolean;
27
25
  className?: string;
28
26
  children?: React.ReactNode;
@@ -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();
@@ -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,
@@ -55,11 +55,6 @@
55
55
  }
56
56
  }
57
57
 
58
- // Default štýly pre všetky a elementy
59
- a {
60
- @include generate.responsive-css-map($config);
61
- }
62
-
63
58
  // Generovanie variantov pre p elementy s triedami
64
59
  @each $variant, $breakpoints in $config {
65
60
  @if $variant != default {
@@ -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: inherit !important;
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 };