@kanso-labs/react-native-kanso-ui 0.8.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/badge/index.js +9 -70
- package/dist/badge/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 +45 -23
- package/dist/button/index.js.map +1 -1
- package/dist/button/palettes.d.ts +2 -0
- 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/badge/index.d.ts +48 -0
- package/dist/components/badge/index.js +122 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/{badge → components/badge}/styles.js +10 -6
- package/dist/components/badge/styles.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +66 -0
- package/dist/components/breadcrumbs/index.js +285 -0
- package/dist/components/breadcrumbs/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/index.d.ts +7 -1
- package/dist/components/checkbox/index.js +183 -138
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.d.ts +92 -0
- package/dist/components/checkbox-group/index.js +306 -0
- package/dist/components/checkbox-group/index.js.map +1 -0
- package/dist/components/code/index.d.ts +25 -0
- package/dist/components/code/index.js +87 -0
- package/dist/components/code/index.js.map +1 -0
- 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/container/index.d.ts +47 -0
- package/dist/components/container/index.js +85 -0
- package/dist/components/container/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 +80 -0
- package/dist/components/fab/index.js +246 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/fab-menu/index.d.ts +120 -0
- package/dist/components/fab-menu/index.js +640 -0
- package/dist/components/fab-menu/index.js.map +1 -0
- package/dist/components/feed/index.d.ts +57 -0
- package/dist/components/feed/index.js +167 -0
- package/dist/components/feed/index.js.map +1 -0
- 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/keycap/index.d.ts +27 -0
- package/dist/components/keycap/index.js +136 -0
- package/dist/components/keycap/index.js.map +1 -0
- 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/menu/index.js +1 -1
- 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/separator/index.d.ts +3 -2
- package/dist/components/separator/index.js +29 -26
- package/dist/components/separator/index.js.map +1 -1
- 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/supporting-pane/index.d.ts +44 -0
- package/dist/components/supporting-pane/index.js +109 -0
- package/dist/components/supporting-pane/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/text/index.d.ts +1 -1
- package/dist/components/text/index.js +49 -21
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +145 -0
- package/dist/components/text-area/index.js +231 -0
- package/dist/components/text-area/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/toolbar/index.d.ts +53 -0
- package/dist/components/toolbar/index.js +185 -0
- package/dist/components/toolbar/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/control/group.js +23 -0
- package/dist/control/group.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/fab/index.d.ts +19 -0
- package/dist/fab/index.js +147 -0
- package/dist/fab/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 +350 -153
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +27 -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 +6 -4
- 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 +51 -6
- package/dist/index.js +47 -4
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +96 -68
- package/dist/modal/index.js.map +1 -1
- package/dist/navigation/index.js +8 -5
- package/dist/navigation/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 +16 -2
- 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/separator/index.js +7 -0
- package/dist/separator/index.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/dist/typography/size.js +14 -0
- package/dist/typography/size.js.map +1 -0
- package/package.json +11 -2
- package/dist/badge/styles.js.map +0 -1
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { useTheme } from "../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../theme/styles.js";
|
|
3
|
+
import { CalendarGlyph } from "../glyphs/index.js";
|
|
4
|
+
import { IconButton } from "../components/icon-button/index.js";
|
|
5
|
+
import { useWindowSizeClass } from "../hooks/useWindowSizeClass.js";
|
|
6
|
+
import { DismissLayer, PANEL_ORIGINS, useBackToClose, usePanelShown, usePanelStyle, useReturnFocus } from "../overlay/panel.js";
|
|
7
|
+
import { CalendarFocusContext } from "../calendar/index.js";
|
|
8
|
+
import { Overlay } from "../overlay/host.js";
|
|
9
|
+
import { useAnchoredPlacement } from "../overlay/anchored.js";
|
|
10
|
+
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf } from "../modal/index.js";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
12
|
+
import { AccessibilityInfo, Platform, StyleSheet, View } from "react-native";
|
|
13
|
+
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
14
|
+
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
15
|
+
import { use, useEffect, useEffectEvent, useState } from "react";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
//#region src/picker/index.tsx
|
|
18
|
+
const stylesOf = themedStyles(({ colors, radii, shadows }) => StyleSheet.create({
|
|
19
|
+
layout: {
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
bottom: 0,
|
|
22
|
+
justifyContent: "center",
|
|
23
|
+
left: 0,
|
|
24
|
+
pointerEvents: "box-none",
|
|
25
|
+
position: "absolute",
|
|
26
|
+
right: 0,
|
|
27
|
+
top: 0
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
maxHeight: "100%",
|
|
31
|
+
maxWidth: "100%",
|
|
32
|
+
transformOrigin: "center"
|
|
33
|
+
},
|
|
34
|
+
surface: {
|
|
35
|
+
backgroundColor: colors.surfaceContainerHigh,
|
|
36
|
+
borderRadius: radii.lg,
|
|
37
|
+
boxShadow: shadows.elevation3,
|
|
38
|
+
overflow: "hidden"
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
function PickerDocked(t0) {
|
|
42
|
+
const $ = c(19);
|
|
43
|
+
const { anchor, children, close, isOpen, label, setPresent } = t0;
|
|
44
|
+
const styles = stylesOf(useTheme());
|
|
45
|
+
let t1;
|
|
46
|
+
if ($[0] !== anchor) {
|
|
47
|
+
t1 = {
|
|
48
|
+
align: "start",
|
|
49
|
+
anchor
|
|
50
|
+
};
|
|
51
|
+
$[0] = anchor;
|
|
52
|
+
$[1] = t1;
|
|
53
|
+
} else t1 = $[1];
|
|
54
|
+
const placement = useAnchoredPlacement(t1);
|
|
55
|
+
const shown = usePanelShown(isOpen, placement.placed, setPresent);
|
|
56
|
+
const motion = usePanelStyle(shown);
|
|
57
|
+
const [panel, setPanel] = useState(null);
|
|
58
|
+
const [cell, setCell] = useState(null);
|
|
59
|
+
useBackToClose(close, isOpen);
|
|
60
|
+
useFocusOnceReady(isOpen && placement.placed, cell ?? panel);
|
|
61
|
+
let t2;
|
|
62
|
+
if ($[2] !== close || $[3] !== isOpen) {
|
|
63
|
+
t2 = isOpen ? /* @__PURE__ */ jsx(DismissLayer, { onPress: close }) : null;
|
|
64
|
+
$[2] = close;
|
|
65
|
+
$[3] = isOpen;
|
|
66
|
+
$[4] = t2;
|
|
67
|
+
} else t2 = $[4];
|
|
68
|
+
const t3 = Animated;
|
|
69
|
+
const t4 = placement.onLayout;
|
|
70
|
+
const t5 = "dialog";
|
|
71
|
+
const t6 = composeStyles(styles.surface, placement.style, { transformOrigin: PANEL_ORIGINS[placement.side] }, motion);
|
|
72
|
+
let t7;
|
|
73
|
+
if ($[5] !== children || $[6] !== setCell) {
|
|
74
|
+
t7 = /* @__PURE__ */ jsx(CalendarFocusContext, {
|
|
75
|
+
value: setCell,
|
|
76
|
+
children
|
|
77
|
+
});
|
|
78
|
+
$[5] = children;
|
|
79
|
+
$[6] = setCell;
|
|
80
|
+
$[7] = t7;
|
|
81
|
+
} else t7 = $[7];
|
|
82
|
+
let t8;
|
|
83
|
+
if ($[8] !== close || $[9] !== label || $[10] !== placement.onLayout || $[11] !== setPanel || $[12] !== t3.View || $[13] !== t6 || $[14] !== t7) {
|
|
84
|
+
t8 = /* @__PURE__ */ jsx(t3.View, {
|
|
85
|
+
"aria-label": label,
|
|
86
|
+
onAccessibilityEscape: close,
|
|
87
|
+
onLayout: t4,
|
|
88
|
+
ref: setPanel,
|
|
89
|
+
role: t5,
|
|
90
|
+
style: t6,
|
|
91
|
+
children: t7
|
|
92
|
+
});
|
|
93
|
+
$[8] = close;
|
|
94
|
+
$[9] = label;
|
|
95
|
+
$[10] = placement.onLayout;
|
|
96
|
+
$[11] = setPanel;
|
|
97
|
+
$[12] = t3.View;
|
|
98
|
+
$[13] = t6;
|
|
99
|
+
$[14] = t7;
|
|
100
|
+
$[15] = t8;
|
|
101
|
+
} else t8 = $[15];
|
|
102
|
+
let t9;
|
|
103
|
+
if ($[16] !== t2 || $[17] !== t8) {
|
|
104
|
+
t9 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t2, t8] });
|
|
105
|
+
$[16] = t2;
|
|
106
|
+
$[17] = t8;
|
|
107
|
+
$[18] = t9;
|
|
108
|
+
} else t9 = $[18];
|
|
109
|
+
return t9;
|
|
110
|
+
}
|
|
111
|
+
function PickerModal(t0) {
|
|
112
|
+
const $ = c(25);
|
|
113
|
+
const { children, close, isOpen, label, setPresent } = t0;
|
|
114
|
+
const theme = useTheme();
|
|
115
|
+
const { spacing } = theme;
|
|
116
|
+
const styles = stylesOf(theme);
|
|
117
|
+
const insets = use(SafeAreaInsetsContext) ?? NO_INSETS;
|
|
118
|
+
const shown = usePanelShown(isOpen, true, setPresent);
|
|
119
|
+
const motion = usePanelStyle(shown);
|
|
120
|
+
const scrim = useAnimatedStyle(() => {
|
|
121
|
+
"worklet";
|
|
122
|
+
return { opacity: shown.get() };
|
|
123
|
+
});
|
|
124
|
+
const [panel, setPanel] = useState(null);
|
|
125
|
+
const [cell, setCell] = useState(null);
|
|
126
|
+
const T0 = ModalWindow;
|
|
127
|
+
const t1 = false;
|
|
128
|
+
const t2 = void 0;
|
|
129
|
+
const t3 = isOpen ? close : void 0;
|
|
130
|
+
const t4 = cell ?? panel;
|
|
131
|
+
const T1 = View;
|
|
132
|
+
const t5 = composeStyles(styles.layout, insetsOf(roomOf(insets, spacing.lg)));
|
|
133
|
+
const t6 = Animated;
|
|
134
|
+
let t7;
|
|
135
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
136
|
+
t7 = panelRoleOf("dialog", void 0);
|
|
137
|
+
$[0] = t7;
|
|
138
|
+
} else t7 = $[0];
|
|
139
|
+
const t8 = Platform.OS === "web" ? void 0 : label;
|
|
140
|
+
const t9 = composeStyles(styles.surface, styles.modal, motion);
|
|
141
|
+
let t10;
|
|
142
|
+
if ($[1] !== children || $[2] !== setCell) {
|
|
143
|
+
t10 = /* @__PURE__ */ jsx(CalendarFocusContext, {
|
|
144
|
+
value: setCell,
|
|
145
|
+
children
|
|
146
|
+
});
|
|
147
|
+
$[1] = children;
|
|
148
|
+
$[2] = setCell;
|
|
149
|
+
$[3] = t10;
|
|
150
|
+
} else t10 = $[3];
|
|
151
|
+
let t11;
|
|
152
|
+
if ($[4] !== close || $[5] !== setPanel || $[6] !== t10 || $[7] !== t6.View || $[8] !== t7 || $[9] !== t8 || $[10] !== t9) {
|
|
153
|
+
t11 = /* @__PURE__ */ jsx(t6.View, {
|
|
154
|
+
...t7,
|
|
155
|
+
"aria-label": t8,
|
|
156
|
+
onAccessibilityEscape: close,
|
|
157
|
+
ref: setPanel,
|
|
158
|
+
style: t9,
|
|
159
|
+
children: t10
|
|
160
|
+
});
|
|
161
|
+
$[4] = close;
|
|
162
|
+
$[5] = setPanel;
|
|
163
|
+
$[6] = t10;
|
|
164
|
+
$[7] = t6.View;
|
|
165
|
+
$[8] = t7;
|
|
166
|
+
$[9] = t8;
|
|
167
|
+
$[10] = t9;
|
|
168
|
+
$[11] = t11;
|
|
169
|
+
} else t11 = $[11];
|
|
170
|
+
let t12;
|
|
171
|
+
if ($[12] !== T1 || $[13] !== t11 || $[14] !== t5) {
|
|
172
|
+
t12 = /* @__PURE__ */ jsx(T1, {
|
|
173
|
+
style: t5,
|
|
174
|
+
children: t11
|
|
175
|
+
});
|
|
176
|
+
$[12] = T1;
|
|
177
|
+
$[13] = t11;
|
|
178
|
+
$[14] = t5;
|
|
179
|
+
$[15] = t12;
|
|
180
|
+
} else t12 = $[15];
|
|
181
|
+
let t13;
|
|
182
|
+
if ($[16] !== T0 || $[17] !== close || $[18] !== label || $[19] !== scrim || $[20] !== t12 || $[21] !== t2 || $[22] !== t3 || $[23] !== t4) {
|
|
183
|
+
t13 = /* @__PURE__ */ jsx(T0, {
|
|
184
|
+
isKeyboardDismissDisabled: t1,
|
|
185
|
+
label,
|
|
186
|
+
labelledBy: t2,
|
|
187
|
+
onClose: close,
|
|
188
|
+
onScrimPress: t3,
|
|
189
|
+
scrim,
|
|
190
|
+
title: t4,
|
|
191
|
+
children: t12
|
|
192
|
+
});
|
|
193
|
+
$[16] = T0;
|
|
194
|
+
$[17] = close;
|
|
195
|
+
$[18] = label;
|
|
196
|
+
$[19] = scrim;
|
|
197
|
+
$[20] = t12;
|
|
198
|
+
$[21] = t2;
|
|
199
|
+
$[22] = t3;
|
|
200
|
+
$[23] = t4;
|
|
201
|
+
$[24] = t13;
|
|
202
|
+
} else t13 = $[24];
|
|
203
|
+
return t13;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* The calendar's surface while it is open and while its exit runs: mounted
|
|
207
|
+
* the moment the picker opens, and kept until it has faded out, docked under
|
|
208
|
+
* the field or modal in the middle of the window by the window's size. A
|
|
209
|
+
* screen reader goes back to the trigger once it has gone.
|
|
210
|
+
*/
|
|
211
|
+
function PickerPopup(t0) {
|
|
212
|
+
const $ = c(8);
|
|
213
|
+
let props;
|
|
214
|
+
let trigger;
|
|
215
|
+
if ($[0] !== t0) {
|
|
216
|
+
({trigger, ...props} = t0);
|
|
217
|
+
$[0] = t0;
|
|
218
|
+
$[1] = props;
|
|
219
|
+
$[2] = trigger;
|
|
220
|
+
} else {
|
|
221
|
+
props = $[1];
|
|
222
|
+
trigger = $[2];
|
|
223
|
+
}
|
|
224
|
+
const [present, setPresent] = useState(props.isOpen);
|
|
225
|
+
const modal = useWindowSizeClass() === "compact";
|
|
226
|
+
if (props.isOpen && !present) setPresent(true);
|
|
227
|
+
let t1;
|
|
228
|
+
if ($[3] !== trigger) {
|
|
229
|
+
t1 = { current: trigger };
|
|
230
|
+
$[3] = trigger;
|
|
231
|
+
$[4] = t1;
|
|
232
|
+
} else t1 = $[4];
|
|
233
|
+
useReturnFocus(present, false, t1);
|
|
234
|
+
if (!present) return null;
|
|
235
|
+
let t2;
|
|
236
|
+
if ($[5] !== modal || $[6] !== props) {
|
|
237
|
+
t2 = modal ? /* @__PURE__ */ jsx(PickerModal, {
|
|
238
|
+
...props,
|
|
239
|
+
setPresent
|
|
240
|
+
}) : /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(PickerDocked, {
|
|
241
|
+
...props,
|
|
242
|
+
setPresent
|
|
243
|
+
}) });
|
|
244
|
+
$[5] = modal;
|
|
245
|
+
$[6] = props;
|
|
246
|
+
$[7] = t2;
|
|
247
|
+
} else t2 = $[7];
|
|
248
|
+
return t2;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* The button in the field's trailing slot that opens the calendar: the icon
|
|
252
|
+
* buttons page's 40dp standard button holding the calendar icon, reporting
|
|
253
|
+
* whether the calendar is open. A disabled or read-only field disables it,
|
|
254
|
+
* since neither takes a date from the calendar either.
|
|
255
|
+
*/
|
|
256
|
+
function PickerTrigger(t0) {
|
|
257
|
+
const $ = c(7);
|
|
258
|
+
const { isDisabled, isOpen, label, onPress, ref } = t0;
|
|
259
|
+
let t1;
|
|
260
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
261
|
+
t1 = /* @__PURE__ */ jsx(CalendarGlyph, {});
|
|
262
|
+
$[0] = t1;
|
|
263
|
+
} else t1 = $[0];
|
|
264
|
+
let t2;
|
|
265
|
+
if ($[1] !== isDisabled || $[2] !== isOpen || $[3] !== label || $[4] !== onPress || $[5] !== ref) {
|
|
266
|
+
t2 = /* @__PURE__ */ jsx(IconButton, {
|
|
267
|
+
"aria-expanded": isOpen,
|
|
268
|
+
"aria-label": label,
|
|
269
|
+
isDisabled,
|
|
270
|
+
onPress,
|
|
271
|
+
ref,
|
|
272
|
+
children: t1
|
|
273
|
+
});
|
|
274
|
+
$[1] = isDisabled;
|
|
275
|
+
$[2] = isOpen;
|
|
276
|
+
$[3] = label;
|
|
277
|
+
$[4] = onPress;
|
|
278
|
+
$[5] = ref;
|
|
279
|
+
$[6] = t2;
|
|
280
|
+
} else t2 = $[6];
|
|
281
|
+
return t2;
|
|
282
|
+
}
|
|
283
|
+
function roomOf(insets, room) {
|
|
284
|
+
return {
|
|
285
|
+
bottom: insets.bottom + room,
|
|
286
|
+
left: insets.left + room,
|
|
287
|
+
right: insets.right + room,
|
|
288
|
+
top: insets.top + room
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function useFocusOnceReady(ready, target) {
|
|
292
|
+
const $ = c(7);
|
|
293
|
+
let t0;
|
|
294
|
+
if ($[0] !== target) {
|
|
295
|
+
t0 = () => {
|
|
296
|
+
if (target !== null && Platform.OS !== "web") AccessibilityInfo.sendAccessibilityEvent(target, "focus");
|
|
297
|
+
};
|
|
298
|
+
$[0] = target;
|
|
299
|
+
$[1] = t0;
|
|
300
|
+
} else t0 = $[1];
|
|
301
|
+
const sendFocus = useEffectEvent(t0);
|
|
302
|
+
let t1;
|
|
303
|
+
if ($[2] !== ready || $[3] !== sendFocus) {
|
|
304
|
+
t1 = () => {
|
|
305
|
+
if (ready) sendFocus();
|
|
306
|
+
};
|
|
307
|
+
$[2] = ready;
|
|
308
|
+
$[3] = sendFocus;
|
|
309
|
+
$[4] = t1;
|
|
310
|
+
} else t1 = $[4];
|
|
311
|
+
let t2;
|
|
312
|
+
if ($[5] !== ready) {
|
|
313
|
+
t2 = [ready];
|
|
314
|
+
$[5] = ready;
|
|
315
|
+
$[6] = t2;
|
|
316
|
+
} else t2 = $[6];
|
|
317
|
+
useEffect(t1, t2);
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
export { PickerPopup, PickerTrigger, roomOf };
|
|
321
|
+
|
|
322
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","HostInstance","View","ViewStyle","AnimatedStyle","EdgeInsets","use","useEffect","useEffectEvent","useState","AccessibilityInfo","NativeView","Platform","StyleSheet","Animated","useAnimatedStyle","SafeAreaInsetsContext","ResolvedTheme","CalendarFocusContext","IconButton","CalendarGlyph","useWindowSizeClass","insetsOf","ModalWindow","NO_INSETS","panelRoleOf","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","usePanelShown","usePanelStyle","useReturnFocus","useTheme","composeStyles","themedStyles","PickerPopupProps","anchor","children","close","isOpen","label","trigger","PickerSurfaceProps","Omit","setPresent","present","PickerTriggerProps","isDisabled","onPress","ref","stylesOf","colors","radii","shadows","create","layout","alignItems","bottom","justifyContent","left","pointerEvents","position","right","top","modal","maxHeight","maxWidth","transformOrigin","surface","backgroundColor","surfaceContainerHigh","borderRadius","lg","boxShadow","elevation3","overflow","PickerDocked","t0","$","_c","styles","t1","align","placement","shown","placed","motion","panel","setPanel","cell","setCell","useFocusOnceReady","t2","t3","t4","onLayout","t5","t6","style","side","t7","t8","t9","PickerModal","theme","spacing","insets","scrim","opacity","get","T0","undefined","T1","roomOf","Symbol","for","OS","t10","t11","t12","t13","PickerPopup","props","current","PickerTrigger","room","ready","target","sendAccessibilityEvent","sendFocus","_c","NativeView"],"sources":["../../src/picker/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type { HostInstance, View, ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { EdgeInsets } from 'react-native-safe-area-context'\n\nimport { use, useEffect, useEffectEvent, useState } from 'react'\nimport {\n AccessibilityInfo,\n View as NativeView,\n Platform,\n StyleSheet,\n} from 'react-native'\nimport Animated, { useAnimatedStyle } from 'react-native-reanimated'\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { CalendarFocusContext } from '../calendar'\nimport { IconButton } from '../components/icon-button'\nimport { CalendarGlyph } from '../glyphs'\nimport { useWindowSizeClass } from '../hooks/useWindowSizeClass'\nimport { insetsOf, ModalWindow, NO_INSETS, panelRoleOf } from '../modal'\nimport { Overlay, useAnchoredPlacement } from '../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n usePanelShown,\n usePanelStyle,\n useReturnFocus,\n} from '../overlay/panel'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles, themedStyles } from '../theme/styles'\n\n// What a date picker and a date range picker draw in common: the button in\n// the field's trailing slot that opens the calendar, and the surface the\n// calendar opens on, as kanso-ui's src/styles/picker.ts holds the two for\n// web's pickers. Both pickers put the same two on screen, and a docked\n// picker and a range picker that disagreed about where the modal sits would\n// be two bugs rather than one. Internal: nothing here is exported from the\n// package.\n//\n// **The surface is docked from the medium window size up and modal below\n// it**, the pairing the date pickers page draws: in a compact window the\n// picker is a dialog, centred over the scrim with 16dp of room around it,\n// and from 600dp up it hangs under the field, placed by src/overlay as every\n// anchored panel here is, and flipped above it where the window has no room\n// below. Docked, a 360dp calendar anchored to a field is out of reach on a\n// phone; modal, a centred calendar on a tablet covers a form for no reason.\n//\n// **The surface is the calendar's own fill and corner**, surface container\n// high at the large corner, at the third elevation, the docked and the modal\n// picker's level alike, so the calendar inside it draws no second edge.\n//\n// **It fades and scales in and out** as every anchored panel here does, from\n// the edge facing the field docked and from its own centre modal, and the\n// scrim fades with it, both ways. Under reduced motion both arrive and leave\n// at once.\n//\n// **A screen reader goes to the date the calendar is on as it opens**, the\n// date held or else the one the calendar opens on, as web's focus does,\n// through the calendar's CalendarFocusContext. A surface holding no calendar\n// sends it to the surface itself.\n\ntype PickerPopupProps = {\n /** The field's box, which a docked surface is placed under. */\n readonly anchor: RefObject<HostInstance | null>\n /** The calendar. */\n readonly children?: ReactNode\n readonly close: () => void\n readonly isOpen: boolean\n /** The surface's name, which is the trigger's. */\n readonly label: string\n /** The trigger, which a screen reader goes back to once the surface has gone. */\n readonly trigger: HostInstance | null\n}\n\ntype PickerSurfaceProps = Omit<PickerPopupProps, 'trigger'> & {\n readonly setPresent: (present: boolean) => void\n}\n\ntype PickerTriggerProps = {\n readonly isDisabled: boolean\n /** Whether the calendar is open, which the button reports. */\n readonly isOpen: boolean\n /** The button's name: what opens the calendar, then the field's label. */\n readonly label: string\n readonly onPress: () => void\n readonly ref?: Ref<ComponentRef<typeof View>>\n}\n\nconst stylesOf = themedStyles(({ colors, radii, shadows }: ResolvedTheme) =>\n StyleSheet.create({\n // The modal surface's room: centred in the window, its padding 16dp\n // clear of every edge inside the safe area. It takes no touches itself,\n // so a press around the surface reaches the scrim under it.\n layout: {\n alignItems: 'center',\n bottom: 0,\n justifyContent: 'center',\n left: 0,\n pointerEvents: 'box-none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n // As wide as the calendar, and no wider than the room the layout leaves,\n // which a calendar narrows to.\n modal: {\n maxHeight: '100%',\n maxWidth: '100%',\n transformOrigin: 'center',\n },\n // The page's docked container: the calendar's own fill and corner, at\n // the third elevation, clipping the calendar to the corner.\n surface: {\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.lg,\n boxShadow: shadows.elevation3,\n overflow: 'hidden',\n },\n }),\n)\n\n// The surface docked under the field, in the overlay host above the screen:\n// placed at the field's start edge, flipped above it at the window's edge,\n// over a layer a press outside it lands on.\nfunction PickerDocked({\n anchor,\n children,\n close,\n isOpen,\n label,\n setPresent,\n}: PickerSurfaceProps) {\n const styles = stylesOf(useTheme())\n const placement = useAnchoredPlacement({ align: 'start', anchor })\n const shown = usePanelShown(isOpen, placement.placed, setPresent)\n const motion = usePanelStyle(shown)\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const [cell, setCell] = useState<HostInstance | null>(null)\n\n useBackToClose(close, isOpen)\n useFocusOnceReady(isOpen && placement.placed, cell ?? panel)\n\n return (\n <>\n {isOpen ? <DismissLayer onPress={close} /> : null}\n <Animated.View\n aria-label={label}\n onAccessibilityEscape={close}\n onLayout={placement.onLayout}\n ref={setPanel}\n role=\"dialog\"\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n )}\n >\n <CalendarFocusContext value={setCell}>{children}</CalendarFocusContext>\n </Animated.View>\n </>\n )\n}\n\n// The surface as the page's modal picker: in a `Modal`, through src/modal,\n// centred over the scrim, which fades with it. A press on the scrim, the back\n// gesture and VoiceOver's escape gesture close it.\nfunction PickerModal({\n children,\n close,\n isOpen,\n label,\n setPresent,\n}: PickerSurfaceProps) {\n const theme = useTheme()\n const { spacing } = theme\n const styles = stylesOf(theme)\n const insets = use(SafeAreaInsetsContext) ?? NO_INSETS\n const shown = usePanelShown(isOpen, true, setPresent)\n const motion = usePanelStyle(shown)\n const scrim = useAnimatedStyle(() => {\n 'worklet'\n return { opacity: shown.get() }\n })\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const [cell, setCell] = useState<HostInstance | null>(null)\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={false}\n label={label}\n labelledBy={undefined}\n onClose={close}\n onScrimPress={isOpen ? close : undefined}\n scrim={scrim}\n title={cell ?? panel}\n >\n <NativeView\n style={composeStyles<ViewStyle>(\n styles.layout,\n insetsOf(roomOf(insets, spacing.lg)),\n )}\n >\n <Animated.View\n {...panelRoleOf('dialog', undefined)}\n aria-label={Platform.OS === 'web' ? undefined : label}\n onAccessibilityEscape={close}\n ref={setPanel}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n styles.modal,\n motion,\n )}\n >\n <CalendarFocusContext value={setCell}>\n {children}\n </CalendarFocusContext>\n </Animated.View>\n </NativeView>\n </ModalWindow>\n )\n}\n\n/**\n * The calendar's surface while it is open and while its exit runs: mounted\n * the moment the picker opens, and kept until it has faded out, docked under\n * the field or modal in the middle of the window by the window's size. A\n * screen reader goes back to the trigger once it has gone.\n */\nfunction PickerPopup({ trigger, ...props }: PickerPopupProps) {\n const [present, setPresent] = useState(props.isOpen)\n const modal = useWindowSizeClass() === 'compact'\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (props.isOpen && !present) {\n setPresent(true)\n }\n\n useReturnFocus(present, false, { current: trigger })\n\n if (!present) {\n return null\n }\n\n return modal ? (\n <PickerModal {...props} setPresent={setPresent} />\n ) : (\n <Overlay>\n <PickerDocked {...props} setPresent={setPresent} />\n </Overlay>\n )\n}\n\n/**\n * The button in the field's trailing slot that opens the calendar: the icon\n * buttons page's 40dp standard button holding the calendar icon, reporting\n * whether the calendar is open. A disabled or read-only field disables it,\n * since neither takes a date from the calendar either.\n */\nfunction PickerTrigger({\n isDisabled,\n isOpen,\n label,\n onPress,\n ref,\n}: PickerTriggerProps) {\n return (\n <IconButton\n aria-expanded={isOpen}\n aria-label={label}\n isDisabled={isDisabled}\n onPress={onPress}\n ref={ref}\n >\n <CalendarGlyph />\n </IconButton>\n )\n}\n\n// The safe area with `room` more on every side, which the modal surface\n// keeps clear of the window's edges.\nfunction roomOf(insets: EdgeInsets, room: number): EdgeInsets {\n return {\n bottom: insets.bottom + room,\n left: insets.left + room,\n right: insets.right + room,\n top: insets.top + room,\n }\n}\n\n// Sends a screen reader to `target` as the docked surface is placed, once\n// each time it opens. The date the calendar is on moves with the month shown\n// and with a date pressed while the surface stays open, and a reader on the\n// next month's button stays there rather than being sent after it.\nfunction useFocusOnceReady(ready: boolean, target: HostInstance | null) {\n const sendFocus = useEffectEvent(() => {\n if (target !== null && Platform.OS !== 'web') {\n AccessibilityInfo.sendAccessibilityEvent(target, 'focus')\n }\n })\n\n useEffect(() => {\n if (ready) {\n sendFocus()\n }\n }, [ready])\n}\n\nexport { PickerPopup, PickerTrigger, roomOf }\nexport type { PickerPopupProps, PickerTriggerProps }\n"],"mappings":";;;;;;;;;;;;;;;;;AA2FA,MAAMuD,WAAWhB,cAAc,EAAEiB,QAAQC,OAAOC,cAC9C1C,WAAW2C,OAAO;CAIhBC,QAAQ;EACNC,YAAY;EACZC,QAAQ;EACRC,gBAAgB;EAChBC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;CAGAC,OAAO;EACLC,WAAW;EACXC,UAAU;EACVC,iBAAiB;CACnB;CAGAC,SAAS;EACPC,iBAAiBlB,OAAOmB;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D,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAgD,OAAA;EAAElC,KAAA,CAACkC,KAAK;EAAChD,EAAA,KAAAgD;EAAAhD,EAAA,KAAAc;CAAA,OAAAA,KAAAd,EAAA;CAJVzE,UAAU4E,IAIPW,EAAO;AAAC"}
|
package/dist/press/index.js
CHANGED
|
@@ -77,9 +77,10 @@ function hitSlop(height, width = 48) {
|
|
|
77
77
|
*/
|
|
78
78
|
function usePressFeedback(t0) {
|
|
79
79
|
const $ = c(59);
|
|
80
|
-
const { area, color, corners, disabled, disableRipple: t1, disc, onBlur, onFocus, onHoverIn, onHoverOut, onPressIn, onPressOut, pending, pressedColor:
|
|
80
|
+
const { area, color, corners, disabled, disableRipple: t1, disc, held: t2, onBlur, onFocus, onHoverIn, onHoverOut, onPressIn, onPressOut, pending, pressedColor: t3 } = t0;
|
|
81
81
|
const disableRipple = t1 === void 0 ? false : t1;
|
|
82
|
-
const
|
|
82
|
+
const held = t2 === void 0 ? false : t2;
|
|
83
|
+
const pressedColor = t3 === void 0 ? color : t3;
|
|
83
84
|
const theme = useTheme();
|
|
84
85
|
const reduceMotion = useReducedMotion();
|
|
85
86
|
const [hovered, setHovered] = useState(false);
|
|
@@ -116,9 +117,9 @@ function usePressFeedback(t0) {
|
|
|
116
117
|
width: size
|
|
117
118
|
};
|
|
118
119
|
});
|
|
119
|
-
let
|
|
120
|
+
let t4;
|
|
120
121
|
if ($[0] !== fade || $[1] !== geometry || $[2] !== grow || $[3] !== motion || $[4] !== spacing || $[5] !== stateLayerOpacity) {
|
|
121
|
-
|
|
122
|
+
t4 = function ripple(width, height, origin) {
|
|
122
123
|
const size_0 = Math.max(1, Math.floor(Math.max(width, height) * INITIAL_ORIGIN_SCALE));
|
|
123
124
|
geometry.set({
|
|
124
125
|
end: {
|
|
@@ -149,12 +150,12 @@ function usePressFeedback(t0) {
|
|
|
149
150
|
$[3] = motion;
|
|
150
151
|
$[4] = spacing;
|
|
151
152
|
$[5] = stateLayerOpacity;
|
|
152
|
-
$[6] =
|
|
153
|
-
} else
|
|
154
|
-
const ripple =
|
|
155
|
-
let
|
|
153
|
+
$[6] = t4;
|
|
154
|
+
} else t4 = $[6];
|
|
155
|
+
const ripple = t4;
|
|
156
|
+
let t5;
|
|
156
157
|
if ($[7] !== fade || $[8] !== motion) {
|
|
157
|
-
|
|
158
|
+
t5 = function release() {
|
|
158
159
|
const shown = Date.now() - pressStarted.current;
|
|
159
160
|
fade.set(withDelay(Math.max(0, motion.durationMedium1 - shown), withTiming(0, {
|
|
160
161
|
duration: FADE_OUT,
|
|
@@ -163,51 +164,51 @@ function usePressFeedback(t0) {
|
|
|
163
164
|
};
|
|
164
165
|
$[7] = fade;
|
|
165
166
|
$[8] = motion;
|
|
166
|
-
$[9] =
|
|
167
|
-
} else
|
|
168
|
-
const release =
|
|
169
|
-
let
|
|
167
|
+
$[9] = t5;
|
|
168
|
+
} else t5 = $[9];
|
|
169
|
+
const release = t5;
|
|
170
|
+
let t6;
|
|
170
171
|
if ($[10] !== onBlur) {
|
|
171
|
-
|
|
172
|
+
t6 = (event) => {
|
|
172
173
|
focused.current = false;
|
|
173
174
|
setRingShown(false);
|
|
174
175
|
onBlur?.(event);
|
|
175
176
|
};
|
|
176
177
|
$[10] = onBlur;
|
|
177
|
-
$[11] =
|
|
178
|
-
} else
|
|
179
|
-
let
|
|
178
|
+
$[11] = t6;
|
|
179
|
+
} else t6 = $[11];
|
|
180
|
+
let t7;
|
|
180
181
|
if ($[12] !== onFocus) {
|
|
181
|
-
|
|
182
|
+
t7 = (event_0) => {
|
|
182
183
|
focused.current = true;
|
|
183
184
|
setRingShown(!pressedUnfocused.current);
|
|
184
185
|
pressedUnfocused.current = false;
|
|
185
186
|
onFocus?.(event_0);
|
|
186
187
|
};
|
|
187
188
|
$[12] = onFocus;
|
|
188
|
-
$[13] =
|
|
189
|
-
} else
|
|
190
|
-
let
|
|
189
|
+
$[13] = t7;
|
|
190
|
+
} else t7 = $[13];
|
|
191
|
+
let t8;
|
|
191
192
|
if ($[14] !== onHoverIn) {
|
|
192
|
-
|
|
193
|
+
t8 = (event_1) => {
|
|
193
194
|
setHovered(true);
|
|
194
195
|
onHoverIn?.(event_1);
|
|
195
196
|
};
|
|
196
197
|
$[14] = onHoverIn;
|
|
197
|
-
$[15] =
|
|
198
|
-
} else
|
|
199
|
-
let
|
|
198
|
+
$[15] = t8;
|
|
199
|
+
} else t8 = $[15];
|
|
200
|
+
let t9;
|
|
200
201
|
if ($[16] !== onHoverOut) {
|
|
201
|
-
|
|
202
|
+
t9 = (event_2) => {
|
|
202
203
|
setHovered(false);
|
|
203
204
|
onHoverOut?.(event_2);
|
|
204
205
|
};
|
|
205
206
|
$[16] = onHoverOut;
|
|
206
|
-
$[17] =
|
|
207
|
-
} else
|
|
208
|
-
let
|
|
207
|
+
$[17] = t9;
|
|
208
|
+
} else t9 = $[17];
|
|
209
|
+
let t10;
|
|
209
210
|
if ($[18] !== area || $[19] !== disc || $[20] !== onPressIn || $[21] !== release || $[22] !== ripple || $[23] !== rippled) {
|
|
210
|
-
|
|
211
|
+
t10 = (event_3) => {
|
|
211
212
|
pressedUnfocused.current = !focused.current;
|
|
212
213
|
setPressed(true);
|
|
213
214
|
const fixed = disc === void 0 ? area : {
|
|
@@ -242,11 +243,11 @@ function usePressFeedback(t0) {
|
|
|
242
243
|
$[21] = release;
|
|
243
244
|
$[22] = ripple;
|
|
244
245
|
$[23] = rippled;
|
|
245
|
-
$[24] =
|
|
246
|
-
} else
|
|
247
|
-
let
|
|
246
|
+
$[24] = t10;
|
|
247
|
+
} else t10 = $[24];
|
|
248
|
+
let t11;
|
|
248
249
|
if ($[25] !== onPressOut || $[26] !== release) {
|
|
249
|
-
|
|
250
|
+
t11 = (event_4) => {
|
|
250
251
|
pressedUnfocused.current = false;
|
|
251
252
|
setPressed(false);
|
|
252
253
|
if (phase.current === "shown") release();
|
|
@@ -255,100 +256,101 @@ function usePressFeedback(t0) {
|
|
|
255
256
|
};
|
|
256
257
|
$[25] = onPressOut;
|
|
257
258
|
$[26] = release;
|
|
258
|
-
$[27] =
|
|
259
|
-
} else
|
|
260
|
-
let
|
|
261
|
-
if ($[28] !== t10 || $[29] !==
|
|
262
|
-
|
|
263
|
-
onBlur:
|
|
264
|
-
onFocus:
|
|
265
|
-
onHoverIn:
|
|
266
|
-
onHoverOut:
|
|
267
|
-
onPressIn:
|
|
268
|
-
onPressOut:
|
|
259
|
+
$[27] = t11;
|
|
260
|
+
} else t11 = $[27];
|
|
261
|
+
let t12;
|
|
262
|
+
if ($[28] !== t10 || $[29] !== t11 || $[30] !== t6 || $[31] !== t7 || $[32] !== t8 || $[33] !== t9) {
|
|
263
|
+
t12 = {
|
|
264
|
+
onBlur: t6,
|
|
265
|
+
onFocus: t7,
|
|
266
|
+
onHoverIn: t8,
|
|
267
|
+
onHoverOut: t9,
|
|
268
|
+
onPressIn: t10,
|
|
269
|
+
onPressOut: t11
|
|
269
270
|
};
|
|
270
271
|
$[28] = t10;
|
|
271
|
-
$[29] =
|
|
272
|
+
$[29] = t11;
|
|
272
273
|
$[30] = t6;
|
|
273
274
|
$[31] = t7;
|
|
274
275
|
$[32] = t8;
|
|
275
276
|
$[33] = t9;
|
|
276
|
-
$[34] =
|
|
277
|
-
} else
|
|
278
|
-
const handlers =
|
|
279
|
-
const
|
|
280
|
-
|
|
277
|
+
$[34] = t12;
|
|
278
|
+
} else t12 = $[34];
|
|
279
|
+
const handlers = t12;
|
|
280
|
+
const pressedLayer = interactive && (pressed || held);
|
|
281
|
+
const layerOpacity = !active ? 0 : pressedLayer ? stateLayerOpacity.pressed : ringShown ? stateLayerOpacity.focus : interactive && hovered ? stateLayerOpacity.hover : 0;
|
|
282
|
+
let t13;
|
|
281
283
|
if ($[35] !== corners) {
|
|
282
|
-
|
|
284
|
+
t13 = composeStyles(styles.surface, corners);
|
|
283
285
|
$[35] = corners;
|
|
284
|
-
$[36] =
|
|
285
|
-
} else
|
|
286
|
-
const surface =
|
|
287
|
-
const
|
|
288
|
-
let
|
|
289
|
-
if ($[37] !== layerOpacity || $[38] !==
|
|
290
|
-
|
|
291
|
-
backgroundColor:
|
|
286
|
+
$[36] = t13;
|
|
287
|
+
} else t13 = $[36];
|
|
288
|
+
const surface = t13;
|
|
289
|
+
const t14 = pressedLayer ? pressedColor : color;
|
|
290
|
+
let t15;
|
|
291
|
+
if ($[37] !== layerOpacity || $[38] !== t14) {
|
|
292
|
+
t15 = composeStyles(styles.layer, {
|
|
293
|
+
backgroundColor: t14,
|
|
292
294
|
opacity: layerOpacity
|
|
293
295
|
});
|
|
294
296
|
$[37] = layerOpacity;
|
|
295
|
-
$[38] =
|
|
296
|
-
$[39] =
|
|
297
|
-
} else
|
|
298
|
-
const state =
|
|
299
|
-
const
|
|
300
|
-
let
|
|
297
|
+
$[38] = t14;
|
|
298
|
+
$[39] = t15;
|
|
299
|
+
} else t15 = $[39];
|
|
300
|
+
const state = t15;
|
|
301
|
+
const t16 = interactive && hovered;
|
|
302
|
+
let t17;
|
|
301
303
|
if ($[40] !== state) {
|
|
302
|
-
|
|
304
|
+
t17 = /* @__PURE__ */ jsx(View, { style: state });
|
|
303
305
|
$[40] = state;
|
|
304
|
-
$[41] =
|
|
305
|
-
} else
|
|
306
|
-
let
|
|
306
|
+
$[41] = t17;
|
|
307
|
+
} else t17 = $[41];
|
|
308
|
+
let t18;
|
|
307
309
|
if ($[42] !== rippleMotion || $[43] !== rippled) {
|
|
308
|
-
|
|
310
|
+
t18 = rippled ? /* @__PURE__ */ jsx(Animated.View, { style: rippleMotion }) : null;
|
|
309
311
|
$[42] = rippleMotion;
|
|
310
312
|
$[43] = rippled;
|
|
311
|
-
$[44] =
|
|
312
|
-
} else
|
|
313
|
-
let
|
|
314
|
-
if ($[45] !== surface || $[46] !==
|
|
315
|
-
|
|
313
|
+
$[44] = t18;
|
|
314
|
+
} else t18 = $[44];
|
|
315
|
+
let t19;
|
|
316
|
+
if ($[45] !== surface || $[46] !== t17 || $[47] !== t18) {
|
|
317
|
+
t19 = /* @__PURE__ */ jsxs(View, {
|
|
316
318
|
accessibilityElementsHidden: true,
|
|
317
319
|
importantForAccessibility: "no-hide-descendants",
|
|
318
320
|
style: surface,
|
|
319
|
-
children: [
|
|
321
|
+
children: [t17, t18]
|
|
320
322
|
});
|
|
321
323
|
$[45] = surface;
|
|
322
|
-
$[46] =
|
|
323
|
-
$[47] =
|
|
324
|
-
$[48] =
|
|
325
|
-
} else
|
|
326
|
-
const
|
|
327
|
-
let
|
|
324
|
+
$[46] = t17;
|
|
325
|
+
$[47] = t18;
|
|
326
|
+
$[48] = t19;
|
|
327
|
+
} else t19 = $[48];
|
|
328
|
+
const t20 = interactive && pressed;
|
|
329
|
+
let t21;
|
|
328
330
|
if ($[49] !== active || $[50] !== ringShown || $[51] !== theme) {
|
|
329
|
-
|
|
331
|
+
t21 = active && ringShown ? stylesOf(theme).ring : void 0;
|
|
330
332
|
$[49] = active;
|
|
331
333
|
$[50] = ringShown;
|
|
332
334
|
$[51] = theme;
|
|
333
|
-
$[52] =
|
|
334
|
-
} else
|
|
335
|
-
let
|
|
336
|
-
if ($[53] !== handlers || $[54] !==
|
|
337
|
-
|
|
335
|
+
$[52] = t21;
|
|
336
|
+
} else t21 = $[52];
|
|
337
|
+
let t22;
|
|
338
|
+
if ($[53] !== handlers || $[54] !== t16 || $[55] !== t19 || $[56] !== t20 || $[57] !== t21) {
|
|
339
|
+
t22 = {
|
|
338
340
|
handlers,
|
|
339
|
-
hovered:
|
|
340
|
-
layer:
|
|
341
|
-
pressed:
|
|
342
|
-
ring:
|
|
341
|
+
hovered: t16,
|
|
342
|
+
layer: t19,
|
|
343
|
+
pressed: t20,
|
|
344
|
+
ring: t21
|
|
343
345
|
};
|
|
344
346
|
$[53] = handlers;
|
|
345
|
-
$[54] =
|
|
346
|
-
$[55] =
|
|
347
|
-
$[56] =
|
|
348
|
-
$[57] =
|
|
349
|
-
$[58] =
|
|
350
|
-
} else
|
|
351
|
-
return
|
|
347
|
+
$[54] = t16;
|
|
348
|
+
$[55] = t19;
|
|
349
|
+
$[56] = t20;
|
|
350
|
+
$[57] = t21;
|
|
351
|
+
$[58] = t22;
|
|
352
|
+
} else t22 = $[58];
|
|
353
|
+
return t22;
|
|
352
354
|
}
|
|
353
355
|
//#endregion
|
|
354
356
|
export { hitSlop, usePressFeedback };
|