panelui-native 0.9.0 → 0.12.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 (105) hide show
  1. package/README.md +5 -3
  2. package/lib/module/components/bottom-sheet/index.js +38 -2
  3. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  4. package/lib/module/components/button/index.js +19 -1
  5. package/lib/module/components/button/index.js.map +1 -1
  6. package/lib/module/components/frame/index.js +128 -15
  7. package/lib/module/components/frame/index.js.map +1 -1
  8. package/lib/module/components/input/index.js +107 -15
  9. package/lib/module/components/input/index.js.map +1 -1
  10. package/lib/module/components/popover/index.js +22 -11
  11. package/lib/module/components/popover/index.js.map +1 -1
  12. package/lib/module/components/progress/index.js +52 -2
  13. package/lib/module/components/progress/index.js.map +1 -1
  14. package/lib/module/components/radio-group/index.js +34 -7
  15. package/lib/module/components/radio-group/index.js.map +1 -1
  16. package/lib/module/components/section-rail/index.js +355 -0
  17. package/lib/module/components/section-rail/index.js.map +1 -0
  18. package/lib/module/components/select/index.js +245 -56
  19. package/lib/module/components/select/index.js.map +1 -1
  20. package/lib/module/components/slider/index.js +355 -0
  21. package/lib/module/components/slider/index.js.map +1 -0
  22. package/lib/module/components/switch/index.js +10 -1
  23. package/lib/module/components/switch/index.js.map +1 -1
  24. package/lib/module/components/tabs/index.js +186 -16
  25. package/lib/module/components/tabs/index.js.map +1 -1
  26. package/lib/module/components/toggle-button/index.js +297 -0
  27. package/lib/module/components/toggle-button/index.js.map +1 -0
  28. package/lib/module/hooks/index.js +1 -0
  29. package/lib/module/hooks/index.js.map +1 -1
  30. package/lib/module/hooks/use-keyboard-avoidance.js +57 -8
  31. package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
  32. package/lib/module/hooks/use-scroll-sections.js +89 -0
  33. package/lib/module/hooks/use-scroll-sections.js.map +1 -0
  34. package/lib/module/index.js +4 -1
  35. package/lib/module/index.js.map +1 -1
  36. package/lib/module/native/index.js.map +1 -1
  37. package/lib/module/primitives/keyboard-avoider.js +2 -0
  38. package/lib/module/primitives/keyboard-avoider.js.map +1 -1
  39. package/lib/module/utils/haptics.js +57 -0
  40. package/lib/module/utils/haptics.js.map +1 -0
  41. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  42. package/lib/typescript/src/components/button/index.d.ts +9 -4
  43. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  44. package/lib/typescript/src/components/frame/index.d.ts +47 -7
  45. package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
  46. package/lib/typescript/src/components/input/index.d.ts +113 -2
  47. package/lib/typescript/src/components/input/index.d.ts.map +1 -1
  48. package/lib/typescript/src/components/popover/index.d.ts +7 -1
  49. package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
  50. package/lib/typescript/src/components/progress/index.d.ts +33 -0
  51. package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
  52. package/lib/typescript/src/components/radio-group/index.d.ts +7 -0
  53. package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
  54. package/lib/typescript/src/components/section-rail/index.d.ts +115 -0
  55. package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -0
  56. package/lib/typescript/src/components/select/index.d.ts +46 -7
  57. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  58. package/lib/typescript/src/components/slider/index.d.ts +203 -0
  59. package/lib/typescript/src/components/slider/index.d.ts.map +1 -0
  60. package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
  61. package/lib/typescript/src/components/tabs/index.d.ts +46 -4
  62. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
  63. package/lib/typescript/src/components/toggle-button/index.d.ts +244 -0
  64. package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -0
  65. package/lib/typescript/src/hooks/index.d.ts +1 -0
  66. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  67. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +10 -1
  68. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
  69. package/lib/typescript/src/hooks/use-scroll-sections.d.ts +31 -0
  70. package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -0
  71. package/lib/typescript/src/index.d.ts +6 -3
  72. package/lib/typescript/src/index.d.ts.map +1 -1
  73. package/lib/typescript/src/native/index.d.ts +16 -1
  74. package/lib/typescript/src/native/index.d.ts.map +1 -1
  75. package/lib/typescript/src/primitives/keyboard-avoider.d.ts +8 -1
  76. package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
  77. package/lib/typescript/src/utils/haptics.d.ts +12 -0
  78. package/lib/typescript/src/utils/haptics.d.ts.map +1 -0
  79. package/package.json +5 -1
  80. package/src/components/bottom-sheet/index.tsx +38 -2
  81. package/src/components/button/index.tsx +26 -5
  82. package/src/components/frame/index.tsx +175 -29
  83. package/src/components/input/index.tsx +122 -16
  84. package/src/components/popover/index.tsx +49 -24
  85. package/src/components/progress/index.tsx +81 -1
  86. package/src/components/radio-group/index.tsx +55 -8
  87. package/src/components/section-rail/index.tsx +459 -0
  88. package/src/components/select/index.tsx +265 -52
  89. package/src/components/slider/index.tsx +371 -0
  90. package/src/components/switch/index.tsx +8 -1
  91. package/src/components/tabs/index.tsx +208 -28
  92. package/src/components/toggle-button/index.tsx +374 -0
  93. package/src/hooks/index.ts +5 -0
  94. package/src/hooks/use-keyboard-avoidance.ts +73 -7
  95. package/src/hooks/use-scroll-sections.ts +127 -0
  96. package/src/index.ts +37 -6
  97. package/src/native/index.ts +13 -1
  98. package/src/primitives/keyboard-avoider.tsx +9 -1
  99. package/src/utils/haptics.ts +63 -0
  100. package/theme.css +6 -2
  101. package/lib/module/components/inline-select/index.js +0 -284
  102. package/lib/module/components/inline-select/index.js.map +0 -1
  103. package/lib/typescript/src/components/inline-select/index.d.ts +0 -48
  104. package/lib/typescript/src/components/inline-select/index.d.ts.map +0 -1
  105. package/src/components/inline-select/index.tsx +0 -332
@@ -79,6 +79,12 @@ export interface PopoverContentProps extends ViewProps {
79
79
  * `full` spans the safe area, and a number is that many pixels.
80
80
  */
81
81
  width?: number | 'trigger' | 'full' | 'content-fit';
82
+ /**
83
+ * Floor for the panel's width, in pixels. Worth setting with
84
+ * `width="trigger"`, where a narrow trigger would otherwise squeeze the
85
+ * content into a column.
86
+ */
87
+ minWidth?: number;
82
88
  /** Tap outside the panel closes it. Default true. */
83
89
  dismissible?: boolean;
84
90
  /**
@@ -89,7 +95,7 @@ export interface PopoverContentProps extends ViewProps {
89
95
  blur?: boolean;
90
96
  children?: ReactNode;
91
97
  }
92
- declare function PopoverContent({ className, placement, align, offset, alignOffset, width, dismissible, blur, children, ...props }: PopoverContentProps): import("react").JSX.Element | null;
98
+ declare function PopoverContent({ className, placement, align, offset, alignOffset, width, minWidth, dismissible, blur, children, onLayout: onLayoutProp, style, ...props }: PopoverContentProps): import("react").JSX.Element | null;
93
99
  export interface PopoverArrowProps extends ViewProps {
94
100
  className?: string;
95
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAatB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAU7D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAwBtD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,cAAc,CAAC;AAY7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAA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ACtB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,mBAAmB,sCAqKrB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,sCA2CtE;AAiBD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;CACpE;AAED,uDAAuD;AACvD,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB;cAJhB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;wDAchE;AA2GD,eAAO,MAAM,OAAO;;;;;kCAzI2B,SAAS;;;;kCAUH,SAAS;;;;CAsI5D,CAAC"}
@@ -35,6 +35,8 @@ declare const progressVariants: import("tailwind-variants").TVReturnType<{
35
35
  };
36
36
  };
37
37
  }, {
38
+ root: string;
39
+ header: string;
38
40
  track: string;
39
41
  indicator: string;
40
42
  }, undefined, {
@@ -72,6 +74,8 @@ declare const progressVariants: import("tailwind-variants").TVReturnType<{
72
74
  };
73
75
  };
74
76
  }, {
77
+ root: string;
78
+ header: string;
75
79
  track: string;
76
80
  indicator: string;
77
81
  }, import("tailwind-variants").TVReturnType<{
@@ -109,6 +113,8 @@ declare const progressVariants: import("tailwind-variants").TVReturnType<{
109
113
  };
110
114
  };
111
115
  }, {
116
+ root: string;
117
+ header: string;
112
118
  track: string;
113
119
  indicator: string;
114
120
  }, undefined, unknown, unknown, undefined>>;
@@ -121,11 +127,38 @@ export interface ProgressProps extends Omit<ViewProps, 'children'>, ProgressVari
121
127
  indeterminate?: boolean;
122
128
  /** Extra classes for the moving indicator. */
123
129
  indicatorClassName?: string;
130
+ /**
131
+ * Caption drawn above the track, on the left. Supplying it (or
132
+ * `showValueLabel`) wraps the bar in a header row; the track alone renders
133
+ * otherwise.
134
+ */
135
+ label?: string;
136
+ /**
137
+ * Draw the percentage above the track, on the right. Hidden while
138
+ * `indeterminate` — there is nothing meaningful to show.
139
+ */
140
+ showValueLabel?: boolean;
141
+ /**
142
+ * Text for the value label. Overrides the formatted percentage — use it for
143
+ * a byte count, a step tally, anything that is not a bare percent.
144
+ */
145
+ valueLabel?: string;
146
+ /**
147
+ * Format the value label as a fraction of the whole with `Intl.NumberFormat`
148
+ * — e.g. `{ style: 'currency', currency: 'USD' }`. Falls back to a rounded
149
+ * percent when omitted.
150
+ */
151
+ formatOptions?: Intl.NumberFormatOptions;
152
+ /** Extra classes for the label + value-label row. */
153
+ headerClassName?: string;
124
154
  }
125
155
  /**
126
156
  * Determinate or indeterminate progress bar. The fill width (determinate) and
127
157
  * the sliding bar (indeterminate) are both driven on the UI thread, so updates
128
158
  * never re-render past the value change itself.
159
+ *
160
+ * Pass `label` or `showValueLabel` to caption the bar with a header row; the
161
+ * bare track renders when neither is set, so existing call sites are untouched.
129
162
  */
130
163
  export declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<View>>;
131
164
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW5E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM1D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAuBpB,CAAC;AAEH,KAAK,oBAAoB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC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a,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACzC,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA0BD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,gGA2GpB,CAAC"}
@@ -21,6 +21,7 @@
21
21
  import { type ReactNode } from 'react';
22
22
  import { View, type ViewProps } from 'react-native';
23
23
  type RadioVariant = 'dot' | 'card';
24
+ type RadioOrientation = 'vertical' | 'horizontal';
24
25
  export interface RadioGroupProps extends ViewProps {
25
26
  className?: string;
26
27
  value?: string;
@@ -32,6 +33,12 @@ export interface RadioGroupProps extends ViewProps {
32
33
  * settings choice where each option carries a description.
33
34
  */
34
35
  variant?: RadioVariant;
36
+ /**
37
+ * `horizontal` lays the options out along a row that wraps — for two or
38
+ * three short choices, where a stacked list wastes the width and reads as
39
+ * longer than it is.
40
+ */
41
+ orientation?: RadioOrientation;
35
42
  children: ReactNode;
36
43
  }
37
44
  export interface RadioGroupItemProps {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radio-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW/D,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AA4CnC,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAyBD,MAAM,WAAW,mBAAmB;I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CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA+ED,eAAO,MAAM,UAAU;;CAErB,CAAC;AAEH,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * SectionRail — a floating navigator for a long screen.
3
+ *
4
+ * A stack of short bars pinned to one edge, one per section, that expands into
5
+ * a labelled panel when you touch it. Collapsed it is a position indicator you
6
+ * can read at a glance without giving up any content width; expanded it is a
7
+ * list you can jump from.
8
+ *
9
+ * The bars are deliberately unlabelled. A permanent list of section titles
10
+ * down the side of a phone screen is either too small to read or too wide to
11
+ * keep — the bars carry only the two things that survive at that size, which
12
+ * section you are in and roughly how deep it sits.
13
+ *
14
+ * ```tsx
15
+ * <SectionRail value={active} onValueChange={scrollTo}>
16
+ * <SectionRail.Trigger>
17
+ * <SectionRail.Bar value="intro" />
18
+ * <SectionRail.Bar value="setup" level={1} />
19
+ * </SectionRail.Trigger>
20
+ * <SectionRail.Content>
21
+ * <SectionRail.Item value="intro">Introduction</SectionRail.Item>
22
+ * <SectionRail.Item value="setup" level={1}>Setup</SectionRail.Item>
23
+ * </SectionRail.Content>
24
+ * </SectionRail>
25
+ * ```
26
+ *
27
+ * It floats: the root is absolutely positioned and lets touches through
28
+ * everywhere it is not drawing, so the content underneath still scrolls.
29
+ */
30
+ import { type ReactNode } from 'react';
31
+ import { type ViewProps } from 'react-native';
32
+ export type SectionRailPlacement = 'left' | 'right';
33
+ export type SectionRailAlign = 'center' | 'top' | 'bottom';
34
+ export interface SectionRailProps extends ViewProps {
35
+ className?: string;
36
+ /** Which edge the rail sits against. */
37
+ placement?: SectionRailPlacement;
38
+ /**
39
+ * Where along that edge it sits. `bottom` puts it in a corner, out of the
40
+ * way of the text — the panel then opens upward from the rail rather than
41
+ * centred on the screen.
42
+ */
43
+ align?: SectionRailAlign;
44
+ /**
45
+ * Tick under the finger on every change of section, however it was made —
46
+ * tapped in the panel, or scrolled past. Needs the optional `expo-haptics`
47
+ * package; without it this does nothing.
48
+ */
49
+ haptics?: boolean;
50
+ /** Active section id. Controlled — usually driven by a scroll handler. */
51
+ value?: string;
52
+ /** Starting section when uncontrolled. */
53
+ defaultValue?: string;
54
+ /** Fires when a section is chosen from the expanded panel. */
55
+ onValueChange?: (value: string) => void;
56
+ /** Controlled expansion. */
57
+ open?: boolean;
58
+ defaultOpen?: boolean;
59
+ onOpenChange?: (open: boolean) => void;
60
+ /**
61
+ * How long the panel stays up after a choice, so a mis-tap can be corrected
62
+ * without opening it again. Set 0 to close immediately.
63
+ */
64
+ closeDelay?: number;
65
+ /** Gap between the rail and the edge of the safe area. */
66
+ offset?: number;
67
+ children: ReactNode;
68
+ }
69
+ declare function SectionRailRoot({ className, placement, align, haptics, value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, closeDelay, offset, children, ...props }: SectionRailProps): import("react").JSX.Element;
70
+ export interface SectionRailTriggerProps extends ViewProps {
71
+ className?: string;
72
+ children: ReactNode;
73
+ }
74
+ /**
75
+ * The collapsed rail. Wraps the bars and opens the panel on press — one target
76
+ * over the whole stack rather than one per bar, because a 3px bar is not
77
+ * something anyone can hit.
78
+ */
79
+ declare function SectionRailTrigger({ className, children, ...props }: SectionRailTriggerProps): import("react").JSX.Element;
80
+ export interface SectionRailBarProps {
81
+ className?: string;
82
+ /** Section this bar stands for. Matches the root's `value`. */
83
+ value: string;
84
+ /** Nesting depth. Deeper levels draw a shorter bar. */
85
+ level?: number;
86
+ }
87
+ /** One section, drawn as a bar. Widens and brightens when it is the active one. */
88
+ declare function SectionRailBar({ className, value, level }: SectionRailBarProps): import("react").JSX.Element;
89
+ export interface SectionRailContentProps extends ViewProps {
90
+ className?: string;
91
+ children: ReactNode;
92
+ }
93
+ /**
94
+ * The expanded panel. Mounted through a portal so it floats over everything,
95
+ * and unmounted after it fades out rather than left behind hidden.
96
+ */
97
+ declare function SectionRailContent({ className, children, ...props }: SectionRailContentProps): import("react").JSX.Element | null;
98
+ export interface SectionRailItemProps {
99
+ className?: string;
100
+ /** Section this row jumps to. Matches the root's `value`. */
101
+ value: string;
102
+ /** Nesting depth. Indents the row to match its bar. */
103
+ level?: number;
104
+ children: ReactNode;
105
+ }
106
+ /** A labelled row in the expanded panel. */
107
+ declare function SectionRailItem({ className, value, level, children }: SectionRailItemProps): import("react").JSX.Element;
108
+ export declare const SectionRail: typeof SectionRailRoot & {
109
+ Trigger: typeof SectionRailTrigger;
110
+ Bar: typeof SectionRailBar;
111
+ Content: typeof SectionRailContent;
112
+ Item: typeof SectionRailItem;
113
+ };
114
+ export {};
115
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/section-rail/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AA0B3E,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AA6B3D,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE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AAQ,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,sCAuCrF;AAwCD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,4CAA4C;AAC5C,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAS,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BA0BvF;AAED,eAAO,MAAM,WAAW;;;;;CAKtB,CAAC"}
@@ -1,26 +1,65 @@
1
+ /**
2
+ * Select — a picker with one trigger and three ways of showing its options.
3
+ *
4
+ * Which one is right depends on what surrounds the trigger, not on what the
5
+ * options are, which is why it is a prop rather than three components:
6
+ *
7
+ * - `sheet` (default) takes the bottom of the screen. Best for a long list, or
8
+ * on a small screen where an anchored panel would cover the thing you are
9
+ * choosing for.
10
+ * - `inline` expands the list in normal layout flow. Everything below moves
11
+ * down. Right inside a settings list, where that reads as the row growing;
12
+ * wrong anywhere the shift is jarring.
13
+ * - `overlay` floats the list above the page through a portal, anchored to the
14
+ * trigger and flipped above it when there is no room below. Nothing else on
15
+ * the screen moves.
16
+ *
17
+ * ```tsx
18
+ * <Select value={region} onValueChange={setRegion} presentation="overlay">
19
+ * <Select.Item value="us" label="United States" />
20
+ * <Select.Item value="eu" label="Europe" />
21
+ * </Select>
22
+ * ```
23
+ */
1
24
  import { type ReactNode } from 'react';
25
+ export type SelectPresentation = 'sheet' | 'inline' | 'overlay';
2
26
  export interface SelectItemProps {
3
27
  value: string;
4
28
  label: string;
5
29
  }
6
- /** Declarative option. Rendered inside the picker sheet. */
30
+ /** Declarative option. Rendered inside whichever surface is presenting. */
7
31
  declare function SelectItem({ value, label }: SelectItemProps): import("react").JSX.Element;
8
32
  export interface SelectProps {
9
33
  className?: string;
10
34
  value?: string;
11
35
  onValueChange: (value: string) => void;
12
36
  placeholder?: string;
13
- /** Sheet title shown above the options. */
14
- title?: string;
15
37
  disabled?: boolean;
16
38
  /**
17
- * Render the platform's own picker instead of the trigger-and-sheet pair.
39
+ * Where the options appear. `sheet` takes the bottom of the screen, `inline`
40
+ * expands the list in layout flow, `overlay` floats it above the page
41
+ * anchored to the trigger.
42
+ */
43
+ presentation?: SelectPresentation;
44
+ /** Sheet title shown above the options. `sheet` presentation only. */
45
+ title?: string;
46
+ /**
47
+ * Width of the floating list. `trigger` matches the trigger, `content` sizes
48
+ * to the longest option, or pass a pixel value. `overlay` only.
49
+ */
50
+ contentWidth?: 'trigger' | 'content' | number;
51
+ /** Gap between the trigger and the floating list. `overlay` only. */
52
+ offset?: number;
53
+ /** Called when the options open or close. */
54
+ onOpenChange?: (open: boolean) => void;
55
+ /**
56
+ * Render the platform's own picker instead of the trigger-and-list pair.
18
57
  * Requires the optional `@expo/ui` package; without it this prop does
19
58
  * nothing.
20
59
  *
21
60
  * **Theme tokens do not apply** — the platform draws the picker, so
22
- * `className` and `title` are ignored. `Select.Item` children still declare
23
- * the options.
61
+ * `className`, `title` and `presentation` are ignored. `Select.Item`
62
+ * children still declare the options.
24
63
  */
25
64
  native?: boolean;
26
65
  /**
@@ -30,7 +69,7 @@ export interface SelectProps {
30
69
  nativeAppearance?: 'menu' | 'wheel';
31
70
  children: ReactNode;
32
71
  }
33
- declare function SelectRoot({ className, value, onValueChange, placeholder, title, disabled, native, nativeAppearance, children, }: SelectProps): import("react").JSX.Element;
72
+ declare function SelectRoot({ className, value, onValueChange, placeholder, disabled, presentation, title, contentWidth, offset, onOpenChange, native, nativeAppearance, children, }: SelectProps): import("react").JSX.Element;
34
73
  export declare const Select: typeof SelectRoot & {
35
74
  Item: typeof SelectItem;
36
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SA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EAAE,EAAE,eAAe,+BA4BpD;AAUD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9C,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,aAAa,EACb,WAAgC,EAChC,QAAQ,EACR,YAAsB,EACtB,KAAK,EACL,YAAwB,EACxB,MAAU,EACV,YAAY,EACZ,MAAM,EACN,gBAAyB,EACzB,QAAQ,GACT,EAAE,WAAW,+BA8Nb;AAED,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
@@ -0,0 +1,203 @@
1
+ import { View } from 'react-native';
2
+ import { type VariantProps } from 'tailwind-variants';
3
+ declare const sliderVariants: import("tailwind-variants").TVReturnType<{
4
+ color: {
5
+ primary: {
6
+ fill: string;
7
+ thumb: string;
8
+ };
9
+ success: {
10
+ fill: string;
11
+ thumb: string;
12
+ };
13
+ warning: {
14
+ fill: string;
15
+ thumb: string;
16
+ };
17
+ destructive: {
18
+ fill: string;
19
+ thumb: string;
20
+ };
21
+ info: {
22
+ fill: string;
23
+ thumb: string;
24
+ };
25
+ };
26
+ size: {
27
+ sm: {
28
+ track: string;
29
+ thumb: string;
30
+ };
31
+ md: {
32
+ track: string;
33
+ thumb: string;
34
+ };
35
+ lg: {
36
+ track: string;
37
+ thumb: string;
38
+ };
39
+ };
40
+ disabled: {
41
+ true: {
42
+ root: string;
43
+ };
44
+ };
45
+ }, {
46
+ root: string;
47
+ header: string;
48
+ label: string;
49
+ value: string;
50
+ track: string;
51
+ fill: string;
52
+ thumb: string;
53
+ knob: string;
54
+ }, undefined, {
55
+ color: {
56
+ primary: {
57
+ fill: string;
58
+ thumb: string;
59
+ };
60
+ success: {
61
+ fill: string;
62
+ thumb: string;
63
+ };
64
+ warning: {
65
+ fill: string;
66
+ thumb: string;
67
+ };
68
+ destructive: {
69
+ fill: string;
70
+ thumb: string;
71
+ };
72
+ info: {
73
+ fill: string;
74
+ thumb: string;
75
+ };
76
+ };
77
+ size: {
78
+ sm: {
79
+ track: string;
80
+ thumb: string;
81
+ };
82
+ md: {
83
+ track: string;
84
+ thumb: string;
85
+ };
86
+ lg: {
87
+ track: string;
88
+ thumb: string;
89
+ };
90
+ };
91
+ disabled: {
92
+ true: {
93
+ root: string;
94
+ };
95
+ };
96
+ }, {
97
+ root: string;
98
+ header: string;
99
+ label: string;
100
+ value: string;
101
+ track: string;
102
+ fill: string;
103
+ thumb: string;
104
+ knob: string;
105
+ }, import("tailwind-variants").TVReturnType<{
106
+ color: {
107
+ primary: {
108
+ fill: string;
109
+ thumb: string;
110
+ };
111
+ success: {
112
+ fill: string;
113
+ thumb: string;
114
+ };
115
+ warning: {
116
+ fill: string;
117
+ thumb: string;
118
+ };
119
+ destructive: {
120
+ fill: string;
121
+ thumb: string;
122
+ };
123
+ info: {
124
+ fill: string;
125
+ thumb: string;
126
+ };
127
+ };
128
+ size: {
129
+ sm: {
130
+ track: string;
131
+ thumb: string;
132
+ };
133
+ md: {
134
+ track: string;
135
+ thumb: string;
136
+ };
137
+ lg: {
138
+ track: string;
139
+ thumb: string;
140
+ };
141
+ };
142
+ disabled: {
143
+ true: {
144
+ root: string;
145
+ };
146
+ };
147
+ }, {
148
+ root: string;
149
+ header: string;
150
+ label: string;
151
+ value: string;
152
+ track: string;
153
+ fill: string;
154
+ thumb: string;
155
+ knob: string;
156
+ }, undefined, unknown, unknown, undefined>>;
157
+ type SliderVariantProps = VariantProps<typeof sliderVariants>;
158
+ export interface SliderProps extends Omit<SliderVariantProps, 'disabled'> {
159
+ className?: string;
160
+ /** Controlled value. Leave unset and pass `defaultValue` to run uncontrolled. */
161
+ value?: number;
162
+ /** Starting value when uncontrolled. */
163
+ defaultValue?: number;
164
+ /** Lower bound. */
165
+ min?: number;
166
+ /** Upper bound. */
167
+ max?: number;
168
+ /** Snap granularity. The value is always a multiple of `step` from `min`. */
169
+ step?: number;
170
+ /** Fires on every change while dragging — cheap updates only. */
171
+ onValueChange?: (value: number) => void;
172
+ /** Fires once when the gesture ends — the place for expensive side effects. */
173
+ onValueCommit?: (value: number) => void;
174
+ disabled?: boolean;
175
+ /**
176
+ * Render the platform's own slider instead of this one. Requires the
177
+ * optional `@expo/ui` package; without it this prop does nothing.
178
+ *
179
+ * **Theme tokens do not apply** — the platform draws the control, so
180
+ * `color`, `size` and the slot classNames are ignored. `label` and
181
+ * `showValue` still render the caption row above it, since that is ours.
182
+ */
183
+ native?: boolean;
184
+ /** Caption above the track. Also becomes the accessibility label. */
185
+ label?: string;
186
+ /** Show the current value on the caption row, opposite the label. */
187
+ showValue?: boolean;
188
+ /** Format the shown value. Defaults to the rounded number. */
189
+ formatValue?: (value: number) => string;
190
+ /** Extra classes for the caption row. */
191
+ headerClassName?: string;
192
+ /** Extra classes for the unfilled track. */
193
+ trackClassName?: string;
194
+ /** Extra classes for the filled portion. */
195
+ fillClassName?: string;
196
+ /** Extra classes for the draggable thumb. */
197
+ thumbClassName?: string;
198
+ /** Extra classes for the knob inside the thumb. */
199
+ knobClassName?: string;
200
+ }
201
+ export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<View>>;
202
+ export {};
203
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,EACL,IAAI,EAGL,MAAM,cAAc,CAAC;AAQtB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiB1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAsClB,CAAC;AAQH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAYD,eAAO,MAAM,MAAM,8FAsNlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBlB,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAkDlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBlB,CAAC;AAWH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAkDlB,CAAC"}
@@ -1,30 +1,72 @@
1
+ /**
2
+ * Tabs — segmented navigation between panels.
3
+ *
4
+ * The active tab is marked by one indicator that slides between measured
5
+ * trigger positions rather than by a style on each trigger. That is what makes
6
+ * the movement continuous: there is a single thing travelling, so a switch two
7
+ * tabs away reads as one gesture instead of two states swapping.
8
+ *
9
+ * ```tsx
10
+ * <Tabs defaultValue="account">
11
+ * <Tabs.List>
12
+ * <Tabs.Trigger value="account">Account</Tabs.Trigger>
13
+ * <Tabs.Trigger value="team" badge={<Badge>3</Badge>}>Team</Tabs.Trigger>
14
+ * </Tabs.List>
15
+ * <Tabs.Content value="account">…</Tabs.Content>
16
+ * </Tabs>
17
+ * ```
18
+ */
1
19
  import { type ReactNode } from 'react';
2
20
  import { type ViewProps } from 'react-native';
21
+ export type TabsVariant = 'segmented' | 'underline' | 'pill';
3
22
  export interface TabsProps extends ViewProps {
4
23
  className?: string;
5
24
  value?: string;
6
25
  onValueChange?: (value: string) => void;
7
26
  defaultValue: string;
27
+ /**
28
+ * `segmented` is a chip travelling inside a recessed track, `underline` is a
29
+ * rule under the active tab, `pill` is a filled chip on the page.
30
+ */
31
+ variant?: TabsVariant;
32
+ /**
33
+ * Keep inactive panels mounted and hidden instead of unmounting them, so a
34
+ * scroll position or a half-filled form survives a switch away and back.
35
+ * Costs the render of every panel up front.
36
+ */
37
+ keepMounted?: boolean;
8
38
  children: ReactNode;
9
39
  }
10
- declare function TabsRoot({ className, value, onValueChange, defaultValue, children, ...props }: TabsProps): import("react").JSX.Element;
40
+ declare function TabsRoot({ className, value, onValueChange, defaultValue, variant, keepMounted, children, ...props }: TabsProps): import("react").JSX.Element;
11
41
  export interface TabsListProps extends ViewProps {
12
42
  className?: string;
43
+ /**
44
+ * Lay the triggers out at their natural widths inside a horizontal scroller
45
+ * instead of splitting the row between them. For more tabs than fit — which
46
+ * a fixed row answers by crushing every label.
47
+ */
48
+ scrollable?: boolean;
13
49
  children: ReactNode;
14
50
  }
15
- declare function TabsList({ className, children, ...props }: TabsListProps): import("react").JSX.Element;
51
+ declare function TabsList({ className, scrollable, children, ...props }: TabsListProps): import("react").JSX.Element;
16
52
  export interface TabsTriggerProps {
17
53
  className?: string;
18
54
  value: string;
55
+ /** Rendered before the label. */
56
+ icon?: ReactNode;
57
+ /** Rendered after the label — a count, a dot, a status. */
58
+ badge?: ReactNode;
59
+ /** Unselectable, dimmed, and announced as disabled. */
60
+ disabled?: boolean;
19
61
  children: ReactNode;
20
62
  }
21
- declare function TabsTrigger({ className, value, children }: TabsTriggerProps): import("react").JSX.Element;
63
+ declare function TabsTrigger({ className, value, icon, badge, disabled, children, }: TabsTriggerProps): import("react").JSX.Element;
22
64
  export interface TabsContentProps extends ViewProps {
23
65
  className?: string;
24
66
  value: string;
25
67
  children: ReactNode;
26
68
  }
27
- declare function TabsContent({ className, value, children, ...props }: TabsContentProps): import("react").JSX.Element | null;
69
+ declare function TabsContent({ className, value, children, style, ...props }: TabsContentProps): import("react").JSX.Element | null;
28
70
  export declare const Tabs: typeof TabsRoot & {
29
71
  List: typeof TabsList;
30
72
  Trigger: typeof TabsTrigger;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAkCvF,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,KAAK,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,+BAoCX;AAyCD,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAWjE;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAiCpE;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,WA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