@kanso-labs/react-native-kanso-ui 0.4.0 → 0.5.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/dist/autocomplete/index.js +39 -0
- package/dist/autocomplete/index.js.map +1 -0
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js +35 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +1 -1
- package/dist/button/slots.d.ts +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/chip/index.js +1 -1
- package/dist/components/autocomplete/index.d.ts +49 -0
- package/dist/components/autocomplete/index.js +87 -0
- package/dist/components/autocomplete/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +196 -150
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +106 -193
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/chip-group/index.d.ts +1 -1
- package/dist/components/chip-group/index.js +1 -1
- 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 +3 -2
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +2 -2
- package/dist/components/icon-button/index.js +205 -159
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/link/index.d.ts +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.d.ts +216 -0
- package/dist/components/list/index.js +1118 -0
- package/dist/components/list/index.js.map +1 -0
- package/dist/components/list-item/index.d.ts +63 -0
- package/dist/components/list-item/index.js +275 -0
- package/dist/components/list-item/index.js.map +1 -0
- package/dist/components/menu/index.d.ts +309 -0
- package/dist/components/menu/index.js +1283 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/meter/index.d.ts +1 -1
- package/dist/components/meter/index.js +1 -1
- package/dist/components/number-field/index.d.ts +1 -1
- package/dist/components/number-field/index.js +2 -2
- package/dist/components/popover/index.d.ts +140 -0
- package/dist/components/popover/index.js +704 -0
- package/dist/components/popover/index.js.map +1 -0
- 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 +1 -1
- package/dist/components/radio-group/index.d.ts +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/search-field/index.d.ts +12 -4
- package/dist/components/search-field/index.js +64 -58
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +1 -1
- package/dist/components/segmented-button/index.js +1 -1
- 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 -2
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +1 -1
- package/dist/components/snackbar/index.js +1 -1
- 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 +1 -1
- 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 +137 -0
- package/dist/control/checkbox-box.js.map +1 -0
- package/dist/control/index.js +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.js +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/glyphs/index.js +21 -2
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +16 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +272 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +7 -2
- package/dist/indicator/index.d.ts +1 -1
- package/dist/indicator/index.js +2 -2
- package/dist/mark/index.d.ts +1 -1
- package/dist/mark/index.js +1 -1
- package/dist/modal/index.d.ts +1 -1
- package/dist/modal/index.js +2 -9
- package/dist/modal/index.js.map +1 -1
- package/dist/overlay/anchored.d.ts +2 -0
- package/dist/overlay/anchored.js +182 -0
- package/dist/overlay/anchored.js.map +1 -0
- package/dist/overlay/host.d.ts +2 -0
- package/dist/overlay/host.js +1 -1
- package/dist/overlay/index.d.ts +4 -0
- package/dist/overlay/panel.js +215 -0
- package/dist/overlay/panel.js.map +1 -0
- package/dist/overlay/placement.d.ts +8 -0
- package/dist/overlay/placement.js +87 -0
- package/dist/overlay/placement.js.map +1 -0
- package/dist/press/index.js +1 -1
- package/dist/ref/index.js +15 -0
- package/dist/ref/index.js.map +1 -0
- package/dist/router/index.js +1 -1
- package/dist/row/index.js +158 -0
- package/dist/row/index.js.map +1 -0
- package/dist/row/styles.js +51 -0
- package/dist/row/styles.js.map +1 -0
- 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 +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","Ref","RefObject","HostInstance","StyleProp","TextProps","TextStyle","ViewProps","ViewStyle","AnimatedStyle","OverlayTriggerState","createContext","use","useCallback","useEffect","useId","useMemo","useRef","useState","Text","NativeText","ScrollView","StyleSheet","Animated","useOverlayTriggerState","ButtonSlots","OverlayAlign","OverlaySide","ResolvedTheme","ButtonSlotContext","ModalWindow","panelRoleOf","Overlay","useAnchoredPlacement","DismissLayer","PANEL_ORIGINS","useBackToClose","useFocusOnPlaced","usePanelMotion","useReturnFocus","refsOf","useTheme","composeStyles","themedStyles","useTypeRole","DEFAULT_HOVER_DELAY","DEFAULT_HOVER_CLOSE_DELAY","WIDTHS","md","sm","const","Record","PopoverSize","UNSEEN","opacity","stylesOf","colors","radii","shadows","spacing","create","content","paddingBottom","paddingHorizontal","lg","paddingTop","description","color","onSurfaceVariant","scroll","flexGrow","surface","backgroundColor","surfaceContainer","borderRadius","boxShadow","elevation2","overflow","title","HoverTrigger","ReturnType","useHoverTrigger","PanelProps","Omit","PopoverContentProps","anchor","byPointer","close","dismissable","hover","isOpen","labelledBy","modal","setPresent","present","size","titled","PopoverTitle","PopoverAlign","align","alignOffset","children","ref","side","PopoverSide","sideOffset","style","triggerRef","PopoverDescriptionProps","PopoverProps","closeDelay","defaultOpen","delay","onOpenChange","trigger","PopoverTrigger","PopoverRoot","id","setTitle","node","PopoverTitleProps","PopoverContext","TitleContext","Popover","t0","$","_c","t1","t2","t3","t4","t5","undefined","t6","state","hovering","t7","t8","default","press","delayLongPress","expanded","onHoverIn","enter","onHoverOut","leave","onLongPress","longPress","toggle","slots","t9","t10","root","t11","t12","PopoverContent","props","Error","setByPointer","panel","PopoverDescription","styles","role","T0","PopoverPanel","placement","setPanel","motion","placed","panelEnter","panelLeave","onLayout","maxWidth","transformOrigin","t13","t14","View","t15","wasOpen","setWasOpen","timer","Symbol","for","onPanel","onTrigger","pointer","clearTimeout","current","after","milliseconds","then","setTimeout","closeOnceGone","open","Content","Description","Title","_c","NativeText"],"sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["import type { ReactNode, Ref, RefObject } from 'react'\nimport type {\n HostInstance,\n StyleProp,\n TextProps,\n TextStyle,\n ViewProps,\n ViewStyle,\n} from 'react-native'\nimport type { AnimatedStyle } from 'react-native-reanimated'\nimport type { OverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport {\n createContext,\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { Text as NativeText, ScrollView, StyleSheet } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { useOverlayTriggerState } from 'react-stately/useOverlayTriggerState'\n\nimport type { ButtonSlots } from '../../button/slots'\nimport type { OverlayAlign, OverlaySide } from '../../overlay'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { ButtonSlotContext } from '../../button/slots'\nimport { ModalWindow, panelRoleOf } from '../../modal'\nimport { Overlay, useAnchoredPlacement } from '../../overlay'\nimport {\n DismissLayer,\n PANEL_ORIGINS,\n useBackToClose,\n useFocusOnPlaced,\n usePanelMotion,\n useReturnFocus,\n} from '../../overlay/panel'\nimport { refsOf } from '../../ref'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\n\n// kanso-ui's Popover, a panel anchored to the control that opened it. It has\n// no Material Design page of its own, so it follows the tooltips page's rich\n// tooltip, as web's does: a panel on surface container with the 12dp corner\n// and the second elevation, inset 12dp above, 8dp below and 16dp at the\n// sides, holding a subhead in title small over supporting text in body\n// medium, both in on-surface variant, with no caret drawn between it and its\n// anchor. It is as wide as its content, up to 320dp at `md` and 240dp at\n// `sm`.\n//\n// **It is placed by src/overlay's anchored placement**: on `side`, lined up\n// by `align`, flipped to the opposite side at the edge of the window and kept\n// inside the safe area, with `start` and `end` following a right-to-left\n// layout. Its content scrolls when it runs past the room on the side it\n// opened on.\n//\n// **A non-modal popover, the default, draws in the overlay host** above the\n// screen, and a screen reader can leave it for the screen around it. A press\n// outside it lands on src/overlay's dismiss layer, drawn under it and hidden\n// from a screen reader, which closes it. The press goes no further, so a press on the trigger\n// closes it rather than opening it again, as on web. Android's back gesture\n// and VoiceOver's escape gesture close it too. **A modal popover draws in a\n// `Modal`**, through src/modal, as a dialog does, which keeps a screen reader\n// inside it until it closes, over a scrim that draws nothing.\n//\n// **`trigger=\"hover\"` opens once a pointer has rested on the trigger** for\n// `delay`, an iPad's pointer or an Android mouse, and closes `closeDelay`\n// after the pointer has left both the trigger and the panel, so the panel's\n// own buttons stay in reach. Touch has no hover, so a press held for `delay`\n// opens it too, and a popover opened that way stays open until a press\n// outside it or on its trigger. A hovered popover is always non-modal, as on\n// web, and one a pointer opened draws no layer under it, which would take\n// the pointer off the trigger.\n//\n// **It fades and scales in and out**, from 95% and from the edge facing its\n// anchor: in over the short3 duration on the emphasised decelerating curve,\n// once it has been placed, and out over short2 on the accelerating one, as\n// src/overlay's panel moves every anchored panel. Web only animates in, since\n// React Aria keeps a closing surface mounted only while a CSS animation runs;\n// here the panel stays mounted until its exit has run. Under reduced motion it\n// appears and leaves at once, as web's does.\n//\n// **A screen reader follows a press.** Opened by a press, or by a press held\n// on a hover trigger, it is sent to the title, or to the panel without one,\n// once the panel is placed, and back to the trigger once it has gone. A\n// pointer resting on the trigger moves nothing.\n\n// How long a pointer rests on a hover trigger before the popover opens, and\n// how long it has to be gone before it closes, React Aria's own defaults,\n// which web's spells out.\nconst DEFAULT_HOVER_DELAY = 600\nconst DEFAULT_HOVER_CLOSE_DELAY = 200\n\n// The widest each size draws, web's.\nconst WIDTHS = { md: 320, sm: 240 } as const satisfies Record<\n PopoverSize,\n number\n>\n\n// A modal popover's scrim takes presses and draws nothing.\nconst UNSEEN: ViewStyle = { opacity: 0 }\n\nconst stylesOf = themedStyles(\n ({ colors, radii, shadows, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The rich tooltip's inset: 12dp above, 8dp below and 16dp at the\n // sides.\n content: {\n paddingBottom: spacing.sm,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n },\n description: {\n color: colors.onSurfaceVariant,\n },\n // Only as tall as its content until the panel's room runs out, where\n // it scrolls.\n scroll: {\n flexGrow: 0,\n },\n surface: {\n backgroundColor: colors.surfaceContainer,\n borderRadius: radii.md,\n boxShadow: shadows.elevation2,\n overflow: 'hidden',\n },\n title: {\n color: colors.onSurfaceVariant,\n },\n }),\n)\n\n// How a hovered popover is opened and closed by a pointer, and how it was\n// opened last.\ntype HoverTrigger = ReturnType<typeof useHoverTrigger>\n\ntype PanelProps = Omit<PopoverContentProps, 'triggerRef'> & {\n readonly anchor: RefObject<HostInstance | null>\n /** Whether a pointer resting on the trigger opened it. */\n readonly byPointer: boolean\n readonly close: () => void\n /** Whether a press outside it lands on a layer that closes it. */\n readonly dismissable: boolean\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n readonly labelledBy: string | undefined\n readonly modal: boolean\n readonly setPresent: (present: boolean) => void\n readonly size: PopoverSize\n /** The headline, which a screen reader is sent to once the panel shows. */\n readonly title: HostInstance | null\n readonly titled: PopoverTitle\n}\n\n/** Where the panel sits along the side it opens on. */\ntype PopoverAlign = OverlayAlign\n\ntype PopoverContentProps = Omit<ViewProps, 'children' | 'role' | 'style'> & {\n /**\n * Where the panel sits along the side it opens on. On `top` and `bottom`,\n * `start` and `end` follow a right-to-left layout.\n * @default 'center'\n */\n readonly align?: PopoverAlign\n /** Moves the panel along that side, in dp: right or down when positive. */\n readonly alignOffset?: number\n readonly children?: ReactNode\n readonly ref?: Ref<HostInstance>\n /**\n * Which side of the trigger the panel opens on. It flips to the opposite\n * side when there is no room.\n * @default 'bottom'\n */\n readonly side?: PopoverSide\n /**\n * The gap between the trigger and the panel, in dp.\n * @default spacing.sm\n */\n readonly sideOffset?: number\n readonly style?: StyleProp<ViewStyle>\n /** A view to place the panel beside other than the trigger. */\n readonly triggerRef?: RefObject<HostInstance | null>\n}\n\ntype PopoverDescriptionProps = TextProps & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverProps = {\n /** The button that opens the popover, and `Popover.Content`. */\n readonly children?: ReactNode\n /**\n * How long the pointer has to be gone from a hovered popover's trigger\n * and panel before it closes, in milliseconds. Ignored by a pressed one.\n * @default 200\n */\n readonly closeDelay?: number\n /** Whether the popover starts open, when it keeps its own state. */\n readonly defaultOpen?: boolean\n /**\n * How long a pointer rests on a hover trigger, or a press is held on it,\n * before the popover opens, in milliseconds. Ignored by a pressed one.\n * @default 600\n */\n readonly delay?: number\n /** Whether the popover is open, when the call site holds the state. */\n readonly isOpen?: boolean\n /**\n * Keeps a screen reader inside the panel while it is open, as a dialog\n * does. Off by default: a popover leaves the screen in reach, which is the\n * difference from `Sheet`. A hovered popover is never modal.\n * @default false\n */\n readonly modal?: boolean\n /** Called with the new state as the popover opens or closes. */\n readonly onOpenChange?: (isOpen: boolean) => void\n /**\n * The panel's width: `sm` caps it at 240dp, `md` at 320dp. Either way it is\n * only as wide as its content.\n * @default 'md'\n */\n readonly size?: PopoverSize\n /**\n * What opens the panel: a press on the trigger, or a pointer resting on\n * it. `hover` is the tooltips page's rich tooltip, and on touch it opens\n * on a press held for `delay`.\n * @default 'press'\n */\n readonly trigger?: PopoverTrigger\n}\n\n// What the content reads from the root.\ntype PopoverRoot = {\n /** The trigger's node, which the panel is placed beside. */\n readonly anchor: RefObject<HostInstance | null>\n readonly close: () => void\n readonly hover: HoverTrigger\n readonly isOpen: boolean\n /** Whether the panel keeps a screen reader inside it. */\n readonly modal: boolean\n readonly size: PopoverSize\n}\n\n/** Which side of the trigger the panel opens on. */\ntype PopoverSide = OverlaySide\n\ntype PopoverSize = 'md' | 'sm'\n\n// What the panel's parts read: the headline's id, and where its node goes.\ntype PopoverTitle = {\n readonly id: string\n readonly setTitle: (node: HostInstance | null) => void\n}\n\ntype PopoverTitleProps = Omit<TextProps, 'role'> & {\n readonly ref?: Ref<HostInstance>\n}\n\ntype PopoverTrigger = 'hover' | 'press'\n\nconst PopoverContext = createContext<null | PopoverRoot>(null)\nconst TitleContext = createContext<null | PopoverTitle>(null)\n\n/**\n * A panel anchored to the control that opened it, as the tooltips spec\n * page's rich tooltip draws one. Pass `isOpen` with `onOpenChange` to hold\n * the open state, or `defaultOpen` to let it keep its own.\n *\n * ```tsx\n * <Popover>\n * <Button variant=\"outlined\">Open</Button>\n * <Popover.Content>\n * <Popover.Title>Headline</Popover.Title>\n * <Popover.Description>Supporting text</Popover.Description>\n * </Popover.Content>\n * </Popover>\n * ```\n *\n * Non-modal by default, which leaves the screen in reach of a screen reader,\n * and `modal` keeps one inside it. A press outside the panel and a button\n * given `slot=\"close\"` inside it close it, and a press on its trigger\n * toggles it. Composed rather than configured by props, as web's is: a\n * `Button` or `IconButton` placed directly inside `Popover` is its trigger,\n * and the panel is placed beside it.\n */\nfunction Popover({\n children,\n closeDelay = DEFAULT_HOVER_CLOSE_DELAY,\n defaultOpen,\n delay = DEFAULT_HOVER_DELAY,\n isOpen,\n modal = false,\n onOpenChange,\n size = 'md',\n trigger = 'press',\n}: PopoverProps) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange })\n const anchor = useRef<HostInstance>(null)\n const hover = useHoverTrigger(state, delay, closeDelay)\n const hovering = trigger === 'hover'\n const close = useCallback(() => {\n state.close()\n }, [state])\n const slots = useMemo<ButtonSlots>(\n () =>\n hovering\n ? {\n default: hover.press,\n trigger: {\n delayLongPress: delay,\n expanded: state.isOpen,\n onHoverIn: hover.enter,\n onHoverOut: hover.leave,\n onLongPress: hover.longPress,\n ref: anchor,\n },\n }\n : {\n default: () => {\n state.toggle()\n },\n trigger: { expanded: state.isOpen, ref: anchor },\n },\n [delay, hover, hovering, state],\n )\n const root = useMemo<PopoverRoot>(\n () => ({\n anchor,\n close,\n hover,\n isOpen: state.isOpen,\n modal: modal && !hovering,\n size,\n }),\n [close, hover, hovering, modal, size, state.isOpen],\n )\n\n return (\n <PopoverContext value={root}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </PopoverContext>\n )\n}\n\n/**\n * The panel itself. Everything the popover shows goes in here; the trigger\n * stays outside it. Its content scrolls when it runs past the room the\n * window leaves on the side it opened on.\n *\n * `style`, `ref` and `testID` land on the panel.\n */\nfunction PopoverContent({ triggerRef, ...props }: PopoverContentProps) {\n const root = use(PopoverContext)\n\n if (root === null) {\n throw new Error('Popover.Content is drawn inside Popover.')\n }\n\n const { anchor, close, hover, isOpen, modal, size } = root\n const [present, setPresent] = useState(isOpen)\n const [title, setTitle] = useState<HostInstance | null>(null)\n const [byPointer, setByPointer] = useState(hover.byPointer)\n const id = useId()\n const titled = useMemo(() => ({ id, setTitle }), [id])\n\n // Mounted the moment it opens, and kept until its exit has run.\n if (isOpen && !present) {\n setPresent(true)\n }\n\n // Whether a pointer opened it, kept until it has gone, after the root has\n // forgotten.\n if (isOpen && byPointer !== hover.byPointer) {\n setByPointer(hover.byPointer)\n }\n\n useReturnFocus(present, byPointer, triggerRef ?? anchor)\n\n if (!present) {\n return null\n }\n\n const labelledBy = title === null ? undefined : id\n const panel = (\n <PopoverPanel\n {...props}\n anchor={triggerRef ?? anchor}\n byPointer={byPointer}\n close={close}\n dismissable={!modal && !byPointer && isOpen}\n hover={hover}\n isOpen={isOpen}\n labelledBy={labelledBy}\n modal={modal}\n setPresent={setPresent}\n size={size}\n title={title}\n titled={titled}\n />\n )\n\n if (!modal) {\n return <Overlay>{panel}</Overlay>\n }\n\n return (\n <ModalWindow\n isKeyboardDismissDisabled={false}\n labelledBy={labelledBy}\n onClose={close}\n onScrimPress={isOpen ? close : undefined}\n scrim={UNSEEN}\n title={null}\n >\n {panel}\n </ModalWindow>\n )\n}\n\n/**\n * Supporting text under the title, in body medium on on-surface variant.\n * `style`, `ref` and `testID` land on React Native's own Text.\n */\nfunction PopoverDescription({ style, ...props }: PopoverDescriptionProps) {\n const styles = stylesOf(useTheme())\n const role = useTypeRole('bodyMedium')\n\n return (\n <NativeText\n {...props}\n style={composeStyles<TextStyle>(role, styles.description, style)}\n />\n )\n}\n\n// The panel, drawn where the popover's host is: in the overlay host above the\n// screen, or in the `Modal` of a modal one, so the placement measures the\n// layer the panel is drawn in.\nfunction PopoverPanel({\n align,\n alignOffset,\n anchor,\n byPointer,\n children,\n close,\n dismissable,\n hover,\n isOpen,\n labelledBy,\n modal,\n ref,\n setPresent,\n side,\n sideOffset,\n size,\n style,\n title,\n titled,\n ...props\n}: PanelProps) {\n const styles = stylesOf(useTheme())\n const placement = useAnchoredPlacement({\n align,\n alignOffset,\n anchor,\n side,\n sideOffset,\n })\n const [panel, setPanel] = useState<HostInstance | null>(null)\n const motion = usePanelMotion(isOpen, placement.placed, setPresent)\n const slots = useMemo<ButtonSlots>(() => ({ close }), [close])\n\n useBackToClose(close, !modal && isOpen)\n useFocusOnPlaced(placement.placed && !byPointer, title ?? panel)\n\n return (\n <>\n {dismissable ? <DismissLayer onPress={close} /> : null}\n <Animated.View\n {...(modal\n ? panelRoleOf('dialog', labelledBy)\n : { 'aria-labelledby': labelledBy, role: 'dialog' as const })}\n onAccessibilityEscape={close}\n onPointerEnter={hover.panelEnter}\n onPointerLeave={hover.panelLeave}\n {...props}\n onLayout={placement.onLayout}\n ref={refsOf(setPanel, ref)}\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.surface,\n { maxWidth: WIDTHS[size] },\n placement.style,\n { transformOrigin: PANEL_ORIGINS[placement.side] },\n motion,\n style,\n )}\n >\n <ScrollView\n contentContainerStyle={styles.content}\n style={styles.scroll}\n >\n <TitleContext value={titled}>\n <ButtonSlotContext value={slots}>{children}</ButtonSlotContext>\n </TitleContext>\n </ScrollView>\n </Animated.View>\n </>\n )\n}\n\n/**\n * Names the popover: the panel is labelled by it, and a screen reader is\n * sent to it once a pressed popover shows. In title small on on-surface\n * variant, the rich tooltip's subhead. `style`, `ref` and `testID` land on\n * React Native's own Text.\n */\nfunction PopoverTitle({ ref, style, ...props }: PopoverTitleProps) {\n const titled = use(TitleContext)\n const styles = stylesOf(useTheme())\n const role = useTypeRole('titleSmall')\n\n if (titled === null) {\n throw new Error('Popover.Title is drawn inside Popover.Content.')\n }\n\n return (\n <NativeText\n {...props}\n nativeID={titled.id}\n ref={refsOf(titled.setTitle, ref)}\n role=\"heading\"\n style={composeStyles<TextStyle>(role, styles.title, style)}\n />\n )\n}\n\n/**\n * How a hovered popover opens and closes. A pointer resting on the trigger\n * for `delay` opens it, and once the pointer has left both the trigger and\n * the panel for `closeDelay` it closes again. A press held for `delay` opens\n * it as well, and a popover opened that way stays open until a press outside\n * it or on the trigger. `byPointer` says whether a pointer opened it, which\n * is forgotten as it closes, however it closed.\n */\nfunction useHoverTrigger(\n state: OverlayTriggerState,\n delay: number,\n closeDelay: number,\n) {\n const [byPointer, setByPointer] = useState(false)\n const [wasOpen, setWasOpen] = useState(state.isOpen)\n const timer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const pointer = useRef({ onPanel: false, onTrigger: false })\n\n if (wasOpen !== state.isOpen) {\n setWasOpen(state.isOpen)\n if (!state.isOpen) {\n setByPointer(false)\n }\n }\n\n useEffect(\n () => () => {\n clearTimeout(timer.current)\n },\n [],\n )\n\n function after(milliseconds: number, then: () => void) {\n clearTimeout(timer.current)\n timer.current = setTimeout(then, milliseconds)\n }\n\n function closeOnceGone() {\n after(closeDelay, () => {\n if (!pointer.current.onPanel && !pointer.current.onTrigger) {\n state.close()\n }\n })\n }\n\n return {\n byPointer,\n enter: () => {\n pointer.current.onTrigger = true\n if (state.isOpen) {\n clearTimeout(timer.current)\n return\n }\n after(delay, () => {\n setByPointer(true)\n state.open()\n })\n },\n leave: () => {\n pointer.current.onTrigger = false\n if (!state.isOpen) {\n clearTimeout(timer.current)\n } else if (byPointer) {\n closeOnceGone()\n }\n },\n longPress: () => {\n clearTimeout(timer.current)\n setByPointer(false)\n state.open()\n },\n panelEnter: () => {\n pointer.current.onPanel = true\n clearTimeout(timer.current)\n },\n panelLeave: () => {\n pointer.current.onPanel = false\n if (byPointer) {\n closeOnceGone()\n }\n },\n press: () => {\n clearTimeout(timer.current)\n if (state.isOpen) {\n state.close()\n }\n },\n }\n}\n\nPopover.Content = PopoverContent\nPopover.Description = PopoverDescription\nPopover.Title = PopoverTitle\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverTitle }\nexport type {\n PopoverAlign,\n PopoverContentProps,\n PopoverDescriptionProps,\n PopoverProps,\n PopoverSide,\n PopoverSize,\n PopoverTitleProps,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+FA,MAAM6C,sBAAsB;AAC5B,MAAMC,4BAA4B;AAGlC,MAAMC,SAAS;CAAEC,IAAI;CAAKC,IAAI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,MAAAR,EAAA,QAAAW,MAAAX,EAAA,QAAAyB,IAAA;EAzCIG,MAAA;GAAAnE;GAAAyD,OAEEZ;GAUNc,OACMZ;GAONc,WACUX;GAIViC,YACWhC;GAGXiC,YACWpB;GAKXX,OACMY;EAMT;EAAC1B,EAAA,MAAAvC;EAAAuC,EAAA,MAAA0B;EAAA1B,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAW;EAAAX,EAAA,MAAAyB;EAAAzB,EAAA,MAAA4B;CAAA,OAAAA,MAAA5B,EAAA;CAAA,OA1CM4B;AA0CN;AAGH9B,QAAQuE,UAAUvC;AAClBhC,QAAQwE,cAAcnC;AACtBrC,QAAQyE,QAAQnG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkImageProps } from "../../mark/index.js";
|
|
2
|
-
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
2
|
import { ComponentRef, Ref } from "react";
|
|
3
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
4
4
|
//#region src/components/product-icon/index.d.ts
|
|
5
5
|
type ProductIconProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IndicatorTone } from "../../indicator/index.js";
|
|
2
|
-
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
2
|
import { ComponentRef, Ref } from "react";
|
|
3
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
4
4
|
//#region src/components/progress-indicator/index.d.ts
|
|
5
5
|
type ProgressIndicatorProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
6
6
|
/**
|
|
@@ -7,9 +7,9 @@ import { IndicatorLabels, IndicatorLine, activeLength, fillOf, readingOf, useEas
|
|
|
7
7
|
import { keyframeAt, useLoop } from "../../indicator/motion.js";
|
|
8
8
|
import { TURN, WAVE_HEIGHT, WAVE_ORIGIN, arcPath, wavePath, wavyArcPath } from "../../indicator/paths.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { I18nManager, StyleSheet, View } from "react-native";
|
|
11
12
|
import Svg, { Path } from "react-native-svg";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import Animated, { useAnimatedProps, useAnimatedStyle, useDerivedValue, useReducedMotion } from "react-native-reanimated";
|
|
14
14
|
//#region src/components/progress-indicator/index.tsx
|
|
15
15
|
const CIRCULAR_SIZE = 40;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
1
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
2
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
3
|
//#region src/components/radio-group/index.d.ts
|
|
4
4
|
/** Which way a `RadioGroup` lays out its buttons. */
|
|
5
5
|
type RadioGroupOrientation = 'horizontal' | 'vertical';
|
|
@@ -6,9 +6,9 @@ import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
|
6
6
|
import { controlStylesOf } from "../../control/styles.js";
|
|
7
7
|
import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
|
-
import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
10
9
|
import { createContext, use, useId } from "react";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
12
12
|
import Animated, { Easing, useAnimatedStyle, useReducedMotion, withTiming } from "react-native-reanimated";
|
|
13
13
|
import { useRadioGroupState } from "react-stately/useRadioGroupState";
|
|
14
14
|
//#region src/components/radio-group/index.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ValidationResult } from "../../form/index.js";
|
|
2
|
-
import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
|
|
3
2
|
import { ComponentRef, Ref } from "react";
|
|
3
|
+
import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
|
|
4
4
|
//#region src/components/search-field/index.d.ts
|
|
5
5
|
type SearchFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilityLabel' | 'aria-disabled' | 'aria-label' | 'children' | 'cursorColor' | 'defaultValue' | 'editable' | 'multiline' | 'numberOfLines' | 'onChange' | 'onChangeText' | 'placeholderTextColor' | 'readOnly' | 'returnKeyType' | 'role' | 'selectionColor' | 'style' | 'underlineColorAndroid' | 'value'> & {
|
|
6
6
|
/**
|
|
@@ -9,7 +9,10 @@ type SearchFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilit
|
|
|
9
9
|
* Aria.
|
|
10
10
|
*/
|
|
11
11
|
readonly clearLabel?: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The value the field opens with, when it keeps its own. Inside an
|
|
14
|
+
* `Autocomplete` the autocomplete's is read instead.
|
|
15
|
+
*/
|
|
13
16
|
readonly defaultValue?: string;
|
|
14
17
|
/**
|
|
15
18
|
* A hint shown under the bar. Replaced by `error` when there is one, so the
|
|
@@ -73,7 +76,10 @@ type SearchFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilit
|
|
|
73
76
|
* once the field loses focus after an edit, and holds the form back.
|
|
74
77
|
*/
|
|
75
78
|
readonly validate?: (value: string) => ValidationResult;
|
|
76
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* The value, when the call site keeps it. Inside an `Autocomplete` the
|
|
81
|
+
* autocomplete's `inputValue` is read instead.
|
|
82
|
+
*/
|
|
77
83
|
readonly value?: string;
|
|
78
84
|
};
|
|
79
85
|
/**
|
|
@@ -86,7 +92,9 @@ type SearchFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilit
|
|
|
86
92
|
* The bar is the search page's rather than the box the other fields share;
|
|
87
93
|
* the control and the line under it are the field chrome in `src/field`.
|
|
88
94
|
* React Native's own `TextInput` props reach the control; `style` and `ref`
|
|
89
|
-
* are the field as a whole, and `inputRef` the control.
|
|
95
|
+
* are the field as a whole, and `inputRef` the control. Inside an
|
|
96
|
+
* `Autocomplete`, the field shows what the autocomplete holds and reports
|
|
97
|
+
* each edit to it, which filters the list beside it.
|
|
90
98
|
*
|
|
91
99
|
* ```tsx
|
|
92
100
|
* <SearchField label="Label" placeholder="Supporting text" />
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AutocompleteContext } from "../../autocomplete/index.js";
|
|
1
2
|
import { IconStyleContext } from "../../glyphs/icon-style.js";
|
|
2
3
|
import { CloseGlyph, SearchGlyph } from "../../glyphs/index.js";
|
|
3
4
|
import { useTheme } from "../../theme/scope.js";
|
|
@@ -8,9 +9,9 @@ import { usePressFeedback } from "../../press/index.js";
|
|
|
8
9
|
import { IconButton } from "../icon-button/index.js";
|
|
9
10
|
import { FieldInput, FieldMessage, FieldStates, FieldStroke, describedBy, useFieldFocus, useStrokeMotion } from "../../field/index.js";
|
|
10
11
|
import { c } from "react/compiler-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import { useId, useImperativeHandle, useRef, useState } from "react";
|
|
12
|
+
import { use, useId, useImperativeHandle, useRef, useState } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Pressable, StyleSheet, View, useWindowDimensions } from "react-native";
|
|
14
15
|
//#region src/components/search-field/index.tsx
|
|
15
16
|
const ICON_SIZE = 24;
|
|
16
17
|
const MAX_WIDTH = 720;
|
|
@@ -85,6 +86,13 @@ function keyInto(clear, onKeyPress) {
|
|
|
85
86
|
function minHeightOf(minHeight) {
|
|
86
87
|
return { minHeight };
|
|
87
88
|
}
|
|
89
|
+
function reportTo(autocomplete, onChange) {
|
|
90
|
+
if (autocomplete === null) return onChange;
|
|
91
|
+
return (value) => {
|
|
92
|
+
autocomplete.setInputValue(value);
|
|
93
|
+
onChange?.(value);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
88
96
|
/**
|
|
89
97
|
* The bar around the control: the pill with its state layer and ring, the
|
|
90
98
|
* magnifier at the start and the clear button at the end. A press anywhere on
|
|
@@ -253,14 +261,16 @@ function SearchBar(t0) {
|
|
|
253
261
|
* The bar is the search page's rather than the box the other fields share;
|
|
254
262
|
* the control and the line under it are the field chrome in `src/field`.
|
|
255
263
|
* React Native's own `TextInput` props reach the control; `style` and `ref`
|
|
256
|
-
* are the field as a whole, and `inputRef` the control.
|
|
264
|
+
* are the field as a whole, and `inputRef` the control. Inside an
|
|
265
|
+
* `Autocomplete`, the field shows what the autocomplete holds and reports
|
|
266
|
+
* each edit to it, which filters the list beside it.
|
|
257
267
|
*
|
|
258
268
|
* ```tsx
|
|
259
269
|
* <SearchField label="Label" placeholder="Supporting text" />
|
|
260
270
|
* ```
|
|
261
271
|
*/
|
|
262
272
|
function SearchField(t0) {
|
|
263
|
-
const $ = c(
|
|
273
|
+
const $ = c(77);
|
|
264
274
|
let description;
|
|
265
275
|
let error;
|
|
266
276
|
let inputRef;
|
|
@@ -335,8 +345,10 @@ function SearchField(t0) {
|
|
|
335
345
|
const isRequired = t4 === void 0 ? false : t4;
|
|
336
346
|
const id = useId();
|
|
337
347
|
const control = useRef(null);
|
|
348
|
+
const autocomplete = use(AutocompleteContext);
|
|
338
349
|
const [own, setOwn] = useState(defaultValue);
|
|
339
|
-
const current = value ?? own;
|
|
350
|
+
const current = autocomplete?.inputValue ?? value ?? own;
|
|
351
|
+
const report = reportTo(autocomplete, onChange);
|
|
340
352
|
const t5 = current === "";
|
|
341
353
|
let t6;
|
|
342
354
|
if ($[22] !== current || $[23] !== error || $[24] !== isDisabled || $[25] !== isRequired || $[26] !== name || $[27] !== t5 || $[28] !== validate) {
|
|
@@ -380,7 +392,7 @@ function SearchField(t0) {
|
|
|
380
392
|
$[35] = t8;
|
|
381
393
|
} else t8 = $[35];
|
|
382
394
|
const focus = useFieldFocus(t8);
|
|
383
|
-
const clear = clearInto(setOwn,
|
|
395
|
+
const clear = clearInto(setOwn, report, onClear, validation.onEdit);
|
|
384
396
|
const shownError = validation.error;
|
|
385
397
|
let t10;
|
|
386
398
|
let t9;
|
|
@@ -413,24 +425,18 @@ function SearchField(t0) {
|
|
|
413
425
|
$[41] = t15;
|
|
414
426
|
} else t15 = $[41];
|
|
415
427
|
const t16 = !isDisabled;
|
|
416
|
-
|
|
417
|
-
if ($[42] !== onChange || $[43] !== validation.onEdit) {
|
|
418
|
-
t17 = editInto(setOwn, onChange, validation.onEdit);
|
|
419
|
-
$[42] = onChange;
|
|
420
|
-
$[43] = validation.onEdit;
|
|
421
|
-
$[44] = t17;
|
|
422
|
-
} else t17 = $[44];
|
|
428
|
+
const t17 = editInto(setOwn, report, validation.onEdit);
|
|
423
429
|
const t18 = keyInto(current === "" || isDisabled ? void 0 : clear, onKeyPress);
|
|
424
430
|
let t19;
|
|
425
|
-
if ($[
|
|
431
|
+
if ($[42] !== current || $[43] !== onSubmit || $[44] !== onSubmitEditing) {
|
|
426
432
|
t19 = submitInto(current, onSubmit, onSubmitEditing);
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else t19 = $[
|
|
433
|
+
$[42] = current;
|
|
434
|
+
$[43] = onSubmit;
|
|
435
|
+
$[44] = onSubmitEditing;
|
|
436
|
+
$[45] = t19;
|
|
437
|
+
} else t19 = $[45];
|
|
432
438
|
let t20;
|
|
433
|
-
if ($[
|
|
439
|
+
if ($[46] !== T2 || $[47] !== current || $[48] !== focus.handlers || $[49] !== label || $[50] !== props || $[51] !== t15 || $[52] !== t16 || $[53] !== t17 || $[54] !== t18 || $[55] !== t19) {
|
|
434
440
|
t20 = /* @__PURE__ */ jsx(T2, {
|
|
435
441
|
...props,
|
|
436
442
|
...t14,
|
|
@@ -445,20 +451,20 @@ function SearchField(t0) {
|
|
|
445
451
|
role: "searchbox",
|
|
446
452
|
value: current
|
|
447
453
|
});
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
} else t20 = $[
|
|
454
|
+
$[46] = T2;
|
|
455
|
+
$[47] = current;
|
|
456
|
+
$[48] = focus.handlers;
|
|
457
|
+
$[49] = label;
|
|
458
|
+
$[50] = props;
|
|
459
|
+
$[51] = t15;
|
|
460
|
+
$[52] = t16;
|
|
461
|
+
$[53] = t17;
|
|
462
|
+
$[54] = t18;
|
|
463
|
+
$[55] = t19;
|
|
464
|
+
$[56] = t20;
|
|
465
|
+
} else t20 = $[56];
|
|
460
466
|
let t21;
|
|
461
|
-
if ($[
|
|
467
|
+
if ($[57] !== T1 || $[58] !== clear || $[59] !== clearLabel || $[60] !== focus.focused || $[61] !== isDisabled || $[62] !== isRequired || $[63] !== t12 || $[64] !== t13 || $[65] !== t20) {
|
|
462
468
|
t21 = /* @__PURE__ */ jsx(T1, {
|
|
463
469
|
clearLabel,
|
|
464
470
|
control,
|
|
@@ -470,43 +476,43 @@ function SearchField(t0) {
|
|
|
470
476
|
showsClear: t13,
|
|
471
477
|
children: t20
|
|
472
478
|
});
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
} else t21 = $[
|
|
479
|
+
$[57] = T1;
|
|
480
|
+
$[58] = clear;
|
|
481
|
+
$[59] = clearLabel;
|
|
482
|
+
$[60] = focus.focused;
|
|
483
|
+
$[61] = isDisabled;
|
|
484
|
+
$[62] = isRequired;
|
|
485
|
+
$[63] = t12;
|
|
486
|
+
$[64] = t13;
|
|
487
|
+
$[65] = t20;
|
|
488
|
+
$[66] = t21;
|
|
489
|
+
} else t21 = $[66];
|
|
484
490
|
let t22;
|
|
485
|
-
if ($[
|
|
491
|
+
if ($[67] !== description || $[68] !== id || $[69] !== shownError) {
|
|
486
492
|
t22 = /* @__PURE__ */ jsx(FieldMessage, {
|
|
487
493
|
description,
|
|
488
494
|
error: shownError,
|
|
489
495
|
id
|
|
490
496
|
});
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
} else t22 = $[
|
|
497
|
+
$[67] = description;
|
|
498
|
+
$[68] = id;
|
|
499
|
+
$[69] = shownError;
|
|
500
|
+
$[70] = t22;
|
|
501
|
+
} else t22 = $[70];
|
|
496
502
|
let t23;
|
|
497
|
-
if ($[
|
|
503
|
+
if ($[71] !== T0 || $[72] !== ref || $[73] !== style || $[74] !== t21 || $[75] !== t22) {
|
|
498
504
|
t23 = /* @__PURE__ */ jsxs(T0, {
|
|
499
505
|
ref,
|
|
500
506
|
style,
|
|
501
507
|
children: [t21, t22]
|
|
502
508
|
});
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
} else t23 = $[
|
|
509
|
+
$[71] = T0;
|
|
510
|
+
$[72] = ref;
|
|
511
|
+
$[73] = style;
|
|
512
|
+
$[74] = t21;
|
|
513
|
+
$[75] = t22;
|
|
514
|
+
$[76] = t23;
|
|
515
|
+
} else t23 = $[76];
|
|
510
516
|
return t23;
|
|
511
517
|
}
|
|
512
518
|
function submitInto(value, onSubmit, onSubmitEditing) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","StyleProp","TextInput","TextInputKeyPressEvent","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","useId","useImperativeHandle","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","ValidationResult","IconStyle","describedBy","FieldInput","FieldMessage","FieldStates","FieldStroke","useFieldFocus","useStrokeMotion","useFieldValidation","CloseGlyph","SearchGlyph","IconStyleContext","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","SearchBarProps","children","clearLabel","control","isDisabled","isFocused","isInvalid","isRequired","onClear","showsClear","SearchFieldProps","Omit","defaultValue","description","error","inputRef","label","name","onChange","value","onSubmit","placeholder","ref","style","validate","ICON_SIZE","MAX_WIDTH","CLEAR_LABEL","stylesOf","colors","radii","spacing","stateLayerOpacity","create","bar","alignItems","backgroundColor","surfaceContainerHigh","borderRadius","pill","flexDirection","gap","lg","maxWidth","paddingEnd","paddingStart","md","barDisabled","onSurface","disabledContainer","clear","marginEnd","xs","ring","bottom","left","pointerEvents","position","right","top","blurThen","onBlur","then","event","clearFrom","current","focus","clearInto","setOwn","onEdit","editInto","text","focusOf","iconStyleOf","color","size","keyInto","onKeyPress","undefined","nativeEvent","key","minHeightOf","minHeight","SearchBar","t0","$","_c","theme","styles","fontScale","sizing","typography","t1","t2","corners","disabled","disableRipple","feedback","primary","T0","t3","t4","t5","handlers","onHoverIn","t6","onHoverOut","t7","t8","onPressIn","t9","onPressOut","t10","controlLg","bodyLargeLineHeight","t11","layer","t12","width","t13","onSurfaceVariant","disabledContent","t14","t15","Symbol","for","t16","t17","t18","t19","SearchField","onFocus","onSubmitEditing","props","id","own","isEmpty","isReadOnly","submitted","validation","shownError","T1","focused","T2","submitInto","t20","t21","t22","t23","_c"],"sources":["../../../src/components/search-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n StyleProp,\n TextInput,\n TextInputKeyPressEvent,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { useId, useImperativeHandle, useRef, useState } from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\n\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport {\n describedBy,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { CloseGlyph, SearchGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchField: the search page's search bar on its own, rather\n// than the box the other fields share. A pill on surface container high, the\n// page's 24dp magnifier in on surface variant at the start, the value in body\n// large on surface, and a clear button at the end while the field holds\n// anything. The page's 16dp of padding is to a 48dp tap target and the icon\n// sits 12dp inside that, so the magnifier starts 28dp in and the value 4dp\n// past the target, at 68dp. The clear button is the medium icon button, 40dp\n// around a 24dp icon, 4dp in from the padding, so its icon ends 28dp from the\n// end. The bar follows its own width up to the page's 720dp; the page's 360dp\n// floor is left to the call site, since a phone's width less its margins is\n// under it.\n//\n// The bar is the large control height, 56dp, as web's is, and grows by as\n// much as the value's line does at the device's text size.\n//\n// Under a pointer and while pressed, the bar draws the state layer every\n// control draws through `usePressFeedback`, on surface at the hover and\n// pressed opacities, and a press anywhere on it focuses the control, as a\n// press anywhere on the other fields' boxes does. The page names a focused\n// state and draws nothing for it, so the bar takes the 2dp primary ring the\n// text fields page gives a focused field, inside the pill, as web's does. An\n// error is the text fields page's too, which the search page does not name:\n// the ring in the error role, 1dp at rest and 2dp once focused. The ring is a\n// border on a view of its own over the bar rather than a shadow, so the\n// colour and the width ease together and showing it moves nothing.\n//\n// **Disabled is the chrome's, translucent**, on surface at the disabled\n// opacities over whatever the bar sits on, as the text field's box is, rather\n// than mixed over the surface role as web's is.\n//\n// The label is the control's name and is never drawn, since the bar has no\n// place for one: the placeholder is what a person reads.\n\ntype SearchBarProps = {\n /** The field's input, between the magnifier and the clear button. */\n readonly children: ReactNode\n readonly clearLabel: string\n /** The control a press on the bar, or on the clear button, focuses. */\n readonly control: RefObject<ComponentRef<typeof TextInput> | null>\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n /** Empties the field, from the clear button. */\n readonly onClear: () => void\n /** Whether the field holds anything, which shows the clear button. */\n readonly showsClear: boolean\n}\n\ntype SearchFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'returnKeyType'\n | 'role'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the button that clears the field, for a screen reader.\n * Left out, it is \"Clear search\", the English name web's takes from React\n * Aria.\n */\n readonly clearLabel?: string\n /** The value the field opens with, when it keeps its own. */\n readonly defaultValue?: string\n /**\n * A hint shown under the bar. Replaced by `error` when there is one, so the\n * two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the ring in the error role,\n * and the invalid state a screen reader reads all follow from it. The line\n * under the bar arrives with the message, so the field grows when this\n * does, unless it is inside a `Form`, which keeps the line drawn. It wins\n * over what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<ComponentRef<typeof TextInput>>\n /**\n * Draws the field disabled: it takes no focus and no input, and its clear\n * button no press.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Whether the field has to be filled in, which a screen reader reads.\n * Inside a `native` form, an empty one holds the submission back and shows\n * its error once a submission is tried. The bar draws no label, so there\n * is no asterisk to show it.\n * @default false\n */\n readonly isRequired?: boolean\n /**\n * What the field searches, for a screen reader. The bar draws no label, so\n * this is read and never shown; `placeholder` is what is seen.\n */\n readonly label: string\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by.\n */\n readonly name?: string\n /** Called with the new value as it is edited, and with `''` once cleared. */\n readonly onChange?: (value: string) => void\n /** Called once the field is emptied, from its clear button or Escape. */\n readonly onClear?: () => void\n /** Called with the value when the keyboard's search key submits it. */\n readonly onSubmit?: (value: string) => void\n /** The supporting text in the empty bar, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, and returns its problem in words, or several, where\n * there is one, and `true`, `null` or `undefined` where there is none.\n * Under the default `aria` validation the error shows as the value\n * changes; inside a `native` form it shows once a submission is tried, or\n * once the field loses focus after an edit, and holds the form back.\n */\n readonly validate?: (value: string) => ValidationResult\n /** The value, when the call site keeps it. */\n readonly value?: string\n}\n\n// The page's icon, which the magnifier is drawn at.\nconst ICON_SIZE = 24\n\n// The widest the page draws a search bar.\nconst MAX_WIDTH = 720\n\n// The clear button's name when the call site gives none, as React Aria names\n// web's in English.\nconst CLEAR_LABEL = 'Clear search'\n\nconst stylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n bar: {\n alignItems: 'center',\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.pill,\n flexDirection: 'row',\n gap: spacing.lg,\n maxWidth: MAX_WIDTH,\n paddingEnd: spacing.lg,\n paddingStart: spacing.lg + spacing.md,\n },\n barDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends\n // 28dp from the end, where the page's 48dp target puts it.\n clear: {\n marginEnd: spacing.xs,\n },\n // The ring, over the whole bar and its corners. It takes no touches,\n // so a press lands on the bar under it.\n ring: {\n borderRadius: radii.pill,\n bottom: 0,\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n }),\n)\n\n// Empties the field: the value goes, and the call site is told twice over.\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: TextInputProps['onBlur'],\n): TextInputProps['onBlur'] {\n return (event) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Empties the field from its button, and hands focus back to the control, so\n// the next keyword is typed straight in.\nfunction clearFrom(\n onClear: () => void,\n control: RefObject<ComponentRef<typeof TextInput> | null>,\n) {\n return () => {\n onClear()\n control.current?.focus()\n }\n}\n\nfunction clearInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onClear: (() => void) | undefined,\n onEdit: () => void,\n) {\n return () => {\n setOwn('')\n onEdit()\n onChange?.('')\n onClear?.()\n }\n}\n\n// Keeps an edit as the field's own value and reports it, so a field the call\n// site controls is told and one it does not still shows what was typed, and\n// tells the field's validation it was edited.\nfunction editInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onEdit: () => void,\n) {\n return (text: string) => {\n setOwn(text)\n onEdit()\n onChange?.(text)\n }\n}\n\nfunction focusOf(control: RefObject<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\n// Escape empties a field that holds anything, from a hardware keyboard or\n// under React Native Web, as it does web's. The call site's own handler is\n// called after.\nfunction keyInto(\n clear: (() => void) | undefined,\n onKeyPress: TextInputProps['onKeyPress'],\n) {\n return (event: TextInputKeyPressEvent) => {\n if (clear !== undefined && event.nativeEvent.key === 'Escape') {\n clear()\n }\n onKeyPress?.(event)\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n/**\n * The bar around the control: the pill with its state layer and ring, the\n * magnifier at the start and the clear button at the end. A press anywhere on\n * it focuses the control.\n */\nfunction SearchBar({\n children,\n clearLabel,\n control,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n onClear,\n showsClear,\n}: SearchBarProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { colors, radii, sizing, stateLayerOpacity, typography } = theme\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: { borderRadius: radii.pill },\n disabled: isDisabled,\n disableRipple: true,\n })\n const ring = useStrokeMotion(\n isInvalid ? colors.error : colors.primary,\n isDisabled ? 0 : isFocused ? 2 : isInvalid ? 1 : 0,\n )\n\n return (\n <Pressable\n accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n onPressIn={feedback.handlers.onPressIn}\n onPressOut={feedback.handlers.onPressOut}\n style={composeStyles<ViewStyle>(\n styles.bar,\n isDisabled ? styles.barDisabled : undefined,\n minHeightOf(\n sizing.controlLg + typography.bodyLargeLineHeight * (fontScale - 1),\n ),\n )}\n >\n {feedback.layer}\n <FieldStroke\n color={ring.color}\n sides=\"all\"\n style={styles.ring}\n width={ring.width}\n />\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n <SearchGlyph />\n </IconStyleContext>\n <FieldStates\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n {children}\n </FieldStates>\n {showsClear ? (\n <IconButton\n aria-label={clearLabel}\n isDisabled={isDisabled}\n onPress={clearFrom(onClear, control)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n ) : null}\n </Pressable>\n )\n}\n\n/**\n * A search bar: a keyword typed into a pill, submitted with the keyboard's\n * search key and cleared with its button. Pass `value` with `onChange` to\n * control it, or `defaultValue` to let it keep its own; `onSubmit` is handed\n * the value when the search key is pressed, and `onClear` is called when the\n * field is emptied.\n *\n * The bar is the search page's rather than the box the other fields share;\n * the control and the line under it are the field chrome in `src/field`.\n * React Native's own `TextInput` props reach the control; `style` and `ref`\n * are the field as a whole, and `inputRef` the control.\n *\n * ```tsx\n * <SearchField label=\"Label\" placeholder=\"Supporting text\" />\n * ```\n */\nfunction SearchField({\n clearLabel = CLEAR_LABEL,\n defaultValue = '',\n description,\n error,\n inputRef,\n isDisabled = false,\n isRequired = false,\n label,\n name,\n onBlur,\n onChange,\n onClear,\n onFocus,\n onKeyPress,\n onSubmit,\n onSubmitEditing,\n ref,\n style,\n validate,\n value,\n ...props\n}: SearchFieldProps) {\n const id = useId()\n const control = useRef<ComponentRef<typeof TextInput>>(null)\n const [own, setOwn] = useState(defaultValue)\n const current = value ?? own\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: current === '',\n isReadOnly: false,\n isRequired,\n name,\n submitted: current,\n validate,\n value: current,\n })\n const focus = useFieldFocus({\n onBlur: blurThen(validation.onBlur, onBlur),\n onFocus,\n })\n const clear = clearInto(setOwn, onChange, onClear, validation.onEdit)\n const shownError = validation.error\n\n useImperativeHandle<\n ComponentRef<typeof TextInput> | null,\n ComponentRef<typeof TextInput> | null\n >(inputRef, () => control.current, [])\n\n return (\n <View ref={ref} style={style}>\n <SearchBar\n clearLabel={clearLabel}\n control={control}\n isDisabled={isDisabled}\n isFocused={focus.focused}\n isInvalid={shownError !== undefined}\n isRequired={isRequired}\n onClear={clear}\n showsClear={current !== ''}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled}\n onChangeText={editInto(setOwn, onChange, validation.onEdit)}\n onKeyPress={keyInto(\n current === '' || isDisabled ? undefined : clear,\n onKeyPress,\n )}\n onSubmitEditing={submitInto(current, onSubmit, onSubmitEditing)}\n ref={control}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={current}\n />\n </SearchBar>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// Hands the value to `onSubmit` when the keyboard's search key is pressed,\n// and the event to the call site's own handler after.\nfunction submitInto(\n value: string,\n onSubmit: ((value: string) => void) | undefined,\n onSubmitEditing: TextInputProps['onSubmitEditing'],\n) {\n return (event: TextInputSubmitEditingEvent) => {\n onSubmit?.(value)\n onSubmitEditing?.(event)\n }\n}\n\nexport { SearchField }\nexport type { SearchFieldProps }\n"],"mappings":";;;;;;;;;;;;;;AAqLA,MAAM8D,YAAY;AAGlB,MAAMC,YAAY;AAIlB,MAAMC,cAAc;AAEpB,MAAMC,WAAW9B,cAAc,EAAE+B,QAAQC,OAAOC,SAASC,wBACvDtD,WAAWuD,OAAO;CAChBC,KAAK;EACHC,YAAY;EACZC,iBAAiBP,OAAOQ;EACxBC,cAAcR,MAAMS;EACpBC,eAAe;EACfC,KAAKV,QAAQW;EACbC,UAAUjB;EACVkB,YAAYb,QAAQW;EACpBG,cAAcd,QAAQW,KAAKX,QAAQe;CACrC;CACAC,aAAa,EACXX,iBAAiBzC,YACfkC,OAAOmB,WACPhB,kBAAkBiB,iBACpB,EACF;CAGAC,OAAO,EACLC,WAAWpB,QAAQqB,GACrB;CAGAC,MAAM;EACJf,cAAcR,MAAMS;EACpBe,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;AACF,CAAC,CACH;AAIA,SAASC,SACPC,QACAC,MAC0B;CAC1B,QAAQC,UAAU;EAChBF,OAAO;EACPC,OAAOC,KAAK;CACd;AACF;AAIA,SAASC,UACPxD,SACAL,SACA;CACA,aAAa;EACXK,QAAQ;EACRL,QAAQ8D,SAASC,MAAM;CACzB;AACF;AAEA,SAASC,UACPC,QACAlD,UACAV,SACA6D,QACA;CACA,aAAa;EACXD,OAAO,EAAE;EACTC,OAAO;EACPnD,WAAW,EAAE;EACbV,UAAU;CACZ;AACF;AAKA,SAAS8D,SACPF,QACAlD,UACAmD,QACA;CACA,QAAQE,SAAiB;EACvBH,OAAOG,IAAI;EACXF,OAAO;EACPnD,WAAWqD,IAAI;C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AAA,MAAAuD;EAAAvD,EAAA,MAAA8D;CAAA,OAAAA,MAAA9D,EAAA;CAAA,IAAA+D;CAAA,IAAA/D,EAAA,QAAAc,MAAAd,EAAA,QAAA/D,OAAA+D,EAAA,QAAA9D,SAAA8D,EAAA,QAAA6D,OAAA7D,EAAA,QAAA8D,KAAA;EA7BvEC,MAAA,qBAAC,IAAD;GAAW9H;GAAYC;GAAvB,UAAA,CACE2H,KA4BAC,GA7BG;;EA8BE9D,EAAA,MAAAc;EAAAd,EAAA,MAAA/D;EAAA+D,EAAA,MAAA9D;EAAA8D,EAAA,MAAA6D;EAAA7D,EAAA,MAAA8D;EAAA9D,EAAA,MAAA+D;CAAA,OAAAA,MAAA/D,EAAA;CAAA,OA9BP+D;AA8BO;AAMX,SAASJ,WACP7H,OACAC,UACAgH,iBACA;CACA,QAAQrE,UAAuC;EAC7C3C,WAAWD,KAAK;EAChBiH,kBAAkBrE,KAAK;CACzB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","ReactNode","Ref","RefObject","StyleProp","TextInput","TextInputKeyPressEvent","TextInputProps","TextInputSubmitEditingEvent","ViewStyle","use","useId","useImperativeHandle","useRef","useState","Pressable","StyleSheet","useWindowDimensions","View","AutocompleteValue","ValidationResult","IconStyle","AutocompleteContext","describedBy","FieldInput","FieldMessage","FieldStates","FieldStroke","useFieldFocus","useStrokeMotion","useFieldValidation","CloseGlyph","SearchGlyph","IconStyleContext","usePressFeedback","withOpacity","useTheme","composeStyles","themedStyles","IconButton","SearchBarProps","children","clearLabel","control","isDisabled","isFocused","isInvalid","isRequired","onClear","showsClear","SearchFieldProps","Omit","defaultValue","description","error","inputRef","label","name","onChange","value","onSubmit","placeholder","ref","style","validate","ICON_SIZE","MAX_WIDTH","CLEAR_LABEL","stylesOf","colors","radii","spacing","stateLayerOpacity","create","bar","alignItems","backgroundColor","surfaceContainerHigh","borderRadius","pill","flexDirection","gap","lg","maxWidth","paddingEnd","paddingStart","md","barDisabled","onSurface","disabledContainer","clear","marginEnd","xs","ring","bottom","left","pointerEvents","position","right","top","blurThen","onBlur","then","event","clearFrom","current","focus","clearInto","setOwn","onEdit","editInto","text","focusOf","iconStyleOf","color","size","keyInto","onKeyPress","undefined","nativeEvent","key","minHeightOf","minHeight","reportTo","autocomplete","setInputValue","SearchBar","t0","$","_c","theme","styles","fontScale","sizing","typography","t1","t2","corners","disabled","disableRipple","feedback","primary","T0","t3","t4","t5","handlers","onHoverIn","t6","onHoverOut","t7","t8","onPressIn","t9","onPressOut","t10","controlLg","bodyLargeLineHeight","t11","layer","t12","width","t13","onSurfaceVariant","disabledContent","t14","t15","Symbol","for","t16","t17","t18","t19","SearchField","onFocus","onSubmitEditing","props","id","own","inputValue","report","isEmpty","isReadOnly","submitted","validation","shownError","T1","focused","T2","submitInto","t20","t21","t22","t23","_c"],"sources":["../../../src/components/search-field/index.tsx"],"sourcesContent":["import type { ComponentRef, ReactNode, Ref, RefObject } from 'react'\nimport type {\n StyleProp,\n TextInput,\n TextInputKeyPressEvent,\n TextInputProps,\n TextInputSubmitEditingEvent,\n ViewStyle,\n} from 'react-native'\n\nimport { use, useId, useImperativeHandle, useRef, useState } from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ValidationResult } from '../../form'\nimport type { IconStyle } from '../../glyphs/icon-style'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport {\n describedBy,\n FieldInput,\n FieldMessage,\n FieldStates,\n FieldStroke,\n useFieldFocus,\n useStrokeMotion,\n} from '../../field'\nimport { useFieldValidation } from '../../form'\nimport { CloseGlyph, SearchGlyph } from '../../glyphs'\nimport { IconStyleContext } from '../../glyphs/icon-style'\nimport { usePressFeedback } from '../../press'\nimport { withOpacity } from '../../theme/color'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { IconButton } from '../icon-button'\n\n// kanso-ui's SearchField: the search page's search bar on its own, rather\n// than the box the other fields share. A pill on surface container high, the\n// page's 24dp magnifier in on surface variant at the start, the value in body\n// large on surface, and a clear button at the end while the field holds\n// anything. The page's 16dp of padding is to a 48dp tap target and the icon\n// sits 12dp inside that, so the magnifier starts 28dp in and the value 4dp\n// past the target, at 68dp. The clear button is the medium icon button, 40dp\n// around a 24dp icon, 4dp in from the padding, so its icon ends 28dp from the\n// end. The bar follows its own width up to the page's 720dp; the page's 360dp\n// floor is left to the call site, since a phone's width less its margins is\n// under it.\n//\n// The bar is the large control height, 56dp, as web's is, and grows by as\n// much as the value's line does at the device's text size.\n//\n// Under a pointer and while pressed, the bar draws the state layer every\n// control draws through `usePressFeedback`, on surface at the hover and\n// pressed opacities, and a press anywhere on it focuses the control, as a\n// press anywhere on the other fields' boxes does. The page names a focused\n// state and draws nothing for it, so the bar takes the 2dp primary ring the\n// text fields page gives a focused field, inside the pill, as web's does. An\n// error is the text fields page's too, which the search page does not name:\n// the ring in the error role, 1dp at rest and 2dp once focused. The ring is a\n// border on a view of its own over the bar rather than a shadow, so the\n// colour and the width ease together and showing it moves nothing.\n//\n// **Disabled is the chrome's, translucent**, on surface at the disabled\n// opacities over whatever the bar sits on, as the text field's box is, rather\n// than mixed over the surface role as web's is.\n//\n// The label is the control's name and is never drawn, since the bar has no\n// place for one: the placeholder is what a person reads.\n\ntype SearchBarProps = {\n /** The field's input, between the magnifier and the clear button. */\n readonly children: ReactNode\n readonly clearLabel: string\n /** The control a press on the bar, or on the clear button, focuses. */\n readonly control: RefObject<ComponentRef<typeof TextInput> | null>\n readonly isDisabled: boolean\n readonly isFocused: boolean\n readonly isInvalid: boolean\n readonly isRequired: boolean\n /** Empties the field, from the clear button. */\n readonly onClear: () => void\n /** Whether the field holds anything, which shows the clear button. */\n readonly showsClear: boolean\n}\n\ntype SearchFieldProps = Omit<\n TextInputProps,\n | 'accessibilityHint'\n | 'accessibilityLabel'\n | 'aria-disabled'\n | 'aria-label'\n | 'children'\n | 'cursorColor'\n | 'defaultValue'\n | 'editable'\n | 'multiline'\n | 'numberOfLines'\n | 'onChange'\n | 'onChangeText'\n | 'placeholderTextColor'\n | 'readOnly'\n | 'returnKeyType'\n | 'role'\n | 'selectionColor'\n | 'style'\n | 'underlineColorAndroid'\n | 'value'\n> & {\n /**\n * The name of the button that clears the field, for a screen reader.\n * Left out, it is \"Clear search\", the English name web's takes from React\n * Aria.\n */\n readonly clearLabel?: string\n /**\n * The value the field opens with, when it keeps its own. Inside an\n * `Autocomplete` the autocomplete's is read instead.\n */\n readonly defaultValue?: string\n /**\n * A hint shown under the bar. Replaced by `error` when there is one, so the\n * two never stack.\n */\n readonly description?: string\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state: the message, the ring in the error role,\n * and the invalid state a screen reader reads all follow from it. The line\n * under the bar arrives with the message, so the field grows when this\n * does, unless it is inside a `Form`, which keeps the line drawn. It wins\n * over what `validate` and the form say, and holds a `native` form back.\n */\n readonly error?: string\n /**\n * A ref to the field's own `TextInput`, which is what a call site moves\n * focus to. `ref` is the field as a whole.\n */\n readonly inputRef?: Ref<ComponentRef<typeof TextInput>>\n /**\n * Draws the field disabled: it takes no focus and no input, and its clear\n * button no press.\n * @default false\n */\n readonly isDisabled?: boolean\n /**\n * Whether the field has to be filled in, which a screen reader reads.\n * Inside a `native` form, an empty one holds the submission back and shows\n * its error once a submission is tried. The bar draws no label, so there\n * is no asterisk to show it.\n * @default false\n */\n readonly isRequired?: boolean\n /**\n * What the field searches, for a screen reader. The bar draws no label, so\n * this is read and never shown; `placeholder` is what is seen.\n */\n readonly label: string\n /**\n * The name the value is submitted under by the `Form` around the field,\n * and the key its `validationErrors` reach the field by.\n */\n readonly name?: string\n /** Called with the new value as it is edited, and with `''` once cleared. */\n readonly onChange?: (value: string) => void\n /** Called once the field is emptied, from its clear button or Escape. */\n readonly onClear?: () => void\n /** Called with the value when the keyboard's search key submits it. */\n readonly onSubmit?: (value: string) => void\n /** The supporting text in the empty bar, which is what a person reads. */\n readonly placeholder?: string\n readonly ref?: Ref<ComponentRef<typeof View>>\n /** Positions and sizes the field as a whole. */\n readonly style?: StyleProp<ViewStyle>\n /**\n * Checks the value, and returns its problem in words, or several, where\n * there is one, and `true`, `null` or `undefined` where there is none.\n * Under the default `aria` validation the error shows as the value\n * changes; inside a `native` form it shows once a submission is tried, or\n * once the field loses focus after an edit, and holds the form back.\n */\n readonly validate?: (value: string) => ValidationResult\n /**\n * The value, when the call site keeps it. Inside an `Autocomplete` the\n * autocomplete's `inputValue` is read instead.\n */\n readonly value?: string\n}\n\n// The page's icon, which the magnifier is drawn at.\nconst ICON_SIZE = 24\n\n// The widest the page draws a search bar.\nconst MAX_WIDTH = 720\n\n// The clear button's name when the call site gives none, as React Aria names\n// web's in English.\nconst CLEAR_LABEL = 'Clear search'\n\nconst stylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n bar: {\n alignItems: 'center',\n backgroundColor: colors.surfaceContainerHigh,\n borderRadius: radii.pill,\n flexDirection: 'row',\n gap: spacing.lg,\n maxWidth: MAX_WIDTH,\n paddingEnd: spacing.lg,\n paddingStart: spacing.lg + spacing.md,\n },\n barDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n // 4dp in from the padding, so the icon inside the 40dp button ends\n // 28dp from the end, where the page's 48dp target puts it.\n clear: {\n marginEnd: spacing.xs,\n },\n // The ring, over the whole bar and its corners. It takes no touches,\n // so a press lands on the bar under it.\n ring: {\n borderRadius: radii.pill,\n bottom: 0,\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n }),\n)\n\n// Empties the field: the value goes, and the call site is told twice over.\n// The field's own blur handling, then the call site's.\nfunction blurThen(\n onBlur: () => void,\n then: TextInputProps['onBlur'],\n): TextInputProps['onBlur'] {\n return (event) => {\n onBlur()\n then?.(event)\n }\n}\n\n// Empties the field from its button, and hands focus back to the control, so\n// the next keyword is typed straight in.\nfunction clearFrom(\n onClear: () => void,\n control: RefObject<ComponentRef<typeof TextInput> | null>,\n) {\n return () => {\n onClear()\n control.current?.focus()\n }\n}\n\nfunction clearInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onClear: (() => void) | undefined,\n onEdit: () => void,\n) {\n return () => {\n setOwn('')\n onEdit()\n onChange?.('')\n onClear?.()\n }\n}\n\n// Keeps an edit as the field's own value and reports it, so a field the call\n// site controls is told and one it does not still shows what was typed, and\n// tells the field's validation it was edited.\nfunction editInto(\n setOwn: (value: string) => void,\n onChange: ((value: string) => void) | undefined,\n onEdit: () => void,\n) {\n return (text: string) => {\n setOwn(text)\n onEdit()\n onChange?.(text)\n }\n}\n\nfunction focusOf(control: RefObject<ComponentRef<typeof TextInput> | null>) {\n return () => {\n control.current?.focus()\n }\n}\n\nfunction iconStyleOf(color: string): IconStyle {\n return { color, size: ICON_SIZE }\n}\n\n// Escape empties a field that holds anything, from a hardware keyboard or\n// under React Native Web, as it does web's. The call site's own handler is\n// called after.\nfunction keyInto(\n clear: (() => void) | undefined,\n onKeyPress: TextInputProps['onKeyPress'],\n) {\n return (event: TextInputKeyPressEvent) => {\n if (clear !== undefined && event.nativeEvent.key === 'Escape') {\n clear()\n }\n onKeyPress?.(event)\n }\n}\n\nfunction minHeightOf(minHeight: number): ViewStyle {\n return { minHeight }\n}\n\n// Inside an Autocomplete, an edit reaches it as well as the call site, which\n// is what makes the list under the field narrow as it is typed into.\nfunction reportTo(\n autocomplete: AutocompleteValue | null,\n onChange: ((value: string) => void) | undefined,\n) {\n if (autocomplete === null) {\n return onChange\n }\n\n return (value: string) => {\n autocomplete.setInputValue(value)\n onChange?.(value)\n }\n}\n\n/**\n * The bar around the control: the pill with its state layer and ring, the\n * magnifier at the start and the clear button at the end. A press anywhere on\n * it focuses the control.\n */\nfunction SearchBar({\n children,\n clearLabel,\n control,\n isDisabled,\n isFocused,\n isInvalid,\n isRequired,\n onClear,\n showsClear,\n}: SearchBarProps) {\n const theme = useTheme()\n const styles = stylesOf(theme)\n const { fontScale } = useWindowDimensions()\n const { colors, radii, sizing, stateLayerOpacity, typography } = theme\n const feedback = usePressFeedback({\n color: colors.onSurface,\n corners: { borderRadius: radii.pill },\n disabled: isDisabled,\n disableRipple: true,\n })\n const ring = useStrokeMotion(\n isInvalid ? colors.error : colors.primary,\n isDisabled ? 0 : isFocused ? 2 : isInvalid ? 1 : 0,\n )\n\n return (\n <Pressable\n accessible={false}\n disabled={isDisabled}\n focusable={false}\n onHoverIn={feedback.handlers.onHoverIn}\n onHoverOut={feedback.handlers.onHoverOut}\n onPress={focusOf(control)}\n onPressIn={feedback.handlers.onPressIn}\n onPressOut={feedback.handlers.onPressOut}\n style={composeStyles<ViewStyle>(\n styles.bar,\n isDisabled ? styles.barDisabled : undefined,\n minHeightOf(\n sizing.controlLg + typography.bodyLargeLineHeight * (fontScale - 1),\n ),\n )}\n >\n {feedback.layer}\n <FieldStroke\n color={ring.color}\n sides=\"all\"\n style={styles.ring}\n width={ring.width}\n />\n <IconStyleContext\n value={iconStyleOf(\n isDisabled\n ? withOpacity(colors.onSurface, stateLayerOpacity.disabledContent)\n : colors.onSurfaceVariant,\n )}\n >\n <SearchGlyph />\n </IconStyleContext>\n <FieldStates\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n >\n {children}\n </FieldStates>\n {showsClear ? (\n <IconButton\n aria-label={clearLabel}\n isDisabled={isDisabled}\n onPress={clearFrom(onClear, control)}\n style={styles.clear}\n >\n <CloseGlyph />\n </IconButton>\n ) : null}\n </Pressable>\n )\n}\n\n/**\n * A search bar: a keyword typed into a pill, submitted with the keyboard's\n * search key and cleared with its button. Pass `value` with `onChange` to\n * control it, or `defaultValue` to let it keep its own; `onSubmit` is handed\n * the value when the search key is pressed, and `onClear` is called when the\n * field is emptied.\n *\n * The bar is the search page's rather than the box the other fields share;\n * the control and the line under it are the field chrome in `src/field`.\n * React Native's own `TextInput` props reach the control; `style` and `ref`\n * are the field as a whole, and `inputRef` the control. Inside an\n * `Autocomplete`, the field shows what the autocomplete holds and reports\n * each edit to it, which filters the list beside it.\n *\n * ```tsx\n * <SearchField label=\"Label\" placeholder=\"Supporting text\" />\n * ```\n */\nfunction SearchField({\n clearLabel = CLEAR_LABEL,\n defaultValue = '',\n description,\n error,\n inputRef,\n isDisabled = false,\n isRequired = false,\n label,\n name,\n onBlur,\n onChange,\n onClear,\n onFocus,\n onKeyPress,\n onSubmit,\n onSubmitEditing,\n ref,\n style,\n validate,\n value,\n ...props\n}: SearchFieldProps) {\n const id = useId()\n const control = useRef<ComponentRef<typeof TextInput>>(null)\n const autocomplete = use(AutocompleteContext)\n const [own, setOwn] = useState(defaultValue)\n const current = autocomplete?.inputValue ?? value ?? own\n const report = reportTo(autocomplete, onChange)\n const validation = useFieldValidation({\n control,\n error,\n isDisabled,\n isEmpty: current === '',\n isReadOnly: false,\n isRequired,\n name,\n submitted: current,\n validate,\n value: current,\n })\n const focus = useFieldFocus({\n onBlur: blurThen(validation.onBlur, onBlur),\n onFocus,\n })\n const clear = clearInto(setOwn, report, onClear, validation.onEdit)\n const shownError = validation.error\n\n useImperativeHandle<\n ComponentRef<typeof TextInput> | null,\n ComponentRef<typeof TextInput> | null\n >(inputRef, () => control.current, [])\n\n return (\n <View ref={ref} style={style}>\n <SearchBar\n clearLabel={clearLabel}\n control={control}\n isDisabled={isDisabled}\n isFocused={focus.focused}\n isInvalid={shownError !== undefined}\n isRequired={isRequired}\n onClear={clear}\n showsClear={current !== ''}\n >\n <FieldInput\n {...props}\n {...focus.handlers}\n aria-label={label}\n described={describedBy(id, { description, error: shownError })}\n editable={!isDisabled}\n onChangeText={editInto(setOwn, report, validation.onEdit)}\n onKeyPress={keyInto(\n current === '' || isDisabled ? undefined : clear,\n onKeyPress,\n )}\n onSubmitEditing={submitInto(current, onSubmit, onSubmitEditing)}\n ref={control}\n returnKeyType=\"search\"\n role=\"searchbox\"\n value={current}\n />\n </SearchBar>\n <FieldMessage description={description} error={shownError} id={id} />\n </View>\n )\n}\n\n// Hands the value to `onSubmit` when the keyboard's search key is pressed,\n// and the event to the call site's own handler after.\nfunction submitInto(\n value: string,\n onSubmit: ((value: string) => void) | undefined,\n onSubmitEditing: TextInputProps['onSubmitEditing'],\n) {\n return (event: TextInputSubmitEditingEvent) => {\n onSubmit?.(value)\n onSubmitEditing?.(event)\n }\n}\n\nexport { SearchField }\nexport type { SearchFieldProps }\n"],"mappings":";;;;;;;;;;;;;;;AA6LA,MAAMiE,YAAY;AAGlB,MAAMC,YAAY;AAIlB,MAAMC,cAAc;AAEpB,MAAMC,WAAW9B,cAAc,EAAE+B,QAAQC,OAAOC,SAASC,wBACvDxD,WAAWyD,OAAO;CAChBC,KAAK;EACHC,YAAY;EACZC,iBAAiBP,OAAOQ;EACxBC,cAAcR,MAAMS;EACpBC,eAAe;EACfC,KAAKV,QAAQW;EACbC,UAAUjB;EACVkB,YAAYb,QAAQW;EACpBG,cAAcd,QAAQW,KAAKX,QAAQe;CACrC;CACAC,aAAa,EACXX,iBAAiBzC,YACfkC,OAAOmB,WACPhB,kBAAkBiB,iBACpB,EACF;CAGAC,OAAO,EACLC,WAAWpB,QAAQqB,GACrB;CAGAC,MAAM;EACJf,cAAcR,MAAMS;EACpBe,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,OAAO;EACPC,KAAK;CACP;AACF,CAAC,CACH;AAIA,SAASC,SACPC,QACAC,MAC0B;CAC1B,QAAQC,UAAU;EAChBF,OAAO;EACPC,OAAOC,KAAK;CACd;AACF;AAIA,SAASC,UACPxD,SACAL,SACA;CACA,aAAa;EACXK,QAAQ;EACRL,QAAQ8D,SAASC,MAAM;CACzB;AACF;AAEA,SAASC,UACPC,QACAlD,UACAV,SACA6D,QACA;CACA,aAAa;EACXD,OAAO,EAAE;EACTC,OAAO;EACPnD,WAAW,EAAE;EACbV,UAAU;CACZ;AACF;AAKA,SAAS8D,SACPF,QACAlD,UACAmD,QACA;C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,YAAA;EACZO,MAAA,oBAAC,cAAD;GAA2B3I;GAAoBoI,OAAAA;GAAgBR;EAAE,CAAA;EAAIjD,EAAA,MAAA3E;EAAA2E,EAAA,MAAAiD;EAAAjD,EAAA,MAAAyD;EAAAzD,EAAA,MAAAgE;CAAA,OAAAA,MAAAhE,EAAA;CAAA,IAAAiE;CAAA,IAAAjE,EAAA,QAAAc,MAAAd,EAAA,QAAAlE,OAAAkE,EAAA,QAAAjE,SAAAiE,EAAA,QAAA+D,OAAA/D,EAAA,QAAAgE,KAAA;EA7BvEC,MAAA,qBAAC,IAAD;GAAWnI;GAAYC;GAAvB,UAAA,CACEgI,KA4BAC,GA7BG;;EA8BEhE,EAAA,MAAAc;EAAAd,EAAA,MAAAlE;EAAAkE,EAAA,MAAAjE;EAAAiE,EAAA,MAAA+D;EAAA/D,EAAA,MAAAgE;EAAAhE,EAAA,MAAAiE;CAAA,OAAAA,MAAAjE,EAAA;CAAA,OA9BPiE;AA8BO;AAMX,SAASJ,WACPlI,OACAC,UACAmH,iBACA;CACA,QAAQxE,UAAuC;EAC7C3C,WAAWD,KAAK;EAChBoH,kBAAkBxE,KAAK;CACzB;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PressableProps, StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
1
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
2
|
+
import { PressableProps, StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
3
3
|
import { Key } from "react-stately";
|
|
4
4
|
//#region src/components/segmented-button/index.d.ts
|
|
5
5
|
/** A name for the set: its own label, or the id of what labels it. */
|
|
@@ -7,9 +7,9 @@ import { toggleState } from "../../button/index.js";
|
|
|
7
7
|
import { withOpacity } from "../../theme/color.js";
|
|
8
8
|
import { hitSlop, usePressFeedback } from "../../press/index.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
11
10
|
import { Children, Fragment, createContext, isValidElement, use, useLayoutEffect, useRef, useState } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
13
13
|
import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
|
|
14
14
|
import { useToggleGroupState } from "react-stately/useToggleGroupState";
|
|
15
15
|
//#region src/components/segmented-button/index.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { View, ViewProps } from "react-native";
|
|
2
1
|
import { ComponentRef, Ref } from "react";
|
|
2
|
+
import { View, ViewProps } from "react-native";
|
|
3
3
|
//#region src/components/separator/index.d.ts
|
|
4
4
|
type SeparatorInset = 'both' | 'none' | 'start';
|
|
5
5
|
type SeparatorProps = ViewProps & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useTheme } from "../../theme/scope.js";
|
|
2
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { StyleSheet, View } from "react-native";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { StyleSheet, View } from "react-native";
|
|
6
6
|
//#region src/components/separator/index.tsx
|
|
7
7
|
const styles = StyleSheet.create({
|
|
8
8
|
horizontal: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModalOpenProps } from "../../modal/index.js";
|
|
2
|
-
import { HostInstance, ScrollView, ScrollViewProps, StyleProp, TextProps, View, ViewProps, ViewStyle } from "react-native";
|
|
3
2
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
3
|
+
import { HostInstance, ScrollView, ScrollViewProps, StyleProp, TextProps, View, ViewProps, ViewStyle } from "react-native";
|
|
4
4
|
//#region src/components/sheet/index.d.ts
|
|
5
5
|
type SheetBodyProps = ScrollViewProps & {
|
|
6
6
|
readonly ref?: Ref<ComponentRef<typeof ScrollView>>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { useTheme } from "../../theme/scope.js";
|
|
2
2
|
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
3
|
import { useTypeRole } from "../../typography/roles.js";
|
|
4
|
+
import { refsOf } from "../../ref/index.js";
|
|
4
5
|
import { ButtonSlotContext } from "../../button/slots.js";
|
|
5
6
|
import { messagesFor } from "../../i18n/index.js";
|
|
6
7
|
import { usePressFeedback } from "../../press/index.js";
|
|
7
8
|
import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
|
|
8
|
-
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf,
|
|
9
|
+
import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf, useModalState, useModalTrigger } from "../../modal/index.js";
|
|
9
10
|
import { c } from "react/compiler-runtime";
|
|
10
|
-
import { I18nManager, Pressable, ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
|
|
11
11
|
import { createContext, use, useEffect, useId, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { I18nManager, Pressable, ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
|
|
13
14
|
import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
|
|
14
15
|
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
15
16
|
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|