@kanso-labs/react-native-kanso-ui 0.5.0 → 0.7.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 -1
- package/dist/badge/index.js +74 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/styles.js +51 -0
- package/dist/badge/styles.js.map +1 -0
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +1 -1
- package/dist/button/pending.js +1 -1
- package/dist/button/slots.d.ts +2 -2
- package/dist/calendar/index.js +1182 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/styles.js +120 -0
- package/dist/calendar/styles.js.map +1 -0
- package/dist/chip/index.js +2 -2
- package/dist/components/app-bar/index.d.ts +111 -0
- package/dist/components/app-bar/index.js +341 -0
- package/dist/components/app-bar/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/calendar/index.d.ts +51 -0
- package/dist/components/calendar/index.js +82 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +3 -3
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip-group/index.d.ts +1 -1
- package/dist/components/chip-group/index.js +4 -4
- package/dist/components/copy-field/index.d.ts +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/currency/index.d.ts +1 -1
- package/dist/components/currency/index.js +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/icon-button/index.d.ts +1 -1
- package/dist/components/icon-button/index.js +2 -2
- package/dist/components/link/index.d.ts +1 -1
- package/dist/components/link/index.js +3 -3
- package/dist/components/list/index.d.ts +1 -1
- package/dist/components/list/index.js +5 -5
- package/dist/components/list-detail/index.d.ts +56 -0
- package/dist/components/list-detail/index.js +169 -0
- package/dist/components/list-detail/index.js.map +1 -0
- package/dist/components/list-item/index.d.ts +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/index.js +7 -7
- package/dist/components/meter/index.d.ts +1 -1
- package/dist/components/meter/index.js +1 -1
- package/dist/components/navigation-bar/index.d.ts +164 -0
- package/dist/components/navigation-bar/index.js +470 -0
- package/dist/components/navigation-bar/index.js.map +1 -0
- package/dist/components/navigation-rail/index.d.ts +68 -0
- package/dist/components/navigation-rail/index.js +294 -0
- package/dist/components/navigation-rail/index.js.map +1 -0
- package/dist/components/number-field/index.d.ts +1 -1
- package/dist/components/number-field/index.js +5 -5
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +3 -3
- package/dist/components/product-icon/index.d.ts +1 -1
- package/dist/components/progress-indicator/index.d.ts +1 -1
- package/dist/components/progress-indicator/index.js +3 -3
- package/dist/components/radio-group/index.d.ts +1 -1
- package/dist/components/radio-group/index.js +3 -3
- package/dist/components/search-field/index.d.ts +1 -1
- package/dist/components/search-field/index.js +5 -5
- package/dist/components/segmented-button/index.d.ts +1 -1
- package/dist/components/segmented-button/index.js +5 -5
- package/dist/components/separator/index.d.ts +1 -1
- package/dist/components/separator/index.js +1 -1
- package/dist/components/sheet/index.d.ts +1 -1
- package/dist/components/sheet/index.js +3 -3
- package/dist/components/snackbar/index.d.ts +1 -1
- package/dist/components/snackbar/index.js +4 -4
- package/dist/components/stack/index.d.ts +1 -1
- package/dist/components/stack/index.js +1 -1
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +4 -4
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/text/index.js +1 -1
- package/dist/components/text-field/index.d.ts +1 -1
- package/dist/components/text-field/index.js +1 -1
- package/dist/control/checkbox-box.js +2 -2
- package/dist/control/index.js +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.js +4 -4
- package/dist/form/index.d.ts +1 -1
- package/dist/glyphs/index.js +21 -3
- package/dist/glyphs/index.js.map +1 -1
- package/dist/hooks/useAppBarScroll.d.ts +56 -0
- package/dist/hooks/useAppBarScroll.js +87 -0
- package/dist/hooks/useAppBarScroll.js.map +1 -0
- package/dist/i18n/messages.js +374 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +10 -4
- package/dist/indicator/index.d.ts +2 -2
- package/dist/indicator/index.js +3 -3
- package/dist/indicator/motion.js +1 -1
- package/dist/mark/index.d.ts +1 -1
- package/dist/mark/index.js +2 -2
- package/dist/modal/index.d.ts +1 -1
- package/dist/modal/index.js +2 -2
- package/dist/navigation/index.d.ts +36 -0
- package/dist/navigation/index.js +454 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/styles.js +83 -0
- package/dist/navigation/styles.js.map +1 -0
- package/dist/overlay/anchored.d.ts +2 -2
- package/dist/overlay/anchored.js +1 -1
- package/dist/overlay/host.d.ts +2 -2
- package/dist/overlay/host.js +1 -1
- package/dist/overlay/panel.js +2 -2
- package/dist/press/index.js +75 -69
- package/dist/press/index.js.map +1 -1
- package/dist/router/index.js +1 -1
- package/dist/row/index.js +1 -1
- package/dist/theme/scope.js +1 -1
- package/dist/theme-scope.d.ts +1 -1
- package/dist/theme-scope.js +1 -1
- package/dist/typography/fonts.js +1 -1
- package/package.json +4 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CloseGlyph } from "../../glyphs/index.js";
|
|
2
1
|
import { useTheme } from "../../theme/scope.js";
|
|
3
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { usePressFeedback } from "../../press/index.js";
|
|
4
4
|
import { useTypeRole } from "../../typography/roles.js";
|
|
5
|
+
import { CloseGlyph } from "../../glyphs/index.js";
|
|
5
6
|
import { AnimatedPressable, toggleState } from "../../button/index.js";
|
|
6
|
-
import { usePressFeedback } from "../../press/index.js";
|
|
7
7
|
import { stylesOf } from "../../chip/styles.js";
|
|
8
8
|
import { ChipGlyph, ChipLabel, measureThen, paintOf, targetOf, useEasedColors } from "../../chip/index.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { useId, useState } from "react";
|
|
11
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
10
|
import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
13
11
|
import Animated from "react-native-reanimated";
|
|
12
|
+
import { useId, useState } from "react";
|
|
13
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useListState } from "react-stately/useListState";
|
|
15
15
|
//#region src/components/chip-group/index.tsx
|
|
16
16
|
const REMOVE_REACH = {
|
|
@@ -5,9 +5,9 @@ import { useTypeRole } from "../../typography/roles.js";
|
|
|
5
5
|
import { Button } from "../button/index.js";
|
|
6
6
|
import { useClipboardAvailable, writeClipboard } from "../../clipboard/index.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { AccessibilityInfo, Platform, StyleSheet, Text, View } from "react-native";
|
|
8
9
|
import { useEffect, useRef, useState } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { AccessibilityInfo, Platform, StyleSheet, Text, View } from "react-native";
|
|
11
11
|
//#region src/components/copy-field/index.tsx
|
|
12
12
|
const COPIED_RESET_MS = 2e3;
|
|
13
13
|
const RESERVE = {
|
|
@@ -3,8 +3,8 @@ import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
|
3
3
|
import { useFontFamily } from "../../typography/fonts.js";
|
|
4
4
|
import { familyStyle, nativeWeight } from "../../typography/roles.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { StyleSheet, Text } from "react-native";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/currency/index.tsx
|
|
9
9
|
const stylesOf = themedStyles(({ colors, typography }) => StyleSheet.create({
|
|
10
10
|
base: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModalOpenProps } from "../../modal/index.js";
|
|
2
|
-
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
2
|
import { HostInstance, ScrollView, ScrollViewProps, StyleProp, TextProps, View, ViewProps, ViewStyle } from "react-native";
|
|
3
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
4
4
|
//#region src/components/dialog/index.d.ts
|
|
5
5
|
type DialogBodyProps = ScrollViewProps & {
|
|
6
6
|
readonly ref?: Ref<ComponentRef<typeof ScrollView>>;
|
|
@@ -6,11 +6,11 @@ import { ButtonSlotContext } from "../../button/slots.js";
|
|
|
6
6
|
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
7
7
|
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf, registerOf, useModalState, useModalTrigger } from "../../modal/index.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
|
-
import { createContext, use, useEffect, useId, useLayoutEffect, useState } from "react";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
9
|
import { ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
|
|
12
10
|
import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
|
|
13
11
|
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
12
|
+
import { createContext, use, useEffect, useId, useLayoutEffect, useState } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/dialog/index.tsx
|
|
15
15
|
const MIN_WIDTH = 280;
|
|
16
16
|
const MAX_WIDTH = 560;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonLinkForm, ButtonPressForm, ButtonToggleForm } from "../../button/index.js";
|
|
2
|
-
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
2
|
import { PressableProps, StyleProp, View, ViewStyle } from "react-native";
|
|
3
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
4
4
|
//#region src/components/icon-button/index.d.ts
|
|
5
5
|
type IconButtonProps = (ButtonLinkForm | ButtonPressForm | ButtonToggleForm) & Omit<PressableProps, 'aria-label' | 'children' | 'disabled' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IconStyleContext } from "../../glyphs/icon-style.js";
|
|
2
2
|
import { useTheme } from "../../theme/scope.js";
|
|
3
3
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
4
|
+
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
4
5
|
import { AnimatedPressable, HEIGHTS, OUTLINE_WIDTHS, PRESSED_CORNERS, buttonStyles, toggleState, useButtonAction, useCorner, useSlotTrigger } from "../../button/index.js";
|
|
5
6
|
import { palettesOf } from "../../button/palettes.js";
|
|
6
7
|
import { BUSY, PendingContent, PendingRing, usePending } from "../../button/pending.js";
|
|
7
|
-
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { StyleSheet } from "react-native";
|
|
11
10
|
import Animated from "react-native-reanimated";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/icon-button/index.tsx
|
|
13
13
|
const DISABLED = {
|
|
14
14
|
filled: "filledDisabled",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useTheme } from "../../theme/scope.js";
|
|
2
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
-
import { useLinkPress } from "../../router/index.js";
|
|
4
|
-
import { withOpacity } from "../../theme/color.js";
|
|
5
3
|
import { stylesOf as stylesOf$1 } from "../../press/styles.js";
|
|
4
|
+
import { withOpacity } from "../../theme/color.js";
|
|
5
|
+
import { useLinkPress } from "../../router/index.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { Platform, StyleSheet, Text } from "react-native";
|
|
7
8
|
import { useState } from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { Platform, StyleSheet, Text } from "react-native";
|
|
10
10
|
//#region src/components/link/index.tsx
|
|
11
11
|
const underlines = StyleSheet.create({
|
|
12
12
|
always: { textDecorationLine: "underline" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode, Ref } from "react";
|
|
2
1
|
import { FlatList, HostInstance, PressableProps, ScrollViewProps, StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { ReactElement, ReactNode, Ref } from "react";
|
|
3
3
|
import { Key, Selection, SelectionMode } from "react-stately";
|
|
4
4
|
//#region src/components/list/index.d.ts
|
|
5
5
|
type ListLoadMoreProps = {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { AutocompleteContext } from "../../autocomplete/index.js";
|
|
2
1
|
import { useTheme } from "../../theme/scope.js";
|
|
3
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
4
4
|
import { useTypeRole } from "../../typography/roles.js";
|
|
5
|
+
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
6
|
+
import { RowContent, hasContent, rowStyleOf } from "../../row/index.js";
|
|
7
|
+
import { AutocompleteContext } from "../../autocomplete/index.js";
|
|
5
8
|
import { toggleState } from "../../button/index.js";
|
|
6
9
|
import { ProgressIndicator } from "../progress-indicator/index.js";
|
|
7
10
|
import { messagesFor, resultsFor } from "../../i18n/index.js";
|
|
8
|
-
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
9
11
|
import { CheckboxBox } from "../../control/checkbox-box.js";
|
|
10
|
-
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
11
|
-
import { RowContent, hasContent, rowStyleOf } from "../../row/index.js";
|
|
12
12
|
import { c } from "react/compiler-runtime";
|
|
13
|
+
import { AccessibilityInfo, FlatList, Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
13
14
|
import { Children, createContext, use, useEffect, useRef } from "react";
|
|
14
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { AccessibilityInfo, FlatList, Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
16
16
|
import { useListState } from "react-stately/useListState";
|
|
17
17
|
//#region src/components/list/index.tsx
|
|
18
18
|
const BOX_SLOT = 24;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { View, ViewProps } from "react-native";
|
|
2
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
|
+
//#region src/components/list-detail/index.d.ts
|
|
4
|
+
type ListDetailProps = Omit<ViewProps, 'children'> & {
|
|
5
|
+
/**
|
|
6
|
+
* The selected item's content. It stands on its own, and takes the
|
|
7
|
+
* flexible pane.
|
|
8
|
+
*/
|
|
9
|
+
readonly detail?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* The items to choose between. It takes the fixed pane, 360dp wide, and
|
|
12
|
+
* 412dp from the extra-large window size up.
|
|
13
|
+
*/
|
|
14
|
+
readonly list?: ReactNode;
|
|
15
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
16
|
+
/**
|
|
17
|
+
* Which pane shows while only one fits, below the expanded window size.
|
|
18
|
+
* Both show from expanded up, where this is not read.
|
|
19
|
+
*
|
|
20
|
+
* Controlled, with no fallback of its own: the layout cannot know that an
|
|
21
|
+
* item was chosen or that the reader went back, which is the router's to
|
|
22
|
+
* say. **Moving a screen reader into the pane this reveals comes with
|
|
23
|
+
* setting it**, since the pane being left is hidden from it and only the
|
|
24
|
+
* call site knows what inside the new one to send it to.
|
|
25
|
+
* @default 'list'
|
|
26
|
+
*/
|
|
27
|
+
readonly showing?: 'detail' | 'list';
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Material Design's list-detail layout: a fixed list pane beside a flexible
|
|
31
|
+
* detail pane from the expanded window size up, and the one pane `showing`
|
|
32
|
+
* names below it.
|
|
33
|
+
*
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <ListDetail
|
|
36
|
+
* detail={<Detail id={id} />}
|
|
37
|
+
* list={<List aria-label="Label" onAction={open}>{rows}</List>}
|
|
38
|
+
* showing={id === undefined ? 'list' : 'detail'}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* Layout only: neither pane paints a surface of its own, so what goes in
|
|
43
|
+
* them is the call site's. It grows to fill the screen it is in, and each
|
|
44
|
+
* pane pads itself by the safe area where it meets the screen's edge.
|
|
45
|
+
*
|
|
46
|
+
* On a phone the panes are two steps of the app's navigation. Choosing an
|
|
47
|
+
* item puts its id in the route, which sets `showing` to `detail`, and the
|
|
48
|
+
* back gesture or swipe takes it out again, so the router owns the step back
|
|
49
|
+
* and the layout has no back button or history of its own. Both panes stay
|
|
50
|
+
* mounted, so a rotation or a foldable unfolding keeps what either holds.
|
|
51
|
+
* The stories show the wiring with Expo Router and React Navigation.
|
|
52
|
+
*/
|
|
53
|
+
declare function ListDetail({ detail, list, showing, style, ...props }: ListDetailProps): import("react").JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { ListDetail, type ListDetailProps };
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useTheme } from "../../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { StyleSheet, View } from "react-native";
|
|
6
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/list-detail/index.tsx
|
|
9
|
+
const LIST_PANE = 360;
|
|
10
|
+
const LIST_PANE_EXTRA_LARGE = 412;
|
|
11
|
+
const BOTH = /* @__PURE__ */ new Set([
|
|
12
|
+
"expanded",
|
|
13
|
+
"extraLarge",
|
|
14
|
+
"large"
|
|
15
|
+
]);
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
flexible: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
minWidth: 0
|
|
20
|
+
},
|
|
21
|
+
hidden: { display: "none" },
|
|
22
|
+
list: { width: LIST_PANE },
|
|
23
|
+
listExtraLarge: { width: LIST_PANE_EXTRA_LARGE },
|
|
24
|
+
safeArea: { flexGrow: 1 }
|
|
25
|
+
});
|
|
26
|
+
const stylesOf = themedStyles(({ spacing }) => StyleSheet.create({ root: {
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
flexGrow: 1,
|
|
29
|
+
gap: spacing.xl
|
|
30
|
+
} }));
|
|
31
|
+
/**
|
|
32
|
+
* Material Design's list-detail layout: a fixed list pane beside a flexible
|
|
33
|
+
* detail pane from the expanded window size up, and the one pane `showing`
|
|
34
|
+
* names below it.
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <ListDetail
|
|
38
|
+
* detail={<Detail id={id} />}
|
|
39
|
+
* list={<List aria-label="Label" onAction={open}>{rows}</List>}
|
|
40
|
+
* showing={id === undefined ? 'list' : 'detail'}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Layout only: neither pane paints a surface of its own, so what goes in
|
|
45
|
+
* them is the call site's. It grows to fill the screen it is in, and each
|
|
46
|
+
* pane pads itself by the safe area where it meets the screen's edge.
|
|
47
|
+
*
|
|
48
|
+
* On a phone the panes are two steps of the app's navigation. Choosing an
|
|
49
|
+
* item puts its id in the route, which sets `showing` to `detail`, and the
|
|
50
|
+
* back gesture or swipe takes it out again, so the router owns the step back
|
|
51
|
+
* and the layout has no back button or history of its own. Both panes stay
|
|
52
|
+
* mounted, so a rotation or a foldable unfolding keeps what either holds.
|
|
53
|
+
* The stories show the wiring with Expo Router and React Navigation.
|
|
54
|
+
*/
|
|
55
|
+
function ListDetail(t0) {
|
|
56
|
+
const $ = c(21);
|
|
57
|
+
let detail;
|
|
58
|
+
let list;
|
|
59
|
+
let props;
|
|
60
|
+
let style;
|
|
61
|
+
let t1;
|
|
62
|
+
if ($[0] !== t0) {
|
|
63
|
+
({detail, list, showing: t1, style, ...props} = t0);
|
|
64
|
+
$[0] = t0;
|
|
65
|
+
$[1] = detail;
|
|
66
|
+
$[2] = list;
|
|
67
|
+
$[3] = props;
|
|
68
|
+
$[4] = style;
|
|
69
|
+
$[5] = t1;
|
|
70
|
+
} else {
|
|
71
|
+
detail = $[1];
|
|
72
|
+
list = $[2];
|
|
73
|
+
props = $[3];
|
|
74
|
+
style = $[4];
|
|
75
|
+
t1 = $[5];
|
|
76
|
+
}
|
|
77
|
+
const showing = t1 === void 0 ? "list" : t1;
|
|
78
|
+
const own = stylesOf(useTheme());
|
|
79
|
+
const sizeClass = useWindowSizeClass();
|
|
80
|
+
let t2;
|
|
81
|
+
if ($[6] !== sizeClass) {
|
|
82
|
+
t2 = BOTH.has(sizeClass);
|
|
83
|
+
$[6] = sizeClass;
|
|
84
|
+
$[7] = t2;
|
|
85
|
+
} else t2 = $[7];
|
|
86
|
+
const both = t2;
|
|
87
|
+
const fixed = sizeClass === "extraLarge" ? styles.listExtraLarge : styles.list;
|
|
88
|
+
const T0 = View;
|
|
89
|
+
const t3 = composeStyles(own.root, style);
|
|
90
|
+
const t4 = !both && showing === "detail";
|
|
91
|
+
const t5 = both ? fixed : styles.flexible;
|
|
92
|
+
let t6;
|
|
93
|
+
if ($[8] !== list || $[9] !== t4 || $[10] !== t5) {
|
|
94
|
+
t6 = /* @__PURE__ */ jsx(Pane, {
|
|
95
|
+
hidden: t4,
|
|
96
|
+
style: t5,
|
|
97
|
+
children: list
|
|
98
|
+
});
|
|
99
|
+
$[8] = list;
|
|
100
|
+
$[9] = t4;
|
|
101
|
+
$[10] = t5;
|
|
102
|
+
$[11] = t6;
|
|
103
|
+
} else t6 = $[11];
|
|
104
|
+
const t7 = !both && showing === "list";
|
|
105
|
+
let t8;
|
|
106
|
+
if ($[12] !== detail || $[13] !== t7) {
|
|
107
|
+
t8 = /* @__PURE__ */ jsx(Pane, {
|
|
108
|
+
hidden: t7,
|
|
109
|
+
style: styles.flexible,
|
|
110
|
+
children: detail
|
|
111
|
+
});
|
|
112
|
+
$[12] = detail;
|
|
113
|
+
$[13] = t7;
|
|
114
|
+
$[14] = t8;
|
|
115
|
+
} else t8 = $[14];
|
|
116
|
+
let t9;
|
|
117
|
+
if ($[15] !== T0 || $[16] !== props || $[17] !== t3 || $[18] !== t6 || $[19] !== t8) {
|
|
118
|
+
t9 = /* @__PURE__ */ jsxs(T0, {
|
|
119
|
+
...props,
|
|
120
|
+
style: t3,
|
|
121
|
+
children: [t6, t8]
|
|
122
|
+
});
|
|
123
|
+
$[15] = T0;
|
|
124
|
+
$[16] = props;
|
|
125
|
+
$[17] = t3;
|
|
126
|
+
$[18] = t6;
|
|
127
|
+
$[19] = t8;
|
|
128
|
+
$[20] = t9;
|
|
129
|
+
} else t9 = $[20];
|
|
130
|
+
return t9;
|
|
131
|
+
}
|
|
132
|
+
function Pane(t0) {
|
|
133
|
+
const $ = c(9);
|
|
134
|
+
const { children, hidden, style } = t0;
|
|
135
|
+
const t1 = hidden ? styles.hidden : null;
|
|
136
|
+
let t2;
|
|
137
|
+
if ($[0] !== style || $[1] !== t1) {
|
|
138
|
+
t2 = composeStyles(style, t1);
|
|
139
|
+
$[0] = style;
|
|
140
|
+
$[1] = t1;
|
|
141
|
+
$[2] = t2;
|
|
142
|
+
} else t2 = $[2];
|
|
143
|
+
let t3;
|
|
144
|
+
if ($[3] !== children) {
|
|
145
|
+
t3 = /* @__PURE__ */ jsx(SafeAreaView, {
|
|
146
|
+
style: styles.safeArea,
|
|
147
|
+
children
|
|
148
|
+
});
|
|
149
|
+
$[3] = children;
|
|
150
|
+
$[4] = t3;
|
|
151
|
+
} else t3 = $[4];
|
|
152
|
+
let t4;
|
|
153
|
+
if ($[5] !== hidden || $[6] !== t2 || $[7] !== t3) {
|
|
154
|
+
t4 = /* @__PURE__ */ jsx(View, {
|
|
155
|
+
"aria-hidden": hidden,
|
|
156
|
+
style: t2,
|
|
157
|
+
children: t3
|
|
158
|
+
});
|
|
159
|
+
$[5] = hidden;
|
|
160
|
+
$[6] = t2;
|
|
161
|
+
$[7] = t3;
|
|
162
|
+
$[8] = t4;
|
|
163
|
+
} else t4 = $[8];
|
|
164
|
+
return t4;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { ListDetail };
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","ViewProps","ViewStyle","StyleSheet","View","SafeAreaView","WindowSizeClass","useWindowSizeClass","useTheme","composeStyles","themedStyles","LIST_PANE","LIST_PANE_EXTRA_LARGE","BOTH","ReadonlySet","Set","styles","create","flexible","flex","minWidth","hidden","display","list","width","listExtraLarge","safeArea","flexGrow","stylesOf","spacing","root","flexDirection","gap","xl","ListDetailProps","Omit","detail","ref","showing","PaneProps","children","style","ListDetail","t0","$","_c","props","t1","undefined","own","sizeClass","t2","has","both","fixed","T0","t3","t4","t5","t6","t7","t8","t9","Pane","_c"],"sources":["../../../src/components/list-detail/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type { ViewProps, ViewStyle } from 'react-native'\n\nimport { StyleSheet, View } from 'react-native'\nimport { SafeAreaView } from 'react-native-safe-area-context'\n\nimport type { WindowSizeClass } from '../../hooks/useWindowSizeClass'\n\nimport { useWindowSizeClass } from '../../hooks/useWindowSizeClass'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// kanso-ui's ListDetail, Material Design's list-detail canonical layout. The\n// list is the fixed pane, which Material Design points at lists with light\n// information density, and the detail the flexible one that takes whatever\n// is left, so the layout carries the one flexible pane the page asks every\n// layout for. Web's shape differs in two ways, on purpose.\n//\n// **The window decides.** Native has no container queries, so the form\n// follows `useWindowSizeClass()`: both panes from the expanded window size,\n// 840dp, which a tablet held either way and an unfolded foldable reach, and\n// below it the one pane `showing` names. Both panes stay mounted in both\n// forms, in the same places in the tree, so a rotation or an unfolding moves\n// between the two without losing anything inside either, the selected item\n// and a scroll position among them.\n//\n// **The layout is a screen's.** On a phone the two panes are two steps of\n// the app's navigation, so the router owns the step back, and Android's back\n// gesture and iOS's swipe go through it rather than through anything here.\n// The layout grows to fill the screen it is given, and each pane is a\n// `SafeAreaView`, which pads by the system bars, the notch and the rounded\n// corners only where that pane meets them. That is measured where the pane\n// is rather than read from the window: under an app bar a pane takes no top\n// inset, and beside its neighbour none at that edge.\n//\n// A row runs from the start edge, so under a right-to-left layout the list is\n// on the right and the detail on the left, with nothing here turning it over.\n\n// Material Design's widths for a fixed pane, the wider from the extra-large\n// window size up.\nconst LIST_PANE = 360\nconst LIST_PANE_EXTRA_LARGE = 412\n\n// The window sizes with room for both panes.\nconst BOTH: ReadonlySet<WindowSizeClass> = new Set([\n 'expanded',\n 'extraLarge',\n 'large',\n])\n\nconst styles = StyleSheet.create({\n // The flexible pane, which a long unbroken line inside cannot widen past\n // its share.\n flexible: {\n flex: 1,\n minWidth: 0,\n },\n // Out of the layout and, with `aria-hidden` beside it, out of what a\n // screen reader reaches, while staying mounted.\n hidden: {\n display: 'none',\n },\n list: {\n width: LIST_PANE,\n },\n listExtraLarge: {\n width: LIST_PANE_EXTRA_LARGE,\n },\n safeArea: {\n flexGrow: 1,\n },\n})\n\n// The 24dp Material Design puts between the panes. The layout grows rather\n// than taking `flex: 1`, so it fills a screen and is as tall as its panes\n// anywhere with no height to fill.\nconst stylesOf = themedStyles(({ spacing }) =>\n StyleSheet.create({\n root: {\n flexDirection: 'row',\n flexGrow: 1,\n gap: spacing.xl,\n },\n }),\n)\n\ntype ListDetailProps = Omit<ViewProps, 'children'> & {\n /**\n * The selected item's content. It stands on its own, and takes the\n * flexible pane.\n */\n readonly detail?: ReactNode\n /**\n * The items to choose between. It takes the fixed pane, 360dp wide, and\n * 412dp from the extra-large window size up.\n */\n readonly list?: ReactNode\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Which pane shows while only one fits, below the expanded window size.\n * Both show from expanded up, where this is not read.\n *\n * Controlled, with no fallback of its own: the layout cannot know that an\n * item was chosen or that the reader went back, which is the router's to\n * say. **Moving a screen reader into the pane this reveals comes with\n * setting it**, since the pane being left is hidden from it and only the\n * call site knows what inside the new one to send it to.\n * @default 'list'\n */\n readonly showing?: 'detail' | 'list'\n}\n\ntype PaneProps = {\n readonly children: ReactNode\n readonly hidden: boolean\n readonly style: ViewStyle\n}\n\n/**\n * Material Design's list-detail layout: a fixed list pane beside a flexible\n * detail pane from the expanded window size up, and the one pane `showing`\n * names below it.\n *\n * ```tsx\n * <ListDetail\n * detail={<Detail id={id} />}\n * list={<List aria-label=\"Label\" onAction={open}>{rows}</List>}\n * showing={id === undefined ? 'list' : 'detail'}\n * />\n * ```\n *\n * Layout only: neither pane paints a surface of its own, so what goes in\n * them is the call site's. It grows to fill the screen it is in, and each\n * pane pads itself by the safe area where it meets the screen's edge.\n *\n * On a phone the panes are two steps of the app's navigation. Choosing an\n * item puts its id in the route, which sets `showing` to `detail`, and the\n * back gesture or swipe takes it out again, so the router owns the step back\n * and the layout has no back button or history of its own. Both panes stay\n * mounted, so a rotation or a foldable unfolding keeps what either holds.\n * The stories show the wiring with Expo Router and React Navigation.\n */\nfunction ListDetail({\n detail,\n list,\n showing = 'list',\n style,\n ...props\n}: ListDetailProps) {\n const own = stylesOf(useTheme())\n const sizeClass = useWindowSizeClass()\n const both = BOTH.has(sizeClass)\n const fixed = sizeClass === 'extraLarge' ? styles.listExtraLarge : styles.list\n\n return (\n <View {...props} style={composeStyles<ViewStyle>(own.root, style)}>\n <Pane\n hidden={!both && showing === 'detail'}\n style={both ? fixed : styles.flexible}\n >\n {list}\n </Pane>\n <Pane hidden={!both && showing === 'list'} style={styles.flexible}>\n {detail}\n </Pane>\n </View>\n )\n}\n\n// A pane is hidden on the outside and padded on the inside. React Native's\n// own `View` is what turns `aria-hidden` into iOS's hidden elements and\n// Android's hidden descendants, and the safe area's view is a native one of\n// its own that goes round it.\nfunction Pane({ children, hidden, style }: PaneProps) {\n return (\n <View\n aria-hidden={hidden}\n style={composeStyles<ViewStyle>(style, hidden ? styles.hidden : null)}\n >\n <SafeAreaView style={styles.safeArea}>{children}</SafeAreaView>\n </View>\n )\n}\n\nexport { ListDetail }\nexport type { ListDetailProps }\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentRef, ReactNode, Ref } from "react";
|
|
2
1
|
import { PressableProps, StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
3
|
//#region src/components/list-item/index.d.ts
|
|
4
4
|
type InteractiveListItemForm = Omit<PressableProps, 'children' | 'disabled' | 'style'> & {
|
|
5
5
|
/**
|
|
@@ -4,8 +4,8 @@ import { usePressFeedback } from "../../press/index.js";
|
|
|
4
4
|
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
5
5
|
import { RowContent, rowStyleOf } from "../../row/index.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { Pressable, View } from "react-native";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/list-item/index.tsx
|
|
10
10
|
function InteractiveListItem(t0) {
|
|
11
11
|
const $ = c(47);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OverlayAlign, OverlaySide } from "../../overlay/placement.js";
|
|
2
2
|
import "../../overlay/index.js";
|
|
3
|
-
import { ReactElement, ReactNode, Ref } from "react";
|
|
4
3
|
import { HostInstance, PressableProps, StyleProp, ViewProps, ViewStyle } from "react-native";
|
|
4
|
+
import { ReactElement, ReactNode, Ref } from "react";
|
|
5
5
|
import { Key, Selection, SelectionMode } from "react-stately";
|
|
6
6
|
//#region src/components/menu/index.d.ts
|
|
7
7
|
type ItemNodeProps = MenuItemProps & {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { CheckGlyph, ChevronEndGlyph } from "../../glyphs/index.js";
|
|
2
1
|
import { useTheme } from "../../theme/scope.js";
|
|
3
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { usePressFeedback } from "../../press/index.js";
|
|
4
4
|
import { useTypeRole } from "../../typography/roles.js";
|
|
5
|
+
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
6
|
+
import { RowContent, rowStyleOf } from "../../row/index.js";
|
|
7
|
+
import { CheckGlyph, ChevronEndGlyph } from "../../glyphs/index.js";
|
|
5
8
|
import { refsOf } from "../../ref/index.js";
|
|
6
9
|
import { useOpenLink } from "../../router/index.js";
|
|
7
10
|
import { ButtonSlotContext } from "../../button/slots.js";
|
|
8
11
|
import { ProgressIndicator } from "../progress-indicator/index.js";
|
|
9
12
|
import { messagesFor } from "../../i18n/index.js";
|
|
10
|
-
import {
|
|
13
|
+
import { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|
|
11
14
|
import { Overlay } from "../../overlay/host.js";
|
|
12
15
|
import { useAnchoredPlacement } from "../../overlay/anchored.js";
|
|
13
|
-
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
14
|
-
import { RowContent, rowStyleOf } from "../../row/index.js";
|
|
15
|
-
import { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|
|
16
16
|
import { Separator } from "../separator/index.js";
|
|
17
17
|
import { c } from "react/compiler-runtime";
|
|
18
|
-
import { Children, createContext, use, useEffect, useId, useRef, useState } from "react";
|
|
19
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
18
|
import { I18nManager, Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
21
19
|
import Animated from "react-native-reanimated";
|
|
20
|
+
import { Children, createContext, use, useEffect, useId, useRef, useState } from "react";
|
|
21
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { useMenuTriggerState, useSubmenuTriggerState } from "react-stately/useMenuTriggerState";
|
|
23
23
|
import { useTreeState } from "react-stately/useTreeState";
|
|
24
24
|
//#region src/components/menu/index.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IndicatorTone } from "../../indicator/index.js";
|
|
2
|
-
import { ComponentRef, Ref } from "react";
|
|
3
2
|
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
|
+
import { ComponentRef, Ref } from "react";
|
|
4
4
|
//#region src/components/meter/index.d.ts
|
|
5
5
|
type MeterProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -3,8 +3,8 @@ import { composeStyles } from "../../theme/styles.js";
|
|
|
3
3
|
import { DETERMINATE_EASING, stylesOf } from "../../indicator/styles.js";
|
|
4
4
|
import { IndicatorLabels, IndicatorLine, readingOf, useEased, useIndicatorColors, useMeasuredWidth } from "../../indicator/index.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { StyleSheet, View } from "react-native";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/meter/index.tsx
|
|
9
9
|
const styles = StyleSheet.create({ line: { alignSelf: "stretch" } });
|
|
10
10
|
/**
|