panelui-native 0.53.0 → 0.56.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 (40) hide show
  1. package/README.md +4 -1
  2. package/lib/module/components/combobox/index.js +61 -7
  3. package/lib/module/components/combobox/index.js.map +1 -1
  4. package/lib/module/components/hex-chart/index.js +765 -0
  5. package/lib/module/components/hex-chart/index.js.map +1 -0
  6. package/lib/module/components/sortable/index.js +74 -12
  7. package/lib/module/components/sortable/index.js.map +1 -1
  8. package/lib/module/components/steps/index.js +95 -12
  9. package/lib/module/components/steps/index.js.map +1 -1
  10. package/lib/module/components/tag-input/index.js +435 -0
  11. package/lib/module/components/tag-input/index.js.map +1 -0
  12. package/lib/module/components/tour/index.js +661 -0
  13. package/lib/module/components/tour/index.js.map +1 -0
  14. package/lib/module/index.js +3 -0
  15. package/lib/module/index.js.map +1 -1
  16. package/lib/module/utils/chart.js +209 -0
  17. package/lib/module/utils/chart.js.map +1 -1
  18. package/lib/typescript/src/components/combobox/index.d.ts.map +1 -1
  19. package/lib/typescript/src/components/hex-chart/index.d.ts +277 -0
  20. package/lib/typescript/src/components/hex-chart/index.d.ts.map +1 -0
  21. package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
  22. package/lib/typescript/src/components/steps/index.d.ts +19 -0
  23. package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
  24. package/lib/typescript/src/components/tag-input/index.d.ts +240 -0
  25. package/lib/typescript/src/components/tag-input/index.d.ts.map +1 -0
  26. package/lib/typescript/src/components/tour/index.d.ts +168 -0
  27. package/lib/typescript/src/components/tour/index.d.ts.map +1 -0
  28. package/lib/typescript/src/index.d.ts +3 -0
  29. package/lib/typescript/src/index.d.ts.map +1 -1
  30. package/lib/typescript/src/utils/chart.d.ts +98 -0
  31. package/lib/typescript/src/utils/chart.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/components/combobox/index.tsx +65 -12
  34. package/src/components/hex-chart/index.tsx +1009 -0
  35. package/src/components/sortable/index.tsx +72 -16
  36. package/src/components/steps/index.tsx +103 -8
  37. package/src/components/tag-input/index.tsx +619 -0
  38. package/src/components/tour/index.tsx +933 -0
  39. package/src/index.ts +30 -0
  40. package/src/utils/chart.ts +236 -0
@@ -0,0 +1,277 @@
1
+ /**
2
+ * HexChart — a whole broken into parts, counted out in cells.
3
+ *
4
+ * ```tsx
5
+ * <HexChart data={attribution}>
6
+ * <HexChart.Header title="Attributed revenue" value="$6,750" />
7
+ * <HexChart.Cells />
8
+ * <HexChart.Legend />
9
+ * </HexChart>
10
+ * ```
11
+ *
12
+ * ## What it is, against the pie beside it
13
+ *
14
+ * Both divide one total. The difference is what the reader has to do to read a
15
+ * share off it. A pie asks them to compare angles, which is the hardest
16
+ * quantity there is to judge by eye; this asks them to compare *counts*, and a
17
+ * count is something anyone can check by looking. A series holding a tenth of
18
+ * the cells looks like a tenth and can be confirmed as one, which is why this
19
+ * is the better shape for a split someone is going to quote.
20
+ *
21
+ * What it gives up is precision at the small end. Every cell is a whole unit,
22
+ * so a series worth half a cell either rounds up to a full one or vanishes. It
23
+ * is a chart for shares of a few percent and up, not for a long tail.
24
+ *
25
+ * ## The field
26
+ *
27
+ * The cells are pointy-top hexagons on an offset grid, so each row nests half a
28
+ * cell into the one above it. The unfilled cells are drawn too, in the muted
29
+ * token: the field is the denominator made visible, and a honeycomb floating on
30
+ * nothing gives the eye no total to read the coloured part against.
31
+ *
32
+ * `shape` decides how the filled cells are arranged. `grid` is reading order,
33
+ * which is the arrangement a reader can actually count off. `blob` grows the
34
+ * series out from the middle of the field instead — the smallest in the centre,
35
+ * each larger one wrapped around it — which counts for nothing but shows the
36
+ * shape of the split at a glance. The blob's edge is ragged by design, and
37
+ * ragged the *same way* every time: the nudge that roughens it is a hash of
38
+ * each cell's own coordinates rather than a random number, so a re-render is
39
+ * not an animation and the same data screenshots twice.
40
+ *
41
+ * Cell counts are apportioned by largest remainder, so they add up to the
42
+ * budget exactly. A honeycomb whose parts came to one less than the whole would
43
+ * have a cell in it that nothing in the data accounts for.
44
+ *
45
+ * ## Drawing and animating
46
+ *
47
+ * Two hundred cells is two hundred nodes if each one is drawn on its own, which
48
+ * is more than this needs to spend. Every cell belonging to a series is
49
+ * concatenated into a *single* path instead, so the whole chart is one node per
50
+ * series plus one for the unfilled field — six or seven, whatever the cell
51
+ * count.
52
+ *
53
+ * That is also why the reveal is a clip rather than a per-cell stagger: the
54
+ * cells are no longer separate things to stagger. An ellipse grows from the
55
+ * centre of the field, in the field's own proportions, so the honeycomb is
56
+ * uncovered in the order the blob grew in — which is the same effect a stagger
57
+ * would have given, for one animated value instead of two hundred. A `grid`
58
+ * wipes across instead, because that is the order its cells were filled in.
59
+ *
60
+ * Touch, not hover: a series is selected by pressing one of its cells, and
61
+ * pressing it again clears the selection. There is no equivalent of a pointer
62
+ * resting somewhere without committing, so a chart that only revealed its
63
+ * numbers on hover would never reveal them at all.
64
+ *
65
+ * Colours come from the `--color-chart-*` tokens, so a chart follows the active
66
+ * theme and is put on brand by overriding those five. Nothing here hardcodes a
67
+ * hex.
68
+ */
69
+ import { type ReactNode } from 'react';
70
+ import { type ViewProps } from 'react-native';
71
+ import { type HexShape } from '../../utils/chart.js';
72
+ /** Whether the chart is showing data or waiting for it. */
73
+ export type HexChartStatus = 'loading' | 'ready';
74
+ export type { HexShape };
75
+ /** One series. Its share is worked out from the others, so there is no maximum. */
76
+ export interface HexDatum {
77
+ /** Name for the legend, the readout and the accessibility label. */
78
+ label: string;
79
+ /** How much of the whole this series is. Negatives are treated as zero. */
80
+ value: number;
81
+ /** Explicit colour, overriding the `--color-chart-*` token. */
82
+ color?: string;
83
+ }
84
+ /** The selected series and its share, for something rendered inside the chart. */
85
+ export declare function useHexChart(): {
86
+ activeIndex: number;
87
+ activeSeries: HexDatum | null;
88
+ /** Its share of the whole, 0 to 1. */
89
+ activeFraction: number;
90
+ /** How many cells it was given, which is what the reader can count. */
91
+ activeCells: number;
92
+ };
93
+ export interface HexChartProps extends ViewProps {
94
+ className?: string;
95
+ /** One entry per series. */
96
+ data: HexDatum[];
97
+ /**
98
+ * Cells across the field. The cell size follows from it and the measured
99
+ * width, so this is the one knob for how fine the honeycomb is.
100
+ *
101
+ * More cells resolve a smaller share — twenty-one across a phone is around
102
+ * two hundred and fifty in the field, so roughly a half a percent each — at
103
+ * the cost of every cell getting smaller and harder to press.
104
+ */
105
+ columns?: number;
106
+ /** Width over height of the field. */
107
+ aspectRatio?: number;
108
+ /**
109
+ * How much of the field the series fill, 0 to 1.
110
+ *
111
+ * Only meaningful with `shape="blob"`, where the unfilled cells are the
112
+ * margin the blob is read against; a `grid` fills every cell, because a
113
+ * waffle with a ragged last row is a waffle that has stopped being countable.
114
+ */
115
+ density?: number;
116
+ /** How the filled cells are arranged. */
117
+ shape?: HexShape;
118
+ /**
119
+ * The gap between cells, as a share of the cell radius. Given as a share so
120
+ * the field keeps its proportions at whatever size it is measured at.
121
+ */
122
+ cellGap?: number;
123
+ /** Milliseconds for the honeycomb to fill in. */
124
+ animationDuration?: number;
125
+ /** `loading` draws the field with nothing divided up yet. */
126
+ status?: HexChartStatus;
127
+ /** Selected series. Leave unset to let the chart track it. */
128
+ activeIndex?: number;
129
+ /** Fires with the selected series, or `-1` when the selection is cleared. */
130
+ onActiveIndexChange?: (index: number) => void;
131
+ children?: ReactNode;
132
+ }
133
+ /** Imperative handle: re-run the fill, for a "replay" control. */
134
+ export interface HexChartHandle {
135
+ replay: () => void;
136
+ }
137
+ export interface HexChartCellsProps {
138
+ /** Colour of the cells no series took. Defaults to the muted token. */
139
+ emptyColor?: string;
140
+ /** Opacity of the series that are not selected, once one is. */
141
+ dimOpacity?: number;
142
+ }
143
+ /**
144
+ * The honeycomb: the unfilled field, and one path per series over it.
145
+ *
146
+ * One part rather than one per series. Every cell shares a radius, a gap and a
147
+ * grid by definition — a chart where one series' cells could be given a size of
148
+ * their own would be a chart drawing a lie, since the whole claim of the shape
149
+ * is that one cell means the same thing wherever it appears.
150
+ *
151
+ * The field is drawn outside the reveal's clip and the series inside it, so the
152
+ * total is there from the first frame and what fills in against it is the
153
+ * split. Uncovering both together would animate the denominator, which is not
154
+ * something that changed.
155
+ */
156
+ declare function HexChartCells({ emptyColor, dimOpacity }: HexChartCellsProps): import("react").JSX.Element | null;
157
+ declare namespace HexChartCells {
158
+ var displayName: string;
159
+ var slot: "svg";
160
+ }
161
+ export interface HexChartSkeletonProps {
162
+ color?: string;
163
+ }
164
+ /**
165
+ * The loading state: the field, with nothing divided up yet.
166
+ *
167
+ * Deliberately undivided. Placeholder shares would be a made-up split, and a
168
+ * reader has no way to tell an invented one from a real one until it changes
169
+ * under them — which is worse than showing nothing, because it is showing
170
+ * something wrong.
171
+ */
172
+ declare function HexChartSkeleton({ color }: HexChartSkeletonProps): import("react").JSX.Element | null;
173
+ declare namespace HexChartSkeleton {
174
+ var displayName: string;
175
+ var slot: "svg";
176
+ }
177
+ export interface HexChartTooltipProps {
178
+ /** Format the selected series' value. Defaults to a compact number. */
179
+ formatValue?: (value: number, series: HexDatum) => string;
180
+ /** Show the count of cells beside the share. */
181
+ showCells?: boolean;
182
+ className?: string;
183
+ }
184
+ /**
185
+ * The press target over the honeycomb, and the label that names what was
186
+ * pressed.
187
+ *
188
+ * The label hangs *above* the selected series rather than on it: it is centred
189
+ * across that series' cells and sits clear of the highest one, so the cells
190
+ * being read are never underneath the thing reading them. Two other places it
191
+ * could go are both worse — under the finger is the one part of the chart
192
+ * nobody can see, and on the middle of the series covers the mass the reader
193
+ * just asked about.
194
+ *
195
+ * A series reaching the top of the field pushes the label back inside it, which
196
+ * is the one case it does overlap. That series is the largest one, and its
197
+ * topmost cells are the part of it a reader is least likely to be counting.
198
+ *
199
+ * A press on an unfilled cell clears the selection, the same as pressing the
200
+ * selected series again. Everything outside the honeycomb is "none of them",
201
+ * and making that gesture do nothing would leave a chart you can select in but
202
+ * not out of.
203
+ */
204
+ declare function HexChartTooltip({ formatValue, showCells, className }: HexChartTooltipProps): import("react").JSX.Element | null;
205
+ declare namespace HexChartTooltip {
206
+ var displayName: string;
207
+ var slot: "overlay";
208
+ }
209
+ export interface HexChartLegendProps extends ViewProps {
210
+ className?: string;
211
+ /** Show each series' share of the whole beside its name. */
212
+ showValue?: boolean;
213
+ }
214
+ /**
215
+ * A swatch, a name and a share per series, under the chart and across the width
216
+ * of it. Pressable in the same way the cells are — the legend is usually the
217
+ * easier target of the two, and a series worth a couple of percent is a handful
218
+ * of cells that may not be adjacent.
219
+ *
220
+ * It wraps rather than stacking, so five or six entries take two lines instead
221
+ * of six. A key is a lookup table, and a lookup table read down a column of one
222
+ * word each is a column the eye has to walk.
223
+ */
224
+ declare function HexChartLegend({ className, showValue, ...props }: HexChartLegendProps): import("react").JSX.Element | null;
225
+ declare namespace HexChartLegend {
226
+ var displayName: string;
227
+ var slot: "footer";
228
+ }
229
+ export interface HexChartHeaderProps extends ViewProps {
230
+ className?: string;
231
+ /** Small line above the value — what the chart is of. */
232
+ title?: string;
233
+ /** The readout. The largest thing on the card, and the first thing read. */
234
+ value?: string;
235
+ /** One muted line under the value — a period, a comparison, a caveat. */
236
+ caption?: string;
237
+ /** Prettier names for the series, keyed by their `label`. */
238
+ labels?: Record<string, string>;
239
+ /**
240
+ * Draw a swatch and a name per series along the trailing edge.
241
+ *
242
+ * For two or three short names. Past that use `HexChart.Legend`, which runs
243
+ * under the chart across the full width: a key of five long names crammed
244
+ * into the trailing corner of a header wraps to a column and leaves the title
245
+ * beside it a few points wide.
246
+ */
247
+ legend?: boolean;
248
+ /** Trailing slot — a control, a badge, a range picker. Wins over `legend`. */
249
+ children?: ReactNode;
250
+ }
251
+ /**
252
+ * The strip above the honeycomb: what the chart is of, what it reads, and what
253
+ * the colours mean.
254
+ *
255
+ * It belongs to the chart rather than to the card around it because it is about
256
+ * the *series* — the number changes as one is selected, and the legend is the
257
+ * list the chart itself is holding. The card's header is a caption on the tray
258
+ * the chart sits in; this is the chart introducing itself.
259
+ *
260
+ * The value is not derived here even though there is a total to derive it from,
261
+ * because the formatting is not the chart's to guess: a total of 6750 is a
262
+ * count, a currency or a percentage depending on what was counted, and only the
263
+ * caller knows which.
264
+ */
265
+ declare function HexChartHeader({ className, title, value, caption, labels, legend, children, ...props }: HexChartHeaderProps): import("react").JSX.Element;
266
+ declare namespace HexChartHeader {
267
+ var displayName: string;
268
+ var slot: "header";
269
+ }
270
+ export declare const HexChart: import("react").ForwardRefExoticComponent<HexChartProps & import("react").RefAttributes<HexChartHandle>> & {
271
+ Header: typeof HexChartHeader;
272
+ Cells: typeof HexChartCells;
273
+ Tooltip: typeof HexChartTooltip;
274
+ Legend: typeof HexChartLegend;
275
+ Skeleton: typeof HexChartSkeleton;
276
+ };
277
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hex-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAYtB,OAAO,EAaL,KAAK,QAAQ,EACd,MAAM,sBAAmB,CAAC;AAS3B,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjD,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACvB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0DD,kFAAkF;AAClF,wBAAgB,WAAW;;;IAMvB,sCAAsC;;IAEtC,uEAAuE;;EAG1E;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9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AAQ;;;CAGnB,CAAC"}
@@ -14,6 +14,18 @@
14
14
  * Steps does not own your flow: it reflects whatever step your app says is
15
15
  * active. Pass `value` to control it, or `defaultValue` to let it manage
16
16
  * its own.
17
+ *
18
+ * The connectors are the component's job, not yours. The root counts the items
19
+ * it holds and each one draws the connector to the next, so a stepper is just
20
+ * its steps — there is no separator to forget, mis-order, or leave dangling
21
+ * past the last stop. An item that contains its own `Steps.Separator` keeps it
22
+ * and gets no second one, so hand-placed connectors still work; `separators`
23
+ * turns the automatic ones off wholesale.
24
+ *
25
+ * Knowing the count is also what lets a step say where it sits. A screen reader
26
+ * reaching the middle of a wizard hears "Payment, step 2 of 3, completed" —
27
+ * the position and the state, which are the two things the circle and its fill
28
+ * convey to everyone else.
17
29
  */
18
30
  import { type ReactNode } from 'react';
19
31
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -28,6 +40,13 @@ export interface StepsProps extends ViewProps {
28
40
  value?: number;
29
41
  onValueChange?: (value: number) => void;
30
42
  orientation?: StepsOrientation;
43
+ /**
44
+ * Draw the connector between one item and the next. On by default — an item
45
+ * that holds its own `Steps.Separator` is left alone either way, so this is
46
+ * for a stepper that wants no connectors at all rather than for one that
47
+ * places them by hand.
48
+ */
49
+ separators?: boolean;
31
50
  children?: ReactNode;
32
51
  }
33
52
  export interface StepsItemProps extends ViewProps {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/steps/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpF,OAAO,EAAQ,KAAK,SAAS,EAAgB,MAAM,0BAAuB,CAAC;AAG3E,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAA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E,SAAS,CAAC;CACtB;AAoDD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA8BD,eAAO,MAAM,KAAK;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,240 @@
1
+ /**
2
+ * TagInput — a field whose value is a list of tokens rather than a string.
3
+ *
4
+ * The value is whatever gets typed. That is the whole distinction from a
5
+ * `Combobox` in `multiple` mode: a Combobox picks from a set of options you
6
+ * supply, so it needs a list, a filter and a surface to float that list on. A
7
+ * tag field has no options and no list — labels on a task, recipients on a
8
+ * message, keywords on a post — so it carries none of that machinery and never
9
+ * opens a portal.
10
+ *
11
+ * ```tsx
12
+ * <TagInput
13
+ * label="Topics"
14
+ * defaultValue={['expo', 'reanimated']}
15
+ * placeholder="Add a topic"
16
+ * />
17
+ * ```
18
+ *
19
+ * ## Three ways a tag gets committed
20
+ *
21
+ * Return commits what has been typed. So does any of `delimiters` — a comma by
22
+ * default — which is what makes pasting `design, research, ops` land as three
23
+ * tags instead of one long one. And `blurBehavior` decides what a field that
24
+ * loses focus mid-word does with the leftover.
25
+ *
26
+ * ## Backspace asks first
27
+ *
28
+ * Backspace on an empty field marks the last tag rather than taking it: the
29
+ * tag turns destructive, and a second backspace removes it. A held backspace
30
+ * repeats, and a field that deleted on the first one would empty itself in the
31
+ * time it takes to notice — the mark is the beat that lets you stop.
32
+ */
33
+ import { type ReactNode } from 'react';
34
+ import { TextInput, type TextInputProps } from 'react-native';
35
+ import { type VariantProps } from 'tailwind-variants';
36
+ import { type ChipVariant } from '../chip/index.js';
37
+ declare const tagInputVariants: import("tailwind-variants").TVReturnType<{
38
+ variant: {
39
+ outline: {
40
+ field: string;
41
+ };
42
+ filled: {
43
+ field: string;
44
+ };
45
+ };
46
+ size: {
47
+ sm: {
48
+ field: string;
49
+ input: string;
50
+ clear: string;
51
+ };
52
+ md: {
53
+ field: string;
54
+ input: string;
55
+ clear: string;
56
+ };
57
+ lg: {
58
+ field: string;
59
+ input: string;
60
+ clear: string;
61
+ };
62
+ };
63
+ disabled: {
64
+ true: {
65
+ field: string;
66
+ };
67
+ };
68
+ }, {
69
+ container: string;
70
+ field: string;
71
+ input: string;
72
+ clear: string;
73
+ description: string;
74
+ error: string;
75
+ count: string;
76
+ }, undefined, {
77
+ variant: {
78
+ outline: {
79
+ field: string;
80
+ };
81
+ filled: {
82
+ field: string;
83
+ };
84
+ };
85
+ size: {
86
+ sm: {
87
+ field: string;
88
+ input: string;
89
+ clear: string;
90
+ };
91
+ md: {
92
+ field: string;
93
+ input: string;
94
+ clear: string;
95
+ };
96
+ lg: {
97
+ field: string;
98
+ input: string;
99
+ clear: string;
100
+ };
101
+ };
102
+ disabled: {
103
+ true: {
104
+ field: string;
105
+ };
106
+ };
107
+ }, {
108
+ container: string;
109
+ field: string;
110
+ input: string;
111
+ clear: string;
112
+ description: string;
113
+ error: string;
114
+ count: string;
115
+ }, import("tailwind-variants").TVReturnType<{
116
+ variant: {
117
+ outline: {
118
+ field: string;
119
+ };
120
+ filled: {
121
+ field: string;
122
+ };
123
+ };
124
+ size: {
125
+ sm: {
126
+ field: string;
127
+ input: string;
128
+ clear: string;
129
+ };
130
+ md: {
131
+ field: string;
132
+ input: string;
133
+ clear: string;
134
+ };
135
+ lg: {
136
+ field: string;
137
+ input: string;
138
+ clear: string;
139
+ };
140
+ };
141
+ disabled: {
142
+ true: {
143
+ field: string;
144
+ };
145
+ };
146
+ }, {
147
+ container: string;
148
+ field: string;
149
+ input: string;
150
+ clear: string;
151
+ description: string;
152
+ error: string;
153
+ count: string;
154
+ }, undefined, unknown, unknown, undefined>>;
155
+ type TagInputVariantProps = VariantProps<typeof tagInputVariants>;
156
+ export type TagInputVariant = NonNullable<TagInputVariantProps['variant']>;
157
+ export type TagInputSize = NonNullable<TagInputVariantProps['size']>;
158
+ /** Why a tag was turned away, for a caller that wants to say so. */
159
+ export type TagRejection = 'duplicate' | 'max' | 'invalid';
160
+ /** What a field that loses focus mid-word does with the leftover text. */
161
+ export type TagBlurBehavior = 'add' | 'clear' | 'keep';
162
+ export interface TagInputProps extends Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'editable' | 'multiline' | 'children'>, Omit<TagInputVariantProps, 'disabled'> {
163
+ /** Classes for the field box — the bordered container the tags sit in. */
164
+ className?: string;
165
+ /** Classes for the outer column that also holds the label and the error. */
166
+ containerClassName?: string;
167
+ /** The tags, controlled. Pair it with `onValueChange`. */
168
+ value?: string[];
169
+ /** The tags to start with, when the field keeps its own value. */
170
+ defaultValue?: string[];
171
+ /** Called with the whole list whenever a tag is added or removed. */
172
+ onValueChange?: (tags: string[]) => void;
173
+ /**
174
+ * The text being typed, controlled. Only needed to drive the draft from
175
+ * outside — the tags themselves are `value`.
176
+ */
177
+ inputValue?: string;
178
+ /** Called as the draft text changes, before it becomes a tag. */
179
+ onInputValueChange?: (text: string) => void;
180
+ /** The label above the field, and what the input is announced as. */
181
+ label?: string;
182
+ /** A line under the field, replaced by `errorMessage` when there is one. */
183
+ description?: string;
184
+ /** Error message. When set, the field renders in its invalid state. */
185
+ errorMessage?: string;
186
+ /** Marks the field required — an asterisk on the label, and the a11y state. */
187
+ isRequired?: boolean;
188
+ /** Dims the field and stops it being reached at all. */
189
+ disabled?: boolean;
190
+ /** Shows the tags but takes away the input and the ✕ on each one. */
191
+ readOnly?: boolean;
192
+ /**
193
+ * The most tags the field accepts. Past it nothing more is committed and
194
+ * `onReject` is called with `'max'`, unless `allowOverflow` is set.
195
+ */
196
+ max?: number;
197
+ /**
198
+ * Let the list go past `max` anyway. The field reports itself invalid while
199
+ * it is over, which is the point: some forms want the count shown as wrong
200
+ * rather than the typing refused.
201
+ */
202
+ allowOverflow?: boolean;
203
+ /** Accept a tag the list already holds. Off by default. */
204
+ allowDuplicates?: boolean;
205
+ /**
206
+ * Characters that end a tag as they are typed. A comma by default, which is
207
+ * what makes a pasted `a, b, c` land as three tags rather than one.
208
+ */
209
+ delimiters?: string[];
210
+ /**
211
+ * What happens to text still in the field when it loses focus. `add` commits
212
+ * it and clears it if it was accepted, leaving it in place if it was not, so
213
+ * a rejected word is still there to fix. `clear` drops it. `keep` leaves it
214
+ * exactly as typed.
215
+ */
216
+ blurBehavior?: TagBlurBehavior;
217
+ /**
218
+ * Decide whether a tag may be added, given the list it would join. Return
219
+ * `false` to turn it away — `onReject` is then called with `'invalid'`.
220
+ */
221
+ validate?: (tag: string, tags: string[]) => boolean;
222
+ /** Called when a tag was turned away, with the reason it was. */
223
+ onReject?: (tag: string, reason: TagRejection) => void;
224
+ /** Which Chip variant the tags are drawn as. */
225
+ chipVariant?: ChipVariant;
226
+ /** Draw the tag yourself — an avatar before the label, a count after it. */
227
+ renderTag?: (tag: string, index: number) => ReactNode;
228
+ /** A ✕ at the end of the field that empties it. */
229
+ clearable?: boolean;
230
+ /** Shows `3 / 8` under the field. Needs `max`. */
231
+ showCount?: boolean;
232
+ /**
233
+ * A tick under the finger as a tag lands or leaves. Off by default — needs
234
+ * the optional `expo-haptics`, and is silent without it.
235
+ */
236
+ haptics?: boolean;
237
+ }
238
+ export declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<TextInput>>;
239
+ export {};
240
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tag-input/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,SAAS,EAIT,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,kBAAS,CAAC;AAUhE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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