@orangesk/orange-design-system 2.0.0-beta.14 → 2.0.0-beta.16
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 +2 -2
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +11 -8
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.d.ts +1 -1
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +1 -0
- package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +1 -1
- package/build/components/types/src/components/Button/index.d.ts +3 -4
- package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.d.ts +1 -1
- package/build/components/types/src/components/Forms/Select/index.d.ts +1 -1
- package/build/components/types/src/components/Grid/GridCol.d.ts +1 -1
- package/build/components/types/src/components/Icon/IconSearch.d.ts +2 -2
- package/build/components/types/src/components/Icon/IconSearchWrapper.d.ts +1 -1
- package/build/components/types/src/components/Link/Link.d.ts +2 -0
- package/build/components/types/src/components/Megamenu/Megamenu.d.ts +1 -1
- package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +1 -1
- package/build/components/types/src/components/Pagination/Separator.d.ts +2 -2
- package/build/components/types/src/components/Preview/Preview.d.ts +1 -1
- package/build/components/types/src/components/Preview/index.d.ts +1 -1
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +1 -1
- package/build/components/types/src/components/Table/Row.d.ts +1 -2
- package/build/components/types/src/components/Tooltip/tests/BaseWrapper.d.ts +1 -1
- package/build/components/types/src/docs/utils/SpacePreview.d.ts +1 -2
- package/build/components/types/src/scripts/modules/SameHeight.d.ts +3 -0
- package/build/components/types/src/styles/export/color.d.ts +23 -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/megamenu.css +1 -1
- package/build/lib/megamenu.css.map +1 -1
- package/build/lib/scripts.js +3 -3
- 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/sprite.svg +1 -1
- package/package.json +13 -13
- package/src/assets/icons/play.svg +4 -1
- package/src/components/Accordion/AccordionItem.tsx +1 -0
- package/src/components/Accordion/styles/config.scss +3 -2
- package/src/components/Accordion/styles/mixins.scss +2 -1
- package/src/components/Alert/styles/config.scss +1 -1
- package/src/components/AnchorNavigation/AnchorNavigation.static.ts +49 -7
- package/src/components/Bar/styles/mixins.scss +11 -11
- package/src/components/BodyBanner/styles/mixins.scss +5 -1
- package/src/components/Button/styles/config.scss +0 -1
- package/src/components/Button/styles/mixins.scss +1 -1
- package/src/components/Buttons/styles/mixins.scss +1 -1
- package/src/components/Card/styles/config.scss +1 -1
- package/src/components/Carousel/styles/mixins.scss +1 -1
- package/src/components/CarouselHero/styles/mixins.scss +1 -1
- package/src/components/CarouselPromotions/styles/mixins.scss +3 -3
- package/src/components/DocumentationSidebar/styles/style.scss +3 -3
- package/src/components/Expander/styles/style.scss +2 -2
- package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.js +1 -0
- package/src/components/Forms/Field/styles/config.scss +8 -8
- package/src/components/Forms/Fieldset/styles/mixins.scss +3 -3
- package/src/components/Gauge/styles/style.scss +1 -1
- package/src/components/IconList/styles/mixins.scss +5 -5
- package/src/components/Image/styles/mixins.scss +2 -2
- package/src/components/Link/Link.tsx +4 -0
- package/src/components/Link/styles/style.scss +8 -1
- package/src/components/List/styles/config.scss +12 -12
- package/src/components/List/styles/mixins.scss +16 -9
- package/src/components/Pagination/styles/mixins.scss +1 -1
- package/src/components/Progress/styles/config.scss +4 -4
- package/src/components/PromotionCard/styles/mixins.scss +1 -1
- package/src/components/Stepbar/styles/mixins.scss +1 -1
- package/src/components/Table/styles/mixins.scss +1 -1
- package/src/components/Tabs/styles/mixins.scss +1 -1
- package/src/components/Tag/styles/config.scss +18 -22
- package/src/components/Tag/styles/style.scss +1 -1
- package/src/styles/base/globals-forms.scss +8 -0
- package/src/styles/base/globals.scss +8 -1
- package/src/styles/export/color.js +1 -1
- package/src/styles/tokens/color.scss +1 -1
- package/src/styles/tokens/tag-colors.scss +20 -0
- package/src/styles/typography/config.scss +1 -1
- package/src/styles/typography/mixins.scss +5 -5
- package/src/styles/utilities/horizontal-scroll.scss +1 -1
- package/src/styles/utilities/layout.scss +1 -2
- package/build/components/index.css +0 -2
- package/build/components/index.css.map +0 -1
- package/build/lib/scripts.css +0 -2
- package/build/lib/scripts.css.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangesk/orange-design-system",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.x"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@cloudfour/transition-hidden-element": "^2.0.2",
|
|
35
35
|
"@mdx-js/loader": "^3.1.1",
|
|
36
36
|
"@mdx-js/react": "^3.1.1",
|
|
37
|
-
"@next/mdx": "
|
|
37
|
+
"@next/mdx": "16.0.1",
|
|
38
38
|
"@orangesk/accessible-autocomplete": "^3.1.2",
|
|
39
39
|
"@popperjs/core": "^2.11.8",
|
|
40
40
|
"@types/mdx": "^2.0.13",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"html-react-parser": "^5.2.7",
|
|
47
47
|
"jest-environment-jsdom": "^30.2.0",
|
|
48
48
|
"lorem-ipsum": "^2.0.8",
|
|
49
|
-
"next": "
|
|
49
|
+
"next": "16.0.1",
|
|
50
50
|
"normalize.css": "^8.0.1",
|
|
51
51
|
"nouislider": "^15.8.1",
|
|
52
52
|
"pretty": "^2.0.0",
|
|
@@ -66,36 +66,36 @@
|
|
|
66
66
|
"wnumb": "^1.2.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@babel/core": "^7.28.
|
|
70
|
-
"@babel/preset-env": "^7.28.
|
|
71
|
-
"@babel/preset-react": "^7.
|
|
72
|
-
"@babel/preset-typescript": "^7.
|
|
69
|
+
"@babel/core": "^7.28.5",
|
|
70
|
+
"@babel/preset-env": "^7.28.5",
|
|
71
|
+
"@babel/preset-react": "^7.28.5",
|
|
72
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
73
73
|
"@eslint/eslintrc": "3.3.1",
|
|
74
|
-
"@rollup/plugin-alias": "
|
|
74
|
+
"@rollup/plugin-alias": "6.0.0",
|
|
75
75
|
"@rollup/plugin-babel": "^6.1.0",
|
|
76
|
-
"@rollup/plugin-commonjs": "
|
|
76
|
+
"@rollup/plugin-commonjs": "29.0.0",
|
|
77
77
|
"@rollup/plugin-json": "^6.1.0",
|
|
78
78
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
79
79
|
"@rollup/plugin-terser": "^0.4.4",
|
|
80
|
-
"@rollup/plugin-typescript": "^12.
|
|
80
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
81
81
|
"@rollup/plugin-url": "^8.0.2",
|
|
82
82
|
"@testing-library/dom": "^10.4.1",
|
|
83
83
|
"@testing-library/jest-dom": "^6.9.1",
|
|
84
84
|
"@testing-library/react": "^16.3.0",
|
|
85
85
|
"@testing-library/user-event": "^14.6.1",
|
|
86
|
-
"@types/node": "^24.9.
|
|
86
|
+
"@types/node": "^24.9.2",
|
|
87
87
|
"@types/pretty": "^2.0.3",
|
|
88
88
|
"@types/react": "19.2.2",
|
|
89
89
|
"@types/react-dom": "19.2.2",
|
|
90
90
|
"@types/wnumb": "^1.2.3",
|
|
91
91
|
"babel-jest": "30.2.0",
|
|
92
92
|
"eslint": "latest",
|
|
93
|
-
"eslint-config-next": "
|
|
93
|
+
"eslint-config-next": "16.0.1",
|
|
94
94
|
"eslint-config-prettier": "^10.1.8",
|
|
95
95
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
96
96
|
"fs-extra": "^11.3.2",
|
|
97
97
|
"glob": "^11.0.3",
|
|
98
|
-
"html-validate": "10.1
|
|
98
|
+
"html-validate": "10.2.1",
|
|
99
99
|
"husky": "^9.1.7",
|
|
100
100
|
"identity-obj-proxy": "^3.0.0",
|
|
101
101
|
"jest": "30.2.0",
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
<svg width="80" height="80"
|
|
1
|
+
<svg width="80" height="80" viewBox="0 0 80 80" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.552 59.6L8 78.8V2L44.552 21.2L80 40.4L44.552 59.6Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@use "../../../styles/tools/convert";
|
|
2
|
+
@use "../../../styles/tokens/space";
|
|
2
3
|
|
|
3
4
|
$spacing: (
|
|
4
5
|
default: convert.to-rem(15px) 0,
|
|
5
|
-
large:
|
|
6
|
+
large: space.get() 0,
|
|
6
7
|
);
|
|
7
8
|
|
|
8
|
-
$enclosed-spacing:
|
|
9
|
+
$enclosed-spacing: space.get();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@mixin base {
|
|
13
13
|
@include typoMixins.list-unstyled;
|
|
14
14
|
|
|
15
|
-
margin-bottom: space.get();
|
|
15
|
+
margin-bottom: space.get("large");
|
|
16
16
|
padding-left: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
align-items: center;
|
|
64
64
|
justify-content: space-between;
|
|
65
65
|
width: 100%;
|
|
66
|
+
text-align: left;
|
|
66
67
|
|
|
67
68
|
&:hover,
|
|
68
69
|
&:focus-visible {
|
|
@@ -7,6 +7,7 @@ export default class AnchorNavigation {
|
|
|
7
7
|
private scrollEndHandler: () => void;
|
|
8
8
|
private resizeHandler: () => void;
|
|
9
9
|
private isAutoScrolling: boolean = false;
|
|
10
|
+
private scrollTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
10
11
|
private navLinks: NodeListOf<HTMLAnchorElement> | null = null;
|
|
11
12
|
private sections: HTMLElement[] = [];
|
|
12
13
|
private currentPath: string;
|
|
@@ -225,17 +226,32 @@ export default class AnchorNavigation {
|
|
|
225
226
|
if (activeLink) {
|
|
226
227
|
activeLink.classList.add("is-active");
|
|
227
228
|
|
|
228
|
-
//
|
|
229
|
+
// Scroll the navigation to center the active link
|
|
229
230
|
const contentLeft = this.element.querySelector(
|
|
230
231
|
".anchor-navigation__content-left",
|
|
231
232
|
) as HTMLElement;
|
|
232
233
|
if (contentLeft) {
|
|
234
|
+
const targetScrollLeft =
|
|
235
|
+
activeLink.offsetLeft -
|
|
236
|
+
this.element.clientWidth / 2 +
|
|
237
|
+
activeLink.clientWidth / 2;
|
|
238
|
+
|
|
239
|
+
// Check if item is already visible
|
|
240
|
+
const itemLeft = activeLink.offsetLeft;
|
|
241
|
+
const itemRight = itemLeft + activeLink.clientWidth;
|
|
242
|
+
const viewportLeft = contentLeft.scrollLeft;
|
|
243
|
+
const viewportRight = viewportLeft + contentLeft.clientWidth;
|
|
244
|
+
|
|
245
|
+
const isVisible =
|
|
246
|
+
itemLeft >= viewportLeft && itemRight <= viewportRight;
|
|
247
|
+
|
|
248
|
+
// Use instant scroll on mobile for better performance, smooth on desktop
|
|
249
|
+
const isMobile = window.innerWidth < 768;
|
|
250
|
+
const behavior = isMobile || !isVisible ? "auto" : "smooth";
|
|
251
|
+
|
|
233
252
|
contentLeft.scrollTo({
|
|
234
|
-
left:
|
|
235
|
-
|
|
236
|
-
this.element.clientWidth / 2 +
|
|
237
|
-
activeLink.clientWidth / 2,
|
|
238
|
-
behavior: "smooth",
|
|
253
|
+
left: Math.max(0, targetScrollLeft),
|
|
254
|
+
behavior: behavior as ScrollBehavior,
|
|
239
255
|
});
|
|
240
256
|
}
|
|
241
257
|
}
|
|
@@ -243,12 +259,28 @@ export default class AnchorNavigation {
|
|
|
243
259
|
}
|
|
244
260
|
|
|
245
261
|
private handleScrollSpy(): void {
|
|
246
|
-
if (
|
|
262
|
+
if (this.isAutoScrolling) {
|
|
263
|
+
// Clear existing timeout and set a new one
|
|
264
|
+
if (this.scrollTimeout) {
|
|
265
|
+
clearTimeout(this.scrollTimeout);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Set a timeout to detect when scrolling has ended
|
|
269
|
+
this.scrollTimeout = setTimeout(() => {
|
|
270
|
+
this.isAutoScrolling = false;
|
|
271
|
+
this.scrollTimeout = null;
|
|
272
|
+
this.initScrollSpy();
|
|
273
|
+
}, 150);
|
|
274
|
+
} else {
|
|
247
275
|
this.initScrollSpy();
|
|
248
276
|
}
|
|
249
277
|
}
|
|
250
278
|
|
|
251
279
|
private handleScrollEnd(): void {
|
|
280
|
+
if (this.scrollTimeout) {
|
|
281
|
+
clearTimeout(this.scrollTimeout);
|
|
282
|
+
this.scrollTimeout = null;
|
|
283
|
+
}
|
|
252
284
|
this.isAutoScrolling = false;
|
|
253
285
|
this.initScrollSpy();
|
|
254
286
|
}
|
|
@@ -259,6 +291,11 @@ export default class AnchorNavigation {
|
|
|
259
291
|
}
|
|
260
292
|
|
|
261
293
|
destroy(): void {
|
|
294
|
+
if (this.scrollTimeout) {
|
|
295
|
+
clearTimeout(this.scrollTimeout);
|
|
296
|
+
this.scrollTimeout = null;
|
|
297
|
+
}
|
|
298
|
+
|
|
262
299
|
window.removeEventListener("scroll", this.scrollHandler);
|
|
263
300
|
window.removeEventListener("scroll", this.scrollSpyHandler);
|
|
264
301
|
window.removeEventListener("scrollend", this.scrollEndHandler);
|
|
@@ -278,6 +315,11 @@ export default class AnchorNavigation {
|
|
|
278
315
|
}
|
|
279
316
|
|
|
280
317
|
update(): void {
|
|
318
|
+
if (this.scrollTimeout) {
|
|
319
|
+
clearTimeout(this.scrollTimeout);
|
|
320
|
+
this.scrollTimeout = null;
|
|
321
|
+
}
|
|
322
|
+
|
|
281
323
|
window.removeEventListener("scroll", this.scrollHandler);
|
|
282
324
|
window.removeEventListener("scroll", this.scrollSpyHandler);
|
|
283
325
|
window.removeEventListener("scrollend", this.scrollEndHandler);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
1
|
+
@use "./../../../styles/tokens/space";
|
|
2
|
+
@use "./../../../styles/tokens/breakpoint";
|
|
3
|
+
@use "./../../../styles/tools/generate";
|
|
4
|
+
@use "./../../../styles/tools/layout";
|
|
5
|
+
@use "./config";
|
|
6
6
|
|
|
7
7
|
@mixin bar-base {
|
|
8
8
|
display: flex;
|
|
9
|
-
margin-bottom: space.get();
|
|
9
|
+
margin-bottom: space.get("large");
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@mixin bar-horizontal() {
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
@mixin bar-spacing($direction:
|
|
44
|
-
@if ($direction ==
|
|
43
|
+
@mixin bar-spacing($direction: "horizontal", $space) {
|
|
44
|
+
@if ($direction == "horizontal") {
|
|
45
45
|
margin-top: -($space);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@mixin bar-item-spacing($direction:
|
|
50
|
-
@if ($direction ==
|
|
49
|
+
@mixin bar-item-spacing($direction: "horizontal", $space) {
|
|
50
|
+
@if ($direction == "horizontal") {
|
|
51
51
|
margin-top: $space;
|
|
52
52
|
margin-right: $space;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
@if ($direction ==
|
|
55
|
+
@if ($direction == "vertical") {
|
|
56
56
|
margin-bottom: $space;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
@use "../../../styles/tools/generate";
|
|
4
4
|
@use "../../../styles/tokens/space";
|
|
5
5
|
@use "../../../styles/tokens/breakpoint";
|
|
6
|
-
// @use "./config";
|
|
7
6
|
|
|
8
7
|
@mixin body-banner {
|
|
9
8
|
display: flex;
|
|
10
9
|
color: var(--color-text-default);
|
|
11
10
|
background-color: var(--color-background-primary);
|
|
12
11
|
border: 1px solid var(--color-border-subtle);
|
|
12
|
+
|
|
13
|
+
&.grid {
|
|
14
|
+
margin-left: 0 !important;
|
|
15
|
+
margin-right: 0 !important;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
@mixin content {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-flow: row wrap;
|
|
12
12
|
max-width: calc(100% - #{$spacing});
|
|
13
|
-
margin: ($spacing * -1) ($spacing * -1) space.get() 0;
|
|
13
|
+
margin: ($spacing * -1) ($spacing * -1) space.get("large") 0;
|
|
14
14
|
|
|
15
15
|
#{$button-selector},
|
|
16
16
|
#{$button-selector}:last-child,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@mixin base {
|
|
18
18
|
margin: 0 auto;
|
|
19
19
|
position: relative;
|
|
20
|
-
margin-bottom:
|
|
20
|
+
margin-bottom: space.get("large");
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@mixin viewport-wrapper {
|
|
@@ -216,8 +216,8 @@
|
|
|
216
216
|
padding: space.get("medium");
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
@include breakpoint.get(
|
|
220
|
-
@include generate.css-map(typography-config.$body-text,
|
|
219
|
+
@include breakpoint.get("md", "down") {
|
|
220
|
+
@include generate.css-map(typography-config.$body-text, "small");
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
8
8
|
.expander {
|
|
9
|
-
margin-bottom: space.get();
|
|
9
|
+
margin-bottom: space.get("large");
|
|
10
10
|
font-size: convert.to-rem(18px);
|
|
11
11
|
|
|
12
12
|
summary {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
summary {
|
|
59
|
-
margin-bottom: space.get();
|
|
59
|
+
margin-bottom: space.get("large");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.expander__summary:has(+ .expander__summary--opened) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "../../../../styles/tokens/space";
|
|
2
|
+
@use "../../../../styles/tools/convert";
|
|
3
3
|
|
|
4
4
|
$layout: (
|
|
5
|
-
margin-bottom: space.get(
|
|
5
|
+
margin-bottom: space.get("large"),
|
|
6
6
|
);
|
|
7
7
|
|
|
8
8
|
$description: (
|
|
9
|
-
margin-bottom: space.get(
|
|
9
|
+
margin-bottom: space.get("xsmall"),
|
|
10
10
|
max-width: convert.to-rem(350px),
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
$input-control: (
|
|
14
|
-
margin-bottom: space.get(
|
|
14
|
+
margin-bottom: space.get("xsmall"),
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
$radiocheck-control: (
|
|
18
|
-
margin-right: space.get(
|
|
18
|
+
margin-right: space.get("small"),
|
|
19
19
|
margin-bottom: 0,
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
$hint: (
|
|
23
|
-
margin-top: space.get(
|
|
24
|
-
margin-bottom: space.get(
|
|
23
|
+
margin-top: space.get("xsmall"),
|
|
24
|
+
margin-bottom: space.get("xsmall"),
|
|
25
25
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "../../../styles/tokens/space";
|
|
2
|
+
@use "../../../styles/tools/convert";
|
|
3
3
|
@use "../../../styles/typography/mixins" as typoMixins;
|
|
4
|
-
@use
|
|
4
|
+
@use "./config";
|
|
5
5
|
|
|
6
6
|
@mixin base() {
|
|
7
7
|
@include typoMixins.list-unstyled;
|
|
8
8
|
@include typoMixins.text-readable;
|
|
9
9
|
|
|
10
|
-
margin: 0 0 space.get() 0;
|
|
10
|
+
margin: 0 0 space.get("large") 0;
|
|
11
11
|
padding: 0;
|
|
12
12
|
font-weight: bold;
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@mixin item($spacing: config.$spacing) {
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-flow: row;
|
|
18
|
-
margin-bottom: space.get(
|
|
18
|
+
margin-bottom: space.get("small");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
@mixin icon($spacing: config.$spacing) {
|
|
@@ -18,6 +18,8 @@ export interface LinkProps {
|
|
|
18
18
|
isUnderline?: boolean;
|
|
19
19
|
/** whether the link should have normal font weight */
|
|
20
20
|
isNormal?: boolean;
|
|
21
|
+
/** when true, adds the .link--no-accent modifier to disable orange accent color on hover (useful for dark backgrounds) */
|
|
22
|
+
noAccent?: boolean;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export const Link: React.FC<LinkProps & React.HTMLAttributes<HTMLElement>> = ({
|
|
@@ -26,6 +28,7 @@ export const Link: React.FC<LinkProps & React.HTMLAttributes<HTMLElement>> = ({
|
|
|
26
28
|
colorScheme,
|
|
27
29
|
isUnderline,
|
|
28
30
|
isNormal,
|
|
31
|
+
noAccent,
|
|
29
32
|
tag = "a",
|
|
30
33
|
href,
|
|
31
34
|
...other
|
|
@@ -37,6 +40,7 @@ export const Link: React.FC<LinkProps & React.HTMLAttributes<HTMLElement>> = ({
|
|
|
37
40
|
"is-light": colorScheme === "light",
|
|
38
41
|
underline: isUnderline,
|
|
39
42
|
normal: isNormal,
|
|
43
|
+
"link--no-accent": noAccent,
|
|
40
44
|
},
|
|
41
45
|
className,
|
|
42
46
|
);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@include mixins.base-inherit();
|
|
25
25
|
|
|
26
26
|
&:hover {
|
|
27
|
-
color: var(--color-text-accent)
|
|
27
|
+
color: var(--color-text-accent);
|
|
28
28
|
text-decoration: underline;
|
|
29
29
|
}
|
|
30
30
|
&:focus {
|
|
@@ -44,3 +44,10 @@
|
|
|
44
44
|
@include mixins.icon-right;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
@layer utilities {
|
|
49
|
+
.link--no-accent:hover {
|
|
50
|
+
color: inherit !important;
|
|
51
|
+
text-decoration: underline;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
1
|
+
@use "../../../styles/tokens/base";
|
|
2
|
+
@use "../../../styles/tokens/space";
|
|
3
|
+
@use "../../../styles/tokens/color";
|
|
4
4
|
|
|
5
5
|
$spacing: (
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
"default": space.get(),
|
|
7
|
+
"small": space.get("small"),
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
$enclosed-spacing: space.get();
|
|
11
11
|
|
|
12
|
-
$border:
|
|
12
|
+
$border: 1px solid;
|
|
13
13
|
|
|
14
14
|
$color-palette: (
|
|
15
15
|
default: (
|
|
16
16
|
background-color: var(--color-background-primary),
|
|
17
|
-
border-color: var(--color-border-
|
|
17
|
+
border-color: var(--color-border-strong),
|
|
18
18
|
),
|
|
19
19
|
|
|
20
20
|
gray: (
|
|
21
21
|
background-color: var(--color-surface-subtle),
|
|
22
|
-
border-color: var(--color-border-
|
|
22
|
+
border-color: var(--color-border-strong),
|
|
23
23
|
),
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
$control-states: (
|
|
27
|
-
|
|
27
|
+
"default": (
|
|
28
28
|
font-weight: bold,
|
|
29
29
|
color: var(--color-text-primary),
|
|
30
30
|
),
|
|
31
|
-
|
|
31
|
+
"hover": (
|
|
32
32
|
color: var(--color-surface-secondary),
|
|
33
33
|
text-decoration: none,
|
|
34
34
|
),
|
|
35
|
-
|
|
35
|
+
"focus": (
|
|
36
36
|
outline: base.$focus-outline,
|
|
37
|
-
)
|
|
37
|
+
),
|
|
38
38
|
);
|