@newtonedev/components 0.1.18 → 0.1.19
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/dist/composites/actions/Button/Button.d.ts.map +1 -1
- package/dist/composites/actions/Button/Button.styles.d.ts +1 -0
- package/dist/composites/actions/Button/Button.styles.d.ts.map +1 -1
- package/dist/index.cjs +850 -509
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +808 -470
- package/dist/index.js.map +1 -1
- package/dist/layout/Page/Page.d.ts +30 -0
- package/dist/layout/Page/Page.d.ts.map +1 -0
- package/dist/layout/Page/Page.types.d.ts +60 -0
- package/dist/layout/Page/Page.types.d.ts.map +1 -0
- package/dist/layout/Page/index.d.ts +3 -0
- package/dist/layout/Page/index.d.ts.map +1 -0
- package/dist/layout/Section/Section.d.ts +23 -0
- package/dist/layout/Section/Section.d.ts.map +1 -0
- package/dist/layout/Section/Section.styles.d.ts +20 -0
- package/dist/layout/Section/Section.styles.d.ts.map +1 -0
- package/dist/layout/Section/Section.types.d.ts +74 -0
- package/dist/layout/Section/Section.types.d.ts.map +1 -0
- package/dist/layout/Section/index.d.ts +3 -0
- package/dist/layout/Section/index.d.ts.map +1 -0
- package/dist/layout/Viewport/Viewport.d.ts +22 -0
- package/dist/layout/Viewport/Viewport.d.ts.map +1 -0
- package/dist/layout/Viewport/Viewport.types.d.ts +34 -0
- package/dist/layout/Viewport/Viewport.types.d.ts.map +1 -0
- package/dist/layout/Viewport/index.d.ts +3 -0
- package/dist/layout/Viewport/index.d.ts.map +1 -0
- package/dist/{primitives → layout}/Wrapper/Wrapper.d.ts +1 -16
- package/dist/layout/Wrapper/Wrapper.d.ts.map +1 -0
- package/dist/{primitives → layout}/Wrapper/Wrapper.styles.d.ts +1 -2
- package/dist/layout/Wrapper/Wrapper.styles.d.ts.map +1 -0
- package/dist/{primitives → layout}/Wrapper/Wrapper.types.d.ts +1 -3
- package/dist/layout/Wrapper/Wrapper.types.d.ts.map +1 -0
- package/dist/layout/Wrapper/index.d.ts.map +1 -0
- package/dist/layout/index.d.ts +9 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/primitives/Card/Card.d.ts +15 -0
- package/dist/primitives/Card/Card.d.ts.map +1 -0
- package/dist/primitives/Card/Card.styles.d.ts +40 -0
- package/dist/primitives/Card/Card.styles.d.ts.map +1 -0
- package/dist/primitives/Card/Card.types.d.ts +101 -0
- package/dist/primitives/Card/Card.types.d.ts.map +1 -0
- package/dist/primitives/Card/index.d.ts +3 -0
- package/dist/primitives/Card/index.d.ts.map +1 -0
- package/dist/primitives/Frame/Frame.d.ts +1 -1
- package/dist/primitives/Frame/Frame.d.ts.map +1 -1
- package/dist/primitives/Frame/Frame.styles.d.ts +0 -6
- package/dist/primitives/Frame/Frame.styles.d.ts.map +1 -1
- package/dist/primitives/Frame/Frame.types.d.ts +1 -15
- package/dist/primitives/Frame/Frame.types.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/composites/actions/Button/Button.styles.ts +58 -19
- package/src/composites/actions/Button/Button.tsx +18 -3
- package/src/composites/display/Chip/Chip.tsx +1 -1
- package/src/composites/form-controls/TextInput/TextInput.styles.ts +4 -4
- package/src/index.ts +18 -5
- package/src/layout/Page/Page.tsx +103 -0
- package/src/layout/Page/Page.types.ts +69 -0
- package/src/layout/Page/index.ts +2 -0
- package/src/layout/Section/Section.styles.ts +90 -0
- package/src/layout/Section/Section.tsx +57 -0
- package/src/layout/Section/Section.types.ts +85 -0
- package/src/layout/Section/index.ts +2 -0
- package/src/layout/Viewport/Viewport.tsx +52 -0
- package/src/layout/Viewport/Viewport.types.ts +40 -0
- package/src/layout/Viewport/index.ts +2 -0
- package/src/{primitives → layout}/Wrapper/Wrapper.styles.ts +2 -20
- package/src/{primitives → layout}/Wrapper/Wrapper.tsx +1 -31
- package/src/{primitives → layout}/Wrapper/Wrapper.types.ts +1 -4
- package/src/layout/index.ts +15 -0
- package/src/primitives/Card/Card.styles.ts +182 -0
- package/src/primitives/Card/Card.tsx +197 -0
- package/src/primitives/Card/Card.types.ts +155 -0
- package/src/primitives/Card/index.ts +2 -0
- package/src/primitives/Frame/Frame.styles.ts +0 -32
- package/src/primitives/Frame/Frame.tsx +5 -52
- package/src/primitives/Frame/Frame.types.ts +1 -22
- package/src/primitives/Text/Text.tsx +1 -1
- package/src/primitives/index.ts +3 -3
- package/dist/primitives/Wrapper/Wrapper.d.ts.map +0 -1
- package/dist/primitives/Wrapper/Wrapper.styles.d.ts.map +0 -1
- package/dist/primitives/Wrapper/Wrapper.types.d.ts.map +0 -1
- package/dist/primitives/Wrapper/index.d.ts.map +0 -1
- /package/dist/{primitives → layout}/Wrapper/index.d.ts +0 -0
- /package/src/{primitives → layout}/Wrapper/index.ts +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PageProps } from './Page.types';
|
|
3
|
+
/**
|
|
4
|
+
* Page — Full-viewport layout root with optional navbar and sidebar slots.
|
|
5
|
+
*
|
|
6
|
+
* Page fills the full screen height and arranges layout regions:
|
|
7
|
+
* - Navbar at the top (outside scroll)
|
|
8
|
+
* - Sidebar to the left of the main content
|
|
9
|
+
* - Children fill the remaining space (typically a Viewport)
|
|
10
|
+
*
|
|
11
|
+
* When a `scheme` prop is provided, Page activates that scheme from the
|
|
12
|
+
* parent NewtoneProvider so all descendants receive the scheme's config.
|
|
13
|
+
*
|
|
14
|
+
* Page is invisible — no background, border, or shadow.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Page navbar={<Nav />}>
|
|
19
|
+
* <Viewport>
|
|
20
|
+
* <Section size="sm" fill>
|
|
21
|
+
* <Frame elevation={1} padding={32}>
|
|
22
|
+
* <Text>Centered content</Text>
|
|
23
|
+
* </Frame>
|
|
24
|
+
* </Section>
|
|
25
|
+
* </Viewport>
|
|
26
|
+
* </Page>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function Page({ children, scheme, navbar, sidebar, testID, nativeID, ref, style, }: PageProps): React.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=Page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/layout/Page/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkB9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,GAAG,EACH,KAAK,GACN,EAAE,SAAS,qBA+CX"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { View, ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Props for Page — the outermost layout container for a screen.
|
|
4
|
+
*
|
|
5
|
+
* Page fills the full viewport height and arranges optional layout slots:
|
|
6
|
+
* navbar (top), sidebar (left), and children (main content area).
|
|
7
|
+
* It can also activate a scheme from the parent NewtoneProvider.
|
|
8
|
+
*
|
|
9
|
+
* Page is invisible — no background, border, or shadow.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Page navbar={<Nav />}>
|
|
14
|
+
* <Viewport>
|
|
15
|
+
* <Section size="md">
|
|
16
|
+
* <Text>Page content</Text>
|
|
17
|
+
* </Section>
|
|
18
|
+
* </Viewport>
|
|
19
|
+
* </Page>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Page scheme="vibrant" sidebar={<Sidebar />}>
|
|
25
|
+
* <Viewport>
|
|
26
|
+
* <Section size="lg">
|
|
27
|
+
* <Text>Dashboard content</Text>
|
|
28
|
+
* </Section>
|
|
29
|
+
* </Viewport>
|
|
30
|
+
* </Page>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export interface PageProps {
|
|
34
|
+
/** Main content area (typically a Viewport). */
|
|
35
|
+
readonly children?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Scheme to activate from the parent NewtoneProvider's `schemes` map.
|
|
38
|
+
* When set, descendants receive the scheme's config via theme context.
|
|
39
|
+
*/
|
|
40
|
+
readonly scheme?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Navbar element rendered at the top, outside the scrollable area.
|
|
43
|
+
* The navbar's height is determined by its own content.
|
|
44
|
+
*/
|
|
45
|
+
readonly navbar?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Sidebar element rendered to the left of the main content area.
|
|
48
|
+
* The sidebar manages its own width and scroll behavior.
|
|
49
|
+
*/
|
|
50
|
+
readonly sidebar?: React.ReactNode;
|
|
51
|
+
/** Test identifier — maps to `data-testid` on web. */
|
|
52
|
+
readonly testID?: string;
|
|
53
|
+
/** DOM id — maps to `id` attribute on web. */
|
|
54
|
+
readonly nativeID?: string;
|
|
55
|
+
/** Ref to the underlying View element. */
|
|
56
|
+
readonly ref?: React.Ref<View>;
|
|
57
|
+
/** Custom style overrides (applied to the root container). */
|
|
58
|
+
readonly style?: ViewStyle | ViewStyle[];
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=Page.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.types.d.ts","sourceRoot":"","sources":["../../../src/layout/Page/Page.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAInC,sDAAsD;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SectionProps } from './Section.types';
|
|
3
|
+
/**
|
|
4
|
+
* Section — Full-width layout container that constrains content width.
|
|
5
|
+
*
|
|
6
|
+
* Section fills all available horizontal space and centers its content
|
|
7
|
+
* within a maximum width determined by the `size` preset. It provides
|
|
8
|
+
* horizontal padding so content doesn't touch the viewport edges when
|
|
9
|
+
* the screen is narrower than the max width.
|
|
10
|
+
*
|
|
11
|
+
* Section is invisible — no background, border, or shadow. It is purely
|
|
12
|
+
* a layout tool for structuring page-level content regions.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Section size="md" gap={24} padding={{ y: 48 }}>
|
|
17
|
+
* <Text role="heading">Documentation</Text>
|
|
18
|
+
* <Text role="body">Content constrained to 768px max width.</Text>
|
|
19
|
+
* </Section>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function Section({ children, size, fill, gap, padding, testID, nativeID, ref, style, }: SectionProps): React.JSX.Element;
|
|
23
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../src/layout/Section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,GAAG,EACH,KAAK,GACN,EAAE,YAAY,qBAqBd"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import type { ResolvedTokens } from 'newtone-api';
|
|
3
|
+
import type { GapProp, PaddingProp } from '../../primitives/Frame/Frame.types';
|
|
4
|
+
import type { SectionSize } from './Section.types';
|
|
5
|
+
export interface SectionStyleInput {
|
|
6
|
+
readonly tokens: ResolvedTokens;
|
|
7
|
+
readonly size?: SectionSize;
|
|
8
|
+
readonly fill?: boolean;
|
|
9
|
+
readonly gap?: GapProp;
|
|
10
|
+
readonly padding?: PaddingProp;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Build layout styles for a Section.
|
|
14
|
+
*
|
|
15
|
+
* Section fills all horizontal space, centers content within a max width,
|
|
16
|
+
* and applies horizontal padding from the size preset. Vertical padding
|
|
17
|
+
* can be specified via the padding prop.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getSectionStyles(input: SectionStyleInput): ViewStyle;
|
|
20
|
+
//# sourceMappingURL=Section.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.styles.d.ts","sourceRoot":"","sources":["../../../src/layout/Section/Section.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAqBnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;CAChC;AAID;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA+CpE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { View, ViewStyle } from 'react-native';
|
|
2
|
+
import type { GapProp, PaddingProp } from '../../primitives/Frame/Frame.types';
|
|
3
|
+
/**
|
|
4
|
+
* Content width preset for Section.
|
|
5
|
+
*
|
|
6
|
+
* | Size | Max Width | Horizontal Padding |
|
|
7
|
+
* |:------:|:---------:|:------------------:|
|
|
8
|
+
* | `'xs'` | 480px | 24px |
|
|
9
|
+
* | `'sm'` | 640px | 24px |
|
|
10
|
+
* | `'md'` | 768px | 24px |
|
|
11
|
+
* | `'lg'` | 1024px | 32px |
|
|
12
|
+
* | `'xl'` | 1280px | 40px |
|
|
13
|
+
* | `'full'` | none | 0px |
|
|
14
|
+
*/
|
|
15
|
+
export type SectionSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
16
|
+
/**
|
|
17
|
+
* Props for Section — a full-width layout container that constrains content width.
|
|
18
|
+
*
|
|
19
|
+
* Section fills all available horizontal space and centers its content
|
|
20
|
+
* within a maximum width. It provides horizontal padding so content
|
|
21
|
+
* doesn't touch the edges when the viewport is narrower than the max width.
|
|
22
|
+
*
|
|
23
|
+
* Section is invisible — no background, border, or shadow.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Section size="md" gap={24}>
|
|
28
|
+
* <Text role="heading">Page Title</Text>
|
|
29
|
+
* <Text role="body">Content constrained to 768px.</Text>
|
|
30
|
+
* </Section>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Section size="full">
|
|
36
|
+
* <HeroImage />
|
|
37
|
+
* </Section>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export interface SectionProps {
|
|
41
|
+
/** Child elements. */
|
|
42
|
+
readonly children?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Content width preset. Controls the maximum width and default horizontal padding.
|
|
45
|
+
*
|
|
46
|
+
* @default 'lg'
|
|
47
|
+
*/
|
|
48
|
+
readonly size?: SectionSize;
|
|
49
|
+
/**
|
|
50
|
+
* Gap between children.
|
|
51
|
+
*/
|
|
52
|
+
readonly gap?: GapProp;
|
|
53
|
+
/**
|
|
54
|
+
* When true, the Section expands to fill all available vertical space (`flex: 1`).
|
|
55
|
+
* Useful inside a Viewport when content is shorter than the screen.
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
readonly fill?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Vertical padding (top and bottom).
|
|
62
|
+
* Horizontal padding is determined by the size preset.
|
|
63
|
+
*/
|
|
64
|
+
readonly padding?: PaddingProp;
|
|
65
|
+
/** Test identifier — maps to `data-testid` on web. */
|
|
66
|
+
readonly testID?: string;
|
|
67
|
+
/** DOM id — maps to `id` attribute on web. */
|
|
68
|
+
readonly nativeID?: string;
|
|
69
|
+
/** Ref to the underlying View element. */
|
|
70
|
+
readonly ref?: React.Ref<View>;
|
|
71
|
+
/** Custom style overrides (applied last). */
|
|
72
|
+
readonly style?: ViewStyle | ViewStyle[];
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=Section.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.types.d.ts","sourceRoot":"","sources":["../../../src/layout/Section/Section.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAI/B,sDAAsD;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/Section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewportProps } from './Viewport.types';
|
|
3
|
+
/**
|
|
4
|
+
* Viewport — Full-height scrollable layout root.
|
|
5
|
+
*
|
|
6
|
+
* Viewport fills all available height (`flex: 1`) and scrolls vertically
|
|
7
|
+
* when content overflows. It stacks children in a column.
|
|
8
|
+
*
|
|
9
|
+
* Viewport is invisible — no background, border, or shadow. It is purely
|
|
10
|
+
* a layout tool for structuring the outermost page container.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Viewport>
|
|
15
|
+
* <Section size="lg" padding={{ y: 48 }}>
|
|
16
|
+
* <Text role="heading">Welcome</Text>
|
|
17
|
+
* </Section>
|
|
18
|
+
* </Viewport>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function Viewport({ children, testID, nativeID, ref, style, }: ViewportProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=Viewport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewport.d.ts","sourceRoot":"","sources":["../../../src/layout/Viewport/Viewport.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAWtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,GAAG,EACH,KAAK,GACN,EAAE,aAAa,qBAcf"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ScrollView, ViewStyle } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Props for Viewport — a full-height scrollable layout root.
|
|
4
|
+
*
|
|
5
|
+
* Viewport fills all available height and scrolls vertically when its
|
|
6
|
+
* content overflows. It stacks children in a column and provides no
|
|
7
|
+
* visual styling — no background, border, or shadow.
|
|
8
|
+
*
|
|
9
|
+
* Use Viewport as the outermost layout container for a page or screen.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Viewport>
|
|
14
|
+
* <Section size="sm" fill>
|
|
15
|
+
* <Frame elevation={1}>
|
|
16
|
+
* <Text>Centered content</Text>
|
|
17
|
+
* </Frame>
|
|
18
|
+
* </Section>
|
|
19
|
+
* </Viewport>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export interface ViewportProps {
|
|
23
|
+
/** Child elements (typically Sections). */
|
|
24
|
+
readonly children?: React.ReactNode;
|
|
25
|
+
/** Test identifier — maps to `data-testid` on web. */
|
|
26
|
+
readonly testID?: string;
|
|
27
|
+
/** DOM id — maps to `id` attribute on web. */
|
|
28
|
+
readonly nativeID?: string;
|
|
29
|
+
/** Ref to the underlying ScrollView element. */
|
|
30
|
+
readonly ref?: React.Ref<ScrollView>;
|
|
31
|
+
/** Custom style overrides applied to the scroll content container. */
|
|
32
|
+
readonly style?: ViewStyle | ViewStyle[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=Viewport.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewport.types.d.ts","sourceRoot":"","sources":["../../../src/layout/Viewport/Viewport.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAIpC,sDAAsD;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,gDAAgD;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAErC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/Viewport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -9,21 +9,6 @@ import type { WrapperProps } from './Wrapper.types';
|
|
|
9
9
|
*
|
|
10
10
|
* Use Wrapper for structural layout. Use Frame when you need visual
|
|
11
11
|
* appearance or theme/elevation context.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Wrapper direction="horizontal" gap="md" align="center">
|
|
16
|
-
* <Button onPress={() => {}}>Save</Button>
|
|
17
|
-
* <Button variant="tertiary" onPress={() => {}}>Cancel</Button>
|
|
18
|
-
* </Wrapper>
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* <Wrapper padding={{ x: 'lg', y: 'md' }} gap="sm">
|
|
24
|
-
* <Text>Spaced content with no background</Text>
|
|
25
|
-
* </Wrapper>
|
|
26
|
-
* ```
|
|
27
12
|
*/
|
|
28
|
-
export declare function Wrapper({ children, direction, wrap, reverse, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, pointerEvents,
|
|
13
|
+
export declare function Wrapper({ children, direction, wrap, reverse, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, pointerEvents, style, testID, nativeID, ref, }: WrapperProps): React.JSX.Element;
|
|
29
14
|
//# sourceMappingURL=Wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/layout/Wrapper/Wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,GAAG,EACH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,EACb,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,GACJ,EAAE,YAAY,qBAiDd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
2
|
import type { ResolvedTokens } from 'newtone-api';
|
|
3
|
-
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode } from '
|
|
3
|
+
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode } from '../../primitives/Frame/Frame.types';
|
|
4
4
|
export interface WrapperStyleInput {
|
|
5
5
|
readonly tokens: ResolvedTokens;
|
|
6
6
|
readonly direction?: Direction;
|
|
@@ -23,7 +23,6 @@ export interface WrapperStyleInput {
|
|
|
23
23
|
readonly left?: OffsetValue;
|
|
24
24
|
readonly zIndex?: number;
|
|
25
25
|
readonly overflow?: OverflowMode;
|
|
26
|
-
readonly opacity?: number;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* Build the layout styles for a Wrapper.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wrapper.styles.d.ts","sourceRoot":"","sources":["../../../src/layout/Wrapper/Wrapper.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACb,MAAM,oCAAoC,CAAC;AAU5C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAG5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAsEpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { View, ViewStyle } from 'react-native';
|
|
2
|
-
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode, PointerEventsMode } from '
|
|
2
|
+
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode, PointerEventsMode } from '../../primitives/Frame/Frame.types';
|
|
3
3
|
/**
|
|
4
4
|
* Props for Wrapper — a lightweight, invisible layout container.
|
|
5
5
|
*
|
|
@@ -129,8 +129,6 @@ export interface WrapperProps {
|
|
|
129
129
|
* - `'box-only'` — element receives events but children cannot
|
|
130
130
|
*/
|
|
131
131
|
readonly pointerEvents?: PointerEventsMode;
|
|
132
|
-
/** Opacity of the element (0 = fully transparent, 1 = fully opaque). */
|
|
133
|
-
readonly opacity?: number;
|
|
134
132
|
/** Test identifier — maps to `data-testid` on web. Used by testing libraries. */
|
|
135
133
|
readonly testID?: string;
|
|
136
134
|
/** DOM id — maps to `id` attribute on web. Used for anchors and scroll targets. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wrapper.types.d.ts","sourceRoot":"","sources":["../../../src/layout/Wrapper/Wrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,EACX,OAAO,EACP,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAIpC,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAE/B,uCAAuC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAI3B,wCAAwC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAE3B,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;IAIjC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAE/B;;;;;;;;;OASG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAIvB;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAE5B;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAE7B,+BAA+B;IAC/B,QAAQ,CAAC,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W,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Page } from './Page';
|
|
2
|
+
export type { PageProps } from './Page';
|
|
3
|
+
export { Viewport } from './Viewport';
|
|
4
|
+
export type { ViewportProps } from './Viewport';
|
|
5
|
+
export { Wrapper } from './Wrapper';
|
|
6
|
+
export type { WrapperProps } from './Wrapper';
|
|
7
|
+
export { Section } from './Section';
|
|
8
|
+
export type { SectionProps, SectionSize } from './Section';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CardProps } from './Card.types';
|
|
3
|
+
/**
|
|
4
|
+
* Card — An elevated, bordered, pressable surface.
|
|
5
|
+
*
|
|
6
|
+
* Card inherits its theme from the parent Frame context. It is always
|
|
7
|
+
* rendered at the elevated level with a border and drop shadow.
|
|
8
|
+
* It handles press and navigation interactions, making it ideal for
|
|
9
|
+
* clickable content tiles, list items, and action surfaces.
|
|
10
|
+
*
|
|
11
|
+
* Cards can be nested inside Frames. They inherit the theme but provide
|
|
12
|
+
* their own elevated FrameContext to descendants.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Card({ children, appearance, radius, direction, wrap, reverse, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, pointerEvents, onPress, href, disabled, accessibilityLabel, accessibilityHint, testID, nativeID, ref, style, }: CardProps): React.JSX.Element;
|
|
15
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/primitives/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA2B9C;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EAER,UAAU,EACV,MAAM,EAEN,SAAS,EACT,IAAI,EACJ,OAAO,EAEP,KAAK,EACL,OAAO,EAEP,OAAO,EACP,GAAG,EAEH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EAET,aAAa,EAEb,OAAO,EACP,IAAI,EACJ,QAAgB,EAEhB,kBAAkB,EAClB,iBAAiB,EAEjB,MAAM,EACN,QAAQ,EACR,GAAG,EAEH,KAAK,GACN,EAAE,SAAS,qBAsHX"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import type { ResolvedTokens } from 'newtone-api';
|
|
3
|
+
import type { ThemeName, AppearanceName } from 'newtone-api';
|
|
4
|
+
import type { PaddingProp, GapProp, SizingMode, Direction, Alignment, Justification, RadiusProp } from '../Frame/Frame.types';
|
|
5
|
+
export interface CardStyleInput {
|
|
6
|
+
readonly tokens: ResolvedTokens;
|
|
7
|
+
readonly theme: ThemeName;
|
|
8
|
+
readonly appearance?: AppearanceName;
|
|
9
|
+
readonly direction?: Direction;
|
|
10
|
+
readonly wrap?: boolean;
|
|
11
|
+
readonly reverse?: boolean;
|
|
12
|
+
readonly align?: Alignment;
|
|
13
|
+
readonly justify?: Justification;
|
|
14
|
+
readonly padding?: PaddingProp;
|
|
15
|
+
readonly gap?: GapProp;
|
|
16
|
+
readonly width?: SizingMode;
|
|
17
|
+
readonly height?: SizingMode;
|
|
18
|
+
readonly minWidth?: number;
|
|
19
|
+
readonly maxWidth?: number;
|
|
20
|
+
readonly minHeight?: number;
|
|
21
|
+
readonly maxHeight?: number;
|
|
22
|
+
readonly radius?: RadiusProp;
|
|
23
|
+
readonly disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface CardStyles {
|
|
26
|
+
/** Main container style */
|
|
27
|
+
readonly container: ViewStyle;
|
|
28
|
+
/** Style applied when pressed (background shift) */
|
|
29
|
+
readonly pressed: ViewStyle;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Build all visual styles for a Card.
|
|
33
|
+
*
|
|
34
|
+
* Cards are always elevated with a border and drop shadow.
|
|
35
|
+
* Takes the Card's props + design tokens and produces:
|
|
36
|
+
* - container: the main style (background, border, shadow, layout, spacing, etc.)
|
|
37
|
+
* - pressed: style override applied when the user is pressing
|
|
38
|
+
*/
|
|
39
|
+
export declare function getCardStyles(input: CardStyleInput): CardStyles;
|
|
40
|
+
//# sourceMappingURL=Card.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.styles.d.ts","sourceRoot":"","sources":["../../../src/primitives/Card/Card.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACX,M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Style, GestureResponderEvent } from 'react-native';
|
|
2
|
+
import type { AppearanceName } from 'newtone-api';
|
|
3
|
+
import type { PaddingProp, GapProp, SizingMode, Direction, Alignment, Justification, RadiusProp, PointerEventsMode } from '../Frame/Frame.types';
|
|
4
|
+
/**
|
|
5
|
+
* Props for Card — an elevated, bordered, pressable surface.
|
|
6
|
+
*
|
|
7
|
+
* Card inherits its theme from the parent Frame context and is always
|
|
8
|
+
* rendered at elevated level with a border. It handles press and
|
|
9
|
+
* navigation interactions, making it ideal for clickable content tiles.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Card padding="lg" onPress={() => navigate('/details')}>
|
|
14
|
+
* <Text>Tap to open</Text>
|
|
15
|
+
* </Card>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Card padding="md" gap="sm" href="/settings" appearance="tinted">
|
|
21
|
+
* <Icon name="settings" />
|
|
22
|
+
* <Text>Settings</Text>
|
|
23
|
+
* </Card>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface CardProps {
|
|
27
|
+
/** Child elements. Raw strings/numbers are auto-wrapped in themed `<Text>`. */
|
|
28
|
+
readonly children: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Appearance variant within the inherited theme.
|
|
31
|
+
*
|
|
32
|
+
* Controls the visual emphasis of the Card's chrome (background, border):
|
|
33
|
+
* - `'main'` — default surface (passive contrast)
|
|
34
|
+
* - `'emphasis'` — prominent, filled surface (active contrast)
|
|
35
|
+
* - `'tinted'` — subtle tinted surface
|
|
36
|
+
* - `'strong'` — bold, high-contrast variant
|
|
37
|
+
*
|
|
38
|
+
* @default 'main'
|
|
39
|
+
*/
|
|
40
|
+
readonly appearance?: AppearanceName;
|
|
41
|
+
/**
|
|
42
|
+
* Border radius.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <Card radius="md" /> // uniform token
|
|
47
|
+
* <Card radius={8} /> // uniform px
|
|
48
|
+
* <Card radius={{ topLeft: 'lg', topRight: 'lg' }} /> // per-corner
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
readonly radius?: RadiusProp;
|
|
52
|
+
/** Flex direction. @default 'vertical' */
|
|
53
|
+
readonly direction?: Direction;
|
|
54
|
+
/** Enable flex wrap. @default false */
|
|
55
|
+
readonly wrap?: boolean;
|
|
56
|
+
/** Reverse flex direction. @default false */
|
|
57
|
+
readonly reverse?: boolean;
|
|
58
|
+
/** Cross-axis alignment of children. */
|
|
59
|
+
readonly align?: Alignment;
|
|
60
|
+
/** Main-axis justification of children. */
|
|
61
|
+
readonly justify?: Justification;
|
|
62
|
+
/** Padding inside the card. */
|
|
63
|
+
readonly padding?: PaddingProp;
|
|
64
|
+
/** Gap between children. */
|
|
65
|
+
readonly gap?: GapProp;
|
|
66
|
+
/** Width sizing: `'hug'`, `'fill'`, or fixed px. */
|
|
67
|
+
readonly width?: SizingMode;
|
|
68
|
+
/** Height sizing: `'hug'`, `'fill'`, or fixed px. */
|
|
69
|
+
readonly height?: SizingMode;
|
|
70
|
+
/** Minimum width in pixels. */
|
|
71
|
+
readonly minWidth?: number;
|
|
72
|
+
/** Maximum width in pixels. */
|
|
73
|
+
readonly maxWidth?: number;
|
|
74
|
+
/** Minimum height in pixels. */
|
|
75
|
+
readonly minHeight?: number;
|
|
76
|
+
/** Maximum height in pixels. */
|
|
77
|
+
readonly maxHeight?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Controls whether the element can be the target of touch/pointer events.
|
|
80
|
+
*/
|
|
81
|
+
readonly pointerEvents?: PointerEventsMode;
|
|
82
|
+
/** Press handler. */
|
|
83
|
+
readonly onPress?: (event: GestureResponderEvent) => void;
|
|
84
|
+
/** Navigation URL — renders as a link. */
|
|
85
|
+
readonly href?: string;
|
|
86
|
+
/** Disable interaction. @default false */
|
|
87
|
+
readonly disabled?: boolean;
|
|
88
|
+
/** Accessible label read by screen readers. */
|
|
89
|
+
readonly accessibilityLabel?: string;
|
|
90
|
+
/** Additional hint read after the label. */
|
|
91
|
+
readonly accessibilityHint?: string;
|
|
92
|
+
/** Test identifier — maps to `data-testid` on web. */
|
|
93
|
+
readonly testID?: string;
|
|
94
|
+
/** DOM id — maps to `id` attribute on web. */
|
|
95
|
+
readonly nativeID?: string;
|
|
96
|
+
/** Ref to the underlying Pressable element. */
|
|
97
|
+
readonly ref?: React.Ref<View>;
|
|
98
|
+
/** Custom style overrides (applied last). */
|
|
99
|
+
readonly style?: ViewStyle | ViewStyle[];
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=Card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACV,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,SAAS;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAInC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;IAErC;;;;;;;;;OASG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAI7B,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAE/B,uCAAuC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,C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8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,+CAA+C;IAC/C,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAI/B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -9,5 +9,5 @@ import type { FrameProps } from './Frame.types';
|
|
|
9
9
|
*
|
|
10
10
|
* Frames can be nested. Inner frames override outer frames for their subtree.
|
|
11
11
|
*/
|
|
12
|
-
export declare function Frame({ children, elevation, scheme, theme, appearance, layout, direction, wrap, reverse, columns, rows, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, pointerEvents,
|
|
12
|
+
export declare function Frame({ children, elevation, scheme, theme, appearance, layout, direction, wrap, reverse, columns, rows, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, position, top, right, bottom, left, zIndex, overflow, pointerEvents, radius, accessibilityLabel, accessibilityHint, testID, nativeID, ref, style, }: FrameProps): React.JSX.Element;
|
|
13
13
|
//# sourceMappingURL=Frame.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAuChD;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EAER,SAAS,EAET,MAAM,EAEN,KAAK,EACL,UAAU,EAEV,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,OAAO,EACP,IAAI,EAEJ,KAAK,EACL,OAAO,EAEP,OAAO,EACP,GAAG,EAEH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EAET,QAAQ,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,
|
|
1
|
+
{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAuChD;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EAER,SAAS,EAET,MAAM,EAEN,KAAK,EACL,UAAU,EAEV,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,OAAO,EACP,IAAI,EAEJ,KAAK,EACL,OAAO,EAEP,OAAO,EACP,GAAG,EAEH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EAET,QAAQ,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,EAEb,MAAM,EAEN,kBAAkB,EAClB,iBAAiB,EAEjB,MAAM,EACN,QAAQ,EACR,GAAG,EAEH,KAAK,GACN,EAAE,UAAU,qBA+JZ"}
|