@humu-tech/ui 0.1.9 → 0.1.10
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -2
- package/dist/index.mjs +12 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -325,7 +325,7 @@ declare const DialogRoot: typeof DialogRootBase & {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
type DocumentInputProps = Omit<MaskedInputProps, 'mask'>;
|
|
328
|
-
declare function DocumentInput(props: DocumentInputProps): react.JSX.Element;
|
|
328
|
+
declare function DocumentInput({ normalizeRaw, ...props }: DocumentInputProps): react.JSX.Element;
|
|
329
329
|
|
|
330
330
|
type DrawerSide = 'right' | 'left' | 'bottom';
|
|
331
331
|
type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
package/dist/index.d.ts
CHANGED
|
@@ -325,7 +325,7 @@ declare const DialogRoot: typeof DialogRootBase & {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
type DocumentInputProps = Omit<MaskedInputProps, 'mask'>;
|
|
328
|
-
declare function DocumentInput(props: DocumentInputProps): react.JSX.Element;
|
|
328
|
+
declare function DocumentInput({ normalizeRaw, ...props }: DocumentInputProps): react.JSX.Element;
|
|
329
329
|
|
|
330
330
|
type DrawerSide = 'right' | 'left' | 'bottom';
|
|
331
331
|
type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
package/dist/index.js
CHANGED
|
@@ -2328,8 +2328,18 @@ DateRangeInput.displayName = "DateRangeInput";
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/primitives/DocumentInput/DocumentInput.tsx
|
|
2330
2330
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2331
|
-
function
|
|
2332
|
-
return
|
|
2331
|
+
function normalizeDocumentRaw(value) {
|
|
2332
|
+
return value.replace(/[^0-9a-zA-Z]/g, "").toUpperCase();
|
|
2333
|
+
}
|
|
2334
|
+
function DocumentInput({ normalizeRaw, ...props }) {
|
|
2335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2336
|
+
MaskedInput,
|
|
2337
|
+
{
|
|
2338
|
+
...props,
|
|
2339
|
+
normalizeRaw: normalizeRaw ?? normalizeDocumentRaw,
|
|
2340
|
+
mask: ["000.000.000-00", "**.***.***/****-**"]
|
|
2341
|
+
}
|
|
2342
|
+
);
|
|
2333
2343
|
}
|
|
2334
2344
|
|
|
2335
2345
|
// src/primitives/Drawer/Drawer.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -2220,8 +2220,18 @@ DateRangeInput.displayName = "DateRangeInput";
|
|
|
2220
2220
|
|
|
2221
2221
|
// src/primitives/DocumentInput/DocumentInput.tsx
|
|
2222
2222
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2223
|
-
function
|
|
2224
|
-
return
|
|
2223
|
+
function normalizeDocumentRaw(value) {
|
|
2224
|
+
return value.replace(/[^0-9a-zA-Z]/g, "").toUpperCase();
|
|
2225
|
+
}
|
|
2226
|
+
function DocumentInput({ normalizeRaw, ...props }) {
|
|
2227
|
+
return /* @__PURE__ */ jsx21(
|
|
2228
|
+
MaskedInput,
|
|
2229
|
+
{
|
|
2230
|
+
...props,
|
|
2231
|
+
normalizeRaw: normalizeRaw ?? normalizeDocumentRaw,
|
|
2232
|
+
mask: ["000.000.000-00", "**.***.***/****-**"]
|
|
2233
|
+
}
|
|
2234
|
+
);
|
|
2225
2235
|
}
|
|
2226
2236
|
|
|
2227
2237
|
// src/primitives/Drawer/Drawer.tsx
|