@avenue-ticketing/native 0.1.12 → 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/tabs.d.ts CHANGED
@@ -4,12 +4,15 @@ declare const TAB_ORIENTATIONS: readonly ["horizontal", "vertical"];
4
4
  type TabOrientation = (typeof TAB_ORIENTATIONS)[number];
5
5
  declare const TAB_SIZES: readonly ["sm", "md"];
6
6
  type TabSize = (typeof TAB_SIZES)[number];
7
- declare const HORIZONTAL_TAB_TYPES: readonly ["button-brand", "button-gray", "button-border", "button-minimal", "underline"];
7
+ declare const HORIZONTAL_TAB_TYPES: readonly ["button-brand", "button-gray", "button-border", "button-minimal", "button-pill", "underline"];
8
8
  /** `line` = vertical underline (icon + label in a row). `line-stacked` = same chrome, icon above label. */
9
9
  declare const VERTICAL_TAB_TYPES: readonly ["button-brand", "button-gray", "button-border", "button-minimal", "line", "line-stacked"];
10
10
  type HorizontalTabType = (typeof HORIZONTAL_TAB_TYPES)[number];
11
11
  type VerticalTabType = (typeof VERTICAL_TAB_TYPES)[number];
12
12
  type TabType = HorizontalTabType | VerticalTabType;
13
+ /** Fill color for `button-pill` only — maps to solid indicator + selected label. */
14
+ declare const PILL_TAB_COLORS: readonly ["brand", "primary"];
15
+ type PillTabColor = (typeof PILL_TAB_COLORS)[number];
13
16
 
14
17
  declare const TabsRoot: FC<{
15
18
  children?: ReactNode;
@@ -23,6 +26,13 @@ declare const TabList: FC<{
23
26
  children?: ReactNode;
24
27
  size?: TabSize;
25
28
  type?: TabType;
29
+ /** `button-pill` only — indicator fill. Ignored for other types. */
30
+ color?: PillTabColor;
31
+ /**
32
+ * Traveling underline / line border for `underline`, `line`, and `line-stacked`.
33
+ * Defaults to `true`. Ignored for button types (`button-pill` always travels).
34
+ */
35
+ travel?: boolean;
26
36
  fullWidth?: boolean;
27
37
  className?: string;
28
38
  items?: TabItemProps[];
@@ -55,6 +65,13 @@ declare const Tabs: FC<{
55
65
  children?: ReactNode;
56
66
  size?: TabSize;
57
67
  type?: TabType;
68
+ /** `button-pill` only — indicator fill. Ignored for other types. */
69
+ color?: PillTabColor;
70
+ /**
71
+ * Traveling underline / line border for `underline`, `line`, and `line-stacked`.
72
+ * Defaults to `true`. Ignored for button types (`button-pill` always travels).
73
+ */
74
+ travel?: boolean;
58
75
  fullWidth?: boolean;
59
76
  className?: string;
60
77
  items?: TabItemProps[];
@@ -67,4 +84,4 @@ declare const Tabs: FC<{
67
84
  }>;
68
85
  };
69
86
 
70
- export { Tab, type TabItemProps, TabList, type TabOrientation, TabPanel, type TabSize, type TabType, Tabs, TabsRoot };
87
+ export { type PillTabColor, Tab, type TabItemProps, TabList, type TabOrientation, TabPanel, type TabSize, type TabType, Tabs, TabsRoot };
package/dist/tabs.js CHANGED
@@ -1,7 +1,8 @@
1
- import { createContext, useState, useMemo, useContext } from 'react';
2
- import { ScrollView } from 'react-native';
1
+ import { createContext, useState, useMemo, useContext, useCallback, useRef, useEffect } from 'react';
2
+ import { StyleSheet, ScrollView } from 'react-native';
3
3
  import { View, Pressable, Text } from 'react-native-css/components';
4
4
  import { useNativeVariable } from 'react-native-css';
5
+ import Animated, { Easing, useSharedValue, withTiming, useAnimatedStyle } from 'react-native-reanimated';
5
6
  import { extendTailwindMerge } from 'tailwind-merge';
6
7
  import Svg from 'react-native-svg';
7
8
  import 'phosphor-react-native/src/icons/X';
@@ -36,6 +37,23 @@ var isReactComponent = (component) => {
36
37
  };
37
38
 
38
39
  // ../core/src/tabs.ts
40
+ function isLineTabType(type) {
41
+ return type === "underline" || type === "line" || type === "line-stacked";
42
+ }
43
+ var pillTabColorStyles = {
44
+ brand: {
45
+ indicator: "bg-brand-solid",
46
+ selected: "text-primary_on-brand *:data-icon:text-primary_on-brand",
47
+ nativeSelected: "rounded-full bg-brand-solid",
48
+ nativeLabel: "text-primary_on-brand"
49
+ },
50
+ primary: {
51
+ indicator: "bg-primary-solid",
52
+ selected: "text-fg-white *:data-icon:text-fg-white",
53
+ nativeSelected: "rounded-full bg-primary-solid",
54
+ nativeLabel: "text-fg-white"
55
+ }
56
+ };
39
57
  var tabSizes = {
40
58
  sm: {
41
59
  base: "text-sm font-semibold gap-1 *:data-icon:size-4",
@@ -43,6 +61,8 @@ var tabSizes = {
43
61
  "button-gray": "py-2 px-2.5",
44
62
  "button-border": "py-2 px-2.5",
45
63
  "button-minimal": "py-2 px-2.5",
64
+ // Match legacy Avenue UI pill: h-9 + px-4.
65
+ "button-pill": "h-9 rounded-full px-4 py-0",
46
66
  underline: "px-0.5 pb-2.5 pt-0",
47
67
  line: "pl-2.5 pr-3 py-0.5",
48
68
  // Vertical underline + stacked: pl-5 / pr-3, icon size-5.
@@ -55,6 +75,7 @@ var tabSizes = {
55
75
  "button-gray": "py-2.5 px-2.5",
56
76
  "button-border": "py-2.5 px-2.5",
57
77
  "button-minimal": "py-2.5 px-2.5",
78
+ "button-pill": "h-10 rounded-full px-4 py-0",
58
79
  underline: "px-0.5 pb-2.5 pt-0",
59
80
  line: "pr-3.5 pl-3 py-1",
60
81
  "line-stacked": "gap-1.5 py-2 pr-3 pl-5 text-sm font-medium *:data-icon:size-5",
@@ -67,6 +88,7 @@ function tabListStyles({ size, fullWidth }) {
67
88
  "button-gray": "gap-1",
68
89
  "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"),
69
90
  "button-minimal": "gap-0.5 rounded-lg bg-secondary_alt ring-1 ring-inset ring-secondary",
91
+ "button-pill": "relative items-center gap-1",
70
92
  underline: cx("gap-3", fullWidth && "w-full gap-4"),
71
93
  line: "gap-2",
72
94
  "line-stacked": "gap-1"
@@ -87,9 +109,9 @@ var tabsStyles = {
87
109
  labelRow: "flex-row items-center gap-1.5",
88
110
  labelStacked: "w-full min-w-0",
89
111
  iconStacked: "relative size-5 shrink-0 items-center justify-center overflow-visible",
90
- badgeStacked: "absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2"
91
- };
92
- function tabNativeItemState(type, selected) {
112
+ badgeStacked: "absolute top-0 right-0 z-10 -translate-y-1/2 translate-x-1/2"};
113
+ function tabNativeItemState(type, selected, options = {}) {
114
+ const travel = options.travel !== false;
93
115
  if (!selected) {
94
116
  if (type === "underline" || type === "line" || type === "line-stacked") return "border-transparent";
95
117
  return "";
@@ -103,11 +125,13 @@ function tabNativeItemState(type, selected) {
103
125
  return "bg-primary_alt";
104
126
  case "button-minimal":
105
127
  return "rounded-lg bg-primary_alt border border-primary";
128
+ case "button-pill":
129
+ return "rounded-full";
106
130
  case "underline":
107
- return "rounded-none border-b-2 border-fg-brand-primary_alt";
131
+ return travel ? "rounded-none border-b-2 border-transparent" : "rounded-none border-b-2 border-fg-brand-primary_alt";
108
132
  case "line":
109
133
  case "line-stacked":
110
- return "rounded-none border-l-2 border-fg-brand-primary_alt";
134
+ return travel ? "rounded-none border-l-2 border-transparent" : "rounded-none border-l-2 border-fg-brand-primary_alt";
111
135
  default: {
112
136
  const _exhaustive = type;
113
137
  return _exhaustive;
@@ -116,12 +140,14 @@ function tabNativeItemState(type, selected) {
116
140
  }
117
141
  function tabNativeLabelState(type, selected) {
118
142
  if (!selected) {
119
- if (type === "button-brand") return "text-secondary";
143
+ if (type === "button-brand" || type === "button-pill") return "text-secondary";
120
144
  return "text-quaternary";
121
145
  }
122
146
  switch (type) {
123
147
  case "button-brand":
124
148
  return "text-primary";
149
+ case "button-pill":
150
+ return pillTabColorStyles.brand.nativeLabel;
125
151
  case "button-gray":
126
152
  case "button-border":
127
153
  case "button-minimal":
@@ -293,10 +319,14 @@ var Badge = ({
293
319
  const colorRoot = colors.styles[color].root;
294
320
  return /* @__PURE__ */ jsx(View, { className: cx(colors.common, resolveBadgeSizeClass(type, size), colorRoot, className), children: /* @__PURE__ */ jsx(BadgeLabel, { size, colorClass: colorRoot, children }) });
295
321
  };
322
+ var PILL_EASE = Easing.bezier(0, 0.55, 0.45, 1);
323
+ var PILL_MS = 300;
296
324
  var TabsContext = createContext(void 0);
297
325
  var TabListContext = createContext({
298
326
  size: "sm",
299
327
  type: "button-brand",
328
+ color: "brand",
329
+ travel: true,
300
330
  orientation: "horizontal"
301
331
  });
302
332
  var TabsRoot = ({ children, selectedKey, defaultSelectedKey, onSelectionChange, orientation = "horizontal", className }) => {
@@ -312,9 +342,98 @@ var TabsRoot = ({ children, selectedKey, defaultSelectedKey, onSelectionChange,
312
342
  );
313
343
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: /* @__PURE__ */ jsx(View, { className: cx(orientation === "vertical" ? tabsStyles.rootVertical : tabsStyles.root, className), children }) });
314
344
  };
315
- var TabList = ({ children, size = "sm", type = "button-brand", fullWidth, className, items }) => {
345
+ var TabList = ({ children, size = "sm", type = "button-brand", color = "brand", travel = true, fullWidth, className, items }) => {
316
346
  const tabs = useContext(TabsContext);
317
347
  const orientation = tabs?.orientation ?? "horizontal";
348
+ const isPill = type === "button-pill";
349
+ const isLine = isLineTabType(type);
350
+ const isVerticalLine = type === "line" || type === "line-stacked";
351
+ const useTravelIndicator = isPill || isLine && travel;
352
+ const selectedKey = tabs?.selectedKey;
353
+ const brandSolid = useNativeVariable("--color-bg-brand-solid") ?? "#7c3aed";
354
+ const primarySolid = useNativeVariable("--color-bg-primary-solid") ?? "#171717";
355
+ const brandLine = useNativeVariable("--color-fg-brand-primary_alt") ?? "#9e77ed";
356
+ const layoutsRef = useRef(/* @__PURE__ */ new Map());
357
+ const hasPlacedRef = useRef(false);
358
+ const indicatorX = useSharedValue(0);
359
+ const indicatorY = useSharedValue(0);
360
+ const indicatorW = useSharedValue(0);
361
+ const indicatorH = useSharedValue(0);
362
+ const indicatorOpacity = useSharedValue(0);
363
+ const moveIndicator = useCallback(
364
+ (key, animate) => {
365
+ if (!key) return;
366
+ const layout = layoutsRef.current.get(key);
367
+ if (!layout || layout.width <= 0 || layout.height <= 0) return;
368
+ const cfg = { duration: PILL_MS, easing: PILL_EASE };
369
+ let nextX = layout.x;
370
+ let nextY = layout.y;
371
+ let nextW = layout.width;
372
+ let nextH = layout.height;
373
+ if (isLine && !isPill) {
374
+ if (isVerticalLine) {
375
+ nextX = layout.x;
376
+ nextY = layout.y;
377
+ nextW = 2;
378
+ nextH = layout.height;
379
+ } else {
380
+ nextX = layout.x;
381
+ nextY = layout.y + Math.max(layout.height - 2, 0);
382
+ nextW = layout.width;
383
+ nextH = 2;
384
+ }
385
+ }
386
+ if (animate && hasPlacedRef.current) {
387
+ indicatorX.value = withTiming(nextX, cfg);
388
+ indicatorY.value = withTiming(nextY, cfg);
389
+ indicatorW.value = withTiming(nextW, cfg);
390
+ indicatorH.value = withTiming(nextH, cfg);
391
+ } else {
392
+ indicatorX.value = nextX;
393
+ indicatorY.value = nextY;
394
+ indicatorW.value = nextW;
395
+ indicatorH.value = nextH;
396
+ hasPlacedRef.current = true;
397
+ }
398
+ indicatorOpacity.value = 1;
399
+ },
400
+ [indicatorH, indicatorOpacity, indicatorW, indicatorX, indicatorY, isLine, isPill, isVerticalLine]
401
+ );
402
+ const registerTravelLayout = useCallback(
403
+ (id, layout) => {
404
+ layoutsRef.current.set(id, layout);
405
+ if (id === selectedKey) {
406
+ moveIndicator(id, hasPlacedRef.current);
407
+ }
408
+ },
409
+ [moveIndicator, selectedKey]
410
+ );
411
+ useEffect(() => {
412
+ if (!useTravelIndicator) return;
413
+ moveIndicator(selectedKey, true);
414
+ }, [useTravelIndicator, selectedKey, moveIndicator]);
415
+ const indicatorStyle = useAnimatedStyle(() => ({
416
+ opacity: indicatorOpacity.value,
417
+ width: indicatorW.value,
418
+ height: indicatorH.value,
419
+ transform: [{ translateX: indicatorX.value }, { translateY: indicatorY.value }]
420
+ }));
421
+ const indicatorColor = isPill ? color === "primary" ? primarySolid : brandSolid : brandLine;
422
+ const travelIndicator = useTravelIndicator ? /* @__PURE__ */ jsx(
423
+ Animated.View,
424
+ {
425
+ pointerEvents: "none",
426
+ style: [
427
+ styles.indicatorBase,
428
+ {
429
+ backgroundColor: indicatorColor,
430
+ borderRadius: isPill ? 9999 : 0,
431
+ zIndex: isPill ? 0 : 1
432
+ },
433
+ indicatorStyle
434
+ ]
435
+ }
436
+ ) : null;
318
437
  const list = /* @__PURE__ */ jsxs(
319
438
  View,
320
439
  {
@@ -322,42 +441,78 @@ var TabList = ({ children, size = "sm", type = "button-brand", fullWidth, classN
322
441
  orientation === "vertical" ? tabsStyles.listVertical : tabsStyles.list,
323
442
  type === "button-border" ? cx(tabsStyles.listButtonBorder, size === "md" && tabsStyles.listButtonBorderMd) : type === "button-minimal" ? tabsStyles.listButtonMinimal : tabListStyles({ size, fullWidth })[type],
324
443
  orientation === "horizontal" && type === "underline" && "relative",
444
+ useTravelIndicator && "relative",
325
445
  fullWidth && "w-full",
326
446
  className
327
447
  ),
448
+ style: useTravelIndicator ? styles.listTravel : void 0,
328
449
  children: [
329
450
  orientation === "horizontal" && type === "underline" && /* @__PURE__ */ jsx(View, { className: "absolute right-0 bottom-0 left-0 h-px bg-border-secondary" }),
330
- children ?? items?.map((item) => /* @__PURE__ */ jsx(Tab, { ...item }, item.id))
451
+ isPill && travelIndicator,
452
+ children ?? items?.map((item) => /* @__PURE__ */ jsx(Tab, { ...item }, item.id)),
453
+ !isPill && travelIndicator
331
454
  ]
332
455
  }
333
456
  );
334
- return /* @__PURE__ */ jsx(TabListContext.Provider, { value: { size, type, fullWidth, orientation }, children: orientation === "horizontal" ? /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerClassName: fullWidth ? "grow" : void 0, children: list }) : list });
457
+ return /* @__PURE__ */ jsx(
458
+ TabListContext.Provider,
459
+ {
460
+ value: {
461
+ size,
462
+ type,
463
+ color,
464
+ travel,
465
+ fullWidth,
466
+ orientation,
467
+ registerTravelLayout: useTravelIndicator ? registerTravelLayout : void 0
468
+ },
469
+ children: orientation === "horizontal" ? /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerClassName: fullWidth ? "grow" : void 0, children: list }) : list
470
+ }
471
+ );
335
472
  };
336
473
  var Tab = ({ id, label, children, badge, icon: Icon }) => {
337
474
  const tabs = useContext(TabsContext);
338
- const { size, type, fullWidth, orientation } = useContext(TabListContext);
475
+ const { size, type, color, travel, fullWidth, orientation, registerTravelLayout } = useContext(TabListContext);
339
476
  const selected = tabs?.selectedKey === id;
340
477
  const isLineChrome = type === "line" || type === "line-stacked";
341
478
  const isStacked = type === "line-stacked";
342
- const showPill = type === "underline" || isLineChrome || type === "button-brand";
479
+ const isPill = type === "button-pill";
480
+ const showPill = type === "underline" || isLineChrome || type === "button-brand" || isPill;
343
481
  const fg = useNativeVariable(selected ? "--color-fg-primary" : "--color-fg-quaternary") ?? "#717680";
344
482
  const brand = useNativeVariable("--color-fg-brand-secondary") ?? "#6941c6";
345
483
  const fgQuaternary = useNativeVariable("--color-fg-quaternary") ?? "#717680";
346
- const iconColor = selected && (type === "underline" || isLineChrome) ? brand : selected ? fg : fgQuaternary;
484
+ const onBrand = useNativeVariable("--color-text-primary_on-brand") ?? "#ffffff";
485
+ const fgWhite = useNativeVariable("--color-fg-white") ?? "#ffffff";
486
+ const iconColor = isPill ? selected ? color === "primary" ? fgWhite : onBrand : fgQuaternary : selected && (type === "underline" || isLineChrome) ? brand : selected ? fg : fgQuaternary;
487
+ const onLayout = useCallback(
488
+ (event) => {
489
+ if (!registerTravelLayout) return;
490
+ const { x, y, width, height } = event.nativeEvent.layout;
491
+ if (width <= 0 || height <= 0) return;
492
+ registerTravelLayout(id, { x, y, width, height });
493
+ },
494
+ [id, registerTravelLayout]
495
+ );
347
496
  return /* @__PURE__ */ jsxs(
348
497
  Pressable,
349
498
  {
350
499
  accessibilityRole: "tab",
351
500
  accessibilityState: { selected },
352
501
  onPress: () => tabs?.setSelectedKey(id),
353
- style: orientation === "horizontal" ? { flexShrink: 0, zIndex: 1 } : { zIndex: 1 },
502
+ onLayout,
503
+ style: ({ pressed }) => [
504
+ orientation === "horizontal" ? { flexShrink: 0, zIndex: 1 } : { zIndex: 1 },
505
+ isPill && {
506
+ transform: [{ scale: pressed ? 0.98 : 1 }]
507
+ }
508
+ ],
354
509
  className: cx(
355
510
  tabsStyles.item,
356
511
  orientation === "vertical" && tabsStyles.itemVertical,
357
512
  isStacked && tabsStyles.itemStacked,
358
513
  fullWidth && orientation === "vertical" && tabsStyles.itemFull,
359
514
  tabSizes[size][type],
360
- tabNativeItemState(type, selected)
515
+ tabNativeItemState(type, selected, { travel: isLineTabType(type) ? travel : void 0 })
361
516
  ),
362
517
  children: [
363
518
  isStacked && isReactComponent(Icon) && /* @__PURE__ */ jsxs(View, { className: tabsStyles.iconStacked, children: [
@@ -365,7 +520,7 @@ var Tab = ({ id, label, children, badge, icon: Icon }) => {
365
520
  badge != null && /* @__PURE__ */ jsx(View, { className: tabsStyles.badgeStacked, children: /* @__PURE__ */ jsx(Badge, { size: "sm", type: showPill ? "pill-color" : "modern", color: showPill && selected ? "brand" : "gray", children: badge }) })
366
521
  ] }),
367
522
  !isStacked && isReactComponent(Icon) && /* @__PURE__ */ jsx(Icon, { size: tabSizes[size].icon, color: iconColor }),
368
- /* @__PURE__ */ jsxs(View, { className: cx(isStacked ? tabsStyles.labelStacked : tabsStyles.labelRow, !isLineChrome && "px-0.5"), children: [
523
+ /* @__PURE__ */ jsxs(View, { className: cx(isStacked ? tabsStyles.labelStacked : tabsStyles.labelRow, !isLineChrome && type !== "underline" && "px-0.5"), children: [
369
524
  /* @__PURE__ */ jsx(
370
525
  Text,
371
526
  {
@@ -373,7 +528,7 @@ var Tab = ({ id, label, children, badge, icon: Icon }) => {
373
528
  className: cx(
374
529
  isStacked ? "text-sm font-medium" : size === "sm" ? "text-sm font-semibold" : "text-md font-semibold",
375
530
  isStacked && "text-left",
376
- tabNativeLabelState(type, selected)
531
+ isPill && selected ? pillTabColorStyles[color].nativeLabel : tabNativeLabelState(type, selected)
377
532
  ),
378
533
  children: children || label
379
534
  }
@@ -394,6 +549,16 @@ var Tabs = Object.assign(TabsRoot, {
394
549
  Item: Tab,
395
550
  Panel: TabPanel
396
551
  });
552
+ var styles = StyleSheet.create({
553
+ listTravel: {
554
+ overflow: "visible"
555
+ },
556
+ indicatorBase: {
557
+ position: "absolute",
558
+ top: 0,
559
+ left: 0
560
+ }
561
+ });
397
562
 
398
563
  export { Tab, TabList, TabPanel, Tabs, TabsRoot };
399
564
  //# sourceMappingURL=tabs.js.map
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,CAAU,SAAA,KAAc,CAAC,CAAC,SAAA,CAAU,SAAA,CAAU,gBAAA,IAAoB,CAAC,CAAC,UAAU,SAAA,CAAU,MAAA,CAAA;AACtI,CAAA;AAEO,IAAM,qBAAA,GAAwB,CAAC,SAAA,KAAsE;AACxG,EAAA,OAAO,OAAO,cAAc,QAAA,IAAY,SAAA,KAAc,QAAQ,SAAA,CAAU,QAAA,CAAS,UAAS,KAAM,2BAAA;AACp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Aa,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,IAAM,qBAAA,GAAwB,CAAC,SAAA,KAAsE;AACxG,EAAA,OAAO,OAAO,cAAc,QAAA,IAAY,SAAA,KAAc,QAAQ,SAAA,CAAU,QAAA,CAAS,UAAS,KAAM,2BAAA;AACpG,CAAA;AAEO,IAAM,gBAAA,GAAmB,CAAC,SAAA,KAAgD;AAC7E,EAAA,OAAO,oBAAoB,SAAS,CAAA,IAAK,sBAAsB,SAAS,CAAA,IAAK,iBAAiB,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AAQ;AAAA,eAC5C;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;AAID,IAAM,MAAA,GAAS,WAAW,MAAA,CAAO;AAAA,EAC7B,UAAA,EAAY;AAAA,IACR,QAAA,EAAU;AAAA,GACd;AAAA,EACA,aAAA,EAAe;AAAA,IACX,QAAA,EAAU,UAAA;AAAA,IACV,GAAA,EAAK,CAAA;AAAA,IACL,IAAA,EAAM;AAAA;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/textarea.js CHANGED
@@ -132,7 +132,8 @@ var textareaStyles = sortCx({
132
132
  invalidFocus: inputErrorFocusRingShadow,
133
133
  sizes: {
134
134
  sm: "min-h-24 p-3 text-sm",
135
- md: "min-h-28 px-3.5 py-3 text-md"
135
+ // Explicit pt/pb — `py-*` can lose vertical padding on Textarea/TextInput.
136
+ md: "min-h-28 px-3.5 pt-3 pb-3 text-md"
136
137
  }
137
138
  });
138
139
  var InputGroupContext = createContext(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../core/src/cx.ts","../../core/src/input.ts","../../core/src/textarea.ts","../../../native/components/base/input/input.tsx","../../../native/components/base/textarea/textarea.tsx"],"names":["InputBase","useState","jsxs","View","jsx","TextInput"],"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;;;ACSO,IAAM,oBAAA,GAAuB,2CAAA;AAC7B,IAAM,yBAAA,GAA4B,2CAAA;AAiClC,IAAM,cAAc,MAAA,CA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AM,IAAA,KAAS,IAAA,GAAO,IAAA,GAAO,MACxD,QAAA,EAAA,IAAA,EACL;AAAA,GAAA,EAER,CAAA;AAER;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"textarea.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","import { sortCx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const INPUT_SIZES = [\"sm\", \"md\", \"lg\"] as const;\nexport type InputSize = (typeof INPUT_SIZES)[number];\n\nexport const INPUT_TYPES = [\"text\", \"password\", \"email\"] as const;\nexport type InputType = (typeof INPUT_TYPES)[number];\n\n//////////////////////////////////////////////// FOCUS / RING TOKENS\n// Shared by Input, InputGroup, Select, Textarea, tags, etc.\n// Strings must stay identical to the previous web `input.tsx` exports.\n\n/**\n * Figma: Inputs (85:1269)\n *\n * Default: border (1px) border-primary + shadow-xs.\n * Focus: 1px border-brand + inset ring-brand (2px visual, no layout shift from border-2).\n * Error default: border-error_subtle; error focus: border-error + inset ring-error.\n *\n * Focus uses CSS `focus-within:` (not JS class toggles) so InputGroup's\n * `group-has-[…]:focus-within:border-0` can override when the shell owns the ring.\n * Do not reintroduce `isFocusWithin && inputFocusRingShadow` — it wins over group-has.\n */\nexport const inputFocusRingShadow = \"border-brand ring-1 ring-inset ring-brand\";\nexport const inputErrorFocusRingShadow = \"border-error ring-1 ring-inset ring-error\";\n/** CSS focus ring — preferred on InputBase so parent group-has utilities can clear it. */\nexport const inputFocusRingShadowCss =\n \"focus-within:border-brand focus-within:ring-1 focus-within:ring-inset focus-within:ring-brand\";\nexport const inputErrorFocusRingShadowCss =\n \"group-invalid:focus-within:border-error group-invalid:focus-within:ring-1 group-invalid:focus-within:ring-inset group-invalid:focus-within:ring-error\";\n\n/**\n * Strip InputBase chrome when an InputGroup shell owns the outline (button/select addons).\n * Baked into InputBase so it works even if TextFieldContext is duplicated across bundle entries.\n */\nexport const inputGroupShellFieldClass =\n \"group-has-[section[data-leading]]:rounded-l-none group-has-[select]:rounded-l-none group-has-[select]:border-0 group-has-[select]:bg-transparent group-has-[select]:shadow-none group-has-[select]:ring-0 group-has-[select]:group-invalid:border-0 group-has-[select]:group-invalid:ring-0 group-has-[select]:group-invalid:shadow-none group-has-[select]:focus-within:border-0 group-has-[select]:focus-within:shadow-none group-has-[select]:focus-within:ring-0 group-has-[select]:group-invalid:focus-within:border-0 group-has-[select]:group-invalid:focus-within:ring-0 group-has-[section[data-trailing]_button]:rounded-none group-has-[section[data-trailing]_button]:border-0 group-has-[section[data-trailing]_button]:bg-transparent group-has-[section[data-trailing]_button]:shadow-none group-has-[section[data-trailing]_button]:ring-0 group-has-[section[data-trailing]_button]:group-invalid:border-0 group-has-[section[data-trailing]_button]:group-invalid:ring-0 group-has-[section[data-trailing]_button]:group-invalid:shadow-none group-has-[section[data-trailing]_button]:focus-within:border-0 group-has-[section[data-trailing]_button]:focus-within:shadow-none group-has-[section[data-trailing]_button]:focus-within:ring-0 group-has-[section[data-trailing]_button]:group-invalid:focus-within:border-0 group-has-[section[data-trailing]_button]:group-invalid:focus-within:ring-0 group-has-[section[data-leading]_button]:border-0 group-has-[section[data-leading]_button]:bg-transparent group-has-[section[data-leading]_button]:shadow-none group-has-[section[data-leading]_button]:ring-0 group-has-[section[data-leading]_button]:group-invalid:border-0 group-has-[section[data-leading]_button]:group-invalid:ring-0 group-has-[section[data-leading]_button]:group-invalid:shadow-none group-has-[section[data-leading]_button]:focus-within:border-0 group-has-[section[data-leading]_button]:focus-within:shadow-none group-has-[section[data-leading]_button]:focus-within:ring-0 group-has-[section[data-leading]_button]:group-invalid:focus-within:border-0 group-has-[section[data-leading]_button]:group-invalid:focus-within:ring-0\";\n\n/**\n * Shell focus overlay for InputGroup / InputNumber.\n * Uses after:-inset-px so the brand stroke covers corner antialiasing (no white flecks).\n * Safe with overflow-clip only when clip lives on an *inner* wrapper — not on this host.\n */\nexport const inputFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-brand after:ring-1 after:ring-inset after:ring-brand after:content-['']\";\nexport const inputErrorFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-error after:ring-1 after:ring-inset after:ring-error after:content-['']\";\nexport const inputErrorFocusRingGroupInvalidShellOverlay =\n \"group-invalid:focus-within:after:pointer-events-none group-invalid:focus-within:after:absolute group-invalid:focus-within:after:-inset-px group-invalid:focus-within:after:z-10 group-invalid:focus-within:after:rounded-lg group-invalid:focus-within:after:border group-invalid:focus-within:after:border-solid group-invalid:focus-within:after:border-error group-invalid:focus-within:after:ring-1 group-invalid:focus-within:after:ring-inset group-invalid:focus-within:after:ring-error group-invalid:focus-within:after:content-['']\";\nexport const inputFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\";\nexport const inputErrorFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-error focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-error\";\n\n//////////////////////////////////////////////// SHARED STYLES\n// Matches web `components/base/input` (Figma 85:1269). Shells stay in ui + native.\n\nexport const inputStyles = sortCx({\n stack: \"w-full flex-col items-start justify-start gap-1.5\",\n labelRow: \"flex-row items-center gap-0.5\",\n label: \"text-sm font-medium text-secondary\",\n required: \"text-brand-tertiary\",\n requiredInvalid: \"text-error-primary\",\n hint: \"text-sm text-tertiary\",\n hintSm: \"text-xs\",\n hintInvalid: \"text-error-primary\",\n field: {\n root: \"relative isolate w-full flex-row items-center rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n /** Web: focus-within:border-brand + inset ring-1 ring-brand (2px visual, no layout shift). */\n focus: inputFocusRingShadow,\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n disabled: \"opacity-50\",\n },\n input: \"m-0 min-w-0 flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n iconLeading: \"absolute inset-y-0 items-center justify-center text-fg-quaternary\",\n iconTrailing: \"absolute inset-y-0 items-center justify-center text-fg-quaternary\",\n iconInvalid: \"absolute inset-y-0 items-center justify-center text-fg-error-secondary\",\n sizes: {\n sm: {\n field: \"min-h-9\",\n input: \"px-3 py-2 text-sm\",\n inputLeading: \"pl-9\",\n inputTrailing: \"pr-9\",\n iconLeading: \"left-3 w-4\",\n iconTrailing: \"right-3 w-4\",\n iconPx: 16,\n shortcut: \"pr-1.5\",\n },\n md: {\n field: \"min-h-10\",\n input: \"px-3 py-2 text-md\",\n inputLeading: \"pl-10\",\n inputTrailing: \"pr-9\",\n iconLeading: \"left-3 w-5\",\n iconTrailing: \"right-3 w-4\",\n iconPx: 20,\n shortcut: \"pr-2\",\n },\n lg: {\n field: \"min-h-11\",\n input: \"px-3.5 py-2.5 text-md\",\n inputLeading: \"pl-10.5\",\n inputTrailing: \"pr-9.5\",\n iconLeading: \"left-3.5 w-5\",\n iconTrailing: \"right-3.5 w-4\",\n iconPx: 20,\n shortcut: \"pr-2.5\",\n },\n },\n});\n\n//////////////////////////////////////////////// INPUT GROUP / PREFIX / SELECT / NUMBER / TAGS / PAYMENT\n// Visual contract for native. Web keeps its own maps — do not change web.\n\nexport const inputGroupStyles = sortCx({\n /** Single outer shell — select/button addons only (Figma 85:1269). */\n shell: \"w-full flex-row items-stretch overflow-hidden rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n shellFocus: inputFocusRingShadow,\n shellInvalid: \"border-error_subtle\",\n shellInvalidFocus: inputErrorFocusRingShadow,\n shellDisabled: \"opacity-50\",\n row: \"w-full min-h-0 flex-row items-stretch\",\n /** Leading select/button segment — compact, flush (no divider). */\n addonLeading: \"shrink-0 flex-row items-stretch self-stretch\",\n /** Trailing button segment — left divider; trailing select stays flush. */\n addonTrailing: \"shrink-0 flex-row items-stretch self-stretch\",\n addonTrailingDivider: \"border-l border-solid border-primary\",\n prefixInline: \"shrink-0 flex-row items-center self-stretch text-tertiary\",\n fieldSlot: \"min-w-0 flex-1 flex-row items-stretch\",\n sizes: {\n sm: {\n shellMinH: \"min-h-9\",\n prefixInline: \"pl-3 pr-1.5 text-sm\",\n /** Input padding when leading select is present. */\n inputLeadingSelect: \"pl-2 pr-3 py-2 text-sm\",\n /** Input padding when trailing select + optional $ prefix. */\n inputTrailingSelect: \"pl-0 pr-2 py-2 text-sm\",\n inputTrailingSelectNoPrefix: \"pl-3 pr-2 py-2 text-sm\",\n inputTrailingButton: \"pl-3 pr-3 py-2 text-sm\",\n },\n md: {\n shellMinH: \"min-h-10\",\n prefixInline: \"pl-3 pr-2 text-md\",\n inputLeadingSelect: \"pl-2.5 pr-3 py-2 text-md\",\n inputTrailingSelect: \"pl-0 pr-2 py-2 text-md\",\n inputTrailingSelectNoPrefix: \"pl-3 pr-2 py-2 text-md\",\n inputTrailingButton: \"pl-3 pr-3 py-2 text-md\",\n },\n lg: {\n shellMinH: \"min-h-11\",\n prefixInline: \"pl-3.5 pr-2 text-md\",\n inputLeadingSelect: \"pl-3 pr-3.5 py-2.5 text-md\",\n inputTrailingSelect: \"pl-0 pr-2 py-2.5 text-md\",\n inputTrailingSelectNoPrefix: \"pl-3.5 pr-2 py-2.5 text-md\",\n inputTrailingButton: \"pl-3.5 pr-3.5 py-2.5 text-md\",\n },\n },\n});\n\nexport const inputPrefixStyles = sortCx({\n root: \"shrink-0 flex-row items-center self-stretch border border-solid border-primary bg-primary text-tertiary shadow-xs\",\n leading: \"rounded-l-lg rounded-r-none border-r-0\",\n trailing: \"rounded-r-lg rounded-l-none border-l-0\",\n sizes: {\n sm: \"min-h-9 px-3 py-2 text-sm\",\n md: \"min-h-10 px-3 py-2 text-md\",\n lg: \"min-h-11 px-3.5 py-2.5 text-md\",\n },\n});\n\n/**\n * NativeSelect trigger.\n * In-group: compact flush segment (web `in-data-input-wrapper` + leading/trailing).\n * Standalone: full bordered control.\n */\nexport const nativeSelectStyles = sortCx({\n root: \"relative flex-row items-center rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n /** Flex row + gap — avoid absolute chevron (unreliable height on RN). */\n rootInGroup: \"shrink-0 flex-row items-center self-stretch border-0 bg-transparent shadow-none\",\n label: \"font-medium text-primary\",\n labelInGroup: \"font-normal text-tertiary\",\n sizes: {\n sm: {\n root: \"min-h-9 gap-1 py-2 pl-3 pr-2.5\",\n rootInGroupLeading: \"gap-1 py-2 pl-3 pr-2\",\n rootInGroupTrailing: \"gap-1 py-2 pl-2.5 pr-2\",\n label: \"text-sm\",\n chevron: 14,\n },\n md: {\n root: \"min-h-10 gap-1 py-2 pl-3 pr-3\",\n rootInGroupLeading: \"gap-1 py-2 pl-3 pr-2.5\",\n rootInGroupTrailing: \"gap-1 py-2 pl-3 pr-3\",\n label: \"text-md\",\n chevron: 16,\n },\n lg: {\n root: \"min-h-11 gap-1.5 py-2.5 pl-3.5 pr-3\",\n rootInGroupLeading: \"gap-1.5 py-2.5 pl-3.5 pr-3\",\n rootInGroupTrailing: \"gap-1.5 py-2.5 pl-3 pr-3\",\n label: \"text-md\",\n chevron: 16,\n },\n },\n});\n\nexport const inputNumberStyles = sortCx({\n shell: \"w-full flex-row items-stretch overflow-hidden rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n shellFocus: inputFocusRingShadow,\n shellInvalid: \"border-error_subtle\",\n shellInvalidFocus: inputErrorFocusRingShadow,\n shellDisabled: \"opacity-50\",\n input: \"m-0 min-w-0 flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n verticalRail: \"flex-col items-stretch border-l border-solid border-primary\",\n verticalBtn: \"flex-1 items-center justify-center\",\n verticalBtnBorder: \"border-t border-solid border-primary\",\n sizes: {\n sm: { input: \"px-3 py-2 text-sm\", rail: \"w-7\" },\n md: { input: \"px-3 py-2 text-md\", rail: \"w-7\" },\n lg: { input: \"px-3.5 py-2.5 text-md\", rail: \"w-7.5\" },\n },\n});\n\n/**\n * Tags inside InputTags — mirrors web `components/base/tags` sizes.\n * InputTags maps lg → md tag size (same as web TagGroup).\n */\nexport const inputTagsStyles = sortCx({\n field: \"relative w-full flex-row flex-wrap items-center gap-1.5 rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n fieldFocus: inputFocusRingShadow,\n fieldInvalid: \"border-error_subtle\",\n fieldInvalidFocus: inputErrorFocusRingShadow,\n fieldDisabled: \"opacity-50\",\n input: \"m-0 min-w-[80px] flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n tag: \"flex-row items-center rounded-md border border-solid border-primary bg-primary\",\n tagLabel: \"font-medium text-secondary\",\n sizes: {\n sm: {\n field: \"min-h-10 gap-1.5 px-3 py-2\",\n fieldFilled: \"py-1.5 pl-2\",\n input: \"min-h-5 py-0.5 text-sm\",\n tag: \"min-h-6 gap-1 px-2 py-1\",\n tagLabel: \"text-xs\",\n tagClose: 10,\n iconTrailing: \"right-3\",\n },\n md: {\n field: \"min-h-11 gap-2 px-3 py-2\",\n fieldFilled: \"pl-2\",\n input: \"min-h-6 py-0.5 text-md\",\n tag: \"min-h-7 gap-1.25 px-2.5 py-1\",\n tagLabel: \"text-sm\",\n tagClose: 12,\n iconTrailing: \"right-3\",\n },\n lg: {\n field: \"min-h-12 gap-2 px-3.5 py-2.5\",\n fieldFilled: \"pl-2.5\",\n input: \"min-h-6 py-0.5 text-md\",\n /** Web InputTags uses md tags at lg field size. */\n tag: \"min-h-7 gap-1.25 px-2.5 py-1\",\n tagLabel: \"text-sm\",\n tagClose: 12,\n iconTrailing: \"right-3.5\",\n },\n },\n});\n\nexport const inputPaymentStyles = sortCx({\n /**\n * Wrapper only (native). Do not set `h-6` here — that plus `inset-y-0`\n * pins the 34×24 SVG to the top. Width beats the default `w-4`/`w-5` slot.\n */\n icon: \"w-[34px]\",\n sizes: {\n sm: { inputLeading: \"pl-12\", iconLeading: \"left-1.5\" },\n md: { inputLeading: \"pl-12.5\", iconLeading: \"left-2\" },\n lg: { inputLeading: \"pl-13\", iconLeading: \"left-2.5\" },\n },\n});\n\n/** Format card number in groups of 4 digits. */\nexport function formatCardNumber(number: string): string {\n const cleaned = number.replace(/\\D/g, \"\");\n const match = cleaned.match(/\\d{1,4}/g);\n return match ? match.join(\" \") : cleaned;\n}\n\nexport type PaymentCardBrand = \"visa\" | \"mastercard\" | \"amex\" | \"discover\" | \"unionpay\" | \"unknown\";\n\nconst PAYMENT_CARD_PATTERNS: { brand: PaymentCardBrand; pattern: RegExp }[] = [\n { brand: \"visa\", pattern: /^4[0-9]{3,}$/ },\n { brand: \"mastercard\", pattern: /^5[1-5][0-9]{2,}$/ },\n { brand: \"amex\", pattern: /^3[47][0-9]{2,}$/ },\n { brand: \"discover\", pattern: /^6(?:011|5[0-9]{2}|4[4-9][0-9])/ },\n { brand: \"unionpay\", pattern: /^(62|88)[0-9]{14,17}$/ },\n];\n\n/** Detect card brand from digits (spaces ignored). */\nexport function detectCardBrand(number: string): PaymentCardBrand {\n const sanitized = number.replace(/\\D/g, \"\");\n const match = PAYMENT_CARD_PATTERNS.find((entry) => entry.pattern.test(sanitized));\n return match?.brand ?? \"unknown\";\n}\n\n//////////////////////////////////////////////// WEB-ONLY STYLES\n// CSS focus rings, InputGroup shell chrome, transitions — not for NativeWind.\n\nexport const inputWebStyles = sortCx({\n field: {\n root: \"group/input flex place-content-center place-items-center transition-[border-color,box-shadow] duration-100 ease-linear\",\n focusCss: inputFocusRingShadowCss,\n invalidFocusCss: inputErrorFocusRingShadowCss,\n disabled: \"cursor-not-allowed opacity-50\",\n groupDisabled: \"group-disabled:cursor-not-allowed group-disabled:opacity-50\",\n invalid: \"border-error_subtle\",\n groupInvalid: \"group-invalid:border-error_subtle\",\n groupShell: inputGroupShellFieldClass,\n },\n input: \"w-full ring-0 outline-hidden autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed\",\n stack: \"group flex h-max w-full flex-col items-start justify-start gap-1.5\",\n iconLeading: \"pointer-events-none absolute text-fg-quaternary\",\n tooltipTrigger:\n \"absolute cursor-pointer text-fg-quaternary transition duration-100 ease-linear group-invalid/input:hidden hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n invalidIcon:\n \"pointer-events-none absolute hidden size-4 stroke-[2.25px] text-fg-error-secondary group-invalid/input:block\",\n passwordToggle:\n \"absolute flex cursor-pointer items-center justify-center text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover focus:outline-hidden\",\n shortcutWrap:\n \"pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n shortcutKey:\n \"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\",\n sizes: {\n sm: {\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n },\n md: {\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n },\n lg: {\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n },\n },\n});\n\n/** Exact strings from web `label.tsx` / `hint-text.tsx`. */\nexport const inputWebLabelStyles = sortCx({\n root: \"flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary\",\n required: \"hidden text-brand-tertiary\",\n requiredVisible: \"block\",\n requiredGroup: \"group-required:block\",\n requiredInvalid: \"text-error-primary\",\n requiredGroupInvalid: \"group-invalid:text-error-primary\",\n tooltipTrigger:\n \"cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n tooltipIcon: \"size-4\",\n});\n\nexport const inputWebHintStyles = sortCx({\n root: \"text-sm text-tertiary\",\n sm: \"text-xs\",\n inSm: \"in-data-[input-size=sm]:text-xs\",\n invalid: \"text-error-primary\",\n groupInvalid: \"group-invalid:text-error-primary\",\n});\n\n/** Exact padding maps from web `input-date.tsx`. */\nexport const inputDateWebSizes = sortCx({\n sm: {\n root: \"px-3 py-2 text-sm\",\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2.5\",\n trailing: \"pr-9\",\n leading: \"pl-8.5\",\n },\n md: {\n root: \"px-3 py-2 text-md\",\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2.5\",\n trailing: \"pr-9\",\n leading: \"pl-10\",\n },\n lg: {\n root: \"px-3.5 py-2.5 text-md\",\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n shortcut: \"pr-3\",\n trailing: \"pr-9.5\",\n leading: \"pl-10.5\",\n },\n});\n\nexport const inputDateWebSegment =\n \"rounded px-0.5 text-primary tabular-nums caret-transparent focus:bg-brand-solid focus:font-medium focus:text-white focus:outline-hidden\";\n\n/** Exact padding maps from web `input-tags.tsx`. */\nexport const inputTagsWebSizes = sortCx({\n sm: { root: \"gap-2 px-3 py-2 text-sm\", rootFilled: \"py-1.5 pl-2\", trailing: \"pr-9\", iconTrailing: \"right-3\" },\n md: { root: \"gap-2 px-3 py-2 text-md\", rootFilled: \"pl-2\", trailing: \"pr-9\", iconTrailing: \"right-3\" },\n lg: { root: \"gap-2 px-3.5 py-2.5 text-md\", rootFilled: \"pl-2.5\", trailing: \"pr-9.5\", iconTrailing: \"right-3.5\" },\n});\n\n/** Exact strings from web `select-native.tsx`. */\nexport const nativeSelectWebStyles = sortCx({\n wrap: \"w-full in-data-input-wrapper:w-max\",\n label: \"mb-1.5\",\n grid: \"relative grid w-full in-data-input-wrapper:w-max items-center\",\n select: [\n \"appearance-none rounded-lg border border-solid border-primary bg-primary font-medium text-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear placeholder:text-fg-quaternary disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\",\n \"aria-invalid:border-error_subtle aria-invalid:focus-visible:border-error aria-invalid:focus-visible:ring-1 aria-invalid:focus-visible:ring-inset aria-invalid:focus-visible:ring-error\",\n \"in-data-input-wrapper:border-0 in-data-input-wrapper:bg-transparent in-data-input-wrapper:shadow-none\",\n \"in-data-input-wrapper:focus-visible:border-0 in-data-input-wrapper:focus-visible:ring-0\",\n \"in-data-input-wrapper:aria-invalid:border-0 in-data-input-wrapper:aria-invalid:ring-0 in-data-input-wrapper:group-invalid:border-0 in-data-input-wrapper:group-invalid:ring-0\",\n \"in-data-input-wrapper:h-full in-data-input-wrapper:font-normal in-data-input-wrapper:text-tertiary in-data-input-wrapper:in-data-[size=sm]:text-sm\",\n \"in-data-input-wrapper:group-disabled:pointer-events-none in-data-input-wrapper:group-disabled:cursor-not-allowed in-data-input-wrapper:group-disabled:bg-transparent\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-leading:rounded-none in-data-input-wrapper:in-data-leading:pl-3 in-data-input-wrapper:in-data-leading:pr-7 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pl-3.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pr-8 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pl-3 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pr-6.5\",\n \"in-data-input-wrapper:in-data-trailing:rounded-none in-data-input-wrapper:in-data-trailing:in-data-[input-size=lg]:pr-8 in-data-input-wrapper:in-data-trailing:in-data-[input-size=md]:pr-7.5 in-data-input-wrapper:in-data-trailing:in-data-[input-size=sm]:pr-6.5\",\n ].join(\" \"),\n chevron: \"pointer-events-none absolute text-fg-quaternary\",\n chevronInGroup: [\n \"in-data-input-wrapper:size-4 in-data-input-wrapper:stroke-[2.625px]\",\n \"in-data-input-wrapper:in-data-leading:right-2.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:right-2 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:right-3\",\n \"in-data-input-wrapper:in-data-trailing:right-3 in-data-input-wrapper:in-data-trailing:in-data-[input-size=sm]:right-3\",\n ].join(\" \"),\n hint: \"mt-2\",\n sizes: {\n sm: { root: \"py-2 pl-3 text-sm\", icon: \"size-4 right-2.5 stroke-[2.25px]\" },\n md: { root: \"py-2 pl-3 text-md\", icon: \"size-4 stroke-[2.25px] right-3\" },\n lg: { root: \"py-2.5 px-3.5 text-md\", icon: \"size-5 right-3\" },\n },\n});\n\n/** Exact shell strings from web `input-group.tsx`. */\nexport const inputGroupWebShellBorderClass =\n \"has-[select]:border has-[select]:border-solid has-[select]:border-primary has-[select]:shadow-xs has-[section[data-trailing]_button]:border has-[section[data-trailing]_button]:border-solid has-[section[data-trailing]_button]:border-primary has-[section[data-trailing]_button]:shadow-xs has-[section[data-leading]_button]:border has-[section[data-leading]_button]:border-solid has-[section[data-leading]_button]:border-primary has-[section[data-leading]_button]:shadow-xs\";\n\nexport const inputGroupWebShellFocusClass = [\n \"has-[select]:focus-within:after:pointer-events-none has-[select]:focus-within:after:absolute has-[select]:focus-within:after:-inset-px has-[select]:focus-within:after:z-10 has-[select]:focus-within:after:rounded-lg has-[select]:focus-within:after:border has-[select]:focus-within:after:border-solid has-[select]:focus-within:after:border-brand has-[select]:focus-within:after:ring-1 has-[select]:focus-within:after:ring-inset has-[select]:focus-within:after:ring-brand has-[select]:focus-within:after:content-['']\",\n \"has-[section[data-trailing]_button]:focus-within:after:pointer-events-none has-[section[data-trailing]_button]:focus-within:after:absolute has-[section[data-trailing]_button]:focus-within:after:-inset-px has-[section[data-trailing]_button]:focus-within:after:z-10 has-[section[data-trailing]_button]:focus-within:after:rounded-lg has-[section[data-trailing]_button]:focus-within:after:border has-[section[data-trailing]_button]:focus-within:after:border-solid has-[section[data-trailing]_button]:focus-within:after:border-brand has-[section[data-trailing]_button]:focus-within:after:ring-1 has-[section[data-trailing]_button]:focus-within:after:ring-inset has-[section[data-trailing]_button]:focus-within:after:ring-brand has-[section[data-trailing]_button]:focus-within:after:content-['']\",\n \"has-[section[data-leading]_button]:focus-within:after:pointer-events-none has-[section[data-leading]_button]:focus-within:after:absolute has-[section[data-leading]_button]:focus-within:after:-inset-px has-[section[data-leading]_button]:focus-within:after:z-10 has-[section[data-leading]_button]:focus-within:after:rounded-lg has-[section[data-leading]_button]:focus-within:after:border has-[section[data-leading]_button]:focus-within:after:border-solid has-[section[data-leading]_button]:focus-within:after:border-brand has-[section[data-leading]_button]:focus-within:after:ring-1 has-[section[data-leading]_button]:focus-within:after:ring-inset has-[section[data-leading]_button]:focus-within:after:ring-brand has-[section[data-leading]_button]:focus-within:after:content-['']\",\n].join(\" \");\n\nexport const inputGroupWebShellInvalidClass = [\n \"has-[select]:border-error_subtle has-[section[data-trailing]_button]:border-error_subtle has-[section[data-leading]_button]:border-error_subtle\",\n \"has-[select]:focus-within:after:pointer-events-none has-[select]:focus-within:after:absolute has-[select]:focus-within:after:-inset-px has-[select]:focus-within:after:z-10 has-[select]:focus-within:after:rounded-lg has-[select]:focus-within:after:border has-[select]:focus-within:after:border-solid has-[select]:focus-within:after:border-error has-[select]:focus-within:after:ring-1 has-[select]:focus-within:after:ring-inset has-[select]:focus-within:after:ring-error has-[select]:focus-within:after:content-['']\",\n \"has-[section[data-trailing]_button]:focus-within:after:pointer-events-none has-[section[data-trailing]_button]:focus-within:after:absolute has-[section[data-trailing]_button]:focus-within:after:-inset-px has-[section[data-trailing]_button]:focus-within:after:z-10 has-[section[data-trailing]_button]:focus-within:after:rounded-lg has-[section[data-trailing]_button]:focus-within:after:border has-[section[data-trailing]_button]:focus-within:after:border-solid has-[section[data-trailing]_button]:focus-within:after:border-error has-[section[data-trailing]_button]:focus-within:after:ring-1 has-[section[data-trailing]_button]:focus-within:after:ring-inset has-[section[data-trailing]_button]:focus-within:after:ring-error has-[section[data-trailing]_button]:focus-within:after:content-['']\",\n \"has-[section[data-leading]_button]:focus-within:after:pointer-events-none has-[section[data-leading]_button]:focus-within:after:absolute has-[section[data-leading]_button]:focus-within:after:-inset-px has-[section[data-leading]_button]:focus-within:after:z-10 has-[section[data-leading]_button]:focus-within:after:rounded-lg has-[section[data-leading]_button]:focus-within:after:border has-[section[data-leading]_button]:focus-within:after:border-solid has-[section[data-leading]_button]:focus-within:after:border-error has-[section[data-leading]_button]:focus-within:after:ring-1 has-[section[data-leading]_button]:focus-within:after:ring-inset has-[section[data-leading]_button]:focus-within:after:ring-error has-[section[data-leading]_button]:focus-within:after:content-['']\",\n].join(\" \");\n\nexport const inputGroupWebStyles = sortCx({\n prefix: [\n \"flex h-full shrink-0 items-center self-stretch border border-solid border-primary bg-primary text-tertiary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear\",\n \"in-data-input-wrapper:group-invalid:border-error_subtle in-data-input-wrapper:group-invalid:group-focus-within:border-error\",\n \"in-data-input-wrapper:in-data-leading:-mr-px in-data-input-wrapper:in-data-leading:rounded-l-lg in-data-input-wrapper:in-data-leading:rounded-r-none in-data-input-wrapper:in-data-leading:border-r-0\",\n \"in-data-input-wrapper:in-data-trailing:-ml-px in-data-input-wrapper:in-data-trailing:rounded-r-lg in-data-input-wrapper:in-data-trailing:rounded-l-none in-data-input-wrapper:in-data-trailing:border-l-0\",\n \"px-3 py-2 text-md\",\n \"in-data-input-wrapper:in-data-[input-size=sm]:px-3 in-data-input-wrapper:in-data-[input-size=sm]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:px-3.5 in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=lg]:text-md\",\n ].join(\" \"),\n shell: \"group relative h-max w-full rounded-lg bg-primary transition-[border-color,box-shadow] duration-100 ease-linear\",\n row: \"flex w-full flex-row items-stretch rounded-[inherit]\",\n rowClip: \"has-[section[data-trailing]]:overflow-clip has-[section[data-leading]_button]:overflow-clip has-[section[data-leading]_select]:overflow-clip\",\n leading: \"flex shrink-0 self-stretch group-disabled:opacity-50 *:h-full\",\n trailing: \"flex shrink-0 self-stretch group-disabled:opacity-50 *:h-full\",\n prefixInline: \"my-auto grow group-disabled:opacity-50\",\n prefixText: \"text-md text-tertiary\",\n disabled: \"cursor-not-allowed\",\n});\n\n//////////////////////////////////////////////// EMAIL / PHONE / CONTACT\n// Exact web class strings. Native maps skip CSS-only selectors.\n\nexport const emailSuggestionWebStyles = sortCx({\n stack: \"flex w-full flex-col\",\n reveal: \"grid transition-[grid-template-rows] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]\",\n revealOpen: \"grid-rows-[1fr]\",\n revealClosed: \"grid-rows-[0fr]\",\n revealInner: \"min-h-0 overflow-hidden\",\n chips: \"flex flex-wrap gap-1.5 px-1 pt-1.5 pb-1\",\n chipActive: \"ring-1 ring-brand ring-inset\",\n});\n\nexport const emailTypoHintWebStyles = sortCx({\n row: \"inline-flex flex-wrap items-center gap-x-1.5 gap-y-0.5\",\n apply: \"text-brand-secondary hover:text-brand-secondary_hover shrink-0 cursor-pointer font-normal underline decoration-transparent underline-offset-2 outline-none hover:decoration-current focus-visible:rounded-sm focus-visible:ring-2 focus-visible:ring-brand\",\n});\n\nexport const emailSuggestionStyles = sortCx({\n stack: \"w-full flex-col\",\n chips: \"absolute left-0 right-0 top-0 flex-row flex-wrap gap-1.5 px-1 pt-1.5 pb-1\",\n chipActive: \"ring-1 ring-brand ring-inset\",\n});\n\nexport const emailTypoHintStyles = sortCx({\n row: \"flex-row flex-wrap items-center gap-x-1.5 gap-y-0.5\",\n apply: \"text-brand-secondary font-medium underline\",\n});\n\nexport const phoneCountryWebStyles = sortCx({\n trigger: [\n \"relative flex w-full cursor-pointer items-center gap-1.5 rounded-lg border border-solid border-primary bg-primary font-medium text-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear\",\n \"in-data-input-wrapper:border-0 in-data-input-wrapper:bg-transparent in-data-input-wrapper:shadow-none\",\n \"in-data-input-wrapper:focus-visible:border-0 in-data-input-wrapper:focus-visible:ring-0\",\n \"in-data-input-wrapper:h-full in-data-input-wrapper:font-normal in-data-input-wrapper:text-tertiary\",\n \"in-data-input-wrapper:group-disabled:pointer-events-none in-data-input-wrapper:group-disabled:cursor-not-allowed in-data-input-wrapper:group-disabled:bg-transparent\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-leading:rounded-none in-data-input-wrapper:in-data-leading:pl-3 in-data-input-wrapper:in-data-leading:pr-6.5\",\n \"in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pl-3.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pr-7\",\n \"in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pl-3 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pr-6.5\",\n ].join(\" \"),\n triggerFocus: \"border-brand ring-1 ring-inset ring-brand\",\n triggerDisabled: \"cursor-not-allowed opacity-50\",\n flag: \"inline-flex h-5 shrink-0 items-center justify-center text-base leading-none translate-y-px\",\n sheetFlag: \"inline-flex h-5 shrink-0 items-center justify-center text-base leading-none translate-y-[2px]\",\n dial: \"text-sm font-medium text-primary in-data-input-wrapper:text-tertiary\",\n placeholder: \"text-sm text-placeholder\",\n chevron: \"pointer-events-none absolute text-fg-quaternary\",\n chevronInGroup: [\n \"in-data-input-wrapper:size-4 in-data-input-wrapper:stroke-[2.625px]\",\n \"in-data-input-wrapper:in-data-leading:right-1.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:right-1.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:right-2\",\n ].join(\" \"),\n searchField: \"flex shrink-0 gap-3 border-b border-secondary px-3\",\n searchFieldMobile: \"pb-3 pt-2\",\n searchFieldDesktop: \"p-3\",\n list: \"min-h-0 flex-1 overflow-y-auto py-1 outline-hidden\",\n empty: \"px-3 py-6 text-center text-sm text-tertiary\",\n sectionHeader: \"px-3 py-1.5 text-xs font-medium text-tertiary\",\n sizes: {\n sm: { root: \"py-2 pl-3 pr-7 text-sm\", chevron: \"size-4 right-1.5 stroke-[2.625px]\", listMax: \"max-h-56\" },\n md: { root: \"py-2 pl-3 pr-6.5 text-md\", chevron: \"size-4 stroke-[2.625px] right-1.5\", listMax: \"max-h-64\" },\n lg: { root: \"py-2.5 pl-3.5 pr-7 text-md\", chevron: \"size-4 right-2 stroke-[2.625px]\", listMax: \"max-h-72\" },\n },\n});\n\nexport const phoneCountryStyles = sortCx({\n flagWrap: \"h-5 items-center justify-center\",\n flag: \"text-base leading-none translate-y-px\",\n dial: \"text-sm font-medium text-tertiary\",\n row: \"flex-row items-center gap-1.5\",\n sheet: \"flex-1 bg-primary pt-2.5\",\n header: \"flex-row items-center px-4 py-3\",\n headerSide: \"z-10 min-w-10 flex-1\",\n headerTitle: \"text-lg font-semibold text-primary\",\n headerClose: \"z-10 min-w-10 flex-1 flex-row items-center justify-end p-1\",\n body: \"min-h-0 flex-1 flex-col\",\n searchWrap: \"mb-4 px-4\",\n listRow: \"min-h-0 flex-1 flex-row\",\n listPane: \"min-h-0 flex-1 pr-5\",\n listContentSearch: \"pt-2\",\n alphabet: \"absolute top-0 right-1 bottom-0 w-8 items-center justify-center py-2\",\n alphabetItem: \"min-h-5 items-center justify-center px-2 py-0.5\",\n alphabetLabel: \"text-xs font-semibold text-secondary\",\n sectionTitle: \"mt-4 mb-2 px-4 text-md font-semibold text-primary\",\n separator: \"my-4 h-px bg-secondary\",\n item: \"flex-row items-center border-b border-solid border-secondary px-4 py-2\",\n itemSelected: \"bg-secondary\",\n sheetFlagWrap: \"mr-4 h-6 items-center justify-center\",\n sheetFlag: \"text-2xl leading-none translate-y-[2px]\",\n itemName: \"min-w-0 flex-1 text-md font-medium text-primary\",\n itemDial: \"ml-2 text-md font-semibold text-secondary\",\n letterHeader: \"mt-2 bg-primary px-4 py-1\",\n letterHeaderText: \"text-sm font-medium uppercase tracking-wide text-tertiary\",\n empty: \"px-3 py-6 text-center text-sm text-tertiary\",\n});\n\nexport const contactAddonWebStyles = sortCx({\n motionHost: \"h-full overflow-hidden\",\n inner: \"flex h-full w-max items-stretch pr-px\",\n});\n\nexport const contactAddonStyles = sortCx({\n inner: \"absolute bottom-0 left-0 top-0 h-full flex-row items-stretch pr-px\",\n});\n","import { sortCx } from \"./cx\";\nimport { inputErrorFocusRingShadow, inputFocusRingShadow } from \"./input\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const TEXTAREA_SIZES = [\"sm\", \"md\"] as const;\nexport type TextAreaSize = (typeof TEXTAREA_SIZES)[number];\n\n//////////////////////////////////////////////// SHARED STYLES\n// Exact web class strings. Native map skips CSS-only selectors (autofill, resizer).\n\nexport const textareaWebStyles = sortCx({\n stack: \"flex flex-col gap-1.5\",\n root: \"w-full scroll-py-3 rounded-lg border border-solid border-primary bg-primary text-primary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear placeholder:text-placeholder autofill:rounded-lg autofill:text-primary focus:outline-hidden\",\n resizer:\n \"[&::-webkit-resizer]:bg-(image:--resize-handle-bg) [&::-webkit-resizer]:bg-contain dark:[&::-webkit-resizer]:bg-(image:--resize-handle-bg-dark)\",\n focus: inputFocusRingShadow,\n disabled: \"cursor-not-allowed opacity-50\",\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n sizes: {\n sm: \"p-3 text-sm\",\n md: \"px-3.5 py-3 text-md\",\n },\n});\n\nexport const textareaStyles = sortCx({\n stack: \"w-full flex-col gap-1.5\",\n field: \"w-full rounded-lg border border-solid border-primary bg-primary text-primary shadow-xs placeholder:text-placeholder\",\n focus: inputFocusRingShadow,\n disabled: \"opacity-50\",\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n sizes: {\n sm: \"min-h-24 p-3 text-sm\",\n md: \"min-h-28 px-3.5 py-3 text-md\",\n },\n});\n","import {\n createContext,\n forwardRef,\n useContext,\n useState,\n type ComponentType,\n type FC,\n type ReactNode,\n} from \"react\";\nimport { Platform, type TextInput as RNTextInput, type TextInputProps } from \"react-native\";\nimport { useNativeVariable } from \"react-native-css\";\nimport { Pressable, Text, TextInput, View } from \"react-native-css/components\";\nimport { EyeIcon } from \"phosphor-react-native/src/icons/Eye\";\nimport { EyeSlashIcon } from \"phosphor-react-native/src/icons/EyeSlash\";\nimport { InfoIcon } from \"phosphor-react-native/src/icons/Info\";\nimport { QuestionIcon } from \"phosphor-react-native/src/icons/Question\";\nimport { inputGroupStyles, inputStyles, type InputSize, type InputType } from \"@avenue-ticketing/core/input\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\n\nexport type { InputSize, InputType };\n\n//////////////////////////////////////////////// CONTEXT\n\nexport type InputGroupChrome = {\n size: InputSize;\n isDisabled: boolean;\n isInvalid: boolean;\n /** Shell owns border — strip InputBase chrome (select/button addons). */\n shellOwnsChrome: boolean;\n /** Join against a Prefix segment (square the shared edge). */\n joinLeadingPrefix?: boolean;\n hasLeadingSelect?: boolean;\n hasTrailingSelect?: boolean;\n hasTrailingButton?: boolean;\n hasPrefix?: boolean;\n selectPosition?: \"leading\" | \"trailing\" | null;\n};\n\nexport const InputGroupContext = createContext<InputGroupChrome | null>(null);\nexport const useInputGroupContext = () => useContext(InputGroupContext);\n\n/** Bubbles TextInput focus to InputGroup shell. */\nexport const ShellFocusContext = createContext<((focused: boolean) => void) | null>(null);\nexport const useShellFocus = () => useContext(ShellFocusContext);\n\n//////////////////////////////////////////////// TYPES\n\nexport interface LabelProps {\n children: ReactNode;\n isRequired?: boolean;\n isInvalid?: boolean;\n className?: string;\n}\n\nexport interface HintTextProps {\n children: ReactNode;\n isInvalid?: boolean;\n size?: InputSize;\n className?: string;\n}\n\nexport interface InputBaseProps {\n size?: InputSize;\n type?: InputType;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n isDisabled?: boolean;\n isInvalid?: boolean;\n tooltip?: string;\n icon?: ComponentType<{ className?: string; size?: number; color?: string }>;\n autoCapitalize?: \"none\" | \"sentences\" | \"words\" | \"characters\";\n keyboardType?: \"default\" | \"email-address\" | \"numeric\" | \"phone-pad\" | \"url\";\n /** iOS QuickType / autofill token. */\n textContentType?: TextInputProps[\"textContentType\"];\n /** Android autofill hint. */\n autoComplete?: TextInputProps[\"autoComplete\"];\n autoCorrect?: boolean;\n autoFocus?: boolean;\n returnKeyType?: TextInputProps[\"returnKeyType\"];\n editable?: boolean;\n className?: string;\n inputClassName?: string;\n wrapperClassName?: string;\n iconClassName?: string;\n onChangeText?: (text: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n onPress?: () => void;\n onSubmitEditing?: () => void;\n}\n\nexport interface InputProps extends InputBaseProps {\n label?: string;\n hint?: ReactNode;\n isRequired?: boolean;\n hideRequiredIndicator?: boolean;\n}\n\n//////////////////////////////////////////////// HELPERS\n\n/**\n * Android `paddingVertical: 0` (glyph centering) drops className `px-*` on\n * EditText — value and placeholder sit flush left. iOS keeps the utilities.\n */\nconst androidInputPad = (size: InputSize, leading: boolean, trailing: boolean) => {\n if (Platform.OS !== \"android\") return undefined;\n const x = size === \"lg\" ? 14 : 12;\n return {\n paddingStart: leading ? (size === \"sm\" ? 36 : size === \"lg\" ? 42 : 40) : x,\n paddingEnd: trailing ? (size === \"lg\" ? 38 : 36) : x,\n };\n};\n\nexport const Label: FC<LabelProps> = ({ children, isRequired, isInvalid, className }) => {\n return (\n <View className={cx(inputStyles.labelRow, className)}>\n <Text className={inputStyles.label}>{children}</Text>\n {isRequired && (\n <Text className={isInvalid ? inputStyles.requiredInvalid : inputStyles.required}>*</Text>\n )}\n </View>\n );\n};\n\nexport const HintText: FC<HintTextProps> = ({ children, isInvalid, size, className }) => {\n if (children == null || children === false) return null;\n if (typeof children !== \"string\" && typeof children !== \"number\") {\n return <>{children}</>;\n }\n return (\n <Text\n className={cx(\n inputStyles.hint,\n size === \"sm\" && inputStyles.hintSm,\n isInvalid && inputStyles.hintInvalid,\n className,\n )}\n >\n {children}\n </Text>\n );\n};\n\n//////////////////////////////////////////////// MAIN\n\nexport const InputBase = forwardRef<RNTextInput, InputBaseProps>(function InputBase(\n {\n size: sizeProp = \"md\",\n type = \"text\",\n placeholder,\n value,\n defaultValue,\n isDisabled: isDisabledProp = false,\n isInvalid: isInvalidProp = false,\n tooltip,\n icon: Icon,\n autoCapitalize,\n keyboardType,\n textContentType: textContentTypeProp,\n autoComplete: autoCompleteProp,\n autoCorrect: autoCorrectProp,\n autoFocus,\n returnKeyType,\n editable,\n className,\n inputClassName,\n wrapperClassName,\n iconClassName,\n onChangeText,\n onFocus,\n onBlur,\n onPress,\n onSubmitEditing,\n },\n ref,\n) {\n const group = useInputGroupContext();\n const setShellFocus = useShellFocus();\n const size = group?.size ?? sizeProp;\n const isDisabled = Boolean(group?.isDisabled || isDisabledProp);\n const isInvalid = Boolean(group?.isInvalid || isInvalidProp);\n const shellOwnsChrome = Boolean(group?.shellOwnsChrome);\n const joinLeadingPrefix = Boolean(group?.joinLeadingPrefix);\n const groupPad = group ? inputGroupStyles.sizes[size] : null;\n\n const groupInputPad =\n groupPad && group?.hasLeadingSelect\n ? groupPad.inputLeadingSelect\n : groupPad && group?.hasTrailingSelect\n ? group?.hasPrefix\n ? groupPad.inputTrailingSelect\n : groupPad.inputTrailingSelectNoPrefix\n : groupPad && group?.hasTrailingButton\n ? groupPad.inputTrailingButton\n : null;\n\n const [isFocused, setIsFocused] = useState(false);\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const isPassword = type === \"password\";\n const hasLeadingIcon = Boolean(Icon);\n const hasTrailingIcon = Boolean(tooltip) || isInvalid || isPassword;\n const sizeStyles = inputStyles.sizes[size];\n const fgQuaternary = useNativeVariable(\"--color-fg-quaternary\") ?? \"#a4a7ae\";\n const fgErrorSecondary = useNativeVariable(\"--color-fg-error-secondary\") ?? \"#f04438\";\n\n const handleFocus = () => {\n setIsFocused(true);\n setShellFocus?.(true);\n onFocus?.();\n };\n const handleBlur = () => {\n setIsFocused(false);\n setShellFocus?.(false);\n onBlur?.();\n };\n\n const field = (\n <View\n className={cx(\n shellOwnsChrome\n ? \"relative isolate min-w-0 flex-1 flex-row items-center self-stretch bg-transparent\"\n : cx(inputStyles.field.root, sizeStyles.field),\n joinLeadingPrefix && !shellOwnsChrome && \"rounded-l-none\",\n !shellOwnsChrome && isFocused && !isInvalid && inputStyles.field.focus,\n !shellOwnsChrome && isInvalid && inputStyles.field.invalid,\n !shellOwnsChrome && isInvalid && isFocused && inputStyles.field.invalidFocus,\n !shellOwnsChrome && isDisabled && inputStyles.field.disabled,\n wrapperClassName,\n className,\n )}\n >\n {Icon && (\n <View\n pointerEvents=\"none\"\n className={cx(inputStyles.iconLeading, iconClassName ?? sizeStyles.iconLeading)}\n >\n <Icon className=\"text-fg-quaternary\" size={sizeStyles.iconPx} color={fgQuaternary} />\n </View>\n )}\n\n <TextInput\n ref={ref}\n accessibilityLabel={placeholder}\n editable={editable ?? !isDisabled}\n placeholder={placeholder}\n value={value}\n defaultValue={defaultValue}\n secureTextEntry={isPassword && !isPasswordVisible}\n autoCapitalize={autoCapitalize ?? (type === \"email\" ? \"none\" : undefined)}\n autoCorrect={autoCorrectProp ?? type !== \"email\"}\n autoFocus={autoFocus}\n returnKeyType={returnKeyType}\n keyboardType={keyboardType ?? (type === \"email\" ? \"email-address\" : \"default\")}\n textContentType={\n textContentTypeProp ??\n (isPassword ? \"password\" : type === \"email\" ? \"emailAddress\" : undefined)\n }\n autoComplete={\n autoCompleteProp ?? (type === \"email\" ? \"email\" : isPassword ? \"password\" : undefined)\n }\n onChangeText={onChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onSubmitEditing={onSubmitEditing}\n blurOnSubmit={onSubmitEditing ? false : undefined}\n style={{\n includeFontPadding: false,\n paddingVertical: 0,\n ...androidInputPad(size, hasLeadingIcon, hasTrailingIcon),\n }}\n className={cx(\n inputStyles.input,\n groupInputPad ?? sizeStyles.input,\n !groupInputPad && hasLeadingIcon && sizeStyles.inputLeading,\n !groupInputPad && hasTrailingIcon && sizeStyles.inputTrailing,\n // Tooltip / invalid icon still need trailing room inside a group shell.\n groupInputPad && hasTrailingIcon && \"pr-9\",\n inputClassName,\n )}\n />\n\n {isPassword && (\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel=\"Toggle password visibility\"\n disabled={isDisabled}\n onPress={() => setIsPasswordVisible((visible) => !visible)}\n className={cx(inputStyles.iconTrailing, sizeStyles.iconTrailing)}\n >\n {isPasswordVisible ? (\n <EyeSlashIcon size={sizeStyles.iconPx} weight=\"bold\" color={fgQuaternary} />\n ) : (\n <EyeIcon size={sizeStyles.iconPx} weight=\"bold\" color={fgQuaternary} />\n )}\n </Pressable>\n )}\n\n {!isPassword && isInvalid && (\n <View pointerEvents=\"none\" className={cx(inputStyles.iconInvalid, sizeStyles.iconTrailing)}>\n <InfoIcon size={16} weight=\"bold\" color={fgErrorSecondary} />\n </View>\n )}\n\n {!isPassword && tooltip && !isInvalid && (\n <View pointerEvents=\"none\" className={cx(inputStyles.iconTrailing, sizeStyles.iconTrailing)}>\n <QuestionIcon size={16} weight=\"bold\" color={fgQuaternary} />\n </View>\n )}\n </View>\n );\n\n if (onPress) {\n return (\n <Pressable accessibilityRole=\"button\" disabled={isDisabled} onPress={onPress} className=\"min-w-0 flex-1\">\n {field}\n </Pressable>\n );\n }\n\n return field;\n});\n\nexport const Input: FC<InputProps> = ({\n label,\n hint,\n isRequired = false,\n hideRequiredIndicator = false,\n isInvalid = false,\n isDisabled = false,\n size = \"md\",\n className,\n ...baseProps\n}) => {\n const showRequired = Boolean(label) && isRequired && !hideRequiredIndicator;\n\n return (\n <View className={cx(inputStyles.stack, className)}>\n {label && (\n <Label isRequired={showRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n <InputBase size={size} isInvalid={isInvalid} isDisabled={isDisabled} {...baseProps} />\n {hint != null && hint !== false && hint !== \"\" && (\n <HintText isInvalid={isInvalid} size={size}>\n {hint}\n </HintText>\n )}\n </View>\n );\n};\n\nInput.displayName = \"Input\";\nInputBase.displayName = \"InputBase\";\n","import { useState, type FC, type ReactNode } from \"react\";\nimport { TextInput, View } from \"react-native-css/components\";\nimport { textareaStyles, type TextAreaSize } from \"@avenue-ticketing/core/textarea\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { HintText, Label } from \"../input/input\";\n\nexport type { TextAreaSize };\n\n//////////////////////////////////////////////// TYPES\n\nexport interface TextAreaProps {\n size?: TextAreaSize;\n label?: string;\n hint?: ReactNode;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n rows?: number;\n isDisabled?: boolean;\n isInvalid?: boolean;\n isRequired?: boolean;\n hideRequiredIndicator?: boolean;\n className?: string;\n onChangeText?: (value: string) => void;\n}\n\n//////////////////////////////////////////////// CONSTANTS\n\n/** Web type scale line-heights, plus the field's vertical padding. */\nconst ROW_HEIGHT_PX: Record<TextAreaSize, { line: number; pad: number }> = {\n sm: { line: 20, pad: 24 },\n md: { line: 24, pad: 24 },\n};\n\n//////////////////////////////////////////////// MAIN\n\nexport const TextArea: FC<TextAreaProps> = ({\n size = \"md\",\n label,\n hint,\n placeholder,\n value,\n defaultValue,\n rows,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n hideRequiredIndicator = false,\n className,\n onChangeText,\n}) => {\n const [isFocused, setIsFocused] = useState(false);\n const showRequired = Boolean(label) && isRequired && !hideRequiredIndicator;\n const sizeClass = textareaStyles.sizes[size];\n const rowHeight = rows ? rows * ROW_HEIGHT_PX[size].line + ROW_HEIGHT_PX[size].pad : undefined;\n\n return (\n <View className={cx(textareaStyles.stack, className)}>\n {label && (\n <Label isRequired={showRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n <TextInput\n accessibilityLabel={typeof label === \"string\" ? label : placeholder}\n editable={!isDisabled}\n multiline\n numberOfLines={rows}\n placeholder={placeholder}\n value={value}\n defaultValue={defaultValue}\n textAlignVertical=\"top\"\n onChangeText={onChangeText}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n style={rowHeight ? { minHeight: rowHeight } : undefined}\n className={cx(\n textareaStyles.field,\n sizeClass,\n isFocused && !isInvalid && textareaStyles.focus,\n isInvalid && !isFocused && textareaStyles.invalid,\n isInvalid && isFocused && textareaStyles.invalidFocus,\n isDisabled && textareaStyles.disabled,\n )}\n />\n {hint != null && hint !== false && hint !== \"\" && (\n <HintText isInvalid={isInvalid} size={size === \"sm\" ? \"sm\" : \"md\"}>\n {hint}\n </HintText>\n )}\n </View>\n );\n};\n\nTextArea.displayName = \"TextArea\";\n"]}
1
+ {"version":3,"sources":["../../core/src/cx.ts","../../core/src/input.ts","../../core/src/textarea.ts","../../../native/components/base/input/input.tsx","../../../native/components/base/textarea/textarea.tsx"],"names":["InputBase","useState","jsxs","View","jsx","TextInput"],"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;;;ACSO,IAAM,oBAAA,GAAuB,2CAAA;AAC7B,IAAM,yBAAA,GAA4B,2CAAA;AAiClC,IAAM,cAAc,MAAA,CAAO;AAAA,EAC9B,KAAA,EAAO,mDAAA;AAAA,EACP,QAAA,EAAU,+BAAA;AAAA,EACV,KAAA,EAAO,oCAAA;AAAA,EACP,QAAA,EAAU,q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,WAAA,GAAc,UAAA","file":"textarea.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","import { sortCx } from \"./cx\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const INPUT_SIZES = [\"sm\", \"md\", \"lg\"] as const;\nexport type InputSize = (typeof INPUT_SIZES)[number];\n\nexport const INPUT_TYPES = [\"text\", \"password\", \"email\"] as const;\nexport type InputType = (typeof INPUT_TYPES)[number];\n\n//////////////////////////////////////////////// FOCUS / RING TOKENS\n// Shared by Input, InputGroup, Select, Textarea, tags, etc.\n// Strings must stay identical to the previous web `input.tsx` exports.\n\n/**\n * Figma: Inputs (85:1269)\n *\n * Default: border (1px) border-primary + shadow-xs.\n * Focus: 1px border-brand + inset ring-brand (2px visual, no layout shift from border-2).\n * Error default: border-error_subtle; error focus: border-error + inset ring-error.\n *\n * Focus uses CSS `focus-within:` (not JS class toggles) so InputGroup's\n * `group-has-[…]:focus-within:border-0` can override when the shell owns the ring.\n * Do not reintroduce `isFocusWithin && inputFocusRingShadow` — it wins over group-has.\n */\nexport const inputFocusRingShadow = \"border-brand ring-1 ring-inset ring-brand\";\nexport const inputErrorFocusRingShadow = \"border-error ring-1 ring-inset ring-error\";\n/** CSS focus ring — preferred on InputBase so parent group-has utilities can clear it. */\nexport const inputFocusRingShadowCss =\n \"focus-within:border-brand focus-within:ring-1 focus-within:ring-inset focus-within:ring-brand\";\nexport const inputErrorFocusRingShadowCss =\n \"group-invalid:focus-within:border-error group-invalid:focus-within:ring-1 group-invalid:focus-within:ring-inset group-invalid:focus-within:ring-error\";\n\n/**\n * Strip InputBase chrome when an InputGroup shell owns the outline (button/select addons).\n * Baked into InputBase so it works even if TextFieldContext is duplicated across bundle entries.\n */\nexport const inputGroupShellFieldClass =\n \"group-has-[section[data-leading]]:rounded-l-none group-has-[select]:rounded-l-none group-has-[select]:border-0 group-has-[select]:bg-transparent group-has-[select]:shadow-none group-has-[select]:ring-0 group-has-[select]:group-invalid:border-0 group-has-[select]:group-invalid:ring-0 group-has-[select]:group-invalid:shadow-none group-has-[select]:focus-within:border-0 group-has-[select]:focus-within:shadow-none group-has-[select]:focus-within:ring-0 group-has-[select]:group-invalid:focus-within:border-0 group-has-[select]:group-invalid:focus-within:ring-0 group-has-[section[data-trailing]_button]:rounded-none group-has-[section[data-trailing]_button]:border-0 group-has-[section[data-trailing]_button]:bg-transparent group-has-[section[data-trailing]_button]:shadow-none group-has-[section[data-trailing]_button]:ring-0 group-has-[section[data-trailing]_button]:group-invalid:border-0 group-has-[section[data-trailing]_button]:group-invalid:ring-0 group-has-[section[data-trailing]_button]:group-invalid:shadow-none group-has-[section[data-trailing]_button]:focus-within:border-0 group-has-[section[data-trailing]_button]:focus-within:shadow-none group-has-[section[data-trailing]_button]:focus-within:ring-0 group-has-[section[data-trailing]_button]:group-invalid:focus-within:border-0 group-has-[section[data-trailing]_button]:group-invalid:focus-within:ring-0 group-has-[section[data-leading]_button]:border-0 group-has-[section[data-leading]_button]:bg-transparent group-has-[section[data-leading]_button]:shadow-none group-has-[section[data-leading]_button]:ring-0 group-has-[section[data-leading]_button]:group-invalid:border-0 group-has-[section[data-leading]_button]:group-invalid:ring-0 group-has-[section[data-leading]_button]:group-invalid:shadow-none group-has-[section[data-leading]_button]:focus-within:border-0 group-has-[section[data-leading]_button]:focus-within:shadow-none group-has-[section[data-leading]_button]:focus-within:ring-0 group-has-[section[data-leading]_button]:group-invalid:focus-within:border-0 group-has-[section[data-leading]_button]:group-invalid:focus-within:ring-0\";\n\n/**\n * Shell focus overlay for InputGroup / InputNumber.\n * Uses after:-inset-px so the brand stroke covers corner antialiasing (no white flecks).\n * Safe with overflow-clip only when clip lives on an *inner* wrapper — not on this host.\n */\nexport const inputFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-brand after:ring-1 after:ring-inset after:ring-brand after:content-['']\";\nexport const inputErrorFocusRingShellOverlay =\n \"after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-error after:ring-1 after:ring-inset after:ring-error after:content-['']\";\nexport const inputErrorFocusRingGroupInvalidShellOverlay =\n \"group-invalid:focus-within:after:pointer-events-none group-invalid:focus-within:after:absolute group-invalid:focus-within:after:-inset-px group-invalid:focus-within:after:z-10 group-invalid:focus-within:after:rounded-lg group-invalid:focus-within:after:border group-invalid:focus-within:after:border-solid group-invalid:focus-within:after:border-error group-invalid:focus-within:after:ring-1 group-invalid:focus-within:after:ring-inset group-invalid:focus-within:after:ring-error group-invalid:focus-within:after:content-['']\";\nexport const inputFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\";\nexport const inputErrorFocusVisibleRingShadow =\n \"focus-visible:outline-none focus-visible:border-error focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-error\";\n\n//////////////////////////////////////////////// SHARED STYLES\n// Matches web `components/base/input` (Figma 85:1269). Shells stay in ui + native.\n\nexport const inputStyles = sortCx({\n stack: \"w-full flex-col items-start justify-start gap-1.5\",\n labelRow: \"flex-row items-center gap-0.5\",\n label: \"text-sm font-medium text-secondary\",\n required: \"text-brand-tertiary\",\n requiredInvalid: \"text-error-primary\",\n hint: \"text-sm text-tertiary\",\n hintSm: \"text-xs\",\n hintInvalid: \"text-error-primary\",\n field: {\n root: \"relative isolate w-full flex-row items-center rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n /** Web: focus-within:border-brand + inset ring-1 ring-brand (2px visual, no layout shift). */\n focus: inputFocusRingShadow,\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n disabled: \"opacity-50\",\n },\n input: \"m-0 min-w-0 flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n iconLeading: \"absolute inset-y-0 items-center justify-center text-fg-quaternary\",\n iconTrailing: \"absolute inset-y-0 items-center justify-center text-fg-quaternary\",\n iconInvalid: \"absolute inset-y-0 items-center justify-center text-fg-error-secondary\",\n sizes: {\n sm: {\n field: \"min-h-9\",\n input: \"px-3 py-2 text-sm\",\n inputLeading: \"pl-9\",\n inputTrailing: \"pr-9\",\n iconLeading: \"left-3 w-4\",\n iconTrailing: \"right-3 w-4\",\n iconPx: 16,\n shortcut: \"pr-1.5\",\n },\n md: {\n field: \"min-h-10\",\n input: \"px-3 py-2 text-md\",\n inputLeading: \"pl-10\",\n inputTrailing: \"pr-9\",\n iconLeading: \"left-3 w-5\",\n iconTrailing: \"right-3 w-4\",\n iconPx: 20,\n shortcut: \"pr-2\",\n },\n lg: {\n field: \"min-h-11\",\n input: \"px-3.5 py-2.5 text-md\",\n inputLeading: \"pl-10.5\",\n inputTrailing: \"pr-9.5\",\n iconLeading: \"left-3.5 w-5\",\n iconTrailing: \"right-3.5 w-4\",\n iconPx: 20,\n shortcut: \"pr-2.5\",\n },\n },\n});\n\n//////////////////////////////////////////////// INPUT GROUP / PREFIX / SELECT / NUMBER / TAGS / PAYMENT\n// Visual contract for native. Web keeps its own maps — do not change web.\n\nexport const inputGroupStyles = sortCx({\n /** Single outer shell — select/button addons only (Figma 85:1269). */\n shell: \"w-full flex-row items-stretch overflow-hidden rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n shellFocus: inputFocusRingShadow,\n shellInvalid: \"border-error_subtle\",\n shellInvalidFocus: inputErrorFocusRingShadow,\n shellDisabled: \"opacity-50\",\n row: \"w-full min-h-0 flex-row items-stretch\",\n /** Leading select/button segment — compact, flush (no divider). */\n addonLeading: \"shrink-0 flex-row items-stretch self-stretch\",\n /** Trailing button segment — left divider; trailing select stays flush. */\n addonTrailing: \"shrink-0 flex-row items-stretch self-stretch\",\n addonTrailingDivider: \"border-l border-solid border-primary\",\n prefixInline: \"shrink-0 flex-row items-center self-stretch text-tertiary\",\n fieldSlot: \"min-w-0 flex-1 flex-row items-stretch\",\n sizes: {\n sm: {\n shellMinH: \"min-h-9\",\n prefixInline: \"pl-3 pr-1.5 text-sm\",\n /** Input padding when leading select is present. */\n inputLeadingSelect: \"pl-2 pr-3 py-2 text-sm\",\n /** Input padding when trailing select + optional $ prefix. */\n inputTrailingSelect: \"pl-0 pr-2 py-2 text-sm\",\n inputTrailingSelectNoPrefix: \"pl-3 pr-2 py-2 text-sm\",\n inputTrailingButton: \"pl-3 pr-3 py-2 text-sm\",\n },\n md: {\n shellMinH: \"min-h-10\",\n prefixInline: \"pl-3 pr-2 text-md\",\n inputLeadingSelect: \"pl-2.5 pr-3 py-2 text-md\",\n inputTrailingSelect: \"pl-0 pr-2 py-2 text-md\",\n inputTrailingSelectNoPrefix: \"pl-3 pr-2 py-2 text-md\",\n inputTrailingButton: \"pl-3 pr-3 py-2 text-md\",\n },\n lg: {\n shellMinH: \"min-h-11\",\n prefixInline: \"pl-3.5 pr-2 text-md\",\n inputLeadingSelect: \"pl-3 pr-3.5 py-2.5 text-md\",\n inputTrailingSelect: \"pl-0 pr-2 py-2.5 text-md\",\n inputTrailingSelectNoPrefix: \"pl-3.5 pr-2 py-2.5 text-md\",\n inputTrailingButton: \"pl-3.5 pr-3.5 py-2.5 text-md\",\n },\n },\n});\n\nexport const inputPrefixStyles = sortCx({\n root: \"shrink-0 flex-row items-center self-stretch border border-solid border-primary bg-primary text-tertiary shadow-xs\",\n leading: \"rounded-l-lg rounded-r-none border-r-0\",\n trailing: \"rounded-r-lg rounded-l-none border-l-0\",\n sizes: {\n sm: \"min-h-9 px-3 py-2 text-sm\",\n md: \"min-h-10 px-3 py-2 text-md\",\n lg: \"min-h-11 px-3.5 py-2.5 text-md\",\n },\n});\n\n/**\n * NativeSelect trigger.\n * In-group: compact flush segment (web `in-data-input-wrapper` + leading/trailing).\n * Standalone: full bordered control.\n */\nexport const nativeSelectStyles = sortCx({\n root: \"relative flex-row items-center rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n /** Flex row + gap — avoid absolute chevron (unreliable height on RN). */\n rootInGroup: \"shrink-0 flex-row items-center self-stretch border-0 bg-transparent shadow-none\",\n label: \"font-medium text-primary\",\n labelInGroup: \"font-normal text-tertiary\",\n sizes: {\n sm: {\n root: \"min-h-9 gap-1 py-2 pl-3 pr-2.5\",\n rootInGroupLeading: \"gap-1 py-2 pl-3 pr-2\",\n rootInGroupTrailing: \"gap-1 py-2 pl-2.5 pr-2\",\n label: \"text-sm\",\n chevron: 14,\n },\n md: {\n root: \"min-h-10 gap-1 py-2 pl-3 pr-3\",\n rootInGroupLeading: \"gap-1 py-2 pl-3 pr-2.5\",\n rootInGroupTrailing: \"gap-1 py-2 pl-3 pr-3\",\n label: \"text-md\",\n chevron: 16,\n },\n lg: {\n root: \"min-h-11 gap-1.5 py-2.5 pl-3.5 pr-3\",\n rootInGroupLeading: \"gap-1.5 py-2.5 pl-3.5 pr-3\",\n rootInGroupTrailing: \"gap-1.5 py-2.5 pl-3 pr-3\",\n label: \"text-md\",\n chevron: 16,\n },\n },\n});\n\nexport const inputNumberStyles = sortCx({\n shell: \"w-full flex-row items-stretch overflow-hidden rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n shellFocus: inputFocusRingShadow,\n shellInvalid: \"border-error_subtle\",\n shellInvalidFocus: inputErrorFocusRingShadow,\n shellDisabled: \"opacity-50\",\n input: \"m-0 min-w-0 flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n verticalRail: \"flex-col items-stretch border-l border-solid border-primary\",\n verticalBtn: \"flex-1 items-center justify-center\",\n verticalBtnBorder: \"border-t border-solid border-primary\",\n sizes: {\n sm: { input: \"px-3 py-2 text-sm\", rail: \"w-7\" },\n md: { input: \"px-3 py-2 text-md\", rail: \"w-7\" },\n lg: { input: \"px-3.5 py-2.5 text-md\", rail: \"w-7.5\" },\n },\n});\n\n/**\n * Tags inside InputTags — mirrors web `components/base/tags` sizes.\n * InputTags maps lg → md tag size (same as web TagGroup).\n */\nexport const inputTagsStyles = sortCx({\n field: \"relative w-full flex-row flex-wrap items-center gap-1.5 rounded-lg border border-solid border-primary bg-primary shadow-xs\",\n fieldFocus: inputFocusRingShadow,\n fieldInvalid: \"border-error_subtle\",\n fieldInvalidFocus: inputErrorFocusRingShadow,\n fieldDisabled: \"opacity-50\",\n input: \"m-0 min-w-[80px] flex-1 bg-transparent text-primary placeholder:text-placeholder\",\n tag: \"flex-row items-center rounded-md border border-solid border-primary bg-primary\",\n tagLabel: \"font-medium text-secondary\",\n sizes: {\n sm: {\n field: \"min-h-10 gap-1.5 px-3 py-2\",\n fieldFilled: \"py-1.5 pl-2\",\n input: \"min-h-5 py-0.5 text-sm\",\n tag: \"min-h-6 gap-1 px-2 py-1\",\n tagLabel: \"text-xs\",\n tagClose: 10,\n iconTrailing: \"right-3\",\n },\n md: {\n field: \"min-h-11 gap-2 px-3 py-2\",\n fieldFilled: \"pl-2\",\n input: \"min-h-6 py-0.5 text-md\",\n tag: \"min-h-7 gap-1.25 px-2.5 py-1\",\n tagLabel: \"text-sm\",\n tagClose: 12,\n iconTrailing: \"right-3\",\n },\n lg: {\n field: \"min-h-12 gap-2 px-3.5 py-2.5\",\n fieldFilled: \"pl-2.5\",\n input: \"min-h-6 py-0.5 text-md\",\n /** Web InputTags uses md tags at lg field size. */\n tag: \"min-h-7 gap-1.25 px-2.5 py-1\",\n tagLabel: \"text-sm\",\n tagClose: 12,\n iconTrailing: \"right-3.5\",\n },\n },\n});\n\nexport const inputPaymentStyles = sortCx({\n /**\n * Wrapper only (native). Do not set `h-6` here — that plus `inset-y-0`\n * pins the 34×24 SVG to the top. Width beats the default `w-4`/`w-5` slot.\n */\n icon: \"w-[34px]\",\n sizes: {\n sm: { inputLeading: \"pl-12\", iconLeading: \"left-1.5\" },\n md: { inputLeading: \"pl-12.5\", iconLeading: \"left-2\" },\n lg: { inputLeading: \"pl-13\", iconLeading: \"left-2.5\" },\n },\n});\n\n/** Format card number in groups of 4 digits. */\nexport function formatCardNumber(number: string): string {\n const cleaned = number.replace(/\\D/g, \"\");\n const match = cleaned.match(/\\d{1,4}/g);\n return match ? match.join(\" \") : cleaned;\n}\n\nexport type PaymentCardBrand = \"visa\" | \"mastercard\" | \"amex\" | \"discover\" | \"unionpay\" | \"unknown\";\n\nconst PAYMENT_CARD_PATTERNS: { brand: PaymentCardBrand; pattern: RegExp }[] = [\n { brand: \"visa\", pattern: /^4[0-9]{3,}$/ },\n { brand: \"mastercard\", pattern: /^5[1-5][0-9]{2,}$/ },\n { brand: \"amex\", pattern: /^3[47][0-9]{2,}$/ },\n { brand: \"discover\", pattern: /^6(?:011|5[0-9]{2}|4[4-9][0-9])/ },\n { brand: \"unionpay\", pattern: /^(62|88)[0-9]{14,17}$/ },\n];\n\n/** Detect card brand from digits (spaces ignored). */\nexport function detectCardBrand(number: string): PaymentCardBrand {\n const sanitized = number.replace(/\\D/g, \"\");\n const match = PAYMENT_CARD_PATTERNS.find((entry) => entry.pattern.test(sanitized));\n return match?.brand ?? \"unknown\";\n}\n\n//////////////////////////////////////////////// WEB-ONLY STYLES\n// CSS focus rings, InputGroup shell chrome, transitions — not for NativeWind.\n\nexport const inputWebStyles = sortCx({\n field: {\n root: \"group/input flex place-content-center place-items-center transition-[border-color,box-shadow] duration-100 ease-linear\",\n focusCss: inputFocusRingShadowCss,\n invalidFocusCss: inputErrorFocusRingShadowCss,\n disabled: \"cursor-not-allowed opacity-50\",\n groupDisabled: \"group-disabled:cursor-not-allowed group-disabled:opacity-50\",\n invalid: \"border-error_subtle\",\n groupInvalid: \"group-invalid:border-error_subtle\",\n groupShell: inputGroupShellFieldClass,\n },\n input: \"w-full ring-0 outline-hidden autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed\",\n stack: \"group flex h-max w-full flex-col items-start justify-start gap-1.5\",\n iconLeading: \"pointer-events-none absolute text-fg-quaternary\",\n tooltipTrigger:\n \"absolute cursor-pointer text-fg-quaternary transition duration-100 ease-linear group-invalid/input:hidden hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n invalidIcon:\n \"pointer-events-none absolute hidden size-4 stroke-[2.25px] text-fg-error-secondary group-invalid/input:block\",\n passwordToggle:\n \"absolute flex cursor-pointer items-center justify-center text-fg-quaternary transition duration-100 ease-linear hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover focus:outline-hidden\",\n shortcutWrap:\n \"pointer-events-none absolute inset-y-0.5 right-0.5 z-10 hidden items-center rounded-r-[inherit] bg-linear-to-r from-transparent to-bg-primary to-40% pl-8 md:flex\",\n shortcutKey:\n \"pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset\",\n sizes: {\n sm: {\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n },\n md: {\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n },\n lg: {\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n },\n },\n});\n\n/** Exact strings from web `label.tsx` / `hint-text.tsx`. */\nexport const inputWebLabelStyles = sortCx({\n root: \"flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary\",\n required: \"hidden text-brand-tertiary\",\n requiredVisible: \"block\",\n requiredGroup: \"group-required:block\",\n requiredInvalid: \"text-error-primary\",\n requiredGroupInvalid: \"group-invalid:text-error-primary\",\n tooltipTrigger:\n \"cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover\",\n tooltipIcon: \"size-4\",\n});\n\nexport const inputWebHintStyles = sortCx({\n root: \"text-sm text-tertiary\",\n sm: \"text-xs\",\n inSm: \"in-data-[input-size=sm]:text-xs\",\n invalid: \"text-error-primary\",\n groupInvalid: \"group-invalid:text-error-primary\",\n});\n\n/** Exact padding maps from web `input-date.tsx`. */\nexport const inputDateWebSizes = sortCx({\n sm: {\n root: \"px-3 py-2 text-sm\",\n iconLeading: \"left-3 size-4 stroke-[2.25px]\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2.5\",\n trailing: \"pr-9\",\n leading: \"pl-8.5\",\n },\n md: {\n root: \"px-3 py-2 text-md\",\n iconLeading: \"left-3 size-5\",\n iconTrailing: \"right-3\",\n shortcut: \"pr-2.5\",\n trailing: \"pr-9\",\n leading: \"pl-10\",\n },\n lg: {\n root: \"px-3.5 py-2.5 text-md\",\n iconLeading: \"left-3.5 size-5\",\n iconTrailing: \"right-3.5\",\n shortcut: \"pr-3\",\n trailing: \"pr-9.5\",\n leading: \"pl-10.5\",\n },\n});\n\nexport const inputDateWebSegment =\n \"rounded px-0.5 text-primary tabular-nums caret-transparent focus:bg-brand-solid focus:font-medium focus:text-white focus:outline-hidden\";\n\n/** Exact padding maps from web `input-tags.tsx`. */\nexport const inputTagsWebSizes = sortCx({\n sm: { root: \"gap-2 px-3 py-2 text-sm\", rootFilled: \"py-1.5 pl-2\", trailing: \"pr-9\", iconTrailing: \"right-3\" },\n md: { root: \"gap-2 px-3 py-2 text-md\", rootFilled: \"pl-2\", trailing: \"pr-9\", iconTrailing: \"right-3\" },\n lg: { root: \"gap-2 px-3.5 py-2.5 text-md\", rootFilled: \"pl-2.5\", trailing: \"pr-9.5\", iconTrailing: \"right-3.5\" },\n});\n\n/** Exact strings from web `select-native.tsx`. */\nexport const nativeSelectWebStyles = sortCx({\n wrap: \"w-full in-data-input-wrapper:w-max\",\n label: \"mb-1.5\",\n grid: \"relative grid w-full in-data-input-wrapper:w-max items-center\",\n select: [\n \"appearance-none rounded-lg border border-solid border-primary bg-primary font-medium text-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear placeholder:text-fg-quaternary disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-none focus-visible:border-brand focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-brand\",\n \"aria-invalid:border-error_subtle aria-invalid:focus-visible:border-error aria-invalid:focus-visible:ring-1 aria-invalid:focus-visible:ring-inset aria-invalid:focus-visible:ring-error\",\n \"in-data-input-wrapper:border-0 in-data-input-wrapper:bg-transparent in-data-input-wrapper:shadow-none\",\n \"in-data-input-wrapper:focus-visible:border-0 in-data-input-wrapper:focus-visible:ring-0\",\n \"in-data-input-wrapper:aria-invalid:border-0 in-data-input-wrapper:aria-invalid:ring-0 in-data-input-wrapper:group-invalid:border-0 in-data-input-wrapper:group-invalid:ring-0\",\n \"in-data-input-wrapper:h-full in-data-input-wrapper:font-normal in-data-input-wrapper:text-tertiary in-data-input-wrapper:in-data-[size=sm]:text-sm\",\n \"in-data-input-wrapper:group-disabled:pointer-events-none in-data-input-wrapper:group-disabled:cursor-not-allowed in-data-input-wrapper:group-disabled:bg-transparent\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-leading:rounded-none in-data-input-wrapper:in-data-leading:pl-3 in-data-input-wrapper:in-data-leading:pr-7 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pl-3.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pr-8 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pl-3 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pr-6.5\",\n \"in-data-input-wrapper:in-data-trailing:rounded-none in-data-input-wrapper:in-data-trailing:in-data-[input-size=lg]:pr-8 in-data-input-wrapper:in-data-trailing:in-data-[input-size=md]:pr-7.5 in-data-input-wrapper:in-data-trailing:in-data-[input-size=sm]:pr-6.5\",\n ].join(\" \"),\n chevron: \"pointer-events-none absolute text-fg-quaternary\",\n chevronInGroup: [\n \"in-data-input-wrapper:size-4 in-data-input-wrapper:stroke-[2.625px]\",\n \"in-data-input-wrapper:in-data-leading:right-2.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:right-2 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:right-3\",\n \"in-data-input-wrapper:in-data-trailing:right-3 in-data-input-wrapper:in-data-trailing:in-data-[input-size=sm]:right-3\",\n ].join(\" \"),\n hint: \"mt-2\",\n sizes: {\n sm: { root: \"py-2 pl-3 text-sm\", icon: \"size-4 right-2.5 stroke-[2.25px]\" },\n md: { root: \"py-2 pl-3 text-md\", icon: \"size-4 stroke-[2.25px] right-3\" },\n lg: { root: \"py-2.5 px-3.5 text-md\", icon: \"size-5 right-3\" },\n },\n});\n\n/** Exact shell strings from web `input-group.tsx`. */\nexport const inputGroupWebShellBorderClass =\n \"has-[select]:border has-[select]:border-solid has-[select]:border-primary has-[select]:shadow-xs has-[section[data-trailing]_button]:border has-[section[data-trailing]_button]:border-solid has-[section[data-trailing]_button]:border-primary has-[section[data-trailing]_button]:shadow-xs has-[section[data-leading]_button]:border has-[section[data-leading]_button]:border-solid has-[section[data-leading]_button]:border-primary has-[section[data-leading]_button]:shadow-xs\";\n\nexport const inputGroupWebShellFocusClass = [\n \"has-[select]:focus-within:after:pointer-events-none has-[select]:focus-within:after:absolute has-[select]:focus-within:after:-inset-px has-[select]:focus-within:after:z-10 has-[select]:focus-within:after:rounded-lg has-[select]:focus-within:after:border has-[select]:focus-within:after:border-solid has-[select]:focus-within:after:border-brand has-[select]:focus-within:after:ring-1 has-[select]:focus-within:after:ring-inset has-[select]:focus-within:after:ring-brand has-[select]:focus-within:after:content-['']\",\n \"has-[section[data-trailing]_button]:focus-within:after:pointer-events-none has-[section[data-trailing]_button]:focus-within:after:absolute has-[section[data-trailing]_button]:focus-within:after:-inset-px has-[section[data-trailing]_button]:focus-within:after:z-10 has-[section[data-trailing]_button]:focus-within:after:rounded-lg has-[section[data-trailing]_button]:focus-within:after:border has-[section[data-trailing]_button]:focus-within:after:border-solid has-[section[data-trailing]_button]:focus-within:after:border-brand has-[section[data-trailing]_button]:focus-within:after:ring-1 has-[section[data-trailing]_button]:focus-within:after:ring-inset has-[section[data-trailing]_button]:focus-within:after:ring-brand has-[section[data-trailing]_button]:focus-within:after:content-['']\",\n \"has-[section[data-leading]_button]:focus-within:after:pointer-events-none has-[section[data-leading]_button]:focus-within:after:absolute has-[section[data-leading]_button]:focus-within:after:-inset-px has-[section[data-leading]_button]:focus-within:after:z-10 has-[section[data-leading]_button]:focus-within:after:rounded-lg has-[section[data-leading]_button]:focus-within:after:border has-[section[data-leading]_button]:focus-within:after:border-solid has-[section[data-leading]_button]:focus-within:after:border-brand has-[section[data-leading]_button]:focus-within:after:ring-1 has-[section[data-leading]_button]:focus-within:after:ring-inset has-[section[data-leading]_button]:focus-within:after:ring-brand has-[section[data-leading]_button]:focus-within:after:content-['']\",\n].join(\" \");\n\nexport const inputGroupWebShellInvalidClass = [\n \"has-[select]:border-error_subtle has-[section[data-trailing]_button]:border-error_subtle has-[section[data-leading]_button]:border-error_subtle\",\n \"has-[select]:focus-within:after:pointer-events-none has-[select]:focus-within:after:absolute has-[select]:focus-within:after:-inset-px has-[select]:focus-within:after:z-10 has-[select]:focus-within:after:rounded-lg has-[select]:focus-within:after:border has-[select]:focus-within:after:border-solid has-[select]:focus-within:after:border-error has-[select]:focus-within:after:ring-1 has-[select]:focus-within:after:ring-inset has-[select]:focus-within:after:ring-error has-[select]:focus-within:after:content-['']\",\n \"has-[section[data-trailing]_button]:focus-within:after:pointer-events-none has-[section[data-trailing]_button]:focus-within:after:absolute has-[section[data-trailing]_button]:focus-within:after:-inset-px has-[section[data-trailing]_button]:focus-within:after:z-10 has-[section[data-trailing]_button]:focus-within:after:rounded-lg has-[section[data-trailing]_button]:focus-within:after:border has-[section[data-trailing]_button]:focus-within:after:border-solid has-[section[data-trailing]_button]:focus-within:after:border-error has-[section[data-trailing]_button]:focus-within:after:ring-1 has-[section[data-trailing]_button]:focus-within:after:ring-inset has-[section[data-trailing]_button]:focus-within:after:ring-error has-[section[data-trailing]_button]:focus-within:after:content-['']\",\n \"has-[section[data-leading]_button]:focus-within:after:pointer-events-none has-[section[data-leading]_button]:focus-within:after:absolute has-[section[data-leading]_button]:focus-within:after:-inset-px has-[section[data-leading]_button]:focus-within:after:z-10 has-[section[data-leading]_button]:focus-within:after:rounded-lg has-[section[data-leading]_button]:focus-within:after:border has-[section[data-leading]_button]:focus-within:after:border-solid has-[section[data-leading]_button]:focus-within:after:border-error has-[section[data-leading]_button]:focus-within:after:ring-1 has-[section[data-leading]_button]:focus-within:after:ring-inset has-[section[data-leading]_button]:focus-within:after:ring-error has-[section[data-leading]_button]:focus-within:after:content-['']\",\n].join(\" \");\n\nexport const inputGroupWebStyles = sortCx({\n prefix: [\n \"flex h-full shrink-0 items-center self-stretch border border-solid border-primary bg-primary text-tertiary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear\",\n \"in-data-input-wrapper:group-invalid:border-error_subtle in-data-input-wrapper:group-invalid:group-focus-within:border-error\",\n \"in-data-input-wrapper:in-data-leading:-mr-px in-data-input-wrapper:in-data-leading:rounded-l-lg in-data-input-wrapper:in-data-leading:rounded-r-none in-data-input-wrapper:in-data-leading:border-r-0\",\n \"in-data-input-wrapper:in-data-trailing:-ml-px in-data-input-wrapper:in-data-trailing:rounded-r-lg in-data-input-wrapper:in-data-trailing:rounded-l-none in-data-input-wrapper:in-data-trailing:border-l-0\",\n \"px-3 py-2 text-md\",\n \"in-data-input-wrapper:in-data-[input-size=sm]:px-3 in-data-input-wrapper:in-data-[input-size=sm]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:px-3.5 in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=lg]:text-md\",\n ].join(\" \"),\n shell: \"group relative h-max w-full rounded-lg bg-primary transition-[border-color,box-shadow] duration-100 ease-linear\",\n row: \"flex w-full flex-row items-stretch rounded-[inherit]\",\n rowClip: \"has-[section[data-trailing]]:overflow-clip has-[section[data-leading]_button]:overflow-clip has-[section[data-leading]_select]:overflow-clip\",\n leading: \"flex shrink-0 self-stretch group-disabled:opacity-50 *:h-full\",\n trailing: \"flex shrink-0 self-stretch group-disabled:opacity-50 *:h-full\",\n prefixInline: \"my-auto grow group-disabled:opacity-50\",\n prefixText: \"text-md text-tertiary\",\n disabled: \"cursor-not-allowed\",\n});\n\n//////////////////////////////////////////////// EMAIL / PHONE / CONTACT\n// Exact web class strings. Native maps skip CSS-only selectors.\n\nexport const emailSuggestionWebStyles = sortCx({\n stack: \"flex w-full flex-col\",\n reveal: \"grid transition-[grid-template-rows] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]\",\n revealOpen: \"grid-rows-[1fr]\",\n revealClosed: \"grid-rows-[0fr]\",\n revealInner: \"min-h-0 overflow-hidden\",\n chips: \"flex flex-wrap gap-1.5 px-1 pt-1.5 pb-1\",\n chipActive: \"ring-1 ring-brand ring-inset\",\n});\n\nexport const emailTypoHintWebStyles = sortCx({\n row: \"inline-flex flex-wrap items-center gap-x-1.5 gap-y-0.5\",\n apply: \"text-brand-secondary hover:text-brand-secondary_hover shrink-0 cursor-pointer font-normal underline decoration-transparent underline-offset-2 outline-none hover:decoration-current focus-visible:rounded-sm focus-visible:ring-2 focus-visible:ring-brand\",\n});\n\nexport const emailSuggestionStyles = sortCx({\n stack: \"w-full flex-col\",\n chips: \"absolute left-0 right-0 top-0 flex-row flex-wrap gap-1.5 px-1 pt-1.5 pb-1\",\n chipActive: \"ring-1 ring-brand ring-inset\",\n});\n\nexport const emailTypoHintStyles = sortCx({\n row: \"flex-row flex-wrap items-center gap-x-1.5 gap-y-0.5\",\n apply: \"text-brand-secondary font-medium underline\",\n});\n\nexport const phoneCountryWebStyles = sortCx({\n trigger: [\n \"relative flex w-full cursor-pointer items-center gap-1.5 rounded-lg border border-solid border-primary bg-primary font-medium text-primary shadow-xs outline-hidden transition-[border-color,box-shadow] duration-100 ease-linear\",\n \"in-data-input-wrapper:border-0 in-data-input-wrapper:bg-transparent in-data-input-wrapper:shadow-none\",\n \"in-data-input-wrapper:focus-visible:border-0 in-data-input-wrapper:focus-visible:ring-0\",\n \"in-data-input-wrapper:h-full in-data-input-wrapper:font-normal in-data-input-wrapper:text-tertiary\",\n \"in-data-input-wrapper:group-disabled:pointer-events-none in-data-input-wrapper:group-disabled:cursor-not-allowed in-data-input-wrapper:group-disabled:bg-transparent\",\n \"in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm\",\n \"in-data-input-wrapper:in-data-leading:rounded-none in-data-input-wrapper:in-data-leading:pl-3 in-data-input-wrapper:in-data-leading:pr-6.5\",\n \"in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pl-3.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:pr-7\",\n \"in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pl-3 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:pr-6.5\",\n ].join(\" \"),\n triggerFocus: \"border-brand ring-1 ring-inset ring-brand\",\n triggerDisabled: \"cursor-not-allowed opacity-50\",\n flag: \"inline-flex h-5 shrink-0 items-center justify-center text-base leading-none translate-y-px\",\n sheetFlag: \"inline-flex h-5 shrink-0 items-center justify-center text-base leading-none translate-y-[2px]\",\n dial: \"text-sm font-medium text-primary in-data-input-wrapper:text-tertiary\",\n placeholder: \"text-sm text-placeholder\",\n chevron: \"pointer-events-none absolute text-fg-quaternary\",\n chevronInGroup: [\n \"in-data-input-wrapper:size-4 in-data-input-wrapper:stroke-[2.625px]\",\n \"in-data-input-wrapper:in-data-leading:right-1.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=sm]:right-1.5 in-data-input-wrapper:in-data-leading:in-data-[input-size=lg]:right-2\",\n ].join(\" \"),\n searchField: \"flex shrink-0 gap-3 border-b border-secondary px-3\",\n searchFieldMobile: \"pb-3 pt-2\",\n searchFieldDesktop: \"p-3\",\n list: \"min-h-0 flex-1 overflow-y-auto py-1 outline-hidden\",\n empty: \"px-3 py-6 text-center text-sm text-tertiary\",\n sectionHeader: \"px-3 py-1.5 text-xs font-medium text-tertiary\",\n sizes: {\n sm: { root: \"py-2 pl-3 pr-7 text-sm\", chevron: \"size-4 right-1.5 stroke-[2.625px]\", listMax: \"max-h-56\" },\n md: { root: \"py-2 pl-3 pr-6.5 text-md\", chevron: \"size-4 stroke-[2.625px] right-1.5\", listMax: \"max-h-64\" },\n lg: { root: \"py-2.5 pl-3.5 pr-7 text-md\", chevron: \"size-4 right-2 stroke-[2.625px]\", listMax: \"max-h-72\" },\n },\n});\n\nexport const phoneCountryStyles = sortCx({\n flagWrap: \"h-5 items-center justify-center\",\n flag: \"text-base leading-none translate-y-px\",\n dial: \"text-sm font-medium text-tertiary\",\n row: \"flex-row items-center gap-1.5\",\n sheet: \"flex-1 bg-primary pt-2.5\",\n header: \"flex-row items-center px-4 py-3\",\n headerSide: \"z-10 min-w-10 flex-1\",\n headerTitle: \"text-lg font-semibold text-primary\",\n headerClose: \"z-10 min-w-10 flex-1 flex-row items-center justify-end p-1\",\n body: \"min-h-0 flex-1 flex-col\",\n searchWrap: \"mb-4 px-4\",\n listRow: \"min-h-0 flex-1 flex-row\",\n listPane: \"min-h-0 flex-1 pr-5\",\n listContentSearch: \"pt-2\",\n alphabet: \"absolute top-0 right-1 bottom-0 w-8 items-center justify-center py-2\",\n alphabetItem: \"min-h-5 items-center justify-center px-2 py-0.5\",\n alphabetLabel: \"text-xs font-semibold text-secondary\",\n sectionTitle: \"mt-4 mb-2 px-4 text-md font-semibold text-primary\",\n separator: \"my-4 h-px bg-secondary\",\n item: \"flex-row items-center border-b border-solid border-secondary px-4 py-2\",\n itemSelected: \"bg-secondary\",\n sheetFlagWrap: \"mr-4 h-6 items-center justify-center\",\n sheetFlag: \"text-2xl leading-none translate-y-[2px]\",\n itemName: \"min-w-0 flex-1 text-md font-medium text-primary\",\n itemDial: \"ml-2 text-md font-semibold text-secondary\",\n letterHeader: \"mt-2 bg-primary px-4 py-1\",\n letterHeaderText: \"text-sm font-medium uppercase tracking-wide text-tertiary\",\n empty: \"px-3 py-6 text-center text-sm text-tertiary\",\n});\n\nexport const contactAddonWebStyles = sortCx({\n motionHost: \"h-full overflow-hidden\",\n inner: \"flex h-full w-max items-stretch pr-px\",\n});\n\nexport const contactAddonStyles = sortCx({\n inner: \"absolute bottom-0 left-0 top-0 h-full flex-row items-stretch pr-px\",\n});\n","import { sortCx } from \"./cx\";\nimport { inputErrorFocusRingShadow, inputFocusRingShadow } from \"./input\";\n\n//////////////////////////////////////////////// TYPES\n\nexport const TEXTAREA_SIZES = [\"sm\", \"md\"] as const;\nexport type TextAreaSize = (typeof TEXTAREA_SIZES)[number];\n\n//////////////////////////////////////////////// SHARED STYLES\n// Exact web class strings. Native map skips CSS-only selectors (autofill, resizer).\n\nexport const textareaWebStyles = sortCx({\n stack: \"flex flex-col gap-1.5\",\n root: \"w-full scroll-py-3 rounded-lg border border-solid border-primary bg-primary text-primary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear placeholder:text-placeholder autofill:rounded-lg autofill:text-primary focus:outline-hidden\",\n resizer:\n \"[&::-webkit-resizer]:bg-(image:--resize-handle-bg) [&::-webkit-resizer]:bg-contain dark:[&::-webkit-resizer]:bg-(image:--resize-handle-bg-dark)\",\n focus: inputFocusRingShadow,\n disabled: \"cursor-not-allowed opacity-50\",\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n sizes: {\n sm: \"p-3 text-sm\",\n // Explicit pt/pb — `py-*` can lose vertical padding on Textarea/TextInput.\n md: \"px-3.5 pt-3 pb-3 text-md\",\n },\n});\n\nexport const textareaStyles = sortCx({\n stack: \"w-full flex-col gap-1.5\",\n field: \"w-full rounded-lg border border-solid border-primary bg-primary text-primary shadow-xs placeholder:text-placeholder\",\n focus: inputFocusRingShadow,\n disabled: \"opacity-50\",\n invalid: \"border-error_subtle\",\n invalidFocus: inputErrorFocusRingShadow,\n sizes: {\n sm: \"min-h-24 p-3 text-sm\",\n // Explicit pt/pb — `py-*` can lose vertical padding on Textarea/TextInput.\n md: \"min-h-28 px-3.5 pt-3 pb-3 text-md\",\n },\n});\n","import {\n createContext,\n forwardRef,\n useContext,\n useState,\n type ComponentType,\n type FC,\n type ReactNode,\n} from \"react\";\nimport { Platform, type TextInput as RNTextInput, type TextInputProps } from \"react-native\";\nimport { useNativeVariable } from \"react-native-css\";\nimport { Pressable, Text, TextInput, View } from \"react-native-css/components\";\nimport { EyeIcon } from \"phosphor-react-native/src/icons/Eye\";\nimport { EyeSlashIcon } from \"phosphor-react-native/src/icons/EyeSlash\";\nimport { InfoIcon } from \"phosphor-react-native/src/icons/Info\";\nimport { QuestionIcon } from \"phosphor-react-native/src/icons/Question\";\nimport { inputGroupStyles, inputStyles, type InputSize, type InputType } from \"@avenue-ticketing/core/input\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\n\nexport type { InputSize, InputType };\n\n//////////////////////////////////////////////// CONTEXT\n\nexport type InputGroupChrome = {\n size: InputSize;\n isDisabled: boolean;\n isInvalid: boolean;\n /** Shell owns border — strip InputBase chrome (select/button addons). */\n shellOwnsChrome: boolean;\n /** Join against a Prefix segment (square the shared edge). */\n joinLeadingPrefix?: boolean;\n hasLeadingSelect?: boolean;\n hasTrailingSelect?: boolean;\n hasTrailingButton?: boolean;\n hasPrefix?: boolean;\n selectPosition?: \"leading\" | \"trailing\" | null;\n};\n\nexport const InputGroupContext = createContext<InputGroupChrome | null>(null);\nexport const useInputGroupContext = () => useContext(InputGroupContext);\n\n/** Bubbles TextInput focus to InputGroup shell. */\nexport const ShellFocusContext = createContext<((focused: boolean) => void) | null>(null);\nexport const useShellFocus = () => useContext(ShellFocusContext);\n\n//////////////////////////////////////////////// TYPES\n\nexport interface LabelProps {\n children: ReactNode;\n isRequired?: boolean;\n isInvalid?: boolean;\n className?: string;\n}\n\nexport interface HintTextProps {\n children: ReactNode;\n isInvalid?: boolean;\n size?: InputSize;\n className?: string;\n}\n\nexport interface InputBaseProps {\n size?: InputSize;\n type?: InputType;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n isDisabled?: boolean;\n isInvalid?: boolean;\n tooltip?: string;\n icon?: ComponentType<{ className?: string; size?: number; color?: string }>;\n autoCapitalize?: \"none\" | \"sentences\" | \"words\" | \"characters\";\n keyboardType?: \"default\" | \"email-address\" | \"numeric\" | \"phone-pad\" | \"url\";\n /** iOS QuickType / autofill token. */\n textContentType?: TextInputProps[\"textContentType\"];\n /** Android autofill hint. */\n autoComplete?: TextInputProps[\"autoComplete\"];\n autoCorrect?: boolean;\n autoFocus?: boolean;\n returnKeyType?: TextInputProps[\"returnKeyType\"];\n editable?: boolean;\n className?: string;\n inputClassName?: string;\n wrapperClassName?: string;\n iconClassName?: string;\n onChangeText?: (text: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n onPress?: () => void;\n onSubmitEditing?: () => void;\n}\n\nexport interface InputProps extends InputBaseProps {\n label?: string;\n hint?: ReactNode;\n isRequired?: boolean;\n hideRequiredIndicator?: boolean;\n}\n\n//////////////////////////////////////////////// HELPERS\n\n/**\n * Android `paddingVertical: 0` (glyph centering) drops className `px-*` on\n * EditText — value and placeholder sit flush left. iOS keeps the utilities.\n */\nconst androidInputPad = (size: InputSize, leading: boolean, trailing: boolean) => {\n if (Platform.OS !== \"android\") return undefined;\n const x = size === \"lg\" ? 14 : 12;\n return {\n paddingStart: leading ? (size === \"sm\" ? 36 : size === \"lg\" ? 42 : 40) : x,\n paddingEnd: trailing ? (size === \"lg\" ? 38 : 36) : x,\n };\n};\n\nexport const Label: FC<LabelProps> = ({ children, isRequired, isInvalid, className }) => {\n return (\n <View className={cx(inputStyles.labelRow, className)}>\n <Text className={inputStyles.label}>{children}</Text>\n {isRequired && (\n <Text className={isInvalid ? inputStyles.requiredInvalid : inputStyles.required}>*</Text>\n )}\n </View>\n );\n};\n\nexport const HintText: FC<HintTextProps> = ({ children, isInvalid, size, className }) => {\n if (children == null || children === false) return null;\n if (typeof children !== \"string\" && typeof children !== \"number\") {\n return <>{children}</>;\n }\n return (\n <Text\n className={cx(\n inputStyles.hint,\n size === \"sm\" && inputStyles.hintSm,\n isInvalid && inputStyles.hintInvalid,\n className,\n )}\n >\n {children}\n </Text>\n );\n};\n\n//////////////////////////////////////////////// MAIN\n\nexport const InputBase = forwardRef<RNTextInput, InputBaseProps>(function InputBase(\n {\n size: sizeProp = \"md\",\n type = \"text\",\n placeholder,\n value,\n defaultValue,\n isDisabled: isDisabledProp = false,\n isInvalid: isInvalidProp = false,\n tooltip,\n icon: Icon,\n autoCapitalize,\n keyboardType,\n textContentType: textContentTypeProp,\n autoComplete: autoCompleteProp,\n autoCorrect: autoCorrectProp,\n autoFocus,\n returnKeyType,\n editable,\n className,\n inputClassName,\n wrapperClassName,\n iconClassName,\n onChangeText,\n onFocus,\n onBlur,\n onPress,\n onSubmitEditing,\n },\n ref,\n) {\n const group = useInputGroupContext();\n const setShellFocus = useShellFocus();\n const size = group?.size ?? sizeProp;\n const isDisabled = Boolean(group?.isDisabled || isDisabledProp);\n const isInvalid = Boolean(group?.isInvalid || isInvalidProp);\n const shellOwnsChrome = Boolean(group?.shellOwnsChrome);\n const joinLeadingPrefix = Boolean(group?.joinLeadingPrefix);\n const groupPad = group ? inputGroupStyles.sizes[size] : null;\n\n const groupInputPad =\n groupPad && group?.hasLeadingSelect\n ? groupPad.inputLeadingSelect\n : groupPad && group?.hasTrailingSelect\n ? group?.hasPrefix\n ? groupPad.inputTrailingSelect\n : groupPad.inputTrailingSelectNoPrefix\n : groupPad && group?.hasTrailingButton\n ? groupPad.inputTrailingButton\n : null;\n\n const [isFocused, setIsFocused] = useState(false);\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const isPassword = type === \"password\";\n const hasLeadingIcon = Boolean(Icon);\n const hasTrailingIcon = Boolean(tooltip) || isInvalid || isPassword;\n const sizeStyles = inputStyles.sizes[size];\n const fgQuaternary = useNativeVariable(\"--color-fg-quaternary\") ?? \"#a4a7ae\";\n const fgErrorSecondary = useNativeVariable(\"--color-fg-error-secondary\") ?? \"#f04438\";\n\n const handleFocus = () => {\n setIsFocused(true);\n setShellFocus?.(true);\n onFocus?.();\n };\n const handleBlur = () => {\n setIsFocused(false);\n setShellFocus?.(false);\n onBlur?.();\n };\n\n const field = (\n <View\n className={cx(\n shellOwnsChrome\n ? \"relative isolate min-w-0 flex-1 flex-row items-center self-stretch bg-transparent\"\n : cx(inputStyles.field.root, sizeStyles.field),\n joinLeadingPrefix && !shellOwnsChrome && \"rounded-l-none\",\n !shellOwnsChrome && isFocused && !isInvalid && inputStyles.field.focus,\n !shellOwnsChrome && isInvalid && inputStyles.field.invalid,\n !shellOwnsChrome && isInvalid && isFocused && inputStyles.field.invalidFocus,\n !shellOwnsChrome && isDisabled && inputStyles.field.disabled,\n wrapperClassName,\n className,\n )}\n >\n {Icon && (\n <View\n pointerEvents=\"none\"\n className={cx(inputStyles.iconLeading, iconClassName ?? sizeStyles.iconLeading)}\n >\n <Icon className=\"text-fg-quaternary\" size={sizeStyles.iconPx} color={fgQuaternary} />\n </View>\n )}\n\n <TextInput\n ref={ref}\n accessibilityLabel={placeholder}\n editable={editable ?? !isDisabled}\n placeholder={placeholder}\n value={value}\n defaultValue={defaultValue}\n secureTextEntry={isPassword && !isPasswordVisible}\n autoCapitalize={autoCapitalize ?? (type === \"email\" ? \"none\" : undefined)}\n autoCorrect={autoCorrectProp ?? type !== \"email\"}\n autoFocus={autoFocus}\n returnKeyType={returnKeyType}\n keyboardType={keyboardType ?? (type === \"email\" ? \"email-address\" : \"default\")}\n textContentType={\n textContentTypeProp ??\n (isPassword ? \"password\" : type === \"email\" ? \"emailAddress\" : undefined)\n }\n autoComplete={\n autoCompleteProp ?? (type === \"email\" ? \"email\" : isPassword ? \"password\" : undefined)\n }\n onChangeText={onChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onSubmitEditing={onSubmitEditing}\n blurOnSubmit={onSubmitEditing ? false : undefined}\n style={{\n includeFontPadding: false,\n paddingVertical: 0,\n ...androidInputPad(size, hasLeadingIcon, hasTrailingIcon),\n }}\n className={cx(\n inputStyles.input,\n groupInputPad ?? sizeStyles.input,\n !groupInputPad && hasLeadingIcon && sizeStyles.inputLeading,\n !groupInputPad && hasTrailingIcon && sizeStyles.inputTrailing,\n // Tooltip / invalid icon still need trailing room inside a group shell.\n groupInputPad && hasTrailingIcon && \"pr-9\",\n inputClassName,\n )}\n />\n\n {isPassword && (\n <Pressable\n accessibilityRole=\"button\"\n accessibilityLabel=\"Toggle password visibility\"\n disabled={isDisabled}\n onPress={() => setIsPasswordVisible((visible) => !visible)}\n className={cx(inputStyles.iconTrailing, sizeStyles.iconTrailing)}\n >\n {isPasswordVisible ? (\n <EyeSlashIcon size={sizeStyles.iconPx} weight=\"bold\" color={fgQuaternary} />\n ) : (\n <EyeIcon size={sizeStyles.iconPx} weight=\"bold\" color={fgQuaternary} />\n )}\n </Pressable>\n )}\n\n {!isPassword && isInvalid && (\n <View pointerEvents=\"none\" className={cx(inputStyles.iconInvalid, sizeStyles.iconTrailing)}>\n <InfoIcon size={16} weight=\"bold\" color={fgErrorSecondary} />\n </View>\n )}\n\n {!isPassword && tooltip && !isInvalid && (\n <View pointerEvents=\"none\" className={cx(inputStyles.iconTrailing, sizeStyles.iconTrailing)}>\n <QuestionIcon size={16} weight=\"bold\" color={fgQuaternary} />\n </View>\n )}\n </View>\n );\n\n if (onPress) {\n return (\n <Pressable accessibilityRole=\"button\" disabled={isDisabled} onPress={onPress} className=\"min-w-0 flex-1\">\n {field}\n </Pressable>\n );\n }\n\n return field;\n});\n\nexport const Input: FC<InputProps> = ({\n label,\n hint,\n isRequired = false,\n hideRequiredIndicator = false,\n isInvalid = false,\n isDisabled = false,\n size = \"md\",\n className,\n ...baseProps\n}) => {\n const showRequired = Boolean(label) && isRequired && !hideRequiredIndicator;\n\n return (\n <View className={cx(inputStyles.stack, className)}>\n {label && (\n <Label isRequired={showRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n <InputBase size={size} isInvalid={isInvalid} isDisabled={isDisabled} {...baseProps} />\n {hint != null && hint !== false && hint !== \"\" && (\n <HintText isInvalid={isInvalid} size={size}>\n {hint}\n </HintText>\n )}\n </View>\n );\n};\n\nInput.displayName = \"Input\";\nInputBase.displayName = \"InputBase\";\n","import { useState, type FC, type ReactNode } from \"react\";\nimport { TextInput, View } from \"react-native-css/components\";\nimport { textareaStyles, type TextAreaSize } from \"@avenue-ticketing/core/textarea\";\nimport { cx } from \"@avenue-ticketing/core/cx\";\nimport { HintText, Label } from \"../input/input\";\n\nexport type { TextAreaSize };\n\n//////////////////////////////////////////////// TYPES\n\nexport interface TextAreaProps {\n size?: TextAreaSize;\n label?: string;\n hint?: ReactNode;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n rows?: number;\n isDisabled?: boolean;\n isInvalid?: boolean;\n isRequired?: boolean;\n hideRequiredIndicator?: boolean;\n className?: string;\n onChangeText?: (value: string) => void;\n}\n\n//////////////////////////////////////////////// CONSTANTS\n\n/** Web type scale line-heights, plus the field's vertical padding. */\nconst ROW_HEIGHT_PX: Record<TextAreaSize, { line: number; pad: number }> = {\n sm: { line: 20, pad: 24 },\n md: { line: 24, pad: 24 },\n};\n\n//////////////////////////////////////////////// MAIN\n\nexport const TextArea: FC<TextAreaProps> = ({\n size = \"md\",\n label,\n hint,\n placeholder,\n value,\n defaultValue,\n rows,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n hideRequiredIndicator = false,\n className,\n onChangeText,\n}) => {\n const [isFocused, setIsFocused] = useState(false);\n const showRequired = Boolean(label) && isRequired && !hideRequiredIndicator;\n const sizeClass = textareaStyles.sizes[size];\n const rowHeight = rows ? rows * ROW_HEIGHT_PX[size].line + ROW_HEIGHT_PX[size].pad : undefined;\n\n return (\n <View className={cx(textareaStyles.stack, className)}>\n {label && (\n <Label isRequired={showRequired} isInvalid={isInvalid}>\n {label}\n </Label>\n )}\n <TextInput\n accessibilityLabel={typeof label === \"string\" ? label : placeholder}\n editable={!isDisabled}\n multiline\n numberOfLines={rows}\n placeholder={placeholder}\n value={value}\n defaultValue={defaultValue}\n textAlignVertical=\"top\"\n onChangeText={onChangeText}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n style={rowHeight ? { minHeight: rowHeight } : undefined}\n className={cx(\n textareaStyles.field,\n sizeClass,\n isFocused && !isInvalid && textareaStyles.focus,\n isInvalid && !isFocused && textareaStyles.invalid,\n isInvalid && isFocused && textareaStyles.invalidFocus,\n isDisabled && textareaStyles.disabled,\n )}\n />\n {hint != null && hint !== false && hint !== \"\" && (\n <HintText isInvalid={isInvalid} size={size === \"sm\" ? \"sm\" : \"md\"}>\n {hint}\n </HintText>\n )}\n </View>\n );\n};\n\nTextArea.displayName = \"TextArea\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avenue-ticketing/native",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Avenue UI React Native components (Untitled UI beta)",
5
5
  "license": "MIT",
6
6
  "repository": {