@kanso-labs/react-native-kanso-ui 0.9.0 → 0.10.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.
- package/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/index.js.map +1 -1
- package/dist/button/group.d.ts +5 -0
- package/dist/button/group.js +115 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/index.d.ts +4 -1
- package/dist/button/index.js +44 -22
- package/dist/button/index.js.map +1 -1
- package/dist/button/slots.js +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/calendar/index.js +351 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +33 -2
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +5 -0
- package/dist/carousel/arrangement.js +123 -0
- package/dist/carousel/arrangement.js.map +1 -0
- package/dist/chequer/index.js +95 -0
- package/dist/chequer/index.js.map +1 -0
- package/dist/collection/index.d.ts +157 -0
- package/dist/collection/index.js +1331 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color-thumb/index.js +56 -0
- package/dist/color-thumb/index.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -2
- package/dist/components/button/index.js +227 -188
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +87 -0
- package/dist/components/button-group/index.js +275 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +11 -3
- package/dist/components/calendar/index.js +60 -45
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +72 -0
- package/dist/components/carousel/index.js +496 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/checkbox-group/index.d.ts +3 -4
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +85 -0
- package/dist/components/color-area/index.js +630 -0
- package/dist/components/color-area/index.js.map +1 -0
- package/dist/components/color-field/index.d.ts +144 -0
- package/dist/components/color-field/index.js +516 -0
- package/dist/components/color-field/index.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +74 -0
- package/dist/components/color-picker/index.js +317 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +82 -0
- package/dist/components/color-slider/index.js +456 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +46 -0
- package/dist/components/color-swatch/index.js +127 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +81 -0
- package/dist/components/color-swatch-picker/index.js +287 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/color-wheel/index.d.ts +71 -0
- package/dist/components/color-wheel/index.js +407 -0
- package/dist/components/color-wheel/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +193 -0
- package/dist/components/combo-box/index.js +616 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +120 -0
- package/dist/components/date-field/index.js +111 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +130 -0
- package/dist/components/date-picker/index.js +310 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +139 -0
- package/dist/components/date-range-picker/index.js +421 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/disclosure/index.d.ts +94 -0
- package/dist/components/disclosure/index.js +365 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +61 -0
- package/dist/components/disclosure-group/index.js +100 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +113 -0
- package/dist/components/drop-zone/index.js +304 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +1 -1
- package/dist/components/fab/index.js +91 -76
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/form/index.d.ts +3 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +4 -2
- package/dist/components/icon-button/index.js +204 -171
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/list/index.d.ts +15 -158
- package/dist/components/list/index.js +21 -1047
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +73 -0
- package/dist/components/list-box/index.js +82 -0
- package/dist/components/list-box/index.js.map +1 -0
- package/dist/components/loading-indicator/index.d.ts +32 -0
- package/dist/components/loading-indicator/index.js +174 -0
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/components/navigation-tree/index.d.ts +117 -0
- package/dist/components/navigation-tree/index.js +135 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +132 -143
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +69 -0
- package/dist/components/range-calendar/index.js +144 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-view/index.d.ts +78 -0
- package/dist/components/search-view/index.js +570 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/select/index.d.ts +152 -0
- package/dist/components/select/index.js +419 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/slider/index.d.ts +111 -0
- package/dist/components/slider/index.js +673 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/split-button/index.d.ts +77 -0
- package/dist/components/split-button/index.js +354 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +196 -0
- package/dist/components/tabs/index.js +1137 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +43 -0
- package/dist/components/time-field/index.js +107 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +65 -0
- package/dist/components/time-picker/index.js +1168 -0
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +101 -0
- package/dist/components/tooltip/index.js +223 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +112 -0
- package/dist/components/tree/index.js +157 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/disclosure/chevron.js +75 -0
- package/dist/disclosure/chevron.js.map +1 -0
- package/dist/disclosure/index.js +7 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drop/index.d.ts +54 -0
- package/dist/drop/index.js +161 -0
- package/dist/drop/index.js.map +1 -0
- package/dist/field/chevron.js +74 -0
- package/dist/field/chevron.js.map +1 -0
- package/dist/field/index.d.ts +2 -1
- package/dist/field/index.js +310 -154
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +9 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/files/index.d.ts +18 -0
- package/dist/files/index.js +107 -0
- package/dist/files/index.js.map +1 -0
- package/dist/form/index.d.ts +5 -2
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +92 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +20 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1394 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +35 -3
- package/dist/index.js +34 -3
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +92 -77
- package/dist/modal/index.js.map +1 -1
- package/dist/number/keyboard.js +16 -0
- package/dist/number/keyboard.js.map +1 -0
- package/dist/overlay/anchored.js +68 -38
- package/dist/overlay/anchored.js.map +1 -1
- package/dist/overlay/keyboard.js +57 -0
- package/dist/overlay/keyboard.js.map +1 -0
- package/dist/overlay/panel.js +173 -19
- package/dist/overlay/panel.js.map +1 -1
- package/dist/overlay/placement.js +13 -1
- package/dist/overlay/placement.js.map +1 -1
- package/dist/picker/index.js +322 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/press/index.d.ts +2 -0
- package/dist/press/index.js +102 -100
- package/dist/press/index.js.map +1 -1
- package/dist/row/index.js +77 -69
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +13 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/field.js +277 -0
- package/dist/segments/field.js.map +1 -0
- package/dist/segments/index.js +574 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +24 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/slider/index.js +145 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/swatch/index.js +56 -0
- package/dist/swatch/index.js.map +1 -0
- package/package.json +11 -2
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
import { useTheme } from "../../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { AutocompleteContext } from "../../autocomplete/index.js";
|
|
4
|
+
import { useMessages } from "../../i18n/provider.js";
|
|
5
|
+
import { Autocomplete } from "../autocomplete/index.js";
|
|
6
|
+
import { ArrowBackGlyph, CloseGlyph } from "../../glyphs/index.js";
|
|
7
|
+
import { refsOf } from "../../ref/index.js";
|
|
8
|
+
import { ButtonSlotContext } from "../../button/slots.js";
|
|
9
|
+
import { IconButton } from "../icon-button/index.js";
|
|
10
|
+
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
11
|
+
import { PANEL_ORIGINS, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|
|
12
|
+
import { FieldInput } from "../../field/index.js";
|
|
13
|
+
import { useKeyboardTop } from "../../overlay/keyboard.js";
|
|
14
|
+
import { useAnchoredPlacement } from "../../overlay/anchored.js";
|
|
15
|
+
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf } from "../../modal/index.js";
|
|
16
|
+
import { c } from "react/compiler-runtime";
|
|
17
|
+
import { Platform, StyleSheet, View, useWindowDimensions } from "react-native";
|
|
18
|
+
import Animated from "react-native-reanimated";
|
|
19
|
+
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
20
|
+
import { createContext, use, useRef, useState } from "react";
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { useOverlayTriggerState } from "react-stately/useOverlayTriggerState";
|
|
23
|
+
//#region src/components/search-view/index.tsx
|
|
24
|
+
const FULL_HEADER = 72;
|
|
25
|
+
const MIN_WIDTH = 360;
|
|
26
|
+
const MAX_WIDTH = 720;
|
|
27
|
+
const MIN_RESULTS = 240;
|
|
28
|
+
const UNSEEN = { opacity: 0 };
|
|
29
|
+
const stylesOf = themedStyles(({ colors, radii, shadows, spacing }) => StyleSheet.create({
|
|
30
|
+
back: { marginStart: spacing.xs },
|
|
31
|
+
clear: { marginEnd: spacing.xs },
|
|
32
|
+
divider: {
|
|
33
|
+
backgroundColor: colors.outline,
|
|
34
|
+
flexShrink: 0,
|
|
35
|
+
height: 1
|
|
36
|
+
},
|
|
37
|
+
docked: {
|
|
38
|
+
borderRadius: radii.xl,
|
|
39
|
+
boxShadow: shadows.elevation3
|
|
40
|
+
},
|
|
41
|
+
full: {
|
|
42
|
+
bottom: 0,
|
|
43
|
+
left: 0,
|
|
44
|
+
position: "absolute",
|
|
45
|
+
right: 0,
|
|
46
|
+
top: 0
|
|
47
|
+
},
|
|
48
|
+
header: {
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
gap: spacing.sm,
|
|
53
|
+
paddingHorizontal: spacing.lg
|
|
54
|
+
},
|
|
55
|
+
resultsFull: { flex: 1 },
|
|
56
|
+
surface: {
|
|
57
|
+
backgroundColor: colors.surfaceContainerHigh,
|
|
58
|
+
overflow: "hidden"
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
const SearchViewContext = createContext(null);
|
|
62
|
+
function clearOf(autocomplete, input) {
|
|
63
|
+
return () => {
|
|
64
|
+
autocomplete.setInputValue("");
|
|
65
|
+
input?.focus();
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function dockedOf(placement) {
|
|
69
|
+
return {
|
|
70
|
+
...placement.style,
|
|
71
|
+
transformOrigin: PANEL_ORIGINS[placement.side],
|
|
72
|
+
width: Math.min(MAX_WIDTH, Math.max(MIN_WIDTH, placement.anchorWidth ?? MIN_WIDTH))
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function fullOf(insets, covered) {
|
|
76
|
+
return {
|
|
77
|
+
...insetsOf(insets),
|
|
78
|
+
paddingBottom: Math.max(insets.bottom, covered),
|
|
79
|
+
transformOrigin: "top"
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function measureBottomOf(panel, setBottom) {
|
|
83
|
+
return () => {
|
|
84
|
+
panel?.measureInWindow((_x, y, _width, height) => {
|
|
85
|
+
setBottom(y + height);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function minHeightOf(minHeight) {
|
|
90
|
+
return { minHeight };
|
|
91
|
+
}
|
|
92
|
+
function resultsOf(windowHeight, header) {
|
|
93
|
+
return {
|
|
94
|
+
maxHeight: windowHeight * 2 / 3 - header - 1,
|
|
95
|
+
minHeight: MIN_RESULTS
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The view a search opens into: full screen in a compact window, docked
|
|
100
|
+
* under what opened it in a wider one. Pass `isOpen` with `onOpenChange` to
|
|
101
|
+
* hold the open state, or `defaultOpen` to let it keep its own.
|
|
102
|
+
*
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <SearchView>
|
|
105
|
+
* <IconButton aria-label="Search">
|
|
106
|
+
* <SearchIcon />
|
|
107
|
+
* </IconButton>
|
|
108
|
+
* <SearchView.Content label="Search" placeholder="Search">
|
|
109
|
+
* <ListBox aria-label="Results">…</ListBox>
|
|
110
|
+
* </SearchView.Content>
|
|
111
|
+
* </SearchView>
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* Composed as Popover is: a `Button` or `IconButton` placed directly inside
|
|
115
|
+
* `SearchView` opens the view, and `SearchView.Content` is the view itself.
|
|
116
|
+
*/
|
|
117
|
+
function SearchView(t0) {
|
|
118
|
+
const $ = c(19);
|
|
119
|
+
const { children, defaultOpen, isOpen, onOpenChange } = t0;
|
|
120
|
+
let t1;
|
|
121
|
+
if ($[0] !== defaultOpen || $[1] !== isOpen || $[2] !== onOpenChange) {
|
|
122
|
+
t1 = {
|
|
123
|
+
defaultOpen,
|
|
124
|
+
isOpen,
|
|
125
|
+
onOpenChange
|
|
126
|
+
};
|
|
127
|
+
$[0] = defaultOpen;
|
|
128
|
+
$[1] = isOpen;
|
|
129
|
+
$[2] = onOpenChange;
|
|
130
|
+
$[3] = t1;
|
|
131
|
+
} else t1 = $[3];
|
|
132
|
+
const state = useOverlayTriggerState(t1);
|
|
133
|
+
const anchor = useRef(null);
|
|
134
|
+
let t2;
|
|
135
|
+
if ($[4] !== state) {
|
|
136
|
+
t2 = () => {
|
|
137
|
+
state.open();
|
|
138
|
+
};
|
|
139
|
+
$[4] = state;
|
|
140
|
+
$[5] = t2;
|
|
141
|
+
} else t2 = $[5];
|
|
142
|
+
let t3;
|
|
143
|
+
if ($[6] !== state.isOpen) {
|
|
144
|
+
t3 = {
|
|
145
|
+
expanded: state.isOpen,
|
|
146
|
+
ref: anchor
|
|
147
|
+
};
|
|
148
|
+
$[6] = state.isOpen;
|
|
149
|
+
$[7] = t3;
|
|
150
|
+
} else t3 = $[7];
|
|
151
|
+
let t4;
|
|
152
|
+
if ($[8] !== t2 || $[9] !== t3) {
|
|
153
|
+
t4 = {
|
|
154
|
+
default: t2,
|
|
155
|
+
trigger: t3
|
|
156
|
+
};
|
|
157
|
+
$[8] = t2;
|
|
158
|
+
$[9] = t3;
|
|
159
|
+
$[10] = t4;
|
|
160
|
+
} else t4 = $[10];
|
|
161
|
+
const slots = t4;
|
|
162
|
+
let t5;
|
|
163
|
+
if ($[11] !== state) {
|
|
164
|
+
t5 = {
|
|
165
|
+
anchor,
|
|
166
|
+
state
|
|
167
|
+
};
|
|
168
|
+
$[11] = state;
|
|
169
|
+
$[12] = t5;
|
|
170
|
+
} else t5 = $[12];
|
|
171
|
+
const root = t5;
|
|
172
|
+
let t6;
|
|
173
|
+
if ($[13] !== children || $[14] !== slots) {
|
|
174
|
+
t6 = /* @__PURE__ */ jsx(ButtonSlotContext, {
|
|
175
|
+
value: slots,
|
|
176
|
+
children
|
|
177
|
+
});
|
|
178
|
+
$[13] = children;
|
|
179
|
+
$[14] = slots;
|
|
180
|
+
$[15] = t6;
|
|
181
|
+
} else t6 = $[15];
|
|
182
|
+
let t7;
|
|
183
|
+
if ($[16] !== root || $[17] !== t6) {
|
|
184
|
+
t7 = /* @__PURE__ */ jsx(SearchViewContext, {
|
|
185
|
+
value: root,
|
|
186
|
+
children: t6
|
|
187
|
+
});
|
|
188
|
+
$[16] = root;
|
|
189
|
+
$[17] = t6;
|
|
190
|
+
$[18] = t7;
|
|
191
|
+
} else t7 = $[18];
|
|
192
|
+
return t7;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The view: the header with its back button, input and clear button, and
|
|
196
|
+
* the results under it, inside an Autocomplete, so typing narrows them. What
|
|
197
|
+
* has been typed is the autocomplete's: pass `inputValue` with
|
|
198
|
+
* `onInputChange` to control it, or `defaultInputValue` to let it keep its
|
|
199
|
+
* own, which starts again each time the view opens.
|
|
200
|
+
*
|
|
201
|
+
* `style`, `ref` and `testID` land on the view's surface.
|
|
202
|
+
*/
|
|
203
|
+
function SearchViewContent(t0) {
|
|
204
|
+
const $ = c(37);
|
|
205
|
+
let backLabel;
|
|
206
|
+
let clearLabel;
|
|
207
|
+
let defaultInputValue;
|
|
208
|
+
let filter;
|
|
209
|
+
let inputValue;
|
|
210
|
+
let label;
|
|
211
|
+
let onInputChange;
|
|
212
|
+
let props;
|
|
213
|
+
if ($[0] !== t0) {
|
|
214
|
+
({backLabel, clearLabel, defaultInputValue, filter, inputValue, label, onInputChange, ...props} = t0);
|
|
215
|
+
$[0] = t0;
|
|
216
|
+
$[1] = backLabel;
|
|
217
|
+
$[2] = clearLabel;
|
|
218
|
+
$[3] = defaultInputValue;
|
|
219
|
+
$[4] = filter;
|
|
220
|
+
$[5] = inputValue;
|
|
221
|
+
$[6] = label;
|
|
222
|
+
$[7] = onInputChange;
|
|
223
|
+
$[8] = props;
|
|
224
|
+
} else {
|
|
225
|
+
backLabel = $[1];
|
|
226
|
+
clearLabel = $[2];
|
|
227
|
+
defaultInputValue = $[3];
|
|
228
|
+
filter = $[4];
|
|
229
|
+
inputValue = $[5];
|
|
230
|
+
label = $[6];
|
|
231
|
+
onInputChange = $[7];
|
|
232
|
+
props = $[8];
|
|
233
|
+
}
|
|
234
|
+
const root = use(SearchViewContext);
|
|
235
|
+
if (root === null) throw new Error("SearchView.Content is drawn inside SearchView.");
|
|
236
|
+
const { anchor, state } = root;
|
|
237
|
+
const messages = useMessages();
|
|
238
|
+
const docked = useWindowSizeClass() !== "compact";
|
|
239
|
+
const [present, setPresent] = useState(state.isOpen);
|
|
240
|
+
const [input, setInput] = useState(null);
|
|
241
|
+
let t1;
|
|
242
|
+
if ($[9] !== state) {
|
|
243
|
+
t1 = () => {
|
|
244
|
+
state.close();
|
|
245
|
+
};
|
|
246
|
+
$[9] = state;
|
|
247
|
+
$[10] = t1;
|
|
248
|
+
} else t1 = $[10];
|
|
249
|
+
const close = t1;
|
|
250
|
+
let t2;
|
|
251
|
+
if ($[11] !== close) {
|
|
252
|
+
t2 = { close };
|
|
253
|
+
$[11] = close;
|
|
254
|
+
$[12] = t2;
|
|
255
|
+
} else t2 = $[12];
|
|
256
|
+
const slots = t2;
|
|
257
|
+
if (state.isOpen && !present) setPresent(true);
|
|
258
|
+
useReturnFocus(present, false, anchor);
|
|
259
|
+
if (!present) return null;
|
|
260
|
+
const t3 = state.isOpen ? close : void 0;
|
|
261
|
+
const t4 = docked ? null : input;
|
|
262
|
+
const t5 = backLabel ?? messages.back;
|
|
263
|
+
const t6 = clearLabel ?? messages.clearSearch;
|
|
264
|
+
let t7;
|
|
265
|
+
if ($[13] !== anchor || $[14] !== close || $[15] !== docked || $[16] !== label || $[17] !== props || $[18] !== state.isOpen || $[19] !== t5 || $[20] !== t6) {
|
|
266
|
+
t7 = /* @__PURE__ */ jsx(SearchViewPanel, {
|
|
267
|
+
...props,
|
|
268
|
+
anchor,
|
|
269
|
+
backLabel: t5,
|
|
270
|
+
clearLabel: t6,
|
|
271
|
+
close,
|
|
272
|
+
docked,
|
|
273
|
+
isOpen: state.isOpen,
|
|
274
|
+
label,
|
|
275
|
+
setInput,
|
|
276
|
+
setPresent
|
|
277
|
+
});
|
|
278
|
+
$[13] = anchor;
|
|
279
|
+
$[14] = close;
|
|
280
|
+
$[15] = docked;
|
|
281
|
+
$[16] = label;
|
|
282
|
+
$[17] = props;
|
|
283
|
+
$[18] = state.isOpen;
|
|
284
|
+
$[19] = t5;
|
|
285
|
+
$[20] = t6;
|
|
286
|
+
$[21] = t7;
|
|
287
|
+
} else t7 = $[21];
|
|
288
|
+
let t8;
|
|
289
|
+
if ($[22] !== slots || $[23] !== t7) {
|
|
290
|
+
t8 = /* @__PURE__ */ jsx(ButtonSlotContext, {
|
|
291
|
+
value: slots,
|
|
292
|
+
children: t7
|
|
293
|
+
});
|
|
294
|
+
$[22] = slots;
|
|
295
|
+
$[23] = t7;
|
|
296
|
+
$[24] = t8;
|
|
297
|
+
} else t8 = $[24];
|
|
298
|
+
let t9;
|
|
299
|
+
if ($[25] !== close || $[26] !== label || $[27] !== t3 || $[28] !== t4 || $[29] !== t8) {
|
|
300
|
+
t9 = /* @__PURE__ */ jsx(ModalWindow, {
|
|
301
|
+
isKeyboardDismissDisabled: false,
|
|
302
|
+
label,
|
|
303
|
+
labelledBy: void 0,
|
|
304
|
+
onClose: close,
|
|
305
|
+
onScrimPress: t3,
|
|
306
|
+
scrim: UNSEEN,
|
|
307
|
+
title: t4,
|
|
308
|
+
children: t8
|
|
309
|
+
});
|
|
310
|
+
$[25] = close;
|
|
311
|
+
$[26] = label;
|
|
312
|
+
$[27] = t3;
|
|
313
|
+
$[28] = t4;
|
|
314
|
+
$[29] = t8;
|
|
315
|
+
$[30] = t9;
|
|
316
|
+
} else t9 = $[30];
|
|
317
|
+
let t10;
|
|
318
|
+
if ($[31] !== defaultInputValue || $[32] !== filter || $[33] !== inputValue || $[34] !== onInputChange || $[35] !== t9) {
|
|
319
|
+
t10 = /* @__PURE__ */ jsx(Autocomplete, {
|
|
320
|
+
defaultInputValue,
|
|
321
|
+
filter,
|
|
322
|
+
inputValue,
|
|
323
|
+
onInputChange,
|
|
324
|
+
children: t9
|
|
325
|
+
});
|
|
326
|
+
$[31] = defaultInputValue;
|
|
327
|
+
$[32] = filter;
|
|
328
|
+
$[33] = inputValue;
|
|
329
|
+
$[34] = onInputChange;
|
|
330
|
+
$[35] = t9;
|
|
331
|
+
$[36] = t10;
|
|
332
|
+
} else t10 = $[36];
|
|
333
|
+
return t10;
|
|
334
|
+
}
|
|
335
|
+
function SearchViewPanel(t0) {
|
|
336
|
+
const $ = c(72);
|
|
337
|
+
let anchor;
|
|
338
|
+
let backLabel;
|
|
339
|
+
let children;
|
|
340
|
+
let clearLabel;
|
|
341
|
+
let close;
|
|
342
|
+
let docked;
|
|
343
|
+
let isOpen;
|
|
344
|
+
let label;
|
|
345
|
+
let placeholder;
|
|
346
|
+
let props;
|
|
347
|
+
let ref;
|
|
348
|
+
let setInput;
|
|
349
|
+
let setPresent;
|
|
350
|
+
let style;
|
|
351
|
+
if ($[0] !== t0) {
|
|
352
|
+
({anchor, backLabel, children, clearLabel, close, docked, isOpen, label, placeholder, ref, setInput, setPresent, style, ...props} = t0);
|
|
353
|
+
$[0] = t0;
|
|
354
|
+
$[1] = anchor;
|
|
355
|
+
$[2] = backLabel;
|
|
356
|
+
$[3] = children;
|
|
357
|
+
$[4] = clearLabel;
|
|
358
|
+
$[5] = close;
|
|
359
|
+
$[6] = docked;
|
|
360
|
+
$[7] = isOpen;
|
|
361
|
+
$[8] = label;
|
|
362
|
+
$[9] = placeholder;
|
|
363
|
+
$[10] = props;
|
|
364
|
+
$[11] = ref;
|
|
365
|
+
$[12] = setInput;
|
|
366
|
+
$[13] = setPresent;
|
|
367
|
+
$[14] = style;
|
|
368
|
+
} else {
|
|
369
|
+
anchor = $[1];
|
|
370
|
+
backLabel = $[2];
|
|
371
|
+
children = $[3];
|
|
372
|
+
clearLabel = $[4];
|
|
373
|
+
close = $[5];
|
|
374
|
+
docked = $[6];
|
|
375
|
+
isOpen = $[7];
|
|
376
|
+
label = $[8];
|
|
377
|
+
placeholder = $[9];
|
|
378
|
+
props = $[10];
|
|
379
|
+
ref = $[11];
|
|
380
|
+
setInput = $[12];
|
|
381
|
+
setPresent = $[13];
|
|
382
|
+
style = $[14];
|
|
383
|
+
}
|
|
384
|
+
const theme = useTheme();
|
|
385
|
+
const styles = stylesOf(theme);
|
|
386
|
+
const { colors, sizing, typography } = theme;
|
|
387
|
+
const autocomplete = use(AutocompleteContext);
|
|
388
|
+
const window = useWindowDimensions();
|
|
389
|
+
const insets = use(SafeAreaInsetsContext) ?? NO_INSETS;
|
|
390
|
+
const keyboardTop = useKeyboardTop();
|
|
391
|
+
let t1;
|
|
392
|
+
if ($[15] !== anchor) {
|
|
393
|
+
t1 = {
|
|
394
|
+
align: "start",
|
|
395
|
+
anchor
|
|
396
|
+
};
|
|
397
|
+
$[15] = anchor;
|
|
398
|
+
$[16] = t1;
|
|
399
|
+
} else t1 = $[16];
|
|
400
|
+
const placement = useAnchoredPlacement(t1);
|
|
401
|
+
const motion = usePanelMotion(isOpen, !docked || placement.placed, setPresent);
|
|
402
|
+
const [panel, setPanel] = useState(null);
|
|
403
|
+
const [input, setOwnInput] = useState(null);
|
|
404
|
+
const [bottom, setBottom] = useState(null);
|
|
405
|
+
const header = (docked ? sizing.controlLg : FULL_HEADER) + typography.bodyLargeLineHeight * (window.fontScale - 1);
|
|
406
|
+
const covered = keyboardTop === null || bottom === null ? 0 : bottom - keyboardTop;
|
|
407
|
+
useFocusOnPlaced(docked && placement.placed, input);
|
|
408
|
+
if (autocomplete === null) return null;
|
|
409
|
+
const t2 = Animated;
|
|
410
|
+
let t3;
|
|
411
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
412
|
+
t3 = panelRoleOf("dialog", void 0);
|
|
413
|
+
$[17] = t3;
|
|
414
|
+
} else t3 = $[17];
|
|
415
|
+
const t4 = Platform.OS === "web" ? void 0 : label;
|
|
416
|
+
let t5;
|
|
417
|
+
if ($[18] !== docked || $[19] !== panel || $[20] !== placement) {
|
|
418
|
+
t5 = docked ? placement.onLayout : measureBottomOf(panel, setBottom);
|
|
419
|
+
$[18] = docked;
|
|
420
|
+
$[19] = panel;
|
|
421
|
+
$[20] = placement;
|
|
422
|
+
$[21] = t5;
|
|
423
|
+
} else t5 = $[21];
|
|
424
|
+
let t6;
|
|
425
|
+
if ($[22] !== ref) {
|
|
426
|
+
t6 = refsOf(setPanel, ref);
|
|
427
|
+
$[22] = ref;
|
|
428
|
+
$[23] = t6;
|
|
429
|
+
} else t6 = $[23];
|
|
430
|
+
const t7 = composeStyles(styles.surface, docked ? styles.docked : styles.full, docked ? dockedOf(placement) : fullOf(insets, covered), motion, style);
|
|
431
|
+
const T0 = View;
|
|
432
|
+
const t8 = composeStyles(styles.header, minHeightOf(header));
|
|
433
|
+
let t9;
|
|
434
|
+
if ($[24] !== colors.onSurface) {
|
|
435
|
+
t9 = /* @__PURE__ */ jsx(ArrowBackGlyph, { color: colors.onSurface });
|
|
436
|
+
$[24] = colors.onSurface;
|
|
437
|
+
$[25] = t9;
|
|
438
|
+
} else t9 = $[25];
|
|
439
|
+
let t10;
|
|
440
|
+
if ($[26] !== backLabel || $[27] !== styles.back || $[28] !== t9) {
|
|
441
|
+
t10 = /* @__PURE__ */ jsx(IconButton, {
|
|
442
|
+
"aria-label": backLabel,
|
|
443
|
+
slot: "close",
|
|
444
|
+
style: styles.back,
|
|
445
|
+
children: t9
|
|
446
|
+
});
|
|
447
|
+
$[26] = backLabel;
|
|
448
|
+
$[27] = styles.back;
|
|
449
|
+
$[28] = t9;
|
|
450
|
+
$[29] = t10;
|
|
451
|
+
} else t10 = $[29];
|
|
452
|
+
const t11 = autocomplete.setInputValue;
|
|
453
|
+
let t12;
|
|
454
|
+
if ($[30] !== setInput || $[31] !== setOwnInput) {
|
|
455
|
+
t12 = refsOf(setOwnInput, setInput);
|
|
456
|
+
$[30] = setInput;
|
|
457
|
+
$[31] = setOwnInput;
|
|
458
|
+
$[32] = t12;
|
|
459
|
+
} else t12 = $[32];
|
|
460
|
+
let t13;
|
|
461
|
+
if ($[33] !== autocomplete.inputValue || $[34] !== autocomplete.setInputValue || $[35] !== label || $[36] !== placeholder || $[37] !== t12) {
|
|
462
|
+
t13 = /* @__PURE__ */ jsx(FieldInput, {
|
|
463
|
+
"aria-label": label,
|
|
464
|
+
autoFocus: true,
|
|
465
|
+
onChangeText: t11,
|
|
466
|
+
placeholder,
|
|
467
|
+
ref: t12,
|
|
468
|
+
returnKeyType: "search",
|
|
469
|
+
role: "searchbox",
|
|
470
|
+
value: autocomplete.inputValue
|
|
471
|
+
});
|
|
472
|
+
$[33] = autocomplete.inputValue;
|
|
473
|
+
$[34] = autocomplete.setInputValue;
|
|
474
|
+
$[35] = label;
|
|
475
|
+
$[36] = placeholder;
|
|
476
|
+
$[37] = t12;
|
|
477
|
+
$[38] = t13;
|
|
478
|
+
} else t13 = $[38];
|
|
479
|
+
let t14;
|
|
480
|
+
if ($[39] !== autocomplete || $[40] !== clearLabel || $[41] !== input || $[42] !== styles.clear) {
|
|
481
|
+
t14 = autocomplete.inputValue === "" ? null : /* @__PURE__ */ jsx(IconButton, {
|
|
482
|
+
"aria-label": clearLabel,
|
|
483
|
+
onPress: clearOf(autocomplete, input),
|
|
484
|
+
style: styles.clear,
|
|
485
|
+
children: /* @__PURE__ */ jsx(CloseGlyph, {})
|
|
486
|
+
});
|
|
487
|
+
$[39] = autocomplete;
|
|
488
|
+
$[40] = clearLabel;
|
|
489
|
+
$[41] = input;
|
|
490
|
+
$[42] = styles.clear;
|
|
491
|
+
$[43] = t14;
|
|
492
|
+
} else t14 = $[43];
|
|
493
|
+
let t15;
|
|
494
|
+
if ($[44] !== T0 || $[45] !== t10 || $[46] !== t13 || $[47] !== t14 || $[48] !== t8) {
|
|
495
|
+
t15 = /* @__PURE__ */ jsxs(T0, {
|
|
496
|
+
style: t8,
|
|
497
|
+
children: [
|
|
498
|
+
t10,
|
|
499
|
+
t13,
|
|
500
|
+
t14
|
|
501
|
+
]
|
|
502
|
+
});
|
|
503
|
+
$[44] = T0;
|
|
504
|
+
$[45] = t10;
|
|
505
|
+
$[46] = t13;
|
|
506
|
+
$[47] = t14;
|
|
507
|
+
$[48] = t8;
|
|
508
|
+
$[49] = t15;
|
|
509
|
+
} else t15 = $[49];
|
|
510
|
+
let t16;
|
|
511
|
+
if ($[50] !== styles.divider) {
|
|
512
|
+
t16 = /* @__PURE__ */ jsx(View, { style: styles.divider });
|
|
513
|
+
$[50] = styles.divider;
|
|
514
|
+
$[51] = t16;
|
|
515
|
+
} else t16 = $[51];
|
|
516
|
+
let t17;
|
|
517
|
+
if ($[52] !== docked || $[53] !== header || $[54] !== styles.resultsFull || $[55] !== window.height) {
|
|
518
|
+
t17 = docked ? resultsOf(window.height, header) : styles.resultsFull;
|
|
519
|
+
$[52] = docked;
|
|
520
|
+
$[53] = header;
|
|
521
|
+
$[54] = styles.resultsFull;
|
|
522
|
+
$[55] = window.height;
|
|
523
|
+
$[56] = t17;
|
|
524
|
+
} else t17 = $[56];
|
|
525
|
+
let t18;
|
|
526
|
+
if ($[57] !== children || $[58] !== t17) {
|
|
527
|
+
t18 = /* @__PURE__ */ jsx(View, {
|
|
528
|
+
style: t17,
|
|
529
|
+
children
|
|
530
|
+
});
|
|
531
|
+
$[57] = children;
|
|
532
|
+
$[58] = t17;
|
|
533
|
+
$[59] = t18;
|
|
534
|
+
} else t18 = $[59];
|
|
535
|
+
let t19;
|
|
536
|
+
if ($[60] !== close || $[61] !== props || $[62] !== t15 || $[63] !== t16 || $[64] !== t18 || $[65] !== t2.View || $[66] !== t3 || $[67] !== t4 || $[68] !== t5 || $[69] !== t6 || $[70] !== t7) {
|
|
537
|
+
t19 = /* @__PURE__ */ jsxs(t2.View, {
|
|
538
|
+
...t3,
|
|
539
|
+
"aria-label": t4,
|
|
540
|
+
onAccessibilityEscape: close,
|
|
541
|
+
...props,
|
|
542
|
+
onLayout: t5,
|
|
543
|
+
ref: t6,
|
|
544
|
+
style: t7,
|
|
545
|
+
children: [
|
|
546
|
+
t15,
|
|
547
|
+
t16,
|
|
548
|
+
t18
|
|
549
|
+
]
|
|
550
|
+
});
|
|
551
|
+
$[60] = close;
|
|
552
|
+
$[61] = props;
|
|
553
|
+
$[62] = t15;
|
|
554
|
+
$[63] = t16;
|
|
555
|
+
$[64] = t18;
|
|
556
|
+
$[65] = t2.View;
|
|
557
|
+
$[66] = t3;
|
|
558
|
+
$[67] = t4;
|
|
559
|
+
$[68] = t5;
|
|
560
|
+
$[69] = t6;
|
|
561
|
+
$[70] = t7;
|
|
562
|
+
$[71] = t19;
|
|
563
|
+
} else t19 = $[71];
|
|
564
|
+
return t19;
|
|
565
|
+
}
|
|
566
|
+
SearchView.Content = SearchViewContent;
|
|
567
|
+
//#endregion
|
|
568
|
+
export { SearchView, SearchViewContent };
|
|
569
|
+
|
|
570
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","StyleProp","TextInput","ViewStyle","AnimatedStyle","EdgeInsets","OverlayTriggerState","createContext","use","useCallback","useMemo","useRef","useState","Platform","StyleSheet","useWindowDimensions","View","Animated","SafeAreaInsetsContext","useOverlayTriggerState","AutocompleteValue","ButtonSlots","AnchoredPlacement","ResolvedTheme","AutocompleteProps","AutocompleteContext","ButtonSlotContext","FieldInput","ArrowBackGlyph","CloseGlyph","useWindowSizeClass","useMessages","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","useAnchoredPlacement","useKeyboardTop","PANEL_ORIGINS","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","Autocomplete","IconButton","FULL_HEADER","MIN_WIDTH","MAX_WIDTH","MIN_RESULTS","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","back","marginStart","xs","clear","marginEnd","divider","backgroundColor","outline","flexShrink","height","docked","borderRadius","xl","boxShadow","elevation3","full","bottom","left","position","right","top","header","alignItems","flexDirection","gap","sm","paddingHorizontal","lg","resultsFull","flex","surface","surfaceContainerHigh","overflow","PanelProps","Omit","SearchViewContentProps","anchor","backLabel","clearLabel","close","isOpen","setInput","input","setPresent","present","T","children","label","placeholder","ref","style","testID","SearchViewProps","defaultOpen","onOpenChange","SearchViewRoot","state","SearchViewContext","clearOf","autocomplete","setInputValue","focus","dockedOf","placement","transformOrigin","side","width","Math","min","max","anchorWidth","fullOf","insets","covered","paddingBottom","measureBottomOf","panel","setBottom","measureInWindow","_x","y","_width","minHeightOf","minHeight","resultsOf","windowHeight","maxHeight","SearchView","t0","$","_c","t1","t2","open","t3","expanded","t4","default","trigger","slots","t5","root","t6","t7","SearchViewContent","defaultInputValue","filter","inputValue","onInputChange","props","Error","messages","undefined","clearSearch","t8","t9","t10","SearchViewPanel","theme","styles","sizing","typography","window","keyboardTop","align","motion","placed","setPanel","setOwnInput","controlLg","bodyLargeLineHeight","fontScale","Symbol","for","OS","onLayout","T0","onSurface","t11","t12","t13","t14","t15","t16","t17","t18","t19","Content","_c"],"sources":["../../../src/components/search-view/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextInput,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ButtonSlots } from '../../button/slots'\nimport type { AnchoredPlacement } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\nimport type { AutocompleteProps } from '../autocomplete'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { ButtonSlotContext } from '../../button/slots'\nimport { FieldInput } from '../../field'\nimport { ArrowBackGlyph, CloseGlyph } from '../../glyphs'\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { useMessages } from '../../i18n/provider'\nimport { insetsOf, ModalWindow, NO_INSETS, panelRoleOf } from '../../modal'\nimport { useAnchoredPlacement } from '../../overlay'\nimport { useKeyboardTop } from '../../overlay/keyboard'\nimport {\n PANEL_ORIGINS,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { Autocomplete } from '../autocomplete'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchView, the search page's search view: what a search opens\n// into. A header holds a back button, the input and a clear button, over a\n// 1dp divider in the outline role, and the results run under it. Both of the\n// page's forms are surface container high, with the input in body large on\n// surface over a supporting text in on surface variant, the back icon in on\n// surface and the clear icon in on surface variant.\n//\n// **Which form is the window's.** In a compact window it is the page's\n// full-screen view: the whole window, square, with a 72dp header, its content\n// inside the safe area while its fill runs on under it. From the medium\n// window up, the docked view: dropped under what opened it, as wide as that\n// and held between the page's 360dp and 720dp, with a 28dp corner, a 56dp\n// header, results at least 240dp tall and the whole view no taller than two\n// thirds of the window, at elevation 3, as web's takes them from Compose's\n// docked search bar. Both headers grow by as much as the input's line does at\n// the device's text size.\n//\n// **Both forms are drawn in a `Modal`**, through src/modal, as web's is a\n// dialog in a modal popover: a screen reader stays inside the view until it\n// closes, and a press outside the docked one lands on a scrim that draws\n// nothing and closes it. The docked one is placed by src/overlay's anchored\n// placement under its trigger, flipped above it where there is no room, and\n// kept above the software keyboard. Full screen, the results stop at the\n// keyboard's top edge, so the last of them can be scrolled into sight above\n// the keys.\n//\n// **It is Autocomplete around the header and the results**, as web's is: the\n// header's input is the autocomplete's field, so a ListBox or a List among\n// the results narrows as it is typed into, says how many rows a search leaves\n// to a screen reader, and takes a press on its first tap while the keyboard\n// is up, as it does anywhere inside an Autocomplete.\n//\n// **The header lines up with the search bar's.** The back button sits where\n// SearchField's magnifier does, its icon 28dp in, and the text starts at\n// 68dp, as the bar's does; the clear button's icon ends 28dp from the end. So\n// a view opened from a bar puts its input where the bar's was.\n//\n// **Focus goes to the input and back.** The input takes the keyboard's focus\n// as the view opens, and a screen reader is sent to it once the view shows,\n// and back to the trigger once it has gone. The back button closes it, as\n// Android's back gesture, VoiceOver's escape gesture and Escape on web do.\n// It fades and scales in and out, as src/overlay's anchored panels do, and\n// at once under reduced motion.\n\n// The page's full-screen header, and the docked view's bounds.\nconst FULL_HEADER = 72\nconst MIN_WIDTH = 360\nconst MAX_WIDTH = 720\nconst MIN_RESULTS = 240\n\n// The docked view's scrim takes presses and draws nothing.\nconst UNSEEN: ViewStyle = { opacity: 0 }\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // 4dp in from the header's padding, so the icon inside the 40dp button\n // sits 28dp in, where the search bar draws its magnifier.\n back: {\n marginStart: spacing.xs,\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends 28dp\n // from the end, as the search bar's does.\n clear: {\n marginEnd: spacing.xs,\n },\n // The page's divider under the header, in the outline role.\n divider: {\n backgroundColor: colors.outline,\n flexShrink: 0,\n height: 1,\n },\n docked: {\n borderRadius: radii.xl,\n boxShadow: shadows.elevation3,\n },\n full: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: spacing.sm,\n paddingHorizontal: spacing.lg,\n },\n // Full screen, the results take what the header leaves, and scroll\n // inside it.\n resultsFull: {\n flex: 1,\n },\n surface: {\n backgroundColor: colors.surfaceContainerHigh,\n overflow: 'hidden',\n },\n }),\n)\n\ntype PanelProps = Omit<\n SearchViewContentProps,\n | 'backLabel'\n | 'clearLabel'\n | 'defaultInputValue'\n | 'filter'\n | 'inputValue'\n | 'onInputChange'\n> & {\n readonly anchor: RefObject<HostInstance | null>\n readonly backLabel: string\n readonly clearLabel: string\n readonly close: () => void\n readonly docked: boolean\n readonly isOpen: boolean\n readonly setInput: (input: ComponentRef<typeof TextInput> | null) => void\n readonly setPresent: (present: boolean) => void\n}\n\ntype SearchViewContentProps<T extends object = object> = Omit<\n AutocompleteProps<T>,\n 'children'\n> & {\n /**\n * What the back button is called, for a screen reader. Left out, the\n * library names it in the `I18nProvider`'s locale, or the device's outside\n * one, \"Back\" in English.\n */\n readonly backLabel?: string\n /** The results: a ListBox or a List, which typing narrows. */\n readonly children?: ReactNode\n /**\n * What the clear button is called, for a screen reader. Left out, it is\n * the name React Aria gives web's in the `I18nProvider`'s locale, or the\n * device's outside one, \"Clear search\" in English.\n */\n readonly clearLabel?: string\n /**\n * What is searched, for a screen reader. It names both the view and its\n * input, and is read rather than shown; `placeholder` is what is seen.\n */\n readonly label: string\n /** The supporting text in the empty input, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype SearchViewProps = {\n /**\n * The Button or IconButton that opens the view, and `SearchView.Content`.\n */\n readonly children?: ReactNode\n /** Whether the view starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /** Whether the view is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /** Called with the new state as the view opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n}\n\n// What the content reads from the root: the open state, and the trigger's\n// node, which the docked view is placed under and focus goes back to.\ntype SearchViewRoot = {\n readonly anchor: RefObject<HostInstance | null>\n readonly state: OverlayTriggerState\n}\n\nconst SearchViewContext = createContext<null | SearchViewRoot>(null)\n\n// Empties the input from the clear button, and hands the keyboard back to it,\n// so the next search is typed straight in.\nfunction clearOf(\n autocomplete: AutocompleteValue,\n input: ComponentRef<typeof TextInput> | null,\n) {\n return () => {\n autocomplete.setInputValue('')\n input?.focus()\n }\n}\n\n// The docked view: as wide as what opened it, between the page's bounds,\n// and placed under it.\nfunction dockedOf(placement: AnchoredPlacement): ViewStyle {\n return {\n ...placement.style,\n transformOrigin: PANEL_ORIGINS[placement.side],\n width: Math.min(\n MAX_WIDTH,\n Math.max(MIN_WIDTH, placement.anchorWidth ?? MIN_WIDTH),\n ),\n }\n}\n\n// The full-screen view's content inside the safe area, and above the\n// keyboard where the keyboard reaches further up than the safe area's own\n// bottom inset.\nfunction fullOf(insets: EdgeInsets, covered: number): ViewStyle {\n return {\n ...insetsOf(insets),\n paddingBottom: Math.max(insets.bottom, covered),\n transformOrigin: 'top',\n }\n}\n\n// Where the view's bottom edge is in the window, kept for the keyboard to be\n// measured against.\nfunction measureBottomOf(\n panel: HostInstance | null,\n setBottom: (bottom: number) => void,\n) {\n return () => {\n panel?.measureInWindow((_x, y, _width, height) => {\n setBottom(y + height)\n })\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// The docked view's results: at least the page's 240dp, and short enough\n// that the view stays within two thirds of the window.\nfunction resultsOf(windowHeight: number, header: number): ViewStyle {\n return {\n maxHeight: (windowHeight * 2) / 3 - header - 1,\n minHeight: MIN_RESULTS,\n }\n}\n\n/**\n * The view a search opens into: full screen in a compact window, docked\n * under what opened it in a wider one. Pass `isOpen` with `onOpenChange` to\n * hold the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <SearchView>\n * <IconButton aria-label=\"Search\">\n * <SearchIcon />\n * </IconButton>\n * <SearchView.Content label=\"Search\" placeholder=\"Search\">\n * <ListBox aria-label=\"Results\">…</ListBox>\n * </SearchView.Content>\n * </SearchView>\n * ```\n *\n * Composed as Popover is: a `Button` or `IconButton` placed directly inside\n * `SearchView` opens the view, and `SearchView.Content` is the view itself.\n */\nfunction SearchView({\n children,\n defaultOpen,\n isOpen,\n onOpenChange,\n}: SearchViewProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const slots = useMemo<ButtonSlots>(\n () => ({\n default: () => {\n state.open()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n }),\n [state],\n )\n const root = useMemo<SearchViewRoot>(() => ({ anchor, state }), [state])\n\n return (\n <SearchViewContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </SearchViewContext>\n )\n}\n\n/**\n * The view: the header with its back button, input and clear button, and\n * the results under it, inside an Autocomplete, so typing narrows them. What\n * has been typed is the autocomplete's: pass `inputValue` with\n * `onInputChange` to control it, or `defaultInputValue` to let it keep its\n * own, which starts again each time the view opens.\n *\n * `style`, `ref` and `testID` land on the view's surface.\n */\nfunction SearchViewContent<T extends object = object>({\n backLabel,\n clearLabel,\n defaultInputValue,\n filter,\n inputValue,\n label,\n onInputChange,\n ...props\n}: SearchViewContentProps<T>) {\n const root = use(SearchViewContext)\n\n if (root === null) {\n throw new Error('SearchView.Content is drawn inside SearchView.')\n }\n\n const { anchor, state } = root\n const messages = useMessages()\n const docked = useWindowSizeClass() !== 'compact'\n const [present, setPresent] = useState(state.isOpen)\n const [input, setInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (state.isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, anchor)\n\n if (!present) {\n return null\n }\n\n return (\n <Autocomplete<T>\n defaultInputValue={defaultInputValue}\n filter={filter}\n inputValue={inputValue}\n onInputChange={onInputChange}\n >\n <ModalWindow\n isKeyboardDismissDisabled={false}\n label={label}\n labelledBy={undefined}\n onClose={close}\n onScrimPress={state.isOpen ? close : undefined}\n scrim={UNSEEN}\n // Full screen it is shown at once, so the screen reader goes to the\n // input as the window shows; docked, once the view has been placed.\n title={docked ? null : input}\n >\n <ButtonSlotContext value={slots}>\n <SearchViewPanel\n {...props}\n anchor={anchor}\n backLabel={backLabel ?? messages.back}\n clearLabel={clearLabel ?? messages.clearSearch}\n close={close}\n docked={docked}\n isOpen={state.isOpen}\n label={label}\n setInput={setInput}\n setPresent={setPresent}\n />\n </ButtonSlotContext>\n </ModalWindow>\n </Autocomplete>\n )\n}\n\n// The surface, drawn in the `Modal` so the anchored placement measures the\n// layer it is drawn in. Read inside the Autocomplete, whose value the input\n// shows and reports each edit to.\nfunction SearchViewPanel({\n anchor,\n backLabel,\n children,\n clearLabel,\n close,\n docked,\n isOpen,\n label,\n placeholder,\n ref,\n setInput,\n setPresent,\n style,\n ...props\n}: PanelProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { colors, sizing, typography } = theme\n const autocomplete = use(AutocompleteContext)\n const window = useWindowDimensions()\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const keyboardTop = useKeyboardTop()\n const placement = useAnchoredPlacement({ align: 'start', anchor })\n const motion = usePanelMotion(isOpen, !docked || placement.placed, setPresent)\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const [input, setOwnInput] = useState<ComponentRef<typeof TextInput> | null>(\n null,\n )\n const [bottom, setBottom] = useState<null | number>(null)\n const header =\n (docked ? sizing.controlLg : FULL_HEADER) +\n typography.bodyLargeLineHeight * (window.fontScale - 1)\n // Full screen, how far the keyboard reaches up over the view. iOS draws it\n // over the window, where Android's `Modal` shrinks the window to make room\n // and leaves it nothing to cover.\n const covered =\n keyboardTop === null || bottom === null ? 0 : bottom - keyboardTop\n\n useFocusOnPlaced(docked && placement.placed, input)\n\n if (autocomplete === null) {\n return null\n }\n\n return (\n <Animated.View\n {...panelRoleOf('dialog', undefined)}\n aria-label={Platform.OS === 'web' ? undefined : label}\n onAccessibilityEscape={close}\n {...props}\n onLayout={docked ? placement.onLayout : measureBottomOf(panel, setBottom)}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n docked ? styles.docked : styles.full,\n docked ? dockedOf(placement) : fullOf(insets, covered),\n motion,\n style,\n )}\n >\n <View\n style={composeStyles<ViewStyle>(styles.header, minHeightOf(header))}\n >\n <IconButton aria-label={backLabel} slot=\"close\" style={styles.back}>\n <ArrowBackGlyph color={colors.onSurface} />\n </IconButton>\n <FieldInput\n aria-label={label}\n // A search view opens to be typed into, so the input takes the\n // keyboard as it shows rather than leaving it to the back button.\n autoFocus\n onChangeText={autocomplete.setInputValue}\n placeholder={placeholder}\n ref={refsOf(setOwnInput, setInput)}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={autocomplete.inputValue}\n />\n {autocomplete.inputValue === '' ? null : (\n <IconButton\n aria-label={clearLabel}\n onPress={clearOf(autocomplete, input)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n )}\n </View>\n <View style={styles.divider} />\n <View\n style={docked ? resultsOf(window.height, header) : styles.resultsFull}\n >\n {children}\n </View>\n </Animated.View>\n )\n}\n\nSearchView.Content = SearchViewContent\n\nexport { SearchView, SearchViewContent }\nexport type { SearchViewContentProps, SearchViewProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAMoD,cAAc;AACpB,MAAMC,YAAY;AAClB,MAAMC,YAAY;AAClB,MAAMC,cAAc;AAGpB,MAAMC,SAAoB,EAAEC,SAAS,EAAE;AAEvC,MAAMC,WAAWT,cACd,EAAEU,QAAQC,OAAOC,SAASC,cACzB5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