@orangesk/orange-design-system 2.0.0-beta.47 → 2.0.0-beta.49
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/BlockAction/style.css +1 -1
- package/build/components/BlockAction/style.css.map +1 -1
- package/build/components/Breadcrumbs/style.css +1 -1
- package/build/components/Breadcrumbs/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/DocumentationSidebar/style.css +1 -1
- package/build/components/DocumentationSidebar/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/Loader/style.css +1 -1
- package/build/components/Loader/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/Pagination/style.css +1 -1
- package/build/components/Pagination/style.css.map +1 -1
- package/build/components/PromotionCard/style.css +1 -1
- package/build/components/PromotionCard/style.css.map +1 -1
- package/build/components/Section/style.css +1 -1
- package/build/components/Section/style.css.map +1 -1
- package/build/components/SocialButton/style.css +1 -1
- package/build/components/SocialButton/style.css.map +1 -1
- package/build/components/Stepbar/style.css +1 -1
- package/build/components/Stepbar/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/Tag/style.css +1 -1
- package/build/components/Tag/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/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 +5 -11
- package/build/components/types/src/components/Carousel/Carousel.static.d.ts +4 -1
- package/build/components/types/src/components/CarouselHero/CarouselHero.d.ts +1 -0
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +11 -0
- package/build/components/types/src/components/Forms/Group/Group.d.ts +1 -1
- package/build/components/types/src/components/Tile/Tile.d.ts +3 -11
- 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/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/search-index.json +5 -5
- package/package.json +21 -21
- package/src/components/BlockAction/styles/style.scss +6 -4
- package/src/components/Breadcrumbs/styles/style.scss +2 -1
- package/src/components/Card/styles/config.scss +1 -1
- package/src/components/Carousel/Carousel.static.ts +29 -1
- package/src/components/Carousel/tests/Carousel.static.test.jsx +50 -0
- package/src/components/CarouselHero/CarouselHero.static.ts +7 -0
- package/src/components/CarouselHero/CarouselHero.tsx +61 -3
- package/src/components/CarouselHero/tests/CarouselHero.unit.test.jsx +31 -1
- package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +21 -34
- package/src/components/DocumentationSidebar/styles/style.scss +0 -6
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +190 -14
- package/src/components/Forms/Autocomplete/styles/style.scss +61 -8
- package/src/components/Forms/Autocomplete/tests/Autocomplete.static.test.ts +187 -0
- package/src/components/Forms/DatePicker/styles/style.scss +1 -2
- package/src/components/Forms/Group/Group.tsx +4 -1
- package/src/components/Forms/Group/styles/config.scss +1 -1
- package/src/components/Forms/Group/styles/mixins.scss +17 -0
- package/src/components/Forms/Group/tests/Group.unit.test.jsx +9 -0
- package/src/components/Forms/TextArea/styles/config.scss +1 -0
- package/src/components/Forms/TextArea/styles/mixins.scss +7 -1
- package/src/components/Forms/TextInput/styles/config.scss +3 -1
- package/src/components/Forms/TextInput/styles/mixins.scss +7 -1
- package/src/components/Forms/TextInput/styles/style.scss +17 -12
- package/src/components/Forms/styles/config.scss +3 -2
- package/src/components/Icon/styles/style.scss +2 -1
- package/src/components/Loader/styles/style.scss +0 -2
- package/src/components/Pagination/styles/mixins.scss +8 -6
- package/src/components/Pagination/styles/style.scss +0 -4
- package/src/components/Preview/PreviewGenerator.tsx +15 -2
- package/src/components/PromotionCard/styles/mixins.scss +2 -1
- package/src/components/Section/styles/mixins.scss +27 -5
- package/src/components/SocialButton/styles/config.scss +2 -2
- package/src/components/Stepbar/styles/style.scss +4 -2
- package/src/components/Table/styles/mixins.scss +6 -3
- package/src/components/Tag/styles/config.scss +1 -1
- package/src/components/Tag/styles/style.scss +22 -5
- package/src/components/Tile/Tile.tsx +18 -42
- package/src/components/Tile/styles/mixins.scss +55 -45
- package/src/components/Tile/styles/style.scss +5 -17
- package/src/components/Tile/tests/Tile.unit.test.jsx +9 -78
- package/src/styles/tokens/color-vars.scss +0 -2
- package/src/styles/utilities/color.scss +0 -153
- package/src/components/Tile/CHANGELOG.md +0 -28
- package/src/components/Tile/styles/config.scss +0 -7
|
@@ -1,81 +1,91 @@
|
|
|
1
1
|
@use "../../../styles/tokens/space";
|
|
2
2
|
@use "../../../styles/tokens/breakpoint";
|
|
3
3
|
@use "../../../styles/tools/convert";
|
|
4
|
-
@use "./config";
|
|
5
4
|
|
|
6
5
|
@mixin tile-base {
|
|
7
6
|
display: flex;
|
|
8
7
|
position: relative;
|
|
9
8
|
overflow: hidden;
|
|
10
9
|
width: 100%;
|
|
11
|
-
border-radius: convert.to-rem(
|
|
12
|
-
border: 1px solid var(--color-border-
|
|
10
|
+
border-radius: convert.to-rem(5px);
|
|
11
|
+
border: 1px solid var(--color-border-subtle);
|
|
12
|
+
background-color: var(--color-fill-primary);
|
|
13
|
+
color: var(--color-text-default);
|
|
13
14
|
word-break: break-word;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
@mixin tile-image-aspect {
|
|
17
|
-
aspect-ratio: 310 / 466 !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
17
|
@mixin tile-body {
|
|
21
18
|
flex: 1;
|
|
22
19
|
display: flex;
|
|
23
20
|
flex-direction: column;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
gap: space.get("medium");
|
|
23
|
+
padding: space.get("medium");
|
|
24
24
|
z-index: 1;
|
|
25
|
+
|
|
25
26
|
*:last-child {
|
|
26
27
|
margin-bottom: 0;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
|
|
30
|
+
> .icon,
|
|
31
|
+
> svg {
|
|
32
|
+
width: convert.to-rem(24px);
|
|
33
|
+
height: convert.to-rem(24px);
|
|
32
34
|
}
|
|
33
|
-
}
|
|
34
35
|
|
|
35
|
-
@
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
@include breakpoint.get("md") {
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
padding: space.get("large");
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
object-fit: cover;
|
|
46
|
-
object-position: center center;
|
|
47
|
-
height: 100%;
|
|
48
|
-
margin-bottom: 0 !important;
|
|
40
|
+
> .icon,
|
|
41
|
+
> svg {
|
|
42
|
+
width: convert.to-rem(32px);
|
|
43
|
+
height: convert.to-rem(32px);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
@mixin tile-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
48
|
+
@mixin tile-body-compact {
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
gap: space.get("xsmall");
|
|
53
|
+
padding: convert.to-rem(15px);
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
text-wrap: nowrap;
|
|
60
56
|
|
|
61
|
-
@
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
rgba(0, 0, 0, 0.75) 40%,
|
|
66
|
-
rgba(0, 0, 0, 0) 70%
|
|
67
|
-
);
|
|
57
|
+
@include breakpoint.get("md") {
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
padding: space.get("medium");
|
|
60
|
+
}
|
|
68
61
|
}
|
|
69
62
|
|
|
70
63
|
@mixin tile-action {
|
|
71
64
|
flex-direction: row;
|
|
72
|
-
justify-content: space-between;
|
|
73
65
|
align-items: center;
|
|
74
|
-
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
gap: convert.to-rem(15px);
|
|
68
|
+
padding: space.get("large") space.get("medium");
|
|
69
|
+
|
|
70
|
+
@include breakpoint.get("sm") {
|
|
71
|
+
gap: space.get("medium");
|
|
72
|
+
padding: space.get("large");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@mixin tile-action-shell {
|
|
77
|
+
background-color: transparent;
|
|
78
|
+
color: var(--color-text-inverse);
|
|
79
|
+
border-color: var(--color-border-strong);
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
@mixin tile-action-icon {
|
|
78
|
-
order: 2;
|
|
79
|
-
margin-left: space.get("small");
|
|
80
83
|
flex-shrink: 0;
|
|
84
|
+
width: convert.to-rem(24px);
|
|
85
|
+
height: convert.to-rem(24px);
|
|
86
|
+
|
|
87
|
+
@include breakpoint.get("sm") {
|
|
88
|
+
width: convert.to-rem(32px);
|
|
89
|
+
height: convert.to-rem(32px);
|
|
90
|
+
}
|
|
81
91
|
}
|
|
@@ -4,33 +4,21 @@
|
|
|
4
4
|
.tile {
|
|
5
5
|
@include mixins.tile-base;
|
|
6
6
|
|
|
7
|
-
&--image {
|
|
8
|
-
@include mixins.tile-image-aspect;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
&__body {
|
|
12
8
|
@include mixins.tile-body;
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
@include mixins.tile-body-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&__bg {
|
|
20
|
-
@include mixins.tile-bg;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&--image .tile__body {
|
|
24
|
-
@include mixins.tile-image-gradient;
|
|
25
|
-
&.justify-content-end {
|
|
26
|
-
@include mixins.tile-image-gradient-end;
|
|
27
|
-
}
|
|
11
|
+
&--compact .tile__body {
|
|
12
|
+
@include mixins.tile-body-compact;
|
|
28
13
|
}
|
|
29
14
|
|
|
30
15
|
&--action {
|
|
16
|
+
@include mixins.tile-action-shell;
|
|
17
|
+
|
|
31
18
|
.tile__body {
|
|
32
19
|
@include mixins.tile-action;
|
|
33
20
|
}
|
|
21
|
+
|
|
34
22
|
.icon {
|
|
35
23
|
@include mixins.tile-action-icon;
|
|
36
24
|
}
|
|
@@ -8,6 +8,7 @@ describe("rendering Tile", () => {
|
|
|
8
8
|
const { getByTestId } = render(<Tile data-testid="test-id" />);
|
|
9
9
|
expect(getByTestId("test-id").tagName).toBe("DIV");
|
|
10
10
|
expect(getByTestId("test-id")).toHaveClass("tile");
|
|
11
|
+
expect(getByTestId("test-id")).not.toHaveClass("surface-primary");
|
|
11
12
|
});
|
|
12
13
|
it("renders child div with class tile__body", () => {
|
|
13
14
|
const { getByTestId } = render(<Tile data-testid="test-id" />);
|
|
@@ -28,78 +29,6 @@ describe("rendering Tile", () => {
|
|
|
28
29
|
expect(getByTestId("test-id")).toHaveClass("tile");
|
|
29
30
|
expect(getByTestId("test-id")).toHaveClass("test-class");
|
|
30
31
|
});
|
|
31
|
-
it("renders Image when backgroundImage is object of Image props and src is string", () => {
|
|
32
|
-
const { container } = render(
|
|
33
|
-
<Tile
|
|
34
|
-
data-testid="test-id"
|
|
35
|
-
backgroundImage={{ src: "./test.png", alt: "test" }}
|
|
36
|
-
/>,
|
|
37
|
-
);
|
|
38
|
-
expect(container.querySelector("img")).toBeInTheDocument();
|
|
39
|
-
// The Image component may add the 'img' class, but always has 'tile__bg'
|
|
40
|
-
expect(container.querySelector("img")).toHaveClass("tile__bg");
|
|
41
|
-
});
|
|
42
|
-
it("renders image inside picture when backgroundImage is object of Image props and src is object", () => {
|
|
43
|
-
const { container } = render(
|
|
44
|
-
<Tile
|
|
45
|
-
data-testid="test-id"
|
|
46
|
-
backgroundImage={{ src: { default: "./test.png" }, alt: "test" }}
|
|
47
|
-
/>,
|
|
48
|
-
);
|
|
49
|
-
expect(container.querySelector("picture")).toBeInTheDocument();
|
|
50
|
-
const img = container.querySelector("picture").querySelector("img");
|
|
51
|
-
expect(img).toBeInTheDocument();
|
|
52
|
-
// Update: Only check for class if it exists, otherwise check for no class
|
|
53
|
-
// If the implementation no longer adds 'tile__bg', this should pass
|
|
54
|
-
expect(img.className === "" || img.className === undefined).toBe(true);
|
|
55
|
-
});
|
|
56
|
-
it("background image has src set to backgroundImage.src", () => {
|
|
57
|
-
const { container } = render(
|
|
58
|
-
<Tile
|
|
59
|
-
data-testid="test-id"
|
|
60
|
-
backgroundImage={{ src: "./test.png", alt: "test" }}
|
|
61
|
-
/>,
|
|
62
|
-
);
|
|
63
|
-
expect(new URL(container.querySelector("img").src).pathname).toBe(
|
|
64
|
-
"/test.png",
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
it("background image has alt set to backgroundImage.alt", () => {
|
|
68
|
-
const { container } = render(
|
|
69
|
-
<Tile
|
|
70
|
-
data-testid="test-id"
|
|
71
|
-
backgroundImage={{ src: "./test.png", alt: "test" }}
|
|
72
|
-
/>,
|
|
73
|
-
);
|
|
74
|
-
expect(container.querySelector("img").alt).toBe("test");
|
|
75
|
-
});
|
|
76
|
-
it("background image has additional class when backgroundImage.className is set", () => {
|
|
77
|
-
const { container } = render(
|
|
78
|
-
<Tile
|
|
79
|
-
data-testid="test-id"
|
|
80
|
-
backgroundImage={{
|
|
81
|
-
src: "./test.png",
|
|
82
|
-
alt: "test",
|
|
83
|
-
className: "test-class",
|
|
84
|
-
}}
|
|
85
|
-
/>,
|
|
86
|
-
);
|
|
87
|
-
expect(container.querySelector("img")).toHaveClass("tile__bg");
|
|
88
|
-
expect(container.querySelector("img")).toHaveClass("test-class");
|
|
89
|
-
});
|
|
90
|
-
it("has surface class when color prop is set", () => {
|
|
91
|
-
const { getByTestId } = render(
|
|
92
|
-
<Tile data-testid="test-id" color="surface-secondary" />,
|
|
93
|
-
);
|
|
94
|
-
expect(getByTestId("test-id")).toHaveClass("surface-secondary");
|
|
95
|
-
});
|
|
96
|
-
it("applies surface-contrast and text-inverse classes when color is surface-contrast", () => {
|
|
97
|
-
const { getByTestId } = render(
|
|
98
|
-
<Tile data-testid="test-id" color="surface-contrast" />,
|
|
99
|
-
);
|
|
100
|
-
expect(getByTestId("test-id")).toHaveClass("surface-contrast");
|
|
101
|
-
expect(getByTestId("test-id")).toHaveClass("text-inverse");
|
|
102
|
-
});
|
|
103
32
|
it("applies hAlign and vAlign classes to body", () => {
|
|
104
33
|
const { getByTestId } = render(
|
|
105
34
|
<Tile data-testid="test-id" hAlign="center" vAlign="space-between" />,
|
|
@@ -108,26 +37,28 @@ describe("rendering Tile", () => {
|
|
|
108
37
|
expect(body).toHaveClass("align-items-center");
|
|
109
38
|
expect(body).toHaveClass("justify-content-space-between");
|
|
110
39
|
});
|
|
111
|
-
it("applies
|
|
40
|
+
it("applies compact wrapper class when variant is compact", () => {
|
|
112
41
|
const { getByTestId } = render(
|
|
113
|
-
<Tile data-testid="test-id"
|
|
42
|
+
<Tile data-testid="test-id" variant="compact" />,
|
|
114
43
|
);
|
|
44
|
+
expect(getByTestId("test-id")).toHaveClass("tile--compact");
|
|
115
45
|
const body = getByTestId("test-id").querySelector(".tile__body");
|
|
116
|
-
expect(body).toHaveClass("tile__body--
|
|
46
|
+
expect(body).not.toHaveClass("tile__body--compact");
|
|
117
47
|
});
|
|
118
48
|
it("applies variant class to wrapper when variant is set", () => {
|
|
119
49
|
const { getByTestId } = render(
|
|
120
|
-
<Tile data-testid="test-id" variant="
|
|
50
|
+
<Tile data-testid="test-id" variant="action" />,
|
|
121
51
|
);
|
|
122
|
-
expect(getByTestId("test-id")).toHaveClass("tile--
|
|
52
|
+
expect(getByTestId("test-id")).toHaveClass("tile--action");
|
|
123
53
|
});
|
|
124
54
|
it("renders Icon when variant is 'action'", () => {
|
|
125
55
|
const { getByTestId } = render(
|
|
126
56
|
<Tile data-testid="test-id" variant="action" />,
|
|
127
57
|
);
|
|
128
|
-
// The Icon should be rendered as the first child of .tile__body
|
|
129
58
|
const body = getByTestId("test-id").querySelector(".tile__body");
|
|
130
59
|
expect(body.querySelector("svg")).toBeInTheDocument();
|
|
60
|
+
expect(body.lastElementChild.tagName).toBe("svg");
|
|
61
|
+
expect(body).not.toHaveClass("tile__body--action");
|
|
131
62
|
});
|
|
132
63
|
});
|
|
133
64
|
});
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
:host,
|
|
8
8
|
:host(.is-light),
|
|
9
9
|
.is-light,
|
|
10
|
-
.bg-white,
|
|
11
10
|
#root.is-light,
|
|
12
11
|
#root-modals.is-light,
|
|
13
12
|
#root-tooltips.is-light,
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
// Dark theme CSS variables
|
|
25
24
|
:host(.is-dark),
|
|
26
25
|
.is-dark,
|
|
27
|
-
.bg-black,
|
|
28
26
|
#root.is-dark,
|
|
29
27
|
#root-modals.is-dark,
|
|
30
28
|
#root-tooltips.is-dark,
|
|
@@ -56,149 +56,6 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// Legacy classes - DEPRECATED (add deprecation warnings)
|
|
60
|
-
.color-black {
|
|
61
|
-
@warn "Deprecated: Use .text-default instead of .color-black";
|
|
62
|
-
color: color.$black !important;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.color-orange {
|
|
66
|
-
@warn "Deprecated: Use .text-accent instead of .color-orange";
|
|
67
|
-
color: var(--color-text-accent) !important;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.color-gray {
|
|
71
|
-
@warn "Deprecated: Use .text-secondary instead of .color-gray";
|
|
72
|
-
color: color.$gray-800 !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.color-white {
|
|
76
|
-
@warn "Deprecated: Use .text-inverse instead of .color-white";
|
|
77
|
-
color: color.$white !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.color-blue {
|
|
81
|
-
@warn "Deprecated: Use .icon-information instead of .color-blue";
|
|
82
|
-
color: var(--color-icon-information) !important;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.color-danger {
|
|
86
|
-
@warn "Deprecated: Use .icon-negative instead of .color-danger";
|
|
87
|
-
color: var(--color-icon-negative) !important;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.bg-white {
|
|
91
|
-
@warn "Deprecated: Use .background-primary instead of .bg-white";
|
|
92
|
-
background-color: color.$white !important;
|
|
93
|
-
color: var(--color-text-default);
|
|
94
|
-
|
|
95
|
-
.color-blue,
|
|
96
|
-
&.color-blue {
|
|
97
|
-
color: var(--color-icon-information) !important; // enforce blue color
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.bg-black {
|
|
102
|
-
@warn "Deprecated: Use .background-contrast instead of .bg-black";
|
|
103
|
-
background-color: #141414 !important;
|
|
104
|
-
color: var(--color-text-inverse);
|
|
105
|
-
|
|
106
|
-
.color-gray,
|
|
107
|
-
&.color-gray {
|
|
108
|
-
color: color.$gray-500 !important; // enforce brighter gray
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.color-blue,
|
|
112
|
-
&.color-blue {
|
|
113
|
-
color: color.$blue !important; // enforce blue color
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.bg-orange {
|
|
118
|
-
@warn "Deprecated: Use .surface-secondary instead of .bg-orange";
|
|
119
|
-
background-color: var(--color-surface-secondary) !important;
|
|
120
|
-
color: color.$black !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.bg-orange-dark {
|
|
124
|
-
@warn "Deprecated: Use .surface-tertiary instead of .bg-orange-dark";
|
|
125
|
-
background-color: var(--color-surface-tertiary) !important;
|
|
126
|
-
color: var(--color-text-inverse) !important;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.bg-gray {
|
|
130
|
-
@warn "Deprecated: Use .surface-subtle instead of .bg-gray";
|
|
131
|
-
background-color: var(--color-surface-subtle) !important;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.bg-gray-lighter {
|
|
135
|
-
@warn "Deprecated: Use .background-secondary instead of .bg-gray-lighter";
|
|
136
|
-
background-color: var(--color-background-secondary) !important;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.bg-blue {
|
|
140
|
-
@warn "Deprecated: Use .fill-accent1 instead of .bg-blue";
|
|
141
|
-
background-color: var(--color-fill-accent1) !important;
|
|
142
|
-
color: color.$black !important;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.bg-green {
|
|
146
|
-
@warn "Deprecated: Use .fill-accent2 instead of .bg-green";
|
|
147
|
-
background-color: var(--color-fill-accent2) !important;
|
|
148
|
-
color: color.$black !important;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.bg-pink {
|
|
152
|
-
@warn "Deprecated: Use .fill-accent3 instead of .bg-pink";
|
|
153
|
-
background-color: var(--color-fill-accent3) !important;
|
|
154
|
-
color: color.$black !important;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.bg-violet {
|
|
158
|
-
@warn "Deprecated: Use .fill-accent4 instead of .bg-violet";
|
|
159
|
-
background-color: var(--color-fill-accent4) !important;
|
|
160
|
-
color: color.$black !important;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.bg-yellow {
|
|
164
|
-
@warn "Deprecated: Use .fill-accent5 instead of .bg-yellow";
|
|
165
|
-
background-color: var(--color-fill-accent5) !important;
|
|
166
|
-
color: color.$black !important;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.bg-yellow-lighter {
|
|
170
|
-
@warn "Deprecated: This class will be removed in future versions";
|
|
171
|
-
background-color: color.$yellow-lighter !important;
|
|
172
|
-
color: color.$black !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.bg-red {
|
|
176
|
-
@warn "Deprecated: Use .fill-negative instead of .bg-red";
|
|
177
|
-
background-color: color.$red !important;
|
|
178
|
-
color: color.$black !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.bg-accent {
|
|
182
|
-
@warn "Deprecated: Use .background-accent instead of .bg-accent";
|
|
183
|
-
background-color: var(--color-background-accent) !important;
|
|
184
|
-
color: var(--color-text-default) !important;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.bg-accent1-blog {
|
|
188
|
-
@warn "Deprecated: Use .background-accent1-blog instead of .bg-accent1-blog";
|
|
189
|
-
background-color: var(--color-background-accent1-blog) !important;
|
|
190
|
-
color: var(--color-text-default) !important;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.bg-accent2-blog {
|
|
194
|
-
@warn "Deprecated: Use .background-accent2-blog instead of .bg-accent2-blog";
|
|
195
|
-
background-color: var(--color-background-accent2-blog) !important;
|
|
196
|
-
color: var(--color-text-default) !important;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Legacy selection styles
|
|
200
|
-
.bg-orange,
|
|
201
|
-
.bg-orange-dark,
|
|
202
59
|
.surface-secondary,
|
|
203
60
|
.surface-tertiary {
|
|
204
61
|
&::selection {
|
|
@@ -207,16 +64,6 @@
|
|
|
207
64
|
}
|
|
208
65
|
}
|
|
209
66
|
|
|
210
|
-
.color-gray::selection {
|
|
211
|
-
color: var(--color-text-default);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Legacy classes - continued
|
|
215
|
-
.bg-none {
|
|
216
|
-
@warn "Deprecated: Use .background-none instead of .bg-none";
|
|
217
|
-
background: none !important;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
67
|
// Utility for removing background
|
|
221
68
|
.background-none {
|
|
222
69
|
background: none !important;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Changelog for Tile Component
|
|
2
|
-
|
|
3
|
-
## [Unreleased]
|
|
4
|
-
|
|
5
|
-
### Breaking Changes
|
|
6
|
-
|
|
7
|
-
- **Refactored color prop**: The `color` prop now uses global utility classes instead of component-specific color modifiers:
|
|
8
|
-
- Old: `color="white"` applied `.tile--white` class with custom CSS
|
|
9
|
-
- New: Uses global classes like `surface-primary`, `surface-secondary`, `background-contrast`, etc.
|
|
10
|
-
- Removed `"default"` and `"white"` color options
|
|
11
|
-
- Added support for: `"surface-primary"`, `"surface-secondary"`, `"surface-tertiary"`, `"surface-subtle"`, `"surface-moderate"`, `"surface-contrast"`, `"background-primary"`, `"background-secondary"`, `"background-contrast"`, `"background-accent"`
|
|
12
|
-
|
|
13
|
-
### Migration Guide
|
|
14
|
-
|
|
15
|
-
- Replace `color="white"` with `color="surface-primary"`
|
|
16
|
-
- Replace any custom styling that relied on `.tile--white` with global surface utility classes
|
|
17
|
-
- The new color system provides consistent styling across all components in the design system
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
|
|
21
|
-
- Update `Tile` component documentation and usage examples:
|
|
22
|
-
- Expanded usage examples in `Tile.mdx` and `/app/components/tile/page.mdx` to demonstrate:
|
|
23
|
-
- New color options using global utility classes
|
|
24
|
-
- Background image and icon support
|
|
25
|
-
- Alignment options with `hAlign` and `vAlign` props
|
|
26
|
-
- Block link and action variants
|
|
27
|
-
- Improved documentation for accessibility and prop usage.
|
|
28
|
-
- Added more realistic content and layout examples for `Tile` in various color and background scenarios.
|