@newtonedev/components 0.1.12 → 0.1.14
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/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts +4 -3
- package/dist/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts.map +1 -1
- package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts +1 -1
- package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts.map +1 -1
- package/dist/composites/actions/Button/Button.d.ts +11 -1
- package/dist/composites/actions/Button/Button.d.ts.map +1 -1
- package/dist/composites/actions/Button/Button.styles.d.ts +1 -1
- package/dist/composites/actions/Button/Button.styles.d.ts.map +1 -1
- package/dist/composites/actions/Button/Button.types.d.ts +11 -1
- package/dist/composites/actions/Button/Button.types.d.ts.map +1 -1
- package/dist/composites/branding/LogoMonogram/LogoMonogram.d.ts +10 -0
- package/dist/composites/branding/LogoMonogram/LogoMonogram.d.ts.map +1 -0
- package/dist/composites/branding/LogoMonogram/LogoMonogram.types.d.ts +35 -0
- package/dist/composites/branding/LogoMonogram/LogoMonogram.types.d.ts.map +1 -0
- package/dist/composites/branding/LogoMonogram/index.d.ts +3 -0
- package/dist/composites/branding/LogoMonogram/index.d.ts.map +1 -0
- package/dist/composites/branding/LogoWordmark/LogoWordmark.d.ts +9 -0
- package/dist/composites/branding/LogoWordmark/LogoWordmark.d.ts.map +1 -0
- package/dist/composites/branding/LogoWordmark/LogoWordmark.types.d.ts +26 -0
- package/dist/composites/branding/LogoWordmark/LogoWordmark.types.d.ts.map +1 -0
- package/dist/composites/branding/LogoWordmark/index.d.ts +3 -0
- package/dist/composites/branding/LogoWordmark/index.d.ts.map +1 -0
- package/dist/composites/display/Chip/Chip.d.ts +25 -0
- package/dist/composites/display/Chip/Chip.d.ts.map +1 -0
- package/dist/composites/display/Chip/Chip.styles.d.ts +29 -0
- package/dist/composites/display/Chip/Chip.styles.d.ts.map +1 -0
- package/dist/composites/display/Chip/Chip.types.d.ts +63 -0
- package/dist/composites/display/Chip/Chip.types.d.ts.map +1 -0
- package/dist/composites/display/Chip/index.d.ts +3 -0
- package/dist/composites/display/Chip/index.d.ts.map +1 -0
- package/dist/composites/form-controls/Select/Select.d.ts.map +1 -1
- package/dist/composites/form-controls/Select/Select.styles.d.ts +2 -2
- package/dist/composites/form-controls/Select/Select.styles.d.ts.map +1 -1
- package/dist/composites/form-controls/Select/SelectOption.d.ts.map +1 -1
- package/dist/composites/form-controls/TextInput/TextInput.d.ts.map +1 -1
- package/dist/composites/form-controls/TextInput/TextInput.styles.d.ts +2 -2
- package/dist/composites/form-controls/TextInput/TextInput.styles.d.ts.map +1 -1
- package/dist/composites/form-controls/Toggle/Toggle.d.ts.map +1 -1
- package/dist/composites/form-controls/Toggle/Toggle.styles.d.ts +2 -2
- package/dist/composites/form-controls/Toggle/Toggle.styles.d.ts.map +1 -1
- package/dist/composites/layout/AppShell/AppShell.d.ts.map +1 -1
- package/dist/composites/layout/AppShell/AppShell.styles.d.ts +2 -2
- package/dist/composites/layout/AppShell/AppShell.styles.d.ts.map +1 -1
- package/dist/composites/layout/Card/Card.d.ts.map +1 -1
- package/dist/composites/layout/Card/Card.styles.d.ts +2 -2
- package/dist/composites/layout/Card/Card.styles.d.ts.map +1 -1
- package/dist/composites/layout/Card/Card.types.d.ts +1 -1
- package/dist/composites/layout/Card/Card.types.d.ts.map +1 -1
- package/dist/composites/layout/ContentCard/ContentCard.d.ts +33 -0
- package/dist/composites/layout/ContentCard/ContentCard.d.ts.map +1 -0
- package/dist/composites/layout/ContentCard/ContentCard.styles.d.ts +10 -0
- package/dist/composites/layout/ContentCard/ContentCard.styles.d.ts.map +1 -0
- package/dist/composites/layout/ContentCard/ContentCard.types.d.ts +52 -0
- package/dist/composites/layout/ContentCard/ContentCard.types.d.ts.map +1 -0
- package/dist/composites/layout/ContentCard/index.d.ts +3 -0
- package/dist/composites/layout/ContentCard/index.d.ts.map +1 -0
- package/dist/composites/layout/Divider/Divider.d.ts +25 -0
- package/dist/composites/layout/Divider/Divider.d.ts.map +1 -0
- package/dist/composites/layout/Divider/Divider.styles.d.ts +8 -0
- package/dist/composites/layout/Divider/Divider.styles.d.ts.map +1 -0
- package/dist/composites/layout/Divider/Divider.types.d.ts +25 -0
- package/dist/composites/layout/Divider/Divider.types.d.ts.map +1 -0
- package/dist/composites/layout/Divider/index.d.ts +3 -0
- package/dist/composites/layout/Divider/index.d.ts.map +1 -0
- package/dist/composites/layout/Navbar/Navbar.d.ts.map +1 -1
- package/dist/composites/layout/Navbar/Navbar.styles.d.ts +4 -2
- package/dist/composites/layout/Navbar/Navbar.styles.d.ts.map +1 -1
- package/dist/composites/layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/composites/layout/Sidebar/Sidebar.styles.d.ts +4 -2
- package/dist/composites/layout/Sidebar/Sidebar.styles.d.ts.map +1 -1
- package/dist/composites/overlays/Popover/Popover.d.ts.map +1 -1
- package/dist/composites/overlays/Popover/Popover.styles.d.ts +2 -2
- package/dist/composites/overlays/Popover/Popover.styles.d.ts.map +1 -1
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.d.ts +1 -1
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.d.ts.map +1 -1
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.d.ts +1 -1
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.d.ts.map +1 -1
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.types.d.ts +2 -0
- package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.types.d.ts.map +1 -1
- package/dist/composites/range-inputs/HueSlider/HueSlider.d.ts +3 -4
- package/dist/composites/range-inputs/HueSlider/HueSlider.d.ts.map +1 -1
- package/dist/composites/range-inputs/HueSlider/HueSlider.styles.d.ts +3 -3
- package/dist/composites/range-inputs/HueSlider/HueSlider.styles.d.ts.map +1 -1
- package/dist/composites/range-inputs/Slider/Slider.styles.d.ts +1 -1
- package/dist/composites/range-inputs/Slider/Slider.styles.d.ts.map +1 -1
- package/dist/index.cjs +1609 -1693
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +22 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1454 -1621
- package/dist/index.js.map +1 -1
- package/dist/primitives/Frame/Frame.d.ts +1 -35
- package/dist/primitives/Frame/Frame.d.ts.map +1 -1
- package/dist/primitives/Frame/Frame.styles.d.ts +13 -3
- package/dist/primitives/Frame/Frame.styles.d.ts.map +1 -1
- package/dist/primitives/Frame/Frame.types.d.ts +99 -1
- package/dist/primitives/Frame/Frame.types.d.ts.map +1 -1
- package/dist/primitives/Frame/Frame.utils.d.ts +1 -1
- package/dist/primitives/Frame/Frame.utils.d.ts.map +1 -1
- package/dist/primitives/Frame/index.d.ts +1 -1
- package/dist/primitives/Frame/index.d.ts.map +1 -1
- package/dist/primitives/Icon/Icon.d.ts.map +1 -1
- package/dist/primitives/Icon/Icon.types.d.ts +2 -2
- package/dist/primitives/Icon/Icon.types.d.ts.map +1 -1
- package/dist/primitives/Text/Text.d.ts +6 -4
- package/dist/primitives/Text/Text.d.ts.map +1 -1
- package/dist/primitives/Text/Text.spans.d.ts.map +1 -1
- package/dist/primitives/Text/Text.types.d.ts +4 -7
- package/dist/primitives/Text/Text.types.d.ts.map +1 -1
- package/dist/primitives/Wrapper/Wrapper.d.ts +1 -1
- package/dist/primitives/Wrapper/Wrapper.d.ts.map +1 -1
- package/dist/primitives/Wrapper/Wrapper.styles.d.ts +10 -2
- package/dist/primitives/Wrapper/Wrapper.styles.d.ts.map +1 -1
- package/dist/primitives/Wrapper/Wrapper.types.d.ts +31 -1
- package/dist/primitives/Wrapper/Wrapper.types.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/_COMPONENT_TEMPLATE/ComponentName.styles.ts +4 -4
- package/src/_COMPONENT_TEMPLATE/ComponentName.tsx +2 -2
- package/src/_COMPONENT_TEMPLATE/ComponentName.types.ts +1 -1
- package/src/composites/actions/Button/Button.styles.ts +72 -55
- package/src/composites/actions/Button/Button.tsx +35 -14
- package/src/composites/actions/Button/Button.types.ts +13 -1
- package/src/composites/branding/LogoMonogram/LogoMonogram.tsx +29 -0
- package/src/composites/branding/LogoMonogram/LogoMonogram.types.ts +35 -0
- package/src/composites/branding/LogoMonogram/index.ts +2 -0
- package/src/composites/branding/LogoWordmark/LogoWordmark.tsx +29 -0
- package/src/composites/branding/LogoWordmark/LogoWordmark.types.ts +25 -0
- package/src/composites/branding/LogoWordmark/index.ts +2 -0
- package/src/composites/display/Chip/Chip.styles.ts +189 -0
- package/src/composites/display/Chip/Chip.tsx +97 -0
- package/src/composites/display/Chip/Chip.types.ts +74 -0
- package/src/composites/display/Chip/index.ts +2 -0
- package/src/composites/form-controls/Select/Select.styles.ts +10 -10
- package/src/composites/form-controls/Select/Select.tsx +9 -7
- package/src/composites/form-controls/Select/SelectOption.tsx +10 -8
- package/src/composites/form-controls/TextInput/TextInput.styles.ts +12 -9
- package/src/composites/form-controls/TextInput/TextInput.tsx +7 -5
- package/src/composites/form-controls/Toggle/Toggle.styles.ts +10 -7
- package/src/composites/form-controls/Toggle/Toggle.tsx +4 -3
- package/src/composites/layout/AppShell/AppShell.styles.ts +8 -4
- package/src/composites/layout/AppShell/AppShell.tsx +6 -2
- package/src/composites/layout/Card/Card.styles.ts +10 -5
- package/src/composites/layout/Card/Card.tsx +4 -3
- package/src/composites/layout/Card/Card.types.ts +1 -1
- package/src/composites/layout/ContentCard/ContentCard.styles.ts +44 -0
- package/src/composites/layout/ContentCard/ContentCard.tsx +71 -0
- package/src/composites/layout/ContentCard/ContentCard.types.ts +60 -0
- package/src/composites/layout/ContentCard/index.ts +2 -0
- package/src/composites/layout/Divider/Divider.styles.ts +30 -0
- package/src/composites/layout/Divider/Divider.tsx +46 -0
- package/src/composites/layout/Divider/Divider.types.ts +28 -0
- package/src/composites/layout/Divider/index.ts +2 -0
- package/src/composites/layout/Navbar/Navbar.styles.ts +7 -5
- package/src/composites/layout/Navbar/Navbar.tsx +4 -3
- package/src/composites/layout/Sidebar/Sidebar.styles.ts +7 -5
- package/src/composites/layout/Sidebar/Sidebar.tsx +4 -3
- package/src/composites/overlays/Popover/Popover.styles.ts +7 -5
- package/src/composites/overlays/Popover/Popover.tsx +4 -3
- package/src/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.ts +4 -5
- package/src/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.tsx +6 -2
- package/src/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.types.ts +2 -0
- package/src/composites/range-inputs/HueSlider/HueSlider.styles.ts +13 -20
- package/src/composites/range-inputs/HueSlider/HueSlider.tsx +7 -8
- package/src/composites/range-inputs/Slider/Slider.styles.ts +8 -9
- package/src/composites/range-inputs/Slider/Slider.tsx +1 -1
- package/src/index.ts +108 -61
- package/src/primitives/Frame/Frame.styles.ts +55 -11
- package/src/primitives/Frame/Frame.tsx +140 -142
- package/src/primitives/Frame/Frame.types.ts +119 -1
- package/src/primitives/Frame/Frame.utils.ts +1 -1
- package/src/primitives/Frame/index.ts +4 -0
- package/src/primitives/Icon/Icon.tsx +9 -7
- package/src/primitives/Icon/Icon.types.ts +2 -2
- package/src/primitives/Text/Text.spans.ts +9 -5
- package/src/primitives/Text/Text.tsx +33 -22
- package/src/primitives/Text/Text.types.ts +4 -7
- package/src/primitives/Wrapper/Wrapper.styles.ts +33 -1
- package/src/primitives/Wrapper/Wrapper.tsx +23 -4
- package/src/primitives/Wrapper/Wrapper.types.ts +45 -0
- package/dist/fonts/GoogleFontLoader.d.ts +0 -20
- package/dist/fonts/GoogleFontLoader.d.ts.map +0 -1
- package/dist/fonts/IconFontLoader.d.ts +0 -13
- package/dist/fonts/IconFontLoader.d.ts.map +0 -1
- package/dist/fonts/SelfHostedFontLoader.d.ts +0 -14
- package/dist/fonts/SelfHostedFontLoader.d.ts.map +0 -1
- package/dist/fonts/buildGoogleFontsUrl.d.ts +0 -2
- package/dist/fonts/buildGoogleFontsUrl.d.ts.map +0 -1
- package/dist/fonts/measureFont.d.ts +0 -19
- package/dist/fonts/measureFont.d.ts.map +0 -1
- package/dist/fonts/reportQueue.d.ts +0 -7
- package/dist/fonts/reportQueue.d.ts.map +0 -1
- package/dist/fonts/useLocalCalibration.d.ts +0 -19
- package/dist/fonts/useLocalCalibration.d.ts.map +0 -1
- package/dist/fonts/useTypographyCalibrations.d.ts +0 -11
- package/dist/fonts/useTypographyCalibrations.d.ts.map +0 -1
- package/dist/theme/FrameContext.d.ts +0 -26
- package/dist/theme/FrameContext.d.ts.map +0 -1
- package/dist/theme/NewtoneProvider.d.ts +0 -40
- package/dist/theme/NewtoneProvider.d.ts.map +0 -1
- package/dist/theme/defaults.d.ts +0 -8
- package/dist/theme/defaults.d.ts.map +0 -1
- package/dist/theme/types.d.ts +0 -156
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/useBreakpoint.d.ts +0 -9
- package/dist/theme/useBreakpoint.d.ts.map +0 -1
- package/dist/tokens/computeTokens.d.ts +0 -151
- package/dist/tokens/computeTokens.d.ts.map +0 -1
- package/dist/tokens/types.d.ts +0 -162
- package/dist/tokens/types.d.ts.map +0 -1
- package/dist/tokens/useTokens.d.ts +0 -26
- package/dist/tokens/useTokens.d.ts.map +0 -1
- package/src/fonts/GoogleFontLoader.tsx +0 -80
- package/src/fonts/IconFontLoader.tsx +0 -51
- package/src/fonts/SelfHostedFontLoader.tsx +0 -44
- package/src/fonts/buildGoogleFontsUrl.ts +0 -2
- package/src/fonts/measureFont.ts +0 -55
- package/src/fonts/reportQueue.ts +0 -54
- package/src/fonts/useLocalCalibration.ts +0 -97
- package/src/fonts/useTypographyCalibrations.ts +0 -15
- package/src/theme/FrameContext.tsx +0 -31
- package/src/theme/NewtoneProvider.tsx +0 -84
- package/src/theme/defaults.ts +0 -71
- package/src/theme/types.ts +0 -191
- package/src/theme/useBreakpoint.ts +0 -14
- package/src/tokens/computeTokens.ts +0 -516
- package/src/tokens/types.ts +0 -146
- package/src/tokens/useTokens.ts +0 -62
|
@@ -8,40 +8,6 @@ import type { FrameProps } from './Frame.types';
|
|
|
8
8
|
* and interactivity capabilities.
|
|
9
9
|
*
|
|
10
10
|
* Frames can be nested. Inner frames override outer frames for their subtree.
|
|
11
|
-
* Unspecified props inherit from the nearest parent Frame.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* // Basic layout
|
|
16
|
-
* <Frame direction="horizontal" gap="md" padding="lg" align="center">
|
|
17
|
-
* <Button onPress={() => {}}>Save</Button>
|
|
18
|
-
* <Button variant="tertiary" onPress={() => {}}>Cancel</Button>
|
|
19
|
-
* </Frame>
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```tsx
|
|
24
|
-
* // Card-like frame
|
|
25
|
-
* <Frame
|
|
26
|
-
* elevation={2}
|
|
27
|
-
* radius="lg"
|
|
28
|
-
* padding="xl"
|
|
29
|
-
* bordered
|
|
30
|
-
* onPress={() => navigate('/details')}
|
|
31
|
-
* >
|
|
32
|
-
* <Text>Clickable card</Text>
|
|
33
|
-
* </Frame>
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```tsx
|
|
38
|
-
* // Grid layout (web)
|
|
39
|
-
* <Frame layout="grid" columns={3} gap="md" padding="lg">
|
|
40
|
-
* <Frame radius="md" padding="md" bordered>Cell 1</Frame>
|
|
41
|
-
* <Frame radius="md" padding="md" bordered>Cell 2</Frame>
|
|
42
|
-
* <Frame radius="md" padding="md" bordered>Cell 3</Frame>
|
|
43
|
-
* </Frame>
|
|
44
|
-
* ```
|
|
45
11
|
*/
|
|
46
|
-
export declare function Frame({ children, elevation, layout, direction, wrap, reverse, columns, rows, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, radius, bordered, onPress, href, disabled, accessibilityLabel, accessibilityHint, testID, nativeID, ref, style, }: FrameProps): React.JSX.Element;
|
|
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, opacity, radius, bordered, onPress, href, disabled, accessibilityLabel, accessibilityHint, testID, nativeID, ref, style, }: FrameProps): React.JSX.Element;
|
|
47
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;
|
|
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,EACb,OAAO,EAEP,MAAM,EACN,QAAQ,EAER,OAAO,EACP,IAAI,EACJ,QAAgB,EAEhB,kBAAkB,EAClB,iBAAiB,EAEjB,MAAM,EACN,QAAQ,EACR,GAAG,EAEH,KAAK,GACN,EAAE,UAAU,qBAuMZ"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
|
-
import type { ResolvedTokens } from '
|
|
3
|
-
import type { FrameElevation } from '
|
|
4
|
-
import type { PaddingProp, GapProp, SizingMode, Direction, Alignment, Justification, RadiusProp, LayoutMode } from './Frame.types';
|
|
2
|
+
import type { ResolvedTokens } from 'newtone-api';
|
|
3
|
+
import type { FrameElevation, ThemeName, AppearanceName } from 'newtone-api';
|
|
4
|
+
import type { PaddingProp, GapProp, SizingMode, Direction, Alignment, Justification, RadiusProp, LayoutMode, PositionType, OffsetValue, OverflowMode } from './Frame.types';
|
|
5
5
|
export interface FrameStyleInput {
|
|
6
6
|
readonly tokens: ResolvedTokens;
|
|
7
7
|
readonly frameElevation: FrameElevation;
|
|
8
|
+
readonly theme?: ThemeName;
|
|
9
|
+
readonly appearance?: AppearanceName;
|
|
8
10
|
readonly layout?: LayoutMode;
|
|
9
11
|
readonly direction?: Direction;
|
|
10
12
|
readonly wrap?: boolean;
|
|
@@ -21,6 +23,14 @@ export interface FrameStyleInput {
|
|
|
21
23
|
readonly maxWidth?: number;
|
|
22
24
|
readonly minHeight?: number;
|
|
23
25
|
readonly maxHeight?: number;
|
|
26
|
+
readonly position?: PositionType;
|
|
27
|
+
readonly top?: OffsetValue;
|
|
28
|
+
readonly right?: OffsetValue;
|
|
29
|
+
readonly bottom?: OffsetValue;
|
|
30
|
+
readonly left?: OffsetValue;
|
|
31
|
+
readonly zIndex?: number;
|
|
32
|
+
readonly overflow?: OverflowMode;
|
|
33
|
+
readonly opacity?: number;
|
|
24
34
|
readonly radius?: RadiusProp;
|
|
25
35
|
readonly bordered?: boolean;
|
|
26
36
|
readonly disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.styles.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cA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
1
|
import type { View, ViewStyle, GestureResponderEvent } from 'react-native';
|
|
2
|
-
import type { FrameElevation } from '
|
|
2
|
+
import type { FrameElevation, ThemeName, AppearanceName } from 'newtone-api';
|
|
3
3
|
/** Design system spacing tokens (represent px values at Medium preset) */
|
|
4
4
|
export type SpacingToken = '00' | '02' | '04' | '06' | '08' | '10' | '12' | '16' | '20' | '24' | '32' | '40' | '48';
|
|
5
5
|
/** A spacing value: either a design token name or a pixel number */
|
|
@@ -60,6 +60,14 @@ export interface RadiusCorners {
|
|
|
60
60
|
* Token names (`'none'` through `'pill'`) resolve to pixel values from the theme.
|
|
61
61
|
*/
|
|
62
62
|
export type RadiusProp = RadiusValue | RadiusCorners;
|
|
63
|
+
/** CSS position mode. `'fixed'` and `'sticky'` are web-only (via react-native-web). */
|
|
64
|
+
export type PositionType = 'absolute' | 'relative' | 'fixed' | 'sticky';
|
|
65
|
+
/** Position offset value: pixels (number) or percentage string (e.g. `'50%'`). */
|
|
66
|
+
export type OffsetValue = number | string;
|
|
67
|
+
/** Overflow clipping mode. */
|
|
68
|
+
export type OverflowMode = 'visible' | 'hidden' | 'scroll';
|
|
69
|
+
/** Pointer-events mode (View prop, not a style). */
|
|
70
|
+
export type PointerEventsMode = 'auto' | 'none' | 'box-none' | 'box-only';
|
|
63
71
|
/**
|
|
64
72
|
* Figma-like sizing mode:
|
|
65
73
|
*
|
|
@@ -128,6 +136,22 @@ export interface FrameProps {
|
|
|
128
136
|
* When omitted, inherits from parent Frame or defaults to 0.
|
|
129
137
|
*/
|
|
130
138
|
readonly elevation?: FrameElevation;
|
|
139
|
+
/**
|
|
140
|
+
* Named scheme to use for this Frame's subtree.
|
|
141
|
+
* Looks up the scheme's config from the ancestor NewtoneProvider's `schemes` map
|
|
142
|
+
* and uses it instead of the default for token computation and context.
|
|
143
|
+
* Ignored when the provider is in single-config mode.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* <NewtoneProvider schemes={{ Default: config1, Dark: config2 }} defaultScheme="Default">
|
|
148
|
+
* <Frame scheme="Dark">
|
|
149
|
+
* {/* Children here get the "Dark" scheme's tokens */}
|
|
150
|
+
* </Frame>
|
|
151
|
+
* </NewtoneProvider>
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
readonly scheme?: string;
|
|
131
155
|
/** Layout mode. @default 'flex' */
|
|
132
156
|
readonly layout?: LayoutMode;
|
|
133
157
|
/** Flex direction. @default 'vertical' */
|
|
@@ -193,6 +217,80 @@ export interface FrameProps {
|
|
|
193
217
|
readonly minHeight?: number;
|
|
194
218
|
/** Maximum height in pixels. */
|
|
195
219
|
readonly maxHeight?: number;
|
|
220
|
+
/**
|
|
221
|
+
* CSS position mode.
|
|
222
|
+
*
|
|
223
|
+
* `'fixed'` and `'sticky'` are web-only (supported via react-native-web).
|
|
224
|
+
* React Native natively supports `'absolute'` and `'relative'`.
|
|
225
|
+
*/
|
|
226
|
+
readonly position?: PositionType;
|
|
227
|
+
/** Offset from the top edge. Accepts pixels (number) or percentage string. */
|
|
228
|
+
readonly top?: OffsetValue;
|
|
229
|
+
/** Offset from the right edge. Accepts pixels (number) or percentage string. */
|
|
230
|
+
readonly right?: OffsetValue;
|
|
231
|
+
/** Offset from the bottom edge. Accepts pixels (number) or percentage string. */
|
|
232
|
+
readonly bottom?: OffsetValue;
|
|
233
|
+
/** Offset from the left edge. Accepts pixels (number) or percentage string. */
|
|
234
|
+
readonly left?: OffsetValue;
|
|
235
|
+
/** Stacking order. Higher values render above lower values. */
|
|
236
|
+
readonly zIndex?: number;
|
|
237
|
+
/**
|
|
238
|
+
* Content overflow behavior.
|
|
239
|
+
*
|
|
240
|
+
* When `radius` is set with positive values, Frame auto-applies `overflow: 'hidden'`
|
|
241
|
+
* to clip content at rounded corners. Setting `overflow` explicitly overrides this.
|
|
242
|
+
*/
|
|
243
|
+
readonly overflow?: OverflowMode;
|
|
244
|
+
/**
|
|
245
|
+
* Controls whether the element can be the target of touch/pointer events.
|
|
246
|
+
*
|
|
247
|
+
* - `'auto'` — default, element and children receive events
|
|
248
|
+
* - `'none'` — element and children are invisible to events (pass through)
|
|
249
|
+
* - `'box-none'` — element ignores events but children can receive them
|
|
250
|
+
* - `'box-only'` — element receives events but children cannot
|
|
251
|
+
*/
|
|
252
|
+
readonly pointerEvents?: PointerEventsMode;
|
|
253
|
+
/**
|
|
254
|
+
* Opacity of the element (0 = fully transparent, 1 = fully opaque).
|
|
255
|
+
*
|
|
256
|
+
* When set explicitly, overrides the automatic `0.5` opacity applied by `disabled`.
|
|
257
|
+
*/
|
|
258
|
+
readonly opacity?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Color theme for this Frame's visual rendering (background, border, text).
|
|
261
|
+
*
|
|
262
|
+
* Selects which of the 6 themes to use from the resolved tokens.
|
|
263
|
+
* Does not affect scheme selection — use `scheme` for that.
|
|
264
|
+
*
|
|
265
|
+
* @default 'primary'
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```tsx
|
|
269
|
+
* <Frame theme="error" appearance="tinted">
|
|
270
|
+
* <Text>Error banner</Text>
|
|
271
|
+
* </Frame>
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
readonly theme?: ThemeName;
|
|
275
|
+
/**
|
|
276
|
+
* Appearance variant within the selected theme.
|
|
277
|
+
*
|
|
278
|
+
* Controls the visual emphasis of the Frame's chrome (background, border):
|
|
279
|
+
* - `'main'` — default surface (passive contrast)
|
|
280
|
+
* - `'emphasis'` — prominent, filled surface (active contrast)
|
|
281
|
+
* - `'tinted'` — subtle tinted surface
|
|
282
|
+
* - `'strong'` — bold, high-contrast variant
|
|
283
|
+
*
|
|
284
|
+
* @default 'main'
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```tsx
|
|
288
|
+
* <Frame theme="primary" appearance="emphasis">
|
|
289
|
+
* <Text>CTA section</Text>
|
|
290
|
+
* </Frame>
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
readonly appearance?: AppearanceName;
|
|
196
294
|
/**
|
|
197
295
|
* Border radius.
|
|
198
296
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Frame.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7E,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpH,oEAAoE;AACpE,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;AAEjD,uBAAuB;AACvB,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY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AAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;IAErC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAE7B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAI5B,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAE1D,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAI5B,wFAAwF;IACxF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAErC,yEAAyE;IACzE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAIpC,iFAAiF;IACjF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,uDAAuD;IACvD,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
|
-
import type { ResolvedTokens } from '
|
|
2
|
+
import type { ResolvedTokens } from 'newtone-api';
|
|
3
3
|
import type { SpacingValue, PaddingProp, GapProp, RadiusValue, RadiusProp, SizingMode, Direction, Alignment, Justification } from './Frame.types';
|
|
4
4
|
/** Convert a spacing token name (like 'md') or raw number into pixels. */
|
|
5
5
|
export declare function resolveSpacing(value: SpacingValue, tokens: ResolvedTokens): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.utils.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Frame.utils.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/Frame.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACd,MAAM,eAAe,CAAC;AAMvB,0EAA0E;AAC1E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,cAAc,GACrB,MAAM,CAKR;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,cAAc,GACrB;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAyBlG;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,cAAc,GACrB;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAazD;AAMD,yEAAyE;AACzE,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,cAAc,GACrB,MAAM,CAGR;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,oEAAoE;AACpE,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,cAAc,GACrB,eAAe,CAejB;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAKnE;AAKD,6DAA6D;AAC7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,MAAM,EAAE,UAAU,GAAG,SAAS,GAC7B,SAAS,CA8BX;AAoCD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC,CAE1E;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAExF;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GACf,SAAS,CAAC,eAAe,CAAC,CAM5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Frame } from './Frame';
|
|
2
|
-
export type { FrameProps, SpacingToken, SpacingValue, SpacingSides, SpacingAxes, PaddingProp, GapAxes, GapProp, RadiusToken, RadiusValue, RadiusCorners, RadiusProp, SizingMode, LayoutMode, Direction, Alignment, Justification, } from './Frame.types';
|
|
2
|
+
export type { FrameProps, SpacingToken, SpacingValue, SpacingSides, SpacingAxes, PaddingProp, GapAxes, GapProp, RadiusToken, RadiusValue, RadiusCorners, RadiusProp, SizingMode, LayoutMode, Direction, Alignment, Justification, PositionType, OffsetValue, OverflowMode, PointerEventsMode, } from './Frame.types';
|
|
3
3
|
export type { ResolvedCorners } from './Frame.utils';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,OAAO,EACP,OAAO,EACP,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/Frame/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,OAAO,EACP,OAAO,EACP,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/primitives/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAY,EACZ,IAAS,EACT,WAAW,EACX,IAAQ,EACR,KAAK,EACL,KAAK,EAEL,kBAAkB,EAElB,MAAM,EACN,QAAQ,EACR,GAAG,GACJ,EAAE,SAAS,qBAwEX"}
|
|
@@ -22,8 +22,8 @@ export interface IconProps {
|
|
|
22
22
|
* @example `'home'`, `'settings'`, `'check'`, `'expand_more'`, `'delete'`, `'add'`, `'search'`
|
|
23
23
|
* @see {@link https://fonts.google.com/icons Browse all icons}
|
|
24
24
|
*/
|
|
25
|
-
readonly name
|
|
26
|
-
/** Font size in pixels. @default
|
|
25
|
+
readonly name?: string;
|
|
26
|
+
/** Font size in pixels. @default 24 */
|
|
27
27
|
readonly size?: number;
|
|
28
28
|
/** Optical size for variable font axis. Adjusts stroke weight for readability at small sizes. @default same as size */
|
|
29
29
|
readonly opticalSize?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Icon/Icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Icon/Icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,uHAAuH;IACvH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhC,4DAA4D;IAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAI3B,wHAAwH;IACxH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAIrC,iFAAiF;IACjF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { UseTokensResult } from '
|
|
3
|
-
import type {
|
|
2
|
+
import type { UseTokensResult } from 'newtone-api';
|
|
3
|
+
import type { ThemeName, AppearanceName } from 'newtone-api';
|
|
4
|
+
import type { TextProps, TextColor, TextRole } from './Text.types';
|
|
4
5
|
/**
|
|
5
6
|
* Context to pass the active scope's weight map to span sub-components.
|
|
6
7
|
* Spans inherit font family from the parent RN Text, but need the scope's
|
|
@@ -16,9 +17,10 @@ export declare const TextScopeContext: React.Context<{
|
|
|
16
17
|
} | null>;
|
|
17
18
|
/**
|
|
18
19
|
* Resolve a semantic text color to a hex string from the current tokens.
|
|
19
|
-
* Neutral
|
|
20
|
+
* Neutral colors use the inherited theme/appearance from the nearest Frame.
|
|
21
|
+
* Accent uses accentLarge (large text) or accentSmall (small text) from the inherited theme/appearance.
|
|
20
22
|
*/
|
|
21
|
-
export declare function resolveTextColor(color: TextColor, tokens: UseTokensResult): string;
|
|
23
|
+
export declare function resolveTextColor(color: TextColor, tokens: UseTokensResult, theme?: ThemeName, appearance?: AppearanceName, role?: TextRole): string;
|
|
22
24
|
/**
|
|
23
25
|
* Token-aware text primitive with semantic scope + role API.
|
|
24
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAO3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAO3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAMnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;sBACT;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE;SACjF,CAAC;AAKhB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,eAAe,EACvB,KAAK,GAAE,SAAqB,EAC5B,UAAU,GAAE,cAAuB,EACnC,IAAI,GAAE,QAAiB,GACtB,MAAM,CAQR;AA0BD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,KAAc,EACd,IAAa,EACb,KAAiB,EACjB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,aAAa,EACb,SAAS,EACT,KAAK,EACL,iBAAiB,EAAE,yBAAyB,EAC5C,MAAM,EACN,QAAQ,EACR,GAAG,EACH,UAAkB,EAClB,gBAAwB,EACxB,QAAQ,GACT,EAAE,SAAS,qBA0JX;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.spans.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.spans.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.spans.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.spans.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAK9C,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,cAAc,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,aAAa,4DAsBvG;AAED,8CAA8C;AAC9C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,iDAE5D;AAED,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,iDAE9D;AAED,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,iDAE9D;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,iDAEpE;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CAAE,iDAEzH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Text as RNText, TextStyle } from 'react-native';
|
|
2
|
-
import type { ElevationLevel } from '
|
|
2
|
+
import type { ElevationLevel } from 'newtone-api';
|
|
3
3
|
/** Typography size step — selects within the current role's 3-step scale. @default 'md' */
|
|
4
4
|
export type TextSize = 'sm' | 'md' | 'lg';
|
|
5
5
|
/** Font weight slots — maps to per-scope `tokens.typography.fonts[scope].weights.*` values. */
|
|
6
6
|
export type TextWeight = 'regular' | 'medium' | 'bold';
|
|
7
7
|
/** Semantic text color tokens — resolved from the current theme's token palette. */
|
|
8
|
-
export type TextColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'accent'
|
|
8
|
+
export type TextColor = 'primary' | 'secondary' | 'tertiary' | 'disabled' | 'accent';
|
|
9
9
|
/** Font scope — selects which font family slot to use. @default 'main' */
|
|
10
10
|
export type TextScope = 'main' | 'display' | 'mono' | 'currency';
|
|
11
11
|
/**
|
|
@@ -56,10 +56,7 @@ export interface TextProps {
|
|
|
56
56
|
* - `'secondary'` — Subdued/muted text (captions, labels)
|
|
57
57
|
* - `'tertiary'` — Hints, placeholders
|
|
58
58
|
* - `'disabled'` — Disabled text elements
|
|
59
|
-
* - `'accent'` — Accent
|
|
60
|
-
* - `'success'` — Success palette color for positive indicators
|
|
61
|
-
* - `'warning'` — Warning palette color for caution indicators
|
|
62
|
-
* - `'error'` — Error palette color for destructive/error indicators
|
|
59
|
+
* - `'accent'` — Accent color from the inherited theme/appearance (accentLarge for large text, accentSmall for small text)
|
|
63
60
|
*
|
|
64
61
|
* @default 'primary'
|
|
65
62
|
*/
|
|
@@ -72,7 +69,7 @@ export interface TextProps {
|
|
|
72
69
|
readonly align?: TextAlign;
|
|
73
70
|
/** Maximum number of lines before truncation with ellipsis. When omitted, text wraps freely. */
|
|
74
71
|
readonly numberOfLines?: number;
|
|
75
|
-
/** Elevation level for token computation.
|
|
72
|
+
/** Elevation level for token computation. When omitted, inherits from nearest parent Frame. */
|
|
76
73
|
readonly elevation?: ElevationLevel;
|
|
77
74
|
/** Style overrides (applied last). Supports a single style or an array of styles. */
|
|
78
75
|
readonly style?: TextStyle | readonly TextStyle[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,2FAA2F;AAC3F,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,+FAA+F;AAC/F,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvD,oFAAoF;AACpF,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAErF,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtG,sBAAsB;AACtB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG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O,CAAC;IAEpC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,0BAA0B;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,kCAAkC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,SAAS,EAAE,CAAC;CACnD"}
|
|
@@ -25,5 +25,5 @@ import type { WrapperProps } from './Wrapper.types';
|
|
|
25
25
|
* </Wrapper>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export declare function Wrapper({ children, direction, wrap, reverse, align, justify, padding, gap, width, height, minWidth, maxWidth, minHeight, maxHeight, style, testID, nativeID, ref, }: WrapperProps): React.JSX.Element;
|
|
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, opacity, style, testID, nativeID, ref, }: WrapperProps): React.JSX.Element;
|
|
29
29
|
//# sourceMappingURL=Wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/primitives/Wrapper/Wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,
|
|
1
|
+
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/primitives/Wrapper/Wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,EAET,QAAQ,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,EACb,OAAO,EACP,KAAK,EAEL,MAAM,EACN,QAAQ,EACR,GAAG,GACJ,EAAE,YAAY,qBA6Dd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
|
-
import type { ResolvedTokens } from '
|
|
3
|
-
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode } from '../Frame/Frame.types';
|
|
2
|
+
import type { ResolvedTokens } from 'newtone-api';
|
|
3
|
+
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode } from '../Frame/Frame.types';
|
|
4
4
|
export interface WrapperStyleInput {
|
|
5
5
|
readonly tokens: ResolvedTokens;
|
|
6
6
|
readonly direction?: Direction;
|
|
@@ -16,6 +16,14 @@ export interface WrapperStyleInput {
|
|
|
16
16
|
readonly maxWidth?: number;
|
|
17
17
|
readonly minHeight?: number;
|
|
18
18
|
readonly maxHeight?: number;
|
|
19
|
+
readonly position?: PositionType;
|
|
20
|
+
readonly top?: OffsetValue;
|
|
21
|
+
readonly right?: OffsetValue;
|
|
22
|
+
readonly bottom?: OffsetValue;
|
|
23
|
+
readonly left?: OffsetValue;
|
|
24
|
+
readonly zIndex?: number;
|
|
25
|
+
readonly overflow?: OverflowMode;
|
|
26
|
+
readonly opacity?: number;
|
|
19
27
|
}
|
|
20
28
|
/**
|
|
21
29
|
* Build the layout styles for a Wrapper.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wrapper.styles.d.ts","sourceRoot":"","sources":["../../../src/primitives/Wrapper/Wrapper.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Wrapper.styles.d.ts","sourceRoot":"","sources":["../../../src/primitives/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,sBAAsB,CAAC;AAU9B,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;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAuFpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { View, ViewStyle } from 'react-native';
|
|
2
|
-
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode } from '../Frame/Frame.types';
|
|
2
|
+
import type { Direction, Alignment, Justification, PaddingProp, GapProp, SizingMode, PositionType, OffsetValue, OverflowMode, PointerEventsMode } from '../Frame/Frame.types';
|
|
3
3
|
/**
|
|
4
4
|
* Props for Wrapper — a lightweight, invisible layout container.
|
|
5
5
|
*
|
|
@@ -101,6 +101,36 @@ export interface WrapperProps {
|
|
|
101
101
|
readonly minHeight?: number;
|
|
102
102
|
/** Maximum height in pixels. */
|
|
103
103
|
readonly maxHeight?: number;
|
|
104
|
+
/**
|
|
105
|
+
* CSS position mode.
|
|
106
|
+
*
|
|
107
|
+
* `'fixed'` and `'sticky'` are web-only (supported via react-native-web).
|
|
108
|
+
* React Native natively supports `'absolute'` and `'relative'`.
|
|
109
|
+
*/
|
|
110
|
+
readonly position?: PositionType;
|
|
111
|
+
/** Offset from the top edge. Accepts pixels (number) or percentage string. */
|
|
112
|
+
readonly top?: OffsetValue;
|
|
113
|
+
/** Offset from the right edge. Accepts pixels (number) or percentage string. */
|
|
114
|
+
readonly right?: OffsetValue;
|
|
115
|
+
/** Offset from the bottom edge. Accepts pixels (number) or percentage string. */
|
|
116
|
+
readonly bottom?: OffsetValue;
|
|
117
|
+
/** Offset from the left edge. Accepts pixels (number) or percentage string. */
|
|
118
|
+
readonly left?: OffsetValue;
|
|
119
|
+
/** Stacking order. Higher values render above lower values. */
|
|
120
|
+
readonly zIndex?: number;
|
|
121
|
+
/** Content overflow behavior. */
|
|
122
|
+
readonly overflow?: OverflowMode;
|
|
123
|
+
/**
|
|
124
|
+
* Controls whether the element can be the target of touch/pointer events.
|
|
125
|
+
*
|
|
126
|
+
* - `'auto'` — default, element and children receive events
|
|
127
|
+
* - `'none'` — element and children are invisible to events (pass through)
|
|
128
|
+
* - `'box-none'` — element ignores events but children can receive them
|
|
129
|
+
* - `'box-only'` — element receives events but children cannot
|
|
130
|
+
*/
|
|
131
|
+
readonly pointerEvents?: PointerEventsMode;
|
|
132
|
+
/** Opacity of the element (0 = fully transparent, 1 = fully opaque). */
|
|
133
|
+
readonly opacity?: number;
|
|
104
134
|
/** Test identifier — maps to `data-testid` on web. Used by testing libraries. */
|
|
105
135
|
readonly testID?: string;
|
|
106
136
|
/** DOM id — maps to `id` attribute on web. Used for anchors and scroll targets. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wrapper.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/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,EACX,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE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EzB,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,0CAA0C;IAC1C,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtonedev/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "React + React Native Web component library for Newtone",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"react-native": ">=0.70.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"
|
|
40
|
+
"newtone-api": "^0.0.1",
|
|
41
41
|
"newtone": "^0.1.0",
|
|
42
|
+
"@newtonedev/fonts": "^0.1.0",
|
|
42
43
|
"react-native-web": "^0.19.10"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
-
import {
|
|
3
|
-
import type { ResolvedTokens } from '../tokens/types';
|
|
2
|
+
import type { ResolvedTokens, ColorGamut } from 'newtone-api';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Pure style computation function.
|
|
@@ -8,6 +7,7 @@ import type { ResolvedTokens } from '../tokens/types';
|
|
|
8
7
|
* Rules:
|
|
9
8
|
* - Always use StyleSheet.create() — never plain JS objects
|
|
10
9
|
* - Colors from tokens only — never hardcoded hex (except shadows: '#000')
|
|
10
|
+
* - Use `[gamut]` indexing on TokenColor values (never `.srgb` or `.p3` directly)
|
|
11
11
|
* - Shadows via RN properties (shadowColor, shadowOffset, shadowOpacity, shadowRadius, elevation)
|
|
12
12
|
* NEVER use boxShadow as a CSS string
|
|
13
13
|
* - For web-only CSS (boxShadow, gridTemplateColumns, etc.):
|
|
@@ -15,11 +15,11 @@ import type { ResolvedTokens } from '../tokens/types';
|
|
|
15
15
|
* - Every section must have a plain-language inline comment explaining what
|
|
16
16
|
* the style achieves visually, not just the CSS property name
|
|
17
17
|
*/
|
|
18
|
-
export function getComponentNameStyles(tokens: ResolvedTokens) {
|
|
18
|
+
export function getComponentNameStyles(tokens: ResolvedTokens, gamut: ColorGamut) {
|
|
19
19
|
return StyleSheet.create({
|
|
20
20
|
container: {
|
|
21
21
|
// Surface color from the current theme.
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: tokens.background[gamut],
|
|
23
23
|
// Rounded corners using the theme's medium radius.
|
|
24
24
|
borderRadius: tokens.radius.md,
|
|
25
25
|
// Inner spacing using the theme's medium spacing value.
|
|
@@ -69,7 +69,7 @@ import React, { useMemo } from 'react';
|
|
|
69
69
|
import { View } from 'react-native';
|
|
70
70
|
import type { ComponentNameProps } from './ComponentName.types';
|
|
71
71
|
import { getComponentNameStyles } from './ComponentName.styles';
|
|
72
|
-
import { useTokens } from '
|
|
72
|
+
import { useTokens } from 'newtone-api';
|
|
73
73
|
|
|
74
74
|
export function ComponentName({
|
|
75
75
|
style,
|
|
@@ -86,7 +86,7 @@ export function ComponentName({
|
|
|
86
86
|
// Wrapped in useMemo so it only recalculates when the tokens change,
|
|
87
87
|
// instead of recalculating on every render (which would be wasteful).
|
|
88
88
|
const styles = useMemo(
|
|
89
|
-
() => getComponentNameStyles(tokens),
|
|
89
|
+
() => getComponentNameStyles(tokens, tokens.gamut),
|
|
90
90
|
[tokens]
|
|
91
91
|
);
|
|
92
92
|
|