|
|
1 周之前 | |
|---|---|---|
| .agents | 2 周之前 | |
| .github | 3 周之前 | |
| .vscode | 2 周之前 | |
| .yarn | 5 月之前 | |
| bin | 1 周之前 | |
| eslint-local-rules | 2 周之前 | |
| example | 1 周之前 | |
| src | 1 周之前 | |
| .editorconfig | 2 周之前 | |
| .gitattributes | 2 周之前 | |
| .gitignore | 1 月之前 | |
| .npmignore | 1 月之前 | |
| .nvmrc | 5 月之前 | |
| .watchmanconfig | 5 月之前 | |
| .yarnrc.yml | 1 月之前 | |
| CODE_OF_CONDUCT.md | 5 月之前 | |
| CONTRIBUTING.md | 5 月之前 | |
| LICENSE | 5 月之前 | |
| README.md | 1 周之前 | |
| TODO.md | 3 周之前 | |
| babel.config.js | 2 周之前 | |
| eslint.config.mjs | 1 周之前 | |
| metro-config.js | 1 周之前 | |
| package.json | 1 周之前 | |
| react-native.config.js | 2 月之前 | |
| tsconfig.build.json | 5 月之前 | |
| tsconfig.json | 3 周之前 | |
| turbo.json | 1 月之前 | |
| version.mjs | 1 月之前 | |
| webpack-config.js | 1 周之前 | |
| yarn.lock | 1 周之前 |
The NCore, NİBGAT® UI - Kit. The NİBGAT®'s UI / Component Library.
NCore UI Kit provides built-in configuration tools to maintain standard coding guidelines and ensure seamless integration across NİBGAT projects.
If you want to use the exact same ESLint rules, TypeScript configs, and VSCode settings used in NCore UI Kit, simply run the setup command in your project root:
npx ncore-setup
This command automatically copies .vscode/, eslint.config.mjs, eslint-local-rules/, and tsconfig.json to your project.
When building a web project with React Native Web, you have two options:
Option A: Default NCore Webpack Config (Zero-config) Use this if you are starting a new web project and want a ready-to-use configuration.
// webpack.config.js
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ESLintPlugin = require("eslint-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
const { createDefaultWebpackConfig } = require("ncore-ui-kit/webpack-config");
module.exports = createDefaultWebpackConfig({
appDirectory: path.resolve(__dirname, "./"),
HtmlWebpackPlugin,
ESLintPlugin,
CopyPlugin,
webpack
});
Option B: Wrap your existing Webpack config If you already have a complex webpack config, you can wrap it to inject necessary polyfills and aliases.
// webpack.config.js
const { withNCoreUIKitWebpack } = require("ncore-ui-kit/webpack-config");
const webpack = require("webpack");
let config = {
// ... your existing config
};
module.exports = withNCoreUIKitWebpack(config, webpack);
If you are using this library in a React Native or Expo mobile project, you must update your metro.config.js to include the required Node.js core module polyfills (crypto, process, stream).
For Expo Projects:
// metro.config.js
const { getDefaultConfig } = require("expo/metro-config");
const { withNCoreUIKit } = require("ncore-ui-kit/metro-config");
const config = getDefaultConfig(__dirname);
module.exports = withNCoreUIKit(config);
For Bare React Native Projects (CLI):
// metro.config.js
const { getDefaultConfig } = require("@react-native/metro-config");
const { withNCoreUIKit } = require("ncore-ui-kit/metro-config");
const config = getDefaultConfig(__dirname);
module.exports = withNCoreUIKit(config);
useEffect(() => {
NCoreUIKitMenu.load({
siteLogoProps: {
imageUrl: "https://www.nibgat.com/assets/images/logo.png",
onPress: () => {
navigation.navigate("Home");
},
imageProps: {
resizeMode: "stretch"
},
imageSpace: "spacingLg",
isWorkWithAction: true,
subTitle: "Core Tech",
title: "NİBGAT®"
},
renderFooter: () => {
return <View
style={{
padding: spaces.spacingMd,
flexDirection: "row",
alignItems: "center"
}}
>
<View
style={{
marginRight: spaces.spacingSm,
justifyContent: "center",
flexDirection: "row",
alignItems: "center"
}}
>
<Text
variant="labelLargeSize"
>
Palet:
</Text>
<PaletteSwitcher/>
</View>
<View
style={{
justifyContent: "center",
flexDirection: "row",
alignItems: "center"
}}
>
<Text
variant="labelLargeSize"
>
Tema:
</Text>
<ThemeSwitcher/>
</View>
</View>;
},
isAutoClosed: true,
buttons: [
{
redirectMain: "Home",
isCollapsible: true,
title: "Ana Sayfa",
icon: ({
color
}) => <HomeIcon
color={colors.content.icon[color]}
/>,
subButtons: [
{
title: "Text",
redirectMain: "TextPage"
}
]
},
{
redirectMain: "Text",
isCollapsible: true,
title: "Deneme",
icon: ({
color
}) => <HomeIcon
color={colors.content.icon[color]}
/>,
subButtons: [
{
title: "Noliii",
redirectMain: "Home"
}
]
},
{
title: "Text",
redirectMain: "TextPage"
}
],
navigation: navigation as unknown as NCoreUIKit.Navigation,
id: "test"
});