@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.
Files changed (88) hide show
  1. package/build/components/index.js +2 -2
  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 +11 -8
  5. package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.d.ts +1 -1
  6. package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +1 -0
  7. package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +1 -1
  8. package/build/components/types/src/components/Button/index.d.ts +3 -4
  9. package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.d.ts +1 -1
  10. package/build/components/types/src/components/Forms/Select/index.d.ts +1 -1
  11. package/build/components/types/src/components/Grid/GridCol.d.ts +1 -1
  12. package/build/components/types/src/components/Icon/IconSearch.d.ts +2 -2
  13. package/build/components/types/src/components/Icon/IconSearchWrapper.d.ts +1 -1
  14. package/build/components/types/src/components/Link/Link.d.ts +2 -0
  15. package/build/components/types/src/components/Megamenu/Megamenu.d.ts +1 -1
  16. package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +1 -1
  17. package/build/components/types/src/components/Pagination/Separator.d.ts +2 -2
  18. package/build/components/types/src/components/Preview/Preview.d.ts +1 -1
  19. package/build/components/types/src/components/Preview/index.d.ts +1 -1
  20. package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +1 -1
  21. package/build/components/types/src/components/Table/Row.d.ts +1 -2
  22. package/build/components/types/src/components/Tooltip/tests/BaseWrapper.d.ts +1 -1
  23. package/build/components/types/src/docs/utils/SpacePreview.d.ts +1 -2
  24. package/build/components/types/src/scripts/modules/SameHeight.d.ts +3 -0
  25. package/build/components/types/src/styles/export/color.d.ts +23 -0
  26. package/build/lib/after-components.css +1 -1
  27. package/build/lib/after-components.css.map +1 -1
  28. package/build/lib/before-components.css +1 -1
  29. package/build/lib/before-components.css.map +1 -1
  30. package/build/lib/components.css +1 -1
  31. package/build/lib/components.css.map +1 -1
  32. package/build/lib/megamenu.css +1 -1
  33. package/build/lib/megamenu.css.map +1 -1
  34. package/build/lib/scripts.js +3 -3
  35. package/build/lib/scripts.js.map +1 -1
  36. package/build/lib/style.css +1 -1
  37. package/build/lib/style.css.map +1 -1
  38. package/build/lib/tsconfig.tsbuildinfo +1 -1
  39. package/build/sprite.svg +1 -1
  40. package/package.json +13 -13
  41. package/src/assets/icons/play.svg +4 -1
  42. package/src/components/Accordion/AccordionItem.tsx +1 -0
  43. package/src/components/Accordion/styles/config.scss +3 -2
  44. package/src/components/Accordion/styles/mixins.scss +2 -1
  45. package/src/components/Alert/styles/config.scss +1 -1
  46. package/src/components/AnchorNavigation/AnchorNavigation.static.ts +49 -7
  47. package/src/components/Bar/styles/mixins.scss +11 -11
  48. package/src/components/BodyBanner/styles/mixins.scss +5 -1
  49. package/src/components/Button/styles/config.scss +0 -1
  50. package/src/components/Button/styles/mixins.scss +1 -1
  51. package/src/components/Buttons/styles/mixins.scss +1 -1
  52. package/src/components/Card/styles/config.scss +1 -1
  53. package/src/components/Carousel/styles/mixins.scss +1 -1
  54. package/src/components/CarouselHero/styles/mixins.scss +1 -1
  55. package/src/components/CarouselPromotions/styles/mixins.scss +3 -3
  56. package/src/components/DocumentationSidebar/styles/style.scss +3 -3
  57. package/src/components/Expander/styles/style.scss +2 -2
  58. package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.js +1 -0
  59. package/src/components/Forms/Field/styles/config.scss +8 -8
  60. package/src/components/Forms/Fieldset/styles/mixins.scss +3 -3
  61. package/src/components/Gauge/styles/style.scss +1 -1
  62. package/src/components/IconList/styles/mixins.scss +5 -5
  63. package/src/components/Image/styles/mixins.scss +2 -2
  64. package/src/components/Link/Link.tsx +4 -0
  65. package/src/components/Link/styles/style.scss +8 -1
  66. package/src/components/List/styles/config.scss +12 -12
  67. package/src/components/List/styles/mixins.scss +16 -9
  68. package/src/components/Pagination/styles/mixins.scss +1 -1
  69. package/src/components/Progress/styles/config.scss +4 -4
  70. package/src/components/PromotionCard/styles/mixins.scss +1 -1
  71. package/src/components/Stepbar/styles/mixins.scss +1 -1
  72. package/src/components/Table/styles/mixins.scss +1 -1
  73. package/src/components/Tabs/styles/mixins.scss +1 -1
  74. package/src/components/Tag/styles/config.scss +18 -22
  75. package/src/components/Tag/styles/style.scss +1 -1
  76. package/src/styles/base/globals-forms.scss +8 -0
  77. package/src/styles/base/globals.scss +8 -1
  78. package/src/styles/export/color.js +1 -1
  79. package/src/styles/tokens/color.scss +1 -1
  80. package/src/styles/tokens/tag-colors.scss +20 -0
  81. package/src/styles/typography/config.scss +1 -1
  82. package/src/styles/typography/mixins.scss +5 -5
  83. package/src/styles/utilities/horizontal-scroll.scss +1 -1
  84. package/src/styles/utilities/layout.scss +1 -2
  85. package/build/components/index.css +0 -2
  86. package/build/components/index.css.map +0 -1
  87. package/build/lib/scripts.css +0 -2
  88. 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.14",
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": "^15.5.6",
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": "15.5.6",
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.4",
70
- "@babel/preset-env": "^7.28.3",
71
- "@babel/preset-react": "^7.27.1",
72
- "@babel/preset-typescript": "^7.27.1",
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": "^5.1.1",
74
+ "@rollup/plugin-alias": "6.0.0",
75
75
  "@rollup/plugin-babel": "^6.1.0",
76
- "@rollup/plugin-commonjs": "^28.0.8",
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.2.0",
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.1",
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": "^15.5.5",
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.2",
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" viewbox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M40.552 59.6 4 78.8V2l36.552 19.2L76 40.4 40.552 59.6Z" /></svg>
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>
@@ -55,6 +55,7 @@ const AccordionItem: React.FC<AccordionItemProps> = ({
55
55
  )}
56
56
  <div
57
57
  id={`${currentId}-section`}
58
+ role="region"
58
59
  aria-labelledby={currentId}
59
60
  className={cx("accordion__body", { "is-active": isActive })}
60
61
  {...(isActive ? {} : { hidden: true })}
@@ -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: convert.to-rem(20px) 0,
6
+ large: space.get() 0,
6
7
  );
7
8
 
8
- $enclosed-spacing: convert.to-rem(20px);
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 {
@@ -5,7 +5,7 @@
5
5
 
6
6
  $base: (
7
7
  max-width: convert.to-rem(590px),
8
- margin-bottom: space.get(),
8
+ margin-bottom: space.get("large"),
9
9
  padding: space.get("medium"),
10
10
  background: var(--color-fill-information),
11
11
  border: 1px solid var(--color-border-information),
@@ -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
- // Smooth scroll the navigation to center the active link
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
- activeLink.offsetLeft -
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 (!this.isAutoScrolling) {
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 './../../../styles/tokens/space';
2
- @use './../../../styles/tokens/breakpoint';
3
- @use './../../../styles/tools/generate';
4
- @use './../../../styles/tools/layout';
5
- @use './config';
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: 'horizontal', $space) {
44
- @if ($direction == 'horizontal') {
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: 'horizontal', $space) {
50
- @if ($direction == 'horizontal') {
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 == 'vertical') {
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 {
@@ -7,7 +7,6 @@ $base: (
7
7
  border: 2px solid transparent,
8
8
  font-size: convert.to-rem(18px),
9
9
  font-weight: bold,
10
- line-height: normal,
11
10
  border-radius: convert.to-rem(5px),
12
11
  ),
13
12
  active: (
@@ -47,7 +47,7 @@
47
47
 
48
48
  // Layout rules. Adds space between adjacent buttons and applies vertical spacing after a button.
49
49
  @mixin layout {
50
- margin-bottom: space.get();
50
+ margin-bottom: space.get("large");
51
51
 
52
52
  &:not(:last-of-type) {
53
53
  margin-right: space.get("small");
@@ -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,
@@ -4,7 +4,7 @@
4
4
 
5
5
  $card-base: (
6
6
  background-color: var(--color-surface-primary),
7
- margin-bottom: space.get(),
7
+ margin-bottom: space.get("large"),
8
8
  border-radius: convert.to-rem(10px),
9
9
  border: 1px solid var(--color-border-strong),
10
10
  overflow: hidden,
@@ -18,7 +18,7 @@
18
18
  flex-direction: column;
19
19
  margin: 0 auto;
20
20
  position: relative;
21
- margin-bottom: config.$space;
21
+ margin-bottom: space.get("large");
22
22
  }
23
23
 
24
24
  @mixin viewport-wrapper {
@@ -13,7 +13,7 @@
13
13
  @mixin base {
14
14
  margin: 0 auto;
15
15
  position: relative;
16
- margin-bottom: config.$space;
16
+ margin-bottom: space.get("large");
17
17
  background: var(--color-surface-primary);
18
18
  border-bottom: 1px solid var(--color-border-subtle);
19
19
  }
@@ -17,7 +17,7 @@
17
17
  @mixin base {
18
18
  margin: 0 auto;
19
19
  position: relative;
20
- margin-bottom: config.$space;
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('md', 'down') {
220
- @include generate.css-map(typography-config.$body-text, 'small');
219
+ @include breakpoint.get("md", "down") {
220
+ @include generate.css-map(typography-config.$body-text, "small");
221
221
  }
222
222
  }
223
223
 
@@ -161,10 +161,10 @@
161
161
 
162
162
  &:hover {
163
163
  color: var(--color-text-default);
164
+ }
164
165
 
165
- &--active {
166
- color: var(--color-text-inverse);
167
- }
166
+ &:hover &--active {
167
+ color: var(--color-text-inverse);
168
168
  }
169
169
 
170
170
  &--active {
@@ -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) {
@@ -28,6 +28,7 @@ describe("FeatureAccordion conformance", () => {
28
28
  expect(container).toHTMLValidate({
29
29
  rules: {
30
30
  "attribute-boolean-style": "off",
31
+ "prefer-native-element": "off",
31
32
  },
32
33
  });
33
34
  });
@@ -1,25 +1,25 @@
1
- @use '../../../../styles/tokens/space';
2
- @use '../../../../styles/tools/convert';
1
+ @use "../../../../styles/tokens/space";
2
+ @use "../../../../styles/tools/convert";
3
3
 
4
4
  $layout: (
5
- margin-bottom: space.get('medium'),
5
+ margin-bottom: space.get("large"),
6
6
  );
7
7
 
8
8
  $description: (
9
- margin-bottom: space.get('xsmall'),
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('xsmall'),
14
+ margin-bottom: space.get("xsmall"),
15
15
  );
16
16
 
17
17
  $radiocheck-control: (
18
- margin-right: space.get('small'),
18
+ margin-right: space.get("small"),
19
19
  margin-bottom: 0,
20
20
  );
21
21
 
22
22
  $hint: (
23
- margin-top: space.get('xsmall'),
24
- margin-bottom: space.get('xsmall'),
23
+ margin-top: space.get("xsmall"),
24
+ margin-bottom: space.get("xsmall"),
25
25
  );
@@ -1,6 +1,6 @@
1
- @use '../../../../styles/tokens/space';
1
+ @use "../../../../styles/tokens/space";
2
2
 
3
3
  @mixin legend-base {
4
4
  font-weight: bold;
5
- margin-bottom: space.get();
6
- };
5
+ margin-bottom: space.get("large");
6
+ }
@@ -7,7 +7,7 @@
7
7
  position: relative;
8
8
  width: convert.to-rem(220px);
9
9
  padding: 0;
10
- margin: 0 0 space.get() 0;
10
+ margin: 0 0 space.get("large") 0;
11
11
  text-align: center;
12
12
 
13
13
  &__dial {
@@ -1,13 +1,13 @@
1
- @use '../../../styles/tokens/space';
2
- @use '../../../styles/tools/convert';
1
+ @use "../../../styles/tokens/space";
2
+ @use "../../../styles/tools/convert";
3
3
  @use "../../../styles/typography/mixins" as typoMixins;
4
- @use './config';
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('small');
18
+ margin-bottom: space.get("small");
19
19
  }
20
20
 
21
21
  @mixin icon($spacing: config.$spacing) {
@@ -1,4 +1,4 @@
1
- @use '../../../styles/tokens/space';
1
+ @use "../../../styles/tokens/space";
2
2
 
3
3
  @mixin base() {
4
4
  display: inline-block;
@@ -8,5 +8,5 @@
8
8
  }
9
9
 
10
10
  @mixin spacing() {
11
- margin-bottom: space.get('medium');
11
+ margin-bottom: space.get("large");
12
12
  }
@@ -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) !important;
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 '../../../styles/tokens/base';
2
- @use '../../../styles/tokens/space';
3
- @use '../../../styles/tokens/color';
1
+ @use "../../../styles/tokens/base";
2
+ @use "../../../styles/tokens/space";
3
+ @use "../../../styles/tokens/color";
4
4
 
5
5
  $spacing: (
6
- 'default': space.get(),
7
- 'small': space.get('small'),
6
+ "default": space.get(),
7
+ "small": space.get("small"),
8
8
  );
9
9
 
10
10
  $enclosed-spacing: space.get();
11
11
 
12
- $border: 2px solid;
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-subtle),
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-subtle),
22
+ border-color: var(--color-border-strong),
23
23
  ),
24
24
  );
25
25
 
26
26
  $control-states: (
27
- 'default': (
27
+ "default": (
28
28
  font-weight: bold,
29
29
  color: var(--color-text-primary),
30
30
  ),
31
- 'hover': (
31
+ "hover": (
32
32
  color: var(--color-surface-secondary),
33
33
  text-decoration: none,
34
34
  ),
35
- 'focus': (
35
+ "focus": (
36
36
  outline: base.$focus-outline,
37
- )
37
+ ),
38
38
  );