@startupjs-ui/scroll-view 0.1.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [0.1.3](https://github.com/startupjs/startupjs-ui/compare/v0.1.2...v0.1.3) (2025-12-29)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/scroll-view
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.2](https://github.com/startupjs/startupjs-ui/compare/v0.1.1...v0.1.2) (2025-12-29)
15
+
16
+
17
+ ### Features
18
+
19
+ * add mdx and docs packages. Refactor docs to get rid of any @startupjs/ui usage and use startupjs-ui instead ([703c926](https://github.com/startupjs/startupjs-ui/commit/703c92636efb0421ffd11783f692fc892b74018f))
20
+ * **scroll-view:** refactor ScrollView component ([81c9b36](https://github.com/startupjs/startupjs-ui/commit/81c9b360c975059ea30d85ad3714e8995b41942b))
package/README.mdx ADDED
@@ -0,0 +1,46 @@
1
+ import ScrollView, { _PropsJsonSchema as ScrollViewPropsJsonSchema } from './index'
2
+ import { Sandbox } from '@startupjs-ui/docs'
3
+ import Div from '@startupjs-ui/div'
4
+ import Span from '@startupjs-ui/span'
5
+
6
+ # ScrollView
7
+
8
+ Reexported from [React Native](https://reactnative.dev/docs/scrollview) and [React Native Web](https://necolas.github.io/react-native-web/docs/scroll-view/).
9
+
10
+ ```jsx
11
+ import { ScrollView } from 'startupjs-ui'
12
+ ```
13
+
14
+ ## Simple example
15
+
16
+ ```jsx example
17
+ return (
18
+ <ScrollView style={{ maxHeight: 200 }}>
19
+ <Span>Content</Span>
20
+ <Span>Content</Span>
21
+ <Span>Content</Span>
22
+ <Span>Content</Span>
23
+ <Span>Content</Span>
24
+ </ScrollView>
25
+ )
26
+ ```
27
+
28
+ ## Full height content
29
+
30
+ Use `full` to make the content container stretch to the available height.
31
+
32
+ ```jsx example
33
+ return (
34
+ <Div style={{ height: 200 }} level={1}>
35
+ <ScrollView full>
36
+ <Span>Top</Span>
37
+ <Span>Middle</Span>
38
+ <Span>Bottom</Span>
39
+ </ScrollView>
40
+ </Div>
41
+ )
42
+ ```
43
+
44
+ ## Sandbox
45
+
46
+ <Sandbox Component={ScrollView} propsJsonSchema={ScrollViewPropsJsonSchema} />
@@ -0,0 +1,4 @@
1
+ .root
2
+ &.full
3
+ &:part(contentContainer)
4
+ min-height 100%
package/index.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /* eslint-disable */
2
+ // DO NOT MODIFY THIS FILE - IT IS AUTOMATICALLY GENERATED ON COMMITS.
3
+
4
+ import { type ReactNode, type Ref } from 'react';
5
+ import { type StyleProp } from 'react-native';
6
+ import './index.cssx.styl';
7
+ declare const _default: import("react").ComponentType<ScrollViewProps>;
8
+ export default _default;
9
+ export declare const _PropsJsonSchema: {};
10
+ export interface ScrollViewProps {
11
+ /** Ref to access the underlying ScrollView instance */
12
+ ref?: Ref<any>;
13
+ /** Custom styles applied to the root ScrollView */
14
+ style?: StyleProp<any>;
15
+ /** Content rendered inside ScrollView */
16
+ children?: ReactNode;
17
+ /** Expand content container to take full available height */
18
+ full?: boolean;
19
+ }
package/index.tsx ADDED
@@ -0,0 +1,30 @@
1
+ import { type ReactNode, type Ref } from 'react'
2
+ import { ScrollView as RNScrollView, type StyleProp } from 'react-native'
3
+ import { pug, observer } from 'startupjs'
4
+ import { themed } from '@startupjs-ui/core'
5
+ import './index.cssx.styl'
6
+
7
+ export default observer(themed('ScrollView', ScrollView))
8
+
9
+ export const _PropsJsonSchema = {/* ScrollViewProps */}
10
+
11
+ export interface ScrollViewProps {
12
+ /** Ref to access the underlying ScrollView instance */
13
+ ref?: Ref<any>
14
+ /** Custom styles applied to the root ScrollView */
15
+ style?: StyleProp<any>
16
+ /** Content rendered inside ScrollView */
17
+ children?: ReactNode
18
+ /** Expand content container to take full available height */
19
+ full?: boolean
20
+ }
21
+
22
+ function ScrollView ({
23
+ ref,
24
+ full = false,
25
+ ...props
26
+ }: ScrollViewProps): ReactNode {
27
+ return pug`
28
+ RNScrollView.root(ref=ref part='root' styleName={ full } ...props)
29
+ `
30
+ }
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@startupjs-ui/scroll-view",
3
+ "version": "0.1.3",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "main": "index.tsx",
8
+ "types": "index.d.ts",
9
+ "type": "module",
10
+ "dependencies": {
11
+ "@startupjs-ui/core": "^0.1.3"
12
+ },
13
+ "peerDependencies": {
14
+ "react": "*",
15
+ "react-native": "*",
16
+ "startupjs": "*"
17
+ },
18
+ "gitHead": "fd964ebc3892d3dd0a6c85438c0af619cc50c3f0"
19
+ }