@mesh.ai/rabbit 1.66.0 → 1.67.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/dist/index.d.ts CHANGED
@@ -338,6 +338,7 @@ declare type AmountFieldProps = ComponentPropsWithoutRef<'div'>;
338
338
 
339
339
  declare interface AmountPercentageContextValue {
340
340
  baseAmount: number;
341
+ percentageBase: number;
341
342
  mode: AmountPercentageMode;
342
343
  disabled: boolean;
343
344
  amount: number;
@@ -382,6 +383,16 @@ export declare interface AmountPercentageInputProps extends ComponentPropsWithou
382
383
  * - `"PORTION"`: percentage = what fraction amount is of base (e.g. 10%, 150%)
383
384
  */
384
385
  mode?: AmountPercentageMode;
386
+ /**
387
+ * Optional override for the denominator used in percentage calculations.
388
+ * When provided, percentage is computed against this value while `baseAmount`
389
+ * is still used as the offset/anchor in CHANGE mode. Defaults to `baseAmount`.
390
+ *
391
+ * Use this when the amount you display has an additive baseline that differs
392
+ * from the value the percentage scales against — e.g. amount = currentPay +
393
+ * (pct% × proratedPay), where baseAmount=currentPay and percentageBase=proratedPay.
394
+ */
395
+ percentageBase?: number;
385
396
  /** Called when the user commits a new value (Enter or blur) */
386
397
  onAmountCommit?: (amount: number) => void;
387
398
  /** Called on every value change while editing */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mesh.ai/rabbit",
3
3
  "private": false,
4
- "version": "1.66.0",
4
+ "version": "1.67.0",
5
5
  "main": "./dist/@mesh.ai/rabbit.umd.js",
6
6
  "module": "./dist/@mesh.ai/rabbit.es.js ",
7
7
  "types": "./dist/index.d.ts",