@cerberus-design/react 0.11.1-next-b643296 → 0.11.1-next-2ed68bd
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/build/legacy/_tsup-dts-rollup.d.cts +18 -0
- package/build/legacy/index.cjs +8 -0
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/utils/index.cjs +34 -0
- package/build/legacy/utils/index.cjs.map +1 -0
- package/build/modern/_tsup-dts-rollup.d.ts +18 -0
- package/build/modern/{chunk-YMJMB6OP.js → chunk-6EJXHRAP.js} +4 -4
- package/build/modern/chunk-UTGEFJ3L.js +10 -0
- package/build/modern/chunk-UTGEFJ3L.js.map +1 -0
- package/build/modern/components/FileStatus.js +2 -2
- package/build/modern/index.js +18 -14
- package/build/modern/index.js.map +1 -1
- package/build/modern/utils/index.js +7 -0
- package/build/modern/utils/index.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/utils/index.ts +19 -0
- /package/build/modern/{chunk-YMJMB6OP.js.map → chunk-6EJXHRAP.js.map} +0 -0
|
@@ -965,6 +965,24 @@ declare interface FileUploaderProps extends InputHTMLAttributes<HTMLInputElement
|
|
|
965
965
|
export { FileUploaderProps }
|
|
966
966
|
export { FileUploaderProps as FileUploaderProps_alias_1 }
|
|
967
967
|
|
|
968
|
+
/**
|
|
969
|
+
* This module contains utility functions that are used across your app.
|
|
970
|
+
* @module Utils
|
|
971
|
+
*/
|
|
972
|
+
/**
|
|
973
|
+
* Formats the count of notifications to be displayed in the notification badge.
|
|
974
|
+
* @param count - The number of notifications.
|
|
975
|
+
* @returns The formatted count of notifications.
|
|
976
|
+
* @example
|
|
977
|
+
* ```tsx
|
|
978
|
+
* const count = formatNotifyCount(100)
|
|
979
|
+
* console.log(count) // '99+'
|
|
980
|
+
* ```
|
|
981
|
+
*/
|
|
982
|
+
declare function formatNotifyCount(count: number): string;
|
|
983
|
+
export { formatNotifyCount }
|
|
984
|
+
export { formatNotifyCount as formatNotifyCount_alias_1 }
|
|
985
|
+
|
|
968
986
|
export { getClientRect }
|
|
969
987
|
|
|
970
988
|
export { getFirstCollision }
|
package/build/legacy/index.cjs
CHANGED
|
@@ -82,6 +82,7 @@ __export(src_exports, {
|
|
|
82
82
|
Tr: () => Tr,
|
|
83
83
|
createNavTriggerProps: () => createNavTriggerProps,
|
|
84
84
|
defineIcons: () => defineIcons,
|
|
85
|
+
formatNotifyCount: () => formatNotifyCount,
|
|
85
86
|
getPosition: () => getPosition,
|
|
86
87
|
processStatus: () => processStatus,
|
|
87
88
|
trapFocus: () => trapFocus,
|
|
@@ -2850,6 +2851,12 @@ function useToggle(options) {
|
|
|
2850
2851
|
return (0, import_react21.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
2851
2852
|
}
|
|
2852
2853
|
|
|
2854
|
+
// src/utils/index.ts
|
|
2855
|
+
function formatNotifyCount(count) {
|
|
2856
|
+
if (count > 99) return "99+";
|
|
2857
|
+
return count.toString();
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2853
2860
|
// src/index.ts
|
|
2854
2861
|
__reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
2855
2862
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -2915,6 +2922,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2915
2922
|
Tr,
|
|
2916
2923
|
createNavTriggerProps,
|
|
2917
2924
|
defineIcons,
|
|
2925
|
+
formatNotifyCount,
|
|
2918
2926
|
getPosition,
|
|
2919
2927
|
processStatus,
|
|
2920
2928
|
trapFocus,
|