@orangesk/orange-design-system 2.0.0-beta.18 → 2.0.0-beta.19

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 (45) hide show
  1. package/build/components/Accordion/style.css +1 -1
  2. package/build/components/Accordion/style.css.map +1 -1
  3. package/build/components/AnchorNavigation/style.css +1 -1
  4. package/build/components/AnchorNavigation/style.css.map +1 -1
  5. package/build/components/Megamenu/style.css +1 -1
  6. package/build/components/Megamenu/style.css.map +1 -1
  7. package/build/components/index.js +1 -23
  8. package/build/components/index.js.map +1 -1
  9. package/build/components/tsconfig.tsbuildinfo +1 -1
  10. package/build/components/types/index.d.ts +2 -2
  11. package/build/components/types/src/components/Accordion/Accordion.d.ts +2 -2
  12. package/build/components/types/src/components/Accordion/Accordion.static.d.ts +1 -0
  13. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +38 -18
  14. package/build/lib/components.css +1 -1
  15. package/build/lib/components.css.map +1 -1
  16. package/build/lib/megamenu.css +1 -1
  17. package/build/lib/megamenu.css.map +1 -1
  18. package/build/lib/megamenu.js +1 -1
  19. package/build/lib/megamenu.js.map +1 -1
  20. package/build/lib/scripts.js +1 -9
  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 +1 -1
  26. package/src/components/Accordion/Accordion.static.ts +36 -30
  27. package/src/components/Accordion/Accordion.tsx +4 -4
  28. package/src/components/Accordion/AccordionHeader.tsx +0 -10
  29. package/src/components/Accordion/styles/mixins.scss +0 -6
  30. package/src/components/Accordion/styles/style.scss +2 -2
  31. package/src/components/Accordion/tests/Accordion.unit.test.js +12 -26
  32. package/src/components/AnchorNavigation/AnchorNavigation.static.ts +0 -1
  33. package/src/components/AnchorNavigation/styles/mixins.scss +4 -0
  34. package/src/components/Carousel/Carousel.static.ts +177 -91
  35. package/src/components/Carousel/tests/Carousel.static.test.js +213 -0
  36. package/src/components/Carousel/tests/Carousel.unit.test.js +58 -0
  37. package/src/components/Expander/Expander.static.ts +11 -12
  38. package/src/components/Footer/Footer.tsx +1 -1
  39. package/src/components/Footer/tests/Footer.conformance.test.js +4 -4
  40. package/src/components/Footer/tests/Footer.unit.test.js +4 -4
  41. package/src/components/Megamenu/Megamenu.tsx +71 -55
  42. package/src/components/Megamenu/MegamenuBlog.tsx +3 -6
  43. package/src/components/Megamenu/static.ts +0 -9
  44. package/src/components/Megamenu/styles/mixins.scss +1 -1
  45. package/src/components/PromoBanner/PromoBanner.tsx +2 -0
@@ -6,8 +6,8 @@ interface AccordionProps$1 {
6
6
  headingLevel?: number;
7
7
  /** Accordion is enclosed in another component */
8
8
  isEnclosed?: boolean;
9
- /** If true, the last item will not have a bottom border */
10
- lastItemNoBottomBorder?: boolean;
9
+ /** If true, the top border on the first item will be removed */
10
+ noTopBorder?: boolean;
11
11
  /** Adjustable spacing */
12
12
  size?: "large";
13
13
  /** Additional CSS classes */
@@ -4,8 +4,8 @@ interface AccordionProps {
4
4
  headingLevel?: number;
5
5
  /** Accordion is enclosed in another component */
6
6
  isEnclosed?: boolean;
7
- /** If true, the last item will not have a bottom border */
8
- lastItemNoBottomBorder?: boolean;
7
+ /** If true, the top border on the first item will be removed */
8
+ noTopBorder?: boolean;
9
9
  /** Adjustable spacing */
10
10
  size?: "large";
11
11
  /** Additional CSS classes */
@@ -8,6 +8,7 @@ export default class Accordion {
8
8
  private buttons;
9
9
  constructor(element: HTMLElement, config?: Partial<AccordionConfig>);
10
10
  private onFocus;
11
+ private toggleAccordionItem;
11
12
  private init;
12
13
  private onClick;
13
14
  destroy(): void;
@@ -10,58 +10,78 @@ export default class Carousel {
10
10
  carouselId?: string;
11
11
  constructor(element: HTMLElement, config?: Partial<SwiperOptions>);
12
12
  init(): void;
13
+ /**
14
+ * Fix scrollbar drag size and position for bleed-right carousels.
15
+ * Overrides Swiper's default scrollbar calculations to work correctly with bleed-right layouts.
16
+ */
17
+ fixBleedRightScrollbar(): void;
13
18
  getElements(): void;
14
19
  getCustomOptions(): void;
20
+ /**
21
+ * Enable or disable the carousel based on whether content requires scrolling.
22
+ * Carousel is enabled only when there are more slides than can fit in the current viewport.
23
+ */
24
+ private updateCarouselEnabledState;
25
+ /**
26
+ * Calculate how much the carousel should extend beyond the container (bleed effect).
27
+ * On screens 2560px and wider, the bleed effect is disabled.
28
+ */
29
+ private calculateBleedAmount;
30
+ /**
31
+ * Apply the bleed offset to extend the carousel beyond the container edge.
32
+ * Only applies when content exceeds the visible area.
33
+ */
34
+ private applyBleedOffset;
35
+ /**
36
+ * Configure bleed-right carousel to extend beyond the container edge.
37
+ * Calculates the exact offset needed for the carousel to reach the viewport edge
38
+ * while keeping the last slide aligned with the container edge when scrolled to the end.
39
+ */
15
40
  adjustConfigForBleedRight(): void;
16
41
  /**
17
- * Handles the slide change event on the carousel.
18
- * Updates the tooltip position for the active slide and hides tooltips for non-active slides.
19
- * Also updates accessibility attributes for pagination buttons and external controls state.
42
+ * Handle carousel slide change events.
43
+ * Updates tooltip positions and accessibility states for the active slide.
20
44
  */
21
45
  handleSlideChange(): void;
22
46
  /**
23
- * Updates the position of tooltips for the given element.
24
- * @param {HTMLElement} element - The element containing tooltip triggers.
47
+ * Update tooltip positions for elements within a slide.
25
48
  */
26
49
  updateTooltipPosition(element: HTMLElement): void;
27
50
  /**
28
- * Hides all tooltips for the given elements.
29
- * @param {NodeListOf<HTMLElement>} elements - The elements containing tooltip triggers.
51
+ * Hide all tooltips for non-active slides.
30
52
  */
31
53
  hideAllTooltips(elements: NodeListOf<Element>): void;
32
54
  /**
33
- * Initialize external controls that reference this carousel
55
+ * Initialize external navigation controls that reference this carousel via data attributes.
56
+ * Supports prev/next buttons placed anywhere in the DOM.
34
57
  */
35
58
  initExternalControls(): void;
36
59
  /**
37
- * Update the disabled state of external controls based on current slide position
60
+ * Update the disabled state of external navigation controls.
61
+ * Controls are disabled at the start/end of the carousel based on slide position.
38
62
  */
39
63
  updateExternalControlsState(): void;
40
64
  /**
41
- * Go to the next slide
65
+ * Navigate to the next slide.
42
66
  */
43
67
  slideNext(): void;
44
68
  /**
45
- * Go to the previous slide
69
+ * Navigate to the previous slide.
46
70
  */
47
71
  slidePrev(): void;
48
72
  /**
49
- * Get the current active slide index
50
- * @returns {number} The current slide index
73
+ * Get the current active slide index.
51
74
  */
52
75
  getActiveIndex(): number;
53
76
  /**
54
- * Add event listener for slide changes
55
- * @param {Function} callback - Callback function to execute on slide change
77
+ * Register a callback for slide change events.
56
78
  */
57
79
  onSlideChange(callback: (activeIndex: number) => void): void;
58
80
  destroy(): void;
59
81
  update(): void;
60
82
  static getInstance(el: HTMLElement): Carousel | null;
61
83
  /**
62
- * Find carousel instance by ID or data attribute
63
- * @param {string} carouselId - The ID or data attribute value of the carousel
64
- * @returns {Carousel | null} The carousel instance or null
84
+ * Find a carousel instance by its ID or data-carousel-id attribute.
65
85
  */
66
86
  static getInstanceById(carouselId: string): Carousel | null;
67
87
  }