@orangesk/orange-design-system 2.0.0-beta.41 → 2.0.0-beta.43

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 (51) hide show
  1. package/build/components/AnchorNavigation/style.css +1 -1
  2. package/build/components/AnchorNavigation/style.css.map +1 -1
  3. package/build/components/BlockAction/style.css +1 -1
  4. package/build/components/BlockAction/style.css.map +1 -1
  5. package/build/components/Buttons/style.css +1 -1
  6. package/build/components/Buttons/style.css.map +1 -1
  7. package/build/components/Carousel/style.css +1 -1
  8. package/build/components/Carousel/style.css.map +1 -1
  9. package/build/components/Grid/style.css +1 -1
  10. package/build/components/Grid/style.css.map +1 -1
  11. package/build/components/Link/style.css +1 -1
  12. package/build/components/Link/style.css.map +1 -1
  13. package/build/components/Megamenu/style.css +1 -1
  14. package/build/components/Megamenu/style.css.map +1 -1
  15. package/build/components/Modal/style.css +1 -1
  16. package/build/components/Modal/style.css.map +1 -1
  17. package/build/components/index.js +1 -1
  18. package/build/components/index.js.map +1 -1
  19. package/build/components/tsconfig.tsbuildinfo +1 -1
  20. package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +40 -0
  21. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +0 -5
  22. package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +3 -0
  23. package/build/components/types/src/components/Modal/Modal.static.d.ts +1 -0
  24. package/build/lib/components.css +1 -1
  25. package/build/lib/components.css.map +1 -1
  26. package/build/lib/megamenu.css +1 -1
  27. package/build/lib/megamenu.css.map +1 -1
  28. package/build/lib/megamenu.js +1 -1
  29. package/build/lib/megamenu.js.map +1 -1
  30. package/build/lib/scripts.js +1 -1
  31. package/build/lib/scripts.js.map +1 -1
  32. package/build/lib/style.css +1 -1
  33. package/build/lib/style.css.map +1 -1
  34. package/build/lib/tsconfig.tsbuildinfo +1 -1
  35. package/build/sprite.svg +1 -1
  36. package/package.json +23 -23
  37. package/src/assets/icons/youtube.svg +3 -1
  38. package/src/components/AnchorNavigation/AnchorNavigation.static.ts +385 -77
  39. package/src/components/AnchorNavigation/styles/mixins.scss +18 -2
  40. package/src/components/AnchorNavigation/tests/AnchorNavigation.unit.test.jsx +266 -8
  41. package/src/components/BlockAction/styles/mixins.scss +1 -1
  42. package/src/components/Buttons/styles/mixins.scss +8 -13
  43. package/src/components/Carousel/Carousel.static.ts +5 -26
  44. package/src/components/Carousel/styles/mixins.scss +1 -1
  45. package/src/components/Carousel/tests/Carousel.static.test.jsx +117 -0
  46. package/src/components/Grid/styles/mixins.scss +14 -6
  47. package/src/components/Link/styles/mixins.scss +0 -1
  48. package/src/components/Megamenu/Megamenu.static.ts +27 -1
  49. package/src/components/Megamenu/styles/mixins.scss +4 -0
  50. package/src/components/Modal/Modal.static.ts +29 -7
  51. package/src/components/Modal/styles/mixins.scss +4 -0
@@ -1,9 +1,13 @@
1
1
  export default class AnchorNavigation {
2
+ private static readonly MODAL_OPEN_BODY_CLASS;
3
+ private static readonly STICKY_FLOAT_TOLERANCE;
2
4
  private static readonly SCROLLSPY_CENTER_BUFFER;
3
5
  private static readonly TOP_SECTION_THRESHOLD;
4
6
  private static readonly DRAG_START_THRESHOLD;
5
7
  private static readonly SCROLL_END_DEBOUNCE_MS;
6
8
  private static readonly SCROLL_EDGE_TOLERANCE;
9
+ private static readonly SCROLL_ALIGNMENT_TOLERANCE;
10
+ private static readonly MAX_SCROLL_CORRECTIONS;
7
11
  private element;
8
12
  private contentLeftElement;
9
13
  private megamenuElement;
@@ -33,15 +37,37 @@ export default class AnchorNavigation {
33
37
  private sections;
34
38
  private currentPath;
35
39
  private lastActiveIndex;
40
+ private autoScrollTargetId;
41
+ private autoScrollCorrectionCount;
42
+ private lastStickyOffset;
43
+ private modalClassObserver;
44
+ private modalStateHandler;
45
+ private isForcedFixed;
46
+ private wasStickyFloating;
47
+ private forcedFixedTop;
48
+ private forcedFixedLeft;
49
+ private fixedFlowPlaceholder;
50
+ private originalInlineStyles;
36
51
  constructor(element: HTMLElement);
37
52
  static getInstance(el: HTMLElement): AnchorNavigation | null;
38
53
  private findMegamenuElement;
54
+ private getMegamenuOffsetHeight;
39
55
  private updateStickyPosition;
40
56
  private setupMegamenuObserver;
41
57
  private setupScrollSpy;
42
58
  private teardownScrollSpyListeners;
43
59
  private handleMouseDown;
44
60
  private handleAnchorClick;
61
+ private getHashSectionId;
62
+ private startAutoScroll;
63
+ private resetAutoScrollState;
64
+ private tryCorrectAutoScrollAlignment;
65
+ private getTotalStickyOffset;
66
+ private getConfiguredScrollPaddingTop;
67
+ private getEffectiveScrollOffset;
68
+ private getTargetTop;
69
+ private scrollToSection;
70
+ private alignInitialHashIfNeeded;
45
71
  private initScrollSpy;
46
72
  private scrollActiveLinkIntoView;
47
73
  private setupDragScroll;
@@ -54,6 +80,20 @@ export default class AnchorNavigation {
54
80
  private handleNativeDragStart;
55
81
  private handleScrollEndFallback;
56
82
  private handleResize;
83
+ private isAnyModalOpen;
84
+ private isCurrentlyStickyFloating;
85
+ private updateStickyFloatingState;
86
+ private ensureFixedFlowPlaceholder;
87
+ private removeFixedFlowPlaceholder;
88
+ private applyFixedPosition;
89
+ private restoreStickyPosition;
90
+ private handleModalStateChange;
91
+ private setupModalObserver;
92
+ private teardownModalObserver;
93
+ private teardownMegamenuObserver;
94
+ private clearAutoScrollTimers;
95
+ private resetFixedPositionState;
96
+ private resetNavigationState;
57
97
  private handleScrollSpy;
58
98
  private handleScrollEnd;
59
99
  private init;
@@ -33,11 +33,6 @@ export default class Carousel {
33
33
  * Carousel is enabled only when there are more slides than can fit in the current viewport.
34
34
  */
35
35
  private updateCarouselEnabledState;
36
- /**
37
- * Apply negative margin-right to carousel track when all slides fit on screen.
38
- * This compensates for the 20px padding-right on each slide, ensuring proper grid alignment.
39
- */
40
- private applyTrackMarginCompensation;
41
36
  private applyBleedInsets;
42
37
  /**
43
38
  * Configure bleed-right carousel to extend beyond the container edge.
@@ -25,6 +25,9 @@ export default class Megamenu {
25
25
  mousedownHandler: () => void;
26
26
  touchstartHandler: () => void;
27
27
  instanceName: string;
28
+ private isModalOpen;
29
+ private getLockedScrollTop;
30
+ private getEffectiveScrollY;
28
31
  constructor(element: HTMLElement, config?: MegamenuConfig);
29
32
  static getInstance(el: HTMLElement): Megamenu | null;
30
33
  init(): void;
@@ -30,6 +30,7 @@ export default class Modal {
30
30
  update(): void;
31
31
  static moveToModalRoot(el: HTMLElement, container: Element | null): void;
32
32
  private static isLocked;
33
+ private static resolveBodyLockClassName;
33
34
  static lockBody(className?: string, root?: string): void;
34
35
  static unlockBody(className?: string, root?: string): void;
35
36
  }