Skip to content

Commit 804b662

Browse files
committed
Merge branch 'main' into ADP-4954
# Conflicts: # versioned_docs/version-3.0/migration-react-native-314.md # versioned_docs/version-3.0/react-native-handling-onboarding-events.md # versioned_docs/version-3.0/react-native-present-onboardings.md # versioned_docs/version-3.0/react-native-present-paywalls.md # versioned_docs/version-3.0/sdk-installation-reactnative.md
2 parents c46b460 + d901fc0 commit 804b662

200 files changed

Lines changed: 3842 additions & 779 deletions

File tree

Some content is hidden

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

docusaurus.config.js

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -209,41 +209,41 @@ const config = {
209209
title: "Adapty SDK Sample Apps",
210210
items: [
211211
{
212-
label: "iOS",
213-
href: "https://github.com/adaptyteam/AdaptySDK-iOS/tree/master/Examples",
214-
},
215-
{
216-
label: "Android",
217-
href: "https://github.com/adaptyteam/AdaptySDK-Android",
218-
},
219-
{
220-
label: "Flutter",
221-
href: "https://github.com/adaptyteam/AdaptySDK-Flutter/tree/master/example",
222-
},
223-
{
224-
label: "Unity",
225-
href: "https://github.com/adaptyteam/AdaptySDK-Unity",
226-
},
227-
],
212+
"label": "Sample apps",
213+
"to": "/sample-apps"
214+
}
215+
]
228216
},
229217
{
230218
title: "SDK Reference",
231219
items: [
232220
{
233221
label: "iOS",
234-
href: "/sdk-installation-ios",
222+
href: "https://swift.adapty.io",
235223
},
236224
{
237225
label: "Android",
238-
href: "/sdk-installation-android",
226+
href: "https://android.adapty.io",
239227
},
240228
{
241229
label: "Flutter",
242-
href: "/sdk-installation-flutter",
230+
href: "https://pub.dev/documentation/adapty_flutter/latest/adapty_flutter/#classes",
243231
},
244232
{
245233
label: "React Native",
246-
href: "/sdk-installation-reactnative",
234+
href: "https://react-native.adapty.io",
235+
},
236+
{
237+
label: "Unity",
238+
href: "https://unity.adapty.io",
239+
},
240+
{
241+
label: "Kotlin Multiplatform",
242+
href: "https://kmp.adapty.io",
243+
},
244+
{
245+
label: "Capacitor",
246+
href: "https://capacitor.adapty.io",
247247
}
248248
],
249249
},
@@ -252,10 +252,6 @@ const config = {
252252
items: [
253253
{
254254
label: "Server-side API",
255-
href: "/docs/getting-started-with-server-side-api",
256-
},
257-
{
258-
label: "Adapty API",
259255
href: "/api-adapty",
260256
},
261257
{
@@ -343,8 +339,8 @@ const config = {
343339
// Configure the color mode to default to light and disable the dark mode switch
344340
colorMode: {
345341
defaultMode: 'light', // Set default theme to light mode
346-
disableSwitch: true, // Disable the toggle for switching themes
347-
respectPrefersColorScheme: false, // Ignore system preference for dark mode
342+
disableSwitch: false, // Enable the toggle for switching themes
343+
respectPrefersColorScheme: true, // Respect system preference for dark mode
348344
},
349345
sidebar: {
350346
autoCollapseCategories: true,

src/components/ArticleButtons/styles.module.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,30 @@
6161
.theme-doc-markdown h1 {
6262
margin-bottom: 0.5em;
6363
margin-top: 0;
64+
}
65+
66+
/* Dark Mode Styles */
67+
[data-theme='dark'] .button {
68+
background: #1e1e1e;
69+
border: 1px solid #2a2a2a;
70+
color: var(--textPrimary);
71+
}
72+
73+
[data-theme='dark'] .button svg {
74+
fill: var(--textPrimary);
75+
color: var(--textPrimary);
76+
}
77+
78+
[data-theme='dark'] .button:hover {
79+
background: #252525;
80+
border-color: #3a3a3a;
81+
}
82+
83+
[data-theme='dark'] .button:focus {
84+
outline: none;
85+
box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
86+
}
87+
88+
[data-theme='dark'] .divider {
89+
background: #2a2a2a;
6490
}

src/components/CustomDocCardList/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export default function CustomDocCardList({ ids = null }) {
8080

8181
if (filteredItems.length === 0) {
8282
return (
83-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
84-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
83+
<div className={styles.emptyState}>
84+
<h3>Related Topics</h3>
8585
<p>No related topics found for the specified IDs.</p>
8686
</div>
8787
);
@@ -99,8 +99,8 @@ export default function CustomDocCardList({ ids = null }) {
9999
// Default behavior: use current category items
100100
if (!category || !category.items) {
101101
return (
102-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
103-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
102+
<div className={styles.emptyState}>
103+
<h3>Related Topics</h3>
104104
<p>No related topics found. This might be because the current page doesn't have child pages in the sidebar.</p>
105105
</div>
106106
);
@@ -114,8 +114,8 @@ export default function CustomDocCardList({ ids = null }) {
114114

115115
if (filteredItems.length === 0) {
116116
return (
117-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
118-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
117+
<div className={styles.emptyState}>
118+
<h3>Related Topics</h3>
119119
<p>No related topics found. This might be because the current page doesn't have child pages in the sidebar.</p>
120120
</div>
121121
);

src/components/CustomDocCardList/styles.module.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,51 @@
107107
font-size: 11px;
108108
-webkit-line-clamp: 2;
109109
}
110+
}
111+
112+
/* Empty state styling */
113+
.emptyState {
114+
padding: 20px;
115+
border: 1px solid #e1e5e9;
116+
border-radius: 8px;
117+
margin: 20px 0;
118+
background-color: #f8f9fa;
119+
}
120+
121+
.emptyState h3 {
122+
color: #4a5568;
123+
margin: 0 0 10px 0;
124+
}
125+
126+
/* Dark Mode Styles */
127+
[data-theme='dark'] .card {
128+
background: #1e1e1e;
129+
border: 1px solid #2a2a2a;
130+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
131+
}
132+
133+
[data-theme='dark'] .card:hover {
134+
border-color: var(--purplePrimary);
135+
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
136+
}
137+
138+
[data-theme='dark'] .cardTitle {
139+
color: var(--purplePrimary) !important;
140+
}
141+
142+
[data-theme='dark'] .cardDescription {
143+
color: var(--textSecondary) !important;
144+
}
145+
146+
[data-theme='dark'] .emptyState {
147+
background-color: #1e1e1e;
148+
border-color: #2a2a2a;
149+
}
150+
151+
[data-theme='dark'] .emptyState h3 {
152+
color: var(--textPrimary);
153+
}
154+
155+
[data-theme='dark'] .emptyState p {
156+
color: var(--textSecondary);
110157
}

src/components/SidebarMenu/index.jsx

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
22
import { useHistory } from '@docusaurus/router';
33
import { useActiveDocContext } from '@docusaurus/plugin-content-docs/client';
44
import { isMobileSdkDocument, getCorrespondingDocId } from '../../lib/sidebarMapping';
5+
import styles from './styles.module.css';
56

67

78

@@ -132,56 +133,20 @@ export default function SidebarMenu() {
132133

133134

134135
return (
135-
<div style={{
136-
width: '100%',
137-
padding: '24px 16px 8px 16px',
138-
background: '#f8f9fa',
139-
borderBottom: '1px solid #e9ecef',
140-
flexShrink: 0,
141-
boxShadow: '0 1px 3px rgba(0,0,0,0.1)'
142-
}}>
143-
<div style={{
144-
display: 'flex',
145-
alignItems: 'center',
146-
gap: '8px'
147-
}}>
148-
<div style={{
149-
color: '#495057',
150-
fontWeight: '600',
151-
fontSize: '15px',
152-
whiteSpace: 'nowrap'
153-
}}>
136+
<div className={styles.platformSwitcher}>
137+
<div className={styles.switcherInner}>
138+
<div className={styles.switcherLabel}>
154139
Platform:
155140
</div>
156-
<div style={{ position: 'relative', flex: 1 }}>
141+
<div className={styles.selectWrapper}>
157142
<button
158-
style={{
159-
width: '100%',
160-
background: 'white',
161-
border: '1px solid #dee2e6',
162-
borderRadius: '8px',
163-
color: '#495057',
164-
fontSize: '15px',
165-
fontWeight: '500',
166-
padding: '8px 12px',
167-
cursor: 'pointer',
168-
display: 'flex',
169-
alignItems: 'center',
170-
justifyContent: 'space-between',
171-
minWidth: '0'
172-
}}
143+
className={styles.selectButton}
173144
onClick={() => setIsDropdownOpen(!isDropdownOpen)}
174145
onBlur={() => setTimeout(() => setIsDropdownOpen(false), 150)}
175146
>
176147
<span>{currentPlatform.name}</span>
177148
<svg
178-
style={{
179-
width: '12px',
180-
height: '12px',
181-
marginLeft: '8px',
182-
transform: isDropdownOpen ? 'rotate(180deg)' : 'rotate(0deg)',
183-
transition: 'transform 0.2s ease'
184-
}}
149+
className={`${styles.selectIcon} ${isDropdownOpen ? styles.selectIconOpen : ''}`}
185150
fill="currentColor"
186151
viewBox="0 0 20 20"
187152
>
@@ -190,54 +155,15 @@ export default function SidebarMenu() {
190155
</button>
191156

192157
{isDropdownOpen && (
193-
<div style={{
194-
position: 'absolute',
195-
top: '100%',
196-
left: '0',
197-
right: '0',
198-
background: 'white',
199-
border: '1px solid #dee2e6',
200-
borderRadius: '8px',
201-
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
202-
zIndex: 1000,
203-
marginTop: '2px',
204-
padding: '8px'
205-
}}>
158+
<div className={styles.dropdown}>
206159
{platforms.map((platform) => (
207160
<button
208161
key={platform.name}
209-
style={{
210-
width: '100%',
211-
padding: '6px 16px',
212-
background: platform.name === currentPlatform.name ? 'var(--ifm-menu-color-background-active)' : 'transparent',
213-
border: 'none',
214-
textAlign: 'left',
215-
cursor: 'pointer',
216-
fontSize: '15px',
217-
color: platform.name === currentPlatform.name ? 'var(--purplePrimary)' : 'var(--textSecondary)',
218-
fontWeight: platform.name === currentPlatform.name ? '600' : '400',
219-
borderRadius: '8px',
220-
margin: '0'
221-
}}
162+
className={`${styles.dropdownItem} ${platform.name === currentPlatform.name ? styles.dropdownItemActive : ''}`}
222163
onClick={() => {
223164
handlePlatformChange(platform);
224165
setIsDropdownOpen(false);
225166
}}
226-
onMouseEnter={(e) => {
227-
if (platform.name !== currentPlatform.name) {
228-
e.target.style.background = 'var(--ifm-menu-color-background-hover)';
229-
e.target.style.color = 'var(--textPrimary)';
230-
}
231-
}}
232-
onMouseLeave={(e) => {
233-
if (platform.name !== currentPlatform.name) {
234-
e.target.style.background = 'transparent';
235-
e.target.style.color = 'var(--textSecondary)';
236-
} else {
237-
e.target.style.background = 'var(--ifm-menu-color-background-active)';
238-
e.target.style.color = 'var(--purplePrimary)';
239-
}
240-
}}
241167
>
242168
{platform.name}
243169
</button>

0 commit comments

Comments
 (0)