@newtonedev/components 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/Popover/Popover.d.ts.map +1 -1
  2. package/dist/Popover/Popover.styles.d.ts +64 -1
  3. package/dist/Popover/Popover.styles.d.ts.map +1 -1
  4. package/dist/Select/Select.d.ts.map +1 -1
  5. package/dist/_COMPONENT_TEMPLATE/ComponentName.d.ts +70 -0
  6. package/dist/_COMPONENT_TEMPLATE/ComponentName.d.ts.map +1 -0
  7. package/dist/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts +22 -0
  8. package/dist/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts.map +1 -0
  9. package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts +45 -0
  10. package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts.map +1 -0
  11. package/dist/_COMPONENT_TEMPLATE/index.d.ts +3 -0
  12. package/dist/_COMPONENT_TEMPLATE/index.d.ts.map +1 -0
  13. package/dist/fonts/GoogleFontLoader.d.ts.map +1 -1
  14. package/dist/fonts/IconFontLoader.d.ts.map +1 -1
  15. package/dist/index.cjs +371 -74
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.ts +11 -5
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +370 -76
  20. package/dist/index.js.map +1 -1
  21. package/dist/{Frame → primitives/Frame}/Frame.d.ts +1 -1
  22. package/dist/primitives/Frame/Frame.d.ts.map +1 -0
  23. package/dist/{Frame → primitives/Frame}/Frame.styles.d.ts +11 -2
  24. package/dist/primitives/Frame/Frame.styles.d.ts.map +1 -0
  25. package/dist/primitives/Frame/Frame.types.d.ts +240 -0
  26. package/dist/primitives/Frame/Frame.types.d.ts.map +1 -0
  27. package/dist/{Frame → primitives/Frame}/Frame.utils.d.ts +12 -12
  28. package/dist/primitives/Frame/Frame.utils.d.ts.map +1 -0
  29. package/dist/primitives/Frame/index.d.ts.map +1 -0
  30. package/dist/primitives/Icon/Icon.d.ts +17 -0
  31. package/dist/primitives/Icon/Icon.d.ts.map +1 -0
  32. package/dist/primitives/Icon/Icon.types.d.ts +55 -0
  33. package/dist/primitives/Icon/Icon.types.d.ts.map +1 -0
  34. package/dist/primitives/Icon/index.d.ts +3 -0
  35. package/dist/primitives/Icon/index.d.ts.map +1 -0
  36. package/dist/primitives/Text/Text.d.ts +17 -0
  37. package/dist/primitives/Text/Text.d.ts.map +1 -0
  38. package/dist/primitives/Text/Text.types.d.ts +85 -0
  39. package/dist/primitives/Text/Text.types.d.ts.map +1 -0
  40. package/dist/primitives/Text/index.d.ts +3 -0
  41. package/dist/primitives/Text/index.d.ts.map +1 -0
  42. package/dist/primitives/Wrapper/Wrapper.d.ts +29 -0
  43. package/dist/primitives/Wrapper/Wrapper.d.ts.map +1 -0
  44. package/dist/primitives/Wrapper/Wrapper.styles.d.ts +28 -0
  45. package/dist/primitives/Wrapper/Wrapper.styles.d.ts.map +1 -0
  46. package/dist/primitives/Wrapper/Wrapper.types.d.ts +113 -0
  47. package/dist/primitives/Wrapper/Wrapper.types.d.ts.map +1 -0
  48. package/dist/primitives/Wrapper/index.d.ts +3 -0
  49. package/dist/primitives/Wrapper/index.d.ts.map +1 -0
  50. package/dist/primitives/index.d.ts +12 -0
  51. package/dist/primitives/index.d.ts.map +1 -0
  52. package/dist/primitives/useFocusVisible.d.ts +29 -0
  53. package/dist/primitives/useFocusVisible.d.ts.map +1 -0
  54. package/dist/theme/defaults.d.ts.map +1 -1
  55. package/dist/theme/types.d.ts +13 -6
  56. package/dist/theme/types.d.ts.map +1 -1
  57. package/dist/tokens/computeTokens.d.ts +13 -6
  58. package/dist/tokens/computeTokens.d.ts.map +1 -1
  59. package/dist/tokens/types.d.ts +16 -7
  60. package/dist/tokens/types.d.ts.map +1 -1
  61. package/package.json +1 -1
  62. package/src/Button/Button.styles.ts +9 -9
  63. package/src/Button/Button.tsx +1 -1
  64. package/src/Card/Card.styles.ts +1 -1
  65. package/src/ColorScaleSlider/ColorScaleSlider.styles.ts +1 -1
  66. package/src/HueSlider/HueSlider.styles.ts +1 -1
  67. package/src/Popover/Popover.styles.ts +5 -1
  68. package/src/Popover/Popover.tsx +3 -1
  69. package/src/Select/Select.styles.ts +9 -9
  70. package/src/Select/Select.tsx +2 -3
  71. package/src/Select/SelectOption.tsx +6 -6
  72. package/src/Slider/Slider.styles.ts +1 -1
  73. package/src/TextInput/TextInput.styles.ts +3 -3
  74. package/src/Toggle/Toggle.styles.ts +1 -1
  75. package/src/_COMPONENT_TEMPLATE/ComponentName.styles.ts +29 -0
  76. package/src/_COMPONENT_TEMPLATE/ComponentName.tsx +106 -0
  77. package/src/_COMPONENT_TEMPLATE/ComponentName.types.ts +86 -0
  78. package/src/_COMPONENT_TEMPLATE/index.ts +2 -0
  79. package/src/fonts/GoogleFontLoader.tsx +2 -0
  80. package/src/fonts/IconFontLoader.tsx +2 -0
  81. package/src/index.ts +22 -5
  82. package/src/{Frame → primitives/Frame}/Frame.styles.ts +46 -9
  83. package/src/{Frame → primitives/Frame}/Frame.tsx +90 -16
  84. package/src/primitives/Frame/Frame.types.ts +315 -0
  85. package/src/{Frame → primitives/Frame}/Frame.utils.ts +56 -20
  86. package/src/primitives/Icon/Icon.tsx +89 -0
  87. package/src/primitives/Icon/Icon.types.ts +70 -0
  88. package/src/primitives/Icon/index.ts +2 -0
  89. package/src/primitives/Text/Text.tsx +90 -0
  90. package/src/primitives/Text/Text.types.ts +108 -0
  91. package/src/primitives/Text/index.ts +10 -0
  92. package/src/primitives/Wrapper/Wrapper.styles.ts +113 -0
  93. package/src/primitives/Wrapper/Wrapper.tsx +104 -0
  94. package/src/primitives/Wrapper/Wrapper.types.ts +149 -0
  95. package/src/primitives/Wrapper/index.ts +2 -0
  96. package/src/primitives/index.ts +46 -0
  97. package/src/primitives/useFocusVisible.ts +102 -0
  98. package/src/theme/defaults.ts +13 -6
  99. package/src/theme/types.ts +13 -6
  100. package/src/tokens/computeTokens.ts +1 -1
  101. package/src/tokens/types.ts +16 -7
  102. package/dist/Frame/Frame.d.ts.map +0 -1
  103. package/dist/Frame/Frame.styles.d.ts.map +0 -1
  104. package/dist/Frame/Frame.types.d.ts +0 -115
  105. package/dist/Frame/Frame.types.d.ts.map +0 -1
  106. package/dist/Frame/Frame.utils.d.ts.map +0 -1
  107. package/dist/Frame/index.d.ts.map +0 -1
  108. package/dist/Icon/Icon.d.ts +0 -36
  109. package/dist/Icon/Icon.d.ts.map +0 -1
  110. package/src/Frame/Frame.types.ts +0 -181
  111. package/src/Icon/Icon.tsx +0 -76
  112. /package/dist/{Frame → primitives/Frame}/index.d.ts +0 -0
  113. /package/src/{Frame → primitives/Frame}/index.ts +0 -0
@@ -0,0 +1,46 @@
1
+ // Focus visibility (keyboard-only focus detection)
2
+ export { useFocusVisible } from './useFocusVisible';
3
+ export type { FocusVisibleResult } from './useFocusVisible';
4
+
5
+ // Frame
6
+ export { Frame } from './Frame';
7
+ export type {
8
+ FrameProps,
9
+ SpacingToken,
10
+ SpacingValue,
11
+ SpacingSides,
12
+ SpacingAxes,
13
+ PaddingProp,
14
+ GapAxes,
15
+ GapProp,
16
+ RadiusToken,
17
+ RadiusValue,
18
+ RadiusCorners,
19
+ RadiusProp,
20
+ SizingMode,
21
+ LayoutMode,
22
+ Direction,
23
+ Alignment,
24
+ Justification,
25
+ } from './Frame';
26
+ export type { ResolvedCorners } from './Frame/Frame.utils';
27
+
28
+ // Icon
29
+ export { Icon } from './Icon';
30
+ export type { IconProps } from './Icon';
31
+
32
+ // Wrapper
33
+ export { Wrapper } from './Wrapper';
34
+ export type { WrapperProps } from './Wrapper';
35
+
36
+ // Text
37
+ export { Text } from './Text';
38
+ export type {
39
+ TextProps,
40
+ TextSize,
41
+ TextWeight,
42
+ TextColor,
43
+ TextFont,
44
+ TextLineHeight,
45
+ TextAlign,
46
+ } from './Text';
@@ -0,0 +1,102 @@
1
+ /**
2
+ * useFocusVisible — Keyboard-only focus detection hook.
3
+ *
4
+ * Tracks whether the user's last input was keyboard (Tab, arrows, etc.)
5
+ * or pointer (mouse, touch). When an element receives focus after a
6
+ * keyboard event, `isFocusVisible` is true — matching the browser's
7
+ * native `:focus-visible` pseudo-class behavior.
8
+ *
9
+ * This is the same approach used by the `:focus-visible` polyfill.
10
+ * On native platforms, the document listeners are skipped (guarded by
11
+ * `typeof document`), and the hook returns false for `isFocusVisible`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const { isFocusVisible, focusProps } = useFocusVisible();
16
+ *
17
+ * <Pressable {...focusProps} style={isFocusVisible ? focusRingStyle : undefined}>
18
+ * <Text>Keyboard-focusable</Text>
19
+ * </Pressable>
20
+ * ```
21
+ */
22
+
23
+ import { useState, useEffect, useCallback } from 'react';
24
+
25
+ // ── Module-level input modality tracking ────────────────────────
26
+ // Shared across all hook instances — a single set of document listeners
27
+ // tracks whether the most recent user input was keyboard or pointer.
28
+
29
+ let hadKeyboardEvent = false;
30
+ let isListenerSetup = false;
31
+
32
+ /**
33
+ * Attach document-level listeners once. Keyboard events (Tab, arrows,
34
+ * Enter, Space, Escape) set the flag; pointer/mouse events clear it.
35
+ * Capture phase ensures we see the event before any component handler.
36
+ */
37
+ function setupModality() {
38
+ // Guard: skip on native platforms and during SSR (no document).
39
+ if (isListenerSetup || typeof document === 'undefined') return;
40
+ isListenerSetup = true;
41
+
42
+ // Keyboard navigation keys that should trigger focus-visible.
43
+ // We don't flag every keydown (e.g. typing in a TextInput shouldn't
44
+ // make the next focused element show a ring).
45
+ const NAVIGATION_KEYS = new Set([
46
+ 'Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight',
47
+ 'Enter', ' ', 'Escape',
48
+ ]);
49
+
50
+ document.addEventListener('keydown', (e) => {
51
+ if (NAVIGATION_KEYS.has(e.key)) {
52
+ hadKeyboardEvent = true;
53
+ }
54
+ }, true);
55
+
56
+ // Any pointer activity means the user is using a mouse/touch,
57
+ // so the next focus should NOT show a visible ring.
58
+ document.addEventListener('pointerdown', () => {
59
+ hadKeyboardEvent = false;
60
+ }, true);
61
+
62
+ // Fallback for environments without PointerEvent (older browsers).
63
+ document.addEventListener('mousedown', () => {
64
+ hadKeyboardEvent = false;
65
+ }, true);
66
+ }
67
+
68
+ // ── Hook ────────────────────────────────────────────────────────
69
+
70
+ export interface FocusVisibleResult {
71
+ /** True when the element is focused AND focus was keyboard-initiated. */
72
+ readonly isFocusVisible: boolean;
73
+ /** Spread these onto the interactive element (web-only, ignored on native). */
74
+ readonly focusProps: Record<string, unknown>;
75
+ }
76
+
77
+ export function useFocusVisible(): FocusVisibleResult {
78
+ const [isFocusVisible, setIsFocusVisible] = useState(false);
79
+
80
+ // Set up document-level modality tracking on first render.
81
+ useEffect(() => {
82
+ setupModality();
83
+ }, []);
84
+
85
+ // On focus: show ring only if the last input was keyboard.
86
+ const onFocus = useCallback(() => {
87
+ if (hadKeyboardEvent) {
88
+ setIsFocusVisible(true);
89
+ }
90
+ }, []);
91
+
92
+ // On blur: always hide the ring.
93
+ const onBlur = useCallback(() => {
94
+ setIsFocusVisible(false);
95
+ }, []);
96
+
97
+ // Return props as a spreadable object. These are web-only event handlers
98
+ // supported by react-native-web — silently ignored on native.
99
+ const focusProps = { onFocus, onBlur } as Record<string, unknown>; // web-only
100
+
101
+ return { isFocusVisible, focusProps };
102
+ }
@@ -40,12 +40,19 @@ export const DEFAULT_THEME_CONFIG: NewtoneThemeConfig = {
40
40
  offsets: [-0.02, 0, 0.04], // [sunken, default, elevated]
41
41
  },
42
42
  spacing: {
43
- xs: 4,
44
- sm: 8,
45
- md: 12,
46
- lg: 16,
47
- xl: 24,
48
- xxl: 32,
43
+ '00': 0, // base * 0
44
+ '02': 2, // base * 0.25
45
+ '04': 4, // base * 0.5
46
+ '06': 6, // base * 0.75
47
+ '08': 8, // base * 1 (Medium preset, 8px base)
48
+ '10': 10, // base * 1.25
49
+ '12': 12, // base * 1.5
50
+ '16': 16, // base * 2
51
+ '20': 20, // base * 2.5
52
+ '24': 24, // base * 3
53
+ '32': 32, // base * 4
54
+ '40': 40, // base * 5
55
+ '48': 48, // base * 6
49
56
  },
50
57
  radius: {
51
58
  none: 0,
@@ -66,12 +66,19 @@ export interface NewtoneThemeConfig {
66
66
  readonly offsets: readonly [number, number, number]; // NV offsets for [sunken, default, elevated]
67
67
  };
68
68
  readonly spacing: {
69
- readonly xs: number; // 4 * multiplier
70
- readonly sm: number; // 8 * multiplier
71
- readonly md: number; // 12 * multiplier
72
- readonly lg: number; // 16 * multiplier
73
- readonly xl: number; // 24 * multiplier
74
- readonly xxl: number; // 32 * multiplier
69
+ readonly '00': number; // base * 0
70
+ readonly '02': number; // base * 0.25
71
+ readonly '04': number; // base * 0.5
72
+ readonly '06': number; // base * 0.75
73
+ readonly '08': number; // base * 1
74
+ readonly '10': number; // base * 1.25
75
+ readonly '12': number; // base * 1.5
76
+ readonly '16': number; // base * 2
77
+ readonly '20': number; // base * 2.5
78
+ readonly '24': number; // base * 3
79
+ readonly '32': number; // base * 4
80
+ readonly '40': number; // base * 5
81
+ readonly '48': number; // base * 6
75
82
  };
76
83
  readonly radius: {
77
84
  readonly none: number; // 0
@@ -51,7 +51,7 @@ export function computeTokens(
51
51
  themeMapping: ThemeMapping,
52
52
  elevation: ElevationLevel,
53
53
  elevationOffsets: readonly [number, number, number],
54
- spacing: { readonly xs: number; readonly sm: number; readonly md: number; readonly lg: number; readonly xl: number; readonly xxl: number },
54
+ spacing: { readonly '00': number; readonly '02': number; readonly '04': number; readonly '06': number; readonly '08': number; readonly '10': number; readonly '12': number; readonly '16': number; readonly '20': number; readonly '24': number; readonly '32': number; readonly '40': number; readonly '48': number },
55
55
  radius: { readonly none: number; readonly sm: number; readonly md: number; readonly lg: number; readonly xl: number; readonly pill: 999 },
56
56
  typography: {
57
57
  readonly fonts: { readonly mono: FontConfig; readonly display: FontConfig; readonly default: FontConfig };
@@ -28,14 +28,23 @@ export interface ResolvedTokens {
28
28
  readonly warning: ColorResult;
29
29
  /** Error/destructive state color (from error palette, index 4) */
30
30
  readonly error: ColorResult;
31
- /** Spacing tokens for paddings, gaps, and margins */
31
+ /** Spacing tokens for paddings, gaps, and margins.
32
+ * Token names represent pixel values at Medium (8px) spacing preset.
33
+ * Actual values scale based on the selected spacing preset. */
32
34
  readonly spacing: {
33
- readonly xs: number;
34
- readonly sm: number;
35
- readonly md: number;
36
- readonly lg: number;
37
- readonly xl: number;
38
- readonly xxl: number;
35
+ readonly '00': number; // 0px (always 0)
36
+ readonly '02': number; // 2px at Medium (0.25x multiplier)
37
+ readonly '04': number; // 4px at Medium (0.5x multiplier)
38
+ readonly '06': number; // 6px at Medium (0.75x multiplier)
39
+ readonly '08': number; // 8px at Medium (1x multiplier, equals base)
40
+ readonly '10': number; // 10px at Medium (1.25x multiplier)
41
+ readonly '12': number; // 12px at Medium (1.5x multiplier)
42
+ readonly '16': number; // 16px at Medium (2x multiplier)
43
+ readonly '20': number; // 20px at Medium (2.5x multiplier)
44
+ readonly '24': number; // 24px at Medium (3x multiplier)
45
+ readonly '32': number; // 32px at Medium (4x multiplier)
46
+ readonly '40': number; // 40px at Medium (5x multiplier)
47
+ readonly '48': number; // 48px at Medium (6x multiplier)
39
48
  };
40
49
  /** Border radius tokens for component roundness */
41
50
  readonly radius: {
@@ -1 +0,0 @@
1
- {"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../src/Frame/Frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAyChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EAER,KAAK,EACL,SAAS,EAET,MAAM,EACN,SAAS,EACT,IAAI,EACJ,OAAO,EACP,OAAO,EACP,IAAI,EAEJ,KAAK,EACL,OAAO,EAEP,OAAO,EACP,GAAG,EAEH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,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,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAID,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;IAClD,wDAAwD;IACxD,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAID,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,WAAW,CAuIlE"}
@@ -1,115 +0,0 @@
1
- import type { ViewStyle, GestureResponderEvent } from 'react-native';
2
- import type { ThemeName, FrameElevation } from '../theme/types';
3
- /** Design system spacing tokens */
4
- export type SpacingToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
- /** A spacing value: either a design token name or a pixel number */
6
- export type SpacingValue = SpacingToken | number;
7
- /** Per-side spacing */
8
- export interface SpacingSides {
9
- readonly top?: SpacingValue;
10
- readonly right?: SpacingValue;
11
- readonly bottom?: SpacingValue;
12
- readonly left?: SpacingValue;
13
- }
14
- /** Axis-based spacing shorthand */
15
- export interface SpacingAxes {
16
- readonly x?: SpacingValue;
17
- readonly y?: SpacingValue;
18
- }
19
- /** Padding: uniform, axis shorthand, or per-side */
20
- export type PaddingProp = SpacingValue | SpacingAxes | SpacingSides;
21
- /** Gap axis shorthand */
22
- export interface GapAxes {
23
- readonly row?: SpacingValue;
24
- readonly column?: SpacingValue;
25
- }
26
- /** Gap: uniform or row/column */
27
- export type GapProp = SpacingValue | GapAxes;
28
- /** Design system radius tokens */
29
- export type RadiusToken = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'pill';
30
- /** A radius value: either a design token name or a pixel number */
31
- export type RadiusValue = RadiusToken | number;
32
- /** Per-corner radius */
33
- export interface RadiusCorners {
34
- readonly topLeft?: RadiusValue;
35
- readonly topRight?: RadiusValue;
36
- readonly bottomLeft?: RadiusValue;
37
- readonly bottomRight?: RadiusValue;
38
- }
39
- /** Radius: uniform or per-corner */
40
- export type RadiusProp = RadiusValue | RadiusCorners;
41
- /**
42
- * Figma-like sizing mode:
43
- * - 'hug': shrink to content (default)
44
- * - 'fill': expand to fill available space
45
- * - number: fixed pixel dimension
46
- */
47
- export type SizingMode = 'hug' | 'fill' | number;
48
- /** Layout mode */
49
- export type LayoutMode = 'flex' | 'grid';
50
- /** Flex direction (Figma-like naming) */
51
- export type Direction = 'horizontal' | 'vertical';
52
- /** Cross-axis alignment */
53
- export type Alignment = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
54
- /** Main-axis justification */
55
- export type Justification = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
56
- export interface FrameProps {
57
- /** Child elements that inherit this Frame's theme and elevation context */
58
- readonly children: React.ReactNode;
59
- /**
60
- * Theme override for this frame and all descendants.
61
- * When omitted, inherits from parent Frame or NewtoneProvider.
62
- */
63
- readonly theme?: ThemeName;
64
- /**
65
- * Surface elevation: -2 (deeply sunken with inset shadow), -1 (sunken),
66
- * 0 (default), 1 (elevated), 2 (prominently elevated with drop shadow).
67
- * When omitted, inherits from parent Frame or defaults to 0.
68
- */
69
- readonly elevation?: FrameElevation;
70
- /** Layout mode. @default 'flex' */
71
- readonly layout?: LayoutMode;
72
- /** Flex direction. @default 'vertical' */
73
- readonly direction?: Direction;
74
- /** Enable flex wrap. @default false */
75
- readonly wrap?: boolean;
76
- /** Reverse flex direction. @default false */
77
- readonly reverse?: boolean;
78
- /** CSS Grid column count (web-only, requires layout='grid') */
79
- readonly columns?: number;
80
- /** CSS Grid row count (web-only, requires layout='grid') */
81
- readonly rows?: number;
82
- /** Cross-axis alignment of children */
83
- readonly align?: Alignment;
84
- /** Main-axis justification of children */
85
- readonly justify?: Justification;
86
- /** Padding: uniform token/number, axis shorthand, or per-side */
87
- readonly padding?: PaddingProp;
88
- /** Gap between children: uniform or row/column */
89
- readonly gap?: GapProp;
90
- /** Width: 'hug' (content-sized), 'fill' (expand), or fixed number */
91
- readonly width?: SizingMode;
92
- /** Height: 'hug' (content-sized), 'fill' (expand), or fixed number */
93
- readonly height?: SizingMode;
94
- /** Minimum width in pixels */
95
- readonly minWidth?: number;
96
- /** Maximum width in pixels */
97
- readonly maxWidth?: number;
98
- /** Minimum height in pixels */
99
- readonly minHeight?: number;
100
- /** Maximum height in pixels */
101
- readonly maxHeight?: number;
102
- /** Border radius: token, number, or per-corner object */
103
- readonly radius?: RadiusProp;
104
- /** Show 1px border using theme border color. @default false */
105
- readonly bordered?: boolean;
106
- /** Press handler — switches rendering from View to Pressable */
107
- readonly onPress?: (event: GestureResponderEvent) => void;
108
- /** Navigation URL — switches rendering to Pressable with link role */
109
- readonly href?: string;
110
- /** Disable interaction. @default false */
111
- readonly disabled?: boolean;
112
- /** Custom style overrides (applied last) */
113
- readonly style?: ViewStyle | ViewStyle[];
114
- }
115
- //# sourceMappingURL=Frame.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Frame.types.d.ts","sourceRoot":"","sources":["../../src/Frame/Frame.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAA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AAChE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAKnE;AAID,gEAAgE;AAChE,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,MAAM,EAAE,UAAU,GAAG,SAAS,GAC7B,SAAS,CAwBX;AAqBD,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC,CAE1E;AAED,6DAA6D;AAC7D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAExF;AAED,6DAA6D;AAC7D,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GACf,SAAS,CAAC,eAAe,CAAC,CAK5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { type ViewStyle } from 'react-native';
3
- import type { ElevationLevel } from '../theme/types';
4
- export interface IconProps {
5
- /** Icon ligature name (e.g., 'home', 'settings', 'check') */
6
- readonly name: string;
7
- /** Font size in pixels (default: tokens.typography.size.base) */
8
- readonly size?: number;
9
- /** Optical size for variable font axis (default: same as size) */
10
- readonly opticalSize?: number;
11
- /** Fill state: 0=outlined, 1=filled (default: 0) */
12
- readonly fill?: 0 | 1;
13
- /** Icon color as hex string (default: tokens.textPrimary) */
14
- readonly color?: string;
15
- /** Elevation level for token computation (default: 1) */
16
- readonly elevation?: ElevationLevel;
17
- /** Additional styles */
18
- readonly style?: ViewStyle;
19
- /** Press handler */
20
- readonly onPress?: () => void;
21
- }
22
- /**
23
- * Material Symbols icon component with variable font support.
24
- *
25
- * Uses global icon configuration (variant, weight, auto-grade) from theme config,
26
- * with per-instance control over size, fill, and color.
27
- *
28
- * @example
29
- * ```tsx
30
- * <Icon name="home" />
31
- * <Icon name="settings" size={24} fill={1} />
32
- * <Icon name="check" color="#00ff00" />
33
- * ```
34
- */
35
- export declare function Icon({ name, size, opticalSize, fill, color, elevation, style, onPress, }: IconProps): React.JSX.Element;
36
- //# sourceMappingURL=Icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAGpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IACpC,wBAAwB;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,IAAQ,EACR,KAAK,EACL,SAAa,EACb,KAAK,EACL,OAAO,GACR,EAAE,SAAS,qBA4BX"}
@@ -1,181 +0,0 @@
1
- import type { ViewStyle, GestureResponderEvent } from 'react-native';
2
- import type { ThemeName, FrameElevation } from '../theme/types';
3
-
4
- // ── Spacing Types ──────────────────────────────────────────────
5
-
6
- /** Design system spacing tokens */
7
- export type SpacingToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
8
-
9
- /** A spacing value: either a design token name or a pixel number */
10
- export type SpacingValue = SpacingToken | number;
11
-
12
- /** Per-side spacing */
13
- export interface SpacingSides {
14
- readonly top?: SpacingValue;
15
- readonly right?: SpacingValue;
16
- readonly bottom?: SpacingValue;
17
- readonly left?: SpacingValue;
18
- }
19
-
20
- /** Axis-based spacing shorthand */
21
- export interface SpacingAxes {
22
- readonly x?: SpacingValue;
23
- readonly y?: SpacingValue;
24
- }
25
-
26
- /** Padding: uniform, axis shorthand, or per-side */
27
- export type PaddingProp = SpacingValue | SpacingAxes | SpacingSides;
28
-
29
- /** Gap axis shorthand */
30
- export interface GapAxes {
31
- readonly row?: SpacingValue;
32
- readonly column?: SpacingValue;
33
- }
34
-
35
- /** Gap: uniform or row/column */
36
- export type GapProp = SpacingValue | GapAxes;
37
-
38
- // ── Radius Types ───────────────────────────────────────────────
39
-
40
- /** Design system radius tokens */
41
- export type RadiusToken = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'pill';
42
-
43
- /** A radius value: either a design token name or a pixel number */
44
- export type RadiusValue = RadiusToken | number;
45
-
46
- /** Per-corner radius */
47
- export interface RadiusCorners {
48
- readonly topLeft?: RadiusValue;
49
- readonly topRight?: RadiusValue;
50
- readonly bottomLeft?: RadiusValue;
51
- readonly bottomRight?: RadiusValue;
52
- }
53
-
54
- /** Radius: uniform or per-corner */
55
- export type RadiusProp = RadiusValue | RadiusCorners;
56
-
57
- // ── Sizing Types ───────────────────────────────────────────────
58
-
59
- /**
60
- * Figma-like sizing mode:
61
- * - 'hug': shrink to content (default)
62
- * - 'fill': expand to fill available space
63
- * - number: fixed pixel dimension
64
- */
65
- export type SizingMode = 'hug' | 'fill' | number;
66
-
67
- // ── Layout Types ───────────────────────────────────────────────
68
-
69
- /** Layout mode */
70
- export type LayoutMode = 'flex' | 'grid';
71
-
72
- /** Flex direction (Figma-like naming) */
73
- export type Direction = 'horizontal' | 'vertical';
74
-
75
- /** Cross-axis alignment */
76
- export type Alignment = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
77
-
78
- /** Main-axis justification */
79
- export type Justification = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
80
-
81
- // ── Props ──────────────────────────────────────────────────────
82
-
83
- export interface FrameProps {
84
- /** Child elements that inherit this Frame's theme and elevation context */
85
- readonly children: React.ReactNode;
86
-
87
- // ── Theme & Elevation ──
88
-
89
- /**
90
- * Theme override for this frame and all descendants.
91
- * When omitted, inherits from parent Frame or NewtoneProvider.
92
- */
93
- readonly theme?: ThemeName;
94
-
95
- /**
96
- * Surface elevation: -2 (deeply sunken with inset shadow), -1 (sunken),
97
- * 0 (default), 1 (elevated), 2 (prominently elevated with drop shadow).
98
- * When omitted, inherits from parent Frame or defaults to 0.
99
- */
100
- readonly elevation?: FrameElevation;
101
-
102
- // ── Layout ──
103
-
104
- /** Layout mode. @default 'flex' */
105
- readonly layout?: LayoutMode;
106
-
107
- /** Flex direction. @default 'vertical' */
108
- readonly direction?: Direction;
109
-
110
- /** Enable flex wrap. @default false */
111
- readonly wrap?: boolean;
112
-
113
- /** Reverse flex direction. @default false */
114
- readonly reverse?: boolean;
115
-
116
- /** CSS Grid column count (web-only, requires layout='grid') */
117
- readonly columns?: number;
118
-
119
- /** CSS Grid row count (web-only, requires layout='grid') */
120
- readonly rows?: number;
121
-
122
- // ── Alignment ──
123
-
124
- /** Cross-axis alignment of children */
125
- readonly align?: Alignment;
126
-
127
- /** Main-axis justification of children */
128
- readonly justify?: Justification;
129
-
130
- // ── Spacing ──
131
-
132
- /** Padding: uniform token/number, axis shorthand, or per-side */
133
- readonly padding?: PaddingProp;
134
-
135
- /** Gap between children: uniform or row/column */
136
- readonly gap?: GapProp;
137
-
138
- // ── Sizing ──
139
-
140
- /** Width: 'hug' (content-sized), 'fill' (expand), or fixed number */
141
- readonly width?: SizingMode;
142
-
143
- /** Height: 'hug' (content-sized), 'fill' (expand), or fixed number */
144
- readonly height?: SizingMode;
145
-
146
- /** Minimum width in pixels */
147
- readonly minWidth?: number;
148
-
149
- /** Maximum width in pixels */
150
- readonly maxWidth?: number;
151
-
152
- /** Minimum height in pixels */
153
- readonly minHeight?: number;
154
-
155
- /** Maximum height in pixels */
156
- readonly maxHeight?: number;
157
-
158
- // ── Appearance ──
159
-
160
- /** Border radius: token, number, or per-corner object */
161
- readonly radius?: RadiusProp;
162
-
163
- /** Show 1px border using theme border color. @default false */
164
- readonly bordered?: boolean;
165
-
166
- // ── Interactivity ──
167
-
168
- /** Press handler — switches rendering from View to Pressable */
169
- readonly onPress?: (event: GestureResponderEvent) => void;
170
-
171
- /** Navigation URL — switches rendering to Pressable with link role */
172
- readonly href?: string;
173
-
174
- /** Disable interaction. @default false */
175
- readonly disabled?: boolean;
176
-
177
- // ── Style override ──
178
-
179
- /** Custom style overrides (applied last) */
180
- readonly style?: ViewStyle | ViewStyle[];
181
- }