Skip to content

Commit 830afb6

Browse files
committed
Release 7.35.0
2 parents b5389b3 + c2bc66c commit 830afb6

File tree

241 files changed

+26556
-10378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+26556
-10378
lines changed

.github/workflows/deployDocs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # Needed for pushing to gh-pages
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: '.nvmrc'
22+
cache: 'yarn'
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Build documentation
28+
run: yarn docs:build
29+
30+
- name: Deploy documentation
31+
env:
32+
GIT_USER: github-actions[bot]
33+
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
34+
35+
run: |
36+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
37+
git config --global user.name "github-actions[bot]"
38+
cd docuilib
39+
yarn install
40+
yarn deploy

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ npm-debug.log
4545

4646
# yarn
4747
yarn-error.log
48-
.yarn/cache
49-
.yarn/install-state.gz
50-
.yarn/yarn.build.json
48+
**/.yarn/cache
49+
**/.yarn/install-state.gz
50+
**/.yarn/yarn.build.json
5151

5252
.vscode
5353

@@ -71,6 +71,7 @@ dist
7171
dist-ts
7272
package-lock.json
7373
docs/components/**
74+
!scripts/build
7475

7576
# Ruby / CocoaPods
7677
/ios/Pods/

Gemfile.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ GEM
7272
nap (1.1.0)
7373
netrc (0.11.0)
7474
public_suffix (4.0.7)
75-
rexml (3.3.6)
76-
strscan
75+
rexml (3.3.9)
7776
ruby-macho (2.5.1)
78-
strscan (3.1.0)
7977
typhoeus (1.4.0)
8078
ethon (>= 0.9.0)
8179
tzinfo (2.0.6)

android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ dependencies {
125125
implementation("com.facebook.react:flipper-integration:0.73.9")
126126

127127
implementation project(':react-native-navigation')
128-
implementation project(':react-native-ui-lib')
129128
implementation 'com.facebook.fresco:fresco:2.5.0'
130129
implementation 'com.facebook.fresco:animated-gif:2.5.0'
131130

android/app/src/main/java/com/rnuilib/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MainApplication : NavigationApplication() {
2222
PackageList(this).packages.apply {
2323
// Packages that cannot be autolinked yet can be added manually here, for example:
2424
// add(UiLibPackageList(MainApplication.this).getPackageList())
25-
addAll(UiLibPackageList(this@MainApplication).getPackageList())
25+
// addAll(UiLibPackageList(this@MainApplication).getPackageList())
2626
// add(MyReactNativePackage())
2727
}
2828

android/settings.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
21
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
32
plugins { id("com.facebook.react.settings") }
43
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
54
rootProject.name = 'rnuilib'
6-
// apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
75
include ':app'
86
includeBuild('../node_modules/@react-native/gradle-plugin')
9-
10-
include ':react-native-ui-lib'
11-
project(':react-native-ui-lib').projectDir = new File(rootProject.projectDir, '../lib/android')

demo/src/screens/componentScreens/DateTimePickerScreen.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default class DateTimePickerScreen extends Component<{}, State> {
6666
containerStyle={{marginVertical: 20}}
6767
label={'Date'}
6868
placeholder={'Select a date'}
69+
// textColor={Colors.red30}
70+
// backgroundColor={Colors.$backgroundDark}
71+
// cancelButtonProps={{iconStyle: {tintColor: Colors.$iconDefaultLight}}}
6972
// value={new Date('October 13, 2014')}
7073
/>
7174
<DateTimePicker

docuilib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Generated files
88
.docusaurus
99
.cache-loader
10+
.yarn
1011

1112
# Misc
1213
.DS_Store

docuilib/docusaurus.config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ const darkCodeTheme = themes.dracula;
1717
projectName: 'react-native-ui-lib', // Usually your repo name.
1818
trailingSlash: false,
1919
customFields: {
20-
livePreviewSource:
21-
process.env.NODE_ENV === 'development'
22-
? 'http://localhost:3000/react-native-ui-lib/livePreview'
23-
: 'https://wix.github.io/react-native-ui-lib/livePreview',
2420
docsMainEntry: 'getting-started/setup',
2521
expoSnackLink: 'https://snack.expo.io/@ethanshar/rnuilib_snack',
2622
stars: '4.7'
@@ -96,8 +92,14 @@ const darkCodeTheme = themes.dracula;
9692
{
9793
type: 'doc',
9894
docId: 'getting-started/setup',
99-
position: 'right',
100-
label: 'Docs'
95+
position: 'left',
96+
label: 'Guides'
97+
},
98+
{
99+
type: 'doc',
100+
docId: 'components/basic/View',
101+
position: 'left',
102+
label: 'Components'
101103
},
102104
// {to: '/blog', label: 'Blog', position: 'left'},
103105
{

docuilib/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uilib-docs",
3-
"version": "3.2.0",
3+
"version": "3.3.5",
44
"main": "./src/index.ts",
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -16,12 +16,16 @@
1616
"releaseDocs": "node ./scripts/releaseDocs.js"
1717
},
1818
"dependencies": {
19-
"@docusaurus/core": "^3.5.2",
20-
"@docusaurus/preset-classic": "^3.5.2",
21-
"@docusaurus/theme-live-codeblock": "^3.5.2",
19+
"@docusaurus/core": "3.6.1",
20+
"@docusaurus/module-type-aliases": "3.6.1",
21+
"@docusaurus/preset-classic": "3.6.1",
22+
"@docusaurus/theme-live-codeblock": "3.6.1",
23+
"@docusaurus/types": "3.6.1",
2224
"@mdx-js/mdx": "^3.0.1",
2325
"@react-native-clipboard/clipboard": "^1.14.2",
2426
"@svgr/webpack": "^5.5.0",
27+
"babel-loader": "9.2.1",
28+
"babel-plugin-react-native-web": "^0.19.12",
2529
"classnames": "^2.3.1",
2630
"clsx": "^1.1.1",
2731
"docusaurus-plugin-sass": "^0.2.1",
@@ -34,19 +38,16 @@
3438
"url-loader": "^4.1.1"
3539
},
3640
"devDependencies": {
37-
"@docusaurus/module-type-aliases": "^3.5.2",
38-
"@docusaurus/types": "^3.5.2",
3941
"@tsconfig/docusaurus": "^1.0.4",
4042
"@types/react": "^17.0.14",
4143
"@types/react-helmet": "^6.1.2",
4244
"@types/react-router-dom": "^5.1.8",
43-
"babel-plugin-react-native-web": "^0.19.12",
4445
"react": "^18.2.0",
4546
"react-dom": "^18.2.0",
4647
"react-native-linear-gradient": "2.6.2",
4748
"react-native-reanimated": "^3.15.1",
4849
"react-native-shimmer-placeholder": "^2.0.9",
49-
"react-native-ui-lib": "7.32.0-snapshot.5506",
50+
"react-native-ui-lib": "7.34.6-snapshot.5981",
5051
"shell-utils": "^1.0.10",
5152
"typescript": "~5.2.2"
5253
},

docuilib/sidebars.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ module.exports = {
3131
// By default, Docusaurus generates a sidebar from the docs folder structure
3232
// tutorialSidebar: [{type: 'autogenerated', dirName: '.'}]
3333

34-
// But you can create a sidebar manually
35-
tutorialSidebar: [
34+
guidesSidebar: [
3635
{
3736
type: 'category',
3837
label: 'Getting Started',
@@ -54,25 +53,29 @@ module.exports = {
5453
dirName: `foundation`
5554
}
5655
]
57-
},
56+
}
57+
],
58+
componentsSidebar: [
5859
{
5960
type: 'category',
6061
label: 'Components',
6162
collapsible: false,
6263
// items: ['Basic', 'Lists', 'Form', 'Overlays', 'Layout', 'Keyboard', 'Incubator'].map(category => {
63-
items: Object.keys(componentsCategories).sort().map(category => {
64-
return {
65-
type: 'category',
66-
label: componentsCategories[category],
67-
collapsed: true,
68-
items: [
69-
{
70-
type: 'autogenerated',
71-
dirName: `components/${category}`
72-
}
73-
]
74-
};
75-
})
64+
items: Object.keys(componentsCategories)
65+
.sort()
66+
.map(category => {
67+
return {
68+
type: 'category',
69+
label: componentsCategories[category],
70+
collapsed: true,
71+
items: [
72+
{
73+
type: 'autogenerated',
74+
dirName: `components/${category}`
75+
}
76+
]
77+
};
78+
})
7679
}
7780
]
7881
};

docuilib/src/assets/icons/copy.png

286 Bytes
Loading
448 Bytes
Loading
554 Bytes
Loading
871 Bytes
Loading
1.22 KB
Loading

docuilib/src/components/CodeSection.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.codeSection {
44
padding-bottom: 5%;

docuilib/src/components/ComponentPage.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.column {
44
display: 'flex';

docuilib/src/components/ComponentPage.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import './ComponentPage.module.scss';
66
import {ListSection} from './pageComponents/ListSection';
77
import {Section} from './pageComponents/Section';
88
import {Banner} from './pageComponents/Banner';
9+
import {devTab} from './pageComponents/DefaultTabs';
910

1011
export default function ComponentPage({component}) {
1112
const Divider = section => {
@@ -62,7 +63,7 @@ export default function ComponentPage({component}) {
6263

6364
// TODO: align Tabs bottom border with TabItem's selected indication line
6465
if (tabs) {
65-
return <Tabs className="main-tabs">{getTabItems(tabs)}</Tabs>;
66+
return <Tabs className="main-tabs">{getTabItems([...tabs, devTab])}</Tabs>;
6667
}
6768
};
6869

@@ -72,12 +73,10 @@ export default function ComponentPage({component}) {
7273
const hero = component.docs?.hero;
7374

7475
if (hero) {
75-
// TODO: align hero's image to page title
76-
// const name = component.category === 'incubator' ? `Incubator.${component.name}` : component.name;
7776
const section = {
78-
// title: name,
7977
layout: 'horizontal',
8078
...hero,
79+
title: component.name,
8180
type: 'hero'
8281
};
8382

docuilib/src/components/ComponentsSection.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.components {
44
position: relative;

docuilib/src/components/FeatureSection.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.featuresSection {
44
display: flex;

docuilib/src/components/LibrariesSection.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.librariesSection {
44
width: 100vw;

docuilib/src/components/MainSection.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'src/css/constants';
1+
@use 'src/css/constants' as *;
22

33
.main {
44
position: relative;

docuilib/src/components/UILivePreview.tsx

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, {useEffect, useRef, useState, useMemo} from 'react';
22
import {StyleSheet} from 'react-native';
33
import {LiveProvider, LiveEditor} from 'react-live';
44
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
import BrowserOnly from '@docusaurus/BrowserOnly';
56
import {View, Colors} from 'react-native-ui-lib/core';
67
import ReactLiveScope from '../theme/ReactLiveScope';
78

@@ -12,7 +13,6 @@ export default function UILivePreview({code: codeProp}) {
1213
const [iframeLoaded, setIframeLoaded] = useState(false);
1314
const {siteConfig} = useDocusaurusContext();
1415
const iframeRef = useRef(null);
15-
const iframeSource = siteConfig?.customFields?.livePreviewSource as string;
1616

1717
useEffect(() => {
1818
if (iframeLoaded) {
@@ -30,27 +30,35 @@ export default function UILivePreview({code: codeProp}) {
3030
}, []);
3131

3232
return (
33-
<View row gap-s2 style={styles.liveCodeWrapper}>
34-
<LiveProvider code={code} scope={ReactLiveScope}>
35-
<View flex style={styles.editorWrapper}>
36-
<LiveEditor
37-
className="font-mono"
38-
onChange={setCode}
39-
//@ts-ignore
40-
style={liveEditorStyle}
41-
/>
42-
</View>
43-
<View bg-$backgroundDefault margin-s2 style={styles.iframeWrapper}>
44-
<iframe
45-
ref={iframeRef}
46-
style={styles.iframe}
47-
src={iframeSource}
48-
title="Simulator"
49-
onLoad={() => setIframeLoaded(true)}
50-
/>
51-
</View>
52-
</LiveProvider>
53-
</View>
33+
<BrowserOnly>
34+
{() => {
35+
const iframeSource = `${window.location.origin}${siteConfig?.baseUrl}livePreview`;
36+
37+
return (
38+
<View row gap-s2 style={styles.liveCodeWrapper}>
39+
<LiveProvider code={code} scope={ReactLiveScope}>
40+
<View flex style={styles.editorWrapper}>
41+
<LiveEditor
42+
className="font-mono"
43+
onChange={setCode}
44+
//@ts-ignore
45+
style={liveEditorStyle}
46+
/>
47+
</View>
48+
<View bg-$backgroundDefault margin-s2 style={styles.iframeWrapper}>
49+
<iframe
50+
ref={iframeRef}
51+
style={styles.iframe}
52+
src={iframeSource}
53+
title="Simulator"
54+
onLoad={() => setIframeLoaded(true)}
55+
/>
56+
</View>
57+
</LiveProvider>
58+
</View>
59+
);
60+
}}
61+
</BrowserOnly>
5462
);
5563
}
5664

0 commit comments

Comments
 (0)