@kanso-labs/react-native-kanso-ui 0.5.0 → 0.6.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/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/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 +6 -6
- 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 +170 -0
- package/dist/components/navigation-bar/index.js +494 -0
- package/dist/components/navigation-bar/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 +2 -2
- 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 +2 -2
- 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/index.d.ts +7 -3
- package/dist/index.js +7 -3
- 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 +29 -0
- package/dist/navigation/index.js +405 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/styles.js +61 -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 +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","ColorValue","ViewProps","ViewStyle","AnimatedStyle","Edge","StyleSheet","View","Animated","Easing","useAnimatedStyle","useReducedMotion","withTiming","SafeAreaView","IconStyle","TypeRole","IconStyleContext","COLLAPSED_BLOCK_SIZE","TARGET_SIZE","hasContent","useTheme","composeStyles","themedStyles","Text","ICON_SIZE","GLYPH_INSET","HEIGHTS","lg","plain","withSubtitle","md","sm","const","HEADLINE_ROLES","Readonly","Record","AppBarSize","EDGES","styles","create","center","textAlign","pinned","zIndex","row","alignItems","flexDirection","width","safeArea","stylesOf","sizing","spacing","gap","xs","slot","flexShrink","controlSm","paddingHorizontal","text","flexGrow","justifyContent","minWidth","paddingVertical","AppBarProps","Omit","align","collapsed","contentInset","contentMaxInlineSize","headline","leading","ref","scrolled","size","subtitle","trailing","SlotProps","children","color","AppBar","t0","$","_c","props","style","t1","t2","t3","t4","t5","undefined","theme","own","inset","collapse","hasLeading","hasTrailing","t6","showsSubtitle","heights","fill","useFill","t7","t8","t9","T0","T1","t12","maxWidth","minHeight","paddingEnd","edgePadding","paddingStart","t13","colors","onSurface","t14","t15","t16","t17","onSurfaceVariant","t18","t19","t10","t11","t20","hasSlot","Math","max","iconStyleOf","Slot","motion","reduceMotion","surfaceContainer","surface","timing","duration","durationMedium1","easing","bezier","easingEmphasized","backgroundColor","_c","Text"],"sources":["../../../src/components/app-bar/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref } from 'react'\nimport type { ColorValue, ViewProps, ViewStyle } from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { Edge } from 'react-native-safe-area-context'\n\nimport { StyleSheet, View } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n withTiming,\n} from 'react-native-reanimated'\nimport { SafeAreaView } from 'react-native-safe-area-context'\n\nimport type { IconStyle } from '../../glyphs/icon-style'\nimport type { TypeRole } from '../../typography/roles'\n\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { COLLAPSED_BLOCK_SIZE } from '../../hooks/useAppBarScroll'\nimport { TARGET_SIZE } from '../../press'\nimport { hasContent } from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { Text } from '../text'\n\n// kanso-ui's AppBar, Material Design's top app bar in the three sizes the spec\n// recommends. `md` and `lg` are its medium and large *flexible* bars, the\n// newer of the two sets the spec gives and the one it recommends. The old\n// center-aligned variant is a configuration of every size, which is why\n// alignment is a prop.\n//\n// Heights are minimums rather than fixed. The flexible bars hug their text,\n// so a headline that wraps, or a larger text size the device asks for, makes\n// the bar taller rather than being cut off.\n//\n// The bar paints its surface from the screen's top edge, under the status\n// bar, and keeps its contents inside the safe area: a `SafeAreaView` pads it\n// by the status bar, the notch and a rounded corner wherever the bar meets\n// them, and by nothing where it does not, so a bar drawn below another view\n// takes no inset of its own.\n//\n// Three things differ from web's, each because of the platform.\n//\n// - **No heading level.** Native screen readers have no levels to move\n// between, so the headline is a header and `headingLevel` is gone.\n// - **`pinned` means outside the scroll view.** Native has no sticky\n// position, so a pinned bar is one the screen draws above its scroll view\n// rather than inside it, and the content scrolls beneath its lower edge.\n// - **The fill eases and the height does not.** Collapsing moves the height\n// and the headline's type role at once. React Native has no transition for\n// a type role, and easing the height alone would leave the text jumping\n// inside a moving bar. The fill a scrolled bar takes eases over medium 1\n// on the emphasized curve, as web's does, and arrives at once under\n// reduced motion.\n\n// The geometry Material Design lays a bar's icon buttons out on: a 48dp\n// target per button, edge to edge, with a 24dp icon centred in each, and the\n// outermost target 4dp in from the bar's edge, so a glyph lands at the\n// page's margin. IconButton draws a 40dp box with its 48dp target spilling\n// out through `hitSlop`, so a slot pads half the difference either side and\n// puts the whole of it between two buttons, which lays the targets edge to\n// edge as the spec does.\nconst ICON_SIZE = 24\n\n// How far an icon sits inside its target, which is how much less than the\n// content inset the row is padded on an edge that holds a slot. That puts a\n// leading glyph, rather than the edge of its target, at the inset.\nconst GLYPH_INSET = (TARGET_SIZE - ICON_SIZE) / 2\n\nconst HEIGHTS = {\n lg: { plain: 120, withSubtitle: 152 },\n md: { plain: 112, withSubtitle: 136 },\n sm: { plain: COLLAPSED_BLOCK_SIZE, withSubtitle: COLLAPSED_BLOCK_SIZE },\n} as const\n\n// One type role per size, as Material Design's own title tokens alias the\n// type scale rather than giving sizes of their own. A collapsed bar takes the\n// small one's.\nconst HEADLINE_ROLES: Readonly<Record<AppBarSize, TypeRole>> = {\n lg: 'headlineMedium',\n md: 'headlineSmall',\n sm: 'titleLarge',\n}\n\n// The bar's sides as well as its top, so a landscape notch is cleared too.\n// The bottom is the content's.\nconst EDGES: readonly Edge[] = ['left', 'right', 'top']\n\nconst styles = StyleSheet.create({\n center: {\n textAlign: 'center',\n },\n // Drawn over what follows it, so whatever strays past the scroll view's\n // top edge, an overscroll or a shadow, passes beneath the bar.\n pinned: {\n zIndex: 1,\n },\n row: {\n alignItems: 'center',\n flexDirection: 'row',\n width: '100%',\n },\n // The row, centred once it reaches `contentMaxInlineSize`.\n safeArea: {\n alignItems: 'center',\n },\n})\n\nconst stylesOf = themedStyles(({ sizing, spacing }) =>\n StyleSheet.create({\n row: {\n gap: spacing.xs,\n },\n // Slots hold their own size rather than being squeezed by a long\n // headline, and space their icon buttons by the spec's targets.\n slot: {\n alignItems: 'center',\n flexDirection: 'row',\n flexShrink: 0,\n gap: TARGET_SIZE - sizing.controlSm,\n paddingHorizontal: (TARGET_SIZE - sizing.controlSm) / 2,\n },\n // The text takes the room the slots leave, and wraps inside it.\n text: {\n flexGrow: 1,\n flexShrink: 1,\n justifyContent: 'center',\n minWidth: 0,\n paddingVertical: spacing.sm,\n },\n }),\n)\n\ntype AppBarProps = Omit<ViewProps, 'children'> & {\n /**\n * Which of Material Design's alignments the text takes. `center` is the\n * configuration that replaced the old center-aligned variant.\n * @default 'start'\n */\n readonly align?: 'center' | 'start'\n /**\n * Collapses a flexible bar to the height and headline of the small one,\n * for a `pinned` bar over content that has been scrolled. Without it a\n * pinned `lg` keeps 152dp of the screen for as long as the screen is open.\n *\n * Controlled, as `scrolled` is: only the app knows which view scrolls and\n * how far into it the bar should have collapsed. `useAppBarScroll` derives\n * both from that view's scroll, and is the way to set them unless the app\n * needs a rule of its own. Ignored on `sm`, which is already the height\n * this collapses to, and the subtitle goes with the height.\n * @default false\n */\n readonly collapsed?: boolean\n /**\n * Where the bar's content starts on each edge, in dp: the headline where\n * nothing comes before it, and the leading icon's glyph where something\n * does. The trailing edge is the same mirrored. `0` draws a bar flush.\n *\n * The default is Material Design's margin for a top app bar, the spacing\n * scale's `lg` step, which is also the margin it gives body content, so a\n * bar and the screen beneath line up without either being told about the\n * other.\n * @default spacing.lg\n */\n readonly contentInset?: number\n /**\n * How wide the bar's contents may run, in dp, before they stop growing,\n * with the row centred in what is left. The bar's surface still paints\n * edge to edge. Unset, the row is as wide as the bar.\n */\n readonly contentMaxInlineSize?: number\n /**\n * The screen's title, a header for a screen reader. Wraps rather than\n * truncating, and grows the bar with it.\n */\n readonly headline?: ReactNode\n /**\n * Usually a back or menu icon button. Sits before the text, and hands an\n * icon the on-surface colour and a 24dp size through `useIconStyle()`.\n */\n readonly leading?: ReactNode\n /**\n * Marks a bar drawn above the screen's scroll view rather than inside it,\n * so it stays put while the content scrolls beneath its lower edge, and is\n * drawn over that content. A pinned bar is the one `collapsed` and\n * `scrolled` are for.\n * @default false\n */\n readonly pinned?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n /**\n * Whether the content beneath has been scrolled. Material Design separates\n * a bar from scrolled content with a fill colour rather than a shadow, the\n * surface container role, and this is what applies it.\n *\n * Controlled, with no listener of its own: only the app knows which view\n * scrolls. `useAppBarScroll` derives it.\n * @default false\n */\n readonly scrolled?: boolean\n /**\n * `sm` is Material Design's small bar, 64dp; `md` and `lg` are its medium\n * and large flexible bars, 112dp and 120dp, or 136dp and 152dp with a\n * subtitle, which hug their text. The headline is title large, headline\n * small and headline medium in turn.\n * @default 'sm'\n */\n readonly size?: AppBarSize\n /** A second line under the headline. Makes `md` and `lg` taller. */\n readonly subtitle?: ReactNode\n /**\n * Actions, at the far end, usually icon buttons. An icon here takes the\n * on-surface-variant colour and a 24dp size through `useIconStyle()`.\n */\n readonly trailing?: ReactNode\n}\n\ntype AppBarSize = 'lg' | 'md' | 'sm'\n\ntype SlotProps = {\n readonly children: ReactNode\n readonly color: ColorValue\n}\n\n/**\n * Material Design's top app bar: the bar at the top of a screen carrying its\n * title, one or two actions, and the way back out.\n *\n * ```tsx\n * <AppBar\n * headline=\"Headline\"\n * leading={<IconButton aria-label=\"Back\"><ArrowBackGlyph /></IconButton>}\n * />\n * ```\n *\n * Three sizes. `sm` is a 64dp bar for a screen whose title is a label; `md`\n * and `lg` are the flexible bars, which give the headline a larger type role\n * and grow to fit a subtitle or a headline that wraps.\n *\n * It paints its own surface, from the screen's top edge, and keeps its\n * contents clear of the status bar and the notch. Separating itself from the\n * content beneath is its job, which is why `scrolled` and `collapsed` exist;\n * `useAppBarScroll` sets both from the screen's scroll view.\n */\nfunction AppBar({\n align = 'start',\n collapsed = false,\n contentInset,\n contentMaxInlineSize,\n headline,\n leading,\n pinned = false,\n scrolled = false,\n size = 'sm',\n style,\n subtitle,\n trailing,\n ...props\n}: AppBarProps) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const inset = contentInset ?? theme.spacing.lg\n // `sm` is already what the flexible bars collapse to, so collapsing it is\n // a no-op rather than an error, for a size chosen by the window.\n const collapse = collapsed && size !== 'sm'\n const hasLeading = hasContent(leading)\n const hasTrailing = hasContent(trailing)\n const showsSubtitle = hasContent(subtitle) && !collapse\n const heights = HEIGHTS[collapse ? 'sm' : size]\n const fill = useFill(scrolled)\n\n return (\n <Animated.View\n {...props}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n fill,\n pinned ? styles.pinned : null,\n style,\n )}\n >\n <SafeAreaView edges={EDGES} style={styles.safeArea}>\n <View\n style={composeStyles<ViewStyle>(styles.row, own.row, {\n maxWidth: contentMaxInlineSize,\n minHeight: showsSubtitle ? heights.withSubtitle : heights.plain,\n paddingEnd: edgePadding(inset, hasTrailing),\n paddingStart: edgePadding(inset, hasLeading),\n })}\n >\n {hasLeading ? (\n <Slot color={theme.colors.onSurface}>{leading}</Slot>\n ) : null}\n <View style={own.text}>\n {hasContent(headline) ? (\n <Text\n role=\"heading\"\n style={align === 'center' ? styles.center : undefined}\n variant={HEADLINE_ROLES[collapse ? 'sm' : size]}\n >\n {headline}\n </Text>\n ) : null}\n {showsSubtitle ? (\n <Text\n style={align === 'center' ? styles.center : undefined}\n tone=\"muted\"\n variant=\"bodyMedium\"\n >\n {subtitle}\n </Text>\n ) : null}\n </View>\n {hasTrailing ? (\n <Slot color={theme.colors.onSurfaceVariant}>{trailing}</Slot>\n ) : null}\n </View>\n </SafeAreaView>\n </Animated.View>\n )\n}\n\n// The row's padding on one edge, for the inset the call site gave. Where the\n// edge holds a slot the row stops short of the inset by GLYPH_INSET, clamped\n// at zero for an inset smaller than a glyph's own room.\nfunction edgePadding(inset: number, hasSlot: boolean): number {\n return hasSlot ? Math.max(0, inset - GLYPH_INSET) : inset\n}\n\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's jsx-no-new-object-as-prop is after; the React Compiler\n// memoises the result on its inputs.\nfunction iconStyleOf(color: ColorValue): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\n// A slot's icons draw at 24dp in the slot's colour. An icon button inside it\n// hands its own icon the button's colour instead.\nfunction Slot({ children, color }: SlotProps) {\n const own = stylesOf(useTheme())\n\n return (\n <IconStyleContext value={iconStyleOf(color)}>\n <View style={own.slot}>{children}</View>\n </IconStyleContext>\n )\n}\n\n// The bar's surface, which takes the surface container role once the\n// content beneath has scrolled. It eases over medium 1 on the emphasized\n// curve, and arrives at once under reduced motion.\nfunction useFill(scrolled: boolean) {\n const { colors, motion } = useTheme()\n const reduceMotion = useReducedMotion()\n const fill = scrolled ? colors.surfaceContainer : colors.surface\n const timing = {\n duration: motion.durationMedium1,\n easing: Easing.bezier(...motion.easingEmphasized),\n }\n\n return useAnimatedStyle(() => {\n 'worklet'\n return {\n backgroundColor: reduceMotion ? fill : withTiming(fill, timing),\n }\n })\n}\n\nexport { AppBar }\nexport type { AppBarProps }\n"],"mappings":";;;;;;;;;;;AA8DA,MAAM0B,YAAY;AAKlB,MAAMC,cAAAA;AAEN,MAAMC,UAAU;CACdC,IAAI;EAAEC,OAAO;EAAKC,cAAc;CAAI;CACpCC,IAAI;EAAEF,OAAO;EAAKC,cAAc;CAAI;CACpCE,IAAI;EAAEH,OAAAA;EAA6BC,cAAAA;CAAmC;AACxE;AAKA,MAAMI,iBAAyD;CAC7DN,IAAI;CACJG,IAAI;CACJC,IAAI;AACN;AAIA,MAAMM,QAAyB;CAAC;CAAQ;CAAS;AAAK;AAEtD,MAAMC,SAAShC,WAAWiC,OAAO;CAC/BC,QAAQ,EACNC,WAAW,SACb;CAGAC,QAAQ,EACNC,QAAQ,EACV;CACAC,KAAK;EACHC,YAAY;EACZC,eAAe;EACfC,OAAO;CACT;C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CAAA,IAAAN,EAAA,OAAAH,OAAA;EAGLS,KAAA0C,YAAYnD,KAAK;EAACG,EAAA,KAAAH;EAAAG,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAJ,YAAAI,EAAA,OAAAW,IAAAtC,MAAA;EACzCkC,KAAA,oBAAC,MAAD;GAAa,OAAAI,IAAGtC;GAAQuB;EAAnB,CAAA;EAAmCI,EAAA,KAAAJ;EAAAI,EAAA,KAAAW,IAAAtC;EAAA2B,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAM,MAAAN,EAAA,OAAAO,IAAA;EAD1CC,KAAA,oBAAC,kBAAD;GAAyB,OAAAF;GACvBC,UAAAA;EADe,CAAA;EAEEP,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAFnBQ;AAEmB;AAOvB,SAAAY,QAAA7B,UAAA;CACE,MAAA,EAAA0C,QAAAiB,WAA2B/G,SAAS;CACpC,MAAAgH,eAAqBzH,iBAAiB;CACtC,MAAAyF,OAAa5B,WAAW0C,OAAMmB,mBAAoBnB,OAAMoB;CACxD,MAAAC,SAAe;EAAAC,UACHL,OAAMM;EAAgBC,QACxBjI,OAAMkI,OAAO,GAAIR,OAAMS,gBAAiB;CAClD;CAAC,OAEMlI,uBAAiB;EAAA;EAAA,OAEf,EAAAmI,iBACYT,eAAAhC,OAAsBxF,WAAWwF,MAAMmC,MAAM,EAChE;CAAC,CACF;AAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkImageProps } from "../../mark/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/avatar/index.d.ts
|
|
5
5
|
type AvatarProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -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/button/index.d.ts
|
|
5
5
|
type ButtonForm = ButtonLinkForm | ButtonPressForm | (ButtonToggleForm & {
|
|
6
6
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { useTypeRole } from "../../typography/roles.js";
|
|
5
6
|
import { AnimatedPressable, HEIGHTS, OUTLINE_WIDTHS, PRESSED_CORNERS, buttonStyles, toggleState, useButtonAction, useCorner, useSlotTrigger } from "../../button/index.js";
|
|
6
7
|
import { palettesOf } from "../../button/palettes.js";
|
|
7
8
|
import { BUSY, CONCEALED, PendingContent, PendingRing, pendingStyles, usePending } from "../../button/pending.js";
|
|
8
|
-
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { StyleSheet, Text, useWindowDimensions } from "react-native";
|
|
12
11
|
import Animated from "react-native-reanimated";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/button/index.tsx
|
|
14
14
|
const DISABLED = {
|
|
15
15
|
elevated: "filledDisabled",
|
|
@@ -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/card/index.d.ts
|
|
4
4
|
type CardBaseProps = {
|
|
5
5
|
readonly children?: ReactNode;
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { usePressFeedback } from "../../press/index.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 { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/card/index.tsx
|
|
10
10
|
const paddings = themedStyles(({ spacing }) => StyleSheet.create({
|
|
11
11
|
default: { padding: spacing.lg },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentRef, ReactNode, Ref } from "react";
|
|
2
1
|
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
3
|
//#region src/components/checkbox/index.d.ts
|
|
4
4
|
type CheckboxProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
5
5
|
/**
|
|
@@ -5,9 +5,9 @@ import { controlStylesOf } from "../../control/styles.js";
|
|
|
5
5
|
import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
|
|
6
6
|
import { CheckboxBox } from "../../control/checkbox-box.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { Pressable, View } from "react-native";
|
|
8
9
|
import { useId } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { Pressable, View } from "react-native";
|
|
11
11
|
import { useToggleState } from "react-stately/useToggleState";
|
|
12
12
|
//#region src/components/checkbox/index.tsx
|
|
13
13
|
const LAYERS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentRef, ReactNode, Ref } from "react";
|
|
2
1
|
import { PressableProps, StyleProp, View, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
3
|
//#region src/components/chip/index.d.ts
|
|
4
4
|
/** An assist or suggestion chip: an action, drawn as a plain button. */
|
|
5
5
|
type ChipActionProps = ChipBaseProps & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTheme } from "../../theme/scope.js";
|
|
2
2
|
import { composeStyles } from "../../theme/styles.js";
|
|
3
|
-
import { AnimatedPressable, toggleState, useButtonAction } from "../../button/index.js";
|
|
4
3
|
import { usePressFeedback } from "../../press/index.js";
|
|
4
|
+
import { AnimatedPressable, toggleState, useButtonAction } from "../../button/index.js";
|
|
5
5
|
import { shadowsOf, stylesOf } from "../../chip/styles.js";
|
|
6
6
|
import { ChipGlyph, ChipLabel, measureThen, paintOf, targetOf, useEasedColors } from "../../chip/index.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentRef, ReactElement, ReactNode, Ref } from "react";
|
|
2
1
|
import { PressableProps, StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, ReactElement, ReactNode, Ref } from "react";
|
|
3
3
|
import { Key, Selection, SelectionMode } from "react-stately";
|
|
4
4
|
//#region src/components/chip-group/index.d.ts
|
|
5
5
|
type ChipGroupChipProps = Omit<PressableProps, 'children' | 'disabled' | 'id' | 'style'> & {
|
|
@@ -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":";;;;;;;;AAwCA,MAAMa,YAAY;AAClB,MAAMC,wBAAwB;AAG9B,MAAMC,uBAAqC,IAAIE,IAAI;CACjD;CACA;CACA;AAAO,CACR;AAED,MAAMC,SAASb,WAAWc,OAAO;CAG/BC,UAAU;EACRC,MAAM;EACNC,UAAU;CACZ;CAGAC,QAAQ,EACNC,SAAS,OACX;CACAC,MAAM,EACJC,OAAOb,UACT;CACAc,gBAAgB,EACdD,OAAOZ,sBACT;CACAc,UAAU,EACRC,UAAU,EACZ;AACF,CAAC;AAKD,MAAMC,WAAWlB,cAAc,EAAEmB,cAC/B1B,WAAWc,OAAO,EAChBa,MAAM;CACJC,eAAe;CACfJ,UAAU;CACVK,KAAKH,QAAQI;AACf,EACF,CAAC,CACH;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAAAS,WAAAC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,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAvB,UAAAuB,EAAA,OAAAO,MAAAP,EAAA,OAAAY,IAAA;EAJjEC,KAAA,oBAAC,MAAD;GACepC,eAAAA;GACN,OAAA8B;GAEPK,UAAAA;EAJG,CAAA;EAKEZ,EAAA,KAAAvB;EAAAuB,EAAA,KAAAO;EAAAP,EAAA,KAAAY;EAAAZ,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OALPa;AAKO"}
|
|
@@ -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 & {
|