@carbon/react
Version:
React components for the Carbon Design System
80 lines (78 loc) • 2.17 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
//#region src/components/NumberInput/NumberFormatPropTypes.ts
/**
* Copyright IBM Corp. 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const NumberFormatOptionsPropType = prop_types.default.shape({
localeMatcher: prop_types.default.oneOf(["best fit", "lookup"]),
style: prop_types.default.oneOf([
"decimal",
"currency",
"percent",
"unit"
]),
currency: prop_types.default.string,
currencyDisplay: prop_types.default.oneOf([
"symbol",
"narrowSymbol",
"code",
"name"
]),
currencySign: prop_types.default.oneOf(["standard", "accounting"]),
unit: prop_types.default.string,
unitDisplay: prop_types.default.oneOf([
"short",
"narrow",
"long"
]),
notation: prop_types.default.oneOf([
"standard",
"scientific",
"engineering",
"compact"
]),
compactDisplay: prop_types.default.oneOf(["short", "long"]),
signDisplay: prop_types.default.oneOf([
"auto",
"never",
"always",
"exceptZero"
]),
minimumIntegerDigits: prop_types.default.number,
minimumFractionDigits: prop_types.default.number,
maximumFractionDigits: prop_types.default.number,
minimumSignificantDigits: prop_types.default.number,
maximumSignificantDigits: prop_types.default.number,
useGrouping: prop_types.default.oneOfType([prop_types.default.bool, prop_types.default.oneOf([
"always",
"auto",
"min2"
])]),
numberingSystem: prop_types.default.string,
roundingIncrement: prop_types.default.number,
roundingMode: prop_types.default.oneOf([
"ceil",
"floor",
"expand",
"trunc",
"halfCeil",
"halfFloor",
"halfExpand",
"halfTrunc",
"halfEven"
]),
trailingZeroDisplay: prop_types.default.oneOf(["auto", "stripIfInteger"])
});
//#endregion
exports.NumberFormatOptionsPropType = NumberFormatOptionsPropType;