@nori-ui/core 1.8.0 → 1.9.0

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 (39) hide show
  1. package/dist/{chunk-PLQPBMG2.js → chunk-BXZGCOKT.js} +2 -2
  2. package/dist/{chunk-PLQPBMG2.js.map → chunk-BXZGCOKT.js.map} +1 -1
  3. package/dist/{chunk-RI4Y2C5U.js → chunk-KLK7OMFT.js} +3 -3
  4. package/dist/{chunk-RI4Y2C5U.js.map → chunk-KLK7OMFT.js.map} +1 -1
  5. package/dist/chunk-OHWRTHGL.js +495 -0
  6. package/dist/chunk-OHWRTHGL.js.map +1 -0
  7. package/dist/{chunk-V5QSMDZL.js → chunk-QB6RH6UU.js} +3 -3
  8. package/dist/{chunk-V5QSMDZL.js.map → chunk-QB6RH6UU.js.map} +1 -1
  9. package/dist/chunk-S763GTIZ.js +350 -0
  10. package/dist/chunk-S763GTIZ.js.map +1 -0
  11. package/dist/chunk-UJRVWGK7.js +3 -0
  12. package/dist/chunk-UJRVWGK7.js.map +1 -0
  13. package/dist/client.cjs +2248 -1424
  14. package/dist/client.cjs.map +1 -1
  15. package/dist/client.d.cts +2 -0
  16. package/dist/client.d.ts +2 -0
  17. package/dist/client.js +13 -10
  18. package/dist/client.js.map +1 -1
  19. package/dist/components/Accordion/index.js +2 -2
  20. package/dist/components/Command/index.cjs +1371 -0
  21. package/dist/components/Command/index.cjs.map +1 -0
  22. package/dist/components/Command/index.d.cts +89 -0
  23. package/dist/components/Command/index.d.ts +89 -0
  24. package/dist/components/Command/index.js +11 -0
  25. package/dist/components/Command/index.js.map +1 -0
  26. package/dist/components/Dialog/index.js +2 -1
  27. package/dist/components/Sidebar/index.cjs +675 -0
  28. package/dist/components/Sidebar/index.cjs.map +1 -0
  29. package/dist/components/Sidebar/index.d.cts +109 -0
  30. package/dist/components/Sidebar/index.d.ts +109 -0
  31. package/dist/components/Sidebar/index.js +7 -0
  32. package/dist/components/Sidebar/index.js.map +1 -0
  33. package/dist/components/Switch/index.js +2 -2
  34. package/dist/index.cjs +2248 -1424
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +2 -0
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.js +13 -10
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Accordion/Accordion.tsx"],"names":["RNText"],"mappings":";;;;;;;;;;;AAsEA,IAAM,gBAAA,GAAmB,cAA4C,IAAI,CAAA;AAEzE,IAAM,mBAAA,2BAAuB,KAAA,KAAyC;AAClE,EAAA,MAAM,GAAA,GAAM,WAAW,gBAAgB,CAAA;AACvC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAA,EAAI,KAAK,CAAA,yCAAA,CAA2C,CAAA;AAAA,EACxE;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EAN4B,qBAAA,CAAA;AAgB5B,IAAM,oBAAA,GAAuB,cAAgD,IAAI,CAAA;AAEjF,IAAM,uBAAA,2BAA2B,KAAA,KAA6C;AAC1E,EAAA,MAAM,GAAA,GAAM,WAAW,oBAAoB,CAAA;AAC3C,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAA,EAAI,KAAK,CAAA,8CAAA,CAAgD,CAAA;AAAA,EAC7E;AACA,EAAA,OAAO,GAAA;AACX,CAAA,EANgC,yBAAA,CAAA;AA2BhC,IAAM,aAAA,2BAAiB,KAAA,KAA0B;AAC7C,EAAA,MAAM,SAAS,KAAA,EAAM;AACrB,EAAA,MAAM,IAAA,GAAO,MAAA,iBAAmD,IAAI,GAAA,EAAK,CAAA;AACzE,EAAA,MAAM,QAAA,GAAW,MAAA,CAAiB,EAAE,CAAA;AAIpC,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,SAAA,EAAW,QAAO,GAAI,KAAA;AAI9C,EAAA,MAAM,CAAC,WA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,EAAU,EAAA,CAAG,MAAA,CAAO,QAAA,CAAS,EAAE,CAAA;AAAA,gBAC/B,UAAA,EAAY,GAAG,MAAA,CAAO,QAAA,CAAS,EAAE,CAAA,GAAI,MAAA,CAAO,MAAA,CAAO,UAAA,CAAW,MAAM;AAAA,eACxE;AAAA,cAEC;AAAA;AAAA,WACL,GAEA;AAAA;AAAA;AAER;AAAA,GACJ;AAER,CAAA,EAjPgC,kBAAA,CAAA;AAyPzB,IAAM,SAAA,GAAY,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe;AAAA,EAClD,IAAA,EAAM,aAAA;AAAA,EACN,OAAA,EAAS,gBAAA;AAAA,EACT,OAAA,EAAS;AACb,CAAC","file":"chunk-V5QSMDZL.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native';\nimport { Platform, Pressable, Text as RNText, View } from 'react-native';\nimport { AnimatedView } from '../../animation/animated-view';\nimport { useAnimatedNumber } from '../../animation/use-animated-number';\nimport { defaultSemanticIcons } from '../../icons/default-semantic-icons';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type AccordionType = 'single' | 'multiple';\n\ntype SingleProps = {\n /** One-at-a-time mode. */\n type: 'single';\n /** Controlled open value. Pass `null` (with `collapsible`) for \"nothing open\". */\n value?: string | null;\n /** Uncontrolled initial open value. */\n defaultValue?: string;\n /** Fires when the open value changes. Receives the new value (string), or `null` if collapsed. */\n onChange?: (next: string | null) => void;\n /** Allow closing the open item by clicking it again. @defaultValue false */\n collapsible?: boolean;\n};\n\ntype MultipleProps = {\n /** Any combination open. */\n type: 'multiple';\n /** Controlled list of open values. */\n value?: string[];\n /** Uncontrolled initial list of open values. */\n defaultValue?: string[];\n /** Fires when the open list changes. Receives the new list. */\n onChange?: (next: string[]) => void;\n /** No-op in `multiple` mode (items are always individually collapsible). */\n collapsible?: never;\n};\n\ntype CommonProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\nexport type AccordionProps = (SingleProps | MultipleProps) & CommonProps;\n\ntype AccordionContextValue = {\n baseId: string;\n isOpen: (value: string) => boolean;\n toggle: (value: string) => void;\n register: (value: string, ref: RefObject<HTMLElement | null>) => void;\n unregister: (value: string) => void;\n moveFocus: (offset: 1 | -1, fromValue: string) => void;\n focusEdge: (edge: 'first' | 'last') => void;\n};\n\nconst AccordionContext = createContext<AccordionContextValue | null>(null);\n\nconst useAccordionContext = (label: string): AccordionContextValue => {\n const ctx = useContext(AccordionContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <Accordion>.`);\n }\n return ctx;\n};\n\ntype AccordionItemContextValue = {\n value: string;\n open: boolean;\n disabled: boolean;\n triggerId: string;\n contentId: string;\n};\n\nconst AccordionItemContext = createContext<AccordionItemContextValue | null>(null);\n\nconst useAccordionItemContext = (label: string): AccordionItemContextValue => {\n const ctx = useContext(AccordionItemContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <Accordion.Item>.`);\n }\n return ctx;\n};\n\n/**\n * Vertically stacked, individually expandable sections. Compose:\n *\n * <Accordion type=\"single\" defaultValue=\"overview\" collapsible>\n * <Accordion.Item value=\"overview\">\n * <Accordion.Trigger>Overview</Accordion.Trigger>\n * <Accordion.Content>...</Accordion.Content>\n * </Accordion.Item>\n * </Accordion>\n *\n * Modes:\n * - `single` — at most one item open. Pass `collapsible` to allow closing the\n * open item.\n * - `multiple` — any combination open. `value` / `defaultValue` are arrays.\n *\n * Controlled (`value` + `onChange`) and uncontrolled (`defaultValue`) both\n * supported. Triggers are real `<button>`s with full keyboard nav: ArrowDown /\n * ArrowUp move focus, Home / End jump to first / last, Enter / Space toggle.\n */\nconst AccordionRoot = (props: AccordionProps) => {\n const baseId = useId();\n const refs = useRef<Map<string, RefObject<HTMLElement | null>>>(new Map());\n const orderRef = useRef<string[]>([]);\n\n // Pull out the props we always need; the discriminated union handlers below\n // narrow on `type` for the actual state logic.\n const { type, children, className, testID } = props;\n\n // Single-mode internal state. We always allocate both state slots so the\n // hook order stays stable across re-renders regardless of `type`.\n const [singleInner, setSingleInner] = useState<string | null>(\n type === 'single' ? (props.defaultValue ?? null) : null\n );\n const [multipleInner, setMultipleInner] = useState<string[]>(type === 'multiple' ? (props.defaultValue ?? []) : []);\n\n const singleControlled = type === 'single' && props.value !== undefined;\n const multipleControlled = type === 'multiple' && props.value !== undefined;\n\n const singleCurrent = type === 'single' ? (singleControlled ? (props.value ?? null) : singleInner) : null;\n const multipleCurrent = type === 'multiple' ? (multipleControlled ? (props.value ?? []) : multipleInner) : [];\n\n const isOpen = useCallback(\n (v: string) => {\n if (type === 'single') {\n return singleCurrent === v;\n }\n return multipleCurrent.includes(v);\n },\n [type, singleCurrent, multipleCurrent]\n );\n\n const toggle = useCallback(\n (v: string) => {\n if (type === 'single') {\n const next = singleCurrent === v ? (props.collapsible ? null : singleCurrent) : v;\n if (next === singleCurrent) {\n return;\n }\n if (!singleControlled) {\n setSingleInner(next);\n }\n props.onChange?.(next);\n } else {\n const has = multipleCurrent.includes(v);\n const next = has ? multipleCurrent.filter((x) => x !== v) : [...multipleCurrent, v];\n if (!multipleControlled) {\n setMultipleInner(next);\n }\n props.onChange?.(next);\n }\n },\n // The handler needs the latest snapshot of every prop — `props` is a\n // discriminated union so spreading it into the deps is the cleanest\n // way to keep both branches honest.\n [type, singleCurrent, multipleCurrent, singleControlled, multipleControlled, props]\n );\n\n const register = useCallback((v: string, ref: RefObject<HTMLElement | null>) => {\n refs.current.set(v, ref);\n if (!orderRef.current.includes(v)) {\n orderRef.current.push(v);\n }\n }, []);\n\n const unregister = useCallback((v: string) => {\n refs.current.delete(v);\n orderRef.current = orderRef.current.filter((x) => x !== v);\n }, []);\n\n const moveFocus = useCallback((offset: 1 | -1, fromValue: string) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const idx = order.indexOf(fromValue);\n const start = idx === -1 ? 0 : idx;\n const len = order.length;\n const next = order[(start + offset + len) % len];\n if (!next) {\n return;\n }\n refs.current.get(next)?.current?.focus?.();\n }, []);\n\n const focusEdge = useCallback((edge: 'first' | 'last') => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const target = edge === 'first' ? order[0] : order[order.length - 1];\n if (!target) {\n return;\n }\n refs.current.get(target)?.current?.focus?.();\n }, []);\n\n const ctxValue = useMemo<AccordionContextValue>(\n () => ({ baseId, isOpen, toggle, register, unregister, moveFocus, focusEdge }),\n [baseId, isOpen, toggle, register, unregister, moveFocus, focusEdge]\n );\n\n return (\n <AccordionContext.Provider value={ctxValue}>\n <View\n {...(testID !== undefined ? { testID } : {})}\n className={cn('flex-col w-full', className)}\n style={{ flexDirection: 'column', width: '100%' }}\n >\n {children}\n </View>\n </AccordionContext.Provider>\n );\n};\n\nexport type AccordionItemProps = {\n /** Stable identifier — links the item to `value` / `defaultValue` on the parent. */\n value: string;\n /** Disable expansion of this item. The trigger remains focusable for nav consistency. */\n disabled?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\nconst ITEM_BASE: ViewStyle = {\n borderBottomWidth: 1,\n flexDirection: 'column',\n};\n\n// Layout-only constants for the trigger / content; theme-driven sizes are\n// merged in inside the component below.\nconst TRIGGER_LAYOUT_BASE: ViewStyle = {\n minHeight: 44, // component-density literal — not from theme\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n};\n\nconst CONTENT_INNER_LAYOUT_BASE: ViewStyle = {\n // Padding values come from theme inside AccordionContent.\n};\n\n/** A single expandable section. Wraps an `Accordion.Trigger` and `Accordion.Content`. */\nexport const AccordionItem = ({ value, disabled = false, children, className, testID }: AccordionItemProps) => {\n const ctx = useAccordionContext('Accordion.Item');\n const colors = useThemeColors();\n const open = ctx.isOpen(value);\n\n const itemCtx = useMemo<AccordionItemContextValue>(\n () => ({\n value,\n open,\n disabled,\n triggerId: `${ctx.baseId}-trigger-${value}`,\n contentId: `${ctx.baseId}-content-${value}`,\n }),\n [value, open, disabled, ctx.baseId]\n );\n\n return (\n <AccordionItemContext.Provider value={itemCtx}>\n <View\n {...(testID !== undefined ? { testID } : {})}\n className={cn('flex-col border-b border-semantic-border-default', className)}\n style={[ITEM_BASE, { borderBottomColor: colors.semantic.border.default }]}\n >\n {children}\n </View>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type AccordionTriggerProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * The clickable row that toggles its item open / closed. Renders a real\n * `<button>` (via Pressable) and wires `aria-expanded` + `aria-controls` to\n * the matching `Accordion.Content`.\n */\nexport const AccordionTrigger = ({ children, className, testID }: AccordionTriggerProps) => {\n const ctx = useAccordionContext('Accordion.Trigger');\n const item = useAccordionItemContext('Accordion.Trigger');\n const colors = useThemeColors();\n const ownRef = useRef<HTMLElement | null>(null);\n const triggerStyle: ViewStyle = {\n ...TRIGGER_LAYOUT_BASE,\n paddingHorizontal: px(colors.spacing['4']),\n paddingVertical: px(colors.spacing['3']),\n gap: px(colors.spacing['3']),\n };\n\n useEffect(() => {\n ctx.register(item.value, ownRef);\n return () => ctx.unregister(item.value);\n }, [ctx, item.value]);\n\n const onPress = useCallback(() => {\n if (item.disabled) {\n return;\n }\n ctx.toggle(item.value);\n }, [ctx, item.value, item.disabled]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n ctx.moveFocus(1, item.value);\n return;\n case 'ArrowUp':\n event.preventDefault();\n ctx.moveFocus(-1, item.value);\n return;\n case 'Home':\n event.preventDefault();\n ctx.focusEdge('first');\n return;\n case 'End':\n event.preventDefault();\n ctx.focusEdge('last');\n return;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n if (!item.disabled) {\n ctx.toggle(item.value);\n }\n return;\n }\n }\n },\n [ctx, item.value, item.disabled]\n );\n\n // CSS transition for the chevron rotation on web. On native, RN expects\n // an array of transform objects (`[{ rotate: '180deg' }]`), so we branch\n // by platform to keep both ends rendering correctly. The web branch also\n // adds a CSS transition for a smooth rotation; native snaps (consumers\n // who want a spring can compose their own).\n const chevronStyle =\n Platform.OS === 'web'\n ? ({\n transition: 'transform 200ms ease',\n transform: `rotate(${item.open ? 180 : 0}deg)`,\n } as unknown as ViewStyle)\n : ({ transform: [{ rotate: item.open ? '180deg' : '0deg' }] } as ViewStyle);\n\n const triggerProps: Record<string, unknown> = {\n ref: (node: HTMLElement | null) => {\n ownRef.current = node;\n },\n role: 'button',\n accessibilityRole: 'button',\n 'aria-expanded': item.open,\n 'aria-controls': item.contentId,\n 'aria-disabled': item.disabled || undefined,\n id: item.triggerId,\n // Every trigger sits in the tab order — pressing Tab moves through\n // the accordion sequentially, then arrow keys take over once focused.\n tabIndex: 0,\n onPress,\n onKeyDown: handleKeyDown,\n ...(item.disabled ? { disabled: true } : {}),\n ...(testID !== undefined ? { testID } : {}),\n };\n\n return (\n <Pressable\n {...triggerProps}\n className={cn(\n 'flex-row items-center justify-between gap-3 px-4 py-3 min-h-[44px] hover:bg-semantic-background-subtle',\n item.disabled ? 'opacity-50' : 'opacity-100',\n className\n )}\n style={[triggerStyle, item.disabled ? { opacity: 0.5 } : null]}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n fontWeight: colors.fontWeight.medium as '500',\n flexShrink: 1,\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n <View aria-hidden={true} style={chevronStyle}>\n <defaultSemanticIcons.chevronDown size={18} color={colors.semantic.text.muted} />\n </View>\n </Pressable>\n );\n};\n\nexport type AccordionContentProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n /**\n * Keep the content mounted even when collapsed. Useful for forms that\n * shouldn't lose state, or content that's expensive to mount.\n * @defaultValue false\n */\n forceMount?: boolean;\n};\n\n// Animation timing — mirrors the Switch slide and the web CSS\n// transition exactly so the accordion feels identical on web and native.\nconst ACCORDION_ANIM_DURATION_MS = 200;\n\n/**\n * The collapsible body. On web it always mounts but slides open / closed\n * via an animated max-height + opacity transition (200ms ease). On native\n * it mounts in a measure-pass on first render to capture the natural\n * content height, then animates `height` + `opacity` via the shared\n * `useAnimatedNumber` primitive (200ms, cubic-bezier(0.16, 1, 0.3, 1) —\n * matches the Switch thumb slide).\n *\n * Implementation note: the web-side height + transition styles are pushed\n * onto the outer wrapper's DOM node via a ref + useEffect rather than\n * through the View's `style` prop. Reason: rn-web's style filter drops\n * keys it doesn't recognise as RN style props (`transition`, `maxHeight`\n * shorthand, etc.), taking the whole fragment with them. Direct DOM\n * mutation bypasses that filter — same trick used by Dialog's backdrop\n * blur.\n */\nexport const AccordionContent = ({\n children,\n className,\n testID,\n forceMount: _forceMount = false,\n}: AccordionContentProps) => {\n const item = useAccordionItemContext('Accordion.Content');\n const colors = useThemeColors();\n const wrapperRef = useRef<HTMLElement | null>(null);\n const innerRef = useRef<HTMLElement | null>(null);\n // Natural (open-state) height of the content, captured on first\n // layout. Re-captured if the layout reports a different size while\n // open (e.g. dynamic content).\n const [measuredHeight, setMeasuredHeight] = useState<number | null>(null);\n const innerStyle: ViewStyle = {\n ...CONTENT_INNER_LAYOUT_BASE,\n paddingHorizontal: px(colors.spacing['4']),\n paddingTop: px(colors.spacing['1']),\n paddingBottom: px(colors.spacing['3']),\n };\n\n // Slide open/close on web. We measure the natural height of the inner\n // content each time the open state flips, then animate the wrapper's\n // maxHeight to/from 0. Setting maxHeight: 'none' after the transition\n // would let the content grow if it later changes — but for the v0\n // accordion we expect static content, so we leave maxHeight at the\n // measured value (good enough; resize observer can come later).\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n const wrapper = wrapperRef.current;\n const inner = innerRef.current;\n if (!wrapper || !inner) {\n return;\n }\n\n // First-render shortcut: skip the animation when an item starts\n // already open (avoids the \"all items open then animate closed\"\n // flash on mount).\n const isFirstPaint = wrapper.dataset.noriPainted !== '1';\n wrapper.dataset.noriPainted = '1';\n\n wrapper.style.overflow = 'hidden';\n wrapper.style.transitionProperty = 'max-height, opacity';\n wrapper.style.transitionDuration = `${ACCORDION_ANIM_DURATION_MS}ms`;\n wrapper.style.transitionTimingFunction = 'cubic-bezier(0.16, 1, 0.3, 1)';\n\n if (item.open) {\n const target = inner.scrollHeight;\n if (isFirstPaint) {\n wrapper.style.maxHeight = `${target}px`;\n wrapper.style.opacity = '1';\n return;\n }\n // Animate from current measured 0px to the target height.\n wrapper.style.maxHeight = '0px';\n wrapper.style.opacity = '0';\n // Force a reflow so the start state actually applies before\n // we set the end state — otherwise the browser collapses\n // both into a single repaint and skips the animation.\n void wrapper.offsetHeight;\n requestAnimationFrame(() => {\n wrapper.style.maxHeight = `${target}px`;\n wrapper.style.opacity = '1';\n });\n } else {\n // Going from open → closed. Set the explicit current height\n // first so we have something to transition FROM (auto/none\n // doesn't transition).\n const current = inner.scrollHeight;\n wrapper.style.maxHeight = `${current}px`;\n wrapper.style.opacity = '1';\n void wrapper.offsetHeight;\n requestAnimationFrame(() => {\n wrapper.style.maxHeight = '0px';\n wrapper.style.opacity = '0';\n });\n }\n }, [item.open]);\n\n // Native height + opacity animation. Driven by `useAnimatedNumber`,\n // which dispatches per-property to a static-key reanimated worklet\n // (the plugin can't serialize closures over computed keys, so each\n // property gets its own static-key useAnimatedStyle inside the hook).\n //\n // Target values are derived from open + measured size. Before\n // measurement we still call the hooks (hook order must stay\n // stable); they animate to/from 0 which becomes a no-op until the\n // first onLayout fires.\n const targetHeight = item.open ? (measuredHeight ?? 0) : 0;\n const targetOpacity = item.open ? 1 : 0;\n const heightAnim = useAnimatedNumber('height', targetHeight, {\n duration: ACCORDION_ANIM_DURATION_MS,\n });\n const opacityAnim = useAnimatedNumber('opacity', targetOpacity, {\n duration: ACCORDION_ANIM_DURATION_MS,\n });\n\n const onInnerLayout = useCallback(\n (e: LayoutChangeEvent) => {\n if (Platform.OS === 'web') {\n return;\n }\n const next = e.nativeEvent.layout.height;\n if (next > 0 && next !== measuredHeight) {\n setMeasuredHeight(next);\n }\n },\n [measuredHeight]\n );\n\n // Native path: always mount the inner so we can measure its natural\n // height once. Before measurement, we render with `position:\n // absolute, opacity: 0` so the layout pass runs off-screen and\n // doesn't affect the surrounding flow (avoids the \"flash of fully-\n // open content\" on first paint of an initially-closed item).\n // After measurement, the outer Animated.View drives height +\n // opacity together.\n if (Platform.OS !== 'web') {\n const animatedWrapperStyle: ViewStyle = {\n overflow: 'hidden',\n };\n // Pre-measurement: render the inner off-screen for one layout\n // pass. The wrapper claims 0 height in the flow so the next\n // sibling is positioned correctly until we know the real size.\n if (measuredHeight === null) {\n return (\n <AnimatedView\n {...(testID !== undefined ? { testID } : {})}\n accessibilityRole=\"none\"\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n style={[animatedWrapperStyle, { height: 0 }]}\n className={cn('overflow-hidden', className)}\n >\n <View\n onLayout={onInnerLayout}\n className={cn('px-4 pt-1 pb-3')}\n // Absolute + left/right:0 stretches the measurement\n // pass to the parent's full width, so wrapping text\n // measures at its REAL natural height. Without\n // left/right, Yoga gives an absolute child width 0\n // and the measurement collapses to a few pixels.\n style={[innerStyle, { position: 'absolute', left: 0, right: 0, opacity: 0 }]}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </AnimatedView>\n );\n }\n return (\n <AnimatedView\n {...(testID !== undefined ? { testID } : {})}\n accessibilityRole=\"none\"\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n style={[animatedWrapperStyle, heightAnim as object]}\n className={cn('overflow-hidden', className)}\n >\n <AnimatedView style={opacityAnim as object}>\n {/* No `onLayout` on this inner — once we've captured\n the natural height in the measurement pass above,\n re-measuring here during the animation would see\n the CLIPPED height (the parent is mid-transition\n between 0 and the target) and clobber\n `measuredHeight` with that smaller value, freezing\n the open state at one line. Single-shot measurement\n is fine for static content; remeasuring on content\n change is a follow-up. */}\n <View className={cn('px-4 pt-1 pb-3')} style={innerStyle}>\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </AnimatedView>\n </AnimatedView>\n );\n }\n\n return (\n <View\n ref={(node: unknown) => {\n wrapperRef.current = node as HTMLElement | null;\n }}\n {...(testID !== undefined ? { testID } : {})}\n role=\"region\"\n accessibilityRole=\"none\"\n id={item.contentId}\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n className={cn('overflow-hidden', className)}\n >\n <View\n ref={(node: unknown) => {\n innerRef.current = node as HTMLElement | null;\n }}\n className={cn('px-4 pt-1 pb-3')}\n style={innerStyle}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </View>\n );\n};\n\n/**\n * Public `Accordion` value — the root function plus its `.Item`, `.Trigger`,\n * and `.Content` static members. `Object.assign` produces a value whose\n * inferred type carries the static properties, so `.d.ts` consumers can\n * write `<Accordion.Item>` without a separate import.\n */\nexport const Accordion = Object.assign(AccordionRoot, {\n Item: AccordionItem,\n Trigger: AccordionTrigger,\n Content: AccordionContent,\n});\n"]}
1
+ {"version":3,"sources":["../src/components/Accordion/Accordion.tsx"],"names":["RNText"],"mappings":";;;;;;;;;;;AAs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kBAAA,CAAA;AAyPzB,IAAM,SAAA,GAAY,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe;AAAA,EAClD,IAAA,EAAM,aAAA;AAAA,EACN,OAAA,EAAS,gBAAA;AAAA,EACT,OAAA,EAAS;AACb,CAAC","file":"chunk-QB6RH6UU.js","sourcesContent":["'use client';\n\nimport {\n createContext,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native';\nimport { Platform, Pressable, Text as RNText, View } from 'react-native';\nimport { AnimatedView } from '../../animation/animated-view';\nimport { useAnimatedNumber } from '../../animation/use-animated-number';\nimport { defaultSemanticIcons } from '../../icons/default-semantic-icons';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type AccordionType = 'single' | 'multiple';\n\ntype SingleProps = {\n /** One-at-a-time mode. */\n type: 'single';\n /** Controlled open value. Pass `null` (with `collapsible`) for \"nothing open\". */\n value?: string | null;\n /** Uncontrolled initial open value. */\n defaultValue?: string;\n /** Fires when the open value changes. Receives the new value (string), or `null` if collapsed. */\n onChange?: (next: string | null) => void;\n /** Allow closing the open item by clicking it again. @defaultValue false */\n collapsible?: boolean;\n};\n\ntype MultipleProps = {\n /** Any combination open. */\n type: 'multiple';\n /** Controlled list of open values. */\n value?: string[];\n /** Uncontrolled initial list of open values. */\n defaultValue?: string[];\n /** Fires when the open list changes. Receives the new list. */\n onChange?: (next: string[]) => void;\n /** No-op in `multiple` mode (items are always individually collapsible). */\n collapsible?: never;\n};\n\ntype CommonProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\nexport type AccordionProps = (SingleProps | MultipleProps) & CommonProps;\n\ntype AccordionContextValue = {\n baseId: string;\n isOpen: (value: string) => boolean;\n toggle: (value: string) => void;\n register: (value: string, ref: RefObject<HTMLElement | null>) => void;\n unregister: (value: string) => void;\n moveFocus: (offset: 1 | -1, fromValue: string) => void;\n focusEdge: (edge: 'first' | 'last') => void;\n};\n\nconst AccordionContext = createContext<AccordionContextValue | null>(null);\n\nconst useAccordionContext = (label: string): AccordionContextValue => {\n const ctx = useContext(AccordionContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <Accordion>.`);\n }\n return ctx;\n};\n\ntype AccordionItemContextValue = {\n value: string;\n open: boolean;\n disabled: boolean;\n triggerId: string;\n contentId: string;\n};\n\nconst AccordionItemContext = createContext<AccordionItemContextValue | null>(null);\n\nconst useAccordionItemContext = (label: string): AccordionItemContextValue => {\n const ctx = useContext(AccordionItemContext);\n if (!ctx) {\n throw new Error(`<${label}> must be rendered inside an <Accordion.Item>.`);\n }\n return ctx;\n};\n\n/**\n * Vertically stacked, individually expandable sections. Compose:\n *\n * <Accordion type=\"single\" defaultValue=\"overview\" collapsible>\n * <Accordion.Item value=\"overview\">\n * <Accordion.Trigger>Overview</Accordion.Trigger>\n * <Accordion.Content>...</Accordion.Content>\n * </Accordion.Item>\n * </Accordion>\n *\n * Modes:\n * - `single` — at most one item open. Pass `collapsible` to allow closing the\n * open item.\n * - `multiple` — any combination open. `value` / `defaultValue` are arrays.\n *\n * Controlled (`value` + `onChange`) and uncontrolled (`defaultValue`) both\n * supported. Triggers are real `<button>`s with full keyboard nav: ArrowDown /\n * ArrowUp move focus, Home / End jump to first / last, Enter / Space toggle.\n */\nconst AccordionRoot = (props: AccordionProps) => {\n const baseId = useId();\n const refs = useRef<Map<string, RefObject<HTMLElement | null>>>(new Map());\n const orderRef = useRef<string[]>([]);\n\n // Pull out the props we always need; the discriminated union handlers below\n // narrow on `type` for the actual state logic.\n const { type, children, className, testID } = props;\n\n // Single-mode internal state. We always allocate both state slots so the\n // hook order stays stable across re-renders regardless of `type`.\n const [singleInner, setSingleInner] = useState<string | null>(\n type === 'single' ? (props.defaultValue ?? null) : null\n );\n const [multipleInner, setMultipleInner] = useState<string[]>(type === 'multiple' ? (props.defaultValue ?? []) : []);\n\n const singleControlled = type === 'single' && props.value !== undefined;\n const multipleControlled = type === 'multiple' && props.value !== undefined;\n\n const singleCurrent = type === 'single' ? (singleControlled ? (props.value ?? null) : singleInner) : null;\n const multipleCurrent = type === 'multiple' ? (multipleControlled ? (props.value ?? []) : multipleInner) : [];\n\n const isOpen = useCallback(\n (v: string) => {\n if (type === 'single') {\n return singleCurrent === v;\n }\n return multipleCurrent.includes(v);\n },\n [type, singleCurrent, multipleCurrent]\n );\n\n const toggle = useCallback(\n (v: string) => {\n if (type === 'single') {\n const next = singleCurrent === v ? (props.collapsible ? null : singleCurrent) : v;\n if (next === singleCurrent) {\n return;\n }\n if (!singleControlled) {\n setSingleInner(next);\n }\n props.onChange?.(next);\n } else {\n const has = multipleCurrent.includes(v);\n const next = has ? multipleCurrent.filter((x) => x !== v) : [...multipleCurrent, v];\n if (!multipleControlled) {\n setMultipleInner(next);\n }\n props.onChange?.(next);\n }\n },\n // The handler needs the latest snapshot of every prop — `props` is a\n // discriminated union so spreading it into the deps is the cleanest\n // way to keep both branches honest.\n [type, singleCurrent, multipleCurrent, singleControlled, multipleControlled, props]\n );\n\n const register = useCallback((v: string, ref: RefObject<HTMLElement | null>) => {\n refs.current.set(v, ref);\n if (!orderRef.current.includes(v)) {\n orderRef.current.push(v);\n }\n }, []);\n\n const unregister = useCallback((v: string) => {\n refs.current.delete(v);\n orderRef.current = orderRef.current.filter((x) => x !== v);\n }, []);\n\n const moveFocus = useCallback((offset: 1 | -1, fromValue: string) => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const idx = order.indexOf(fromValue);\n const start = idx === -1 ? 0 : idx;\n const len = order.length;\n const next = order[(start + offset + len) % len];\n if (!next) {\n return;\n }\n refs.current.get(next)?.current?.focus?.();\n }, []);\n\n const focusEdge = useCallback((edge: 'first' | 'last') => {\n const order = orderRef.current;\n if (order.length === 0) {\n return;\n }\n const target = edge === 'first' ? order[0] : order[order.length - 1];\n if (!target) {\n return;\n }\n refs.current.get(target)?.current?.focus?.();\n }, []);\n\n const ctxValue = useMemo<AccordionContextValue>(\n () => ({ baseId, isOpen, toggle, register, unregister, moveFocus, focusEdge }),\n [baseId, isOpen, toggle, register, unregister, moveFocus, focusEdge]\n );\n\n return (\n <AccordionContext.Provider value={ctxValue}>\n <View\n {...(testID !== undefined ? { testID } : {})}\n className={cn('flex-col w-full', className)}\n style={{ flexDirection: 'column', width: '100%' }}\n >\n {children}\n </View>\n </AccordionContext.Provider>\n );\n};\n\nexport type AccordionItemProps = {\n /** Stable identifier — links the item to `value` / `defaultValue` on the parent. */\n value: string;\n /** Disable expansion of this item. The trigger remains focusable for nav consistency. */\n disabled?: boolean;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\nconst ITEM_BASE: ViewStyle = {\n borderBottomWidth: 1,\n flexDirection: 'column',\n};\n\n// Layout-only constants for the trigger / content; theme-driven sizes are\n// merged in inside the component below.\nconst TRIGGER_LAYOUT_BASE: ViewStyle = {\n minHeight: 44, // component-density literal — not from theme\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n};\n\nconst CONTENT_INNER_LAYOUT_BASE: ViewStyle = {\n // Padding values come from theme inside AccordionContent.\n};\n\n/** A single expandable section. Wraps an `Accordion.Trigger` and `Accordion.Content`. */\nexport const AccordionItem = ({ value, disabled = false, children, className, testID }: AccordionItemProps) => {\n const ctx = useAccordionContext('Accordion.Item');\n const colors = useThemeColors();\n const open = ctx.isOpen(value);\n\n const itemCtx = useMemo<AccordionItemContextValue>(\n () => ({\n value,\n open,\n disabled,\n triggerId: `${ctx.baseId}-trigger-${value}`,\n contentId: `${ctx.baseId}-content-${value}`,\n }),\n [value, open, disabled, ctx.baseId]\n );\n\n return (\n <AccordionItemContext.Provider value={itemCtx}>\n <View\n {...(testID !== undefined ? { testID } : {})}\n className={cn('flex-col border-b border-semantic-border-default', className)}\n style={[ITEM_BASE, { borderBottomColor: colors.semantic.border.default }]}\n >\n {children}\n </View>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type AccordionTriggerProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * The clickable row that toggles its item open / closed. Renders a real\n * `<button>` (via Pressable) and wires `aria-expanded` + `aria-controls` to\n * the matching `Accordion.Content`.\n */\nexport const AccordionTrigger = ({ children, className, testID }: AccordionTriggerProps) => {\n const ctx = useAccordionContext('Accordion.Trigger');\n const item = useAccordionItemContext('Accordion.Trigger');\n const colors = useThemeColors();\n const ownRef = useRef<HTMLElement | null>(null);\n const triggerStyle: ViewStyle = {\n ...TRIGGER_LAYOUT_BASE,\n paddingHorizontal: px(colors.spacing['4']),\n paddingVertical: px(colors.spacing['3']),\n gap: px(colors.spacing['3']),\n };\n\n useEffect(() => {\n ctx.register(item.value, ownRef);\n return () => ctx.unregister(item.value);\n }, [ctx, item.value]);\n\n const onPress = useCallback(() => {\n if (item.disabled) {\n return;\n }\n ctx.toggle(item.value);\n }, [ctx, item.value, item.disabled]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n ctx.moveFocus(1, item.value);\n return;\n case 'ArrowUp':\n event.preventDefault();\n ctx.moveFocus(-1, item.value);\n return;\n case 'Home':\n event.preventDefault();\n ctx.focusEdge('first');\n return;\n case 'End':\n event.preventDefault();\n ctx.focusEdge('last');\n return;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n if (!item.disabled) {\n ctx.toggle(item.value);\n }\n return;\n }\n }\n },\n [ctx, item.value, item.disabled]\n );\n\n // CSS transition for the chevron rotation on web. On native, RN expects\n // an array of transform objects (`[{ rotate: '180deg' }]`), so we branch\n // by platform to keep both ends rendering correctly. The web branch also\n // adds a CSS transition for a smooth rotation; native snaps (consumers\n // who want a spring can compose their own).\n const chevronStyle =\n Platform.OS === 'web'\n ? ({\n transition: 'transform 200ms ease',\n transform: `rotate(${item.open ? 180 : 0}deg)`,\n } as unknown as ViewStyle)\n : ({ transform: [{ rotate: item.open ? '180deg' : '0deg' }] } as ViewStyle);\n\n const triggerProps: Record<string, unknown> = {\n ref: (node: HTMLElement | null) => {\n ownRef.current = node;\n },\n role: 'button',\n accessibilityRole: 'button',\n 'aria-expanded': item.open,\n 'aria-controls': item.contentId,\n 'aria-disabled': item.disabled || undefined,\n id: item.triggerId,\n // Every trigger sits in the tab order — pressing Tab moves through\n // the accordion sequentially, then arrow keys take over once focused.\n tabIndex: 0,\n onPress,\n onKeyDown: handleKeyDown,\n ...(item.disabled ? { disabled: true } : {}),\n ...(testID !== undefined ? { testID } : {}),\n };\n\n return (\n <Pressable\n {...triggerProps}\n className={cn(\n 'flex-row items-center justify-between gap-3 px-4 py-3 min-h-[44px] hover:bg-semantic-background-subtle',\n item.disabled ? 'opacity-50' : 'opacity-100',\n className\n )}\n style={[triggerStyle, item.disabled ? { opacity: 0.5 } : null]}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n fontWeight: colors.fontWeight.medium as '500',\n flexShrink: 1,\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n <View aria-hidden={true} style={chevronStyle}>\n <defaultSemanticIcons.chevronDown size={18} color={colors.semantic.text.muted} />\n </View>\n </Pressable>\n );\n};\n\nexport type AccordionContentProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n /**\n * Keep the content mounted even when collapsed. Useful for forms that\n * shouldn't lose state, or content that's expensive to mount.\n * @defaultValue false\n */\n forceMount?: boolean;\n};\n\n// Animation timing — mirrors the Switch slide and the web CSS\n// transition exactly so the accordion feels identical on web and native.\nconst ACCORDION_ANIM_DURATION_MS = 200;\n\n/**\n * The collapsible body. On web it always mounts but slides open / closed\n * via an animated max-height + opacity transition (200ms ease). On native\n * it mounts in a measure-pass on first render to capture the natural\n * content height, then animates `height` + `opacity` via the shared\n * `useAnimatedNumber` primitive (200ms, cubic-bezier(0.16, 1, 0.3, 1) —\n * matches the Switch thumb slide).\n *\n * Implementation note: the web-side height + transition styles are pushed\n * onto the outer wrapper's DOM node via a ref + useEffect rather than\n * through the View's `style` prop. Reason: rn-web's style filter drops\n * keys it doesn't recognise as RN style props (`transition`, `maxHeight`\n * shorthand, etc.), taking the whole fragment with them. Direct DOM\n * mutation bypasses that filter — same trick used by Dialog's backdrop\n * blur.\n */\nexport const AccordionContent = ({\n children,\n className,\n testID,\n forceMount: _forceMount = false,\n}: AccordionContentProps) => {\n const item = useAccordionItemContext('Accordion.Content');\n const colors = useThemeColors();\n const wrapperRef = useRef<HTMLElement | null>(null);\n const innerRef = useRef<HTMLElement | null>(null);\n // Natural (open-state) height of the content, captured on first\n // layout. Re-captured if the layout reports a different size while\n // open (e.g. dynamic content).\n const [measuredHeight, setMeasuredHeight] = useState<number | null>(null);\n const innerStyle: ViewStyle = {\n ...CONTENT_INNER_LAYOUT_BASE,\n paddingHorizontal: px(colors.spacing['4']),\n paddingTop: px(colors.spacing['1']),\n paddingBottom: px(colors.spacing['3']),\n };\n\n // Slide open/close on web. We measure the natural height of the inner\n // content each time the open state flips, then animate the wrapper's\n // maxHeight to/from 0. Setting maxHeight: 'none' after the transition\n // would let the content grow if it later changes — but for the v0\n // accordion we expect static content, so we leave maxHeight at the\n // measured value (good enough; resize observer can come later).\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n const wrapper = wrapperRef.current;\n const inner = innerRef.current;\n if (!wrapper || !inner) {\n return;\n }\n\n // First-render shortcut: skip the animation when an item starts\n // already open (avoids the \"all items open then animate closed\"\n // flash on mount).\n const isFirstPaint = wrapper.dataset.noriPainted !== '1';\n wrapper.dataset.noriPainted = '1';\n\n wrapper.style.overflow = 'hidden';\n wrapper.style.transitionProperty = 'max-height, opacity';\n wrapper.style.transitionDuration = `${ACCORDION_ANIM_DURATION_MS}ms`;\n wrapper.style.transitionTimingFunction = 'cubic-bezier(0.16, 1, 0.3, 1)';\n\n if (item.open) {\n const target = inner.scrollHeight;\n if (isFirstPaint) {\n wrapper.style.maxHeight = `${target}px`;\n wrapper.style.opacity = '1';\n return;\n }\n // Animate from current measured 0px to the target height.\n wrapper.style.maxHeight = '0px';\n wrapper.style.opacity = '0';\n // Force a reflow so the start state actually applies before\n // we set the end state — otherwise the browser collapses\n // both into a single repaint and skips the animation.\n void wrapper.offsetHeight;\n requestAnimationFrame(() => {\n wrapper.style.maxHeight = `${target}px`;\n wrapper.style.opacity = '1';\n });\n } else {\n // Going from open → closed. Set the explicit current height\n // first so we have something to transition FROM (auto/none\n // doesn't transition).\n const current = inner.scrollHeight;\n wrapper.style.maxHeight = `${current}px`;\n wrapper.style.opacity = '1';\n void wrapper.offsetHeight;\n requestAnimationFrame(() => {\n wrapper.style.maxHeight = '0px';\n wrapper.style.opacity = '0';\n });\n }\n }, [item.open]);\n\n // Native height + opacity animation. Driven by `useAnimatedNumber`,\n // which dispatches per-property to a static-key reanimated worklet\n // (the plugin can't serialize closures over computed keys, so each\n // property gets its own static-key useAnimatedStyle inside the hook).\n //\n // Target values are derived from open + measured size. Before\n // measurement we still call the hooks (hook order must stay\n // stable); they animate to/from 0 which becomes a no-op until the\n // first onLayout fires.\n const targetHeight = item.open ? (measuredHeight ?? 0) : 0;\n const targetOpacity = item.open ? 1 : 0;\n const heightAnim = useAnimatedNumber('height', targetHeight, {\n duration: ACCORDION_ANIM_DURATION_MS,\n });\n const opacityAnim = useAnimatedNumber('opacity', targetOpacity, {\n duration: ACCORDION_ANIM_DURATION_MS,\n });\n\n const onInnerLayout = useCallback(\n (e: LayoutChangeEvent) => {\n if (Platform.OS === 'web') {\n return;\n }\n const next = e.nativeEvent.layout.height;\n if (next > 0 && next !== measuredHeight) {\n setMeasuredHeight(next);\n }\n },\n [measuredHeight]\n );\n\n // Native path: always mount the inner so we can measure its natural\n // height once. Before measurement, we render with `position:\n // absolute, opacity: 0` so the layout pass runs off-screen and\n // doesn't affect the surrounding flow (avoids the \"flash of fully-\n // open content\" on first paint of an initially-closed item).\n // After measurement, the outer Animated.View drives height +\n // opacity together.\n if (Platform.OS !== 'web') {\n const animatedWrapperStyle: ViewStyle = {\n overflow: 'hidden',\n };\n // Pre-measurement: render the inner off-screen for one layout\n // pass. The wrapper claims 0 height in the flow so the next\n // sibling is positioned correctly until we know the real size.\n if (measuredHeight === null) {\n return (\n <AnimatedView\n {...(testID !== undefined ? { testID } : {})}\n accessibilityRole=\"none\"\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n style={[animatedWrapperStyle, { height: 0 }]}\n className={cn('overflow-hidden', className)}\n >\n <View\n onLayout={onInnerLayout}\n className={cn('px-4 pt-1 pb-3')}\n // Absolute + left/right:0 stretches the measurement\n // pass to the parent's full width, so wrapping text\n // measures at its REAL natural height. Without\n // left/right, Yoga gives an absolute child width 0\n // and the measurement collapses to a few pixels.\n style={[innerStyle, { position: 'absolute', left: 0, right: 0, opacity: 0 }]}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </AnimatedView>\n );\n }\n return (\n <AnimatedView\n {...(testID !== undefined ? { testID } : {})}\n accessibilityRole=\"none\"\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n style={[animatedWrapperStyle, heightAnim as object]}\n className={cn('overflow-hidden', className)}\n >\n <AnimatedView style={opacityAnim as object}>\n {/* No `onLayout` on this inner — once we've captured\n the natural height in the measurement pass above,\n re-measuring here during the animation would see\n the CLIPPED height (the parent is mid-transition\n between 0 and the target) and clobber\n `measuredHeight` with that smaller value, freezing\n the open state at one line. Single-shot measurement\n is fine for static content; remeasuring on content\n change is a follow-up. */}\n <View className={cn('px-4 pt-1 pb-3')} style={innerStyle}>\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </AnimatedView>\n </AnimatedView>\n );\n }\n\n return (\n <View\n ref={(node: unknown) => {\n wrapperRef.current = node as HTMLElement | null;\n }}\n {...(testID !== undefined ? { testID } : {})}\n role=\"region\"\n accessibilityRole=\"none\"\n id={item.contentId}\n aria-labelledby={item.triggerId}\n aria-hidden={!item.open}\n className={cn('overflow-hidden', className)}\n >\n <View\n ref={(node: unknown) => {\n innerRef.current = node as HTMLElement | null;\n }}\n className={cn('px-4 pt-1 pb-3')}\n style={innerStyle}\n >\n {typeof children === 'string' ? (\n <RNText\n style={{\n color: colors.semantic.text.muted,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.sm),\n lineHeight: px(colors.fontSize.sm) * Number(colors.lineHeight.normal),\n }}\n >\n {children}\n </RNText>\n ) : (\n children\n )}\n </View>\n </View>\n );\n};\n\n/**\n * Public `Accordion` value — the root function plus its `.Item`, `.Trigger`,\n * and `.Content` static members. `Object.assign` produces a value whose\n * inferred type carries the static properties, so `.d.ts` consumers can\n * write `<Accordion.Item>` without a separate import.\n */\nexport const Accordion = Object.assign(AccordionRoot, {\n Item: AccordionItem,\n Trigger: AccordionTrigger,\n Content: AccordionContent,\n});\n"]}
@@ -0,0 +1,350 @@
1
+ import { px } from './chunk-5A2QOOVN.js';
2
+ import { useThemeColors } from './chunk-R5JMDDCB.js';
3
+ import { cn } from './chunk-CHXHRJNZ.js';
4
+ import { __name } from './chunk-WCQVDF3K.js';
5
+ import { createContext, useContext, useState, useId, useCallback } from 'react';
6
+ import { Platform, View, Pressable, Text, ScrollView } from 'react-native';
7
+ import { jsx, jsxs } from 'nativewind/jsx-runtime';
8
+
9
+ var SidebarContext = createContext(null);
10
+ function useSidebarContext(caller) {
11
+ const ctx = useContext(SidebarContext);
12
+ if (!ctx) {
13
+ throw new Error(`<${caller}> must be rendered inside <Sidebar>.`);
14
+ }
15
+ return ctx;
16
+ }
17
+ __name(useSidebarContext, "useSidebarContext");
18
+ var EXPANDED_WIDTH = 240;
19
+ var COLLAPSED_WIDTH = 56;
20
+ var SidebarRoot = /* @__PURE__ */ __name(({
21
+ collapsed,
22
+ defaultCollapsed = false,
23
+ onCollapsedChange,
24
+ side = "left",
25
+ variant = "standard",
26
+ children,
27
+ className,
28
+ testID
29
+ }) => {
30
+ const [inner, setInner] = useState(defaultCollapsed);
31
+ const isControlled = collapsed !== void 0;
32
+ const current = isControlled ? collapsed : inner;
33
+ const navId = useId();
34
+ const colors = useThemeColors();
35
+ const setCollapsed = useCallback(
36
+ (next) => {
37
+ if (!isControlled) {
38
+ setInner(next);
39
+ }
40
+ onCollapsedChange?.(next);
41
+ },
42
+ [isControlled, onCollapsedChange]
43
+ );
44
+ const toggleCollapsed = useCallback(() => {
45
+ setCollapsed(!current);
46
+ }, [current, setCollapsed]);
47
+ const ctxValue = {
48
+ collapsed: current,
49
+ setCollapsed,
50
+ toggleCollapsed,
51
+ navId
52
+ };
53
+ const width = current ? COLLAPSED_WIDTH : EXPANDED_WIDTH;
54
+ const containerStyle = Platform.OS === "web" ? {
55
+ position: "fixed",
56
+ top: 0,
57
+ bottom: 0,
58
+ [side]: 0,
59
+ width,
60
+ transitionProperty: "width",
61
+ transitionDuration: "200ms",
62
+ transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
63
+ display: "flex",
64
+ flexDirection: "column",
65
+ overflow: "hidden",
66
+ zIndex: 40
67
+ } : {
68
+ width,
69
+ flexDirection: "column",
70
+ overflow: "hidden"
71
+ };
72
+ const variantStyle = Platform.OS === "web" ? variant === "floating" ? {
73
+ margin: 8,
74
+ borderRadius: colors.radius.lg,
75
+ top: 8,
76
+ bottom: 8,
77
+ height: "auto"
78
+ } : variant === "inset" ? {
79
+ boxShadow: "4px 0 16px rgba(0,0,0,0.08)"
80
+ } : {} : {};
81
+ const rootStyle = {
82
+ ...containerStyle,
83
+ ...variantStyle,
84
+ backgroundColor: colors.semantic.background.elevated,
85
+ borderRightWidth: variant !== "floating" ? 1 : 0,
86
+ borderRightColor: colors.semantic.border.default
87
+ };
88
+ if (Platform.OS === "web") {
89
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(
90
+ "nav",
91
+ {
92
+ id: navId,
93
+ "aria-label": "Sidebar",
94
+ "data-collapsed": current,
95
+ "data-side": side,
96
+ "data-variant": variant,
97
+ "data-testid": testID,
98
+ className: cn(
99
+ "nori-sidebar flex flex-col overflow-hidden transition-[width] duration-200",
100
+ className
101
+ ),
102
+ style: rootStyle,
103
+ children
104
+ }
105
+ ) });
106
+ }
107
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx(View, { style: rootStyle, testID, accessibilityRole: "menu", accessibilityLabel: "Sidebar", children }) });
108
+ }, "SidebarRoot");
109
+ var SidebarHeader = /* @__PURE__ */ __name(({ children, className, testID }) => {
110
+ const colors = useThemeColors();
111
+ const style = {
112
+ padding: px(colors.spacing["4"]),
113
+ borderBottomWidth: 1,
114
+ borderBottomColor: colors.semantic.border.default,
115
+ flexDirection: "row",
116
+ alignItems: "center",
117
+ gap: px(colors.spacing["2"]),
118
+ overflow: "hidden"
119
+ };
120
+ if (Platform.OS === "web") {
121
+ return /* @__PURE__ */ jsx(
122
+ "div",
123
+ {
124
+ "data-testid": testID,
125
+ className: cn("nori-sidebar-header", className),
126
+ style,
127
+ children
128
+ }
129
+ );
130
+ }
131
+ return /* @__PURE__ */ jsx(View, { style, testID, children });
132
+ }, "SidebarHeader");
133
+ var SidebarContent = /* @__PURE__ */ __name(({ children, className, testID }) => {
134
+ const style = { flex: 1, overflow: "hidden" };
135
+ if (Platform.OS === "web") {
136
+ return /* @__PURE__ */ jsx(
137
+ "div",
138
+ {
139
+ "data-testid": testID,
140
+ className: cn("nori-sidebar-content", className),
141
+ style: { flex: 1, overflowY: "auto", overflowX: "hidden" },
142
+ children
143
+ }
144
+ );
145
+ }
146
+ return /* @__PURE__ */ jsx(ScrollView, { style, testID, contentContainerStyle: { flexGrow: 1 }, children });
147
+ }, "SidebarContent");
148
+ var SidebarFooter = /* @__PURE__ */ __name(({ children, className, testID }) => {
149
+ const colors = useThemeColors();
150
+ const style = {
151
+ padding: px(colors.spacing["4"]),
152
+ borderTopWidth: 1,
153
+ borderTopColor: colors.semantic.border.default,
154
+ overflow: "hidden"
155
+ };
156
+ if (Platform.OS === "web") {
157
+ return /* @__PURE__ */ jsx(
158
+ "div",
159
+ {
160
+ "data-testid": testID,
161
+ className: cn("nori-sidebar-footer", className),
162
+ style,
163
+ children
164
+ }
165
+ );
166
+ }
167
+ return /* @__PURE__ */ jsx(View, { style, testID, children });
168
+ }, "SidebarFooter");
169
+ var SidebarGroup = /* @__PURE__ */ __name(({ children, className, testID }) => {
170
+ const colors = useThemeColors();
171
+ const style = {
172
+ paddingTop: px(colors.spacing["2"]),
173
+ paddingBottom: px(colors.spacing["2"])
174
+ };
175
+ if (Platform.OS === "web") {
176
+ return /* @__PURE__ */ jsx(
177
+ "div",
178
+ {
179
+ "data-testid": testID,
180
+ className: cn("nori-sidebar-group", className),
181
+ style,
182
+ children
183
+ }
184
+ );
185
+ }
186
+ return /* @__PURE__ */ jsx(View, { style, testID, children });
187
+ }, "SidebarGroup");
188
+ var SidebarGroupLabel = /* @__PURE__ */ __name(({ children, className, testID }) => {
189
+ const ctx = useSidebarContext("Sidebar.GroupLabel");
190
+ const colors = useThemeColors();
191
+ if (ctx.collapsed) {
192
+ return null;
193
+ }
194
+ const style = {
195
+ paddingHorizontal: px(colors.spacing["4"]),
196
+ paddingVertical: px(colors.spacing["1"])
197
+ };
198
+ const textStyle = {
199
+ fontSize: 11,
200
+ fontWeight: "600",
201
+ letterSpacing: 0.5,
202
+ textTransform: "uppercase",
203
+ color: colors.semantic.text.muted
204
+ };
205
+ if (Platform.OS === "web") {
206
+ return /* @__PURE__ */ jsx(
207
+ "div",
208
+ {
209
+ "data-testid": testID,
210
+ className: cn("nori-sidebar-group-label", className),
211
+ style,
212
+ children: /* @__PURE__ */ jsx("span", { style: textStyle, children })
213
+ }
214
+ );
215
+ }
216
+ return /* @__PURE__ */ jsx(View, { style, testID, children: /* @__PURE__ */ jsx(Text, { style: textStyle, children }) });
217
+ }, "SidebarGroupLabel");
218
+ var SidebarMenu = /* @__PURE__ */ __name(({ children, className, testID }) => {
219
+ const colors = useThemeColors();
220
+ const style = {
221
+ paddingHorizontal: px(colors.spacing["2"]),
222
+ gap: px(colors.spacing["1"])
223
+ };
224
+ if (Platform.OS === "web") {
225
+ return /* @__PURE__ */ jsx(
226
+ "ul",
227
+ {
228
+ "data-testid": testID,
229
+ className: cn("nori-sidebar-menu", className),
230
+ style: {
231
+ ...style,
232
+ listStyle: "none",
233
+ margin: 0,
234
+ padding: `0 ${colors.spacing["2"]}px`
235
+ },
236
+ children
237
+ }
238
+ );
239
+ }
240
+ return /* @__PURE__ */ jsx(View, { style, testID, children });
241
+ }, "SidebarMenu");
242
+ var SidebarMenuItem = /* @__PURE__ */ __name(({
243
+ icon,
244
+ active = false,
245
+ disabled = false,
246
+ onPress,
247
+ children,
248
+ className,
249
+ testID
250
+ }) => {
251
+ const ctx = useSidebarContext("Sidebar.MenuItem");
252
+ const colors = useThemeColors();
253
+ const itemStyle = {
254
+ flexDirection: "row",
255
+ alignItems: "center",
256
+ borderRadius: px(colors.radius.md),
257
+ paddingHorizontal: px(colors.spacing["3"]),
258
+ paddingVertical: px(colors.spacing["2"]),
259
+ gap: px(colors.spacing["3"]),
260
+ opacity: disabled ? 0.5 : 1,
261
+ ...ctx.collapsed ? { justifyContent: "center", paddingHorizontal: px(colors.spacing["2"]) } : {}
262
+ };
263
+ const activeBg = colors.semantic.interactive.primary;
264
+ const labelStr = typeof children === "string" ? children : void 0;
265
+ const labelTextStyle = {
266
+ fontSize: 14,
267
+ fontWeight: active ? "600" : "400",
268
+ color: active ? colors.semantic.text.default : colors.semantic.text.muted,
269
+ flex: 1
270
+ };
271
+ if (Platform.OS === "web") {
272
+ return /* @__PURE__ */ jsx("li", { style: { listStyle: "none" }, children: /* @__PURE__ */ jsxs(
273
+ "button",
274
+ {
275
+ type: "button",
276
+ "data-testid": testID,
277
+ "aria-current": active ? "page" : void 0,
278
+ "aria-disabled": disabled,
279
+ title: ctx.collapsed && labelStr ? labelStr : void 0,
280
+ disabled,
281
+ onClick: disabled ? void 0 : onPress,
282
+ className: cn("nori-sidebar-menu-item", className),
283
+ style: {
284
+ display: "flex",
285
+ alignItems: "center",
286
+ gap: colors.spacing["3"],
287
+ width: "100%",
288
+ textAlign: "left",
289
+ border: "none",
290
+ cursor: disabled ? "not-allowed" : "pointer",
291
+ borderRadius: colors.radius.md,
292
+ padding: ctx.collapsed ? `${colors.spacing["2"]}px` : `${colors.spacing["2"]}px ${colors.spacing["3"]}px`,
293
+ justifyContent: ctx.collapsed ? "center" : "flex-start",
294
+ background: active ? `${activeBg}1a` : "transparent",
295
+ opacity: disabled ? 0.5 : 1
296
+ },
297
+ children: [
298
+ icon && /* @__PURE__ */ jsx("span", { className: "nori-sidebar-menu-item-icon", "aria-hidden": "true", children: icon }),
299
+ !ctx.collapsed && /* @__PURE__ */ jsx(
300
+ "span",
301
+ {
302
+ style: {
303
+ fontSize: 14,
304
+ fontWeight: active ? 600 : 400,
305
+ color: active ? colors.semantic.text.default : colors.semantic.text.muted,
306
+ flex: 1,
307
+ overflow: "hidden",
308
+ whiteSpace: "nowrap",
309
+ textOverflow: "ellipsis"
310
+ },
311
+ children
312
+ }
313
+ )
314
+ ]
315
+ }
316
+ ) });
317
+ }
318
+ return /* @__PURE__ */ jsxs(
319
+ Pressable,
320
+ {
321
+ testID,
322
+ onPress: disabled ? void 0 : onPress,
323
+ disabled,
324
+ accessibilityRole: "menuitem",
325
+ accessibilityState: { selected: active, disabled },
326
+ style: ({ pressed }) => [
327
+ itemStyle,
328
+ active ? { backgroundColor: `${activeBg}1a` } : {},
329
+ pressed && { opacity: 0.7 }
330
+ ],
331
+ children: [
332
+ icon && /* @__PURE__ */ jsx(View, { children: icon }),
333
+ !ctx.collapsed && /* @__PURE__ */ jsx(Text, { style: labelTextStyle, numberOfLines: 1, children })
334
+ ]
335
+ }
336
+ );
337
+ }, "SidebarMenuItem");
338
+ var Sidebar = Object.assign(SidebarRoot, {
339
+ Header: SidebarHeader,
340
+ Content: SidebarContent,
341
+ Footer: SidebarFooter,
342
+ Group: SidebarGroup,
343
+ GroupLabel: SidebarGroupLabel,
344
+ Menu: SidebarMenu,
345
+ MenuItem: SidebarMenuItem
346
+ });
347
+
348
+ export { Sidebar, useSidebarContext };
349
+ //# sourceMappingURL=chunk-S763GTIZ.js.map
350
+ //# sourceMappingURL=chunk-S763GTIZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Sidebar/Sidebar.tsx"],"names":["RNText"],"mappings":";;;;;;;;AA+CA,IAAM,cAAA,GAAiB,cAA0C,IAAI,CAAA;AAErE,SAAS,kBAAkB,MAAA,EAAqC;AAC5D,EAAA,MAAM,GAAA,GAAM,WAAW,cAAc,CAAA;AACrC,EAAA,IAAI,CAAC,GAAA,EAAK;AACN,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAA,EAAI,MAAM,CAAA,oCAAA,CAAsC,CAAA;AAAA,EACpE;AACA,EAAA,OAAO,GAAA;AACX;AANS,MAAA,CAAA,iBAAA,EAAA,mBAAA,CAAA;AAmCT,IAAM,cAAA,GAAiB,GAAA;AACvB,IAAM,eAAA,GAAkB,EAAA;AAUxB,IAAM,8BAAc,MAAA,CAAA,CAAC;AAAA,EACjB,SAAA;AAAA,EACA,gBAAA,GAAmB,KAAA;AAAA,EACnB,iBAAA;AAAA,EACA,IAAA,GAAO,MAAA;AAAA,EACP,OAAA,GAAU,UAAA;AAAA,EACV,QAAA;AAAA,EACA,SAAA;AAAA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AAA,MAClB,kBAAA,EAAoB,EAAE,QAAA,EAAU,MAAA,EAAQ,QAAA,EAAS;AAAA,MACjD,KAAA,EAAO,CAAC,EAAE,OAAA,EAAQ,KAA4B;AAAA,QAC1C,SAAA;AAAA,QACA,SAAS,EAAE,eAAA,EAAiB,GAAG,QAAQ,CAAA,EAAA,CAAA,KAAS,EAAC;AAAA,QACjD,OAAA,IAAW,EAAE,OAAA,EAAS,GAAA;AAAI,OAC9B;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,IAAA,oBAAQ,GAAA,CAAC,QAAM,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,QACpB,CAAC,IAAI,SAAA,oBACF,GAAA,CAACA,QAAO,KAAA,EAAO,cAAA,EAAgB,aAAA,EAAe,CAAA,EACzC,QAAA,EACL;AAAA;AAAA;AAAA,GAER;AAER,CAAA,EA9GwB,iBAAA,CAAA;AAgJjB,IAAM,OAAA,GAAU,MAAA,CAAO,MAAA,CAAO,WAAA,EAAa;AAAA,EAC9C,MAAA,EAAQ,aAAA;AAAA,EACR,OAAA,EAAS,cAAA;AAAA,EACT,MAAA,EAAQ,aAAA;AAAA,EACR,KAAA,EAAO,YAAA;AAAA,EACP,UAAA,EAAY,iBAAA;AAAA,EACZ,IAAA,EAAM,WAAA;AAAA,EACN,QAAA,EAAU;AACd,CAAC","file":"chunk-S763GTIZ.js","sourcesContent":["'use client';\n\n/**\n * Sidebar — collapsible side-panel navigation (compound component).\n *\n * Anatomy:\n * Sidebar Root — owns collapsed state and provides context.\n * Sidebar.Header Top area of the panel (logo, workspace switcher, etc.).\n * Sidebar.Content Scrollable middle zone containing Groups.\n * Sidebar.Footer Pinned bottom area (user row, logout, etc.).\n * Sidebar.Group Logical section inside Content.\n * Sidebar.GroupLabel Section heading text.\n * Sidebar.Menu Ordered list of navigation items.\n * Sidebar.MenuItem Single tappable/clickable nav entry with optional icon.\n *\n * Web behaviour:\n * - Fixed `<aside>` with width transition between collapsed and expanded.\n * - When collapsed, text labels are hidden; only icons are shown.\n * - Collapsed label surfaced via `title` attribute (native browser tooltip on web).\n *\n * Native behaviour (v1):\n * - Always-visible View. Slide-in drawer is a v2 follow-up.\n * - No collapse — the panel is always expanded on native v1.\n *\n * Accessibility:\n * - role=\"navigation\" + aria-label on the <aside>.\n * - Each MenuItem is a button with aria-current=\"page\" when active.\n */\n\nimport { createContext, type ReactNode, useCallback, useContext, useId, useState } from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Platform, Pressable, Text as RNText, ScrollView, View } from 'react-native';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ntype SidebarContextValue = {\n collapsed: boolean;\n setCollapsed: (next: boolean) => void;\n toggleCollapsed: () => void;\n navId: string;\n};\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\nfunction useSidebarContext(caller: string): SidebarContextValue {\n const ctx = useContext(SidebarContext);\n if (!ctx) {\n throw new Error(`<${caller}> must be rendered inside <Sidebar>.`);\n }\n return ctx;\n}\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type SidebarVariant = 'standard' | 'inset' | 'floating';\nexport type SidebarSide = 'left' | 'right';\n\nexport type SidebarProps = {\n /** Controlled collapsed state. */\n collapsed?: boolean;\n /** Uncontrolled initial collapsed state. @defaultValue false */\n defaultCollapsed?: boolean;\n /** Fires with the new collapsed state. */\n onCollapsedChange?: (collapsed: boolean) => void;\n /** Which edge the panel is attached to. @defaultValue 'left' */\n side?: SidebarSide;\n /** Visual variant. @defaultValue 'standard' */\n variant?: SidebarVariant;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n// ---------------------------------------------------------------------------\n// Widths\n// ---------------------------------------------------------------------------\n\nconst EXPANDED_WIDTH = 240;\nconst COLLAPSED_WIDTH = 56;\n\n// ---------------------------------------------------------------------------\n// Root\n// ---------------------------------------------------------------------------\n\n/**\n * Root of the Sidebar compound. Owns collapsed state and provides context\n * to all sub-components.\n */\nconst SidebarRoot = ({\n collapsed,\n defaultCollapsed = false,\n onCollapsedChange,\n side = 'left',\n variant = 'standard',\n children,\n className,\n testID,\n}: SidebarProps) => {\n const [inner, setInner] = useState<boolean>(defaultCollapsed);\n const isControlled = collapsed !== undefined;\n const current = isControlled ? (collapsed as boolean) : inner;\n const navId = useId();\n const colors = useThemeColors();\n\n const setCollapsed = useCallback(\n (next: boolean) => {\n if (!isControlled) {\n setInner(next);\n }\n onCollapsedChange?.(next);\n },\n [isControlled, onCollapsedChange]\n );\n\n const toggleCollapsed = useCallback(() => {\n setCollapsed(!current);\n }, [current, setCollapsed]);\n\n const ctxValue: SidebarContextValue = {\n collapsed: current,\n setCollapsed,\n toggleCollapsed,\n navId,\n };\n\n const width = current ? COLLAPSED_WIDTH : EXPANDED_WIDTH;\n\n const containerStyle: ViewStyle =\n Platform.OS === 'web'\n ? ({\n position: 'fixed' as unknown as 'absolute',\n top: 0,\n bottom: 0,\n [side]: 0,\n width,\n transitionProperty: 'width',\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n display: 'flex' as unknown as undefined,\n flexDirection: 'column',\n overflow: 'hidden',\n zIndex: 40,\n } as ViewStyle)\n : {\n width,\n flexDirection: 'column',\n overflow: 'hidden',\n };\n\n const variantStyle: ViewStyle =\n Platform.OS === 'web'\n ? variant === 'floating'\n ? ({\n margin: 8,\n borderRadius: colors.radius.lg,\n top: 8,\n bottom: 8,\n height: 'auto' as unknown as undefined,\n } as ViewStyle)\n : variant === 'inset'\n ? ({\n boxShadow: '4px 0 16px rgba(0,0,0,0.08)',\n } as ViewStyle)\n : {}\n : {};\n\n const rootStyle: ViewStyle = {\n ...containerStyle,\n ...variantStyle,\n backgroundColor: colors.semantic.background.elevated,\n borderRightWidth: variant !== 'floating' ? 1 : 0,\n borderRightColor: colors.semantic.border.default,\n };\n\n if (Platform.OS === 'web') {\n return (\n <SidebarContext.Provider value={ctxValue}>\n <nav\n id={navId}\n aria-label=\"Sidebar\"\n data-collapsed={current}\n data-side={side}\n data-variant={variant}\n data-testid={testID}\n className={cn(\n 'nori-sidebar flex flex-col overflow-hidden transition-[width] duration-200',\n className\n )}\n style={rootStyle as React.CSSProperties}\n >\n {children}\n </nav>\n </SidebarContext.Provider>\n );\n }\n\n return (\n <SidebarContext.Provider value={ctxValue}>\n <View style={rootStyle} testID={testID} accessibilityRole=\"menu\" accessibilityLabel=\"Sidebar\">\n {children}\n </View>\n </SidebarContext.Provider>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Header\n// ---------------------------------------------------------------------------\n\nexport type SidebarHeaderProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Top section of the sidebar — logos, workspace switchers.\n * Fixed at the top; does not scroll.\n */\nconst SidebarHeader = ({ children, className, testID }: SidebarHeaderProps) => {\n const colors = useThemeColors();\n const style: ViewStyle = {\n padding: px(colors.spacing['4']),\n borderBottomWidth: 1,\n borderBottomColor: colors.semantic.border.default,\n flexDirection: 'row',\n alignItems: 'center',\n gap: px(colors.spacing['2']),\n overflow: 'hidden',\n };\n if (Platform.OS === 'web') {\n return (\n <div\n data-testid={testID}\n className={cn('nori-sidebar-header', className)}\n style={style as React.CSSProperties}\n >\n {children}\n </div>\n );\n }\n return (\n <View style={style} testID={testID}>\n {children}\n </View>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Content\n// ---------------------------------------------------------------------------\n\nexport type SidebarContentProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Scrollable middle zone containing Group components.\n */\nconst SidebarContent = ({ children, className, testID }: SidebarContentProps) => {\n const style: ViewStyle = { flex: 1, overflow: 'hidden' };\n if (Platform.OS === 'web') {\n return (\n <div\n data-testid={testID}\n className={cn('nori-sidebar-content', className)}\n style={{ flex: 1, overflowY: 'auto', overflowX: 'hidden' }}\n >\n {children}\n </div>\n );\n }\n return (\n <ScrollView style={style} testID={testID} contentContainerStyle={{ flexGrow: 1 }}>\n {children}\n </ScrollView>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Footer\n// ---------------------------------------------------------------------------\n\nexport type SidebarFooterProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Pinned bottom area — user row, logout button, etc.\n */\nconst SidebarFooter = ({ children, className, testID }: SidebarFooterProps) => {\n const colors = useThemeColors();\n const style: ViewStyle = {\n padding: px(colors.spacing['4']),\n borderTopWidth: 1,\n borderTopColor: colors.semantic.border.default,\n overflow: 'hidden',\n };\n if (Platform.OS === 'web') {\n return (\n <div\n data-testid={testID}\n className={cn('nori-sidebar-footer', className)}\n style={style as React.CSSProperties}\n >\n {children}\n </div>\n );\n }\n return (\n <View style={style} testID={testID}>\n {children}\n </View>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Group\n// ---------------------------------------------------------------------------\n\nexport type SidebarGroupProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Logical section within Sidebar.Content — wraps a GroupLabel + Menu.\n */\nconst SidebarGroup = ({ children, className, testID }: SidebarGroupProps) => {\n const colors = useThemeColors();\n const style: ViewStyle = {\n paddingTop: px(colors.spacing['2']),\n paddingBottom: px(colors.spacing['2']),\n };\n if (Platform.OS === 'web') {\n return (\n <div\n data-testid={testID}\n className={cn('nori-sidebar-group', className)}\n style={style as React.CSSProperties}\n >\n {children}\n </div>\n );\n }\n return (\n <View style={style} testID={testID}>\n {children}\n </View>\n );\n};\n\n// ---------------------------------------------------------------------------\n// GroupLabel\n// ---------------------------------------------------------------------------\n\nexport type SidebarGroupLabelProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Section heading inside a Group. Hidden when the sidebar is collapsed.\n */\nconst SidebarGroupLabel = ({ children, className, testID }: SidebarGroupLabelProps) => {\n const ctx = useSidebarContext('Sidebar.GroupLabel');\n const colors = useThemeColors();\n\n if (ctx.collapsed) {\n return null;\n }\n\n const style: ViewStyle = {\n paddingHorizontal: px(colors.spacing['4']),\n paddingVertical: px(colors.spacing['1']),\n };\n\n const textStyle = {\n fontSize: 11,\n fontWeight: '600' as const,\n letterSpacing: 0.5,\n textTransform: 'uppercase' as const,\n color: colors.semantic.text.muted,\n };\n\n if (Platform.OS === 'web') {\n return (\n <div\n data-testid={testID}\n className={cn('nori-sidebar-group-label', className)}\n style={style as React.CSSProperties}\n >\n <span style={textStyle as React.CSSProperties}>{children}</span>\n </div>\n );\n }\n\n return (\n <View style={style} testID={testID}>\n <RNText style={textStyle}>{children}</RNText>\n </View>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Menu\n// ---------------------------------------------------------------------------\n\nexport type SidebarMenuProps = {\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Ordered list wrapper for MenuItem components.\n */\nconst SidebarMenu = ({ children, className, testID }: SidebarMenuProps) => {\n const colors = useThemeColors();\n const style: ViewStyle = {\n paddingHorizontal: px(colors.spacing['2']),\n gap: px(colors.spacing['1']),\n };\n if (Platform.OS === 'web') {\n return (\n <ul\n data-testid={testID}\n className={cn('nori-sidebar-menu', className)}\n style={\n {\n ...(style as React.CSSProperties),\n listStyle: 'none',\n margin: 0,\n padding: `0 ${colors.spacing['2']}px`,\n } as React.CSSProperties\n }\n >\n {children}\n </ul>\n );\n }\n return (\n <View style={style} testID={testID}>\n {children}\n </View>\n );\n};\n\n// ---------------------------------------------------------------------------\n// MenuItem\n// ---------------------------------------------------------------------------\n\nexport type SidebarMenuItemProps = {\n /** Optional leading icon. Hidden text when collapsed; icon always shown. */\n icon?: ReactNode;\n /** Mark this item as the current page. Adds aria-current=\"page\". @defaultValue false */\n active?: boolean;\n /** Disable the item. @defaultValue false */\n disabled?: boolean;\n /** Press handler. */\n onPress?: () => void;\n children?: ReactNode;\n className?: string;\n testID?: string;\n};\n\n/**\n * Single navigation entry.\n *\n * - Shows icon + label when expanded.\n * - Shows icon only when collapsed (web: label surfaced as title tooltip).\n * - aria-current=\"page\" when active.\n */\nconst SidebarMenuItem = ({\n icon,\n active = false,\n disabled = false,\n onPress,\n children,\n className,\n testID,\n}: SidebarMenuItemProps) => {\n const ctx = useSidebarContext('Sidebar.MenuItem');\n const colors = useThemeColors();\n\n const itemStyle: ViewStyle = {\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: px(colors.radius.md),\n paddingHorizontal: px(colors.spacing['3']),\n paddingVertical: px(colors.spacing['2']),\n gap: px(colors.spacing['3']),\n opacity: disabled ? 0.5 : 1,\n ...(ctx.collapsed ? { justifyContent: 'center', paddingHorizontal: px(colors.spacing['2']) } : {}),\n };\n\n const activeBg = colors.semantic.interactive.primary;\n const labelStr = typeof children === 'string' ? children : undefined;\n\n const labelTextStyle = {\n fontSize: 14,\n fontWeight: active ? ('600' as const) : ('400' as const),\n color: active ? colors.semantic.text.default : colors.semantic.text.muted,\n flex: 1,\n };\n\n if (Platform.OS === 'web') {\n return (\n <li style={{ listStyle: 'none' }}>\n <button\n type=\"button\"\n data-testid={testID}\n aria-current={active ? 'page' : undefined}\n aria-disabled={disabled}\n title={ctx.collapsed && labelStr ? labelStr : undefined}\n disabled={disabled}\n onClick={disabled ? undefined : onPress}\n className={cn('nori-sidebar-menu-item', className)}\n style={\n {\n display: 'flex',\n alignItems: 'center',\n gap: colors.spacing['3'],\n width: '100%',\n textAlign: 'left',\n border: 'none',\n cursor: disabled ? 'not-allowed' : 'pointer',\n borderRadius: colors.radius.md,\n padding: ctx.collapsed\n ? `${colors.spacing['2']}px`\n : `${colors.spacing['2']}px ${colors.spacing['3']}px`,\n justifyContent: ctx.collapsed ? 'center' : 'flex-start',\n background: active ? `${activeBg}1a` : 'transparent',\n opacity: disabled ? 0.5 : 1,\n } as React.CSSProperties\n }\n >\n {icon && (\n <span className=\"nori-sidebar-menu-item-icon\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {!ctx.collapsed && (\n <span\n style={{\n fontSize: 14,\n fontWeight: active ? 600 : 400,\n color: active ? colors.semantic.text.default : colors.semantic.text.muted,\n flex: 1,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n }}\n >\n {children}\n </span>\n )}\n </button>\n </li>\n );\n }\n\n return (\n <Pressable\n testID={testID}\n onPress={disabled ? undefined : onPress}\n disabled={disabled}\n accessibilityRole=\"menuitem\"\n accessibilityState={{ selected: active, disabled }}\n style={({ pressed }: { pressed: boolean }) => [\n itemStyle,\n active ? { backgroundColor: `${activeBg}1a` } : {},\n pressed && { opacity: 0.7 },\n ]}\n >\n {icon && <View>{icon}</View>}\n {!ctx.collapsed && (\n <RNText style={labelTextStyle} numberOfLines={1}>\n {children}\n </RNText>\n )}\n </Pressable>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Compound export\n// ---------------------------------------------------------------------------\n\n/**\n * Collapsible side-panel navigation surface.\n *\n * Web: fixed `<aside>` that transitions width between expanded (240px) and\n * collapsed (56px — icons only).\n *\n * Native v1: always-visible View. Slide-in drawer is a v2 follow-up.\n *\n * ```tsx\n * <Sidebar defaultCollapsed={false}>\n * <Sidebar.Header>\n * <Text>Acme Inc.</Text>\n * </Sidebar.Header>\n * <Sidebar.Content>\n * <Sidebar.Group>\n * <Sidebar.GroupLabel>Main</Sidebar.GroupLabel>\n * <Sidebar.Menu>\n * <Sidebar.MenuItem icon={<HomeIcon />} onPress={goHome}>Home</Sidebar.MenuItem>\n * <Sidebar.MenuItem icon={<UsersIcon />} active>Team</Sidebar.MenuItem>\n * </Sidebar.Menu>\n * </Sidebar.Group>\n * </Sidebar.Content>\n * <Sidebar.Footer>\n * <Button onPress={logout}>Logout</Button>\n * </Sidebar.Footer>\n * </Sidebar>\n * ```\n */\nexport const Sidebar = Object.assign(SidebarRoot, {\n Header: SidebarHeader,\n Content: SidebarContent,\n Footer: SidebarFooter,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n Menu: SidebarMenu,\n MenuItem: SidebarMenuItem,\n});\n\n// Re-export context hook for advanced use (e.g. a custom collapse toggle).\nexport { useSidebarContext };\n\nimport type React from 'react';\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-UJRVWGK7.js.map
3
+ //# sourceMappingURL=chunk-UJRVWGK7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-UJRVWGK7.js"}