@tutti-os/ui-system 0.0.234 → 0.0.236

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/native.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/native/button.tsx
2
+ import { useState } from "react";
2
3
  import {
3
4
  ActivityIndicator,
4
5
  Pressable,
@@ -132,6 +133,7 @@ function NativeButton({
132
133
  }) {
133
134
  const theme = useNativeTheme();
134
135
  const styles2 = createStyles(theme);
136
+ const [pressed, setPressed] = useState(false);
135
137
  const unavailable = disabled || loading;
136
138
  const foreground = textColorByVariant(theme)[variant];
137
139
  const hasLabel = label.trim().length > 0;
@@ -143,7 +145,9 @@ function NativeButton({
143
145
  accessibilityState: { busy: loading, disabled: unavailable },
144
146
  disabled: unavailable,
145
147
  onPress,
146
- style: ({ pressed }) => [
148
+ onPressIn: () => setPressed(true),
149
+ onPressOut: () => setPressed(false),
150
+ style: [
147
151
  styles2.button,
148
152
  styles2[size],
149
153
  variantStyles(theme)[variant],
@@ -152,7 +156,7 @@ function NativeButton({
152
156
  style
153
157
  ],
154
158
  testID,
155
- children: loading ? /* @__PURE__ */ jsx2(ActivityIndicator, { color: foreground, size: "small" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
159
+ children: /* @__PURE__ */ jsx2(View, { style: styles2.content, children: loading ? /* @__PURE__ */ jsx2(ActivityIndicator, { color: foreground, size: "small" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
156
160
  leading ? /* @__PURE__ */ jsx2(View, { style: [styles2.leading, !hasLabel && styles2.leadingOnly], children: leading }) : null,
157
161
  hasLabel ? /* @__PURE__ */ jsx2(
158
162
  Text,
@@ -162,7 +166,7 @@ function NativeButton({
162
166
  children: label
163
167
  }
164
168
  ) : null
165
- ] })
169
+ ] }) })
166
170
  }
167
171
  );
168
172
  }
@@ -193,13 +197,17 @@ function createStyles(theme) {
193
197
  button: {
194
198
  alignItems: "center",
195
199
  borderRadius: theme.radius.medium,
196
- flexDirection: "row",
197
200
  justifyContent: "center"
198
201
  },
199
202
  compact: {
200
203
  minHeight: theme.control.compact,
201
204
  paddingHorizontal: theme.space.small
202
205
  },
206
+ content: {
207
+ alignItems: "center",
208
+ flexDirection: "row",
209
+ justifyContent: "center"
210
+ },
203
211
  disabled: { opacity: 0.45 },
204
212
  icon: {
205
213
  height: theme.control.icon,
@@ -277,7 +285,7 @@ function NativeListRow({
277
285
  const theme = useNativeTheme();
278
286
  const styles2 = createStyles2(theme);
279
287
  const interactive = onPress !== void 0;
280
- return /* @__PURE__ */ jsxs2(
288
+ return /* @__PURE__ */ jsx4(
281
289
  Pressable2,
282
290
  {
283
291
  accessibilityLabel: accessibilityLabel ?? title,
@@ -292,7 +300,7 @@ function NativeListRow({
292
300
  disabled ? styles2.disabled : void 0,
293
301
  style
294
302
  ],
295
- children: [
303
+ children: /* @__PURE__ */ jsxs2(View2, { style: styles2.content, children: [
296
304
  selected ? /* @__PURE__ */ jsx4(View2, { style: styles2.selectedIndicator }) : null,
297
305
  leading ? /* @__PURE__ */ jsx4(View2, { style: styles2.leading, children: leading }) : null,
298
306
  /* @__PURE__ */ jsxs2(View2, { style: styles2.copy, children: [
@@ -307,12 +315,21 @@ function NativeListRow({
307
315
  typeof description === "string" ? /* @__PURE__ */ jsx4(Text2, { numberOfLines: 1, style: styles2.description, children: description }) : description ? /* @__PURE__ */ jsx4(View2, { style: styles2.descriptionSlot, children: description }) : null
308
316
  ] }),
309
317
  trailing ? /* @__PURE__ */ jsx4(View2, { style: styles2.trailing, children: trailing }) : null
310
- ]
318
+ ] })
311
319
  }
312
320
  );
313
321
  }
314
322
  function createStyles2(theme) {
315
323
  return StyleSheet3.create({
324
+ content: {
325
+ alignItems: "center",
326
+ flex: 1,
327
+ flexDirection: "row",
328
+ minHeight: theme.control.row,
329
+ paddingHorizontal: theme.space.small,
330
+ position: "relative",
331
+ width: "100%"
332
+ },
316
333
  copy: { flex: 1, paddingVertical: theme.space.small },
317
334
  description: {
318
335
  color: theme.color.muted,
@@ -324,12 +341,9 @@ function createStyles2(theme) {
324
341
  leading: { marginRight: theme.space.small },
325
342
  pressed: { opacity: 0.7 },
326
343
  row: {
327
- alignItems: "center",
328
344
  borderRadius: theme.radius.small,
329
- flexDirection: "row",
330
345
  minHeight: theme.control.row,
331
- overflow: "hidden",
332
- paddingHorizontal: theme.space.small
346
+ overflow: "hidden"
333
347
  },
334
348
  selected: { backgroundColor: theme.color.panelRaised },
335
349
  selectedIndicator: {
@@ -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 } 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 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 style={({ pressed }) => [\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 {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 </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 flexDirection: \"row\",\n justifyContent: \"center\"\n },\n compact: {\n minHeight: theme.control.compact,\n paddingHorizontal: theme.space.small\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 {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 </Pressable>\n );\n}\n\nfunction createStyles(theme: NativeTheme) {\n return StyleSheet.create({\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 alignItems: \"center\",\n borderRadius: theme.radius.small,\n flexDirection: \"row\",\n minHeight: theme.control.row,\n overflow: \"hidden\",\n paddingHorizontal: theme.space.small\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":";AACA;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,IAC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,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 {\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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AAAA,IACA,eAAe,EAAE,OAAO,MAAM,MAAM,KAAK;AAAA,IACzC,UAAU,EAAE,YAAY,MAAM,MAAM,MAAM;AAAA,EAC5C,CAAC;AACH;;;AC3HA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,WAAW,cAA8B;AAmC9C,gBAAAC,YAAA;AAnBG,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,QAAM,QAAQ,eAAe;AAC7B,QAAM,QAAQ,OAAyB,IAAI;AAE3C,YAAU,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutti-os/ui-system",
3
- "version": "0.0.234",
3
+ "version": "0.0.236",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",