@cdx-ui/components 0.0.1-beta.121 → 0.0.1-beta.122

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 (43) hide show
  1. package/lib/commonjs/components/ScrollShadow/index.js +82 -0
  2. package/lib/commonjs/components/ScrollShadow/index.js.map +1 -0
  3. package/lib/commonjs/components/ScrollShadow/styles.js +54 -0
  4. package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -0
  5. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +83 -0
  6. package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -0
  7. package/lib/commonjs/components/Tabs/index.js +525 -0
  8. package/lib/commonjs/components/Tabs/index.js.map +1 -0
  9. package/lib/commonjs/components/Tabs/styles.js +333 -0
  10. package/lib/commonjs/components/Tabs/styles.js.map +1 -0
  11. package/lib/commonjs/components/index.js +24 -0
  12. package/lib/commonjs/components/index.js.map +1 -1
  13. package/lib/module/components/ScrollShadow/index.js +78 -0
  14. package/lib/module/components/ScrollShadow/index.js.map +1 -0
  15. package/lib/module/components/ScrollShadow/styles.js +50 -0
  16. package/lib/module/components/ScrollShadow/styles.js.map +1 -0
  17. package/lib/module/components/ScrollShadow/useScrollShadow.js +79 -0
  18. package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -0
  19. package/lib/module/components/Tabs/index.js +520 -0
  20. package/lib/module/components/Tabs/index.js.map +1 -0
  21. package/lib/module/components/Tabs/styles.js +330 -0
  22. package/lib/module/components/Tabs/styles.js.map +1 -0
  23. package/lib/module/components/index.js +2 -0
  24. package/lib/module/components/index.js.map +1 -1
  25. package/lib/typescript/components/ScrollShadow/index.d.ts +29 -0
  26. package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -0
  27. package/lib/typescript/components/ScrollShadow/styles.d.ts +12 -0
  28. package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -0
  29. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +17 -0
  30. package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -0
  31. package/lib/typescript/components/Tabs/index.d.ts +48 -0
  32. package/lib/typescript/components/Tabs/index.d.ts.map +1 -0
  33. package/lib/typescript/components/Tabs/styles.d.ts +107 -0
  34. package/lib/typescript/components/Tabs/styles.d.ts.map +1 -0
  35. package/lib/typescript/components/index.d.ts +2 -0
  36. package/lib/typescript/components/index.d.ts.map +1 -1
  37. package/package.json +4 -4
  38. package/src/components/ScrollShadow/index.tsx +119 -0
  39. package/src/components/ScrollShadow/styles.ts +57 -0
  40. package/src/components/ScrollShadow/useScrollShadow.ts +110 -0
  41. package/src/components/Tabs/index.tsx +694 -0
  42. package/src/components/Tabs/styles.ts +340 -0
  43. package/src/components/index.ts +2 -0
@@ -0,0 +1,330 @@
1
+ "use strict";
2
+
3
+ import { Platform, StyleSheet } from 'react-native';
4
+ import { cva } from 'class-variance-authority';
5
+ import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
6
+
7
+ // Kept local (rather than imported from `./index`) to avoid a circular import — `index.tsx`
8
+ // imports styles from this file.
9
+
10
+ // `rounded-full` is used for the indicator + individual tabs, which are small enough that a
11
+ // full capsule radius looks correct in both orientations.
12
+ const SOLID_RADIUS = 'rounded-full';
13
+
14
+ // `rounded-full` (`border-radius/round`, 9999px) for the indicator, tab capsules, and the
15
+ // horizontal solid track/shell — matches Figma SegmentedControl (always much wider than tall,
16
+ // so full rounding reads as a capsule). Applied via StyleSheet on the track/shell because
17
+ // arbitrary-value radius classes don't reliably resolve through Uniwind's scanner.
18
+ const SOLID_TRACK_RADIUS = 9999;
19
+
20
+ /**
21
+ * Vertical solid track radius — deliberately *not* `SOLID_TRACK_RADIUS` (9999px). A vertical
22
+ * track's box can end up nearly square (few short tab labels stacked in a column), and a
23
+ * fully-round radius on a near-square box renders as a circle/blob instead of a rounded rect.
24
+ * A fixed, modest radius avoids that regardless of how many tabs are stacked or how wide their
25
+ * labels are.
26
+ */
27
+ const SOLID_VERTICAL_TRACK_RADIUS = 20;
28
+
29
+ /** Thickness of the 1px gray rail the outline indicator rides beside. */
30
+ const OUTLINE_TRACK_THICKNESS = 1;
31
+ /** Thickness of the 2px action-colored outline selection segment (animated size, not a class). */
32
+ export const OUTLINE_INDICATOR_THICKNESS = 2;
33
+
34
+ /**
35
+ * Shared duration (ms) for the indicator's `withTiming` glide (`index.tsx`) and the tab's
36
+ * `duration-300` transition class (below) — kept in sync so the focus ring doesn't snap in
37
+ * ahead of a still-sliding solid/outline indicator. Change both together.
38
+ */
39
+ export const TABS_INDICATOR_TRANSITION_MS = 300;
40
+
41
+ /** Outline horizontal scroll — narrow fade reads cleanly against the page background. */
42
+ export const TABS_SCROLL_FADE_SIZE = 32;
43
+
44
+ /**
45
+ * Solid horizontal scroll — wider fade so tabs dissolve smoothly into the track (and under the
46
+ * overlay chevron) instead of ending in a hard clip at the scroll viewport edge.
47
+ */
48
+ export const TABS_SOLID_SCROLL_FADE_SIZE = 40;
49
+
50
+ /**
51
+ * Room reserved on the left/right sides inside the horizontal-scroll clip rect for ink that
52
+ * paints past a tab's own box: `shadow-sm` (`0px 1px 3px`, solid only) and the web focus ring
53
+ * (`ring-2` + `ring-offset-2`, ~4px, both variants). `overflow-x: auto` + `overflow-y: visible`
54
+ * does *not* achieve this — per the CSS Overflow spec, a non-`visible` value on one axis forces
55
+ * `visible` on the other axis to compute as `auto`, so it still clips. Applies to both variants —
56
+ * outline's ring bleeds past its box exactly the same way solid's does.
57
+ */
58
+ /** Reserved ink room (focus ring, shadow) inside the horizontal-scroll clip rect — 4px (`p-1`). */
59
+ const INDICATOR_BLEED = 4;
60
+
61
+ /**
62
+ * Same bleed room as `INDICATOR_BLEED` on the top/bottom sides — kept equal to the solid shell's
63
+ * own `py-1` (below) so the shell's `overflow: hidden` clip boundary sits exactly where the
64
+ * reserved ink stops, with no gap and no clipping. Solid indicator = 32px, whole tablist = 40px
65
+ * per Figma SegmentedControl — a wider value here would inflate the shell past 40px.
66
+ */
67
+ const INDICATOR_BLEED_VERTICAL = INDICATOR_BLEED;
68
+
69
+ /**
70
+ * Numeric styles that can't be expressed as static Uniwind utility classes — solid track radius
71
+ * and outline indicator offset (`bottom-px` / `left-px` don't apply on Reanimated host views).
72
+ */
73
+ export const tabsStyles = StyleSheet.create({
74
+ solidTrack: {
75
+ borderRadius: SOLID_TRACK_RADIUS
76
+ },
77
+ /** See `SOLID_VERTICAL_TRACK_RADIUS` — used instead of `solidTrack` for vertical solid tracks. */
78
+ solidTrackVertical: {
79
+ borderRadius: SOLID_VERTICAL_TRACK_RADIUS
80
+ },
81
+ /** Clips scroll ink + edge fades to the solid shell's rounded rect (className radius alone won't). */
82
+ solidShell: {
83
+ borderRadius: SOLID_TRACK_RADIUS,
84
+ overflow: 'hidden'
85
+ },
86
+ horizontalScrollContent: {
87
+ paddingHorizontal: INDICATOR_BLEED,
88
+ paddingVertical: INDICATOR_BLEED_VERTICAL
89
+ },
90
+ horizontalScrollViewBleed: {
91
+ marginVertical: -INDICATOR_BLEED_VERTICAL
92
+ },
93
+ outlineIndicator: {
94
+ zIndex: 1
95
+ },
96
+ outlineIndicatorHorizontal: {
97
+ bottom: OUTLINE_TRACK_THICKNESS
98
+ },
99
+ outlineIndicatorVertical: {
100
+ left: OUTLINE_TRACK_THICKNESS
101
+ },
102
+ solidIndicator: {
103
+ zIndex: 0
104
+ },
105
+ /** Clips press/hover feedback to the solid tab capsule (`rounded-full` alone is not enough on Pressable). */
106
+ solidTabPressable: {
107
+ borderRadius: 9999,
108
+ overflow: 'hidden'
109
+ }
110
+ });
111
+ export const tabsRootVariants = cva([], {
112
+ variants: {
113
+ orientation: {
114
+ horizontal: 'flex-col',
115
+ vertical: 'flex-row items-start gap-4'
116
+ }
117
+ },
118
+ defaultVariants: {
119
+ orientation: 'horizontal'
120
+ }
121
+ });
122
+ export const tabsListVariants = cva(['relative min-w-0']);
123
+
124
+ /** Flex track that hosts the rail, indicator, and tab triggers. */
125
+ export const tabsListTrackVariants = cva(['relative items-stretch'], {
126
+ variants: {
127
+ orientation: {
128
+ horizontal: 'flex-row',
129
+ vertical: 'flex-col'
130
+ },
131
+ variant: {
132
+ outline: '',
133
+ solid: 'gap-0.5'
134
+ },
135
+ /**
136
+ * When horizontal tabs scroll, the solid track background + radius live on
137
+ * `tabsListSolidShellVariants` (viewport-sized) so rounded corners aren't clipped
138
+ * by the ScrollView.
139
+ */
140
+ scrollable: {
141
+ true: '',
142
+ false: ''
143
+ }
144
+ },
145
+ compoundVariants: [{
146
+ orientation: 'vertical',
147
+ variant: 'outline',
148
+ className: 'gap-2 pl-1'
149
+ }, {
150
+ orientation: 'horizontal',
151
+ variant: 'outline',
152
+ className: 'pb-1'
153
+ }, {
154
+ variant: 'solid',
155
+ scrollable: false,
156
+ className: 'bg-surface-secondary p-1'
157
+ },
158
+ // Whole tablist = 40px per Figma SegmentedControl (`p-1` + 32px tab, above). Height-only —
159
+ // vertical solid lists size to their stacked tab content instead.
160
+ {
161
+ orientation: 'horizontal',
162
+ variant: 'solid',
163
+ scrollable: false,
164
+ className: 'h-10 max-h-10 min-h-10'
165
+ }],
166
+ defaultVariants: {
167
+ orientation: 'horizontal',
168
+ variant: 'solid',
169
+ scrollable: false
170
+ }
171
+ });
172
+
173
+ /**
174
+ * Viewport-sized solid shell for horizontal scroll — bg is a separate layer so overflow can stay
175
+ * visible. `py-1` (4px) matches the non-scrolling track's `p-1` exactly, so both the scrollable
176
+ * and non-scrollable solid paths land on the same 40px whole-tablist height (32px tab + 4px top
177
+ * + 4px bottom). `h-10`/`max-h-10`/`min-h-10` pin it explicitly so a taller-than-expected label
178
+ * line-height can't inflate the shell. `INDICATOR_BLEED_VERTICAL` (the ScrollView's own top/bottom
179
+ * reserved ink room, above) is kept equal to this `py-1` so the shell's `overflow: hidden` clip
180
+ * boundary lines up with where that reserved ink stops.
181
+ */
182
+ export const tabsListSolidShellVariants = cva(['relative min-w-0 w-full py-1 h-10 max-h-10 min-h-10']);
183
+ export const tabsListSolidShellBgVariants = cva(['absolute inset-0 bg-surface-secondary']);
184
+ export const tabsListScrollViewVariants = cva(['w-full max-w-full']);
185
+ export const tabsListScrollContainerVariants = cva(['relative min-w-0 w-full']);
186
+
187
+ // Outline: flex sibling beside the scroll viewport (outline scroll looks good this way).
188
+ export const tabsListScrollButtonVariants = cva(['z-10 flex h-6 w-6 shrink-0 items-center justify-center self-center rounded-full', TRANSITION_COLORS, Platform.select({
189
+ default: 'data-[active=true]:bg-surface-secondary-active',
190
+ web: 'data-[hover=true]:bg-surface-secondary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
191
+ })]);
192
+
193
+ // Solid: tiny overlay on the edge fade — the scroll viewport stays full-width inside the shell so
194
+ // the track radius + gradient read as one continuous surface (no hard clip before the chevron).
195
+ export const tabsListSolidScrollButtonVariants = cva(['h-5 w-3 items-center justify-center rounded-full', TRANSITION_COLORS, Platform.select({
196
+ default: 'data-[active=true]:bg-surface-secondary-active',
197
+ web: 'data-[hover=true]:bg-surface-secondary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
198
+ })]);
199
+ export const tabsListSolidScrollButtonSlotVariants = cva(['pointer-events-none absolute inset-y-0 z-20 flex w-3 justify-center'], {
200
+ variants: {
201
+ position: {
202
+ start: 'left-1',
203
+ end: 'right-1'
204
+ }
205
+ }
206
+ });
207
+
208
+ // Horizontal: `h-px border-b` (1px). Vertical: Divider-style `w-px bg-*` (no border — `border`
209
+ // on `w-px` doubles thickness to 2px). Gutter padding on the list keeps tabs off the rail.
210
+ export const tabsOutlineTrackVariants = cva(['absolute z-0'], {
211
+ variants: {
212
+ orientation: {
213
+ horizontal: 'bottom-0 left-0 right-0 h-px border-b border-stroke-secondary',
214
+ vertical: 'top-0 bottom-0 left-0 w-px h-full bg-stroke-secondary'
215
+ }
216
+ },
217
+ defaultVariants: {
218
+ orientation: 'horizontal'
219
+ }
220
+ });
221
+ export const tabsIndicatorVariants = cva(['absolute'], {
222
+ variants: {
223
+ orientation: {
224
+ horizontal: '',
225
+ vertical: ''
226
+ },
227
+ variant: {
228
+ outline: 'bg-surface-action-strong',
229
+ solid: `${SOLID_RADIUS} bg-surface-primary shadow-sm`
230
+ }
231
+ },
232
+ compoundVariants: [
233
+ // Rail offset is in `tabsStyles.outlineIndicator*` (Reanimated host).
234
+ {
235
+ orientation: 'horizontal',
236
+ variant: 'outline',
237
+ className: 'left-0'
238
+ }, {
239
+ orientation: 'vertical',
240
+ variant: 'outline',
241
+ className: 'top-0'
242
+ }, {
243
+ variant: 'solid',
244
+ className: 'top-0 left-0'
245
+ }],
246
+ defaultVariants: {
247
+ orientation: 'horizontal',
248
+ variant: 'solid'
249
+ }
250
+ });
251
+ export const tabsTabVariants = cva(['relative z-10 items-center justify-center',
252
+ // `transition` (not `transition-colors`) — its default property list includes `box-shadow`,
253
+ // so the focus ring eases in over `TABS_INDICATOR_TRANSITION_MS` instead of snapping in
254
+ // ahead of the indicator, which glides over the same duration (see `index.tsx`).
255
+ 'transition duration-300', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', DISABLED_CURSOR, Platform.select({
256
+ web: ['outline-none', 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2'].join(' '),
257
+ default: ''
258
+ })], {
259
+ variants: {
260
+ orientation: {
261
+ horizontal: '',
262
+ vertical: ''
263
+ },
264
+ variant: {
265
+ outline: '',
266
+ solid: `${SOLID_RADIUS} overflow-hidden`
267
+ }
268
+ },
269
+ compoundVariants: [
270
+ // `py-2` keeps horizontal outline tabs closer to the solid variant's compact 32px trigger
271
+ // height. The rail gap comes from the List's own `pb-1` compound variant (in
272
+ // `tabsListVariants`), not from this padding.
273
+ {
274
+ orientation: 'horizontal',
275
+ variant: 'outline',
276
+ className: 'px-4 py-2'
277
+ }, {
278
+ orientation: 'vertical',
279
+ variant: 'outline',
280
+ // Leave room for 1px rail + 2px indicator on the left.
281
+ className: 'px-4 py-1 pl-4'
282
+ },
283
+ // Ring-offset color defaults to the page background, which doesn't match the solid
284
+ // track's `bg-surface-secondary` — override it so the offset gap blends with the track
285
+ // instead of showing as a mismatched patch next to the ring. Explicit `h-8` (32px, per
286
+ // Figma SegmentedControl) instead of vertical padding — a fixed height, combined with the
287
+ // base class's `items-center`, centers the label regardless of its line-height, and can't
288
+ // drift the way padding-derived sizing could.
289
+ {
290
+ variant: 'solid',
291
+ className: ['h-8 max-h-8 min-h-8 px-4', 'web:data-[focus-visible=true]:ring-offset-surface-secondary'].join(' ')
292
+ }],
293
+ defaultVariants: {
294
+ orientation: 'horizontal',
295
+ variant: 'solid'
296
+ }
297
+ });
298
+ export const tabsPanelVariants = cva(['data-[state=inactive]:hidden'], {
299
+ variants: {
300
+ orientation: {
301
+ horizontal: '',
302
+ vertical: 'flex-1'
303
+ }
304
+ },
305
+ defaultVariants: {
306
+ orientation: 'horizontal'
307
+ }
308
+ });
309
+ export const tabsTabLabelVariants = cva('body-md', {
310
+ variants: {
311
+ state: {
312
+ // Selection state is a CVA input (not a `data-[]` selector) so inactive/active
313
+ // typography reconciles on native — `data-[state=active]:` on `Text` is unreliable
314
+ // there, and `font-sans-medium` / `font-sans-semibold` are the same family on iOS/Android
315
+ // so weight must come from `font-medium` / `font-semibold` instead.
316
+ inactive: Platform.select({
317
+ web: 'font-sans-medium text-content-secondary',
318
+ default: 'font-medium text-content-secondary'
319
+ }),
320
+ active: Platform.select({
321
+ web: 'font-sans-semibold text-content-primary',
322
+ default: 'font-semibold text-content-primary'
323
+ })
324
+ }
325
+ },
326
+ defaultVariants: {
327
+ state: 'inactive'
328
+ }
329
+ });
330
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","StyleSheet","cva","DISABLED_CURSOR","TRANSITION_COLORS","SOLID_RADIUS","SOLID_TRACK_RADIUS","SOLID_VERTICAL_TRACK_RADIUS","OUTLINE_TRACK_THICKNESS","OUTLINE_INDICATOR_THICKNESS","TABS_INDICATOR_TRANSITION_MS","TABS_SCROLL_FADE_SIZE","TABS_SOLID_SCROLL_FADE_SIZE","INDICATOR_BLEED","INDICATOR_BLEED_VERTICAL","tabsStyles","create","solidTrack","borderRadius","solidTrackVertical","solidShell","overflow","horizontalScrollContent","paddingHorizontal","paddingVertical","horizontalScrollViewBleed","marginVertical","outlineIndicator","zIndex","outlineIndicatorHorizontal","bottom","outlineIndicatorVertical","left","solidIndicator","solidTabPressable","tabsRootVariants","variants","orientation","horizontal","vertical","defaultVariants","tabsListVariants","tabsListTrackVariants","variant","outline","solid","scrollable","true","false","compoundVariants","className","tabsListSolidShellVariants","tabsListSolidShellBgVariants","tabsListScrollViewVariants","tabsListScrollContainerVariants","tabsListScrollButtonVariants","select","default","web","tabsListSolidScrollButtonVariants","tabsListSolidScrollButtonSlotVariants","position","start","end","tabsOutlineTrackVariants","tabsIndicatorVariants","tabsTabVariants","join","tabsPanelVariants","tabsTabLabelVariants","state","inactive","active"],"sourceRoot":"../../../../src","sources":["components/Tabs/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,wBAAwB;;AAE3E;AACA;;AAGA;AACA;AACA,MAAMC,YAAY,GAAG,cAAc;;AAEnC;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,IAAI;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,EAAE;;AAEtC;AACA,MAAMC,uBAAuB,GAAG,CAAC;AACjC;AACA,OAAO,MAAMC,2BAA2B,GAAG,CAAC;;AAE5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,GAAG;;AAE/C;AACA,OAAO,MAAMC,qBAAqB,GAAG,EAAE;;AAEvC;AACA;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,GAAG,EAAE;;AAE7C;AACA;AACA;A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AE;EAAa;AAC/C,CAAC,CAAC;AAEF,OAAO,MAAMgC,oBAAoB,GAAGnE,GAAG,CAAC,SAAS,EAAE;EACjDkC,QAAQ,EAAE;IACRkC,KAAK,EAAE;MACL;MACA;MACA;MACA;MACAC,QAAQ,EAAEvE,QAAQ,CAACwD,MAAM,CAAC;QACxBE,GAAG,EAAE,yCAAyC;QAC9CD,OAAO,EAAE;MACX,CAAC,CAAC;MACFe,MAAM,EAAExE,QAAQ,CAACwD,MAAM,CAAC;QACtBE,GAAG,EAAE,yCAAyC;QAC9CD,OAAO,EAAE;MACX,CAAC;IACH;EACF,CAAC;EACDjB,eAAe,EAAE;IAAE8B,KAAK,EAAE;EAAW;AACvC,CAAC,CAAC","ignoreList":[]}
@@ -27,10 +27,12 @@ export * from './Skeleton';
27
27
  export * from './ProgressSegmented';
28
28
  export * from './Radio';
29
29
  export * from './ScopedTheme';
30
+ export * from './ScrollShadow';
30
31
  export * from './Select';
31
32
  export * from './Slider';
32
33
  export * from './VirtualizedList';
33
34
  export * from './Switch';
35
+ export * from './Tabs';
34
36
  export * from './Textarea';
35
37
  export * from './Tile';
36
38
  export * from './Toast';
@@ -1 +1 @@
1
- {"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,uBAAuB;AACrC,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7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B,cAAc,qBAAqB","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ViewStyle } from 'react-native';
3
+ import { type ScrollShadowVariantProps } from './styles';
4
+ import { type ScrollShadowCapability } from './useScrollShadow';
5
+ export type { ScrollShadowCapability };
6
+ export interface ScrollShadowProps extends ScrollShadowVariantProps {
7
+ children: ReactNode;
8
+ className?: string;
9
+ /**
10
+ * Tailwind `from-*` utility for edge overlays — match the surface behind the scroll area.
11
+ * Pair with a low opacity (e.g. `from-surface-secondary/40`) for a light fade.
12
+ * @default 'from-background/35'
13
+ */
14
+ fadeFromClassName?: string;
15
+ /**
16
+ * Shadow fade size in pixels.
17
+ * @default 64
18
+ */
19
+ size?: number;
20
+ /**
21
+ * Scroll offset before showing edge shadows.
22
+ * @default 0
23
+ */
24
+ offset?: number;
25
+ onCapabilityChange?: (capability: ScrollShadowCapability) => void;
26
+ style?: ViewStyle;
27
+ }
28
+ export declare function ScrollShadow({ children, className, fadeFromClassName, hideScrollBar, orientation, offset, onCapabilityChange, size, style, }: ScrollShadowProps): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScrollShadow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAmB,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAClE,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAWD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,iBAAwC,EACxC,aAAqB,EACrB,WAA0B,EAC1B,MAAU,EACV,kBAAkB,EAClB,IAAS,EACT,KAAK,GACN,EAAE,iBAAiB,2CA+DnB"}
@@ -0,0 +1,12 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export declare const scrollShadowVariants: (props?: ({
3
+ orientation?: "vertical" | "horizontal" | null | undefined;
4
+ hideScrollBar?: boolean | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export declare const scrollShadowContainerVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ export declare const scrollShadowOverlayVariants: (props?: ({
8
+ orientation?: "vertical" | "horizontal" | null | undefined;
9
+ edge?: "end" | "start" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ export type ScrollShadowVariantProps = VariantProps<typeof scrollShadowVariants>;
12
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ScrollShadow/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,oBAAoB;;;8EAe/B,CAAC;AAEH,eAAO,MAAM,6BAA6B,oFAAiC,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;;8EAiCtC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
2
+ export interface ScrollShadowCapability {
3
+ canScrollBefore: boolean;
4
+ canScrollAfter: boolean;
5
+ }
6
+ export interface UseScrollShadowOptions {
7
+ orientation?: 'horizontal' | 'vertical';
8
+ offset?: number;
9
+ onCapabilityChange?: (capability: ScrollShadowCapability) => void;
10
+ }
11
+ export declare function useScrollShadow({ orientation, offset, onCapabilityChange, }?: UseScrollShadowOptions): {
12
+ capability: ScrollShadowCapability;
13
+ handleLayout: (event: LayoutChangeEvent) => void;
14
+ handleContentSizeChange: (width: number, height: number) => void;
15
+ handleScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
16
+ };
17
+ //# sourceMappingURL=useScrollShadow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollShadow.d.ts","sourceRoot":"","sources":["../../../../src/components/ScrollShadow/useScrollShadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE/F,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACnE;AA2BD,wBAAgB,eAAe,CAAC,EAC9B,WAA0B,EAC1B,MAAU,EACV,kBAAkB,GACnB,GAAE,sBAA2B;;0BA4BlB,iBAAiB;qCASjB,MAAM,UAAU,MAAM;0BAQtB,oBAAoB,CAAC,iBAAiB,CAAC;EAqBlD"}
@@ -0,0 +1,48 @@
1
+ import { type ReactNode } from 'react';
2
+ import { Text, View, type TextProps, type ViewProps } from 'react-native';
3
+ import { type ITabPanelProps, type ITabProps, type ITabsListProps, type ITabsProps } from '@cdx-ui/primitives';
4
+ import { type TabsVariant } from './styles';
5
+ export type { TabsVariant };
6
+ export interface TabsProps extends Omit<ViewProps, 'children'>, ITabsProps {
7
+ /** `solid` (default) slides a filled indicator behind the active tab; `outline` draws a sliding line indicator. Styled per Forge DS SegmentedControl (solid). */
8
+ variant?: TabsVariant;
9
+ className?: string;
10
+ }
11
+ declare const TabsRoot: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<View>>;
12
+ export interface TabsListProps extends ITabsListProps {
13
+ asChild?: boolean;
14
+ className?: string;
15
+ /**
16
+ * When `orientation="horizontal"`, scroll tab triggers if they overflow the list width.
17
+ * Vertical lists do not scroll — tabs stack in a column (matches HeroUI / ARIA scrollable
18
+ * tablist patterns, which are horizontal-only).
19
+ * @default true
20
+ */
21
+ scrollable?: boolean;
22
+ showsHorizontalScrollIndicator?: boolean;
23
+ }
24
+ declare const TabsList: import("react").ForwardRefExoticComponent<TabsListProps & import("react").RefAttributes<View>>;
25
+ export interface TabsTabProps extends Omit<ITabProps, 'children'> {
26
+ asChild?: boolean;
27
+ className?: string;
28
+ children?: ReactNode;
29
+ }
30
+ declare const TabsTab: import("react").ForwardRefExoticComponent<TabsTabProps & import("react").RefAttributes<View>>;
31
+ export interface TabsTabLabelProps extends TextProps {
32
+ asChild?: boolean;
33
+ className?: string;
34
+ }
35
+ declare const TabsTabLabel: import("react").ForwardRefExoticComponent<TabsTabLabelProps & import("react").RefAttributes<Text>>;
36
+ export interface TabsPanelProps extends ITabPanelProps {
37
+ asChild?: boolean;
38
+ className?: string;
39
+ }
40
+ declare const TabsPanel: import("react").ForwardRefExoticComponent<TabsPanelProps & import("react").RefAttributes<View>>;
41
+ type TabsCompoundComponent = typeof TabsRoot & {
42
+ List: typeof TabsList;
43
+ Tab: typeof TabsTab;
44
+ TabLabel: typeof TabsTabLabel;
45
+ Panel: typeof TabsPanel;
46
+ };
47
+ export declare const Tabs: TabsCompoundComponent;
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,IAAI,EACJ,IAAI,EAEJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAUL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAqBL,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,WAAW,EAAE,CAAC;AAqD5B,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,UAAU;IACxE,iKAAiK;IACjK,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,4FAkBb,CAAC;AAQF,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED,QAAA,MAAM,QAAQ,gGAuYb,CAAC;AAQF,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,OAAO,+FAyCZ,CAAC;AAQF,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,oGAoBjB,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,iGAiBd,CAAC;AAQF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,IAAI,EAAE,OAAO,QAAQ,CAAC;IACtB,GAAG,EAAE,OAAO,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B,KAAK,EAAE,OAAO,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,IAAI,EAKX,qBAAqB,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export type TabsVariant = 'outline' | 'solid';
3
+ /** Thickness of the 2px action-colored outline selection segment (animated size, not a class). */
4
+ export declare const OUTLINE_INDICATOR_THICKNESS = 2;
5
+ /**
6
+ * Shared duration (ms) for the indicator's `withTiming` glide (`index.tsx`) and the tab's
7
+ * `duration-300` transition class (below) — kept in sync so the focus ring doesn't snap in
8
+ * ahead of a still-sliding solid/outline indicator. Change both together.
9
+ */
10
+ export declare const TABS_INDICATOR_TRANSITION_MS = 300;
11
+ /** Outline horizontal scroll — narrow fade reads cleanly against the page background. */
12
+ export declare const TABS_SCROLL_FADE_SIZE = 32;
13
+ /**
14
+ * Solid horizontal scroll — wider fade so tabs dissolve smoothly into the track (and under the
15
+ * overlay chevron) instead of ending in a hard clip at the scroll viewport edge.
16
+ */
17
+ export declare const TABS_SOLID_SCROLL_FADE_SIZE = 40;
18
+ /**
19
+ * Numeric styles that can't be expressed as static Uniwind utility classes — solid track radius
20
+ * and outline indicator offset (`bottom-px` / `left-px` don't apply on Reanimated host views).
21
+ */
22
+ export declare const tabsStyles: {
23
+ solidTrack: {
24
+ borderRadius: number;
25
+ };
26
+ /** See `SOLID_VERTICAL_TRACK_RADIUS` — used instead of `solidTrack` for vertical solid tracks. */
27
+ solidTrackVertical: {
28
+ borderRadius: number;
29
+ };
30
+ /** Clips scroll ink + edge fades to the solid shell's rounded rect (className radius alone won't). */
31
+ solidShell: {
32
+ borderRadius: number;
33
+ overflow: "hidden";
34
+ };
35
+ horizontalScrollContent: {
36
+ paddingHorizontal: number;
37
+ paddingVertical: number;
38
+ };
39
+ horizontalScrollViewBleed: {
40
+ marginVertical: number;
41
+ };
42
+ outlineIndicator: {
43
+ zIndex: number;
44
+ };
45
+ outlineIndicatorHorizontal: {
46
+ bottom: number;
47
+ };
48
+ outlineIndicatorVertical: {
49
+ left: number;
50
+ };
51
+ solidIndicator: {
52
+ zIndex: number;
53
+ };
54
+ /** Clips press/hover feedback to the solid tab capsule (`rounded-full` alone is not enough on Pressable). */
55
+ solidTabPressable: {
56
+ borderRadius: number;
57
+ overflow: "hidden";
58
+ };
59
+ };
60
+ export declare const tabsRootVariants: (props?: ({
61
+ orientation?: "vertical" | "horizontal" | null | undefined;
62
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
63
+ export declare const tabsListVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
64
+ /** Flex track that hosts the rail, indicator, and tab triggers. */
65
+ export declare const tabsListTrackVariants: (props?: ({
66
+ orientation?: "vertical" | "horizontal" | null | undefined;
67
+ variant?: "solid" | "outline" | null | undefined;
68
+ scrollable?: boolean | null | undefined;
69
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
70
+ /**
71
+ * Viewport-sized solid shell for horizontal scroll — bg is a separate layer so overflow can stay
72
+ * visible. `py-1` (4px) matches the non-scrolling track's `p-1` exactly, so both the scrollable
73
+ * and non-scrollable solid paths land on the same 40px whole-tablist height (32px tab + 4px top
74
+ * + 4px bottom). `h-10`/`max-h-10`/`min-h-10` pin it explicitly so a taller-than-expected label
75
+ * line-height can't inflate the shell. `INDICATOR_BLEED_VERTICAL` (the ScrollView's own top/bottom
76
+ * reserved ink room, above) is kept equal to this `py-1` so the shell's `overflow: hidden` clip
77
+ * boundary lines up with where that reserved ink stops.
78
+ */
79
+ export declare const tabsListSolidShellVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
80
+ export declare const tabsListSolidShellBgVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
81
+ export declare const tabsListScrollViewVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
82
+ export declare const tabsListScrollContainerVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
83
+ export declare const tabsListScrollButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
84
+ export declare const tabsListSolidScrollButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
85
+ export declare const tabsListSolidScrollButtonSlotVariants: (props?: ({
86
+ position?: "end" | "start" | null | undefined;
87
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
88
+ export declare const tabsOutlineTrackVariants: (props?: ({
89
+ orientation?: "vertical" | "horizontal" | null | undefined;
90
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
91
+ export declare const tabsIndicatorVariants: (props?: ({
92
+ orientation?: "vertical" | "horizontal" | null | undefined;
93
+ variant?: "solid" | "outline" | null | undefined;
94
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
95
+ export declare const tabsTabVariants: (props?: ({
96
+ orientation?: "vertical" | "horizontal" | null | undefined;
97
+ variant?: "solid" | "outline" | null | undefined;
98
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
99
+ export declare const tabsPanelVariants: (props?: ({
100
+ orientation?: "vertical" | "horizontal" | null | undefined;
101
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
102
+ export declare const tabsTabLabelVariants: (props?: ({
103
+ state?: "active" | "inactive" | null | undefined;
104
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
105
+ export type TabsTabVariantProps = VariantProps<typeof tabsTabVariants>;
106
+ export type TabsListTrackVariantProps = VariantProps<typeof tabsListTrackVariants>;
107
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAuB9C,kGAAkG;AAClG,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAqB9C;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;IAIrB,kGAAkG;;;;IAIlG,sGAAsG;;;;;;;;;;;;;;;;;;;;;;;;IAwBtG,6GAA6G;;;;;CAK7G,CAAC;AAEH,eAAO,MAAM,gBAAgB;;8EAQ3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,oFAA4B,CAAC;AAE1D,mEAAmE;AACnE,eAAO,MAAM,qBAAqB;;;;8EAkChC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,oFAErC,CAAC;AAEH,eAAO,MAAM,4BAA4B,oFAAiD,CAAC;AAE3F,eAAO,MAAM,0BAA0B,oFAA6B,CAAC;AAErE,eAAO,MAAM,+BAA+B,oFAAmC,CAAC;AAGhF,eAAO,MAAM,4BAA4B,oFAOvC,CAAC;AAIH,eAAO,MAAM,iCAAiC,oFAO5C,CAAC;AAEH,eAAO,MAAM,qCAAqC;;8EAUjD,CAAC;AAIF,eAAO,MAAM,wBAAwB;;8EAQnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;8EA0BhC,CAAC;AAEH,eAAO,MAAM,eAAe;;;8EAuD3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;8EAQ5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;8EAkB/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AACvE,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -25,10 +25,12 @@ export * from './Skeleton';
25
25
  export * from './ProgressSegmented';
26
26
  export * from './Radio';
27
27
  export * from './ScopedTheme';
28
+ export * from './ScrollShadow';
28
29
  export * from './Select';
29
30
  export * from './Slider';
30
31
  export * from './VirtualizedList';
31
32
  export * from './Switch';
33
+ export * from './Tabs';
32
34
  export * from './Textarea';
33
35
  export * from './Tile';
34
36
  export * from './Toast';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe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AU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/components",
3
- "version": "0.0.1-beta.121",
3
+ "version": "0.0.1-beta.122",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -76,9 +76,9 @@
76
76
  "class-variance-authority": "^0.7.1",
77
77
  "react-native-reanimated-carousel": "5.0.0-beta.5",
78
78
  "uniwind": "1.10.0",
79
- "@cdx-ui/primitives": "0.0.1-beta.121",
80
- "@cdx-ui/icons": "0.0.1-beta.121",
81
- "@cdx-ui/utils": "0.0.1-beta.121"
79
+ "@cdx-ui/utils": "0.0.1-beta.122",
80
+ "@cdx-ui/icons": "0.0.1-beta.122",
81
+ "@cdx-ui/primitives": "0.0.1-beta.122"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@react-navigation/bottom-tabs": "*",