@avenue-ticketing/native 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/combobox.js +200 -9
- package/dist/combobox.js.map +1 -1
- package/dist/input.d.ts +11 -4
- package/dist/input.js +28 -9
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js +200 -9
- package/dist/multi-select.js.map +1 -1
- package/dist/select-native.js +262 -15
- package/dist/select-native.js.map +1 -1
- package/dist/select.js +201 -10
- package/dist/select.js.map +1 -1
- package/dist/tabs.d.ts +19 -2
- package/dist/tabs.js +183 -18
- package/dist/tabs.js.map +1 -1
- package/dist/tag-select.js +201 -10
- package/dist/tag-select.js.map +1 -1
- package/dist/textarea.js +203 -11
- package/dist/textarea.js.map +1 -1
- package/package.json +1 -1
package/dist/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../core/src/cx.ts","../../core/src/is-react-component.ts","../../core/src/tabs.ts","../../core/src/badge.ts","../../../native/components/base/badges/badges.tsx","../../../native/components/application/tabs/tabs.tsx"],"names":["jsx","View","jsxs","Pressable","Text"],"mappings":";;;;;;;;;;;AAEA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAChC,MAAA,EAAQ;AAAA,IACJ,KAAA,EAAO;AAAA,MACH,MAAM,CAAC,YAAA,EAAc,cAAc,YAAA,EAAc,YAAA,EAAc,cAAc,aAAa;AAAA;AAC9F;AAER,CAAC,CAAA;AAGM,IAAM,EAAA,GAAK,OAAA;AAGX,SAAS,OAAsH,OAAA,EAAe;AACjJ,EAAA,OAAO,OAAA;AACX;;;ACXO,IAAM,mBAAA,GAAsB,CAAC,SAAA,KAA+C;AAC/E,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA;AAChC,CAAA;AAEO,IAAM,gBAAA,GAAmB,CAAC,SAAA,KAAgE;AAC7F,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA,IAAc,SAAA,CAA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gB,QAAQ,CAAA,EACpG,QAAA,EAAA;AAAA,0BAAAD,GAAAA;AAAA,YAACI,IAAAA;AAAA,YAAA;AAAA,cACG,aAAA,EAAe,YAAY,CAAA,GAAI,CAAA;AAAA,cAC/B,SAAA,EAAW,EAAA;AAAA,gBACP,SAAA,GAAY,qBAAA,GAAwB,IAAA,KAAS,IAAA,GAAO,uBAAA,GAA0B,uBAAA;AAAA,gBAC9E,SAAA,IAAa,WAAA;AAAA,gBACb,mBAAA,CAAoB,MAAM,QAAQ;AAAA,eACtC;AAAA,cAEC,QAAA,EAAA,QAAA,IAAY;AAAA;AAAA,WACjB;AAAA,UACC,CAAC,SAAA,IAAa,KAAA,IAAS,wBACpBJ,GAAAA,CAAC,SAAM,IAAA,EAAK,IAAA,EAAK,IAAA,EAAM,QAAA,GAAW,eAAe,QAAA,EAAU,KAAA,EAAO,YAAY,QAAA,GAAW,OAAA,GAAU,QAC9F,QAAA,EAAA,KAAA,EACL;AAAA,SAAA,EAER;AAAA;AAAA;AAAA,GACJ;AAER;AAEO,IAAM,WAAyE,CAAC,EAAE,EAAA,EAAI,QAAA,EAAU,WAAU,KAAM;AACnH,EAAA,MAAM,IAAA,GAAO,WAAW,WAAW,CAAA;AACnC,EAAA,IAAI,IAAA,EAAM,WAAA,KAAgB,EAAA,EAAI,OAAO,IAAA;AACrC,EAAA,uBAAOA,GAAAA,CAACC,IAAAA,EAAA,EAAK,WAAuB,QAAA,EAAS,CAAA;AACjD;AAEO,IAAM,IAAA,GAAO,MAAA,CAAO,MAAA,CAAO,QAAA,EAAU;AAAA,EACxC,IAAA,EAAM,OAAA;AAAA,EACN,IAAA,EAAM,GAAA;AAAA,EACN,KAAA,EAAO;AACX,CAAC","file":"tabs.js","sourcesContent":["import { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n text: [\"display-xs\", \"display-sm\", \"display-md\", \"display-lg\", \"display-xl\", \"display-2xl\"],\n },\n },\n});\n\n/** Merge Tailwind / NativeWind class strings. */\nexport const cx = twMerge;\n\n/** Identity helper so Tailwind IntelliSense can sort style maps. */\nexport function sortCx<T extends Record<string, string | number | Record<string, string | number | Record<string, string | number>>>>(classes: T): T {\n return classes;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from \"react\";\n\ntype ReactComponent = React.FC<any> | React.ComponentClass<any, any>;\n\nexport const isFunctionComponent = (component: any): component is React.FC<any> => {\n return typeof component === \"function\";\n};\n\nexport const isClassComponent = (component: any): component is React.ComponentClass<any, any> => {\n return typeof component === \"function\" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);\n};\n\nexport const isForwardRefComponent = (component: any): component is React.ForwardRefExoticComponent<any> => {\n return typeof component === \"object\" && component !== null && component.$$typeof.toString() === \"Symbol(react.forward_ref)\";\n};\n\nexport const isReactComponent = (component: any): component is ReactComponent => {\n return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);\n};\n","import { cx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const TAB_ORIENTATIONS = [\"horizontal\", \"vertical\"] as const;\nexport type TabOrientation = (typeof TAB_ORIENTATIONS)[number];\n\nexport const TAB_SIZES = [\"sm\", \"md\"] as const;\nexport type TabSize = (typeof TAB_SIZES)[number];\n\nexport const HORIZONTAL_TAB_TYPES = [\"button-brand\", \"button-gray\", \"button-border\", \"button-minimal\", \"underline\"] as const;\n/** `line` = vertical underline (icon + label in a row). `line-stacked` = same chrome, icon above label. */\nexport const VERTICAL_TAB_TYPES = [\"button-brand\", \"button-gray\", \"button-border\", \"button-minimal\", \"line\", \"line-stacked\"] as const;\nexport type HorizontalTabType = (typeof HORIZONTAL_TAB_TYPES)[number];\nexport type VerticalTabType = (typeof VERTICAL_TAB_TYPES)[number];\nexport type TabType = HorizontalTabType | VerticalTabType;\n\nexport interface TabState {\n isFocusVisible?: boolean;\n isSelected?: boolean;\n isHovered?: boolean;\n}\n\n//////////////////////////////////////////////// WEB STYLES\n// Exact class fragments from `components/application/tabs/tabs.tsx`.\n\nexport function tabItemStyles({ isFocusVisible, isSelected, isHovered }: TabState): Record<TabType, string> {\n return {\n \"button-brand\": cx(\n \"outline-focus-ring text-secondary *:data-icon:text-fg-secondary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n isHovered && !isSelected && \"bg-secondary_hover\",\n isSelected && \"bg-brand-primary text-primary *:data-icon:text-fg-primary\",\n ),\n \"button-gray\": cx(\n \"outline-focus-ring *:data-icon:text-fg-quaternary\",\n isHovered && \"bg-primary_hover text-secondary *:data-icon:text-fg-secondary_hover\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n isSelected && \"bg-primary_hover text-secondary *:data-icon:text-fg-secondary_hover\",\n ),\n \"button-border\": cx(\n \"outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"bg-primary_alt text-secondary shadow-sm *:data-icon:text-fg-secondary_hover\",\n ),\n \"button-minimal\": cx(\n \"rounded-lg outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"bg-primary_alt text-secondary shadow-xs ring-1 ring-primary ring-inset *:data-icon:text-fg-secondary_hover\",\n ),\n underline: cx(\n \"rounded-none border-b-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"border-fg-brand-primary_alt text-brand-secondary *:data-icon:text-fg-brand-secondary_hover\",\n ),\n line: cx(\n \"rounded-none border-l-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"border-fg-brand-primary_alt text-brand-secondary *:data-icon:text-fg-brand-secondary_hover\",\n ),\n \"line-stacked\": cx(\n \"rounded-none border-l-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"border-fg-brand-primary_alt text-brand-secondary *:data-icon:text-fg-brand-secondary_hover\",\n ),\n };\n}\n\nexport const tabSizes = {\n sm: {\n base: \"text-sm font-semibold gap-1 *:data-icon:size-4\",\n \"button-brand\": \"py-2 px-2.5\",\n \"button-gray\": \"py-2 px-2.5\",\n \"button-border\": \"py-2 px-2.5\",\n \"button-minimal\": \"py-2 px-2.5\",\n underline: \"px-0.5 pb-2.5 pt-0\",\n line: \"pl-2.5 pr-3 py-0.5\",\n // Vertical underline + stacked: pl-5 / pr-3, icon size-5.\n \"line-stacked\": \"gap-1.5 py-2 pr-3 pl-5 text-sm font-medium *:data-icon:size-5\",\n icon: 16,\n },\n md: {\n base: \"text-md font-semibold gap-1.5 *:data-icon:size-5\",\n \"button-brand\": \"py-2.5 px-2.5\",\n \"button-gray\": \"py-2.5 px-2.5\",\n \"button-border\": \"py-2.5 px-2.5\",\n \"button-minimal\": \"py-2.5 px-2.5\",\n underline: \"px-0.5 pb-2.5 pt-0\",\n line: \"pr-3.5 pl-3 py-1\",\n \"line-stacked\": \"gap-1.5 py-2 pr-3 pl-5 text-sm font-medium *:data-icon:size-5\",\n icon: 20,\n },\n} as const;\n\nexport function tabListStyles({ size, fullWidth }: { size?: TabSize; fullWidth?: boolean }): Record<TabType, string> {\n return {\n \"button-brand\": \"gap-1\",\n \"button-gray\": \"gap-1\",\n \"button-border\": cx(\"gap-1 rounded-[10px] bg-secondary_alt p-1 ring-1 ring-secondary ring-inset\", size === \"md\" && \"rounded-xl p-1.5\"),\n \"button-minimal\": \"gap-0.5 rounded-lg bg-secondary_alt ring-1 ring-inset ring-secondary\",\n underline: cx(\"gap-3\", fullWidth && \"w-full gap-4\"),\n line: \"gap-2\",\n \"line-stacked\": \"gap-1\",\n };\n}\n\nexport const tabWebStyles = {\n root: \"flex w-full flex-col\",\n /** Vertical orientation: rail beside panel (partners sheets). */\n rootVertical: \"flex-row\",\n list: \"group flex\",\n listVertical: \"w-max flex-col\",\n listUnderlineRule: \"relative before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-border-secondary\",\n panel: \"outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2\",\n item: \"z-10 flex h-max cursor-pointer items-center justify-center gap-2 rounded-md whitespace-nowrap text-quaternary transition duration-100 ease-linear\",\n itemVertical: \"group-orientation-vertical:justify-start\",\n /** Vertical underline with icon above label. */\n itemStacked:\n \"flex-col! w-full items-start justify-start gap-1.5 overflow-visible whitespace-normal [&_svg]:size-5 [&_svg]:shrink-0\",\n itemFull: \"w-full flex-1\",\n label: \"flex items-center gap-1.5\",\n labelLine: \"flex items-center gap-1.5\",\n /** Icon slot wrapper for line-stacked. */\n iconStacked:\n \"relative inline-flex size-5 shrink-0 items-center justify-center overflow-visible [&_svg]:size-5 [&_svg]:shrink-0\",\n labelStacked: \"block min-w-0 w-full text-left leading-snug\",\n badge: \"hidden transition-inherit-all md:flex\",\n badgeSm: \"-my-px\",\n /** line-stacked: same Badge as row tabs, anchored to the icon’s top-right corner. */\n badgeStacked: \"absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2\",\n} as const;\n\n//////////////////////////////////////////////// NATIVE STYLES\n// Selected chrome only. Skips hover, focus ring, and `md:` badge hiding.\n\nexport const tabsStyles = {\n root: \"w-full flex-col\",\n rootVertical: \"w-full flex-row\",\n list: \"flex-row\",\n listVertical: \"flex-col\",\n listUnderlineRule: \"border-b border-secondary\",\n listButtonBorder: \"gap-1 rounded-[10px] border border-secondary bg-secondary_alt p-1\",\n listButtonBorderMd: \"rounded-xl p-1.5\",\n listButtonMinimal: \"gap-0.5 rounded-lg border border-secondary bg-secondary_alt\",\n item: \"flex-row items-center justify-center gap-2 rounded-md\",\n itemVertical: \"justify-start\",\n itemStacked: \"w-full flex-col items-start justify-start gap-1.5 overflow-visible\",\n itemFull: \"flex-1\",\n label: \"font-semibold text-quaternary\",\n labelRow: \"flex-row items-center gap-1.5\",\n labelStacked: \"w-full min-w-0\",\n iconStacked: \"relative size-5 shrink-0 items-center justify-center overflow-visible\",\n badgeStacked: \"absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2\",\n} as const;\n\nexport function tabNativeItemState(type: TabType, selected: boolean) {\n if (!selected) {\n if (type === \"underline\" || type === \"line\" || type === \"line-stacked\") return \"border-transparent\";\n return \"\";\n }\n switch (type) {\n case \"button-brand\":\n return \"bg-brand-primary\";\n case \"button-gray\":\n return \"bg-primary_hover\";\n case \"button-border\":\n return \"bg-primary_alt\";\n case \"button-minimal\":\n return \"rounded-lg bg-primary_alt border border-primary\";\n case \"underline\":\n return \"rounded-none border-b-2 border-fg-brand-primary_alt\";\n case \"line\":\n case \"line-stacked\":\n return \"rounded-none border-l-2 border-fg-brand-primary_alt\";\n default: {\n const _exhaustive: never = type;\n return _exhaustive;\n }\n }\n}\n\n/** Text color only. Borders stay on the tab so the label does not draw a second line. */\nexport function tabNativeLabelState(type: TabType, selected: boolean) {\n if (!selected) {\n if (type === \"button-brand\") return \"text-secondary\";\n return \"text-quaternary\";\n }\n switch (type) {\n case \"button-brand\":\n return \"text-primary\";\n case \"button-gray\":\n case \"button-border\":\n case \"button-minimal\":\n return \"text-secondary\";\n case \"underline\":\n case \"line\":\n case \"line-stacked\":\n return \"text-brand-secondary\";\n default: {\n const _exhaustive: never = type;\n return _exhaustive;\n }\n }\n}\n","import type { FC } from \"react\";\nimport { sortCx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const BADGE_SIZES = [\"sm\", \"md\", \"lg\"] as const;\nexport type BadgeSize = (typeof BADGE_SIZES)[number];\n\nexport const BADGE_COLORS = [\n \"gray\",\n \"brand\",\n \"error\",\n \"warning\",\n \"success\",\n \"slate\",\n \"sky\",\n \"blue\",\n \"indigo\",\n \"purple\",\n \"pink\",\n \"orange\",\n] as const;\nexport type BadgeColorName = (typeof BADGE_COLORS)[number];\n\nexport const badgeTypes = {\n pillColor: \"pill-color\",\n badgeColor: \"color\",\n badgeModern: \"modern\",\n} as const;\n\nexport type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];\n\nexport type ExtractColorKeys<T> = T extends { styles: infer C } ? keyof C : never;\nexport type ExtractBadgeKeys<T> = keyof T;\nexport type BadgeTypeToColorMap<T> = {\n [K in ExtractBadgeKeys<T>]: ExtractColorKeys<T[K]>;\n};\n\n/** Icon component contract for badge addons (web Phosphor / native Phosphor). */\nexport type BadgeIconComponent = FC<{\n className?: string;\n weight?: \"thin\" | \"light\" | \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n size?: number;\n color?: string;\n}>;\n\n//////////////////////////////////////////////// SHARED STYLES\n// Visual contract for web + native. Web focus / hover stay in badgeWebStyles.\n\nexport const badgeFilledColors: Record<\n BadgeColorName,\n { root: string; addon: string; addonButton: string }\n> = {\n gray: {\n root: \"bg-utility-neutral-50 text-utility-neutral-700 ring-utility-neutral-200\",\n addon: \"text-utility-neutral-500\",\n addonButton: \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n brand: {\n root: \"bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200\",\n addon: \"text-utility-brand-500\",\n addonButton: \"hover:bg-utility-brand-100 text-utility-brand-400 hover:text-utility-brand-500\",\n },\n error: {\n root: \"bg-utility-red-50 text-utility-red-700 ring-utility-red-200\",\n addon: \"text-utility-red-500\",\n addonButton: \"hover:bg-utility-red-100 text-utility-red-400 hover:text-utility-red-500\",\n },\n warning: {\n root: \"bg-utility-yellow-50 text-utility-yellow-700 ring-utility-yellow-200\",\n addon: \"text-utility-yellow-500\",\n addonButton: \"hover:bg-utility-yellow-100 text-utility-yellow-400 hover:text-utility-yellow-500\",\n },\n success: {\n root: \"bg-utility-green-50 text-utility-green-700 ring-utility-green-200\",\n addon: \"text-utility-green-500\",\n addonButton: \"hover:bg-utility-green-100 text-utility-green-400 hover:text-utility-green-500\",\n },\n slate: {\n root: \"bg-utility-slate-50 text-utility-slate-700 ring-utility-slate-200\",\n addon: \"text-utility-slate-500\",\n addonButton: \"hover:bg-utility-slate-100 text-utility-slate-400 hover:text-utility-slate-500\",\n },\n sky: {\n root: \"bg-utility-sky-50 text-utility-sky-700 ring-utility-sky-200\",\n addon: \"text-utility-sky-500\",\n addonButton: \"hover:bg-utility-sky-100 text-utility-sky-400 hover:text-utility-sky-500\",\n },\n blue: {\n root: \"bg-utility-blue-50 text-utility-blue-700 ring-utility-blue-200\",\n addon: \"text-utility-blue-500\",\n addonButton: \"hover:bg-utility-blue-100 text-utility-blue-400 hover:text-utility-blue-500\",\n },\n indigo: {\n root: \"bg-utility-indigo-50 text-utility-indigo-700 ring-utility-indigo-200\",\n addon: \"text-utility-indigo-500\",\n addonButton: \"hover:bg-utility-indigo-100 text-utility-indigo-400 hover:text-utility-indigo-500\",\n },\n purple: {\n root: \"bg-utility-purple-50 text-utility-purple-700 ring-utility-purple-200\",\n addon: \"text-utility-purple-500\",\n addonButton: \"hover:bg-utility-purple-100 text-utility-purple-400 hover:text-utility-purple-500\",\n },\n pink: {\n root: \"bg-utility-pink-50 text-utility-pink-700 ring-utility-pink-200\",\n addon: \"text-utility-pink-500\",\n addonButton: \"hover:bg-utility-pink-100 text-utility-pink-400 hover:text-utility-pink-500\",\n },\n orange: {\n root: \"bg-utility-orange-50 text-utility-orange-700 ring-utility-orange-200\",\n addon: \"text-utility-orange-500\",\n addonButton: \"hover:bg-utility-orange-100 text-utility-orange-400 hover:text-utility-orange-500\",\n },\n};\n\nconst addonOnlyColors = Object.fromEntries(\n Object.entries(badgeFilledColors).map(([key, value]) => [key, { root: \"\", addon: value.addon }]),\n) as Record<BadgeColorName, { root: string; addon: string }>;\n\n/**\n * Shared layout chrome. Avoid bare `flex` (NativeWind). Web shells prepend `flex`.\n */\nexport const badgeWithPillTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common:\n \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset shadow-xs\",\n styles: {\n gray: {\n root: \"bg-primary text-secondary ring-primary\",\n addon: \"text-neutral-500\",\n addonButton:\n \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n },\n },\n} as const;\n\nexport const badgeWithBadgeTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common:\n \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset bg-primary text-secondary ring-primary shadow-xs\",\n styles: addonOnlyColors,\n },\n} as const;\n\nexport type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n\nexport const badgeStyles = sortCx({\n pillSizes: {\n sm: \"py-0.5 px-2 text-xs font-semibold\",\n md: \"py-0.5 px-2.5 text-sm font-semibold\",\n lg: \"py-1 px-3 text-sm font-semibold\",\n },\n badgeSizes: {\n sm: \"py-0.5 px-1.5 text-xs font-semibold\",\n md: \"py-0.5 px-2 text-sm font-semibold\",\n lg: \"py-1 px-2.5 text-sm font-semibold\",\n },\n badgeColorSizes: {\n sm: \"py-0.5 px-1.5 text-xs font-semibold\",\n md: \"py-0.5 px-2 text-sm font-semibold\",\n lg: \"py-1 px-2.5 text-sm font-semibold rounded-lg\",\n },\n pillDotSizes: {\n sm: \"gap-1 py-0.5 pl-1.5 pr-2 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-2 pr-2.5 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2.5 pr-3 text-sm font-semibold\",\n },\n badgeDotSizes: {\n sm: \"gap-1 py-0.5 px-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 px-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 px-2.5 text-sm font-semibold\",\n },\n badgeColorDotSizes: {\n sm: \"gap-1 py-0.5 px-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 px-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 px-2.5 text-sm font-semibold rounded-lg\",\n },\n icon: \"size-3\",\n});\n\n/** Resolve size class map for plain `Badge` / similar. */\nexport function resolveBadgeSizeClass(type: BadgeTypes, size: BadgeSize): string {\n if (type === badgeTypes.pillColor) return badgeStyles.pillSizes[size];\n if (type === badgeTypes.badgeColor) return badgeStyles.badgeColorSizes[size];\n return badgeStyles.badgeSizes[size];\n}\n\nexport function resolveBadgeDotSizeClass(type: BadgeTypes, size: BadgeSize): string {\n if (type === badgeTypes.pillColor) return badgeStyles.pillDotSizes[size];\n if (type === badgeTypes.badgeColor) return badgeStyles.badgeColorDotSizes[size];\n return badgeStyles.badgeDotSizes[size];\n}\n\nexport const badgeIconSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2.5 pr-2 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2.5 pl-2 text-sm font-semibold\" },\n lg: { trailing: \"gap-1 py-1 pl-3 pr-2.5 text-sm font-semibold\", leading: \"gap-1 py-1 pr-3 pl-2.5 text-sm font-semibold\" },\n },\n [badgeTypes.badgeColor]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2 pr-1.5 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2 pl-1.5 text-sm font-semibold\" },\n lg: {\n trailing: \"gap-1 py-1 pl-2.5 pr-2 text-sm font-semibold rounded-lg\",\n leading: \"gap-1 py-1 pr-2.5 pl-2 text-sm font-semibold rounded-lg\",\n },\n },\n [badgeTypes.badgeModern]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2 pr-1.5 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2 pl-1.5 text-sm font-semibold\" },\n lg: { trailing: \"gap-1 py-1 pl-2.5 pr-2 text-sm font-semibold\", leading: \"gap-1 py-1 pr-2.5 pl-2 text-sm font-semibold\" },\n },\n} as const;\n\nexport const badgeOnlyIconSizeMaps = {\n [badgeTypes.pillColor]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2\" },\n [badgeTypes.badgeColor]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2 rounded-lg\" },\n [badgeTypes.badgeModern]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2\" },\n} as const;\n\nexport const badgeWithButtonSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: \"gap-0.5 py-0.5 pl-2 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2.5 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-3 pr-1.5 text-sm font-semibold\",\n },\n [badgeTypes.badgeColor]: {\n sm: \"gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-2.5 pr-1.5 text-sm font-semibold rounded-lg\",\n },\n [badgeTypes.badgeModern]: {\n sm: \"gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-2.5 pr-1.5 text-sm font-semibold\",\n },\n} as const;\n\nexport const badgeWithMediaSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: \"gap-1 py-0.5 pl-0.75 pr-2 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1 pr-2.5 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-1.5 pr-3 text-sm font-semibold\",\n },\n [badgeTypes.badgeColor]: {\n sm: \"gap-1 py-0.5 pl-1 pr-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2 pr-2.5 text-sm font-semibold rounded-lg\",\n },\n [badgeTypes.badgeModern]: {\n sm: \"gap-1 py-0.5 pl-1 pr-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2 pr-2.5 text-sm font-semibold\",\n },\n} as const;\n\n//////////////////////////////////////////////// WEB-ONLY STYLES\n\n/** Plain focus — dismiss button on BadgeWithButton. */\nexport const badgeWebFocusShadowPlain =\n \"focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]\";\n\n/** Web needs `display:flex`; shared maps use `flex-row` for NativeWind. */\nexport const badgeWebDisplayFlex = \"flex\";\n\n/**\n * Exact `common` strings from web `badges.tsx` (`flex`, not `flex-row`).\n * Size / color maps are shared (`badgeStyles`, `badgeFilledColors`, …).\n */\nexport const badgeWebWithPillTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset shadow-xs\",\n styles: {\n gray: {\n root: \"bg-primary text-secondary ring-primary\",\n addon: \"text-neutral-500\",\n addonButton: \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n },\n },\n} as const;\n\nexport const badgeWebWithBadgeTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset bg-primary text-secondary ring-primary shadow-xs\",\n styles: addonOnlyColors,\n },\n} as const;\n\nexport const badgeWebButton =\n \"flex cursor-pointer items-center justify-center p-0.5 transition duration-100 ease-linear\";\nexport const badgeWebFlagImage = \"size-4 max-w-none rounded-full\";\n\n/** Typography for native `<Text>` label (size maps put these on the chrome). */\nexport const badgeLabelTextSizes: Record<BadgeSize, string> = {\n sm: \"text-xs font-semibold\",\n md: \"text-sm font-semibold\",\n lg: \"text-sm font-semibold\",\n};\n","import type { FC, ReactNode } from \"react\";\nimport { Image } from \"react-native\";\nimport { Pressable, Text, View } from \"react-native-css/components\";\nimport Svg, { Circle } from \"react-native-svg\";\nimport { XIcon } from \"phosphor-react-native/src/icons/X\";\nimport {\n BADGE_COLORS,\n BADGE_SIZES,\n badgeFilledColors,\n badgeIconSizeMaps,\n badgeLabelTextSizes,\n badgeOnlyIconSizeMaps,\n badgeStyles,\n badgeTypes,\n badgeWithBadgeTypes,\n badgeWithButtonSizeMaps,\n badgeWithMediaSizeMaps,\n badgeWithPillTypes,\n resolveBadgeDotSizeClass,\n resolveBadgeSizeClass,\n type BadgeColor,\n type BadgeColorName,\n type BadgeIconComponent,\n type BadgeSize,\n type BadgeTypeToColorMap,\n type BadgeTypes,\n} from \"@avenue-ticketing/core/badge\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { styled } from \"nativewind\";\n\nexport type {\n BadgeColor,\n BadgeColorName,\n BadgeIconComponent,\n BadgeSize,\n BadgeTypes,\n};\n\nexport { BADGE_COLORS, BADGE_SIZES, badgeTypes, badgeFilledColors as filledColors };\n\n//////////////////////////////////////////////// TYPES\n\nexport interface BadgeProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeColor<T>;\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithDotProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T];\n className?: string;\n children: ReactNode;\n}\n\nexport interface BadgeWithIconProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T];\n iconLeading?: BadgeIconComponent;\n iconTrailing?: BadgeIconComponent;\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithImageProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n imgSrc: string;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithButtonProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n icon?: BadgeIconComponent;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n children: ReactNode;\n buttonLabel?: string;\n onButtonPress?: () => void;\n className?: string;\n}\n\nexport interface BadgeIconProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n icon: BadgeIconComponent;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n className?: string;\n}\n\n//////////////////////////////////////////////// HELPERS\n\n/** Lets Tailwind `text-*` set SVG `color` so `fill=\"currentColor\"` matches web. */\nconst StyledSvg = styled(Svg);\n\nconst BadgeDot: FC<{ className?: string }> = ({ className }) => {\n return (\n <StyledSvg width={8} height={8} viewBox=\"0 0 8 8\" className={className}>\n <Circle cx={4} cy={4} r={2.5} fill=\"currentColor\" stroke=\"currentColor\" />\n </StyledSvg>\n );\n};\n\nconst BadgeLabel: FC<{ size: BadgeSize; colorClass: string; children: ReactNode }> = ({\n size,\n colorClass,\n children,\n}) => {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return <Text className={cx(badgeLabelTextSizes[size], colorClass)}>{children}</Text>;\n }\n return <>{children}</>;\n};\n\n//////////////////////////////////////////////// MAIN\n\n/**\n * NativeWind badge — shared Tailwind class maps from `@avenue-ticketing/core/badge`.\n */\nexport const Badge = <T extends BadgeTypes>({\n type = \"pill-color\" as T,\n size = \"md\",\n color = \"gray\" as BadgeColor<T>,\n children,\n className,\n}: BadgeProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const colorRoot = colors.styles[color as keyof typeof colors.styles].root;\n\n return (\n <View className={cx(colors.common, resolveBadgeSizeClass(type, size), colorRoot, className)}>\n <BadgeLabel size={size} colorClass={colorRoot}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithDot = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T],\n type = \"pill-color\" as T,\n className,\n children,\n}: BadgeWithDotProps<T>) => {\n const colors = badgeWithBadgeTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, resolveBadgeDotSizeClass(type, size), style.root, className)}>\n <BadgeDot className={style.addon} />\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithIcon = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T],\n type = \"pill-color\" as T,\n iconLeading: IconLeading,\n iconTrailing: IconTrailing,\n children,\n className,\n}: BadgeWithIconProps<T>) => {\n const colors = badgeWithBadgeTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n const icon = IconLeading ? \"leading\" : \"trailing\";\n\n return (\n <View className={cx(colors.common, badgeIconSizeMaps[type][size][icon], style.root, className)}>\n {IconLeading && <IconLeading weight=\"bold\" className={cx(style.addon, badgeStyles.icon)} size={12} />}\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n {IconTrailing && <IconTrailing weight=\"bold\" className={cx(style.addon, badgeStyles.icon)} size={12} />}\n </View>\n );\n};\n\nexport const BadgeWithImage = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n imgSrc,\n children,\n className,\n}: BadgeWithImageProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const colorRoot = colors.styles[color as keyof typeof colors.styles].root;\n\n return (\n <View className={cx(colors.common, badgeWithMediaSizeMaps[type][size], colorRoot, className)}>\n <Image\n source={{ uri: imgSrc }}\n accessibilityLabel=\"Badge image\"\n style={{ width: 16, height: 16, borderRadius: 999 }}\n />\n <BadgeLabel size={size} colorClass={colorRoot}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithButton = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n icon: Icon = XIcon,\n buttonLabel,\n children,\n onButtonPress,\n className,\n}: BadgeWithButtonProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, badgeWithButtonSizeMaps[type][size], style.root, className)}>\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel={buttonLabel}\n onPress={onButtonPress}\n className={cx(\n \"items-center justify-center p-0.5\",\n style.addonButton,\n type === badgeTypes.pillColor || type === badgeTypes.badgeModern ? \"rounded-full\" : \"rounded-[3px]\",\n )}\n >\n <Icon weight=\"bold\" className={badgeStyles.icon} size={12} />\n </Pressable>\n </View>\n );\n};\n\nexport const BadgeIcon = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n icon: Icon,\n className,\n}: BadgeIconProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, badgeOnlyIconSizeMaps[type][size], style.root, className)}>\n <Icon weight=\"bold\" className={cx(badgeStyles.icon, style.addon)} size={12} />\n </View>\n );\n};\n","import { createContext, useContext, useMemo, useState, type FC, type ReactNode } from \"react\";\nimport { ScrollView } from \"react-native\";\nimport { Pressable, Text, View } from \"react-native-css/components\";\nimport { useNativeVariable } from \"react-native-css\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { isReactComponent } from \"@avenue-ticketing/core/is-react-component\";\nimport {\n tabListStyles,\n tabNativeItemState,\n tabNativeLabelState,\n tabSizes,\n tabsStyles,\n type TabOrientation,\n type TabSize,\n type TabType,\n} from \"@avenue-ticketing/core/tabs\";\nimport { Badge } from \"../../base/badges/badges\";\n\nexport type { TabOrientation, TabSize, TabType };\n\n//////////////////////////////////////////////// CONTEXT\n\ntype TabsContextValue = {\n selectedKey: string | undefined;\n setSelectedKey: (key: string) => void;\n orientation: TabOrientation;\n};\n\nconst TabsContext = createContext<TabsContextValue | undefined>(undefined);\n\ntype TabListContextValue = {\n size: TabSize;\n type: TabType;\n fullWidth?: boolean;\n orientation: TabOrientation;\n};\n\nconst TabListContext = createContext<TabListContextValue>({\n size: \"sm\",\n type: \"button-brand\",\n orientation: \"horizontal\",\n});\n\n//////////////////////////////////////////////// MAIN\n\nexport const TabsRoot: FC<{\n children?: ReactNode;\n selectedKey?: string;\n defaultSelectedKey?: string;\n onSelectionChange?: (key: string) => void;\n orientation?: TabOrientation;\n className?: string;\n}> = ({ children, selectedKey, defaultSelectedKey, onSelectionChange, orientation = \"horizontal\", className }) => {\n const [internal, setInternal] = useState(defaultSelectedKey);\n const current = selectedKey ?? internal;\n const setSelectedKey = (key: string) => {\n if (selectedKey === undefined) setInternal(key);\n onSelectionChange?.(key);\n };\n const value = useMemo(\n () => ({ selectedKey: current, setSelectedKey, orientation }),\n [current, orientation],\n );\n\n return (\n <TabsContext.Provider value={value}>\n <View className={cx(orientation === \"vertical\" ? tabsStyles.rootVertical : tabsStyles.root, className)}>{children}</View>\n </TabsContext.Provider>\n );\n};\n\nexport const TabList: FC<{\n children?: ReactNode;\n size?: TabSize;\n type?: TabType;\n fullWidth?: boolean;\n className?: string;\n items?: TabItemProps[];\n}> = ({ children, size = \"sm\", type = \"button-brand\", fullWidth, className, items }) => {\n const tabs = useContext(TabsContext);\n const orientation = tabs?.orientation ?? \"horizontal\";\n const list = (\n <View\n className={cx(\n orientation === \"vertical\" ? tabsStyles.listVertical : tabsStyles.list,\n type === \"button-border\"\n ? cx(tabsStyles.listButtonBorder, size === \"md\" && tabsStyles.listButtonBorderMd)\n : type === \"button-minimal\"\n ? tabsStyles.listButtonMinimal\n : tabListStyles({ size, fullWidth })[type],\n orientation === \"horizontal\" && type === \"underline\" && \"relative\",\n fullWidth && \"w-full\",\n className,\n )}\n >\n {orientation === \"horizontal\" && type === \"underline\" && (\n <View className=\"absolute right-0 bottom-0 left-0 h-px bg-border-secondary\" />\n )}\n {children ?? items?.map((item) => <Tab key={item.id} {...item} />)}\n </View>\n );\n\n return (\n <TabListContext.Provider value={{ size, type, fullWidth, orientation }}>\n {orientation === \"horizontal\" ? (\n <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerClassName={fullWidth ? \"grow\" : undefined}>\n {list}\n </ScrollView>\n ) : (\n list\n )}\n </TabListContext.Provider>\n );\n};\n\nexport interface TabItemProps {\n id: string;\n label?: ReactNode;\n children?: ReactNode;\n badge?: number | string;\n icon?: FC<{ size?: number; color?: string }> | ReactNode;\n}\n\nexport const Tab: FC<TabItemProps> = ({ id, label, children, badge, icon: Icon }) => {\n const tabs = useContext(TabsContext);\n const { size, type, fullWidth, orientation } = useContext(TabListContext);\n const selected = tabs?.selectedKey === id;\n const isLineChrome = type === \"line\" || type === \"line-stacked\";\n const isStacked = type === \"line-stacked\";\n const showPill = type === \"underline\" || isLineChrome || type === \"button-brand\";\n const fg = useNativeVariable(selected ? \"--color-fg-primary\" : \"--color-fg-quaternary\") ?? \"#717680\";\n const brand = useNativeVariable(\"--color-fg-brand-secondary\") ?? \"#6941c6\";\n const fgQuaternary = useNativeVariable(\"--color-fg-quaternary\") ?? \"#717680\";\n const iconColor = selected && (type === \"underline\" || isLineChrome) ? brand : selected ? fg : fgQuaternary;\n\n return (\n <Pressable\n accessibilityRole=\"tab\"\n accessibilityState={{ selected }}\n onPress={() => tabs?.setSelectedKey(id)}\n style={orientation === \"horizontal\" ? { flexShrink: 0, zIndex: 1 } : { zIndex: 1 }}\n className={cx(\n tabsStyles.item,\n orientation === \"vertical\" && tabsStyles.itemVertical,\n isStacked && tabsStyles.itemStacked,\n fullWidth && orientation === \"vertical\" && tabsStyles.itemFull,\n tabSizes[size][type],\n tabNativeItemState(type, selected),\n )}\n >\n {isStacked && isReactComponent(Icon) && (\n <View className={tabsStyles.iconStacked}>\n <Icon size={20} color={iconColor} />\n {badge != null && (\n <View className={tabsStyles.badgeStacked}>\n <Badge size=\"sm\" type={showPill ? \"pill-color\" : \"modern\"} color={showPill && selected ? \"brand\" : \"gray\"}>\n {badge}\n </Badge>\n </View>\n )}\n </View>\n )}\n {!isStacked && isReactComponent(Icon) && <Icon size={tabSizes[size].icon} color={iconColor} />}\n <View className={cx(isStacked ? tabsStyles.labelStacked : tabsStyles.labelRow, !isLineChrome && \"px-0.5\")}>\n <Text\n numberOfLines={isStacked ? 2 : 1}\n className={cx(\n isStacked ? \"text-sm font-medium\" : size === \"sm\" ? \"text-sm font-semibold\" : \"text-md font-semibold\",\n isStacked && \"text-left\",\n tabNativeLabelState(type, selected),\n )}\n >\n {children || label}\n </Text>\n {!isStacked && badge != null && (\n <Badge size=\"sm\" type={showPill ? \"pill-color\" : \"modern\"} color={showPill && selected ? \"brand\" : \"gray\"}>\n {badge}\n </Badge>\n )}\n </View>\n </Pressable>\n );\n};\n\nexport const TabPanel: FC<{ id: string; children?: ReactNode; className?: string }> = ({ id, children, className }) => {\n const tabs = useContext(TabsContext);\n if (tabs?.selectedKey !== id) return null;\n return <View className={className}>{children}</View>;\n};\n\nexport const Tabs = Object.assign(TabsRoot, {\n List: TabList,\n Item: Tab,\n Panel: TabPanel,\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["../../core/src/cx.ts","../../core/src/is-react-component.ts","../../core/src/tabs.ts","../../core/src/badge.ts","../../../native/components/base/badges/badges.tsx","../../../native/components/application/tabs/tabs.tsx"],"names":["jsx","View","jsxs","Pressable","Text"],"mappings":";;;;;;;;;;;;AAEA,IAAM,UAAU,mBAAA,CAAoB;AAAA,EAChC,MAAA,EAAQ;AAAA,IACJ,KAAA,EAAO;AAAA,MACH,MAAM,CAAC,YAAA,EAAc,cAAc,YAAA,EAAc,YAAA,EAAc,cAAc,aAAa;AAAA;AAC9F;AAER,CAAC,CAAA;AAGM,IAAM,EAAA,GAAK,OAAA;AAGX,SAAS,OAAsH,OAAA,EAAe;AACjJ,EAAA,OAAO,OAAA;AACX;;;ACXO,IAAM,mBAAA,GAAsB,CAAC,SAAA,KAA+C;AAC/E,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA;AAChC,CAAA;AAEO,IAAM,gBAAA,GAAmB,CAAC,SAAA,KAAgE;AAC7F,EAAA,OAAO,OAAO,SAAA,KAAc,UAAA,IAAc,SAAA,CAAU,SAAA,KAAc,CAAC,CAAC,SAAA,CAAU,SAAA,CAAU,gBAAA,IAAoB,CAAC,CAAC,UAAU,SAAA,CAAU,MAAA,CAAA;AACtI,CAAA;AAEO,IA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AAA;AAEd,CAAC,CAAA","file":"tabs.js","sourcesContent":["import { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n text: [\"display-xs\", \"display-sm\", \"display-md\", \"display-lg\", \"display-xl\", \"display-2xl\"],\n },\n },\n});\n\n/** Merge Tailwind / NativeWind class strings. */\nexport const cx = twMerge;\n\n/** Identity helper so Tailwind IntelliSense can sort style maps. */\nexport function sortCx<T extends Record<string, string | number | Record<string, string | number | Record<string, string | number>>>>(classes: T): T {\n return classes;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from \"react\";\n\ntype ReactComponent = React.FC<any> | React.ComponentClass<any, any>;\n\nexport const isFunctionComponent = (component: any): component is React.FC<any> => {\n return typeof component === \"function\";\n};\n\nexport const isClassComponent = (component: any): component is React.ComponentClass<any, any> => {\n return typeof component === \"function\" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);\n};\n\nexport const isForwardRefComponent = (component: any): component is React.ForwardRefExoticComponent<any> => {\n return typeof component === \"object\" && component !== null && component.$$typeof.toString() === \"Symbol(react.forward_ref)\";\n};\n\nexport const isReactComponent = (component: any): component is ReactComponent => {\n return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);\n};\n","import { cx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const TAB_ORIENTATIONS = [\"horizontal\", \"vertical\"] as const;\nexport type TabOrientation = (typeof TAB_ORIENTATIONS)[number];\n\nexport const TAB_SIZES = [\"sm\", \"md\"] as const;\nexport type TabSize = (typeof TAB_SIZES)[number];\n\nexport const HORIZONTAL_TAB_TYPES = [\n \"button-brand\",\n \"button-gray\",\n \"button-border\",\n \"button-minimal\",\n /** Fully rounded pills with a traveling selected background (web). */\n \"button-pill\",\n \"underline\",\n] as const;\n/** `line` = vertical underline (icon + label in a row). `line-stacked` = same chrome, icon above label. */\nexport const VERTICAL_TAB_TYPES = [\"button-brand\", \"button-gray\", \"button-border\", \"button-minimal\", \"line\", \"line-stacked\"] as const;\nexport type HorizontalTabType = (typeof HORIZONTAL_TAB_TYPES)[number];\nexport type VerticalTabType = (typeof VERTICAL_TAB_TYPES)[number];\nexport type TabType = HorizontalTabType | VerticalTabType;\n\n/** Fill color for `button-pill` only — maps to solid indicator + selected label. */\nexport const PILL_TAB_COLORS = [\"brand\", \"primary\"] as const;\nexport type PillTabColor = (typeof PILL_TAB_COLORS)[number];\n\n/** Underline / vertical line types that support a traveling border indicator. */\nexport function isLineTabType(type: TabType): boolean {\n return type === \"underline\" || type === \"line\" || type === \"line-stacked\";\n}\n\nexport interface TabState {\n isFocusVisible?: boolean;\n isSelected?: boolean;\n isHovered?: boolean;\n isPressed?: boolean;\n}\n\nexport interface TabItemStyleOptions {\n /**\n * Traveling underline/line indicator (`underline` / `line` / `line-stacked`).\n * When true, selected chrome is the shared indicator — tabs keep a transparent border only.\n */\n travel?: boolean;\n}\n\n/** Indicator fill + selected label/icon for `button-pill`. */\nexport const pillTabColorStyles: Record<\n PillTabColor,\n { indicator: string; selected: string; nativeSelected: string; nativeLabel: string }\n> = {\n brand: {\n indicator: \"bg-brand-solid\",\n selected: \"text-primary_on-brand *:data-icon:text-primary_on-brand\",\n nativeSelected: \"rounded-full bg-brand-solid\",\n nativeLabel: \"text-primary_on-brand\",\n },\n primary: {\n indicator: \"bg-primary-solid\",\n selected: \"text-fg-white *:data-icon:text-fg-white\",\n nativeSelected: \"rounded-full bg-primary-solid\",\n nativeLabel: \"text-fg-white\",\n },\n};\n\n//////////////////////////////////////////////// WEB STYLES\n// Exact class fragments from `components/application/tabs/tabs.tsx`.\n\nexport function tabItemStyles(\n { isFocusVisible, isSelected, isHovered, isPressed }: TabState,\n options: TabItemStyleOptions = {},\n): Record<TabType, string> {\n const travel = options.travel !== false;\n\n const lineSelectedText =\n (isSelected || isHovered) && \"text-brand-secondary *:data-icon:text-fg-brand-secondary_hover\";\n /** Static mode: border paints on the tab. Travel mode: border stays transparent (indicator moves). */\n const underlineBorder =\n !travel && (isSelected || isHovered) && \"border-fg-brand-primary_alt\";\n const lineBorder = !travel && (isSelected || isHovered) && \"border-fg-brand-primary_alt\";\n\n return {\n \"button-brand\": cx(\n \"outline-focus-ring text-secondary *:data-icon:text-fg-secondary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n isHovered && !isSelected && \"bg-secondary_hover\",\n isSelected && \"bg-brand-primary text-primary *:data-icon:text-fg-primary\",\n ),\n \"button-gray\": cx(\n \"outline-focus-ring *:data-icon:text-fg-quaternary\",\n isHovered && \"bg-primary_hover text-secondary *:data-icon:text-fg-secondary_hover\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n isSelected && \"bg-primary_hover text-secondary *:data-icon:text-fg-secondary_hover\",\n ),\n \"button-border\": cx(\n \"outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"bg-primary_alt text-secondary shadow-sm *:data-icon:text-fg-secondary_hover\",\n ),\n \"button-minimal\": cx(\n \"rounded-lg outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n (isSelected || isHovered) && \"bg-primary_alt text-secondary shadow-xs ring-1 ring-primary ring-inset *:data-icon:text-fg-secondary_hover\",\n ),\n // Selected fill comes from the clip-path indicator — tab stays transparent.\n // Selected label color is applied in Tab via `pillTabColorStyles` + `color` prop.\n // Light press scale via RAC `isPressed` (data-pressed / :active alone often miss on Tab).\n \"button-pill\": cx(\n \"rounded-full outline-focus-ring text-quaternary *:data-icon:text-fg-quaternary\",\n \"touch-manipulation [-webkit-tap-highlight-color:transparent]\",\n \"scale-100 transition-[color,background-color,transform] duration-150 ease-out\",\n \"motion-reduce:transition-[color,background-color]\",\n isPressed && \"scale-[0.98] duration-100 ease-linear motion-reduce:scale-100\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n isHovered && !isSelected && \"bg-primary_hover text-secondary *:data-icon:text-fg-secondary\",\n ),\n underline: cx(\n \"rounded-none border-b-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n lineSelectedText,\n underlineBorder,\n ),\n line: cx(\n \"rounded-none border-l-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n lineSelectedText,\n lineBorder,\n ),\n \"line-stacked\": cx(\n \"rounded-none border-l-2 border-transparent outline-focus-ring *:data-icon:text-fg-quaternary\",\n isFocusVisible && \"outline-2 -outline-offset-2\",\n lineSelectedText,\n lineBorder,\n ),\n };\n}\n\nexport const tabSizes = {\n sm: {\n base: \"text-sm font-semibold gap-1 *:data-icon:size-4\",\n \"button-brand\": \"py-2 px-2.5\",\n \"button-gray\": \"py-2 px-2.5\",\n \"button-border\": \"py-2 px-2.5\",\n \"button-minimal\": \"py-2 px-2.5\",\n // Match legacy Avenue UI pill: h-9 + px-4.\n \"button-pill\": \"h-9 rounded-full px-4 py-0\",\n underline: \"px-0.5 pb-2.5 pt-0\",\n line: \"pl-2.5 pr-3 py-0.5\",\n // Vertical underline + stacked: pl-5 / pr-3, icon size-5.\n \"line-stacked\": \"gap-1.5 py-2 pr-3 pl-5 text-sm font-medium *:data-icon:size-5\",\n icon: 16,\n },\n md: {\n base: \"text-md font-semibold gap-1.5 *:data-icon:size-5\",\n \"button-brand\": \"py-2.5 px-2.5\",\n \"button-gray\": \"py-2.5 px-2.5\",\n \"button-border\": \"py-2.5 px-2.5\",\n \"button-minimal\": \"py-2.5 px-2.5\",\n \"button-pill\": \"h-10 rounded-full px-4 py-0\",\n underline: \"px-0.5 pb-2.5 pt-0\",\n line: \"pr-3.5 pl-3 py-1\",\n \"line-stacked\": \"gap-1.5 py-2 pr-3 pl-5 text-sm font-medium *:data-icon:size-5\",\n icon: 20,\n },\n} as const;\n\nexport function tabListStyles({ size, fullWidth }: { size?: TabSize; fullWidth?: boolean }): Record<TabType, string> {\n return {\n \"button-brand\": \"gap-1\",\n \"button-gray\": \"gap-1\",\n \"button-border\": cx(\"gap-1 rounded-[10px] bg-secondary_alt p-1 ring-1 ring-secondary ring-inset\", size === \"md\" && \"rounded-xl p-1.5\"),\n \"button-minimal\": \"gap-0.5 rounded-lg bg-secondary_alt ring-1 ring-inset ring-secondary\",\n \"button-pill\": \"relative items-center gap-1\",\n underline: cx(\"gap-3\", fullWidth && \"w-full gap-4\"),\n line: \"gap-2\",\n \"line-stacked\": \"gap-1\",\n };\n}\n\nexport const tabWebStyles = {\n root: \"flex w-full flex-col\",\n /** Vertical orientation: rail beside panel (partners sheets). */\n rootVertical: \"flex-row\",\n list: \"group flex\",\n listVertical: \"w-max flex-col\",\n listUnderlineRule: \"relative before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-border-secondary\",\n panel: \"outline-focus-ring focus-visible:outline-2 focus-visible:outline-offset-2\",\n item: \"z-10 flex h-max cursor-pointer items-center justify-center gap-2 rounded-md whitespace-nowrap text-quaternary transition duration-100 ease-linear\",\n itemVertical: \"group-orientation-vertical:justify-start\",\n /** Vertical underline with icon above label. */\n itemStacked:\n \"flex-col! w-full items-start justify-start gap-1.5 overflow-visible whitespace-normal [&_svg]:size-5 [&_svg]:shrink-0\",\n itemFull: \"w-full flex-1\",\n label: \"flex items-center gap-1.5\",\n labelLine: \"flex items-center gap-1.5\",\n /** Icon slot wrapper for line-stacked. */\n iconStacked:\n \"relative inline-flex size-5 shrink-0 items-center justify-center overflow-visible [&_svg]:size-5 [&_svg]:shrink-0\",\n labelStacked: \"block min-w-0 w-full text-left leading-snug\",\n badge: \"hidden transition-inherit-all md:flex\",\n badgeSm: \"-my-px\",\n /** line-stacked: same Badge as row tabs, anchored to the icon’s top-right corner. */\n badgeStacked: \"absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2\",\n /**\n * Traveling selected fill for `button-pill` — clipped via `--tab-indicator-start/end`\n * (same technique as legacy Avenue UI tabs). Sits under tab labels (`item` is z-10).\n */\n pillIndicator:\n \"pointer-events-none absolute inset-x-0 top-0 z-0 h-9 rounded-full motion-reduce:transition-none motion-safe:transition-[clip-path] motion-safe:duration-300 motion-safe:ease-[cubic-bezier(0,0.55,0.45,1)]\",\n pillIndicatorMd: \"h-10\",\n /** Horizontal clip-path using CSS vars set by TabList (pill — rounded). */\n pillClipPath:\n \"inset(0 calc(100% - var(--tab-indicator-end, 0px)) 0 var(--tab-indicator-start, 0px) round 9999px)\",\n /** Horizontal clip-path for underline bar (no round). */\n lineClipPathHorizontal:\n \"inset(0 calc(100% - var(--tab-indicator-end, 0px)) 0 var(--tab-indicator-start, 0px))\",\n /** Vertical clip-path (line / line-stacked). */\n lineClipPathVertical:\n \"inset(var(--tab-indicator-start, 0px) 0 calc(100% - var(--tab-indicator-end, 0px)) 0)\",\n /**\n * Horizontal underline bar — bottom of the list.\n * Thickness matches tab `border-b-2` (2px). z-[1] so it sits above the hairline rule.\n */\n underlineIndicator:\n \"bg-fg-brand-primary_alt pointer-events-none absolute inset-x-0 bottom-0 z-[1] h-[2px] motion-reduce:transition-none motion-safe:transition-[clip-path] motion-safe:duration-300 motion-safe:ease-[cubic-bezier(0,0.55,0.45,1)]\",\n /**\n * Vertical line bar — left of the list.\n * Thickness matches tab `border-l-2` (2px).\n */\n lineIndicator:\n \"bg-fg-brand-primary_alt pointer-events-none absolute inset-y-0 left-0 z-[1] w-[2px] motion-reduce:transition-none motion-safe:transition-[clip-path] motion-safe:duration-300 motion-safe:ease-[cubic-bezier(0,0.55,0.45,1)]\",\n} as const;\n\n//////////////////////////////////////////////// NATIVE STYLES\n// Selected chrome only. Skips hover, focus ring, and `md:` badge hiding.\n\nexport const tabsStyles = {\n root: \"w-full flex-col\",\n rootVertical: \"w-full flex-row\",\n list: \"flex-row\",\n listVertical: \"flex-col\",\n listUnderlineRule: \"border-b border-secondary\",\n listButtonBorder: \"gap-1 rounded-[10px] border border-secondary bg-secondary_alt p-1\",\n listButtonBorderMd: \"rounded-xl p-1.5\",\n listButtonMinimal: \"gap-0.5 rounded-lg border border-secondary bg-secondary_alt\",\n item: \"flex-row items-center justify-center gap-2 rounded-md\",\n itemVertical: \"justify-start\",\n itemStacked: \"w-full flex-col items-start justify-start gap-1.5 overflow-visible\",\n itemFull: \"flex-1\",\n label: \"font-semibold text-quaternary\",\n labelRow: \"flex-row items-center gap-1.5\",\n labelStacked: \"w-full min-w-0\",\n iconStacked: \"relative size-5 shrink-0 items-center justify-center overflow-visible\",\n badgeStacked: \"absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2\",\n /** Traveling selected fill for native `button-pill` (positioned by Reanimated). */\n pillIndicator: \"absolute top-0 left-0 z-0 rounded-full\",\n /** Native traveling underline / line bar — 2px to match `border-b-2` / `border-l-2`. */\n underlineIndicator: \"absolute bottom-0 left-0 z-[1] h-[2px] bg-fg-brand-primary_alt\",\n lineIndicator: \"absolute top-0 left-0 z-[1] w-[2px] bg-fg-brand-primary_alt\",\n} as const;\n\nexport function tabNativeItemState(\n type: TabType,\n selected: boolean,\n options: TabItemStyleOptions = {},\n) {\n const travel = options.travel !== false;\n\n if (!selected) {\n if (type === \"underline\" || type === \"line\" || type === \"line-stacked\") return \"border-transparent\";\n return \"\";\n }\n switch (type) {\n case \"button-brand\":\n return \"bg-brand-primary\";\n case \"button-gray\":\n return \"bg-primary_hover\";\n case \"button-border\":\n return \"bg-primary_alt\";\n case \"button-minimal\":\n return \"rounded-lg bg-primary_alt border border-primary\";\n case \"button-pill\":\n // Fill comes from the traveling indicator on native — keep the tab transparent.\n return \"rounded-full\";\n case \"underline\":\n return travel\n ? \"rounded-none border-b-2 border-transparent\"\n : \"rounded-none border-b-2 border-fg-brand-primary_alt\";\n case \"line\":\n case \"line-stacked\":\n return travel\n ? \"rounded-none border-l-2 border-transparent\"\n : \"rounded-none border-l-2 border-fg-brand-primary_alt\";\n default: {\n const _exhaustive: never = type;\n return _exhaustive;\n }\n }\n}\n\n/** Text color only. Borders stay on the tab so the label does not draw a second line. */\nexport function tabNativeLabelState(type: TabType, selected: boolean) {\n if (!selected) {\n if (type === \"button-brand\" || type === \"button-pill\") return \"text-secondary\";\n return \"text-quaternary\";\n }\n switch (type) {\n case \"button-brand\":\n return \"text-primary\";\n case \"button-pill\":\n return pillTabColorStyles.brand.nativeLabel;\n case \"button-gray\":\n case \"button-border\":\n case \"button-minimal\":\n return \"text-secondary\";\n case \"underline\":\n case \"line\":\n case \"line-stacked\":\n return \"text-brand-secondary\";\n default: {\n const _exhaustive: never = type;\n return _exhaustive;\n }\n }\n}\n","import type { FC } from \"react\";\nimport { sortCx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const BADGE_SIZES = [\"sm\", \"md\", \"lg\"] as const;\nexport type BadgeSize = (typeof BADGE_SIZES)[number];\n\nexport const BADGE_COLORS = [\n \"gray\",\n \"brand\",\n \"error\",\n \"warning\",\n \"success\",\n \"slate\",\n \"sky\",\n \"blue\",\n \"indigo\",\n \"purple\",\n \"pink\",\n \"orange\",\n] as const;\nexport type BadgeColorName = (typeof BADGE_COLORS)[number];\n\nexport const badgeTypes = {\n pillColor: \"pill-color\",\n badgeColor: \"color\",\n badgeModern: \"modern\",\n} as const;\n\nexport type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];\n\nexport type ExtractColorKeys<T> = T extends { styles: infer C } ? keyof C : never;\nexport type ExtractBadgeKeys<T> = keyof T;\nexport type BadgeTypeToColorMap<T> = {\n [K in ExtractBadgeKeys<T>]: ExtractColorKeys<T[K]>;\n};\n\n/** Icon component contract for badge addons (web Phosphor / native Phosphor). */\nexport type BadgeIconComponent = FC<{\n className?: string;\n weight?: \"thin\" | \"light\" | \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n size?: number;\n color?: string;\n}>;\n\n//////////////////////////////////////////////// SHARED STYLES\n// Visual contract for web + native. Web focus / hover stay in badgeWebStyles.\n\nexport const badgeFilledColors: Record<\n BadgeColorName,\n { root: string; addon: string; addonButton: string }\n> = {\n gray: {\n root: \"bg-utility-neutral-50 text-utility-neutral-700 ring-utility-neutral-200\",\n addon: \"text-utility-neutral-500\",\n addonButton: \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n brand: {\n root: \"bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200\",\n addon: \"text-utility-brand-500\",\n addonButton: \"hover:bg-utility-brand-100 text-utility-brand-400 hover:text-utility-brand-500\",\n },\n error: {\n root: \"bg-utility-red-50 text-utility-red-700 ring-utility-red-200\",\n addon: \"text-utility-red-500\",\n addonButton: \"hover:bg-utility-red-100 text-utility-red-400 hover:text-utility-red-500\",\n },\n warning: {\n root: \"bg-utility-yellow-50 text-utility-yellow-700 ring-utility-yellow-200\",\n addon: \"text-utility-yellow-500\",\n addonButton: \"hover:bg-utility-yellow-100 text-utility-yellow-400 hover:text-utility-yellow-500\",\n },\n success: {\n root: \"bg-utility-green-50 text-utility-green-700 ring-utility-green-200\",\n addon: \"text-utility-green-500\",\n addonButton: \"hover:bg-utility-green-100 text-utility-green-400 hover:text-utility-green-500\",\n },\n slate: {\n root: \"bg-utility-slate-50 text-utility-slate-700 ring-utility-slate-200\",\n addon: \"text-utility-slate-500\",\n addonButton: \"hover:bg-utility-slate-100 text-utility-slate-400 hover:text-utility-slate-500\",\n },\n sky: {\n root: \"bg-utility-sky-50 text-utility-sky-700 ring-utility-sky-200\",\n addon: \"text-utility-sky-500\",\n addonButton: \"hover:bg-utility-sky-100 text-utility-sky-400 hover:text-utility-sky-500\",\n },\n blue: {\n root: \"bg-utility-blue-50 text-utility-blue-700 ring-utility-blue-200\",\n addon: \"text-utility-blue-500\",\n addonButton: \"hover:bg-utility-blue-100 text-utility-blue-400 hover:text-utility-blue-500\",\n },\n indigo: {\n root: \"bg-utility-indigo-50 text-utility-indigo-700 ring-utility-indigo-200\",\n addon: \"text-utility-indigo-500\",\n addonButton: \"hover:bg-utility-indigo-100 text-utility-indigo-400 hover:text-utility-indigo-500\",\n },\n purple: {\n root: \"bg-utility-purple-50 text-utility-purple-700 ring-utility-purple-200\",\n addon: \"text-utility-purple-500\",\n addonButton: \"hover:bg-utility-purple-100 text-utility-purple-400 hover:text-utility-purple-500\",\n },\n pink: {\n root: \"bg-utility-pink-50 text-utility-pink-700 ring-utility-pink-200\",\n addon: \"text-utility-pink-500\",\n addonButton: \"hover:bg-utility-pink-100 text-utility-pink-400 hover:text-utility-pink-500\",\n },\n orange: {\n root: \"bg-utility-orange-50 text-utility-orange-700 ring-utility-orange-200\",\n addon: \"text-utility-orange-500\",\n addonButton: \"hover:bg-utility-orange-100 text-utility-orange-400 hover:text-utility-orange-500\",\n },\n};\n\nconst addonOnlyColors = Object.fromEntries(\n Object.entries(badgeFilledColors).map(([key, value]) => [key, { root: \"\", addon: value.addon }]),\n) as Record<BadgeColorName, { root: string; addon: string }>;\n\n/**\n * Shared layout chrome. Avoid bare `flex` (NativeWind). Web shells prepend `flex`.\n */\nexport const badgeWithPillTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common:\n \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset shadow-xs\",\n styles: {\n gray: {\n root: \"bg-primary text-secondary ring-primary\",\n addon: \"text-neutral-500\",\n addonButton:\n \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n },\n },\n} as const;\n\nexport const badgeWithBadgeTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex-row items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common:\n \"size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset bg-primary text-secondary ring-primary shadow-xs\",\n styles: addonOnlyColors,\n },\n} as const;\n\nexport type BadgeColor<T extends BadgeTypes> = BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n\nexport const badgeStyles = sortCx({\n pillSizes: {\n sm: \"py-0.5 px-2 text-xs font-semibold\",\n md: \"py-0.5 px-2.5 text-sm font-semibold\",\n lg: \"py-1 px-3 text-sm font-semibold\",\n },\n badgeSizes: {\n sm: \"py-0.5 px-1.5 text-xs font-semibold\",\n md: \"py-0.5 px-2 text-sm font-semibold\",\n lg: \"py-1 px-2.5 text-sm font-semibold\",\n },\n badgeColorSizes: {\n sm: \"py-0.5 px-1.5 text-xs font-semibold\",\n md: \"py-0.5 px-2 text-sm font-semibold\",\n lg: \"py-1 px-2.5 text-sm font-semibold rounded-lg\",\n },\n pillDotSizes: {\n sm: \"gap-1 py-0.5 pl-1.5 pr-2 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-2 pr-2.5 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2.5 pr-3 text-sm font-semibold\",\n },\n badgeDotSizes: {\n sm: \"gap-1 py-0.5 px-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 px-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 px-2.5 text-sm font-semibold\",\n },\n badgeColorDotSizes: {\n sm: \"gap-1 py-0.5 px-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 px-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 px-2.5 text-sm font-semibold rounded-lg\",\n },\n icon: \"size-3\",\n});\n\n/** Resolve size class map for plain `Badge` / similar. */\nexport function resolveBadgeSizeClass(type: BadgeTypes, size: BadgeSize): string {\n if (type === badgeTypes.pillColor) return badgeStyles.pillSizes[size];\n if (type === badgeTypes.badgeColor) return badgeStyles.badgeColorSizes[size];\n return badgeStyles.badgeSizes[size];\n}\n\nexport function resolveBadgeDotSizeClass(type: BadgeTypes, size: BadgeSize): string {\n if (type === badgeTypes.pillColor) return badgeStyles.pillDotSizes[size];\n if (type === badgeTypes.badgeColor) return badgeStyles.badgeColorDotSizes[size];\n return badgeStyles.badgeDotSizes[size];\n}\n\nexport const badgeIconSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2.5 pr-2 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2.5 pl-2 text-sm font-semibold\" },\n lg: { trailing: \"gap-1 py-1 pl-3 pr-2.5 text-sm font-semibold\", leading: \"gap-1 py-1 pr-3 pl-2.5 text-sm font-semibold\" },\n },\n [badgeTypes.badgeColor]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2 pr-1.5 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2 pl-1.5 text-sm font-semibold\" },\n lg: {\n trailing: \"gap-1 py-1 pl-2.5 pr-2 text-sm font-semibold rounded-lg\",\n leading: \"gap-1 py-1 pr-2.5 pl-2 text-sm font-semibold rounded-lg\",\n },\n },\n [badgeTypes.badgeModern]: {\n sm: { trailing: \"gap-0.5 py-0.5 pl-2 pr-1.5 text-xs font-semibold\", leading: \"gap-0.5 py-0.5 pr-2 pl-1.5 text-xs font-semibold\" },\n md: { trailing: \"gap-1 py-0.5 pl-2 pr-1.5 text-sm font-semibold\", leading: \"gap-1 py-0.5 pr-2 pl-1.5 text-sm font-semibold\" },\n lg: { trailing: \"gap-1 py-1 pl-2.5 pr-2 text-sm font-semibold\", leading: \"gap-1 py-1 pr-2.5 pl-2 text-sm font-semibold\" },\n },\n} as const;\n\nexport const badgeOnlyIconSizeMaps = {\n [badgeTypes.pillColor]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2\" },\n [badgeTypes.badgeColor]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2 rounded-lg\" },\n [badgeTypes.badgeModern]: { sm: \"p-1.25\", md: \"p-1.5\", lg: \"p-2\" },\n} as const;\n\nexport const badgeWithButtonSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: \"gap-0.5 py-0.5 pl-2 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2.5 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-3 pr-1.5 text-sm font-semibold\",\n },\n [badgeTypes.badgeColor]: {\n sm: \"gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-2.5 pr-1.5 text-sm font-semibold rounded-lg\",\n },\n [badgeTypes.badgeModern]: {\n sm: \"gap-0.5 py-0.5 pl-1.5 pr-0.75 text-xs font-semibold\",\n md: \"gap-0.5 py-0.5 pl-2 pr-1 text-sm font-semibold\",\n lg: \"gap-0.5 py-1 pl-2.5 pr-1.5 text-sm font-semibold\",\n },\n} as const;\n\nexport const badgeWithMediaSizeMaps = {\n [badgeTypes.pillColor]: {\n sm: \"gap-1 py-0.5 pl-0.75 pr-2 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1 pr-2.5 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-1.5 pr-3 text-sm font-semibold\",\n },\n [badgeTypes.badgeColor]: {\n sm: \"gap-1 py-0.5 pl-1 pr-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2 pr-2.5 text-sm font-semibold rounded-lg\",\n },\n [badgeTypes.badgeModern]: {\n sm: \"gap-1 py-0.5 pl-1 pr-1.5 text-xs font-semibold\",\n md: \"gap-1.5 py-0.5 pl-1.5 pr-2 text-sm font-semibold\",\n lg: \"gap-1.5 py-1 pl-2 pr-2.5 text-sm font-semibold\",\n },\n} as const;\n\n//////////////////////////////////////////////// WEB-ONLY STYLES\n\n/** Plain focus — dismiss button on BadgeWithButton. */\nexport const badgeWebFocusShadowPlain =\n \"focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]\";\n\n/** Web needs `display:flex`; shared maps use `flex-row` for NativeWind. */\nexport const badgeWebDisplayFlex = \"flex\";\n\n/**\n * Exact `common` strings from web `badges.tsx` (`flex`, not `flex-row`).\n * Size / color maps are shared (`badgeStyles`, `badgeFilledColors`, …).\n */\nexport const badgeWebWithPillTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset shadow-xs\",\n styles: {\n gray: {\n root: \"bg-primary text-secondary ring-primary\",\n addon: \"text-neutral-500\",\n addonButton: \"hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500\",\n },\n },\n },\n} as const;\n\nexport const badgeWebWithBadgeTypes = {\n [badgeTypes.pillColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeColor]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-md ring-1 ring-inset\",\n styles: badgeFilledColors,\n },\n [badgeTypes.badgeModern]: {\n common: \"size-max flex items-center whitespace-nowrap rounded-full ring-1 ring-inset bg-primary text-secondary ring-primary shadow-xs\",\n styles: addonOnlyColors,\n },\n} as const;\n\nexport const badgeWebButton =\n \"flex cursor-pointer items-center justify-center p-0.5 transition duration-100 ease-linear\";\nexport const badgeWebFlagImage = \"size-4 max-w-none rounded-full\";\n\n/** Typography for native `<Text>` label (size maps put these on the chrome). */\nexport const badgeLabelTextSizes: Record<BadgeSize, string> = {\n sm: \"text-xs font-semibold\",\n md: \"text-sm font-semibold\",\n lg: \"text-sm font-semibold\",\n};\n","import type { FC, ReactNode } from \"react\";\nimport { Image } from \"react-native\";\nimport { Pressable, Text, View } from \"react-native-css/components\";\nimport Svg, { Circle } from \"react-native-svg\";\nimport { XIcon } from \"phosphor-react-native/src/icons/X\";\nimport {\n BADGE_COLORS,\n BADGE_SIZES,\n badgeFilledColors,\n badgeIconSizeMaps,\n badgeLabelTextSizes,\n badgeOnlyIconSizeMaps,\n badgeStyles,\n badgeTypes,\n badgeWithBadgeTypes,\n badgeWithButtonSizeMaps,\n badgeWithMediaSizeMaps,\n badgeWithPillTypes,\n resolveBadgeDotSizeClass,\n resolveBadgeSizeClass,\n type BadgeColor,\n type BadgeColorName,\n type BadgeIconComponent,\n type BadgeSize,\n type BadgeTypeToColorMap,\n type BadgeTypes,\n} from \"@avenue-ticketing/core/badge\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { styled } from \"nativewind\";\n\nexport type {\n BadgeColor,\n BadgeColorName,\n BadgeIconComponent,\n BadgeSize,\n BadgeTypes,\n};\n\nexport { BADGE_COLORS, BADGE_SIZES, badgeTypes, badgeFilledColors as filledColors };\n\n//////////////////////////////////////////////// TYPES\n\nexport interface BadgeProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeColor<T>;\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithDotProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T];\n className?: string;\n children: ReactNode;\n}\n\nexport interface BadgeWithIconProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n color?: BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T];\n iconLeading?: BadgeIconComponent;\n iconTrailing?: BadgeIconComponent;\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithImageProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n imgSrc: string;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n children: ReactNode;\n className?: string;\n}\n\nexport interface BadgeWithButtonProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n icon?: BadgeIconComponent;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n children: ReactNode;\n buttonLabel?: string;\n onButtonPress?: () => void;\n className?: string;\n}\n\nexport interface BadgeIconProps<T extends BadgeTypes = BadgeTypes> {\n type?: T;\n size?: BadgeSize;\n icon: BadgeIconComponent;\n color?: BadgeTypeToColorMap<typeof badgeWithPillTypes>[T];\n className?: string;\n}\n\n//////////////////////////////////////////////// HELPERS\n\n/** Lets Tailwind `text-*` set SVG `color` so `fill=\"currentColor\"` matches web. */\nconst StyledSvg = styled(Svg);\n\nconst BadgeDot: FC<{ className?: string }> = ({ className }) => {\n return (\n <StyledSvg width={8} height={8} viewBox=\"0 0 8 8\" className={className}>\n <Circle cx={4} cy={4} r={2.5} fill=\"currentColor\" stroke=\"currentColor\" />\n </StyledSvg>\n );\n};\n\nconst BadgeLabel: FC<{ size: BadgeSize; colorClass: string; children: ReactNode }> = ({\n size,\n colorClass,\n children,\n}) => {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return <Text className={cx(badgeLabelTextSizes[size], colorClass)}>{children}</Text>;\n }\n return <>{children}</>;\n};\n\n//////////////////////////////////////////////// MAIN\n\n/**\n * NativeWind badge — shared Tailwind class maps from `@avenue-ticketing/core/badge`.\n */\nexport const Badge = <T extends BadgeTypes>({\n type = \"pill-color\" as T,\n size = \"md\",\n color = \"gray\" as BadgeColor<T>,\n children,\n className,\n}: BadgeProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const colorRoot = colors.styles[color as keyof typeof colors.styles].root;\n\n return (\n <View className={cx(colors.common, resolveBadgeSizeClass(type, size), colorRoot, className)}>\n <BadgeLabel size={size} colorClass={colorRoot}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithDot = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T],\n type = \"pill-color\" as T,\n className,\n children,\n}: BadgeWithDotProps<T>) => {\n const colors = badgeWithBadgeTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, resolveBadgeDotSizeClass(type, size), style.root, className)}>\n <BadgeDot className={style.addon} />\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithIcon = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithBadgeTypes>[T],\n type = \"pill-color\" as T,\n iconLeading: IconLeading,\n iconTrailing: IconTrailing,\n children,\n className,\n}: BadgeWithIconProps<T>) => {\n const colors = badgeWithBadgeTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n const icon = IconLeading ? \"leading\" : \"trailing\";\n\n return (\n <View className={cx(colors.common, badgeIconSizeMaps[type][size][icon], style.root, className)}>\n {IconLeading && <IconLeading weight=\"bold\" className={cx(style.addon, badgeStyles.icon)} size={12} />}\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n {IconTrailing && <IconTrailing weight=\"bold\" className={cx(style.addon, badgeStyles.icon)} size={12} />}\n </View>\n );\n};\n\nexport const BadgeWithImage = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n imgSrc,\n children,\n className,\n}: BadgeWithImageProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const colorRoot = colors.styles[color as keyof typeof colors.styles].root;\n\n return (\n <View className={cx(colors.common, badgeWithMediaSizeMaps[type][size], colorRoot, className)}>\n <Image\n source={{ uri: imgSrc }}\n accessibilityLabel=\"Badge image\"\n style={{ width: 16, height: 16, borderRadius: 999 }}\n />\n <BadgeLabel size={size} colorClass={colorRoot}>\n {children}\n </BadgeLabel>\n </View>\n );\n};\n\nexport const BadgeWithButton = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n icon: Icon = XIcon,\n buttonLabel,\n children,\n onButtonPress,\n className,\n}: BadgeWithButtonProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, badgeWithButtonSizeMaps[type][size], style.root, className)}>\n <BadgeLabel size={size} colorClass={style.root}>\n {children}\n </BadgeLabel>\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel={buttonLabel}\n onPress={onButtonPress}\n className={cx(\n \"items-center justify-center p-0.5\",\n style.addonButton,\n type === badgeTypes.pillColor || type === badgeTypes.badgeModern ? \"rounded-full\" : \"rounded-[3px]\",\n )}\n >\n <Icon weight=\"bold\" className={badgeStyles.icon} size={12} />\n </Pressable>\n </View>\n );\n};\n\nexport const BadgeIcon = <T extends BadgeTypes>({\n size = \"md\",\n color = \"gray\" as BadgeTypeToColorMap<typeof badgeWithPillTypes>[T],\n type = \"pill-color\" as T,\n icon: Icon,\n className,\n}: BadgeIconProps<T>) => {\n const colors = badgeWithPillTypes[type];\n const style = colors.styles[color as keyof typeof colors.styles];\n\n return (\n <View className={cx(colors.common, badgeOnlyIconSizeMaps[type][size], style.root, className)}>\n <Icon weight=\"bold\" className={cx(badgeStyles.icon, style.addon)} size={12} />\n </View>\n );\n};\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n type ReactNode,\n} from \"react\";\nimport { ScrollView, StyleSheet, type LayoutChangeEvent } from \"react-native\";\nimport { Pressable, Text, View } from \"react-native-css/components\";\nimport { useNativeVariable } from \"react-native-css\";\nimport Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming } from \"react-native-reanimated\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { isReactComponent } from \"@avenue-ticketing/core/is-react-component\";\nimport {\n isLineTabType,\n pillTabColorStyles,\n tabListStyles,\n tabNativeItemState,\n tabNativeLabelState,\n tabSizes,\n tabsStyles,\n type PillTabColor,\n type TabOrientation,\n type TabSize,\n type TabType,\n} from \"@avenue-ticketing/core/tabs\";\nimport { Badge } from \"../../base/badges/badges\";\n\nexport type { PillTabColor, TabOrientation, TabSize, TabType };\n\n//////////////////////////////////////////////// SETUP\n\n/** Same easing as web / legacy Avenue UI pill clip-path. */\nconst PILL_EASE = Easing.bezier(0, 0.55, 0.45, 1);\nconst PILL_MS = 300;\n\ntype TabLayout = { x: number; y: number; width: number; height: number };\n\n//////////////////////////////////////////////// CONTEXT\n\ntype TabsContextValue = {\n selectedKey: string | undefined;\n setSelectedKey: (key: string) => void;\n orientation: TabOrientation;\n};\n\nconst TabsContext = createContext<TabsContextValue | undefined>(undefined);\n\ntype TabListContextValue = {\n size: TabSize;\n type: TabType;\n color: PillTabColor;\n travel: boolean;\n fullWidth?: boolean;\n orientation: TabOrientation;\n registerTravelLayout?: (id: string, layout: TabLayout) => void;\n};\n\nconst TabListContext = createContext<TabListContextValue>({\n size: \"sm\",\n type: \"button-brand\",\n color: \"brand\",\n travel: true,\n orientation: \"horizontal\",\n});\n\n//////////////////////////////////////////////// MAIN\n\nexport const TabsRoot: FC<{\n children?: ReactNode;\n selectedKey?: string;\n defaultSelectedKey?: string;\n onSelectionChange?: (key: string) => void;\n orientation?: TabOrientation;\n className?: string;\n}> = ({ children, selectedKey, defaultSelectedKey, onSelectionChange, orientation = \"horizontal\", className }) => {\n const [internal, setInternal] = useState(defaultSelectedKey);\n const current = selectedKey ?? internal;\n const setSelectedKey = (key: string) => {\n if (selectedKey === undefined) setInternal(key);\n onSelectionChange?.(key);\n };\n const value = useMemo(\n () => ({ selectedKey: current, setSelectedKey, orientation }),\n [current, orientation],\n );\n\n return (\n <TabsContext.Provider value={value}>\n <View className={cx(orientation === \"vertical\" ? tabsStyles.rootVertical : tabsStyles.root, className)}>{children}</View>\n </TabsContext.Provider>\n );\n};\n\nexport const TabList: FC<{\n children?: ReactNode;\n size?: TabSize;\n type?: TabType;\n /** `button-pill` only — indicator fill. Ignored for other types. */\n color?: PillTabColor;\n /**\n * Traveling underline / line border for `underline`, `line`, and `line-stacked`.\n * Defaults to `true`. Ignored for button types (`button-pill` always travels).\n */\n travel?: boolean;\n fullWidth?: boolean;\n className?: string;\n items?: TabItemProps[];\n}> = ({ children, size = \"sm\", type = \"button-brand\", color = \"brand\", travel = true, fullWidth, className, items }) => {\n const tabs = useContext(TabsContext);\n const orientation = tabs?.orientation ?? \"horizontal\";\n const isPill = type === \"button-pill\";\n const isLine = isLineTabType(type);\n const isVerticalLine = type === \"line\" || type === \"line-stacked\";\n const useTravelIndicator = isPill || (isLine && travel);\n const selectedKey = tabs?.selectedKey;\n\n const brandSolid = useNativeVariable(\"--color-bg-brand-solid\") ?? \"#7c3aed\";\n const primarySolid = useNativeVariable(\"--color-bg-primary-solid\") ?? \"#171717\";\n const brandLine = useNativeVariable(\"--color-fg-brand-primary_alt\") ?? \"#9e77ed\";\n\n const layoutsRef = useRef<Map<string, TabLayout>>(new Map());\n const hasPlacedRef = useRef(false);\n\n const indicatorX = useSharedValue(0);\n const indicatorY = useSharedValue(0);\n const indicatorW = useSharedValue(0);\n const indicatorH = useSharedValue(0);\n const indicatorOpacity = useSharedValue(0);\n\n const moveIndicator = useCallback(\n (key: string | undefined, animate: boolean) => {\n if (!key) return;\n const layout = layoutsRef.current.get(key);\n if (!layout || layout.width <= 0 || layout.height <= 0) return;\n\n const cfg = { duration: PILL_MS, easing: PILL_EASE };\n\n let nextX = layout.x;\n let nextY = layout.y;\n let nextW = layout.width;\n let nextH = layout.height;\n\n if (isLine && !isPill) {\n if (isVerticalLine) {\n nextX = layout.x;\n nextY = layout.y;\n nextW = 2;\n nextH = layout.height;\n } else {\n nextX = layout.x;\n nextY = layout.y + Math.max(layout.height - 2, 0);\n nextW = layout.width;\n nextH = 2;\n }\n }\n\n if (animate && hasPlacedRef.current) {\n indicatorX.value = withTiming(nextX, cfg);\n indicatorY.value = withTiming(nextY, cfg);\n indicatorW.value = withTiming(nextW, cfg);\n indicatorH.value = withTiming(nextH, cfg);\n } else {\n indicatorX.value = nextX;\n indicatorY.value = nextY;\n indicatorW.value = nextW;\n indicatorH.value = nextH;\n hasPlacedRef.current = true;\n }\n indicatorOpacity.value = 1;\n },\n [indicatorH, indicatorOpacity, indicatorW, indicatorX, indicatorY, isLine, isPill, isVerticalLine],\n );\n\n const registerTravelLayout = useCallback(\n (id: string, layout: TabLayout) => {\n layoutsRef.current.set(id, layout);\n if (id === selectedKey) {\n moveIndicator(id, hasPlacedRef.current);\n }\n },\n [moveIndicator, selectedKey],\n );\n\n useEffect(() => {\n if (!useTravelIndicator) return;\n moveIndicator(selectedKey, true);\n }, [useTravelIndicator, selectedKey, moveIndicator]);\n\n // Plain Animated.View + inline absolute — NativeWind `styled(Animated.View)` drops\n // `position: absolute`, so the indicator joined the flex row and never traveled.\n const indicatorStyle = useAnimatedStyle(() => ({\n opacity: indicatorOpacity.value,\n width: indicatorW.value,\n height: indicatorH.value,\n transform: [{ translateX: indicatorX.value }, { translateY: indicatorY.value }],\n }));\n\n const indicatorColor = isPill\n ? color === \"primary\"\n ? primarySolid\n : brandSolid\n : brandLine;\n\n const travelIndicator = useTravelIndicator ? (\n <Animated.View\n pointerEvents=\"none\"\n style={[\n styles.indicatorBase,\n {\n backgroundColor: indicatorColor,\n borderRadius: isPill ? 9999 : 0,\n zIndex: isPill ? 0 : 1,\n },\n indicatorStyle,\n ]}\n />\n ) : null;\n\n const list = (\n <View\n className={cx(\n orientation === \"vertical\" ? tabsStyles.listVertical : tabsStyles.list,\n type === \"button-border\"\n ? cx(tabsStyles.listButtonBorder, size === \"md\" && tabsStyles.listButtonBorderMd)\n : type === \"button-minimal\"\n ? tabsStyles.listButtonMinimal\n : tabListStyles({ size, fullWidth })[type],\n orientation === \"horizontal\" && type === \"underline\" && \"relative\",\n useTravelIndicator && \"relative\",\n fullWidth && \"w-full\",\n className,\n )}\n style={useTravelIndicator ? styles.listTravel : undefined}\n >\n {orientation === \"horizontal\" && type === \"underline\" && (\n <View className=\"absolute right-0 bottom-0 left-0 h-px bg-border-secondary\" />\n )}\n {isPill && travelIndicator}\n {children ?? items?.map((item) => <Tab key={item.id} {...item} />)}\n {!isPill && travelIndicator}\n </View>\n );\n\n return (\n <TabListContext.Provider\n value={{\n size,\n type,\n color,\n travel,\n fullWidth,\n orientation,\n registerTravelLayout: useTravelIndicator ? registerTravelLayout : undefined,\n }}\n >\n {orientation === \"horizontal\" ? (\n <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerClassName={fullWidth ? \"grow\" : undefined}>\n {list}\n </ScrollView>\n ) : (\n list\n )}\n </TabListContext.Provider>\n );\n};\n\nexport interface TabItemProps {\n id: string;\n label?: ReactNode;\n children?: ReactNode;\n badge?: number | string;\n icon?: FC<{ size?: number; color?: string }> | ReactNode;\n}\n\nexport const Tab: FC<TabItemProps> = ({ id, label, children, badge, icon: Icon }) => {\n const tabs = useContext(TabsContext);\n const { size, type, color, travel, fullWidth, orientation, registerTravelLayout } = useContext(TabListContext);\n const selected = tabs?.selectedKey === id;\n const isLineChrome = type === \"line\" || type === \"line-stacked\";\n const isStacked = type === \"line-stacked\";\n const isPill = type === \"button-pill\";\n const showPill = type === \"underline\" || isLineChrome || type === \"button-brand\" || isPill;\n const fg = useNativeVariable(selected ? \"--color-fg-primary\" : \"--color-fg-quaternary\") ?? \"#717680\";\n const brand = useNativeVariable(\"--color-fg-brand-secondary\") ?? \"#6941c6\";\n const fgQuaternary = useNativeVariable(\"--color-fg-quaternary\") ?? \"#717680\";\n const onBrand = useNativeVariable(\"--color-text-primary_on-brand\") ?? \"#ffffff\";\n const fgWhite = useNativeVariable(\"--color-fg-white\") ?? \"#ffffff\";\n\n const iconColor = isPill\n ? selected\n ? color === \"primary\"\n ? fgWhite\n : onBrand\n : fgQuaternary\n : selected && (type === \"underline\" || isLineChrome)\n ? brand\n : selected\n ? fg\n : fgQuaternary;\n\n const onLayout = useCallback(\n (event: LayoutChangeEvent) => {\n if (!registerTravelLayout) return;\n const { x, y, width, height } = event.nativeEvent.layout;\n if (width <= 0 || height <= 0) return;\n registerTravelLayout(id, { x, y, width, height });\n },\n [id, registerTravelLayout],\n );\n\n return (\n <Pressable\n accessibilityRole=\"tab\"\n accessibilityState={{ selected }}\n onPress={() => tabs?.setSelectedKey(id)}\n onLayout={onLayout}\n style={({ pressed }) => [\n orientation === \"horizontal\" ? { flexShrink: 0, zIndex: 1 } : { zIndex: 1 },\n isPill && {\n transform: [{ scale: pressed ? 0.98 : 1 }],\n },\n ]}\n className={cx(\n tabsStyles.item,\n orientation === \"vertical\" && tabsStyles.itemVertical,\n isStacked && tabsStyles.itemStacked,\n fullWidth && orientation === \"vertical\" && tabsStyles.itemFull,\n tabSizes[size][type],\n tabNativeItemState(type, selected, { travel: isLineTabType(type) ? travel : undefined }),\n )}\n >\n {isStacked && isReactComponent(Icon) && (\n <View className={tabsStyles.iconStacked}>\n <Icon size={20} color={iconColor} />\n {badge != null && (\n <View className={tabsStyles.badgeStacked}>\n <Badge size=\"sm\" type={showPill ? \"pill-color\" : \"modern\"} color={showPill && selected ? \"brand\" : \"gray\"}>\n {badge}\n </Badge>\n </View>\n )}\n </View>\n )}\n {!isStacked && isReactComponent(Icon) && <Icon size={tabSizes[size].icon} color={iconColor} />}\n <View className={cx(isStacked ? tabsStyles.labelStacked : tabsStyles.labelRow, !isLineChrome && type !== \"underline\" && \"px-0.5\")}>\n <Text\n numberOfLines={isStacked ? 2 : 1}\n className={cx(\n isStacked ? \"text-sm font-medium\" : size === \"sm\" ? \"text-sm font-semibold\" : \"text-md font-semibold\",\n isStacked && \"text-left\",\n isPill && selected\n ? pillTabColorStyles[color].nativeLabel\n : tabNativeLabelState(type, selected),\n )}\n >\n {children || label}\n </Text>\n {!isStacked && badge != null && (\n <Badge size=\"sm\" type={showPill ? \"pill-color\" : \"modern\"} color={showPill && selected ? \"brand\" : \"gray\"}>\n {badge}\n </Badge>\n )}\n </View>\n </Pressable>\n );\n};\n\nexport const TabPanel: FC<{ id: string; children?: ReactNode; className?: string }> = ({ id, children, className }) => {\n const tabs = useContext(TabsContext);\n if (tabs?.selectedKey !== id) return null;\n return <View className={className}>{children}</View>;\n};\n\nexport const Tabs = Object.assign(TabsRoot, {\n List: TabList,\n Item: Tab,\n Panel: TabPanel,\n});\n\n//////////////////////////////////////////////// STYLES\n\nconst styles = StyleSheet.create({\n listTravel: {\n overflow: \"visible\",\n },\n indicatorBase: {\n position: \"absolute\",\n top: 0,\n left: 0,\n },\n});\n"]}
|
package/dist/tag-select.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createContext, useState, useMemo, isValidElement,
|
|
2
|
-
import { View,
|
|
1
|
+
import { createContext, forwardRef, useContext, useState, useMemo, isValidElement, useEffect } from 'react';
|
|
2
|
+
import { View, TextInput, Pressable, Text, ScrollView } from 'react-native-css/components';
|
|
3
3
|
import { useNativeVariable } from 'react-native-css';
|
|
4
4
|
import { MagnifyingGlassIcon } from 'phosphor-react-native/src/icons/MagnifyingGlass';
|
|
5
5
|
import { XIcon } from 'phosphor-react-native/src/icons/X';
|
|
6
6
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
7
|
-
import { Image, useWindowDimensions, Modal } from 'react-native';
|
|
8
|
-
import 'phosphor-react-native/src/icons/Eye';
|
|
9
|
-
import 'phosphor-react-native/src/icons/EyeSlash';
|
|
10
|
-
import 'phosphor-react-native/src/icons/Info';
|
|
11
|
-
import 'phosphor-react-native/src/icons/Question';
|
|
12
|
-
import {
|
|
7
|
+
import { Platform, Image, useWindowDimensions, Modal } from 'react-native';
|
|
8
|
+
import { EyeIcon } from 'phosphor-react-native/src/icons/Eye';
|
|
9
|
+
import { EyeSlashIcon } from 'phosphor-react-native/src/icons/EyeSlash';
|
|
10
|
+
import { InfoIcon } from 'phosphor-react-native/src/icons/Info';
|
|
11
|
+
import { QuestionIcon } from 'phosphor-react-native/src/icons/Question';
|
|
12
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import { styled } from 'nativewind';
|
|
14
14
|
import { UserIcon } from 'phosphor-react-native/src/icons/User';
|
|
15
15
|
import Svg, { Path } from 'react-native-svg';
|
|
@@ -87,8 +87,62 @@ var inputStyles = sortCx({
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
var inputGroupStyles = sortCx({
|
|
91
|
+
/** Single outer shell — select/button addons only (Figma 85:1269). */
|
|
92
|
+
shell: "w-full flex-row items-stretch overflow-hidden rounded-lg border border-solid border-primary bg-primary shadow-xs",
|
|
93
|
+
shellFocus: inputFocusRingShadow,
|
|
94
|
+
shellInvalid: "border-error_subtle",
|
|
95
|
+
shellInvalidFocus: inputErrorFocusRingShadow,
|
|
96
|
+
shellDisabled: "opacity-50",
|
|
97
|
+
row: "w-full min-h-0 flex-row items-stretch",
|
|
98
|
+
/** Leading select/button segment — compact, flush (no divider). */
|
|
99
|
+
addonLeading: "shrink-0 flex-row items-stretch self-stretch",
|
|
100
|
+
/** Trailing button segment — left divider; trailing select stays flush. */
|
|
101
|
+
addonTrailing: "shrink-0 flex-row items-stretch self-stretch",
|
|
102
|
+
addonTrailingDivider: "border-l border-solid border-primary",
|
|
103
|
+
prefixInline: "shrink-0 flex-row items-center self-stretch text-tertiary",
|
|
104
|
+
fieldSlot: "min-w-0 flex-1 flex-row items-stretch",
|
|
105
|
+
sizes: {
|
|
106
|
+
sm: {
|
|
107
|
+
shellMinH: "min-h-9",
|
|
108
|
+
prefixInline: "pl-3 pr-1.5 text-sm",
|
|
109
|
+
/** Input padding when leading select is present. */
|
|
110
|
+
inputLeadingSelect: "pl-2 pr-3 py-2 text-sm",
|
|
111
|
+
/** Input padding when trailing select + optional $ prefix. */
|
|
112
|
+
inputTrailingSelect: "pl-0 pr-2 py-2 text-sm",
|
|
113
|
+
inputTrailingSelectNoPrefix: "pl-3 pr-2 py-2 text-sm",
|
|
114
|
+
inputTrailingButton: "pl-3 pr-3 py-2 text-sm"
|
|
115
|
+
},
|
|
116
|
+
md: {
|
|
117
|
+
shellMinH: "min-h-10",
|
|
118
|
+
prefixInline: "pl-3 pr-2 text-md",
|
|
119
|
+
inputLeadingSelect: "pl-2.5 pr-3 py-2 text-md",
|
|
120
|
+
inputTrailingSelect: "pl-0 pr-2 py-2 text-md",
|
|
121
|
+
inputTrailingSelectNoPrefix: "pl-3 pr-2 py-2 text-md",
|
|
122
|
+
inputTrailingButton: "pl-3 pr-3 py-2 text-md"
|
|
123
|
+
},
|
|
124
|
+
lg: {
|
|
125
|
+
shellMinH: "min-h-11",
|
|
126
|
+
prefixInline: "pl-3.5 pr-2 text-md",
|
|
127
|
+
inputLeadingSelect: "pl-3 pr-3.5 py-2.5 text-md",
|
|
128
|
+
inputTrailingSelect: "pl-0 pr-2 py-2.5 text-md",
|
|
129
|
+
inputTrailingSelectNoPrefix: "pl-3.5 pr-2 py-2.5 text-md",
|
|
130
|
+
inputTrailingButton: "pl-3.5 pr-3.5 py-2.5 text-md"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var InputGroupContext = createContext(null);
|
|
135
|
+
var useInputGroupContext = () => useContext(InputGroupContext);
|
|
136
|
+
var ShellFocusContext = createContext(null);
|
|
137
|
+
var useShellFocus = () => useContext(ShellFocusContext);
|
|
138
|
+
var androidInputPad = (size, leading, trailing) => {
|
|
139
|
+
if (Platform.OS !== "android") return void 0;
|
|
140
|
+
const x = size === "lg" ? 14 : 12;
|
|
141
|
+
return {
|
|
142
|
+
paddingStart: leading ? size === "sm" ? 36 : size === "lg" ? 42 : 40 : x,
|
|
143
|
+
paddingEnd: trailing ? size === "lg" ? 38 : 36 : x
|
|
144
|
+
};
|
|
145
|
+
};
|
|
92
146
|
var Label = ({ children, isRequired, isInvalid, className }) => {
|
|
93
147
|
return /* @__PURE__ */ jsxs(View, { className: cx(inputStyles.labelRow, className), children: [
|
|
94
148
|
/* @__PURE__ */ jsx(Text, { className: inputStyles.label, children }),
|
|
@@ -113,6 +167,143 @@ var HintText = ({ children, isInvalid, size, className }) => {
|
|
|
113
167
|
}
|
|
114
168
|
);
|
|
115
169
|
};
|
|
170
|
+
var InputBase = forwardRef(function InputBase2({
|
|
171
|
+
size: sizeProp = "md",
|
|
172
|
+
type = "text",
|
|
173
|
+
placeholder,
|
|
174
|
+
value,
|
|
175
|
+
defaultValue,
|
|
176
|
+
isDisabled: isDisabledProp = false,
|
|
177
|
+
isInvalid: isInvalidProp = false,
|
|
178
|
+
tooltip,
|
|
179
|
+
icon: Icon,
|
|
180
|
+
autoCapitalize,
|
|
181
|
+
keyboardType,
|
|
182
|
+
textContentType: textContentTypeProp,
|
|
183
|
+
autoComplete: autoCompleteProp,
|
|
184
|
+
autoCorrect: autoCorrectProp,
|
|
185
|
+
autoFocus,
|
|
186
|
+
returnKeyType,
|
|
187
|
+
editable,
|
|
188
|
+
className,
|
|
189
|
+
inputClassName,
|
|
190
|
+
wrapperClassName,
|
|
191
|
+
iconClassName,
|
|
192
|
+
onChangeText,
|
|
193
|
+
onFocus,
|
|
194
|
+
onBlur,
|
|
195
|
+
onPress,
|
|
196
|
+
onSubmitEditing
|
|
197
|
+
}, ref) {
|
|
198
|
+
const group = useInputGroupContext();
|
|
199
|
+
const setShellFocus = useShellFocus();
|
|
200
|
+
const size = group?.size ?? sizeProp;
|
|
201
|
+
const isDisabled = Boolean(group?.isDisabled || isDisabledProp);
|
|
202
|
+
const isInvalid = Boolean(group?.isInvalid || isInvalidProp);
|
|
203
|
+
const shellOwnsChrome = Boolean(group?.shellOwnsChrome);
|
|
204
|
+
const joinLeadingPrefix = Boolean(group?.joinLeadingPrefix);
|
|
205
|
+
const groupPad = group ? inputGroupStyles.sizes[size] : null;
|
|
206
|
+
const groupInputPad = groupPad && group?.hasLeadingSelect ? groupPad.inputLeadingSelect : groupPad && group?.hasTrailingSelect ? group?.hasPrefix ? groupPad.inputTrailingSelect : groupPad.inputTrailingSelectNoPrefix : groupPad && group?.hasTrailingButton ? groupPad.inputTrailingButton : null;
|
|
207
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
208
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
209
|
+
const isPassword = type === "password";
|
|
210
|
+
const hasLeadingIcon = Boolean(Icon);
|
|
211
|
+
const hasTrailingIcon = Boolean(tooltip) || isInvalid || isPassword;
|
|
212
|
+
const sizeStyles = inputStyles.sizes[size];
|
|
213
|
+
const fgQuaternary = useNativeVariable("--color-fg-quaternary") ?? "#a4a7ae";
|
|
214
|
+
const fgErrorSecondary = useNativeVariable("--color-fg-error-secondary") ?? "#f04438";
|
|
215
|
+
const handleFocus = () => {
|
|
216
|
+
setIsFocused(true);
|
|
217
|
+
setShellFocus?.(true);
|
|
218
|
+
onFocus?.();
|
|
219
|
+
};
|
|
220
|
+
const handleBlur = () => {
|
|
221
|
+
setIsFocused(false);
|
|
222
|
+
setShellFocus?.(false);
|
|
223
|
+
onBlur?.();
|
|
224
|
+
};
|
|
225
|
+
const field = /* @__PURE__ */ jsxs(
|
|
226
|
+
View,
|
|
227
|
+
{
|
|
228
|
+
className: cx(
|
|
229
|
+
shellOwnsChrome ? "relative isolate min-w-0 flex-1 flex-row items-center self-stretch bg-transparent" : cx(inputStyles.field.root, sizeStyles.field),
|
|
230
|
+
joinLeadingPrefix && !shellOwnsChrome && "rounded-l-none",
|
|
231
|
+
!shellOwnsChrome && isFocused && !isInvalid && inputStyles.field.focus,
|
|
232
|
+
!shellOwnsChrome && isInvalid && inputStyles.field.invalid,
|
|
233
|
+
!shellOwnsChrome && isInvalid && isFocused && inputStyles.field.invalidFocus,
|
|
234
|
+
!shellOwnsChrome && isDisabled && inputStyles.field.disabled,
|
|
235
|
+
wrapperClassName,
|
|
236
|
+
className
|
|
237
|
+
),
|
|
238
|
+
children: [
|
|
239
|
+
Icon && /* @__PURE__ */ jsx(
|
|
240
|
+
View,
|
|
241
|
+
{
|
|
242
|
+
pointerEvents: "none",
|
|
243
|
+
className: cx(inputStyles.iconLeading, iconClassName ?? sizeStyles.iconLeading),
|
|
244
|
+
children: /* @__PURE__ */ jsx(Icon, { className: "text-fg-quaternary", size: sizeStyles.iconPx, color: fgQuaternary })
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
TextInput,
|
|
249
|
+
{
|
|
250
|
+
ref,
|
|
251
|
+
accessibilityLabel: placeholder,
|
|
252
|
+
editable: editable ?? !isDisabled,
|
|
253
|
+
placeholder,
|
|
254
|
+
value,
|
|
255
|
+
defaultValue,
|
|
256
|
+
secureTextEntry: isPassword && !isPasswordVisible,
|
|
257
|
+
autoCapitalize: autoCapitalize ?? (type === "email" ? "none" : void 0),
|
|
258
|
+
autoCorrect: autoCorrectProp ?? type !== "email",
|
|
259
|
+
autoFocus,
|
|
260
|
+
returnKeyType,
|
|
261
|
+
keyboardType: keyboardType ?? (type === "email" ? "email-address" : "default"),
|
|
262
|
+
textContentType: textContentTypeProp ?? (isPassword ? "password" : type === "email" ? "emailAddress" : void 0),
|
|
263
|
+
autoComplete: autoCompleteProp ?? (type === "email" ? "email" : isPassword ? "password" : void 0),
|
|
264
|
+
onChangeText,
|
|
265
|
+
onFocus: handleFocus,
|
|
266
|
+
onBlur: handleBlur,
|
|
267
|
+
onSubmitEditing,
|
|
268
|
+
blurOnSubmit: onSubmitEditing ? false : void 0,
|
|
269
|
+
style: {
|
|
270
|
+
includeFontPadding: false,
|
|
271
|
+
paddingVertical: 0,
|
|
272
|
+
...androidInputPad(size, hasLeadingIcon, hasTrailingIcon)
|
|
273
|
+
},
|
|
274
|
+
className: cx(
|
|
275
|
+
inputStyles.input,
|
|
276
|
+
groupInputPad ?? sizeStyles.input,
|
|
277
|
+
!groupInputPad && hasLeadingIcon && sizeStyles.inputLeading,
|
|
278
|
+
!groupInputPad && hasTrailingIcon && sizeStyles.inputTrailing,
|
|
279
|
+
// Tooltip / invalid icon still need trailing room inside a group shell.
|
|
280
|
+
groupInputPad && hasTrailingIcon && "pr-9",
|
|
281
|
+
inputClassName
|
|
282
|
+
)
|
|
283
|
+
}
|
|
284
|
+
),
|
|
285
|
+
isPassword && /* @__PURE__ */ jsx(
|
|
286
|
+
Pressable,
|
|
287
|
+
{
|
|
288
|
+
accessibilityRole: "button",
|
|
289
|
+
accessibilityLabel: "Toggle password visibility",
|
|
290
|
+
disabled: isDisabled,
|
|
291
|
+
onPress: () => setIsPasswordVisible((visible) => !visible),
|
|
292
|
+
className: cx(inputStyles.iconTrailing, sizeStyles.iconTrailing),
|
|
293
|
+
children: isPasswordVisible ? /* @__PURE__ */ jsx(EyeSlashIcon, { size: sizeStyles.iconPx, weight: "bold", color: fgQuaternary }) : /* @__PURE__ */ jsx(EyeIcon, { size: sizeStyles.iconPx, weight: "bold", color: fgQuaternary })
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
!isPassword && isInvalid && /* @__PURE__ */ jsx(View, { pointerEvents: "none", className: cx(inputStyles.iconInvalid, sizeStyles.iconTrailing), children: /* @__PURE__ */ jsx(InfoIcon, { size: 16, weight: "bold", color: fgErrorSecondary }) }),
|
|
297
|
+
!isPassword && tooltip && !isInvalid && /* @__PURE__ */ jsx(View, { pointerEvents: "none", className: cx(inputStyles.iconTrailing, sizeStyles.iconTrailing), children: /* @__PURE__ */ jsx(QuestionIcon, { size: 16, weight: "bold", color: fgQuaternary }) })
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
if (onPress) {
|
|
302
|
+
return /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", disabled: isDisabled, onPress, className: "min-w-0 flex-1", children: field });
|
|
303
|
+
}
|
|
304
|
+
return field;
|
|
305
|
+
});
|
|
306
|
+
InputBase.displayName = "InputBase";
|
|
116
307
|
|
|
117
308
|
// ../core/src/avatar.ts
|
|
118
309
|
var avatarStyles = sortCx({
|