@momo-kits/foundation 0.169.8 → 0.169.9
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/Application/BottomSheet.hooks.ts +27 -17
- package/Application/BottomSheet.tsx +35 -27
- package/Application/BottomTab/BottomTabBar.tsx +6 -6
- package/Application/BottomTab/DuoRailTabBar.tsx +5 -5
- package/Application/BottomTab/TabScreen.tsx +11 -10
- package/Application/BottomTab/index.tsx +5 -5
- package/Application/BottomTab/usePressLift.ts +3 -3
- package/Application/Components/HeaderToolkitAction.tsx +26 -18
- package/Application/Components/useToolkitActions.tsx +22 -21
- package/Application/ModalScreen.tsx +19 -15
- package/Application/StackScreen.tsx +13 -9
- package/Application/modalLayout.ts +1 -3
- package/Context/index.ts +3 -1
- package/Image/index.tsx +6 -6
- package/Input/ErrorView.tsx +59 -0
- package/Input/FloatingView.tsx +101 -0
- package/Input/Input.tsx +40 -37
- package/Input/InputDropDown.tsx +13 -10
- package/Input/InputMoney.tsx +17 -17
- package/Input/InputMoneyView.tsx +12 -12
- package/Input/InputOTP.tsx +46 -34
- package/Input/InputPhoneNumber.tsx +48 -43
- package/Input/InputSearch.tsx +27 -24
- package/Input/InputTextArea.tsx +29 -23
- package/Input/RenderTrailing.tsx +79 -0
- package/Input/constants.ts +8 -0
- package/Input/utils.ts +126 -7
- package/Layout/FloatingButton.tsx +38 -24
- package/Layout/layoutMetrics.ts +43 -34
- package/Layout/screenTypes.ts +2 -3
- package/Pagination/PaginationScroll.tsx +5 -3
- package/Pagination/types.ts +3 -5
- package/Popup/PopupNotify.tsx +16 -13
- package/Popup/PopupPromotion.tsx +5 -4
- package/Popup/types.ts +2 -4
- package/Skeleton/index.tsx +15 -12
- package/package.json +1 -1
- package/Input/common.tsx +0 -257
- package/Input/moneyUtils.ts +0 -23
package/Input/moneyUtils.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const moneyFormatter = new Intl.NumberFormat('vi-VN');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Locates the single edited span between `old` and `text`: common prefix
|
|
5
|
-
* length (`start`), common suffix length (`suffix`) and removed + inserted
|
|
6
|
-
* char count (`size`).
|
|
7
|
-
*/
|
|
8
|
-
export const findEdit = (old: string, text: string) => {
|
|
9
|
-
let start = 0;
|
|
10
|
-
while (start < text.length && old[start] === text[start]) {
|
|
11
|
-
start += 1;
|
|
12
|
-
}
|
|
13
|
-
const maxSuffix = Math.min(text.length, old.length) - start;
|
|
14
|
-
let suffix = 0;
|
|
15
|
-
while (suffix < maxSuffix) {
|
|
16
|
-
if (old[old.length - 1 - suffix] !== text[text.length - 1 - suffix]) {
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
suffix += 1;
|
|
20
|
-
}
|
|
21
|
-
const size = old.length + text.length - 2 * (start + suffix);
|
|
22
|
-
return { old, start, suffix, size };
|
|
23
|
-
};
|