@cleartrip/ct-design-3d-carousel 4.0.0-SNAPSHOT-rnfinaltest62.0 → 4.0.0-SNAPSHOT-reactnative.0
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/README.md +14 -14
- package/dist/type.d.ts +6 -6
- package/dist/type.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/type.ts +6 -6
package/README.md
CHANGED
|
@@ -141,7 +141,7 @@ precedence (same as React Native's `StyleSheet` array spreading):
|
|
|
141
141
|
### Style overrides (React Native)
|
|
142
142
|
|
|
143
143
|
The `styleConfig` shape is identical on native. Each slot accepts a
|
|
144
|
-
`
|
|
144
|
+
`Styles[]` array and the entries are spread directly onto the `View`'s
|
|
145
145
|
`style` prop.
|
|
146
146
|
|
|
147
147
|
```tsx
|
|
@@ -188,19 +188,19 @@ const styles = StyleSheet.create({
|
|
|
188
188
|
## styleConfig
|
|
189
189
|
|
|
190
190
|
`styleConfig` is a single unified interface used by **both web and native**.
|
|
191
|
-
Every slot accepts a **`
|
|
191
|
+
Every slot accepts a **`Styles[]` array** — the same pattern as React
|
|
192
192
|
Native's style array spreading.
|
|
193
193
|
|
|
194
194
|
```ts
|
|
195
195
|
interface I3DCarouselStyleConfig {
|
|
196
|
-
rootContainer?:
|
|
197
|
-
relativeBaseContainer?:
|
|
198
|
-
sliderRootContainer?:
|
|
199
|
-
iconsContainer?:
|
|
200
|
-
leftIconContainer?:
|
|
201
|
-
rightIconContainer?:
|
|
202
|
-
sliderCardContainer?:
|
|
203
|
-
sliderCardRootContainer?:
|
|
196
|
+
rootContainer?: Styles[];
|
|
197
|
+
relativeBaseContainer?: Styles[];
|
|
198
|
+
sliderRootContainer?: Styles[];
|
|
199
|
+
iconsContainer?: Styles[];
|
|
200
|
+
leftIconContainer?: Styles[];
|
|
201
|
+
rightIconContainer?: Styles[];
|
|
202
|
+
sliderCardContainer?: Styles[];
|
|
203
|
+
sliderCardRootContainer?: Styles[];
|
|
204
204
|
}
|
|
205
205
|
```
|
|
206
206
|
|
|
@@ -219,11 +219,11 @@ interface I3DCarouselStyleConfig {
|
|
|
219
219
|
|
|
220
220
|
### How styles are applied
|
|
221
221
|
|
|
222
|
-
**Web** — each `
|
|
222
|
+
**Web** — each `Styles[]` entry is passed to `useWebMergeStyles` from
|
|
223
223
|
`@cleartrip/ct-design-style-manager`, which converts raw style objects to
|
|
224
224
|
Emotion class names and merges them with the component's built-in class names.
|
|
225
225
|
|
|
226
|
-
**Native** — each `
|
|
226
|
+
**Native** — each `Styles[]` entry is spread directly into the `View`'s
|
|
227
227
|
`style` array alongside the component's `makeStyles`-generated styles.
|
|
228
228
|
|
|
229
229
|
### Full example
|
|
@@ -330,7 +330,7 @@ Styles follow the design-system migration rules:
|
|
|
330
330
|
|
|
331
331
|
| Area | Before (`yagami`) | After (`ct-design-system`) |
|
|
332
332
|
|---|---|---|
|
|
333
|
-
| `styleConfig` shape | `rootContainerStyles?: Styles[]` (native) / `rootContainerProps?: { css?, className? }` (web) | `rootContainer?:
|
|
333
|
+
| `styleConfig` shape | `rootContainerStyles?: Styles[]` (native) / `rootContainerProps?: { css?, className? }` (web) | `rootContainer?: Styles[]` — unified, same on both platforms |
|
|
334
334
|
| Key naming | `rootContainerProps` (web) / `rootContainerStyles` (native) | `rootContainer` — no `Props` / `Styles` suffix |
|
|
335
335
|
| SCSS import | `import './index.scss'` not required externally | No CSS file to import — styles are bundled |
|
|
336
336
|
| Swipe (native) | `useSwipeable` (internal Yagami hook) | `PanGestureHandler` (gesture-handler) |
|
|
@@ -342,7 +342,7 @@ Styles follow the design-system migration rules:
|
|
|
342
342
|
|
|
343
343
|
### 2.21.0
|
|
344
344
|
- **Migrated** from `yagami/core/components/components/3DCarousel`
|
|
345
|
-
- **Unified** `styleConfig` — single `I3DCarouselStyleConfig` interface used on both web and native; all slot keys accept `
|
|
345
|
+
- **Unified** `styleConfig` — single `I3DCarouselStyleConfig` interface used on both web and native; all slot keys accept `Styles[]` arrays (e.g. `rootContainer: [style1, style2]`)
|
|
346
346
|
- **Removed** separate `I3DCarouselNativeStyleConfig` and `IWebContainerStyleProps` interfaces
|
|
347
347
|
- **Removed** `StyleSheet.create` from native files; replaced with `makeStyles` from `@cleartrip/ct-design-style-manager`
|
|
348
348
|
- **Replaced** `@emotion/styled` wrappers with `makeStyles` + `useStyles` + `useWebMergeStyles`
|
package/dist/type.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type SlideDirection = `${SLIDER_DIRECTION}`;
|
|
|
13
13
|
export interface I3DCarouselStyleConfig {
|
|
14
14
|
rootContainerStyles?: Styles[];
|
|
15
15
|
relativeBaseContainerStyles?: Styles[];
|
|
16
|
-
sliderRootContainerStyles?:
|
|
16
|
+
sliderRootContainerStyles?: Styles[];
|
|
17
17
|
iconsContainerStyles?: Styles[];
|
|
18
18
|
leftIconContainerStyles?: Styles[];
|
|
19
19
|
rightIconContainerStyles?: Styles[];
|
|
@@ -41,10 +41,10 @@ export interface ICarouselSlideProps {
|
|
|
41
41
|
slider: ReactNode;
|
|
42
42
|
staticStyles: Record<string, ViewStyle>;
|
|
43
43
|
sliderLength: number;
|
|
44
|
-
sliderCardRootContainerStyles?:
|
|
45
|
-
iconsContainerStyles?:
|
|
46
|
-
leftIconContainerStyles?:
|
|
47
|
-
rightIconContainerStyles?:
|
|
48
|
-
sliderCardContainerStyles?:
|
|
44
|
+
sliderCardRootContainerStyles?: Styles[];
|
|
45
|
+
iconsContainerStyles?: Styles[];
|
|
46
|
+
leftIconContainerStyles?: Styles[];
|
|
47
|
+
rightIconContainerStyles?: Styles[];
|
|
48
|
+
sliderCardContainerStyles?: Styles[];
|
|
49
49
|
}
|
|
50
50
|
//# sourceMappingURL=type.d.ts.map
|
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/3DCarousel/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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AE,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC;CACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-design-3d-carousel",
|
|
3
|
-
"version": "4.0.0-SNAPSHOT-
|
|
3
|
+
"version": "4.0.0-SNAPSHOT-reactnative.0",
|
|
4
4
|
"description": "Animated Carousel compoennt",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "./dist/ct-design-3-d-carousel.cjs.js",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"react-swipeable": "7.0.1",
|
|
27
|
-
"@cleartrip/ct-design-icons": "39.0.0-SNAPSHOT-
|
|
28
|
-
"@cleartrip/ct-design-container": "4.0.0-SNAPSHOT-
|
|
29
|
-
"@cleartrip/ct-design-style-manager": "4.0.0-SNAPSHOT-
|
|
30
|
-
"@cleartrip/ct-design-
|
|
31
|
-
"@cleartrip/ct-design-
|
|
32
|
-
"@cleartrip/ct-design-
|
|
33
|
-
"@cleartrip/ct-design-
|
|
27
|
+
"@cleartrip/ct-design-icons": "39.0.0-SNAPSHOT-reactnative.0",
|
|
28
|
+
"@cleartrip/ct-design-container": "4.0.0-SNAPSHOT-reactnative.0",
|
|
29
|
+
"@cleartrip/ct-design-style-manager": "4.0.0-SNAPSHOT-reactnative.0",
|
|
30
|
+
"@cleartrip/ct-design-use-isomorphic-effect": "4.0.0-SNAPSHOT-reactnative.0",
|
|
31
|
+
"@cleartrip/ct-design-common-utils": "4.0.0-SNAPSHOT-reactnative.0",
|
|
32
|
+
"@cleartrip/ct-design-theme": "4.0.0-SNAPSHOT-reactnative.0",
|
|
33
|
+
"@cleartrip/ct-design-carousel": "4.0.0-SNAPSHOT-reactnative.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"react-native-gesture-handler": "2.26.0",
|
|
37
37
|
"react-native-reanimated": "3.19.5",
|
|
38
|
-
"@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-
|
|
38
|
+
"@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-reactnative.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16.8.0",
|
package/src/type.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface I3DCarouselStyleConfig {
|
|
|
27
27
|
/**
|
|
28
28
|
* Styles for the absolutely positioned slider root container.
|
|
29
29
|
*/
|
|
30
|
-
sliderRootContainerStyles?:
|
|
30
|
+
sliderRootContainerStyles?: Styles[];
|
|
31
31
|
/**
|
|
32
32
|
* Styles for the icons container (shown only when `showSliderIcons` is true).
|
|
33
33
|
*/
|
|
@@ -110,9 +110,9 @@ export interface ICarouselSlideProps {
|
|
|
110
110
|
slider: ReactNode;
|
|
111
111
|
staticStyles: Record<string, ViewStyle>;
|
|
112
112
|
sliderLength: number;
|
|
113
|
-
sliderCardRootContainerStyles?:
|
|
114
|
-
iconsContainerStyles?:
|
|
115
|
-
leftIconContainerStyles?:
|
|
116
|
-
rightIconContainerStyles?:
|
|
117
|
-
sliderCardContainerStyles?:
|
|
113
|
+
sliderCardRootContainerStyles?: Styles[];
|
|
114
|
+
iconsContainerStyles?: Styles[];
|
|
115
|
+
leftIconContainerStyles?: Styles[];
|
|
116
|
+
rightIconContainerStyles?: Styles[];
|
|
117
|
+
sliderCardContainerStyles?: Styles[];
|
|
118
118
|
}
|