@jsenv/navi 0.27.70 → 0.27.72
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/jsenv_navi.js +6 -4
- package/dist/jsenv_navi.js.map +6 -4
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -19661,7 +19661,7 @@ const MIN_LENGTH_CONSTRAINT = {
|
|
|
19661
19661
|
}
|
|
19662
19662
|
const valueAsString =
|
|
19663
19663
|
field.uiState === undefined ? "" : String(field.uiState);
|
|
19664
|
-
if (!valueAsString) {
|
|
19664
|
+
if (!valueAsString && !field.controlHostProps.required) {
|
|
19665
19665
|
return null;
|
|
19666
19666
|
}
|
|
19667
19667
|
const valueLength = valueAsString.length;
|
|
@@ -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:
|
|
46205
|
-
plural:
|
|
46206
|
+
unit: unitResolved,
|
|
46207
|
+
plural: isPlural,
|
|
46206
46208
|
lang: lang,
|
|
46207
46209
|
size: unitSize,
|
|
46208
46210
|
sizeRatio: unitSizeRatio,
|