@nori-ui/core 0.0.1

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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/dist/chunk-6NDARMPP.js +389 -0
  4. package/dist/chunk-6NDARMPP.js.map +1 -0
  5. package/dist/chunk-7QVYU63E.js +6 -0
  6. package/dist/chunk-7QVYU63E.js.map +1 -0
  7. package/dist/chunk-BRCCWMGJ.js +3 -0
  8. package/dist/chunk-BRCCWMGJ.js.map +1 -0
  9. package/dist/chunk-FXKIWONG.js +80 -0
  10. package/dist/chunk-FXKIWONG.js.map +1 -0
  11. package/dist/chunk-JGH6Z5LM.js +213 -0
  12. package/dist/chunk-JGH6Z5LM.js.map +1 -0
  13. package/dist/chunk-NDEDMCHT.js +40 -0
  14. package/dist/chunk-NDEDMCHT.js.map +1 -0
  15. package/dist/chunk-RX7UULY3.js +19 -0
  16. package/dist/chunk-RX7UULY3.js.map +1 -0
  17. package/dist/chunk-SSTXLK5I.js +66 -0
  18. package/dist/chunk-SSTXLK5I.js.map +1 -0
  19. package/dist/chunk-XGM2K4TT.js +31 -0
  20. package/dist/chunk-XGM2K4TT.js.map +1 -0
  21. package/dist/client.cjs +861 -0
  22. package/dist/client.cjs.map +1 -0
  23. package/dist/client.d.cts +157 -0
  24. package/dist/client.d.ts +157 -0
  25. package/dist/client.js +50 -0
  26. package/dist/client.js.map +1 -0
  27. package/dist/i18n/index.cjs +70 -0
  28. package/dist/i18n/index.cjs.map +1 -0
  29. package/dist/i18n/index.d.cts +60 -0
  30. package/dist/i18n/index.d.ts +60 -0
  31. package/dist/i18n/index.js +4 -0
  32. package/dist/i18n/index.js.map +1 -0
  33. package/dist/icons/index.cjs +56 -0
  34. package/dist/icons/index.cjs.map +1 -0
  35. package/dist/icons/index.d.cts +38 -0
  36. package/dist/icons/index.d.ts +38 -0
  37. package/dist/icons/index.js +5 -0
  38. package/dist/icons/index.js.map +1 -0
  39. package/dist/index.cjs +820 -0
  40. package/dist/index.cjs.map +1 -0
  41. package/dist/index.d.cts +187 -0
  42. package/dist/index.d.ts +187 -0
  43. package/dist/index.js +11 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/slot/index.cjs +85 -0
  46. package/dist/slot/index.cjs.map +1 -0
  47. package/dist/slot/index.d.cts +13 -0
  48. package/dist/slot/index.d.ts +13 -0
  49. package/dist/slot/index.js +4 -0
  50. package/dist/slot/index.js.map +1 -0
  51. package/dist/stories/story-registry.cjs +612 -0
  52. package/dist/stories/story-registry.cjs.map +1 -0
  53. package/dist/stories/story-registry.d.cts +13 -0
  54. package/dist/stories/story-registry.d.ts +13 -0
  55. package/dist/stories/story-registry.js +105 -0
  56. package/dist/stories/story-registry.js.map +1 -0
  57. package/dist/theme/index.cjs +216 -0
  58. package/dist/theme/index.cjs.map +1 -0
  59. package/dist/theme/index.d.cts +1 -0
  60. package/dist/theme/index.d.ts +1 -0
  61. package/dist/theme/index.js +4 -0
  62. package/dist/theme/index.js.map +1 -0
  63. package/dist/utils/cn.cjs +34 -0
  64. package/dist/utils/cn.cjs.map +1 -0
  65. package/dist/utils/cn.d.cts +4 -0
  66. package/dist/utils/cn.d.ts +4 -0
  67. package/dist/utils/cn.js +4 -0
  68. package/dist/utils/cn.js.map +1 -0
  69. package/package.json +122 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/i18n/default-dictionary.ts","../src/i18n/resolve.ts","../src/i18n/context.tsx","../src/i18n/use-translation.ts","../src/icons/default-semantic-icons.tsx","../src/icons/semantic-context.tsx","../src/icons/use-semantic-icon.ts","../src/utils/cn.ts","../src/components/Box/Box.tsx","../src/slot/compose-refs.ts","../src/slot/slot.tsx","../src/components/Spinner/Spinner.tsx","../src/components/Button/Button.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/HStack/HStack.tsx","../src/components/Switch/Switch.tsx","../src/components/Text/Text.tsx","../src/components/TextInput/TextInput.tsx","../src/components/TextArea/TextArea.tsx","../src/components/VStack/VStack.tsx","../src/icons/icon.tsx","../../tokens/build/theme.ts","../src/theme/context.tsx","../src/provider/nori-provider.tsx","../src/theme/use-theme.ts"],"names":["createContext","useMemo","jsx","useContext","View","forwardRef","Slot","isValidElement","Children","cloneElement","ActivityIndicator","Button","jsxs","Pressable","RNText","useState","useCallback","VARIANT_CLASSES","useId","RNTextInput","ALIGN_CLASS","JUSTIFY_CLASS","SIZE_MAP","theme"],"mappings":";;;;;;;;;;AAWO,IAAM,iBAAA,GAAgC;AAAA;AAAA,EAEzC,eAAA,EAAiB,QAAA;AAAA,EACjB,gBAAA,EAAkB,SAAA;AAAA,EAClB,cAAA,EAAgB,OAAA;AAAA,EAChB,aAAA,EAAe,MAAA;AAAA,EACf,gBAAA,EAAkB,SAAA;AAAA,EAClB,cAAA,EAAgB,sBAAA;AAAA,EAChB,cAAA,EAAgB,WAAA;AAAA;AAAA,EAGhB,qBAAA,EAAuB,SAAA;AAAA;AAAA,EAGvB,aAAA,EAAe,OAAA;AAAA,EACf,oBAAA,EAAsB,eAAA;AAAA,EACtB,oBAAA,EAAsB,eAAA;AAAA;AAAA,EAGtB,kBAAA,EAAoB,SAAA;AAAA,EACpB,oBAAA,EAAsB,WAAA;AAAA,EACtB,WAAA,EAAa,IAAA;AAAA,EACb,YAAA,EAAc;AAClB;;;ACrBO,SAAS,WAAA,CAAY,OAAkB,QAAA,EAAmC;AAC7E,EAAA,IAAI,OAAO,UAAU,UAAA,EAAY;AAI7B,IAAA,OAAO,CAAC,SAAA,EAAW,OAAA,KAAY,KAAA,CAAM,WAAW,OAAO,CAAA;AAAA,EAC3D;AAEA,EAAA,MAAM,IAAA,GAAO,SAAS,EAAC;AAEvB,EAAA,OAAO,CAAC,WAAW,OAAA,KAAY;AAC3B,IAAA,MAAM,OAAO,KAAA,CAAM,OAAA,CAAQ,SAAS,CAAA,GAAI,SAAA,GAAY,CAAC,SAAS,CAAA;AAC9D,IAAA,KAAA,MAAW,UAAU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AAA,EAAA,EAAe,GAAG,UAAA,EACf,0BAAAA,cAAAA,CAAC,YAAA,EAAA,EAAc,GAAG,SAAA,EACd,0BAAAA,cAAAA,CAAC,qBAAA,EAAA,EAAuB,GAAG,UAAA,EAAa,QAAA,EAAS,GACrD,CAAA,EACJ,CAAA;AAER;AAbgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA;ACjBT,SAAS,QAAA,GAAW;AACvB,EAAA,OAAOC,iBAAW,YAAY,CAAA;AAClC;AAFgB,MAAA,CAAA,QAAA,EAAA,UAAA,CAAA","file":"client.cjs","sourcesContent":["import type { Dictionary } from './types';\n\n/**\n * Default English strings used by library components.\n *\n * Key naming convention:\n * <component>.<purpose>[_plural-form]\n *\n * Plural suffixes follow i18next: `_zero`, `_one`, `_two`, `_few`, `_many`, `_other`.\n * Interpolation uses `{{name}}` — double braces, no spaces, by convention.\n */\nexport const defaultDictionary: Dictionary = {\n // generic / shared\n 'common.cancel': 'Cancel',\n 'common.confirm': 'Confirm',\n 'common.close': 'Close',\n 'common.back': 'Back',\n 'common.loading': 'Loading',\n 'common.error': 'Something went wrong',\n 'common.retry': 'Try again',\n\n // button\n 'button.loadingLabel': 'Loading',\n\n // input\n 'input.clear': 'Clear',\n 'input.passwordShow': 'Show password',\n 'input.passwordHide': 'Hide password',\n\n // checkbox / switch\n 'checkbox.checked': 'Checked',\n 'checkbox.unchecked': 'Unchecked',\n 'switch.on': 'On',\n 'switch.off': 'Off',\n};\n","import type { Dictionary, I18nInput, I18nOptions, TranslateFn } from './types';\n\n/**\n * Normalizes the consumer's i18n input (undefined | dictionary | function) into a\n * uniform TranslateFn. Internal code only calls the returned function.\n *\n * Precedence for a given key lookup:\n * 1. consumer function (if provided) — called verbatim, no further fallback\n * 2. consumer dictionary (if provided)\n * 3. library defaults\n * 4. options.defaultValue\n * 5. the key itself (so missing strings are visible in dev, not silent)\n */\nexport function resolveI18n(input: I18nInput, defaults: Dictionary): TranslateFn {\n if (typeof input === 'function') {\n // Wrap so the consumer fn is always invoked with (key, options) — enables\n // Jest `toHaveBeenCalledWith(key, undefined)` assertions and mirrors i18next's\n // own call signature exactly.\n return (keyOrKeys, options) => input(keyOrKeys, options);\n }\n\n const dict = input ?? {};\n\n return (keyOrKeys, options) => {\n const keys = Array.isArray(keyOrKeys) ? keyOrKeys : [keyOrKeys];\n for (const rawKey of keys) {\n const key = pluralize(rawKey, options?.count);\n const template = dict[key] ?? defaults[key];\n if (template !== undefined) {\n return interpolate(template, options);\n }\n }\n // exhausted the key list\n const lastKey = keys[keys.length - 1];\n if (options?.defaultValue !== undefined) {\n return interpolate(options.defaultValue, options);\n }\n return lastKey ?? '';\n };\n}\n\nfunction pluralize(key: string, count: number | undefined): string {\n if (count === undefined) return key;\n // Minimal English pluralization — extend with ICU rules later if needed.\n if (count === 1) return `${key}_one`;\n return `${key}_other`;\n}\n\nfunction interpolate(template: string, options: I18nOptions | undefined): string {\n if (!options) return template;\n return template.replace(/\\{\\{\\s*([A-Za-z0-9_.-]+)\\s*\\}\\}/g, (_match, name: string) => {\n const value = options[name];\n return value === undefined || value === null ? '' : String(value);\n });\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { createContext, useMemo } from 'react';\nimport { defaultDictionary } from './default-dictionary';\nimport { resolveI18n } from './resolve';\nimport type { I18nInput, TranslateFn } from './types';\n\nexport type I18nContextValue = {\n t: TranslateFn;\n};\n\n// Default context value uses the built-in English dictionary; consumers without\n// a provider still get a working t().\nconst defaultValue: I18nContextValue = {\n t: resolveI18n(undefined, defaultDictionary),\n};\n\nexport const I18nContext = createContext<I18nContextValue>(defaultValue);\nI18nContext.displayName = 'I18nContext';\n\nexport type I18nProviderProps = {\n i18n?: I18nInput;\n children?: ReactNode;\n};\n\nexport function I18nProvider({ i18n, children }: I18nProviderProps) {\n const value = useMemo<I18nContextValue>(() => ({ t: resolveI18n(i18n, defaultDictionary) }), [i18n]);\n return <I18nContext.Provider value={value}>{children}</I18nContext.Provider>;\n}\n","'use client';\n\nimport { useContext } from 'react';\nimport { I18nContext, type I18nContextValue } from './context';\n\nexport function useTranslation(): I18nContextValue {\n return useContext(I18nContext);\n}\n","// default-semantic-icons — minimal built-in SVG placeholders for internal\n// library glyphs. Consumers can swap each one via the provider:\n//\n// <NoriProvider icons={{ checkmark: MyCheck, close: MyX }}>\n//\n// These defaults exist so the library renders usable UI out of the box even when\n// lucide-react(-native) is not installed. They are NOT intended to compete with\n// Lucide on style — override them to match your design system.\n\nimport type { ComponentType } from 'react';\nimport type { IconComponentProps } from './icon';\n\ntype SemanticIcon = ComponentType<IconComponentProps>;\n\nconst make = (path: string): SemanticIcon =>\n function PlaceholderIcon({ size = 20, color = 'currentColor' }) {\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d={path} />\n </svg>\n );\n };\n\nexport type SemanticIcons = {\n checkmark: SemanticIcon;\n close: SemanticIcon;\n eye: SemanticIcon;\n eyeOff: SemanticIcon;\n chevronDown: SemanticIcon;\n chevronUp: SemanticIcon;\n alertTriangle: SemanticIcon;\n info: SemanticIcon;\n check: SemanticIcon;\n x: SemanticIcon;\n};\n\nexport const defaultSemanticIcons: SemanticIcons = {\n checkmark: make('M20 6 9 17l-5-5'),\n close: make('M18 6 6 18 M6 6l12 12'),\n eye: make('M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'),\n eyeOff: make('M17.94 17.94A10 10 0 0 1 2 12s3.5-7 10-7c2 0 3.8.6 5.4 1.5 M1 1l22 22'),\n chevronDown: make('m6 9 6 6 6-6'),\n chevronUp: make('m18 15-6-6-6 6'),\n alertTriangle: make(\n 'M12 9v4 M12 17h.01 M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'\n ),\n info: make(\n 'M12 8h.01 M11 12h1v4h1 M12 22C6.48 22 2 17.52 2 12 2 6.48 6.48 2 12 2c5.52 0 10 4.48 10 10 0 5.52-4.48 10-10 10z'\n ),\n check: make('M20 6 9 17l-5-5'),\n x: make('M18 6 6 18 M6 6l12 12'),\n};\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { createContext } from 'react';\nimport { defaultSemanticIcons, type SemanticIcons } from './default-semantic-icons';\n\nexport const SemanticIconsContext = createContext<SemanticIcons>(defaultSemanticIcons);\nSemanticIconsContext.displayName = 'SemanticIconsContext';\n\nexport type SemanticIconsProviderProps = {\n icons?: Partial<SemanticIcons>;\n children?: ReactNode;\n};\n\nexport function SemanticIconsProvider({ icons, children }: SemanticIconsProviderProps) {\n const merged: SemanticIcons = icons ? { ...defaultSemanticIcons, ...icons } : defaultSemanticIcons;\n return <SemanticIconsContext.Provider value={merged}>{children}</SemanticIconsContext.Provider>;\n}\n","'use client';\n\nimport { useContext } from 'react';\nimport type { SemanticIcons } from './default-semantic-icons';\nimport { SemanticIconsContext } from './semantic-context';\n\nexport function useSemanticIcon<K extends keyof SemanticIcons>(name: K): SemanticIcons[K] {\n const icons = useContext(SemanticIconsContext);\n return icons[name];\n}\n","// cn — class-name merger. clsx-compatible shape.\n//\n// Intentionally does NOT deduplicate Tailwind conflicts (e.g. \"text-sm text-lg\").\n// That's `tailwind-merge`'s job; we defer adding it until a component actually\n// needs it, to keep the core tree-shakable and the runtime zero-dep.\n\nexport type ClassInput =\n | string\n | number\n | boolean\n | null\n | undefined\n | ClassInput[]\n | Record<string, boolean | number | null | undefined>;\n\nexport function cn(...inputs: ClassInput[]): string {\n const out: string[] = [];\n for (const input of inputs) append(out, input);\n return out.join(' ');\n}\n\nfunction append(out: string[], input: ClassInput): void {\n if (!input) return;\n if (typeof input === 'string') {\n if (input.length > 0) out.push(input);\n return;\n }\n if (typeof input === 'number') return; // numbers are never class names\n if (Array.isArray(input)) {\n for (const inner of input) append(out, inner);\n return;\n }\n if (typeof input === 'object') {\n for (const key of Object.keys(input)) {\n if (input[key]) out.push(key);\n }\n }\n}\n","import type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\nimport { cn } from '../../utils/cn';\n\nexport type BoxProps = ViewProps & {\n className?: string;\n testID?: string;\n};\n\n/**\n * Generic layout primitive. Wraps react-native's <View> with className support.\n * RSC-safe.\n */\nexport function Box({ className, children, ...rest }: BoxProps) {\n return (\n <View {...rest} className={cn(className)}>\n {children}\n </View>\n );\n}\n","// composeRefs — merges multiple React refs (callback or object) into a single callback.\n// Derived from Radix UI's approach; reimplemented here so we don't take a Radix dependency.\n\nimport type { MutableRefObject, Ref, RefCallback } from 'react';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (ref == null) continue;\n if (typeof ref === 'function') {\n ref(node);\n } else {\n // React's MutableRefObject typing — we assign .current directly.\n (ref as MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n","import type { CSSProperties, ReactElement, Ref } from 'react';\nimport { Children, cloneElement, forwardRef, isValidElement } from 'react';\nimport { composeRefs } from './compose-refs';\n\ntype AnyProps = Record<string, unknown>;\n\nexport type SlotProps = {\n children?: React.ReactNode;\n} & AnyProps;\n\nexport const Slot = forwardRef<unknown, SlotProps>(function Slot(props, forwardedRef) {\n const { children, ...slotProps } = props;\n\n if (!isValidElement(children)) {\n return null;\n }\n\n // Assert that children is a single React element with props — we've narrowed above.\n const child = Children.only(children) as ReactElement<AnyProps> & { ref?: Ref<unknown> };\n const merged = mergeProps(slotProps, child.props);\n\n // Merge refs: Slot's forwarded ref + the child's own ref (if any).\n const childRef = (child as unknown as { ref?: Ref<unknown> }).ref;\n if (forwardedRef || childRef) {\n (merged as AnyProps).ref = composeRefs(forwardedRef, childRef);\n }\n\n return cloneElement(child, merged);\n});\nSlot.displayName = 'Slot';\n\nfunction mergeProps(outer: AnyProps, inner: AnyProps): AnyProps {\n // Inner (child) wins for everything except: className (concatenated), style (merged), and\n // event handlers (composed — outer runs first, then inner).\n const merged: AnyProps = { ...outer };\n\n for (const key of Object.keys(inner)) {\n const outerValue = outer[key];\n const innerValue = inner[key];\n\n if (key === 'className' || key === 'class') {\n merged[key] = joinClass(outerValue, innerValue);\n continue;\n }\n\n if (key === 'style') {\n merged[key] = {\n ...(outerValue as CSSProperties | undefined),\n ...(innerValue as CSSProperties | undefined),\n };\n continue;\n }\n\n if (isEventHandler(key, outerValue, innerValue)) {\n merged[key] = composeHandlers(outerValue as Fn, innerValue as Fn);\n continue;\n }\n\n merged[key] = innerValue;\n }\n\n return merged;\n}\n\nfunction joinClass(outer: unknown, inner: unknown): string | undefined {\n const a = typeof outer === 'string' ? outer : '';\n const b = typeof inner === 'string' ? inner : '';\n const joined = [a, b].filter(Boolean).join(' ');\n return joined.length > 0 ? joined : undefined;\n}\n\ntype Fn = (...args: unknown[]) => unknown;\n\nfunction isEventHandler(key: string, outer: unknown, inner: unknown): boolean {\n if (!key.startsWith('on') || key.length < 3) return false;\n if (key[2] !== key[2]?.toUpperCase()) return false;\n return typeof outer === 'function' && typeof inner === 'function';\n}\n\nfunction composeHandlers(outer: Fn, inner: Fn): Fn {\n return (...args: unknown[]) => {\n outer(...args);\n inner(...args);\n };\n}\n","import type { ActivityIndicatorProps } from 'react-native';\nimport { ActivityIndicator } from 'react-native';\n\nexport type SpinnerSize = 'sm' | 'md' | 'lg' | 'xl' | number;\n\nexport type SpinnerProps = Omit<ActivityIndicatorProps, 'size'> & {\n /** Visible (a11y) label. Defaults to the i18n \"common.loading\" default (\"Loading\"). */\n label?: string;\n size?: SpinnerSize;\n testID?: string;\n className?: string;\n};\n\nconst SIZE_MAP: Record<Exclude<SpinnerSize, number>, number> = {\n sm: 12,\n md: 16,\n lg: 24,\n xl: 32,\n};\n\n/**\n * Loading indicator.\n *\n * a11y: rendered with `role=\"progressbar\"` and an `aria-label` so screen\n * readers announce it. Respects `prefers-reduced-motion` — on web, react-native-web's\n * ActivityIndicator will render without animation when the media query matches;\n * on native, React Native's ActivityIndicator honors the OS reduce-motion setting\n * automatically.\n *\n * RSC-safe: pure render, no hooks.\n */\nexport function Spinner({ label = 'Loading', size = 'md', testID, color, style, ...rest }: SpinnerProps) {\n const px = typeof size === 'number' ? size : SIZE_MAP[size];\n return (\n <ActivityIndicator\n {...rest}\n {...(testID !== undefined ? { testID } : {})}\n accessibilityRole=\"progressbar\"\n accessibilityLabel={label}\n {...(color !== undefined ? { color } : {})}\n size={px}\n style={[{ width: px, height: px }, style]}\n />\n );\n}\n","import type { ComponentType, ReactNode } from 'react';\nimport { forwardRef } from 'react';\nimport type { PressableProps } from 'react-native';\nimport { Pressable, Text as RNText } from 'react-native';\nimport { Slot } from '../../slot';\nimport { cn } from '../../utils/cn';\nimport { Spinner } from '../Spinner';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\ntype IconSlot = ComponentType<{ size?: number; color?: string }>;\n\nexport type ButtonProps = Omit<PressableProps, 'disabled' | 'children'> & {\n children?: ReactNode;\n variant?: ButtonVariant;\n size?: ButtonSize;\n disabled?: boolean;\n loading?: boolean;\n leadingIcon?: IconSlot;\n trailingIcon?: IconSlot;\n /** If true, the single child becomes the interactive element (Slot pattern). */\n asChild?: boolean;\n className?: string;\n testID?: string;\n};\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n primary:\n 'bg-semantic-interactive-primary hover:bg-semantic-interactive-primaryHover active:bg-semantic-interactive-primaryPressed',\n secondary: 'bg-neutral-100 hover:bg-neutral-200 active:bg-neutral-300',\n ghost: 'bg-transparent hover:bg-neutral-100 active:bg-neutral-200',\n destructive: 'bg-semantic-interactive-destructive hover:opacity-90 active:opacity-80',\n};\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n sm: 'h-8 px-3 text-sm',\n md: 'h-10 px-4 text-md',\n lg: 'h-12 px-5 text-lg',\n};\n\nconst ICON_SIZE: Record<ButtonSize, number> = { sm: 14, md: 16, lg: 20 };\n\nconst BASE_CLASSES = 'inline-flex flex-row items-center justify-center gap-2 rounded-md select-none';\n\nexport const Button = forwardRef<unknown, ButtonProps>(function Button(\n {\n children,\n variant = 'primary',\n size = 'md',\n disabled,\n loading,\n leadingIcon: LeadingIcon,\n trailingIcon: TrailingIcon,\n asChild,\n className,\n onPress,\n testID,\n ...rest\n },\n forwardedRef\n) {\n const isInoperative = Boolean(disabled) || Boolean(loading);\n const classes = cn(\n BASE_CLASSES,\n VARIANT_CLASSES[variant],\n SIZE_CLASSES[size],\n isInoperative ? 'opacity-60' : undefined,\n className\n );\n\n const handlePress: NonNullable<PressableProps['onPress']> = (ev) => {\n if (isInoperative) return;\n onPress?.(ev);\n };\n\n if (asChild) {\n const slotProps: Record<string, unknown> = {\n ref: forwardedRef,\n className: classes,\n onClick: handlePress as unknown as (...args: unknown[]) => unknown,\n ...rest,\n };\n if (isInoperative) slotProps['aria-disabled'] = true;\n if (loading) slotProps['aria-busy'] = true;\n if (testID !== undefined) slotProps['data-testid'] = testID;\n return <Slot {...slotProps}>{children}</Slot>;\n }\n\n const pressableExtra: Record<string, unknown> = {};\n if (isInoperative) pressableExtra['aria-disabled'] = true;\n if (loading) pressableExtra['aria-busy'] = true;\n\n return (\n <Pressable\n ref={forwardedRef as never}\n {...(testID !== undefined ? { testID } : {})}\n role=\"button\"\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: isInoperative, busy: Boolean(loading) }}\n disabled={isInoperative}\n onPress={handlePress}\n className={classes}\n {...pressableExtra}\n {...rest}\n >\n {loading ? (\n <Spinner size={ICON_SIZE[size]} label=\"Loading\" />\n ) : LeadingIcon ? (\n <LeadingIcon size={ICON_SIZE[size]} />\n ) : null}\n <RNText className={cn('font-medium', SIZE_CLASSES[size].includes('text-') ? undefined : 'text-md')}>\n {children}\n </RNText>\n {TrailingIcon ? <TrailingIcon size={ICON_SIZE[size]} /> : null}\n </Pressable>\n );\n});\nButton.displayName = 'Button';\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { useCallback, useState } from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSemanticIcon } from '../../icons/use-semantic-icon';\nimport { Slot } from '../../slot';\nimport { cn } from '../../utils/cn';\n\nexport type CheckboxProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n indeterminate?: boolean;\n disabled?: boolean;\n onChange?: (next: boolean) => void;\n label?: string;\n className?: string;\n testID?: string;\n asChild?: boolean;\n children?: ReactNode;\n};\n\n/**\n * Checkbox — supports controlled + uncontrolled state, indeterminate (aria-checked=\"mixed\"),\n * asChild (via Slot), and a visible label that doubles as the accessibility label.\n */\nexport function Checkbox({\n checked,\n defaultChecked = false,\n indeterminate,\n disabled,\n onChange,\n label,\n className,\n testID,\n asChild,\n children,\n}: CheckboxProps) {\n const [inner, setInner] = useState<boolean>(defaultChecked);\n const isControlled = checked !== undefined;\n const value = isControlled ? Boolean(checked) : inner;\n\n const ariaChecked: 'true' | 'false' | 'mixed' = indeterminate ? 'mixed' : value ? 'true' : 'false';\n\n const toggle = useCallback(() => {\n if (disabled) return;\n const next = !value;\n if (!isControlled) setInner(next);\n onChange?.(next);\n }, [disabled, value, isControlled, onChange]);\n\n const Check = useSemanticIcon('checkmark');\n\n const commonProps: Record<string, unknown> = {\n role: 'checkbox',\n 'aria-checked': ariaChecked,\n accessibilityRole: 'checkbox' as const,\n accessibilityState: { checked: value, disabled: Boolean(disabled) },\n testID,\n };\n if (disabled) commonProps['aria-disabled'] = true;\n if (label !== undefined) {\n commonProps['aria-label'] = label;\n commonProps.accessibilityLabel = label;\n }\n\n if (asChild) {\n const slotProps: Record<string, unknown> = {\n role: 'checkbox',\n 'aria-checked': ariaChecked,\n onClick: toggle,\n };\n if (disabled) slotProps['aria-disabled'] = true;\n if (label !== undefined) slotProps['aria-label'] = label;\n if (testID !== undefined) slotProps['data-testid'] = testID;\n if (className !== undefined) slotProps.className = className;\n return <Slot {...slotProps}>{children}</Slot>;\n }\n\n const boxClasses = cn('w-5 h-5 rounded-sm border border-semantic-border-strong items-center justify-center');\n\n return (\n <View className={cn('flex-row items-center gap-2', disabled ? 'opacity-60' : undefined, className)}>\n <Pressable onPress={toggle} {...commonProps} className={boxClasses}>\n {(value || indeterminate) && !disabled ? <Check size={14} color=\"currentColor\" /> : null}\n </Pressable>\n {children ?? (label !== undefined ? <View>{label}</View> : null)}\n </View>\n );\n}\n","import type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\nimport { cn } from '../../utils/cn';\n\nexport type StackGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12;\nexport type StackAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';\nexport type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';\n\nexport type HStackProps = ViewProps & {\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n className?: string;\n testID?: string;\n};\n\nconst ALIGN_CLASS: Record<StackAlign, string> = {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n};\n\nconst JUSTIFY_CLASS: Record<StackJustify, string> = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n};\n\n/**\n * Horizontal flex layout primitive. RSC-safe.\n */\nexport function HStack({ gap, align, justify, className, children, ...rest }: HStackProps) {\n return (\n <View\n {...rest}\n className={cn(\n 'flex-row',\n gap !== undefined && gap !== 0 ? `gap-${gap}` : undefined,\n align !== undefined ? ALIGN_CLASS[align] : undefined,\n justify !== undefined ? JUSTIFY_CLASS[justify] : undefined,\n className\n )}\n >\n {children}\n </View>\n );\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { useCallback, useState } from 'react';\nimport { Pressable, Text as RNText, View } from 'react-native';\nimport { Slot } from '../../slot';\nimport { cn } from '../../utils/cn';\n\nexport type SwitchProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n onChange?: (next: boolean) => void;\n label?: string;\n className?: string;\n testID?: string;\n asChild?: boolean;\n children?: ReactNode;\n};\n\n/**\n * Switch — a toggle control with role=\"switch\". Supports controlled + uncontrolled,\n * disabled state, asChild (via Slot), and a visible label that doubles as the\n * accessibility label.\n */\nexport function Switch({\n checked,\n defaultChecked = false,\n disabled,\n onChange,\n label,\n className,\n testID,\n asChild,\n children,\n}: SwitchProps) {\n const [inner, setInner] = useState<boolean>(defaultChecked);\n const isControlled = checked !== undefined;\n const value = isControlled ? Boolean(checked) : inner;\n\n const toggle = useCallback(() => {\n if (disabled) return;\n const next = !value;\n if (!isControlled) setInner(next);\n onChange?.(next);\n }, [disabled, value, isControlled, onChange]);\n\n const ariaChecked: 'true' | 'false' = value ? 'true' : 'false';\n\n const commonProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n accessibilityRole: 'switch' as const,\n accessibilityState: { checked: value, disabled: Boolean(disabled) },\n testID,\n };\n if (disabled) commonProps['aria-disabled'] = true;\n if (label !== undefined) {\n commonProps['aria-label'] = label;\n commonProps.accessibilityLabel = label;\n }\n\n if (asChild) {\n const slotProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n onClick: toggle,\n };\n if (disabled) slotProps['aria-disabled'] = true;\n if (label !== undefined) slotProps['aria-label'] = label;\n if (testID !== undefined) slotProps['data-testid'] = testID;\n if (className !== undefined) slotProps.className = className;\n return <Slot {...slotProps}>{children}</Slot>;\n }\n\n const trackClasses = cn(\n 'w-10 h-6 rounded-full justify-center px-0.5 transition-colors',\n value ? 'bg-semantic-interactive-primary' : 'bg-neutral-300',\n disabled ? 'opacity-60' : undefined\n );\n const thumbClasses = cn('w-5 h-5 rounded-full bg-white shadow-sm', value ? 'self-end' : 'self-start');\n\n return (\n <View className={cn('flex-row items-center gap-2', className)}>\n <Pressable onPress={toggle} {...commonProps} className={trackClasses}>\n <View className={thumbClasses} />\n </Pressable>\n {label ? <RNText className=\"text-md text-semantic-text-default\">{label}</RNText> : null}\n {children}\n </View>\n );\n}\n","import type { TextProps as RNTextProps } from 'react-native';\nimport { Text as RNText } from 'react-native';\nimport { cn } from '../../utils/cn';\n\nexport type TextVariant = 'body-xs' | 'body-sm' | 'body-md' | 'body-lg' | 'heading-1' | 'heading-2' | 'heading-3';\n\nexport type TextProps = RNTextProps & {\n variant?: TextVariant;\n className?: string;\n testID?: string;\n};\n\nconst VARIANT_CLASSES: Record<TextVariant, string> = {\n 'body-xs': 'text-xs leading-normal',\n 'body-sm': 'text-sm leading-normal',\n 'body-md': 'text-md leading-normal',\n 'body-lg': 'text-lg leading-relaxed',\n 'heading-1': 'text-4xl leading-tight font-bold',\n 'heading-2': 'text-3xl leading-tight font-semibold',\n 'heading-3': 'text-2xl leading-tight font-semibold',\n};\n\nconst HEADING_VARIANTS: Readonly<Set<TextVariant>> = new Set(['heading-1', 'heading-2', 'heading-3']);\n\n/**\n * Typography primitive. Renders a react-native <Text>; on web via RN-Web\n * it becomes a <div role=\"...\"> with the appropriate className.\n *\n * RSC-safe: pure render, no hooks.\n */\nexport function Text({ variant = 'body-md', className, testID, children, ...rest }: TextProps) {\n const isHeading = HEADING_VARIANTS.has(variant);\n const role = isHeading ? 'header' : rest.accessibilityRole;\n return (\n <RNText\n testID={testID}\n {...rest}\n {...(role !== undefined ? { accessibilityRole: role } : {})}\n className={cn(VARIANT_CLASSES[variant], className)}\n >\n {children}\n </RNText>\n );\n}\n","import type { ReactNode } from 'react';\nimport { useId } from 'react';\nimport type { TextInputProps as RNTextInputProps } from 'react-native';\nimport { Text as RNText, TextInput as RNTextInput, View } from 'react-native';\nimport { cn } from '../../utils/cn';\n\nexport type TextInputProps = Omit<RNTextInputProps, 'editable'> & {\n label?: string;\n helperText?: string;\n error?: string;\n disabled?: boolean;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Pass through a custom wrapper className */\n containerClassName?: string;\n className?: string;\n testID?: string;\n /** Controlled text handler. Optional so uncontrolled usage works too. */\n onChangeText?: (text: string) => void;\n /** Multi-line mode — flipped by TextArea. Default false. */\n multiline?: boolean;\n numberOfLines?: number;\n};\n\n/**\n * Single-line text input with label, helper, error, and leading/trailing slots.\n *\n * a11y: label is a <label for={id}>; the input is `aria-invalid=true` + labelled\n * by the error/helper text via aria-describedby when present.\n *\n * Notionally RSC-safe — uses only useId() which React 19 guarantees is safe on\n * the server. No \"use client\" required.\n */\nexport function TextInput({\n label,\n helperText,\n error,\n disabled,\n leading,\n trailing,\n containerClassName,\n className,\n testID,\n onChangeText,\n multiline,\n numberOfLines,\n ...rest\n}: TextInputProps) {\n const reactId = useId();\n const inputId = testID ?? `nori-ui-input-${reactId}`;\n const describeId = `${inputId}-describe`;\n const hasError = Boolean(error);\n const describedBy = error || helperText ? describeId : undefined;\n\n const inputExtras: Record<string, unknown> = {};\n if (testID !== undefined) inputExtras.testID = testID;\n if (label !== undefined) inputExtras.accessibilityLabel = label;\n if (hasError) inputExtras['aria-invalid'] = true;\n if (describedBy !== undefined) inputExtras['aria-describedby'] = describedBy;\n if (multiline !== undefined) inputExtras.multiline = multiline;\n if (numberOfLines !== undefined) inputExtras.numberOfLines = numberOfLines;\n if (onChangeText !== undefined) inputExtras.onChangeText = onChangeText;\n\n return (\n <View className={cn('flex flex-col gap-1', containerClassName)}>\n {label !== undefined ? (\n <label htmlFor={inputId} className=\"text-sm font-medium text-semantic-text-default\">\n {label}\n </label>\n ) : null}\n <View\n className={cn(\n 'flex-row items-center rounded-md border px-3',\n hasError ? 'border-semantic-interactive-destructive' : 'border-semantic-border-default',\n disabled ? 'opacity-60' : undefined\n )}\n >\n {leading ? <View className=\"mr-2\">{leading}</View> : null}\n <RNTextInput\n nativeID={inputId}\n editable={!disabled}\n className={cn('flex-1 py-2 text-md text-semantic-text-default outline-none', className)}\n {...inputExtras}\n {...rest}\n />\n {trailing ? <View className=\"ml-2\">{trailing}</View> : null}\n </View>\n {error ? (\n <RNText nativeID={describeId} className=\"text-sm text-semantic-interactive-destructive\">\n {error}\n </RNText>\n ) : helperText ? (\n <RNText nativeID={describeId} className=\"text-sm text-semantic-text-muted\">\n {helperText}\n </RNText>\n ) : null}\n </View>\n );\n}\n","import type { TextInputProps } from '../TextInput';\nimport { TextInput } from '../TextInput';\n\nexport type TextAreaProps = TextInputProps;\n\n/**\n * Multi-line text input. Thin wrapper over TextInput that fixes `multiline=true`\n * and provides a sensible default for `numberOfLines`.\n */\nexport function TextArea({ numberOfLines = 4, ...rest }: TextAreaProps) {\n return <TextInput multiline numberOfLines={numberOfLines} {...rest} />;\n}\n","import type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\nimport { cn } from '../../utils/cn';\nimport type { StackAlign, StackGap, StackJustify } from '../HStack/HStack';\n\nexport type VStackProps = ViewProps & {\n gap?: StackGap;\n align?: StackAlign;\n justify?: StackJustify;\n className?: string;\n testID?: string;\n};\n\nconst ALIGN_CLASS: Record<StackAlign, string> = {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n};\n\nconst JUSTIFY_CLASS: Record<StackJustify, string> = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n};\n\n/**\n * Vertical flex layout primitive. RSC-safe.\n */\nexport function VStack({ gap, align, justify, className, children, ...rest }: VStackProps) {\n return (\n <View\n {...rest}\n className={cn(\n 'flex-col',\n gap !== undefined && gap !== 0 ? `gap-${gap}` : undefined,\n align !== undefined ? ALIGN_CLASS[align] : undefined,\n justify !== undefined ? JUSTIFY_CLASS[justify] : undefined,\n className\n )}\n >\n {children}\n </View>\n );\n}\n","import type { ComponentType } from 'react';\n\nexport type IconSize = 'sm' | 'md' | 'lg' | 'xl' | number;\n\nexport type IconComponentProps = {\n size?: number;\n color?: string;\n};\n\nexport type IconProps = {\n as: ComponentType<IconComponentProps>;\n size?: IconSize;\n color?: string;\n};\n\nconst SIZE_MAP: Record<Exclude<IconSize, number>, number> = {\n sm: 16,\n md: 20,\n lg: 24,\n xl: 32,\n};\n\n/**\n * Thin wrapper around an icon component. Consumer imports the icon they want\n * from any library (e.g. lucide-react-native) and passes it as `as`. No registry,\n * no runtime lookup — tree-shaking is automatic.\n *\n * RSC-safe: pure render, no hooks, no refs.\n */\nexport function Icon({ as: IconComponent, size = 'md', color }: IconProps) {\n const numericSize = typeof size === 'number' ? size : SIZE_MAP[size];\n // Only spread color when defined — avoids passing `color: undefined` under\n // exactOptionalPropertyTypes.\n const colorProps = color === undefined ? {} : { color };\n return <IconComponent size={numericSize} {...colorProps} />;\n}\n","// GENERATED by @nori-ui/tokens — DO NOT EDIT.\n// Run `yarn build:tokens` to regenerate.\n\n// Generated for light mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const theme = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#dbeafe\",\n \"200\": \"#bfdbfe\",\n \"300\": \"#93c5fd\",\n \"400\": \"#60a5fa\",\n \"50\": \"#f0f7ff\",\n \"500\": \"#3b82f6\",\n \"600\": \"#2563eb\",\n \"700\": \"#1d4ed8\",\n \"800\": \"#1e40af\",\n \"900\": \"#1e3a8a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#fafafa\",\n elevated: \"#ffffff\",\n subtle: \"#f4f4f5\",\n },\n border: {\n default: \"#e4e4e7\",\n strong: \"#d4d4d8\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#2563eb\",\n primaryHover: \"#1d4ed8\",\n primaryPressed: \"#1e40af\",\n },\n text: {\n default: \"#18181b\",\n inverted: \"#fafafa\",\n muted: \"#52525b\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\nexport type Theme = typeof theme;\n\n\n// Dark mode overrides\n// Generated for dark mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const themeDark = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#dbeafe\",\n \"200\": \"#bfdbfe\",\n \"300\": \"#93c5fd\",\n \"400\": \"#60a5fa\",\n \"50\": \"#f0f7ff\",\n \"500\": \"#3b82f6\",\n \"600\": \"#2563eb\",\n \"700\": \"#1d4ed8\",\n \"800\": \"#1e40af\",\n \"900\": \"#1e3a8a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#18181b\",\n elevated: \"#3f3f46\",\n subtle: \"#27272a\",\n },\n border: {\n default: \"#3f3f46\",\n strong: \"#52525b\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#60a5fa\",\n primaryHover: \"#93c5fd\",\n primaryPressed: \"#bfdbfe\",\n },\n text: {\n default: \"#fafafa\",\n inverted: \"#18181b\",\n muted: \"#a1a1aa\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\n","'use client';\n\nimport { theme as defaultTheme, type Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\nexport const ThemeContext = createContext<Theme>(defaultTheme);\nThemeContext.displayName = 'ThemeContext';\n\nexport type ThemeProviderProps = {\n theme?: Theme;\n children?: ReactNode;\n};\n\nexport function ThemeProvider({ theme = defaultTheme, children }: ThemeProviderProps) {\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n","'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { I18nProvider } from '../i18n/context';\nimport type { I18nInput } from '../i18n/types';\nimport type { SemanticIcons } from '../icons/default-semantic-icons';\nimport { SemanticIconsProvider } from '../icons/semantic-context';\nimport { ThemeProvider } from '../theme/context';\n\nexport type NoriProviderProps = {\n theme?: Theme;\n i18n?: I18nInput;\n icons?: Partial<SemanticIcons>;\n children?: ReactNode;\n};\n\n/**\n * Single root provider composing theme, i18n, and semantic-icons contexts.\n * Place near the root of your app. Only needed to override defaults — the\n * library works out of the box without any provider.\n */\nexport function NoriProvider({ theme, i18n, icons, children }: NoriProviderProps) {\n // Conditionally spread each optional prop — `exactOptionalPropertyTypes: true`\n // rejects passing `undefined` to a prop typed as `T | missing`.\n const themeProps = theme === undefined ? {} : { theme };\n const i18nProps = i18n === undefined ? {} : { i18n };\n const iconsProps = icons === undefined ? {} : { icons };\n return (\n <ThemeProvider {...themeProps}>\n <I18nProvider {...i18nProps}>\n <SemanticIconsProvider {...iconsProps}>{children}</SemanticIconsProvider>\n </I18nProvider>\n </ThemeProvider>\n );\n}\n","'use client';\n\nimport { useContext } from 'react';\nimport { ThemeContext } from './context';\n\nexport function useTheme() {\n return useContext(ThemeContext);\n}\n"]}
@@ -0,0 +1,157 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { I18nInput, TranslateFn } from './i18n/index.cjs';
4
+ export { Dictionary, I18nKeys, I18nOptions, defaultDictionary, resolveI18n } from './i18n/index.cjs';
5
+ import { SemanticIcons } from './icons/index.cjs';
6
+ export { Icon, IconComponentProps, IconProps, IconSize, defaultSemanticIcons } from './icons/index.cjs';
7
+ export { Box, BoxProps, Button, ButtonProps, ButtonSize, ButtonVariant, Checkbox, CheckboxProps, HStack, HStackProps, Spinner, SpinnerProps, SpinnerSize, StackAlign, StackGap, StackJustify, Switch, SwitchProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, VStack, VStackProps } from './index.cjs';
8
+ export { Slot, SlotProps, composeRefs } from './slot/index.cjs';
9
+ import { Theme } from '@nori-ui/tokens';
10
+ export { Theme, theme, themeDark } from '@nori-ui/tokens';
11
+ export { ClassInput, cn } from './utils/cn.cjs';
12
+ import 'react-native';
13
+
14
+ type I18nContextValue = {
15
+ t: TranslateFn;
16
+ };
17
+ type I18nProviderProps = {
18
+ i18n?: I18nInput;
19
+ children?: ReactNode;
20
+ };
21
+ declare function I18nProvider({ i18n, children }: I18nProviderProps): react_jsx_runtime.JSX.Element;
22
+
23
+ declare function useTranslation(): I18nContextValue;
24
+
25
+ type SemanticIconsProviderProps = {
26
+ icons?: Partial<SemanticIcons>;
27
+ children?: ReactNode;
28
+ };
29
+ declare function SemanticIconsProvider({ icons, children }: SemanticIconsProviderProps): react_jsx_runtime.JSX.Element;
30
+
31
+ declare function useSemanticIcon<K extends keyof SemanticIcons>(name: K): SemanticIcons[K];
32
+
33
+ type NoriProviderProps = {
34
+ theme?: Theme;
35
+ i18n?: I18nInput;
36
+ icons?: Partial<SemanticIcons>;
37
+ children?: ReactNode;
38
+ };
39
+ /**
40
+ * Single root provider composing theme, i18n, and semantic-icons contexts.
41
+ * Place near the root of your app. Only needed to override defaults — the
42
+ * library works out of the box without any provider.
43
+ */
44
+ declare function NoriProvider({ theme, i18n, icons, children }: NoriProviderProps): react_jsx_runtime.JSX.Element;
45
+
46
+ type ThemeProviderProps = {
47
+ theme?: Theme;
48
+ children?: ReactNode;
49
+ };
50
+ declare function ThemeProvider({ theme, children }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
51
+
52
+ declare function useTheme(): {
53
+ readonly color: {
54
+ readonly danger: "#ef4444";
55
+ readonly info: "#3b82f6";
56
+ readonly neutral: {
57
+ readonly "100": "#f4f4f5";
58
+ readonly "200": "#e4e4e7";
59
+ readonly "300": "#d4d4d8";
60
+ readonly "400": "#a1a1aa";
61
+ readonly "50": "#fafafa";
62
+ readonly "500": "#71717a";
63
+ readonly "600": "#52525b";
64
+ readonly "700": "#3f3f46";
65
+ readonly "800": "#27272a";
66
+ readonly "900": "#18181b";
67
+ };
68
+ readonly primary: {
69
+ readonly "100": "#dbeafe";
70
+ readonly "200": "#bfdbfe";
71
+ readonly "300": "#93c5fd";
72
+ readonly "400": "#60a5fa";
73
+ readonly "50": "#f0f7ff";
74
+ readonly "500": "#3b82f6";
75
+ readonly "600": "#2563eb";
76
+ readonly "700": "#1d4ed8";
77
+ readonly "800": "#1e40af";
78
+ readonly "900": "#1e3a8a";
79
+ };
80
+ readonly success: "#22c55e";
81
+ readonly warning: "#f59e0b";
82
+ };
83
+ readonly fontSize: {
84
+ readonly "2xl": "24px";
85
+ readonly "3xl": "30px";
86
+ readonly "4xl": "36px";
87
+ readonly lg: "18px";
88
+ readonly md: "16px";
89
+ readonly sm: "14px";
90
+ readonly xl: "20px";
91
+ readonly xs: "12px";
92
+ };
93
+ readonly fontWeight: {
94
+ readonly bold: "700";
95
+ readonly medium: "500";
96
+ readonly regular: "400";
97
+ readonly semibold: "600";
98
+ };
99
+ readonly lineHeight: {
100
+ readonly normal: "1.4";
101
+ readonly relaxed: "1.6";
102
+ readonly tight: "1.2";
103
+ };
104
+ readonly radius: {
105
+ readonly "2xl": "16px";
106
+ readonly full: "9999px";
107
+ readonly lg: "8px";
108
+ readonly md: "6px";
109
+ readonly none: "0px";
110
+ readonly sm: "4px";
111
+ readonly xl: "12px";
112
+ };
113
+ readonly semantic: {
114
+ readonly background: {
115
+ readonly default: "#fafafa";
116
+ readonly elevated: "#ffffff";
117
+ readonly subtle: "#f4f4f5";
118
+ };
119
+ readonly border: {
120
+ readonly default: "#e4e4e7";
121
+ readonly strong: "#d4d4d8";
122
+ };
123
+ readonly interactive: {
124
+ readonly destructive: "#ef4444";
125
+ readonly primary: "#2563eb";
126
+ readonly primaryHover: "#1d4ed8";
127
+ readonly primaryPressed: "#1e40af";
128
+ };
129
+ readonly text: {
130
+ readonly default: "#18181b";
131
+ readonly inverted: "#fafafa";
132
+ readonly muted: "#52525b";
133
+ };
134
+ };
135
+ readonly shadow: {
136
+ readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)";
137
+ readonly md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)";
138
+ readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
139
+ };
140
+ readonly spacing: {
141
+ readonly "0": "0px";
142
+ readonly "1": "4px";
143
+ readonly "10": "40px";
144
+ readonly "12": "48px";
145
+ readonly "16": "64px";
146
+ readonly "2": "8px";
147
+ readonly "20": "80px";
148
+ readonly "24": "96px";
149
+ readonly "3": "12px";
150
+ readonly "4": "16px";
151
+ readonly "5": "20px";
152
+ readonly "6": "24px";
153
+ readonly "8": "32px";
154
+ };
155
+ };
156
+
157
+ export { I18nInput, I18nProvider, type I18nProviderProps, NoriProvider, type NoriProviderProps, SemanticIcons, SemanticIconsProvider, type SemanticIconsProviderProps, ThemeProvider, type ThemeProviderProps, TranslateFn, useSemanticIcon, useTheme, useTranslation };
@@ -0,0 +1,157 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { I18nInput, TranslateFn } from './i18n/index.js';
4
+ export { Dictionary, I18nKeys, I18nOptions, defaultDictionary, resolveI18n } from './i18n/index.js';
5
+ import { SemanticIcons } from './icons/index.js';
6
+ export { Icon, IconComponentProps, IconProps, IconSize, defaultSemanticIcons } from './icons/index.js';
7
+ export { Box, BoxProps, Button, ButtonProps, ButtonSize, ButtonVariant, Checkbox, CheckboxProps, HStack, HStackProps, Spinner, SpinnerProps, SpinnerSize, StackAlign, StackGap, StackJustify, Switch, SwitchProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, VStack, VStackProps } from './index.js';
8
+ export { Slot, SlotProps, composeRefs } from './slot/index.js';
9
+ import { Theme } from '@nori-ui/tokens';
10
+ export { Theme, theme, themeDark } from '@nori-ui/tokens';
11
+ export { ClassInput, cn } from './utils/cn.js';
12
+ import 'react-native';
13
+
14
+ type I18nContextValue = {
15
+ t: TranslateFn;
16
+ };
17
+ type I18nProviderProps = {
18
+ i18n?: I18nInput;
19
+ children?: ReactNode;
20
+ };
21
+ declare function I18nProvider({ i18n, children }: I18nProviderProps): react_jsx_runtime.JSX.Element;
22
+
23
+ declare function useTranslation(): I18nContextValue;
24
+
25
+ type SemanticIconsProviderProps = {
26
+ icons?: Partial<SemanticIcons>;
27
+ children?: ReactNode;
28
+ };
29
+ declare function SemanticIconsProvider({ icons, children }: SemanticIconsProviderProps): react_jsx_runtime.JSX.Element;
30
+
31
+ declare function useSemanticIcon<K extends keyof SemanticIcons>(name: K): SemanticIcons[K];
32
+
33
+ type NoriProviderProps = {
34
+ theme?: Theme;
35
+ i18n?: I18nInput;
36
+ icons?: Partial<SemanticIcons>;
37
+ children?: ReactNode;
38
+ };
39
+ /**
40
+ * Single root provider composing theme, i18n, and semantic-icons contexts.
41
+ * Place near the root of your app. Only needed to override defaults — the
42
+ * library works out of the box without any provider.
43
+ */
44
+ declare function NoriProvider({ theme, i18n, icons, children }: NoriProviderProps): react_jsx_runtime.JSX.Element;
45
+
46
+ type ThemeProviderProps = {
47
+ theme?: Theme;
48
+ children?: ReactNode;
49
+ };
50
+ declare function ThemeProvider({ theme, children }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
51
+
52
+ declare function useTheme(): {
53
+ readonly color: {
54
+ readonly danger: "#ef4444";
55
+ readonly info: "#3b82f6";
56
+ readonly neutral: {
57
+ readonly "100": "#f4f4f5";
58
+ readonly "200": "#e4e4e7";
59
+ readonly "300": "#d4d4d8";
60
+ readonly "400": "#a1a1aa";
61
+ readonly "50": "#fafafa";
62
+ readonly "500": "#71717a";
63
+ readonly "600": "#52525b";
64
+ readonly "700": "#3f3f46";
65
+ readonly "800": "#27272a";
66
+ readonly "900": "#18181b";
67
+ };
68
+ readonly primary: {
69
+ readonly "100": "#dbeafe";
70
+ readonly "200": "#bfdbfe";
71
+ readonly "300": "#93c5fd";
72
+ readonly "400": "#60a5fa";
73
+ readonly "50": "#f0f7ff";
74
+ readonly "500": "#3b82f6";
75
+ readonly "600": "#2563eb";
76
+ readonly "700": "#1d4ed8";
77
+ readonly "800": "#1e40af";
78
+ readonly "900": "#1e3a8a";
79
+ };
80
+ readonly success: "#22c55e";
81
+ readonly warning: "#f59e0b";
82
+ };
83
+ readonly fontSize: {
84
+ readonly "2xl": "24px";
85
+ readonly "3xl": "30px";
86
+ readonly "4xl": "36px";
87
+ readonly lg: "18px";
88
+ readonly md: "16px";
89
+ readonly sm: "14px";
90
+ readonly xl: "20px";
91
+ readonly xs: "12px";
92
+ };
93
+ readonly fontWeight: {
94
+ readonly bold: "700";
95
+ readonly medium: "500";
96
+ readonly regular: "400";
97
+ readonly semibold: "600";
98
+ };
99
+ readonly lineHeight: {
100
+ readonly normal: "1.4";
101
+ readonly relaxed: "1.6";
102
+ readonly tight: "1.2";
103
+ };
104
+ readonly radius: {
105
+ readonly "2xl": "16px";
106
+ readonly full: "9999px";
107
+ readonly lg: "8px";
108
+ readonly md: "6px";
109
+ readonly none: "0px";
110
+ readonly sm: "4px";
111
+ readonly xl: "12px";
112
+ };
113
+ readonly semantic: {
114
+ readonly background: {
115
+ readonly default: "#fafafa";
116
+ readonly elevated: "#ffffff";
117
+ readonly subtle: "#f4f4f5";
118
+ };
119
+ readonly border: {
120
+ readonly default: "#e4e4e7";
121
+ readonly strong: "#d4d4d8";
122
+ };
123
+ readonly interactive: {
124
+ readonly destructive: "#ef4444";
125
+ readonly primary: "#2563eb";
126
+ readonly primaryHover: "#1d4ed8";
127
+ readonly primaryPressed: "#1e40af";
128
+ };
129
+ readonly text: {
130
+ readonly default: "#18181b";
131
+ readonly inverted: "#fafafa";
132
+ readonly muted: "#52525b";
133
+ };
134
+ };
135
+ readonly shadow: {
136
+ readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)";
137
+ readonly md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)";
138
+ readonly sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
139
+ };
140
+ readonly spacing: {
141
+ readonly "0": "0px";
142
+ readonly "1": "4px";
143
+ readonly "10": "40px";
144
+ readonly "12": "48px";
145
+ readonly "16": "64px";
146
+ readonly "2": "8px";
147
+ readonly "20": "80px";
148
+ readonly "24": "96px";
149
+ readonly "3": "12px";
150
+ readonly "4": "16px";
151
+ readonly "5": "20px";
152
+ readonly "6": "24px";
153
+ readonly "8": "32px";
154
+ };
155
+ };
156
+
157
+ export { I18nInput, I18nProvider, type I18nProviderProps, NoriProvider, type NoriProviderProps, SemanticIcons, SemanticIconsProvider, type SemanticIconsProviderProps, ThemeProvider, type ThemeProviderProps, TranslateFn, useSemanticIcon, useTheme, useTranslation };
package/dist/client.js ADDED
@@ -0,0 +1,50 @@
1
+ import './chunk-BRCCWMGJ.js';
2
+ import { theme } from './chunk-JGH6Z5LM.js';
3
+ export { theme, themeDark } from './chunk-JGH6Z5LM.js';
4
+ import { resolveI18n, defaultDictionary } from './chunk-SSTXLK5I.js';
5
+ export { defaultDictionary, resolveI18n } from './chunk-SSTXLK5I.js';
6
+ export { Icon } from './chunk-RX7UULY3.js';
7
+ import { SemanticIconsProvider } from './chunk-6NDARMPP.js';
8
+ export { Box, Button, Checkbox, HStack, SemanticIconsProvider, Spinner, Switch, Text, TextArea, TextInput, VStack, useSemanticIcon } from './chunk-6NDARMPP.js';
9
+ export { defaultSemanticIcons } from './chunk-NDEDMCHT.js';
10
+ export { Slot, composeRefs } from './chunk-FXKIWONG.js';
11
+ export { cn } from './chunk-XGM2K4TT.js';
12
+ import { __name } from './chunk-7QVYU63E.js';
13
+ import { createContext, useMemo, useContext } from 'react';
14
+ import { jsx } from 'nativewind/jsx-runtime';
15
+
16
+ var defaultValue = {
17
+ t: resolveI18n(void 0, defaultDictionary)
18
+ };
19
+ var I18nContext = createContext(defaultValue);
20
+ I18nContext.displayName = "I18nContext";
21
+ function I18nProvider({ i18n, children }) {
22
+ const value = useMemo(() => ({ t: resolveI18n(i18n, defaultDictionary) }), [i18n]);
23
+ return /* @__PURE__ */ jsx(I18nContext.Provider, { value, children });
24
+ }
25
+ __name(I18nProvider, "I18nProvider");
26
+ function useTranslation() {
27
+ return useContext(I18nContext);
28
+ }
29
+ __name(useTranslation, "useTranslation");
30
+ var ThemeContext = createContext(theme);
31
+ ThemeContext.displayName = "ThemeContext";
32
+ function ThemeProvider({ theme: theme2 = theme, children }) {
33
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: theme2, children });
34
+ }
35
+ __name(ThemeProvider, "ThemeProvider");
36
+ function NoriProvider({ theme: theme2, i18n, icons, children }) {
37
+ const themeProps = theme2 === void 0 ? {} : { theme: theme2 };
38
+ const i18nProps = i18n === void 0 ? {} : { i18n };
39
+ const iconsProps = icons === void 0 ? {} : { icons };
40
+ return /* @__PURE__ */ jsx(ThemeProvider, { ...themeProps, children: /* @__PURE__ */ jsx(I18nProvider, { ...i18nProps, children: /* @__PURE__ */ jsx(SemanticIconsProvider, { ...iconsProps, children }) }) });
41
+ }
42
+ __name(NoriProvider, "NoriProvider");
43
+ function useTheme() {
44
+ return useContext(ThemeContext);
45
+ }
46
+ __name(useTheme, "useTheme");
47
+
48
+ export { I18nProvider, NoriProvider, ThemeProvider, useTheme, useTranslation };
49
+ //# sourceMappingURL=client.js.map
50
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/i18n/context.tsx","../src/i18n/use-translation.ts","../src/theme/context.tsx","../src/provider/nori-provider.tsx","../src/theme/use-theme.ts"],"names":["createContext","theme","jsx","useContext"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAM,YAAA,GAAiC;AAAA,EACnC,CAAA,EAAG,WAAA,CAAY,MAAA,EAAW,iBAAiB;AAC/C,CAAA;AAEO,IAAM,WAAA,GAAc,cAAgC,YAAY,CAAA;AACvE,WAAA,CAAY,WAAA,GAAc,aAAA;AAOnB,SAAS,YAAA,CAAa,EAAE,IAAA,EAAM,QAAA,EAAS,EAAsB;AAChE,EAAA,MAAM,KAAA,GAAQ,OAAA,CAA0B,OAAO,EAAE,CAAA,EAAG,WAAA,CAAY,IAAA,EAAM,iBAAiB,CAAA,EAAE,CAAA,EAAI,CAAC,IAAI,CAAC,CAAA;AACnG,EAAA,uBAAO,GAAA,CAAC,WAAA,CAAY,QAAA,EAAZ,EAAqB,OAAe,QAAA,EAAS,CAAA;AACzD;AAHgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA;ACrBT,SAAS,cAAA,GAAmC;AAC/C,EAAA,OAAO,WAAW,WAAW,CAAA;AACjC;AAFgB,MAAA,CAAA,cAAA,EAAA,gBAAA,CAAA;ACCT,IAAM,YAAA,GAAeA,cAAqB,KAAY,CAAA;AAC7D,YAAA,CAAa,WAAA,GAAc,cAAA;AAOpB,SAAS,cAAc,EAAE,KAAA,EAAAC,MAAAA,GAAQ,KAAA,EAAc,UAAS,EAAuB;AAClF,EAAA,uBAAOC,GAAAA,CAAC,YAAA,CAAa,UAAb,EAAsB,KAAA,EAAOD,QAAQ,QAAA,EAAS,CAAA;AAC1D;AAFgB,MAAA,CAAA,aAAA,EAAA,eAAA,CAAA;ACQT,SAAS,aAAa,EAAE,KAAA,EAAAA,QAAO,IAAA,EAAM,KAAA,EAAO,UAAS,EAAsB;AAG9E,EAAA,MAAM,aAAaA,MAAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,OAAAA,MAAAA,EAAM;AACtD,EAAA,MAAM,YAAY,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAK;AACnD,EAAA,MAAM,aAAa,KAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,KAAA,EAAM;AACtD,EAAA,uBACIC,GAAAA,CAAC,aAAA,EAAA,EAAe,GAAG,UAAA,EACf,0BAAAA,GAAAA,CAAC,YAAA,EAAA,EAAc,GAAG,SAAA,EACd,0BAAAA,GAAAA,CAAC,qBAAA,EAAA,EAAuB,GAAG,UAAA,EAAa,QAAA,EAAS,GACrD,CAAA,EACJ,CAAA;AAER;AAbgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA;ACjBT,SAAS,QAAA,GAAW;AACvB,EAAA,OAAOC,WAAW,YAAY,CAAA;AAClC;AAFgB,MAAA,CAAA,QAAA,EAAA,UAAA,CAAA","file":"client.js","sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\nimport { createContext, useMemo } from 'react';\nimport { defaultDictionary } from './default-dictionary';\nimport { resolveI18n } from './resolve';\nimport type { I18nInput, TranslateFn } from './types';\n\nexport type I18nContextValue = {\n t: TranslateFn;\n};\n\n// Default context value uses the built-in English dictionary; consumers without\n// a provider still get a working t().\nconst defaultValue: I18nContextValue = {\n t: resolveI18n(undefined, defaultDictionary),\n};\n\nexport const I18nContext = createContext<I18nContextValue>(defaultValue);\nI18nContext.displayName = 'I18nContext';\n\nexport type I18nProviderProps = {\n i18n?: I18nInput;\n children?: ReactNode;\n};\n\nexport function I18nProvider({ i18n, children }: I18nProviderProps) {\n const value = useMemo<I18nContextValue>(() => ({ t: resolveI18n(i18n, defaultDictionary) }), [i18n]);\n return <I18nContext.Provider value={value}>{children}</I18nContext.Provider>;\n}\n","'use client';\n\nimport { useContext } from 'react';\nimport { I18nContext, type I18nContextValue } from './context';\n\nexport function useTranslation(): I18nContextValue {\n return useContext(I18nContext);\n}\n","'use client';\n\nimport { theme as defaultTheme, type Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\nexport const ThemeContext = createContext<Theme>(defaultTheme);\nThemeContext.displayName = 'ThemeContext';\n\nexport type ThemeProviderProps = {\n theme?: Theme;\n children?: ReactNode;\n};\n\nexport function ThemeProvider({ theme = defaultTheme, children }: ThemeProviderProps) {\n return <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>;\n}\n","'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { I18nProvider } from '../i18n/context';\nimport type { I18nInput } from '../i18n/types';\nimport type { SemanticIcons } from '../icons/default-semantic-icons';\nimport { SemanticIconsProvider } from '../icons/semantic-context';\nimport { ThemeProvider } from '../theme/context';\n\nexport type NoriProviderProps = {\n theme?: Theme;\n i18n?: I18nInput;\n icons?: Partial<SemanticIcons>;\n children?: ReactNode;\n};\n\n/**\n * Single root provider composing theme, i18n, and semantic-icons contexts.\n * Place near the root of your app. Only needed to override defaults — the\n * library works out of the box without any provider.\n */\nexport function NoriProvider({ theme, i18n, icons, children }: NoriProviderProps) {\n // Conditionally spread each optional prop — `exactOptionalPropertyTypes: true`\n // rejects passing `undefined` to a prop typed as `T | missing`.\n const themeProps = theme === undefined ? {} : { theme };\n const i18nProps = i18n === undefined ? {} : { i18n };\n const iconsProps = icons === undefined ? {} : { icons };\n return (\n <ThemeProvider {...themeProps}>\n <I18nProvider {...i18nProps}>\n <SemanticIconsProvider {...iconsProps}>{children}</SemanticIconsProvider>\n </I18nProvider>\n </ThemeProvider>\n );\n}\n","'use client';\n\nimport { useContext } from 'react';\nimport { ThemeContext } from './context';\n\nexport function useTheme() {\n return useContext(ThemeContext);\n}\n"]}
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
+
6
+ // src/i18n/default-dictionary.ts
7
+ var defaultDictionary = {
8
+ // generic / shared
9
+ "common.cancel": "Cancel",
10
+ "common.confirm": "Confirm",
11
+ "common.close": "Close",
12
+ "common.back": "Back",
13
+ "common.loading": "Loading",
14
+ "common.error": "Something went wrong",
15
+ "common.retry": "Try again",
16
+ // button
17
+ "button.loadingLabel": "Loading",
18
+ // input
19
+ "input.clear": "Clear",
20
+ "input.passwordShow": "Show password",
21
+ "input.passwordHide": "Hide password",
22
+ // checkbox / switch
23
+ "checkbox.checked": "Checked",
24
+ "checkbox.unchecked": "Unchecked",
25
+ "switch.on": "On",
26
+ "switch.off": "Off"
27
+ };
28
+
29
+ // src/i18n/resolve.ts
30
+ function resolveI18n(input, defaults) {
31
+ if (typeof input === "function") {
32
+ return (keyOrKeys, options) => input(keyOrKeys, options);
33
+ }
34
+ const dict = input ?? {};
35
+ return (keyOrKeys, options) => {
36
+ const keys = Array.isArray(keyOrKeys) ? keyOrKeys : [keyOrKeys];
37
+ for (const rawKey of keys) {
38
+ const key = pluralize(rawKey, options?.count);
39
+ const template = dict[key] ?? defaults[key];
40
+ if (template !== void 0) {
41
+ return interpolate(template, options);
42
+ }
43
+ }
44
+ const lastKey = keys[keys.length - 1];
45
+ if (options?.defaultValue !== void 0) {
46
+ return interpolate(options.defaultValue, options);
47
+ }
48
+ return lastKey ?? "";
49
+ };
50
+ }
51
+ __name(resolveI18n, "resolveI18n");
52
+ function pluralize(key, count) {
53
+ if (count === void 0) return key;
54
+ if (count === 1) return `${key}_one`;
55
+ return `${key}_other`;
56
+ }
57
+ __name(pluralize, "pluralize");
58
+ function interpolate(template, options) {
59
+ if (!options) return template;
60
+ return template.replace(/\{\{\s*([A-Za-z0-9_.-]+)\s*\}\}/g, (_match, name) => {
61
+ const value = options[name];
62
+ return value === void 0 || value === null ? "" : String(value);
63
+ });
64
+ }
65
+ __name(interpolate, "interpolate");
66
+
67
+ exports.defaultDictionary = defaultDictionary;
68
+ exports.resolveI18n = resolveI18n;
69
+ //# sourceMappingURL=index.cjs.map
70
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/i18n/default-dictionary.ts","../../src/i18n/resolve.ts"],"names":[],"mappings":";;;;;;AAWO,IAAM,iBAAA,GAAgC;AAAA;AAAA,EAEzC,eAAA,EAAiB,QAAA;AAAA,EACjB,gBAAA,EAAkB,SAAA;AAAA,EAClB,cAAA,EAAgB,OAAA;AAAA,EAChB,aAAA,EAAe,MAAA;AAAA,EACf,gBAAA,EAAkB,SAAA;AAAA,EAClB,cAAA,EAAgB,sBAAA;AAAA,EAChB,cAAA,EAAgB,WAAA;AAAA;AAAA,EAGhB,qBAAA,EAAuB,SAAA;AAAA;AAAA,EAGvB,aAAA,EAAe,OAAA;AAAA,EACf,oBAAA,EAAsB,eAAA;AAAA,EACtB,oBAAA,EAAsB,eAAA;AAAA;AAAA,EAGtB,kBAAA,EAAoB,SAAA;AAAA,EACpB,oBAAA,EAAsB,WAAA;AAAA,EACtB,WAAA,EAAa,IAAA;AAAA,EACb,YAAA,EAAc;AAClB;;;ACrBO,SAAS,WAAA,CAAY,OAAkB,QAAA,EAAmC;AAC7E,EAAA,IAAI,OAAO,UAAU,UAAA,EAAY;AAI7B,IAAA,OAAO,CAAC,SAAA,EAAW,OAAA,KAAY,KAAA,CAAM,WAAW,OAAO,CAAA;AAAA,EAC3D;AAEA,EAAA,MAAM,IAAA,GAAO,SAAS,EAAC;AAEvB,EAAA,OAAO,CAAC,WAAW,OAAA,KAAY;AAC3B,IAAA,MAAM,OAAO,KAAA,CAAM,OAAA,CAAQ,SAAS,CAAA,GAAI,SAAA,GAAY,CAAC,SAAS,CAAA;AAC9D,IAAA,KAAA,MAAW,UAAU,IAAA,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A,aAAA,CAAA","file":"index.cjs","sourcesContent":["import type { Dictionary } from './types';\n\n/**\n * Default English strings used by library components.\n *\n * Key naming convention:\n * <component>.<purpose>[_plural-form]\n *\n * Plural suffixes follow i18next: `_zero`, `_one`, `_two`, `_few`, `_many`, `_other`.\n * Interpolation uses `{{name}}` — double braces, no spaces, by convention.\n */\nexport const defaultDictionary: Dictionary = {\n // generic / shared\n 'common.cancel': 'Cancel',\n 'common.confirm': 'Confirm',\n 'common.close': 'Close',\n 'common.back': 'Back',\n 'common.loading': 'Loading',\n 'common.error': 'Something went wrong',\n 'common.retry': 'Try again',\n\n // button\n 'button.loadingLabel': 'Loading',\n\n // input\n 'input.clear': 'Clear',\n 'input.passwordShow': 'Show password',\n 'input.passwordHide': 'Hide password',\n\n // checkbox / switch\n 'checkbox.checked': 'Checked',\n 'checkbox.unchecked': 'Unchecked',\n 'switch.on': 'On',\n 'switch.off': 'Off',\n};\n","import type { Dictionary, I18nInput, I18nOptions, TranslateFn } from './types';\n\n/**\n * Normalizes the consumer's i18n input (undefined | dictionary | function) into a\n * uniform TranslateFn. Internal code only calls the returned function.\n *\n * Precedence for a given key lookup:\n * 1. consumer function (if provided) — called verbatim, no further fallback\n * 2. consumer dictionary (if provided)\n * 3. library defaults\n * 4. options.defaultValue\n * 5. the key itself (so missing strings are visible in dev, not silent)\n */\nexport function resolveI18n(input: I18nInput, defaults: Dictionary): TranslateFn {\n if (typeof input === 'function') {\n // Wrap so the consumer fn is always invoked with (key, options) — enables\n // Jest `toHaveBeenCalledWith(key, undefined)` assertions and mirrors i18next's\n // own call signature exactly.\n return (keyOrKeys, options) => input(keyOrKeys, options);\n }\n\n const dict = input ?? {};\n\n return (keyOrKeys, options) => {\n const keys = Array.isArray(keyOrKeys) ? keyOrKeys : [keyOrKeys];\n for (const rawKey of keys) {\n const key = pluralize(rawKey, options?.count);\n const template = dict[key] ?? defaults[key];\n if (template !== undefined) {\n return interpolate(template, options);\n }\n }\n // exhausted the key list\n const lastKey = keys[keys.length - 1];\n if (options?.defaultValue !== undefined) {\n return interpolate(options.defaultValue, options);\n }\n return lastKey ?? '';\n };\n}\n\nfunction pluralize(key: string, count: number | undefined): string {\n if (count === undefined) return key;\n // Minimal English pluralization — extend with ICU rules later if needed.\n if (count === 1) return `${key}_one`;\n return `${key}_other`;\n}\n\nfunction interpolate(template: string, options: I18nOptions | undefined): string {\n if (!options) return template;\n return template.replace(/\\{\\{\\s*([A-Za-z0-9_.-]+)\\s*\\}\\}/g, (_match, name: string) => {\n const value = options[name];\n return value === undefined || value === null ? '' : String(value);\n });\n}\n"]}