@synerise/ds-estimation 2.0.11 → 2.1.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@2.0.12...@synerise/ds-estimation@2.1.0) (2026-10-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.0.12](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@2.0.11...@synerise/ds-estimation@2.0.12) (2026-10-28)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-estimation
20
+
21
+
22
+
23
+
24
+
6
25
  ## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-estimation@2.0.10...@synerise/ds-estimation@2.0.11) (2026-10-26)
7
26
 
8
27
 
package/CLAUDE.md CHANGED
@@ -84,7 +84,7 @@ import Estimation from '@synerise/ds-estimation';
84
84
 
85
85
  ## Styling
86
86
 
87
- All styles are in `Estimation.styles.ts`. The card body uses `Panel` from `@synerise/ds-panel` as the container. The dashed divider between content and footer is `Divider` from `@synerise/ds-divider`. Uses `@synerise/ds-core` theme palette tokens; no hardcoded colour values.
87
+ All styles are in `Estimation.styles.ts`. The card body uses `Panel` from `@synerise/ds-panel` as the container. The dashed divider between content and footer is `Divider` from `@synerise/ds-divider`. The styles set no colours of their own; the progress-bar skeleton track uses `var(--ds-progressbar-bar-bg-track)`. No hardcoded colour values.
88
88
 
89
89
  ## Custom hooks
90
90
 
@@ -100,10 +100,11 @@ Returns a complete `EstimationTexts` object. Requires an `IntlProvider` in the t
100
100
 
101
101
  - `@synerise/ds-form-field` — `FormFieldLabel` and `BaseLabelProps` for the label/tooltip
102
102
  - `@synerise/ds-progress-bar` — `Multivalue` component and `ProgressValue` type
103
+ - `@synerise/ds-badge` — `BadgeWithLabel` renders each colour-dot legend entry (dot + label); the dot colour is the per-value `color` passed via `customColor`
103
104
  - `@synerise/ds-panel` — card container
104
105
  - `@synerise/ds-inline-alert` — error state display
105
106
  - `@synerise/ds-skeleton` — loading placeholders
106
- - `@synerise/ds-core` — `FormattedRelativeDateTimeTo` for relative date, `useTheme` in skeleton
107
+ - `@synerise/ds-core` — `FormattedRelativeDateTimeTo` for relative date
107
108
  - `react-intl` — i18n for default button labels
108
109
 
109
110
  ## Implementation notes
@@ -112,6 +113,7 @@ Returns a complete `EstimationTexts` object. Requires an `IntlProvider` in the t
112
113
  - **`total` hidden when `isLoading=true`**: When `isLoading` is a plain `true` boolean, `total` is not rendered (not skeletonized). The skeleton variant `{ total: true }` replaces it with a skeleton.
113
114
  - **Footer is conditional**: The footer (divider + footer row) only renders when `footerButtons` is provided OR at least one of `isLoading`, `errorMessage`, or `calculatedDate` is truthy.
114
115
  - **`calculatedDate` type discrimination**: `calculatedDate instanceof Date` check determines whether to wrap with `FormattedRelativeDateTimeTo`. Any non-Date `ReactNode` is rendered verbatim.
116
+ - **Legend dot reuses `ds-badge`** — each labelled `progressBarValues` entry renders a `<BadgeWithLabel dot customColor={value.color}>{label}</BadgeWithLabel>` (dot + label, 8px gap owned by the badge). This replaced the old bespoke `EstimationProgressBarLegendItem` `:before` dot. Note: the DS-standard badge dot is a 6px ring-less dot, so the legend dot is slightly smaller and loses the old 2px white ring (flagged for Chromatic/UX).
115
117
  - **`EstimationProgressValue` and `EstimationTexts` types are not exported** from `index.ts` — consumers must import them from the deep path or declare locally.
116
118
  - **Uses Vitest** for testing.
117
119
  - **`react-intl` is a peer dependency** — component will throw at runtime without an `IntlProvider` ancestor.
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { EstimationProgressBarLegendItem, EstimationProgressBar as EstimationProgressBar$1, EstimationProgressBarLegend } from "./EstimationProgressBar.styles.js";
3
+ import { BadgeWithLabel } from "@synerise/ds-badge";
4
+ import { EstimationProgressBar as EstimationProgressBar$1, EstimationProgressBarLegend } from "./EstimationProgressBar.styles.js";
4
5
  const EstimationProgressBar = ({
5
6
  values: progressBarValues
6
7
  }) => {
@@ -10,12 +11,20 @@ const EstimationProgressBar = ({
10
11
  } = useMemo(() => {
11
12
  const values = [];
12
13
  const legend = [];
13
- progressBarValues.forEach((value) => {
14
+ progressBarValues.forEach((value, index) => {
14
15
  values.push({
15
16
  ...value
16
17
  });
17
18
  if (value.label) {
18
- legend.push(/* @__PURE__ */ jsx(EstimationProgressBarLegendItem, { dotColor: value.color, children: /* @__PURE__ */ jsx("span", { children: value.label }) }));
19
+ legend.push(/* @__PURE__ */ jsx(
20
+ BadgeWithLabel,
21
+ {
22
+ dot: true,
23
+ customColor: value.color,
24
+ children: value.label
25
+ },
26
+ `${value.color}-${index}`
27
+ ));
19
28
  }
20
29
  });
21
30
  return {
@@ -1,5 +1,2 @@
1
1
  export declare const EstimationProgressBar: import('styled-components').StyledComponent<({ values, stackedBars, ...htmlAttributes }: import('@synerise/ds-progress-bar').MultivalueProps) => React.JSX.Element, any, {}, never>;
2
2
  export declare const EstimationProgressBarLegend: import('styled-components').StyledComponent<"div", any, {}, never>;
3
- export declare const EstimationProgressBarLegendItem: import('styled-components').StyledComponent<"div", any, {
4
- dotColor: string;
5
- }, never>;
@@ -8,12 +8,7 @@ const EstimationProgressBarLegend = /* @__PURE__ */ styled.div.withConfig({
8
8
  displayName: "EstimationProgressBarstyles__EstimationProgressBarLegend",
9
9
  componentId: "sc-10gbufd-1"
10
10
  })(["display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding-top:4px;"]);
11
- const EstimationProgressBarLegendItem = /* @__PURE__ */ styled.div.withConfig({
12
- displayName: "EstimationProgressBarstyles__EstimationProgressBarLegendItem",
13
- componentId: "sc-10gbufd-2"
14
- })(["display:flex;align-items:center;gap:8px;&:before{content:'';width:10px;height:10px;background:", ";border-radius:0.5em;border:solid 2px ", ";}"], (props) => props.dotColor, (props) => props.theme.palette["white"]);
15
11
  export {
16
12
  EstimationProgressBar,
17
- EstimationProgressBarLegend,
18
- EstimationProgressBarLegendItem
13
+ EstimationProgressBarLegend
19
14
  };
@@ -1,12 +1,10 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useTheme } from "@synerise/ds-core";
3
2
  import { Skeleton } from "../Estimation.styles.js";
4
3
  import { EstimationProgressBar, EstimationProgressBarLegend } from "./EstimationProgressBar.styles.js";
5
4
  const EstimationProgressBarSkeleton = () => {
6
- const theme = useTheme();
7
5
  const EMPTY_VALUE = {
8
6
  percent: 100,
9
- color: theme.palette["grey-200"]
7
+ color: "var(--ds-progressbar-bar-bg-track)"
10
8
  };
11
9
  return /* @__PURE__ */ jsxs(Fragment, { children: [
12
10
  /* @__PURE__ */ jsx(EstimationProgressBar, { "data-testid": "estimation-progressbar-skeleton", values: [EMPTY_VALUE], stackedBars: false }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-estimation",
3
- "version": "2.0.11",
3
+ "version": "2.1.0",
4
4
  "description": "Estimation UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,14 +42,15 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-divider": "^2.0.10",
46
- "@synerise/ds-form-field": "^2.0.10",
47
- "@synerise/ds-inline-alert": "^2.0.8",
48
- "@synerise/ds-panel": "^2.0.11",
49
- "@synerise/ds-progress-bar": "^2.0.10",
50
- "@synerise/ds-skeleton": "^2.0.10",
51
- "@synerise/ds-typography": "^2.0.10",
52
- "@synerise/ds-utils": "^2.2.2"
45
+ "@synerise/ds-badge": "^2.1.0",
46
+ "@synerise/ds-divider": "^2.1.0",
47
+ "@synerise/ds-form-field": "^2.1.0",
48
+ "@synerise/ds-inline-alert": "^2.1.0",
49
+ "@synerise/ds-panel": "^2.1.0",
50
+ "@synerise/ds-progress-bar": "^2.1.0",
51
+ "@synerise/ds-skeleton": "^2.1.0",
52
+ "@synerise/ds-typography": "^2.1.0",
53
+ "@synerise/ds-utils": "^2.3.0"
53
54
  },
54
55
  "devDependencies": {
55
56
  "vitest": "4"
@@ -60,5 +61,5 @@
60
61
  "react-intl": ">=3.12.0 <= 6.8",
61
62
  "styled-components": "^5.3.3"
62
63
  },
63
- "gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
64
+ "gitHead": "5c3d61e30289486d14c7d6becb682e2d4a08ce41"
64
65
  }