@ssa-ui-kit/core 3.6.0 → 3.7.0

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.
@@ -9,7 +9,8 @@ import { HistoryProps } from './types';
9
9
  * - `item.color` overrides the marker color for a specific row
10
10
  * - `defaultColor` is used when `item.color` is not provided
11
11
  * - fallback default marker color: `theme.palette.primary.main`
12
- * - fallback connector color: `theme.colors.greyLighter`
12
+ * - fallback connector color: `theme.colors.greyFocused`
13
+ * - `lineWidth` controls the connector line thickness in pixels (default `2`)
13
14
  *
14
15
  * ### Alignment behavior
15
16
  * The marker is vertically aligned to the first text line and adapts when
@@ -28,4 +29,4 @@ import { HistoryProps } from './types';
28
29
  * />
29
30
  * ```
30
31
  */
31
- export declare const History: ({ items, defaultColor, lineColor, dateWidth, circleSize, sx, }: HistoryProps) => import("@emotion/react/jsx-runtime").JSX.Element;
32
+ export declare const History: ({ items, defaultColor, lineColor, lineWidth, dateWidth, circleSize, sx, }: HistoryProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -4,6 +4,6 @@ export declare const container: import("@emotion/react").SerializedStyles;
4
4
  export declare const row: import("@emotion/react").SerializedStyles;
5
5
  export declare const leftColumn: (width: number) => import("@emotion/react").SerializedStyles;
6
6
  export declare const circle: (color: string, size: number, topOffset: number) => import("@emotion/react").SerializedStyles;
7
- export declare const connector: (color: string, circleTopOffset: number, circleSize: number) => import("@emotion/react").SerializedStyles;
7
+ export declare const connector: (color: string, circleTopOffset: number, circleSize: number, lineWidth: number) => import("@emotion/react").SerializedStyles;
8
8
  export declare const dateColumn: (width: number) => import("@emotion/react").SerializedStyles;
9
9
  export declare const contentColumn: import("@emotion/react").SerializedStyles;
@@ -36,9 +36,14 @@ export interface HistoryProps {
36
36
  defaultColor?: string;
37
37
  /**
38
38
  * Connector line color between markers.
39
- * Falls back to `theme.colors.greyLighter`.
39
+ * Falls back to `theme.colors.greyFocused`.
40
40
  */
41
41
  lineColor?: string;
42
+ /**
43
+ * Connector line width in pixels.
44
+ * @default 2
45
+ */
46
+ lineWidth?: number;
42
47
  /**
43
48
  * Width of the date column in pixels.
44
49
  * @default 120
package/dist/index.js CHANGED
@@ -49485,7 +49485,7 @@ const row = true ? {
49485
49485
  } : 0;
49486
49486
  const leftColumn = width => /*#__PURE__*/(0,react_namespaceObject.css)("position:relative;flex-shrink:0;width:", width, "px;" + ( true ? "" : 0), true ? "" : 0);
49487
49487
  const circle = (color, size, topOffset) => /*#__PURE__*/(0,react_namespaceObject.css)("position:absolute;top:", topOffset, "px;left:50%;transform:translateX(-50%);width:", size, "px;height:", size, "px;border-radius:50%;background-color:", color, ";z-index:1;" + ( true ? "" : 0), true ? "" : 0);
49488
- const connector = (color, circleTopOffset, circleSize) => /*#__PURE__*/(0,react_namespaceObject.css)("position:absolute;left:50%;transform:translateX(-50%);top:", circleTopOffset + circleSize / 2, "px;bottom:-", circleTopOffset + circleSize / 2, "px;width:1px;background-color:", color, ";" + ( true ? "" : 0), true ? "" : 0);
49488
+ const connector = (color, circleTopOffset, circleSize, lineWidth) => /*#__PURE__*/(0,react_namespaceObject.css)("position:absolute;left:50%;transform:translateX(-50%);top:", circleTopOffset + circleSize / 2, "px;bottom:-", circleTopOffset + circleSize / 2, "px;width:", lineWidth, "px;background-color:", color, ";" + ( true ? "" : 0), true ? "" : 0);
49489
49489
  const dateColumn = width => /*#__PURE__*/(0,react_namespaceObject.css)("width:", width, "px;flex-shrink:0;padding-top:", FIRST_LINE_TOP_PADDING, "px;padding-bottom:20px;font-size:14px;line-height:", FIRST_LINE_HEIGHT, "px;" + ( true ? "" : 0), true ? "" : 0);
49490
49490
  const contentColumn = /*#__PURE__*/(0,react_namespaceObject.css)("flex:1;padding-top:", FIRST_LINE_TOP_PADDING, "px;padding-bottom:20px;" + ( true ? "" : 0), true ? "" : 0);
49491
49491
  ;// ./src/components/History/History.tsx
@@ -49494,6 +49494,7 @@ const contentColumn = /*#__PURE__*/(0,react_namespaceObject.css)("flex:1;padding
49494
49494
 
49495
49495
  const DEFAULT_CIRCLE_SIZE = 12;
49496
49496
  const DEFAULT_DATE_WIDTH = 120;
49497
+ const DEFAULT_LINE_WIDTH = 2;
49497
49498
  const LEFT_COLUMN_MARGIN_RIGHT = 16;
49498
49499
 
49499
49500
  /**
@@ -49506,7 +49507,8 @@ const LEFT_COLUMN_MARGIN_RIGHT = 16;
49506
49507
  * - `item.color` overrides the marker color for a specific row
49507
49508
  * - `defaultColor` is used when `item.color` is not provided
49508
49509
  * - fallback default marker color: `theme.palette.primary.main`
49509
- * - fallback connector color: `theme.colors.greyLighter`
49510
+ * - fallback connector color: `theme.colors.greyFocused`
49511
+ * - `lineWidth` controls the connector line thickness in pixels (default `2`)
49510
49512
  *
49511
49513
  * ### Alignment behavior
49512
49514
  * The marker is vertically aligned to the first text line and adapts when
@@ -49529,13 +49531,14 @@ const History = ({
49529
49531
  items,
49530
49532
  defaultColor,
49531
49533
  lineColor,
49534
+ lineWidth = DEFAULT_LINE_WIDTH,
49532
49535
  dateWidth = DEFAULT_DATE_WIDTH,
49533
49536
  circleSize = DEFAULT_CIRCLE_SIZE,
49534
49537
  sx
49535
49538
  }) => {
49536
49539
  const theme = (0,react_namespaceObject.useTheme)();
49537
49540
  const resolvedDefaultColor = defaultColor ?? theme.palette.primary.main;
49538
- const resolvedLineColor = lineColor ?? theme.colors.greyLighter;
49541
+ const resolvedLineColor = lineColor ?? theme.colors.greyFocused;
49539
49542
  const circleTopOffset = Math.max(0, FIRST_LINE_TOP_PADDING + (FIRST_LINE_HEIGHT - circleSize) / 2);
49540
49543
  return (0,jsx_runtime_namespaceObject.jsx)("div", {
49541
49544
  "data-testid": "history",
@@ -49554,7 +49557,7 @@ const History = ({
49554
49557
  children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
49555
49558
  css: circle(color, circleSize, circleTopOffset)
49556
49559
  }), !isLast && (0,jsx_runtime_namespaceObject.jsx)("div", {
49557
- css: connector(resolvedLineColor, circleTopOffset, circleSize)
49560
+ css: connector(resolvedLineColor, circleTopOffset, circleSize, lineWidth)
49558
49561
  })]
49559
49562
  }), (0,jsx_runtime_namespaceObject.jsx)("div", {
49560
49563
  css: dateColumn(dateWidth),