@momo-kits/native-kits 0.162.2-debug → 0.162.2-sp.1-debug
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/.claude/settings.local.json +55 -0
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/gradle.properties +1 -1
- package/ios/Application/Components.swift +34 -43
- package/ios/Application/FloatingButton.swift +10 -8
- package/ios/Application/Navigation/BottomTab/BottomTab.swift +102 -0
- package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
- package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
- package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
- package/ios/Application/Navigation/HeaderTitle.swift +57 -0
- package/ios/Application/Navigation/HeaderUser.swift +209 -0
- package/ios/Application/Navigation/NavigationContainer.swift +151 -0
- package/ios/Application/Navigation/NavigationOptions.swift +109 -0
- package/ios/Application/Navigation/Navigator.swift +360 -0
- package/ios/Application/Navigation/Overplay/BottomSheet.swift +176 -0
- package/ios/Application/Navigation/Overplay/ModalScreen.swift +68 -0
- package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
- package/ios/Application/Navigation/component/Header.swift +178 -0
- package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
- package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
- package/ios/Application/StackScreen.swift +449 -0
- package/ios/Avatar/Avatar.swift +193 -0
- package/ios/Badge/Badge.swift +11 -13
- package/ios/Badge/BadgeRibbon.swift +12 -19
- package/ios/BaselineView/BaselineView.swift +163 -0
- package/ios/Button/Button.swift +62 -23
- package/ios/Carousel/Carousel.swift +181 -0
- package/ios/Checkbox/Checkbox.swift +14 -12
- package/ios/Chip/Chip.swift +23 -9
- package/ios/Collapse/Collapse.swift +182 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +1 -1
- package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
- package/ios/DateTimePicker/DateTimePicker.swift +210 -0
- package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
- package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
- package/ios/DateTimePicker/WheelPicker.swift +161 -0
- package/ios/Divider/Divider.swift +16 -0
- package/ios/Icon/Icon.swift +6 -1
- package/ios/IconButton/IconButton.swift +112 -0
- package/ios/Information/Information.swift +151 -0
- package/ios/Input/Input.swift +42 -25
- package/ios/Input/InputPhoneNumber.swift +21 -19
- package/ios/Input/InputSearch.swift +101 -45
- package/ios/Input/InputTextArea.swift +67 -40
- package/ios/InputDropDown/InputDropDown.swift +198 -0
- package/ios/InputMoney/InputMoney.swift +335 -0
- package/ios/InputOTP/InputOTP.swift +210 -0
- package/ios/Loader/Loader.swift +113 -0
- package/ios/MoMoUIKits.podspec +5 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +1 -1
- package/ios/Pagination/PaginationDot.swift +61 -0
- package/ios/Pagination/PaginationNumber.swift +35 -0
- package/ios/Pagination/PaginationScroll.swift +101 -0
- package/ios/Pagination/PaginationWhiteDot.swift +37 -0
- package/ios/Popup/PopupDisplay.swift +10 -12
- package/ios/Popup/PopupInput.swift +2 -6
- package/ios/Popup/PopupNotify.swift +219 -0
- package/ios/ProgressInfo/ProgressInfo.swift +294 -0
- package/ios/Radio/Radio.swift +70 -0
- package/ios/Rating/Rating.swift +82 -0
- package/ios/Skeleton/Skeleton.swift +99 -0
- package/ios/Slider/Slider.swift +237 -0
- package/ios/Stepper/Stepper.swift +220 -0
- package/ios/Steps/Steps.swift +451 -0
- package/ios/SuggestAction/SuggestAction.swift +97 -0
- package/ios/Swipeable/SwipeCell.swift +185 -0
- package/ios/Swipeable/SwipeCellModel.swift +21 -0
- package/ios/TabView/TabView.swift +530 -0
- package/ios/Tag/Tag.swift +98 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +2 -0
- package/ios/Title/Title.swift +269 -0
- package/ios/Tooltip/Tooltip.swift +482 -0
- package/ios/Typography/Text.swift +77 -5
- package/ios/Typography/Typography.swift +9 -0
- package/ios/Uploader/Uploader.swift +183 -0
- package/ios/native-kits.podspec +58 -8
- package/ios-demo/MoMoUIKitsDemo.podspec +18 -0
- package/ios-demo/README.md +120 -0
- package/ios-demo/Resources/dot_loading.json +558 -0
- package/ios-demo/Resources/icon.json +4052 -0
- package/ios-demo/Resources/lottie_circle_loader.json +1 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +72 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +269 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +126 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +63 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +20 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +124 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +14 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +261 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +58 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +78 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +138 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +111 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +136 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +73 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +57 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +70 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +227 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +72 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +121 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +89 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +56 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +150 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +138 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +103 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +79 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +152 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +33 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +190 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +34 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +182 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +109 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +187 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +131 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +50 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
- package/local.properties +8 -0
- package/package.json +1 -1
- package/publish.sh +50 -0
- package/scripts/gen-ios-color.mjs +136 -0
package/publish.sh
CHANGED
|
@@ -76,6 +76,54 @@ if [ "$MODE" == "beta" ] && [ "$BUMP_MINOR" = true ]; then
|
|
|
76
76
|
echo "⚠️ Note: --bump is ignored in beta mode (beta version comes from package.json)."
|
|
77
77
|
fi
|
|
78
78
|
|
|
79
|
+
PODSPEC_VERSION_FILES=(
|
|
80
|
+
"ios/native-kits.podspec"
|
|
81
|
+
"ios-demo/MoMoUIKitsDemo.podspec"
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
PODSPEC_DEBUG_VERSION_FILES=(
|
|
85
|
+
"compose/compose.podspec"
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
update_podspec_file_version() {
|
|
89
|
+
local PODSPEC_FILE="$1"
|
|
90
|
+
local PODSPEC_VERSION="$2"
|
|
91
|
+
|
|
92
|
+
if [ ! -f "$PODSPEC_FILE" ]; then
|
|
93
|
+
echo " ⚠️ Skipped missing podspec: $PODSPEC_FILE"
|
|
94
|
+
return
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
CURRENT_PODSPEC_VERSION=$(grep -E "^[[:space:]]*[A-Za-z_]+\.version[[:space:]]*=" "$PODSPEC_FILE" | head -n 1 | sed -E "s/.*['\"]([^'\"]+)['\"].*/\1/")
|
|
98
|
+
|
|
99
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
100
|
+
sed -i '' -E "s/^([[:space:]]*[A-Za-z_]+\.version[[:space:]]*=[[:space:]]*)['\"][^'\"]+['\"]/\1'$PODSPEC_VERSION'/" "$PODSPEC_FILE"
|
|
101
|
+
else
|
|
102
|
+
sed -i -E "s/^([[:space:]]*[A-Za-z_]+\.version[[:space:]]*=[[:space:]]*)['\"][^'\"]+['\"]/\1'$PODSPEC_VERSION'/" "$PODSPEC_FILE"
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
UPDATED_PODSPEC_VERSION=$(grep -E "^[[:space:]]*[A-Za-z_]+\.version[[:space:]]*=" "$PODSPEC_FILE" | head -n 1 | sed -E "s/.*['\"]([^'\"]+)['\"].*/\1/")
|
|
106
|
+
|
|
107
|
+
if [ "$UPDATED_PODSPEC_VERSION" != "$PODSPEC_VERSION" ]; then
|
|
108
|
+
echo "❌ Error: Failed to update $PODSPEC_FILE to version $PODSPEC_VERSION"
|
|
109
|
+
exit 1
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
echo " $PODSPEC_FILE version updated: $CURRENT_PODSPEC_VERSION → $UPDATED_PODSPEC_VERSION"
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
update_podspec_versions() {
|
|
116
|
+
echo "📝 Updating podspec versions..."
|
|
117
|
+
|
|
118
|
+
for PODSPEC_FILE in "${PODSPEC_VERSION_FILES[@]}"; do
|
|
119
|
+
update_podspec_file_version "$PODSPEC_FILE" "$VERSION"
|
|
120
|
+
done
|
|
121
|
+
|
|
122
|
+
for PODSPEC_FILE in "${PODSPEC_DEBUG_VERSION_FILES[@]}"; do
|
|
123
|
+
update_podspec_file_version "$PODSPEC_FILE" "${VERSION}-debug"
|
|
124
|
+
done
|
|
125
|
+
}
|
|
126
|
+
|
|
79
127
|
# ============================================================================
|
|
80
128
|
# PHASE 1: CHECK AND UPDATE VERSION
|
|
81
129
|
# ============================================================================
|
|
@@ -219,6 +267,8 @@ phase_check_version() {
|
|
|
219
267
|
|
|
220
268
|
echo " Gradle version updated: $CURRENT_GRADLE_VERSION → $VERSION"
|
|
221
269
|
|
|
270
|
+
update_podspec_versions
|
|
271
|
+
|
|
222
272
|
export VERSION="$VERSION"
|
|
223
273
|
export NPM_TAG="$NPM_TAG"
|
|
224
274
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "fs";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
|
|
4
|
+
// ── 1. Paste your resolved flat color values here ──────────────────────────
|
|
5
|
+
// (or import them if your script setup supports TS)
|
|
6
|
+
|
|
7
|
+
const lightTheme = {
|
|
8
|
+
// text group
|
|
9
|
+
"text-default": "#303233",
|
|
10
|
+
"text-secondary": "#484848",
|
|
11
|
+
"text-hint": "#727272",
|
|
12
|
+
"text-disable": "#c6c6c6",
|
|
13
|
+
// background group
|
|
14
|
+
"background-default": "#f2f2f6",
|
|
15
|
+
"background-surface": "#ffffff",
|
|
16
|
+
"background-tonal": "#fdeaf4",
|
|
17
|
+
"background-pressed": "#dfdfe6",
|
|
18
|
+
"background-selected": "#fef4fa",
|
|
19
|
+
"background-disable": "#ebebf2",
|
|
20
|
+
// border group
|
|
21
|
+
"border-default": "#e8e8e8",
|
|
22
|
+
"border-disable": "#f9f9f9",
|
|
23
|
+
// semantic
|
|
24
|
+
primary: "#eb2f96",
|
|
25
|
+
secondary: "#f7acd5",
|
|
26
|
+
gradient: "#FDCADE",
|
|
27
|
+
// success / warning / error / highlight / interactive ...
|
|
28
|
+
"success-primary": "#34c759",
|
|
29
|
+
"success-secondary": "#aee9bd",
|
|
30
|
+
"success-container": "#d6f4de",
|
|
31
|
+
// ... add remaining tokens
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const darkTheme = {
|
|
35
|
+
"text-default": "#ffffff",
|
|
36
|
+
"text-secondary": "#b0b0b0",
|
|
37
|
+
"text-hint": "#727272",
|
|
38
|
+
"text-disable": "#505050",
|
|
39
|
+
"background-default": "#121212",
|
|
40
|
+
"background-surface": "#1e1e1e",
|
|
41
|
+
"background-tonal": "#fef4fa",
|
|
42
|
+
"background-pressed": "#1a1a1a",
|
|
43
|
+
"background-selected": "#fef8fc",
|
|
44
|
+
"background-disable": "#303030",
|
|
45
|
+
"border-default": "#2a2a2a",
|
|
46
|
+
"border-disable": "#242424",
|
|
47
|
+
primary: "#ed43a0",
|
|
48
|
+
secondary: "#fbd5ea",
|
|
49
|
+
gradient: "#FDCADE",
|
|
50
|
+
"success-primary": "#34c759",
|
|
51
|
+
"success-secondary": "#aee9bd",
|
|
52
|
+
"success-container": "#d6f4de",
|
|
53
|
+
// ... match all light keys
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// ── 2. Helpers ─────────────────────────────────────────────────────────────
|
|
57
|
+
|
|
58
|
+
function hexToComponents(hex) {
|
|
59
|
+
const clean = hex.replace("#", "");
|
|
60
|
+
const full =
|
|
61
|
+
clean.length === 3
|
|
62
|
+
? clean
|
|
63
|
+
.split("")
|
|
64
|
+
.map((c) => c + c)
|
|
65
|
+
.join("")
|
|
66
|
+
: clean;
|
|
67
|
+
return {
|
|
68
|
+
red: `0x${full.slice(0, 2).toUpperCase()}`,
|
|
69
|
+
green: `0x${full.slice(2, 4).toUpperCase()}`,
|
|
70
|
+
blue: `0x${full.slice(4, 6).toUpperCase()}`,
|
|
71
|
+
alpha: "1.000",
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function makeColorEntry(hex, isDark) {
|
|
76
|
+
const entry = {
|
|
77
|
+
color: {
|
|
78
|
+
"color-space": "srgb",
|
|
79
|
+
components: hexToComponents(hex),
|
|
80
|
+
},
|
|
81
|
+
idiom: "universal",
|
|
82
|
+
};
|
|
83
|
+
if (isDark) {
|
|
84
|
+
entry.appearances = [{ appearance: "luminosity", value: "dark" }];
|
|
85
|
+
}
|
|
86
|
+
return entry;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function generateColorSet(name, lightHex, darkHex, outputDir) {
|
|
90
|
+
const colorsetDir = join(outputDir, `${name}.colorset`);
|
|
91
|
+
mkdirSync(colorsetDir, { recursive: true });
|
|
92
|
+
|
|
93
|
+
const contents = {
|
|
94
|
+
colors: [
|
|
95
|
+
makeColorEntry(lightHex, false),
|
|
96
|
+
...(darkHex ? [makeColorEntry(darkHex, true)] : []),
|
|
97
|
+
],
|
|
98
|
+
info: { author: "xcode", version: 1 },
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
writeFileSync(
|
|
102
|
+
join(colorsetDir, "Contents.json"),
|
|
103
|
+
JSON.stringify(contents, null, 2),
|
|
104
|
+
);
|
|
105
|
+
console.log(`✅ ${name}.colorset`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ── 3. Output path ─────────────────────────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
const XCASSETS = new URL(
|
|
111
|
+
"../sample/iosApp/iosApp/Assets.xcassets/ThemeColors", // ← group folder
|
|
112
|
+
import.meta.url,
|
|
113
|
+
).pathname;
|
|
114
|
+
|
|
115
|
+
mkdirSync(XCASSETS, { recursive: true });
|
|
116
|
+
|
|
117
|
+
// Write a group Contents.json (tells Xcode this is a namespace folder)
|
|
118
|
+
writeFileSync(
|
|
119
|
+
join(XCASSETS, "Contents.json"),
|
|
120
|
+
JSON.stringify(
|
|
121
|
+
{
|
|
122
|
+
info: { author: "xcode", version: 1 },
|
|
123
|
+
properties: { "provides-namespace": true },
|
|
124
|
+
},
|
|
125
|
+
null,
|
|
126
|
+
2,
|
|
127
|
+
),
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
// ── 4. Generate all color sets ─────────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
for (const name of Object.keys(lightTheme)) {
|
|
133
|
+
generateColorSet(name, lightTheme[name], darkTheme[name], XCASSETS);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
console.log("\n🎉 Done! Open Xcode to verify the color sets.");
|