@orangesk/orange-design-system 2.0.0-beta.11 → 2.0.0-beta.12

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 (41) hide show
  1. package/build/components/index.js +5 -5
  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 +5 -3
  5. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +34 -1
  6. package/build/components/types/src/components/Cover/Cover.d.ts +3 -3
  7. package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
  8. package/build/components/types/src/components/Table/Table.d.ts +2 -0
  9. package/build/components/types/src/components/Table/docsData.d.ts +2 -0
  10. package/build/components/types/src/components/Table/types.d.ts +1 -0
  11. package/build/lib/components.css +1 -1
  12. package/build/lib/components.css.map +1 -1
  13. package/build/lib/scripts.js +4 -4
  14. package/build/lib/scripts.js.map +1 -1
  15. package/build/lib/style.css +1 -1
  16. package/build/lib/style.css.map +1 -1
  17. package/package.json +5 -5
  18. package/src/components/AnchorNavigation/AnchorNavigation.static.ts +3 -0
  19. package/src/components/Button/styles/config.scss +5 -4
  20. package/src/components/Carousel/Carousel.static.ts +204 -1
  21. package/src/components/Carousel/tests/Carousel.static.test.js +403 -0
  22. package/src/components/Carousel/tests/Carousel.unit.test.js +68 -0
  23. package/src/components/Cover/Cover.tsx +22 -20
  24. package/src/components/Cover/styles/config.scss +23 -12
  25. package/src/components/Cover/styles/mixins.scss +6 -5
  26. package/src/components/Cover/tests/Cover.unit.test.js +52 -52
  27. package/src/components/Forms/Group/styles/mixins.scss +14 -0
  28. package/src/components/Pill/Pill.tsx +10 -2
  29. package/src/components/Pill/styles/config.scss +2 -21
  30. package/src/components/Pill/styles/style.scss +16 -6
  31. package/src/components/Pill/tests/Pill.conformance.test.js +8 -2
  32. package/src/components/Pill/tests/Pill.unit.test.js +69 -11
  33. package/src/components/Table/Row.tsx +9 -3
  34. package/src/components/Table/Table.tsx +11 -1
  35. package/src/components/Table/TableContext.ts +1 -0
  36. package/src/components/Table/docsData.ts +25 -0
  37. package/src/components/Table/styles/mixins.scss +37 -0
  38. package/src/components/Table/styles/style.scss +6 -0
  39. package/src/components/Table/types.ts +1 -0
  40. package/src/components/Tooltip/InfoTooltip.tsx +1 -5
  41. package/src/styles/tokens/color.scss +1 -1
@@ -1201,7 +1201,7 @@ declare const InputStepper: React$1.FC<InputStepperProps>;
1201
1201
 
1202
1202
  declare const Skeleton: React$1.FC<React$1.HTMLAttributes<HTMLSpanElement>>;
1203
1203
 
1204
- declare const pillColors: readonly ["white", "gray", "transparent", "orange"];
1204
+ declare const pillColors: readonly ["surface-primary", "surface-secondary", "surface-tertiary", "surface-subtle", "surface-moderate", "surface-accent", "transparent"];
1205
1205
  type PillColor = (typeof pillColors)[number];
1206
1206
  interface PillProps extends HTMLAttributes<HTMLSpanElement> {
1207
1207
  className?: string;
@@ -1320,6 +1320,8 @@ interface TableProps extends React$1.TableHTMLAttributes<HTMLTableElement> {
1320
1320
  headers: TableHeader[];
1321
1321
  /** Compact table only takes spaced needed to display its content */
1322
1322
  isCompact?: boolean;
1323
+ /** Enable responsive card layout below md breakpoint for better accessibility */
1324
+ isResponsive?: boolean;
1323
1325
  /** If table has horizontal scrollbar */
1324
1326
  isScrollable?: boolean;
1325
1327
  /** Different colors for even and odd rows. */
@@ -1411,11 +1413,11 @@ interface CoverProps {
1411
1413
  xxxl?: string;
1412
1414
  };
1413
1415
  /** Set vertical position of image */
1414
- bgPosition?: 'top' | 'center' | 'bottom';
1416
+ bgPosition?: "top" | "center" | "bottom";
1415
1417
  /** Applies custom classNames to overlay content */
1416
1418
  contentClass?: string;
1417
1419
  /** Cover size */
1418
- size?: 'small' | 'medium' | 'large';
1420
+ size?: "small" | "medium" | "large" | "xlarge";
1419
1421
  /** Additional className for the cover container */
1420
1422
  className?: string;
1421
1423
  /** Children content */
@@ -7,6 +7,7 @@ export default class Carousel {
7
7
  viewport: HTMLElement;
8
8
  track: HTMLElement;
9
9
  instance: Swiper;
10
+ carouselId?: string;
10
11
  constructor(element: HTMLElement, config?: Partial<SwiperOptions>);
11
12
  init(): void;
12
13
  getElements(): void;
@@ -15,7 +16,7 @@ export default class Carousel {
15
16
  /**
16
17
  * Handles the slide change event on the carousel.
17
18
  * Updates the tooltip position for the active slide and hides tooltips for non-active slides.
18
- * Also updates accessibility attributes for pagination buttons.
19
+ * Also updates accessibility attributes for pagination buttons and external controls state.
19
20
  */
20
21
  handleSlideChange(): void;
21
22
  /**
@@ -28,7 +29,39 @@ export default class Carousel {
28
29
  * @param {NodeListOf<HTMLElement>} elements - The elements containing tooltip triggers.
29
30
  */
30
31
  hideAllTooltips(elements: NodeListOf<Element>): void;
32
+ /**
33
+ * Initialize external controls that reference this carousel
34
+ */
35
+ initExternalControls(): void;
36
+ /**
37
+ * Update the disabled state of external controls based on current slide position
38
+ */
39
+ updateExternalControlsState(): void;
40
+ /**
41
+ * Go to the next slide
42
+ */
43
+ slideNext(): void;
44
+ /**
45
+ * Go to the previous slide
46
+ */
47
+ slidePrev(): void;
48
+ /**
49
+ * Get the current active slide index
50
+ * @returns {number} The current slide index
51
+ */
52
+ getActiveIndex(): number;
53
+ /**
54
+ * Add event listener for slide changes
55
+ * @param {Function} callback - Callback function to execute on slide change
56
+ */
57
+ onSlideChange(callback: (activeIndex: number) => void): void;
31
58
  destroy(): void;
32
59
  update(): void;
33
60
  static getInstance(el: HTMLElement): Carousel | null;
61
+ /**
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
65
+ */
66
+ static getInstanceById(carouselId: string): Carousel | null;
34
67
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  interface CoverProps {
3
3
  /** Background image source. URL string or an object of breakpoint: url pairs
4
4
  *
@@ -26,11 +26,11 @@ interface CoverProps {
26
26
  xxxl?: string;
27
27
  };
28
28
  /** Set vertical position of image */
29
- bgPosition?: 'top' | 'center' | 'bottom';
29
+ bgPosition?: "top" | "center" | "bottom";
30
30
  /** Applies custom classNames to overlay content */
31
31
  contentClass?: string;
32
32
  /** Cover size */
33
- size?: 'small' | 'medium' | 'large';
33
+ size?: "small" | "medium" | "large" | "xlarge";
34
34
  /** Additional className for the cover container */
35
35
  className?: string;
36
36
  /** Children content */
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode, HTMLAttributes } from "react";
2
- export declare const pillColors: readonly ["white", "gray", "transparent", "orange"];
2
+ export declare const pillColors: readonly ["surface-primary", "surface-secondary", "surface-tertiary", "surface-subtle", "surface-moderate", "surface-accent", "transparent"];
3
3
  export type PillColor = (typeof pillColors)[number];
4
4
  interface PillProps extends HTMLAttributes<HTMLSpanElement> {
5
5
  className?: string;
@@ -10,6 +10,8 @@ interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
10
10
  headers: TableHeader[];
11
11
  /** Compact table only takes spaced needed to display its content */
12
12
  isCompact?: boolean;
13
+ /** Enable responsive card layout below md breakpoint for better accessibility */
14
+ isResponsive?: boolean;
13
15
  /** If table has horizontal scrollbar */
14
16
  isScrollable?: boolean;
15
17
  /** Different colors for even and odd rows. */
@@ -36,4 +36,6 @@ export declare const shrinkHeaders: TableHeader[];
36
36
  export declare const shrinkRows: TableRow[];
37
37
  export declare const fillHeaders: TableHeader[];
38
38
  export declare const fillRows: TableRow[];
39
+ export declare const responsiveHeaders: TableHeader[];
40
+ export declare const responsiveRows: TableRow[];
39
41
  export {};
@@ -31,4 +31,5 @@ export interface TableContextType {
31
31
  rows: TableRow[];
32
32
  footers?: TableRow[];
33
33
  expandableRows?: ExpandableRows;
34
+ isResponsive?: boolean;
34
35
  }