@avenue-ticketing/native 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +9 -0
  2. package/dist/avatar.d.ts +75 -0
  3. package/dist/avatar.js +300 -0
  4. package/dist/avatar.js.map +1 -0
  5. package/dist/badge.d.ts +149 -0
  6. package/dist/badge.js +388 -0
  7. package/dist/badge.js.map +1 -0
  8. package/dist/button-group.d.ts +36 -0
  9. package/dist/button-group.js +186 -0
  10. package/dist/button-group.js.map +1 -0
  11. package/dist/button.d.ts +45 -0
  12. package/dist/button.js +357 -0
  13. package/dist/button.js.map +1 -0
  14. package/dist/checkbox.d.ts +31 -0
  15. package/dist/checkbox.js +212 -0
  16. package/dist/checkbox.js.map +1 -0
  17. package/dist/date-picker.d.ts +50 -0
  18. package/dist/date-picker.js +755 -0
  19. package/dist/date-picker.js.map +1 -0
  20. package/dist/dialog.d.ts +62 -0
  21. package/dist/dialog.js +325 -0
  22. package/dist/dialog.js.map +1 -0
  23. package/dist/dropdown.d.ts +85 -0
  24. package/dist/dropdown.js +977 -0
  25. package/dist/dropdown.js.map +1 -0
  26. package/dist/input-group-addon-context.d.ts +10 -0
  27. package/dist/input-group-addon-context.js +9 -0
  28. package/dist/input-group-addon-context.js.map +1 -0
  29. package/dist/input.d.ts +325 -0
  30. package/dist/input.js +7890 -0
  31. package/dist/input.js.map +1 -0
  32. package/dist/radio.d.ts +34 -0
  33. package/dist/radio.js +177 -0
  34. package/dist/radio.js.map +1 -0
  35. package/dist/sheet.d.ts +67 -0
  36. package/dist/sheet.js +277 -0
  37. package/dist/sheet.js.map +1 -0
  38. package/dist/slider.d.ts +22 -0
  39. package/dist/slider.js +197 -0
  40. package/dist/slider.js.map +1 -0
  41. package/dist/tabs.d.ts +69 -0
  42. package/dist/tabs.js +379 -0
  43. package/dist/tabs.js.map +1 -0
  44. package/dist/textarea.d.ts +23 -0
  45. package/dist/textarea.js +176 -0
  46. package/dist/textarea.js.map +1 -0
  47. package/dist/toast.d.ts +32 -0
  48. package/dist/toast.js +140 -0
  49. package/dist/toast.js.map +1 -0
  50. package/dist/toggle.d.ts +31 -0
  51. package/dist/toggle.js +205 -0
  52. package/dist/toggle.js.map +1 -0
  53. package/dist/tooltip.d.ts +44 -0
  54. package/dist/tooltip.js +293 -0
  55. package/dist/tooltip.js.map +1 -0
  56. package/package.json +93 -0
  57. package/theme-dark.css +362 -0
  58. package/theme.css +161 -0
package/dist/tabs.js ADDED
@@ -0,0 +1,379 @@
1
+ import { createContext, useState, useMemo, useContext } from 'react';
2
+ import { ScrollView } from 'react-native';
3
+ import { View, Pressable, Text } from 'react-native-css/components';
4
+ import { useNativeVariable } from 'react-native-css';
5
+ import { extendTailwindMerge } from 'tailwind-merge';
6
+ import Svg from 'react-native-svg';
7
+ import 'phosphor-react-native/src/icons/X';
8
+ import { styled } from 'nativewind';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+
11
+ // ../../native/components/application/tabs/tabs.tsx
12
+ var twMerge = extendTailwindMerge({
13
+ extend: {
14
+ theme: {
15
+ text: ["display-xs", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl"]
16
+ }
17
+ }
18
+ });
19
+ var cx = twMerge;
20
+ function sortCx(classes) {
21
+ return classes;
22
+ }
23
+
24
+ // ../core/src/is-react-component.ts
25
+ var isFunctionComponent = (component) => {
26
+ return typeof component === "function";
27
+ };
28
+ var isClassComponent = (component) => {
29
+ return typeof component === "function" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);
30
+ };
31
+ var isForwardRefComponent = (component) => {
32
+ return typeof component === "object" && component !== null && component.$$typeof.toString() === "Symbol(react.forward_ref)";
33
+ };
34
+ var isReactComponent = (component) => {
35
+ return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);
36
+ };
37
+
38
+ // ../core/src/tabs.ts
39
+ var tabSizes = {
40
+ sm: {
41
+ base: "text-sm font-semibold gap-1 *:data-icon:size-4",
42
+ "button-brand": "py-2 px-2.5",
43
+ "button-gray": "py-2 px-2.5",
44
+ "button-border": "py-2 px-2.5",
45
+ "button-minimal": "py-2 px-2.5",
46
+ underline: "px-0.5 pb-2.5 pt-0",
47
+ line: "pl-2.5 pr-3 py-0.5",
48
+ icon: 16
49
+ },
50
+ md: {
51
+ base: "text-md font-semibold gap-1.5 *:data-icon:size-5",
52
+ "button-brand": "py-2.5 px-2.5",
53
+ "button-gray": "py-2.5 px-2.5",
54
+ "button-border": "py-2.5 px-2.5",
55
+ "button-minimal": "py-2.5 px-2.5",
56
+ underline: "px-0.5 pb-2.5 pt-0",
57
+ line: "pr-3.5 pl-3 py-1",
58
+ icon: 20
59
+ }
60
+ };
61
+ function tabListStyles({ size, fullWidth }) {
62
+ return {
63
+ "button-brand": "gap-1",
64
+ "button-gray": "gap-1",
65
+ "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"),
66
+ "button-minimal": "gap-0.5 rounded-lg bg-secondary_alt ring-1 ring-inset ring-secondary",
67
+ underline: cx("gap-3", fullWidth && "w-full gap-4"),
68
+ line: "gap-2"
69
+ };
70
+ }
71
+ var tabsStyles = {
72
+ root: "w-full flex-col",
73
+ rootVertical: "w-full flex-row",
74
+ list: "flex-row",
75
+ listVertical: "flex-col",
76
+ listButtonBorder: "gap-1 rounded-[10px] border border-secondary bg-secondary_alt p-1",
77
+ listButtonBorderMd: "rounded-xl p-1.5",
78
+ listButtonMinimal: "gap-0.5 rounded-lg border border-secondary bg-secondary_alt",
79
+ item: "flex-row items-center justify-center gap-2 rounded-md",
80
+ itemVertical: "justify-start",
81
+ itemFull: "flex-1",
82
+ labelRow: "flex-row items-center gap-1.5"
83
+ };
84
+ function tabNativeItemState(type, selected) {
85
+ if (!selected) {
86
+ if (type === "underline" || type === "line") return "border-transparent";
87
+ return "";
88
+ }
89
+ switch (type) {
90
+ case "button-brand":
91
+ return "bg-brand-primary";
92
+ case "button-gray":
93
+ return "bg-primary_hover";
94
+ case "button-border":
95
+ return "bg-primary_alt";
96
+ case "button-minimal":
97
+ return "rounded-lg bg-primary_alt border border-primary";
98
+ case "underline":
99
+ return "rounded-none border-b-2 border-fg-brand-primary_alt";
100
+ case "line":
101
+ return "rounded-none border-l-2 border-fg-brand-primary_alt";
102
+ default: {
103
+ const _exhaustive = type;
104
+ return _exhaustive;
105
+ }
106
+ }
107
+ }
108
+ function tabNativeLabelState(type, selected) {
109
+ if (!selected) {
110
+ if (type === "button-brand") return "text-secondary";
111
+ return "text-quaternary";
112
+ }
113
+ switch (type) {
114
+ case "button-brand":
115
+ return "text-primary";
116
+ case "button-gray":
117
+ case "button-border":
118
+ case "button-minimal":
119
+ return "text-secondary";
120
+ case "underline":
121
+ case "line":
122
+ return "text-brand-secondary";
123
+ default: {
124
+ const _exhaustive = type;
125
+ return _exhaustive;
126
+ }
127
+ }
128
+ }
129
+
130
+ // ../core/src/badge.ts
131
+ var badgeTypes = {
132
+ pillColor: "pill-color",
133
+ badgeColor: "color",
134
+ badgeModern: "modern"
135
+ };
136
+ var badgeFilledColors = {
137
+ gray: {
138
+ root: "bg-utility-neutral-50 text-utility-neutral-700 ring-utility-neutral-200",
139
+ addon: "text-utility-neutral-500",
140
+ addonButton: "hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500"
141
+ },
142
+ brand: {
143
+ root: "bg-utility-brand-50 text-utility-brand-700 ring-utility-brand-200",
144
+ addon: "text-utility-brand-500",
145
+ addonButton: "hover:bg-utility-brand-100 text-utility-brand-400 hover:text-utility-brand-500"
146
+ },
147
+ error: {
148
+ root: "bg-utility-red-50 text-utility-red-700 ring-utility-red-200",
149
+ addon: "text-utility-red-500",
150
+ addonButton: "hover:bg-utility-red-100 text-utility-red-400 hover:text-utility-red-500"
151
+ },
152
+ warning: {
153
+ root: "bg-utility-yellow-50 text-utility-yellow-700 ring-utility-yellow-200",
154
+ addon: "text-utility-yellow-500",
155
+ addonButton: "hover:bg-utility-yellow-100 text-utility-yellow-400 hover:text-utility-yellow-500"
156
+ },
157
+ success: {
158
+ root: "bg-utility-green-50 text-utility-green-700 ring-utility-green-200",
159
+ addon: "text-utility-green-500",
160
+ addonButton: "hover:bg-utility-green-100 text-utility-green-400 hover:text-utility-green-500"
161
+ },
162
+ slate: {
163
+ root: "bg-utility-slate-50 text-utility-slate-700 ring-utility-slate-200",
164
+ addon: "text-utility-slate-500",
165
+ addonButton: "hover:bg-utility-slate-100 text-utility-slate-400 hover:text-utility-slate-500"
166
+ },
167
+ sky: {
168
+ root: "bg-utility-sky-50 text-utility-sky-700 ring-utility-sky-200",
169
+ addon: "text-utility-sky-500",
170
+ addonButton: "hover:bg-utility-sky-100 text-utility-sky-400 hover:text-utility-sky-500"
171
+ },
172
+ blue: {
173
+ root: "bg-utility-blue-50 text-utility-blue-700 ring-utility-blue-200",
174
+ addon: "text-utility-blue-500",
175
+ addonButton: "hover:bg-utility-blue-100 text-utility-blue-400 hover:text-utility-blue-500"
176
+ },
177
+ indigo: {
178
+ root: "bg-utility-indigo-50 text-utility-indigo-700 ring-utility-indigo-200",
179
+ addon: "text-utility-indigo-500",
180
+ addonButton: "hover:bg-utility-indigo-100 text-utility-indigo-400 hover:text-utility-indigo-500"
181
+ },
182
+ purple: {
183
+ root: "bg-utility-purple-50 text-utility-purple-700 ring-utility-purple-200",
184
+ addon: "text-utility-purple-500",
185
+ addonButton: "hover:bg-utility-purple-100 text-utility-purple-400 hover:text-utility-purple-500"
186
+ },
187
+ pink: {
188
+ root: "bg-utility-pink-50 text-utility-pink-700 ring-utility-pink-200",
189
+ addon: "text-utility-pink-500",
190
+ addonButton: "hover:bg-utility-pink-100 text-utility-pink-400 hover:text-utility-pink-500"
191
+ },
192
+ orange: {
193
+ root: "bg-utility-orange-50 text-utility-orange-700 ring-utility-orange-200",
194
+ addon: "text-utility-orange-500",
195
+ addonButton: "hover:bg-utility-orange-100 text-utility-orange-400 hover:text-utility-orange-500"
196
+ }
197
+ };
198
+ Object.fromEntries(
199
+ Object.entries(badgeFilledColors).map(([key, value]) => [key, { root: "", addon: value.addon }])
200
+ );
201
+ var badgeWithPillTypes = {
202
+ [badgeTypes.pillColor]: {
203
+ common: "size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset",
204
+ styles: badgeFilledColors
205
+ },
206
+ [badgeTypes.badgeColor]: {
207
+ common: "size-max flex-row items-center whitespace-nowrap rounded-md ring-1 ring-inset",
208
+ styles: badgeFilledColors
209
+ },
210
+ [badgeTypes.badgeModern]: {
211
+ common: "size-max flex-row items-center whitespace-nowrap rounded-full ring-1 ring-inset shadow-xs",
212
+ styles: {
213
+ gray: {
214
+ root: "bg-primary text-secondary ring-primary",
215
+ addon: "text-neutral-500",
216
+ addonButton: "hover:bg-utility-neutral-100 text-utility-neutral-400 hover:text-utility-neutral-500"
217
+ }
218
+ }
219
+ }
220
+ };
221
+ var badgeStyles = sortCx({
222
+ pillSizes: {
223
+ sm: "py-0.5 px-2 text-xs font-semibold",
224
+ md: "py-0.5 px-2.5 text-sm font-semibold",
225
+ lg: "py-1 px-3 text-sm font-semibold"
226
+ },
227
+ badgeSizes: {
228
+ sm: "py-0.5 px-1.5 text-xs font-semibold",
229
+ md: "py-0.5 px-2 text-sm font-semibold",
230
+ lg: "py-1 px-2.5 text-sm font-semibold"
231
+ },
232
+ badgeColorSizes: {
233
+ sm: "py-0.5 px-1.5 text-xs font-semibold",
234
+ md: "py-0.5 px-2 text-sm font-semibold",
235
+ lg: "py-1 px-2.5 text-sm font-semibold rounded-lg"
236
+ },
237
+ pillDotSizes: {
238
+ sm: "gap-1 py-0.5 pl-1.5 pr-2 text-xs font-semibold",
239
+ md: "gap-1.5 py-0.5 pl-2 pr-2.5 text-sm font-semibold",
240
+ lg: "gap-1.5 py-1 pl-2.5 pr-3 text-sm font-semibold"
241
+ },
242
+ badgeDotSizes: {
243
+ sm: "gap-1 py-0.5 px-1.5 text-xs font-semibold",
244
+ md: "gap-1.5 py-0.5 px-2 text-sm font-semibold",
245
+ lg: "gap-1.5 py-1 px-2.5 text-sm font-semibold"
246
+ },
247
+ badgeColorDotSizes: {
248
+ sm: "gap-1 py-0.5 px-1.5 text-xs font-semibold",
249
+ md: "gap-1.5 py-0.5 px-2 text-sm font-semibold",
250
+ lg: "gap-1.5 py-1 px-2.5 text-sm font-semibold rounded-lg"
251
+ },
252
+ icon: "size-3"
253
+ });
254
+ function resolveBadgeSizeClass(type, size) {
255
+ if (type === badgeTypes.pillColor) return badgeStyles.pillSizes[size];
256
+ if (type === badgeTypes.badgeColor) return badgeStyles.badgeColorSizes[size];
257
+ return badgeStyles.badgeSizes[size];
258
+ }
259
+ var badgeLabelTextSizes = {
260
+ sm: "text-xs font-semibold",
261
+ md: "text-sm font-semibold",
262
+ lg: "text-sm font-semibold"
263
+ };
264
+ styled(Svg);
265
+ var BadgeLabel = ({
266
+ size,
267
+ colorClass,
268
+ children
269
+ }) => {
270
+ if (typeof children === "string" || typeof children === "number") {
271
+ return /* @__PURE__ */ jsx(Text, { className: cx(badgeLabelTextSizes[size], colorClass), children });
272
+ }
273
+ return /* @__PURE__ */ jsx(Fragment, { children });
274
+ };
275
+ var Badge = ({
276
+ type = "pill-color",
277
+ size = "md",
278
+ color = "gray",
279
+ children,
280
+ className
281
+ }) => {
282
+ const colors = badgeWithPillTypes[type];
283
+ const colorRoot = colors.styles[color].root;
284
+ return /* @__PURE__ */ jsx(View, { className: cx(colors.common, resolveBadgeSizeClass(type, size), colorRoot, className), children: /* @__PURE__ */ jsx(BadgeLabel, { size, colorClass: colorRoot, children }) });
285
+ };
286
+ var TabsContext = createContext(void 0);
287
+ var TabListContext = createContext({
288
+ size: "sm",
289
+ type: "button-brand",
290
+ orientation: "horizontal"
291
+ });
292
+ var TabsRoot = ({ children, selectedKey, defaultSelectedKey, onSelectionChange, orientation = "horizontal", className }) => {
293
+ const [internal, setInternal] = useState(defaultSelectedKey);
294
+ const current = selectedKey ?? internal;
295
+ const setSelectedKey = (key) => {
296
+ if (selectedKey === void 0) setInternal(key);
297
+ onSelectionChange?.(key);
298
+ };
299
+ const value = useMemo(
300
+ () => ({ selectedKey: current, setSelectedKey, orientation }),
301
+ [current, orientation]
302
+ );
303
+ return /* @__PURE__ */ jsx(TabsContext.Provider, { value, children: /* @__PURE__ */ jsx(View, { className: cx(orientation === "vertical" ? tabsStyles.rootVertical : tabsStyles.root, className), children }) });
304
+ };
305
+ var TabList = ({ children, size = "sm", type = "button-brand", fullWidth, className, items }) => {
306
+ const tabs = useContext(TabsContext);
307
+ const orientation = tabs?.orientation ?? "horizontal";
308
+ const list = /* @__PURE__ */ jsxs(
309
+ View,
310
+ {
311
+ className: cx(
312
+ orientation === "vertical" ? tabsStyles.listVertical : tabsStyles.list,
313
+ type === "button-border" ? cx(tabsStyles.listButtonBorder, size === "md" && tabsStyles.listButtonBorderMd) : type === "button-minimal" ? tabsStyles.listButtonMinimal : tabListStyles({ size, fullWidth })[type],
314
+ orientation === "horizontal" && type === "underline" && "relative",
315
+ fullWidth && "w-full",
316
+ className
317
+ ),
318
+ children: [
319
+ orientation === "horizontal" && type === "underline" && /* @__PURE__ */ jsx(View, { className: "absolute right-0 bottom-0 left-0 h-px bg-border-secondary" }),
320
+ children ?? items?.map((item) => /* @__PURE__ */ jsx(Tab, { ...item }, item.id))
321
+ ]
322
+ }
323
+ );
324
+ 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 });
325
+ };
326
+ var Tab = ({ id, label, children, badge, icon: Icon }) => {
327
+ const tabs = useContext(TabsContext);
328
+ const { size, type, fullWidth, orientation } = useContext(TabListContext);
329
+ const selected = tabs?.selectedKey === id;
330
+ const showPill = type === "underline" || type === "line" || type === "button-brand";
331
+ const fg = useNativeVariable(selected ? "--color-fg-primary" : "--color-fg-quaternary") ?? "#717680";
332
+ const brand = useNativeVariable("--color-fg-brand-secondary") ?? "#6941c6";
333
+ const fgQuaternary = useNativeVariable("--color-fg-quaternary") ?? "#717680";
334
+ const iconColor = selected && (type === "underline" || type === "line") ? brand : selected ? fg : fgQuaternary;
335
+ return /* @__PURE__ */ jsxs(
336
+ Pressable,
337
+ {
338
+ accessibilityRole: "tab",
339
+ accessibilityState: { selected },
340
+ onPress: () => tabs?.setSelectedKey(id),
341
+ style: orientation === "horizontal" ? { flexShrink: 0, zIndex: 1 } : { zIndex: 1 },
342
+ className: cx(
343
+ tabsStyles.item,
344
+ orientation === "vertical" && tabsStyles.itemVertical,
345
+ fullWidth && orientation === "vertical" && tabsStyles.itemFull,
346
+ tabSizes[size][type],
347
+ tabNativeItemState(type, selected)
348
+ ),
349
+ children: [
350
+ isReactComponent(Icon) && /* @__PURE__ */ jsx(Icon, { size: tabSizes[size].icon, color: iconColor }),
351
+ /* @__PURE__ */ jsxs(View, { className: cx(tabsStyles.labelRow, type !== "line" && "px-0.5"), children: [
352
+ /* @__PURE__ */ jsx(
353
+ Text,
354
+ {
355
+ numberOfLines: 1,
356
+ className: cx(size === "sm" ? "text-sm" : "text-md", "font-semibold", tabNativeLabelState(type, selected)),
357
+ children: children || label
358
+ }
359
+ ),
360
+ badge != null && /* @__PURE__ */ jsx(Badge, { size: "sm", type: showPill ? "pill-color" : "modern", color: showPill && selected ? "brand" : "gray", children: badge })
361
+ ] })
362
+ ]
363
+ }
364
+ );
365
+ };
366
+ var TabPanel = ({ id, children, className }) => {
367
+ const tabs = useContext(TabsContext);
368
+ if (tabs?.selectedKey !== id) return null;
369
+ return /* @__PURE__ */ jsx(View, { className, children });
370
+ };
371
+ var Tabs = Object.assign(TabsRoot, {
372
+ List: TabList,
373
+ Item: Tab,
374
+ Panel: TabPanel
375
+ });
376
+
377
+ export { Tab, TabList, TabPanel, Tabs, TabsRoot };
378
+ //# sourceMappingURL=tabs.js.map
379
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +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;AACpG,CAAA;AAEO,IAAM,gBAAA,GAAmB,CAAC,SAAA,KAAgD;AAC7E,EAAA,OAAO,oBAAoB,SAAS,CAAA,IAAK,sBAAsB,SAAS,CAAA,IAAK,iBAAiB,SAAS,CAAA;AAC3G,CAAA;;;AC2CO,IAAM,QAAA,GAAW;AAAA,EACpB,EAAA,EAAI;AAAA,IACA,IAAA,EAAM,gDAAA;AAAA,IACN,cAAA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A,UACC,SAAS,IAAA,oBACNJ,GAAAA,CAAC,KAAA,EAAA,EAAM,MAAK,IAAA,EAAK,IAAA,EAAM,QAAA,GAAW,YAAA,GAAe,UAAU,KAAA,EAAO,QAAA,IAAY,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;\nexport const VERTICAL_TAB_TYPES = [\"button-brand\", \"button-gray\", \"button-border\", \"button-minimal\", \"line\"] 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 };\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 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 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 };\n}\n\nexport const tabWebStyles = {\n root: \"flex w-full flex-col\",\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 itemFull: \"w-full flex-1\",\n label: \"flex items-center gap-1.5\",\n labelLine: \"flex items-center gap-1.5\",\n badge: \"hidden transition-inherit-all md:flex\",\n badgeSm: \"-my-px\",\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 itemFull: \"flex-1\",\n label: \"font-semibold text-quaternary\",\n labelRow: \"flex-row items-center gap-1.5\",\n} as const;\n\nexport function tabNativeItemState(type: TabType, selected: boolean) {\n if (!selected) {\n if (type === \"underline\" || type === \"line\") 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 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 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 showPill = type === \"underline\" || type === \"line\" || 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\" || type === \"line\") ? 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 fullWidth && orientation === \"vertical\" && tabsStyles.itemFull,\n tabSizes[size][type],\n tabNativeItemState(type, selected),\n )}\n >\n {isReactComponent(Icon) && <Icon size={tabSizes[size].icon} color={iconColor} />}\n <View className={cx(tabsStyles.labelRow, type !== \"line\" && \"px-0.5\")}>\n <Text\n numberOfLines={1}\n className={cx(size === \"sm\" ? \"text-sm\" : \"text-md\", \"font-semibold\", tabNativeLabelState(type, selected))}\n >\n {children || label}\n </Text>\n {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"]}
@@ -0,0 +1,23 @@
1
+ import { ReactNode, FC } from 'react';
2
+
3
+ declare const TEXTAREA_SIZES: readonly ["sm", "md"];
4
+ type TextAreaSize = (typeof TEXTAREA_SIZES)[number];
5
+
6
+ interface TextAreaProps {
7
+ size?: TextAreaSize;
8
+ label?: string;
9
+ hint?: ReactNode;
10
+ placeholder?: string;
11
+ value?: string;
12
+ defaultValue?: string;
13
+ rows?: number;
14
+ isDisabled?: boolean;
15
+ isInvalid?: boolean;
16
+ isRequired?: boolean;
17
+ hideRequiredIndicator?: boolean;
18
+ className?: string;
19
+ onChangeText?: (value: string) => void;
20
+ }
21
+ declare const TextArea: FC<TextAreaProps>;
22
+
23
+ export { TextArea, type TextAreaProps, type TextAreaSize };