@tutti-os/ui-system 0.0.236 → 0.0.237
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/metadata/components.json +4 -2
- package/dist/metadata/index.js +4 -2
- package/dist/metadata/index.js.map +1 -1
- package/dist/native.d.ts +6 -6
- package/dist/native.js +61 -27
- package/dist/native.js.map +1 -1
- package/package.json +1 -6
- package/ui-system.md +10 -7
package/dist/native.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
3
|
import { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
import { BottomSheetModalProps } from '@gorhom/bottom-sheet';
|
|
5
4
|
|
|
6
5
|
type ButtonVariant = "primary" | "secondary" | "destructive" | "destructiveGhost" | "ghost";
|
|
7
6
|
type ButtonSize = "regular" | "large" | "compact" | "icon";
|
|
@@ -52,17 +51,18 @@ declare function NativeListRow({ accessibilityLabel, description, disabled, lead
|
|
|
52
51
|
|
|
53
52
|
interface NativeSheetProps {
|
|
54
53
|
children: ReactNode;
|
|
54
|
+
closeAccessibilityLabel: string;
|
|
55
|
+
height?: number | `${number}%`;
|
|
55
56
|
onOpenChange(open: boolean): void;
|
|
56
57
|
open: boolean;
|
|
57
|
-
snapPoints?: BottomSheetModalProps["snapPoints"];
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Controlled
|
|
60
|
+
* Controlled sheet backed by React Native's window-level Modal.
|
|
61
61
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
62
|
+
* Callers own whether the sheet is open and what product actions its content
|
|
63
|
+
* performs.
|
|
64
64
|
*/
|
|
65
|
-
declare function NativeSheet({ children, onOpenChange, open
|
|
65
|
+
declare function NativeSheet({ children, closeAccessibilityLabel, height, onOpenChange, open }: NativeSheetProps): react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
67
|
declare const nativeThemeDimensions: {
|
|
68
68
|
readonly control: {
|
package/dist/native.js
CHANGED
|
@@ -367,43 +367,77 @@ function createStyles2(theme) {
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
// src/native/sheet.tsx
|
|
370
|
-
import {
|
|
371
|
-
|
|
372
|
-
} from "@gorhom/bottom-sheet";
|
|
373
|
-
import { useEffect, useRef } from "react";
|
|
374
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
370
|
+
import { Modal, Pressable as Pressable3, StyleSheet as StyleSheet4, View as View3 } from "react-native";
|
|
371
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
375
372
|
function NativeSheet({
|
|
376
373
|
children,
|
|
374
|
+
closeAccessibilityLabel,
|
|
375
|
+
height,
|
|
377
376
|
onOpenChange,
|
|
378
|
-
open
|
|
379
|
-
snapPoints
|
|
377
|
+
open
|
|
380
378
|
}) {
|
|
381
379
|
const theme = useNativeTheme();
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
if (open) {
|
|
385
|
-
sheet.current?.present();
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
sheet.current?.dismiss();
|
|
389
|
-
}, [open]);
|
|
380
|
+
const styles2 = createStyles3(theme);
|
|
381
|
+
const dismiss = () => onOpenChange(false);
|
|
390
382
|
return /* @__PURE__ */ jsx5(
|
|
391
|
-
|
|
383
|
+
Modal,
|
|
392
384
|
{
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
385
|
+
animationType: "fade",
|
|
386
|
+
onRequestClose: dismiss,
|
|
387
|
+
presentationStyle: "overFullScreen",
|
|
388
|
+
statusBarTranslucent: true,
|
|
389
|
+
transparent: true,
|
|
390
|
+
visible: open,
|
|
391
|
+
children: /* @__PURE__ */ jsxs3(
|
|
392
|
+
View3,
|
|
393
|
+
{
|
|
394
|
+
accessible: false,
|
|
395
|
+
onAccessibilityEscape: dismiss,
|
|
396
|
+
style: styles2.backdrop,
|
|
397
|
+
children: [
|
|
398
|
+
/* @__PURE__ */ jsx5(
|
|
399
|
+
Pressable3,
|
|
400
|
+
{
|
|
401
|
+
accessibilityLabel: closeAccessibilityLabel,
|
|
402
|
+
accessibilityRole: "button",
|
|
403
|
+
accessible: true,
|
|
404
|
+
onPress: dismiss,
|
|
405
|
+
style: StyleSheet4.absoluteFill,
|
|
406
|
+
testID: "native-sheet-backdrop"
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
/* @__PURE__ */ jsx5(
|
|
410
|
+
Pressable3,
|
|
411
|
+
{
|
|
412
|
+
accessible: false,
|
|
413
|
+
onPress: () => void 0,
|
|
414
|
+
style: [styles2.sheet, height === void 0 ? null : { height }],
|
|
415
|
+
testID: "native-sheet-panel",
|
|
416
|
+
children
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
)
|
|
404
422
|
}
|
|
405
423
|
);
|
|
406
424
|
}
|
|
425
|
+
function createStyles3(theme) {
|
|
426
|
+
return StyleSheet4.create({
|
|
427
|
+
backdrop: {
|
|
428
|
+
backgroundColor: theme.color.scrim,
|
|
429
|
+
flex: 1,
|
|
430
|
+
justifyContent: "flex-end"
|
|
431
|
+
},
|
|
432
|
+
sheet: {
|
|
433
|
+
backgroundColor: theme.color.panelRaised,
|
|
434
|
+
borderTopLeftRadius: theme.radius.large,
|
|
435
|
+
borderTopRightRadius: theme.radius.large,
|
|
436
|
+
maxHeight: "80%",
|
|
437
|
+
overflow: "hidden"
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
407
441
|
export {
|
|
408
442
|
NativeButton,
|
|
409
443
|
NativeIconButton,
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/native/button.tsx","../src/native/theme-provider.tsx","../src/native/generated-tokens.ts","../src/native/tokens.ts","../src/native/icon-button.tsx","../src/native/list-row.tsx","../src/native/sheet.tsx"],"sourcesContent":["import { type ReactNode, useState } from \"react\";\nimport {\n ActivityIndicator,\n type GestureResponderEvent,\n Pressable,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { type NativeTheme } from \"./tokens\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"destructive\"\n | \"destructiveGhost\"\n | \"ghost\";\n\nexport type ButtonSize = \"regular\" | \"large\" | \"compact\" | \"icon\";\n\nexport interface NativeButtonProps {\n accessibilityLabel?: string;\n disabled?: boolean;\n label: string;\n leading?: ReactNode;\n loading?: boolean;\n onPress(event: GestureResponderEvent): void;\n size?: ButtonSize;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n variant?: ButtonVariant;\n}\n\n/**\n * Native counterpart of the UI System Button contract.\n *\n * Its interaction hierarchy is adapted from React Native Reusables' Button,\n * while the styling is deliberately token-backed and platform-native.\n */\nexport function NativeButton({\n accessibilityLabel,\n disabled = false,\n label,\n leading,\n loading = false,\n onPress,\n size = \"regular\",\n style,\n testID,\n variant = \"primary\"\n}: NativeButtonProps) {\n const theme = useNativeTheme();\n const styles = createStyles(theme);\n const [pressed, setPressed] = useState(false);\n const unavailable = disabled || loading;\n const foreground = textColorByVariant(theme)[variant];\n const hasLabel = label.trim().length > 0;\n\n return (\n <Pressable\n accessibilityLabel={accessibilityLabel ?? label}\n accessibilityRole=\"button\"\n accessibilityState={{ busy: loading, disabled: unavailable }}\n disabled={unavailable}\n onPress={onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n style={[\n styles.button,\n styles[size],\n variantStyles(theme)[variant],\n pressed && !unavailable ? styles.pressed : undefined,\n unavailable ? styles.disabled : undefined,\n style\n ]}\n testID={testID}\n >\n <View style={styles.content}>\n {loading ? (\n <ActivityIndicator color={foreground} size=\"small\" />\n ) : (\n <>\n {leading ? (\n <View style={[styles.leading, !hasLabel && styles.leadingOnly]}>\n {leading}\n </View>\n ) : null}\n {hasLabel ? (\n <Text\n numberOfLines={1}\n style={[styles.label, { color: foreground }]}\n >\n {label}\n </Text>\n ) : null}\n </>\n )}\n </View>\n </Pressable>\n );\n}\n\nfunction textColorByVariant(theme: NativeTheme): Record<ButtonVariant, string> {\n return {\n primary: theme.color.background,\n secondary: theme.color.text,\n destructive: theme.color.background,\n destructiveGhost: theme.color.danger,\n ghost: theme.color.text\n };\n}\n\nfunction variantStyles(theme: NativeTheme): Record<ButtonVariant, ViewStyle> {\n return {\n primary: { backgroundColor: theme.color.accent },\n secondary: {\n backgroundColor: theme.color.panelRaised,\n borderColor: theme.color.border,\n borderWidth: StyleSheet.hairlineWidth\n },\n destructive: { backgroundColor: theme.color.danger },\n destructiveGhost: { backgroundColor: \"transparent\" },\n ghost: { backgroundColor: \"transparent\" }\n };\n}\n\nfunction createStyles(theme: NativeTheme) {\n return StyleSheet.create({\n button: {\n alignItems: \"center\",\n borderRadius: theme.radius.medium,\n justifyContent: \"center\"\n },\n compact: {\n minHeight: theme.control.compact,\n paddingHorizontal: theme.space.small\n },\n content: {\n alignItems: \"center\",\n flexDirection: \"row\",\n justifyContent: \"center\"\n },\n disabled: { opacity: 0.45 },\n icon: {\n height: theme.control.icon,\n paddingHorizontal: 0,\n width: theme.control.icon\n },\n label: { fontSize: theme.space.medium, fontWeight: \"700\" },\n large: {\n minHeight: theme.control.large,\n paddingHorizontal: theme.space.medium\n },\n leading: { marginRight: theme.space.small },\n leadingOnly: { marginRight: 0 },\n pressed: { opacity: 0.82 },\n regular: {\n minHeight: theme.control.regular,\n paddingHorizontal: theme.space.medium\n }\n });\n}\n","import {\n createContext,\n type PropsWithChildren,\n useContext,\n useMemo\n} from \"react\";\nimport { useColorScheme } from \"react-native\";\nimport {\n nativeTheme,\n resolveNativeTheme,\n type NativeTheme,\n type NativeThemeMode\n} from \"./tokens\";\n\nexport type NativeThemePreference = NativeThemeMode | \"system\";\n\nconst NativeThemeContext = createContext<NativeTheme>(nativeTheme);\n\nexport interface NativeThemeProviderProps extends PropsWithChildren {\n /** Defaults to the operating system preference when no product override exists. */\n mode?: NativeThemePreference;\n}\n\n/**\n * Supplies the resolved Native semantic theme to UI System primitives and\n * application composition. The provider is intentionally UI-only: product\n * settings decide which preference, if any, it receives.\n */\nexport function NativeThemeProvider({\n children,\n mode = \"system\"\n}: NativeThemeProviderProps) {\n const systemMode = useColorScheme();\n const resolvedMode =\n mode === \"system\" ? (systemMode === \"light\" ? \"light\" : \"dark\") : mode;\n const theme = useMemo(() => resolveNativeTheme(resolvedMode), [resolvedMode]);\n\n return (\n <NativeThemeContext.Provider value={theme}>\n {children}\n </NativeThemeContext.Provider>\n );\n}\n\nexport function useNativeTheme(): NativeTheme {\n return useContext(NativeThemeContext);\n}\n","/* This file is generated from ../tokens/renderer-theme.json. Do not edit it directly. */\nexport const nativeThemeDimensions = {\n control: {\n compact: 40,\n icon: 40,\n large: 52,\n regular: 48,\n row: 60\n },\n radius: {\n large: 18,\n medium: 12,\n small: 8\n },\n space: {\n large: 24,\n medium: 16,\n small: 10,\n xlarge: 32\n }\n} as const;\n\nexport const nativeThemes = {\n light: {\n accent: \"#4182f5\",\n accentPressed: \"#3975df\",\n background: \"#f7f8fa\",\n backgroundFronted: \"#ffffff\",\n backgroundPanel: \"#f8fafc\",\n border: \"#e5e7eb\",\n danger: \"#dc2626\",\n foreground: \"#29313d\",\n muted: \"#6b7280\",\n panel: \"#f8f8fa\",\n scrim: \"rgba(0, 0, 0, 0.6)\",\n scrimStrong: \"rgba(0, 0, 0, 0.64)\",\n success: \"#22c55e\",\n textPrimary: \"#3c3c3c\",\n textSecondary: \"#6c6c6c\"\n },\n dark: {\n accent: \"#ff6b4a\",\n accentPressed: \"#eb5839\",\n background: \"#111216\",\n backgroundFronted: \"#22252d\",\n backgroundPanel: \"#1a1c22\",\n border: \"#30333b\",\n danger: \"#ff716c\",\n foreground: \"#f6f6f7\",\n muted: \"#9398a5\",\n panel: \"#1a1c22\",\n scrim: \"rgba(0, 0, 0, 0.6)\",\n scrimStrong: \"rgba(0, 0, 0, 0.64)\",\n success: \"#62d49f\",\n textPrimary: \"#f6f6f7\",\n textSecondary: \"#c3c6ce\"\n }\n} as const;\n\nexport type NativeThemeMode = keyof typeof nativeThemes;\nexport type NativeThemePalette = (typeof nativeThemes)[NativeThemeMode];\n","import {\n nativeThemeDimensions,\n nativeThemes,\n type NativeThemeMode,\n type NativeThemePalette\n} from \"./generated-tokens\";\n\nexport { nativeThemeDimensions, nativeThemes };\nexport type { NativeThemeMode, NativeThemePalette };\n\n/**\n * Resolves a renderer-neutral semantic theme for React Native.\n */\nexport function resolveNativeTheme(mode: NativeThemeMode) {\n const palette = nativeThemes[mode];\n\n return {\n control: nativeThemeDimensions.control,\n color: {\n accent: palette.accent,\n accentPressed: palette.accentPressed,\n background: palette.background,\n border: palette.border,\n danger: palette.danger,\n muted: palette.muted,\n panel: palette.panel,\n panelRaised: palette.backgroundFronted,\n scrim: palette.scrim,\n scrimStrong: palette.scrimStrong,\n success: palette.success,\n text: palette.textPrimary,\n textSecondary: palette.textSecondary\n },\n mode,\n radius: nativeThemeDimensions.radius,\n space: nativeThemeDimensions.space\n } as const;\n}\n\n/**\n * Backwards-compatible dark Native theme.\n *\n * New components should consume the context-backed `useNativeTheme` hook so\n * they respond to the Native renderer's configured color scheme.\n */\nexport const nativeTheme = resolveNativeTheme(\"dark\");\n\nexport type NativeTheme = typeof nativeTheme;\n","import type { ReactNode } from \"react\";\nimport {\n StyleSheet,\n type GestureResponderEvent,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { NativeButton, type ButtonSize, type ButtonVariant } from \"./button\";\n\nexport interface NativeIconButtonProps {\n accessibilityLabel: string;\n disabled?: boolean;\n icon: ReactNode;\n onPress(event: GestureResponderEvent): void;\n size?: Extract<ButtonSize, \"compact\" | \"icon\">;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n variant?: ButtonVariant;\n}\n\nexport function NativeIconButton({\n accessibilityLabel,\n disabled = false,\n icon,\n onPress,\n size = \"icon\",\n style,\n testID,\n variant = \"ghost\"\n}: NativeIconButtonProps) {\n return (\n <NativeButton\n accessibilityLabel={accessibilityLabel}\n disabled={disabled}\n label=\"\"\n leading={icon}\n onPress={onPress}\n size={size}\n style={[styles.button, style]}\n testID={testID}\n variant={variant}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n button: { paddingHorizontal: 0 }\n});\n","import type { ReactNode } from \"react\";\nimport {\n Pressable,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { type NativeTheme } from \"./tokens\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport interface NativeListRowProps {\n accessibilityLabel?: string;\n description?: ReactNode;\n disabled?: boolean;\n leading?: ReactNode;\n onPress?(): void;\n selected?: boolean;\n style?: StyleProp<ViewStyle>;\n title: string;\n trailing?: ReactNode;\n}\n\nexport function NativeListRow({\n accessibilityLabel,\n description,\n disabled = false,\n leading,\n onPress,\n selected = false,\n style,\n title,\n trailing\n}: NativeListRowProps) {\n const theme = useNativeTheme();\n const styles = createStyles(theme);\n const interactive = onPress !== undefined;\n\n return (\n <Pressable\n accessibilityLabel={accessibilityLabel ?? title}\n accessibilityRole={interactive ? \"button\" : undefined}\n accessibilityState={{ disabled, selected }}\n disabled={!interactive || disabled}\n onPress={onPress}\n style={({ pressed }) => [\n styles.row,\n selected ? styles.selected : undefined,\n pressed && interactive && !disabled ? styles.pressed : undefined,\n disabled ? styles.disabled : undefined,\n style\n ]}\n >\n <View style={styles.content}>\n {selected ? <View style={styles.selectedIndicator} /> : null}\n {leading ? <View style={styles.leading}>{leading}</View> : null}\n <View style={styles.copy}>\n <Text\n numberOfLines={2}\n style={[styles.title, selected ? styles.titleSelected : undefined]}\n >\n {title}\n </Text>\n {typeof description === \"string\" ? (\n <Text numberOfLines={1} style={styles.description}>\n {description}\n </Text>\n ) : description ? (\n <View style={styles.descriptionSlot}>{description}</View>\n ) : null}\n </View>\n {trailing ? <View style={styles.trailing}>{trailing}</View> : null}\n </View>\n </Pressable>\n );\n}\n\nfunction createStyles(theme: NativeTheme) {\n return StyleSheet.create({\n content: {\n alignItems: \"center\",\n flex: 1,\n flexDirection: \"row\",\n minHeight: theme.control.row,\n paddingHorizontal: theme.space.small,\n position: \"relative\",\n width: \"100%\"\n },\n copy: { flex: 1, paddingVertical: theme.space.small },\n description: {\n color: theme.color.muted,\n fontSize: theme.space.small,\n marginTop: theme.space.small / 2\n },\n descriptionSlot: { marginTop: theme.space.small / 2 },\n disabled: { opacity: 0.45 },\n leading: { marginRight: theme.space.small },\n pressed: { opacity: 0.7 },\n row: {\n borderRadius: theme.radius.small,\n minHeight: theme.control.row,\n overflow: \"hidden\"\n },\n selected: { backgroundColor: theme.color.panelRaised },\n selectedIndicator: {\n backgroundColor: theme.color.accent,\n borderRadius: theme.radius.small / 2,\n bottom: theme.radius.small,\n left: 0,\n position: \"absolute\",\n top: theme.radius.small,\n width: theme.radius.small / 2\n },\n title: {\n color: theme.color.textSecondary,\n fontSize: theme.space.medium - 2,\n fontWeight: \"600\",\n lineHeight: theme.space.medium + theme.space.small - 1\n },\n titleSelected: { color: theme.color.text },\n trailing: { marginLeft: theme.space.small }\n });\n}\n","import {\n BottomSheetModal,\n type BottomSheetModalProps\n} from \"@gorhom/bottom-sheet\";\nimport { useEffect, useRef, type ReactNode } from \"react\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport interface NativeSheetProps {\n children: ReactNode;\n onOpenChange(open: boolean): void;\n open: boolean;\n snapPoints?: BottomSheetModalProps[\"snapPoints\"];\n}\n\n/**\n * Controlled modal sheet backed by @gorhom/bottom-sheet.\n *\n * The app root owns BottomSheetModalProvider; callers own whether the sheet is\n * open and what product actions its content performs.\n */\nexport function NativeSheet({\n children,\n onOpenChange,\n open,\n snapPoints\n}: NativeSheetProps) {\n const theme = useNativeTheme();\n const sheet = useRef<BottomSheetModal>(null);\n\n useEffect(() => {\n if (open) {\n sheet.current?.present();\n return;\n }\n\n sheet.current?.dismiss();\n }, [open]);\n\n return (\n <BottomSheetModal\n backgroundStyle={{\n backgroundColor: theme.color.panelRaised,\n borderTopLeftRadius: theme.radius.large,\n borderTopRightRadius: theme.radius.large\n }}\n enableDynamicSizing={snapPoints === undefined}\n handleIndicatorStyle={{ backgroundColor: theme.color.muted }}\n onDismiss={() => onOpenChange(false)}\n ref={sheet}\n snapPoints={snapPoints}\n >\n {children}\n </BottomSheetModal>\n );\n}\n"],"mappings":";AAAA,SAAyB,gBAAgB;AACzC;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACVP;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;;;ACLxB,IAAM,wBAAwB;AAAA,EACnC,SAAS;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,KAAK;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,OAAO;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AACF;AAEO,IAAM,eAAe;AAAA,EAC1B,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,aAAa;AAAA,IACb,eAAe;AAAA,EACjB;AAAA,EACA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AAU,MAAM;AACd,QAAI,MAAM;AACR,YAAM,SAAS,QAAQ;AACvB;AAAA,IACF;AAEA,UAAM,SAAS,QAAQ;AAAA,EACzB,GAAG,CAAC,IAAI,CAAC;AAET,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,iBAAiB;AAAA,QACf,iBAAiB,MAAM,MAAM;AAAA,QAC7B,qBAAqB,MAAM,OAAO;AAAA,QAClC,sBAAsB,MAAM,OAAO;AAAA,MACrC;AAAA,MACA,qBAAqB,eAAe;AAAA,MACpC,sBAAsB,EAAE,iBAAiB,MAAM,MAAM,MAAM;AAAA,MAC3D,WAAW,MAAM,aAAa,KAAK;AAAA,MACnC,KAAK;AAAA,MACL;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":["jsx","styles","StyleSheet","jsx","StyleSheet","Pressable","StyleSheet","Text","View","jsx","jsxs","styles","createStyles","Pressable","View","Text","StyleSheet","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../src/native/button.tsx","../src/native/theme-provider.tsx","../src/native/generated-tokens.ts","../src/native/tokens.ts","../src/native/icon-button.tsx","../src/native/list-row.tsx","../src/native/sheet.tsx"],"sourcesContent":["import { type ReactNode, useState } from \"react\";\nimport {\n ActivityIndicator,\n type GestureResponderEvent,\n Pressable,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { type NativeTheme } from \"./tokens\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"destructive\"\n | \"destructiveGhost\"\n | \"ghost\";\n\nexport type ButtonSize = \"regular\" | \"large\" | \"compact\" | \"icon\";\n\nexport interface NativeButtonProps {\n accessibilityLabel?: string;\n disabled?: boolean;\n label: string;\n leading?: ReactNode;\n loading?: boolean;\n onPress(event: GestureResponderEvent): void;\n size?: ButtonSize;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n variant?: ButtonVariant;\n}\n\n/**\n * Native counterpart of the UI System Button contract.\n *\n * Its interaction hierarchy is adapted from React Native Reusables' Button,\n * while the styling is deliberately token-backed and platform-native.\n */\nexport function NativeButton({\n accessibilityLabel,\n disabled = false,\n label,\n leading,\n loading = false,\n onPress,\n size = \"regular\",\n style,\n testID,\n variant = \"primary\"\n}: NativeButtonProps) {\n const theme = useNativeTheme();\n const styles = createStyles(theme);\n const [pressed, setPressed] = useState(false);\n const unavailable = disabled || loading;\n const foreground = textColorByVariant(theme)[variant];\n const hasLabel = label.trim().length > 0;\n\n return (\n <Pressable\n accessibilityLabel={accessibilityLabel ?? label}\n accessibilityRole=\"button\"\n accessibilityState={{ busy: loading, disabled: unavailable }}\n disabled={unavailable}\n onPress={onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n style={[\n styles.button,\n styles[size],\n variantStyles(theme)[variant],\n pressed && !unavailable ? styles.pressed : undefined,\n unavailable ? styles.disabled : undefined,\n style\n ]}\n testID={testID}\n >\n <View style={styles.content}>\n {loading ? (\n <ActivityIndicator color={foreground} size=\"small\" />\n ) : (\n <>\n {leading ? (\n <View style={[styles.leading, !hasLabel && styles.leadingOnly]}>\n {leading}\n </View>\n ) : null}\n {hasLabel ? (\n <Text\n numberOfLines={1}\n style={[styles.label, { color: foreground }]}\n >\n {label}\n </Text>\n ) : null}\n </>\n )}\n </View>\n </Pressable>\n );\n}\n\nfunction textColorByVariant(theme: NativeTheme): Record<ButtonVariant, string> {\n return {\n primary: theme.color.background,\n secondary: theme.color.text,\n destructive: theme.color.background,\n destructiveGhost: theme.color.danger,\n ghost: theme.color.text\n };\n}\n\nfunction variantStyles(theme: NativeTheme): Record<ButtonVariant, ViewStyle> {\n return {\n primary: { backgroundColor: theme.color.accent },\n secondary: {\n backgroundColor: theme.color.panelRaised,\n borderColor: theme.color.border,\n borderWidth: StyleSheet.hairlineWidth\n },\n destructive: { backgroundColor: theme.color.danger },\n destructiveGhost: { backgroundColor: \"transparent\" },\n ghost: { backgroundColor: \"transparent\" }\n };\n}\n\nfunction createStyles(theme: NativeTheme) {\n return StyleSheet.create({\n button: {\n alignItems: \"center\",\n borderRadius: theme.radius.medium,\n justifyContent: \"center\"\n },\n compact: {\n minHeight: theme.control.compact,\n paddingHorizontal: theme.space.small\n },\n content: {\n alignItems: \"center\",\n flexDirection: \"row\",\n justifyContent: \"center\"\n },\n disabled: { opacity: 0.45 },\n icon: {\n height: theme.control.icon,\n paddingHorizontal: 0,\n width: theme.control.icon\n },\n label: { fontSize: theme.space.medium, fontWeight: \"700\" },\n large: {\n minHeight: theme.control.large,\n paddingHorizontal: theme.space.medium\n },\n leading: { marginRight: theme.space.small },\n leadingOnly: { marginRight: 0 },\n pressed: { opacity: 0.82 },\n regular: {\n minHeight: theme.control.regular,\n paddingHorizontal: theme.space.medium\n }\n });\n}\n","import {\n createContext,\n type PropsWithChildren,\n useContext,\n useMemo\n} from \"react\";\nimport { useColorScheme } from \"react-native\";\nimport {\n nativeTheme,\n resolveNativeTheme,\n type NativeTheme,\n type NativeThemeMode\n} from \"./tokens\";\n\nexport type NativeThemePreference = NativeThemeMode | \"system\";\n\nconst NativeThemeContext = createContext<NativeTheme>(nativeTheme);\n\nexport interface NativeThemeProviderProps extends PropsWithChildren {\n /** Defaults to the operating system preference when no product override exists. */\n mode?: NativeThemePreference;\n}\n\n/**\n * Supplies the resolved Native semantic theme to UI System primitives and\n * application composition. The provider is intentionally UI-only: product\n * settings decide which preference, if any, it receives.\n */\nexport function NativeThemeProvider({\n children,\n mode = \"system\"\n}: NativeThemeProviderProps) {\n const systemMode = useColorScheme();\n const resolvedMode =\n mode === \"system\" ? (systemMode === \"light\" ? \"light\" : \"dark\") : mode;\n const theme = useMemo(() => resolveNativeTheme(resolvedMode), [resolvedMode]);\n\n return (\n <NativeThemeContext.Provider value={theme}>\n {children}\n </NativeThemeContext.Provider>\n );\n}\n\nexport function useNativeTheme(): NativeTheme {\n return useContext(NativeThemeContext);\n}\n","/* This file is generated from ../tokens/renderer-theme.json. Do not edit it directly. */\nexport const nativeThemeDimensions = {\n control: {\n compact: 40,\n icon: 40,\n large: 52,\n regular: 48,\n row: 60\n },\n radius: {\n large: 18,\n medium: 12,\n small: 8\n },\n space: {\n large: 24,\n medium: 16,\n small: 10,\n xlarge: 32\n }\n} as const;\n\nexport const nativeThemes = {\n light: {\n accent: \"#4182f5\",\n accentPressed: \"#3975df\",\n background: \"#f7f8fa\",\n backgroundFronted: \"#ffffff\",\n backgroundPanel: \"#f8fafc\",\n border: \"#e5e7eb\",\n danger: \"#dc2626\",\n foreground: \"#29313d\",\n muted: \"#6b7280\",\n panel: \"#f8f8fa\",\n scrim: \"rgba(0, 0, 0, 0.6)\",\n scrimStrong: \"rgba(0, 0, 0, 0.64)\",\n success: \"#22c55e\",\n textPrimary: \"#3c3c3c\",\n textSecondary: \"#6c6c6c\"\n },\n dark: {\n accent: \"#ff6b4a\",\n accentPressed: \"#eb5839\",\n background: \"#111216\",\n backgroundFronted: \"#22252d\",\n backgroundPanel: \"#1a1c22\",\n border: \"#30333b\",\n danger: \"#ff716c\",\n foreground: \"#f6f6f7\",\n muted: \"#9398a5\",\n panel: \"#1a1c22\",\n scrim: \"rgba(0, 0, 0, 0.6)\",\n scrimStrong: \"rgba(0, 0, 0, 0.64)\",\n success: \"#62d49f\",\n textPrimary: \"#f6f6f7\",\n textSecondary: \"#c3c6ce\"\n }\n} as const;\n\nexport type NativeThemeMode = keyof typeof nativeThemes;\nexport type NativeThemePalette = (typeof nativeThemes)[NativeThemeMode];\n","import {\n nativeThemeDimensions,\n nativeThemes,\n type NativeThemeMode,\n type NativeThemePalette\n} from \"./generated-tokens\";\n\nexport { nativeThemeDimensions, nativeThemes };\nexport type { NativeThemeMode, NativeThemePalette };\n\n/**\n * Resolves a renderer-neutral semantic theme for React Native.\n */\nexport function resolveNativeTheme(mode: NativeThemeMode) {\n const palette = nativeThemes[mode];\n\n return {\n control: nativeThemeDimensions.control,\n color: {\n accent: palette.accent,\n accentPressed: palette.accentPressed,\n background: palette.background,\n border: palette.border,\n danger: palette.danger,\n muted: palette.muted,\n panel: palette.panel,\n panelRaised: palette.backgroundFronted,\n scrim: palette.scrim,\n scrimStrong: palette.scrimStrong,\n success: palette.success,\n text: palette.textPrimary,\n textSecondary: palette.textSecondary\n },\n mode,\n radius: nativeThemeDimensions.radius,\n space: nativeThemeDimensions.space\n } as const;\n}\n\n/**\n * Backwards-compatible dark Native theme.\n *\n * New components should consume the context-backed `useNativeTheme` hook so\n * they respond to the Native renderer's configured color scheme.\n */\nexport const nativeTheme = resolveNativeTheme(\"dark\");\n\nexport type NativeTheme = typeof nativeTheme;\n","import type { ReactNode } from \"react\";\nimport {\n StyleSheet,\n type GestureResponderEvent,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { NativeButton, type ButtonSize, type ButtonVariant } from \"./button\";\n\nexport interface NativeIconButtonProps {\n accessibilityLabel: string;\n disabled?: boolean;\n icon: ReactNode;\n onPress(event: GestureResponderEvent): void;\n size?: Extract<ButtonSize, \"compact\" | \"icon\">;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n variant?: ButtonVariant;\n}\n\nexport function NativeIconButton({\n accessibilityLabel,\n disabled = false,\n icon,\n onPress,\n size = \"icon\",\n style,\n testID,\n variant = \"ghost\"\n}: NativeIconButtonProps) {\n return (\n <NativeButton\n accessibilityLabel={accessibilityLabel}\n disabled={disabled}\n label=\"\"\n leading={icon}\n onPress={onPress}\n size={size}\n style={[styles.button, style]}\n testID={testID}\n variant={variant}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n button: { paddingHorizontal: 0 }\n});\n","import type { ReactNode } from \"react\";\nimport {\n Pressable,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle\n} from \"react-native\";\nimport { type NativeTheme } from \"./tokens\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport interface NativeListRowProps {\n accessibilityLabel?: string;\n description?: ReactNode;\n disabled?: boolean;\n leading?: ReactNode;\n onPress?(): void;\n selected?: boolean;\n style?: StyleProp<ViewStyle>;\n title: string;\n trailing?: ReactNode;\n}\n\nexport function NativeListRow({\n accessibilityLabel,\n description,\n disabled = false,\n leading,\n onPress,\n selected = false,\n style,\n title,\n trailing\n}: NativeListRowProps) {\n const theme = useNativeTheme();\n const styles = createStyles(theme);\n const interactive = onPress !== undefined;\n\n return (\n <Pressable\n accessibilityLabel={accessibilityLabel ?? title}\n accessibilityRole={interactive ? \"button\" : undefined}\n accessibilityState={{ disabled, selected }}\n disabled={!interactive || disabled}\n onPress={onPress}\n style={({ pressed }) => [\n styles.row,\n selected ? styles.selected : undefined,\n pressed && interactive && !disabled ? styles.pressed : undefined,\n disabled ? styles.disabled : undefined,\n style\n ]}\n >\n <View style={styles.content}>\n {selected ? <View style={styles.selectedIndicator} /> : null}\n {leading ? <View style={styles.leading}>{leading}</View> : null}\n <View style={styles.copy}>\n <Text\n numberOfLines={2}\n style={[styles.title, selected ? styles.titleSelected : undefined]}\n >\n {title}\n </Text>\n {typeof description === \"string\" ? (\n <Text numberOfLines={1} style={styles.description}>\n {description}\n </Text>\n ) : description ? (\n <View style={styles.descriptionSlot}>{description}</View>\n ) : null}\n </View>\n {trailing ? <View style={styles.trailing}>{trailing}</View> : null}\n </View>\n </Pressable>\n );\n}\n\nfunction createStyles(theme: NativeTheme) {\n return StyleSheet.create({\n content: {\n alignItems: \"center\",\n flex: 1,\n flexDirection: \"row\",\n minHeight: theme.control.row,\n paddingHorizontal: theme.space.small,\n position: \"relative\",\n width: \"100%\"\n },\n copy: { flex: 1, paddingVertical: theme.space.small },\n description: {\n color: theme.color.muted,\n fontSize: theme.space.small,\n marginTop: theme.space.small / 2\n },\n descriptionSlot: { marginTop: theme.space.small / 2 },\n disabled: { opacity: 0.45 },\n leading: { marginRight: theme.space.small },\n pressed: { opacity: 0.7 },\n row: {\n borderRadius: theme.radius.small,\n minHeight: theme.control.row,\n overflow: \"hidden\"\n },\n selected: { backgroundColor: theme.color.panelRaised },\n selectedIndicator: {\n backgroundColor: theme.color.accent,\n borderRadius: theme.radius.small / 2,\n bottom: theme.radius.small,\n left: 0,\n position: \"absolute\",\n top: theme.radius.small,\n width: theme.radius.small / 2\n },\n title: {\n color: theme.color.textSecondary,\n fontSize: theme.space.medium - 2,\n fontWeight: \"600\",\n lineHeight: theme.space.medium + theme.space.small - 1\n },\n titleSelected: { color: theme.color.text },\n trailing: { marginLeft: theme.space.small }\n });\n}\n","import type { ReactNode } from \"react\";\nimport { Modal, Pressable, StyleSheet, View } from \"react-native\";\nimport { useNativeTheme } from \"./theme-provider\";\n\nexport interface NativeSheetProps {\n children: ReactNode;\n closeAccessibilityLabel: string;\n height?: number | `${number}%`;\n onOpenChange(open: boolean): void;\n open: boolean;\n}\n\n/**\n * Controlled sheet backed by React Native's window-level Modal.\n *\n * Callers own whether the sheet is open and what product actions its content\n * performs.\n */\nexport function NativeSheet({\n children,\n closeAccessibilityLabel,\n height,\n onOpenChange,\n open\n}: NativeSheetProps) {\n const theme = useNativeTheme();\n const styles = createStyles(theme);\n const dismiss = () => onOpenChange(false);\n\n return (\n <Modal\n animationType=\"fade\"\n onRequestClose={dismiss}\n presentationStyle=\"overFullScreen\"\n statusBarTranslucent\n transparent\n visible={open}\n >\n <View\n accessible={false}\n onAccessibilityEscape={dismiss}\n style={styles.backdrop}\n >\n <Pressable\n accessibilityLabel={closeAccessibilityLabel}\n accessibilityRole=\"button\"\n accessible\n onPress={dismiss}\n style={StyleSheet.absoluteFill}\n testID=\"native-sheet-backdrop\"\n />\n <Pressable\n accessible={false}\n onPress={() => undefined}\n style={[styles.sheet, height === undefined ? null : { height }]}\n testID=\"native-sheet-panel\"\n >\n {children}\n </Pressable>\n </View>\n </Modal>\n );\n}\n\nfunction createStyles(theme: ReturnType<typeof useNativeTheme>) {\n return StyleSheet.create({\n backdrop: {\n backgroundColor: theme.color.scrim,\n flex: 1,\n justifyContent: \"flex-end\"\n },\n sheet: {\n backgroundColor: theme.color.panelRaised,\n borderTopLeftRadius: theme.radius.large,\n borderTop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ACK;AAAA,cAAA;AAAA,gBACC,oBAAoB;AAAA,gBACpB,mBAAkB;AAAA,gBAClB,YAAU;AAAA,gBACV,SAAS;AAAA,gBACT,OAAOC,YAAW;AAAA,gBAClB,QAAO;AAAA;AAAA,YACT;AAAA,YACA,gBAAAN;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,YAAY;AAAA,gBACZ,SAAS,MAAM;AAAA,gBACf,OAAO,CAACH,QAAO,OAAO,WAAW,SAAY,OAAO,EAAE,OAAO,CAAC;AAAA,gBAC9D,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,SAASC,cAAa,OAA0C;AAC9D,SAAOG,YAAW,OAAO;AAAA,IACvB,UAAU;AAAA,MACR,iBAAiB,MAAM,MAAM;AAAA,MAC7B,MAAM;AAAA,MACN,gBAAgB;AAAA,IAClB;AAAA,IACA,OAAO;AAAA,MACL,iBAAiB,MAAM,MAAM;AAAA,MAC7B,qBAAqB,MAAM,OAAO;AAAA,MAClC,sBAAsB,MAAM,OAAO;AAAA,MACnC,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF,CAAC;AACH;","names":["jsx","styles","StyleSheet","jsx","StyleSheet","Pressable","StyleSheet","Text","View","jsx","jsxs","styles","createStyles","Pressable","View","Text","StyleSheet","Pressable","StyleSheet","View","jsx","jsxs","styles","createStyles","View","Pressable","StyleSheet"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutti-os/ui-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.237",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"ws": "^8.20.1"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@gorhom/bottom-sheet": "5.2.14",
|
|
90
89
|
"@testing-library/jest-dom": "^6.9.1",
|
|
91
90
|
"@testing-library/react": "^16.3.0",
|
|
92
91
|
"@types/react": "^19.1.6",
|
|
@@ -101,15 +100,11 @@
|
|
|
101
100
|
"@tutti-os/config-tsconfig": "0.0.0"
|
|
102
101
|
},
|
|
103
102
|
"peerDependencies": {
|
|
104
|
-
"@gorhom/bottom-sheet": ">=5 <6",
|
|
105
103
|
"react": "^19.1.0",
|
|
106
104
|
"react-dom": "^19.1.0",
|
|
107
105
|
"react-native": ">=0.86 <0.87"
|
|
108
106
|
},
|
|
109
107
|
"peerDependenciesMeta": {
|
|
110
|
-
"@gorhom/bottom-sheet": {
|
|
111
|
-
"optional": true
|
|
112
|
-
},
|
|
113
108
|
"react-dom": {
|
|
114
109
|
"optional": true
|
|
115
110
|
},
|
package/ui-system.md
CHANGED
|
@@ -95,8 +95,8 @@ The visual language that this package should serve is defined in [Desktop Visual
|
|
|
95
95
|
- `@tutti-os/ui-system/native`
|
|
96
96
|
React Native primitive and semantic-token entry; this is separate from the
|
|
97
97
|
DOM component entry and must not be imported by desktop renderers. Native
|
|
98
|
-
consumers provide React Native
|
|
99
|
-
|
|
98
|
+
consumers provide React Native; `react-dom` is optional for this
|
|
99
|
+
platform-specific entry.
|
|
100
100
|
- `@tutti-os/ui-system/components`
|
|
101
101
|
Stable component barrel for tooling and rare category-focused imports
|
|
102
102
|
- `@tutti-os/ui-system/icons`
|
|
@@ -323,11 +323,14 @@ from experimental status. The gallery must import only the stable
|
|
|
323
323
|
states; it is the Native counterpart of a DOM storyboard example, not a second
|
|
324
324
|
component implementation.
|
|
325
325
|
|
|
326
|
-
`NativeSheet`
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
326
|
+
`NativeSheet` uses React Native's window-level `Modal` for its controlled
|
|
327
|
+
overlay and does not require a portal provider. It owns the semantic scrim,
|
|
328
|
+
bottom-aligned panel, system-back dismissal, screen-reader escape gesture,
|
|
329
|
+
accessible backdrop dismissal, and optional fixed `height`. Callers must supply
|
|
330
|
+
the localized `closeAccessibilityLabel`; one fixed height replaces the former
|
|
331
|
+
single-value `snapPoints` usage. Keep `@gorhom/bottom-sheet` app-owned for
|
|
332
|
+
genuinely complex gesture, keyboard, or multi-snap-point sheets rather than
|
|
333
|
+
routing the shared compact sheet through its React 19-incompatible portal.
|
|
331
334
|
|
|
332
335
|
For cross-surface stacking, use shared semantic `z-index` tokens instead of
|
|
333
336
|
local magic numbers. Current global layer tokens live in
|