fui-material 2.1.14 → 2.2.1

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.
@@ -2123,7 +2123,6 @@ const FCheckbox = forwardRef(
2123
2123
  ({
2124
2124
  label,
2125
2125
  className,
2126
- id,
2127
2126
  st: st2,
2128
2127
  ...props
2129
2128
  }, ref) => {
@@ -2131,7 +2130,6 @@ const FCheckbox = forwardRef(
2131
2130
  "div",
2132
2131
  {
2133
2132
  className: `${styles$m["f-checkbox"]} ${className || ""}`,
2134
- id,
2135
2133
  style: st2,
2136
2134
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
2137
2135
  /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ref, type: "checkbox", ...props }),
@@ -2144,36 +2142,26 @@ const FCheckbox = forwardRef(
2144
2142
  const styles$l = {
2145
2143
  "f-radio": "_f-radio_cwhmx_1"
2146
2144
  };
2147
- const FRadioButton = ({
2148
- label,
2149
- onClick,
2150
- className,
2151
- id,
2152
- st: st2,
2153
- checked,
2154
- disabled: disabled2
2155
- }) => {
2156
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
2157
- "div",
2158
- {
2159
- className: `${styles$l["f-radio"]} ${className || ""}`,
2160
- style: st2,
2161
- id,
2162
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
2163
- /* @__PURE__ */ jsxRuntimeExports.jsx(
2164
- "input",
2165
- {
2166
- type: "radio",
2167
- onClick,
2168
- checked,
2169
- disabled: disabled2
2170
- }
2171
- ),
2172
- label
2173
- ] })
2174
- }
2175
- );
2176
- };
2145
+ const FRadioButton = forwardRef(
2146
+ ({
2147
+ label,
2148
+ className,
2149
+ st: st2,
2150
+ ...props
2151
+ }, ref) => {
2152
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
2153
+ "div",
2154
+ {
2155
+ className: `${styles$l["f-radio"]} ${className || ""}`,
2156
+ style: st2,
2157
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
2158
+ /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ref, type: "radio", ...props }),
2159
+ label
2160
+ ] })
2161
+ }
2162
+ );
2163
+ }
2164
+ );
2177
2165
  const DOTS = "...";
2178
2166
  const range = (start, end) => {
2179
2167
  const length = end - start + 1;
@@ -50047,6 +50035,46 @@ function fDownloadBlobFile(blob, fileName) {
50047
50035
  document.body.removeChild(link2);
50048
50036
  window.URL.revokeObjectURL(url);
50049
50037
  }
50038
+ function fBankRound(value, decimalPlaces) {
50039
+ if (decimalPlaces == void 0) decimalPlaces = 2;
50040
+ const factor = Math.pow(10, decimalPlaces);
50041
+ const roundedValue = Math.round(value * factor) / factor;
50042
+ const strValue = roundedValue.toString();
50043
+ const dotIndex = strValue.indexOf(".");
50044
+ if (dotIndex === -1) {
50045
+ return roundedValue;
50046
+ }
50047
+ const fractionalPart = strValue.slice(dotIndex + 1);
50048
+ if (fractionalPart.length <= decimalPlaces) {
50049
+ return roundedValue;
50050
+ }
50051
+ const nextDigit = fractionalPart[decimalPlaces];
50052
+ if (nextDigit === "5") {
50053
+ const lastDigit = fractionalPart[decimalPlaces - 1];
50054
+ if (+lastDigit % 2 !== 0) {
50055
+ return +(roundedValue + Math.pow(10, -decimalPlaces)).toFixed(decimalPlaces);
50056
+ } else {
50057
+ return +roundedValue.toFixed(decimalPlaces);
50058
+ }
50059
+ }
50060
+ return +roundedValue.toFixed(decimalPlaces);
50061
+ }
50062
+ const fFormatRuNumber = (a, options) => {
50063
+ if (typeof a !== "number" || isNaN(a)) return "";
50064
+ let processedValue = a;
50065
+ if (options == null ? void 0 : options.useBankRound) {
50066
+ const decimalPlaces = options.bankRoundDecimalPlaces;
50067
+ processedValue = fBankRound(processedValue, decimalPlaces);
50068
+ }
50069
+ const formatOptions = {};
50070
+ if ((options == null ? void 0 : options.maximumFractionDigits) !== void 0) {
50071
+ formatOptions.maximumFractionDigits = options.maximumFractionDigits;
50072
+ }
50073
+ if ((options == null ? void 0 : options.minimumFractionDigits) !== void 0) {
50074
+ formatOptions.minimumFractionDigits = options.minimumFractionDigits;
50075
+ }
50076
+ return new Intl.NumberFormat("ru-RU", formatOptions).format(processedValue);
50077
+ };
50050
50078
  function bind(fn, thisArg) {
50051
50079
  return function wrap() {
50052
50080
  return fn.apply(thisArg, arguments);
@@ -52545,6 +52573,7 @@ export {
52545
52573
  FTrashIcon,
52546
52574
  FUnlinkIcon,
52547
52575
  fAlert,
52576
+ fBankRound,
52548
52577
  fConfirm,
52549
52578
  fConvertFileToBase64,
52550
52579
  fDownloadBlobFile,
@@ -52553,6 +52582,7 @@ export {
52553
52582
  fExportTableToExcel,
52554
52583
  fExportingHtmlToDocx,
52555
52584
  fExportingHtmlToXlsx,
52585
+ fFormatRuNumber,
52556
52586
  fGenerateUniqueId,
52557
52587
  fInstallFormatCodeXlsx,
52558
52588
  fNotification,