@jsenv/navi 0.27.70 → 0.27.71

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.
@@ -46134,7 +46134,7 @@ installImportMetaCssBuild(import.meta);const css$7 = /* css */`
46134
46134
  /**
46135
46135
  * @type {import("ignore:preact").FunctionComponent<{
46136
46136
  * children?: number | string,
46137
- * unit?: string,
46137
+ * unit?: string | [string, string],
46138
46138
  * unitPosition?: "right" | "bottom",
46139
46139
  * unitSize?: string,
46140
46140
  * unitSizeRatio?: number,
@@ -46174,6 +46174,8 @@ const Quantity = ({
46174
46174
  lang
46175
46175
  }) : valueRounded;
46176
46176
  const unitBottom = unitPosition === "bottom";
46177
+ const isPlural = typeof value === "number" ? value > 1 : false;
46178
+ const unitResolved = Array.isArray(unit) ? isPlural ? unit[1] ?? unit[0] : unit[0] : unit;
46177
46179
  return jsxs(Text, {
46178
46180
  baseClassName: "navi_quantity",
46179
46181
  "data-unit-bottom": unitBottom ? "" : undefined,
@@ -46201,8 +46203,8 @@ const Quantity = ({
46201
46203
  children: jsx(LoadingDotsSvg, {})
46202
46204
  }) : valueFormatted
46203
46205
  }), unit && jsx(Unit, {
46204
- unit: unit,
46205
- plural: typeof value === "number" ? value > 1 : false,
46206
+ unit: unitResolved,
46207
+ plural: isPlural,
46206
46208
  lang: lang,
46207
46209
  size: unitSize,
46208
46210
  sizeRatio: unitSizeRatio,