@kanso-labs/react-native-kanso-ui 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/autocomplete/index.js +15 -1
- package/dist/autocomplete/index.js.map +1 -1
- package/dist/badge/index.js +9 -70
- package/dist/badge/index.js.map +1 -1
- package/dist/button/group.d.ts +5 -0
- package/dist/button/group.js +115 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/index.d.ts +4 -1
- package/dist/button/index.js +45 -23
- package/dist/button/index.js.map +1 -1
- package/dist/button/palettes.d.ts +2 -0
- package/dist/button/slots.js +2 -1
- package/dist/button/slots.js.map +1 -1
- package/dist/calendar/index.js +351 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +33 -2
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +5 -0
- package/dist/carousel/arrangement.js +123 -0
- package/dist/carousel/arrangement.js.map +1 -0
- package/dist/chequer/index.js +95 -0
- package/dist/chequer/index.js.map +1 -0
- package/dist/collection/index.d.ts +157 -0
- package/dist/collection/index.js +1331 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color-thumb/index.js +56 -0
- package/dist/color-thumb/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +48 -0
- package/dist/components/badge/index.js +122 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/{badge → components/badge}/styles.js +10 -6
- package/dist/components/badge/styles.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +66 -0
- package/dist/components/breadcrumbs/index.js +285 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -2
- package/dist/components/button/index.js +227 -188
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +87 -0
- package/dist/components/button-group/index.js +275 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +11 -3
- package/dist/components/calendar/index.js +60 -45
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +72 -0
- package/dist/components/carousel/index.js +496 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +7 -1
- package/dist/components/checkbox/index.js +183 -138
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.d.ts +92 -0
- package/dist/components/checkbox-group/index.js +306 -0
- package/dist/components/checkbox-group/index.js.map +1 -0
- package/dist/components/code/index.d.ts +25 -0
- package/dist/components/code/index.js +87 -0
- package/dist/components/code/index.js.map +1 -0
- package/dist/components/color-area/index.d.ts +85 -0
- package/dist/components/color-area/index.js +630 -0
- package/dist/components/color-area/index.js.map +1 -0
- package/dist/components/color-field/index.d.ts +144 -0
- package/dist/components/color-field/index.js +516 -0
- package/dist/components/color-field/index.js.map +1 -0
- package/dist/components/color-picker/index.d.ts +74 -0
- package/dist/components/color-picker/index.js +317 -0
- package/dist/components/color-picker/index.js.map +1 -0
- package/dist/components/color-slider/index.d.ts +82 -0
- package/dist/components/color-slider/index.js +456 -0
- package/dist/components/color-slider/index.js.map +1 -0
- package/dist/components/color-swatch/index.d.ts +46 -0
- package/dist/components/color-swatch/index.js +127 -0
- package/dist/components/color-swatch/index.js.map +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +81 -0
- package/dist/components/color-swatch-picker/index.js +287 -0
- package/dist/components/color-swatch-picker/index.js.map +1 -0
- package/dist/components/color-wheel/index.d.ts +71 -0
- package/dist/components/color-wheel/index.js +407 -0
- package/dist/components/color-wheel/index.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +193 -0
- package/dist/components/combo-box/index.js +616 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/container/index.d.ts +47 -0
- package/dist/components/container/index.js +85 -0
- package/dist/components/container/index.js.map +1 -0
- package/dist/components/date-field/index.d.ts +120 -0
- package/dist/components/date-field/index.js +111 -0
- package/dist/components/date-field/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +130 -0
- package/dist/components/date-picker/index.js +310 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/date-range-picker/index.d.ts +139 -0
- package/dist/components/date-range-picker/index.js +421 -0
- package/dist/components/date-range-picker/index.js.map +1 -0
- package/dist/components/disclosure/index.d.ts +94 -0
- package/dist/components/disclosure/index.js +365 -0
- package/dist/components/disclosure/index.js.map +1 -0
- package/dist/components/disclosure-group/index.d.ts +61 -0
- package/dist/components/disclosure-group/index.js +100 -0
- package/dist/components/disclosure-group/index.js.map +1 -0
- package/dist/components/drop-zone/index.d.ts +113 -0
- package/dist/components/drop-zone/index.js +304 -0
- package/dist/components/drop-zone/index.js.map +1 -0
- package/dist/components/fab/index.d.ts +80 -0
- package/dist/components/fab/index.js +246 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/fab-menu/index.d.ts +120 -0
- package/dist/components/fab-menu/index.js +640 -0
- package/dist/components/fab-menu/index.js.map +1 -0
- package/dist/components/feed/index.d.ts +57 -0
- package/dist/components/feed/index.js +167 -0
- package/dist/components/feed/index.js.map +1 -0
- package/dist/components/form/index.d.ts +3 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +4 -2
- package/dist/components/icon-button/index.js +204 -171
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/keycap/index.d.ts +27 -0
- package/dist/components/keycap/index.js +136 -0
- package/dist/components/keycap/index.js.map +1 -0
- package/dist/components/list/index.d.ts +15 -158
- package/dist/components/list/index.js +21 -1047
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +73 -0
- package/dist/components/list-box/index.js +82 -0
- package/dist/components/list-box/index.js.map +1 -0
- package/dist/components/loading-indicator/index.d.ts +32 -0
- package/dist/components/loading-indicator/index.js +174 -0
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/components/menu/index.js +1 -1
- package/dist/components/navigation-tree/index.d.ts +117 -0
- package/dist/components/navigation-tree/index.js +135 -0
- package/dist/components/navigation-tree/index.js.map +1 -0
- package/dist/components/number-field/index.js +132 -143
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +69 -0
- package/dist/components/range-calendar/index.js +144 -0
- package/dist/components/range-calendar/index.js.map +1 -0
- package/dist/components/search-view/index.d.ts +78 -0
- package/dist/components/search-view/index.js +570 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/select/index.d.ts +152 -0
- package/dist/components/select/index.js +419 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +3 -2
- package/dist/components/separator/index.js +29 -26
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +111 -0
- package/dist/components/slider/index.js +673 -0
- package/dist/components/slider/index.js.map +1 -0
- package/dist/components/split-button/index.d.ts +77 -0
- package/dist/components/split-button/index.js +354 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/supporting-pane/index.d.ts +44 -0
- package/dist/components/supporting-pane/index.js +109 -0
- package/dist/components/supporting-pane/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +196 -0
- package/dist/components/tabs/index.js +1137 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/text/index.js +49 -21
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +145 -0
- package/dist/components/text-area/index.js +231 -0
- package/dist/components/text-area/index.js.map +1 -0
- package/dist/components/time-field/index.d.ts +43 -0
- package/dist/components/time-field/index.js +107 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +65 -0
- package/dist/components/time-picker/index.js +1168 -0
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/components/toolbar/index.d.ts +53 -0
- package/dist/components/toolbar/index.js +185 -0
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +101 -0
- package/dist/components/tooltip/index.js +223 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tree/index.d.ts +112 -0
- package/dist/components/tree/index.js +157 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/control/group.js +23 -0
- package/dist/control/group.js.map +1 -0
- package/dist/disclosure/chevron.js +75 -0
- package/dist/disclosure/chevron.js.map +1 -0
- package/dist/disclosure/index.js +7 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drop/index.d.ts +54 -0
- package/dist/drop/index.js +161 -0
- package/dist/drop/index.js.map +1 -0
- package/dist/fab/index.d.ts +19 -0
- package/dist/fab/index.js +147 -0
- package/dist/fab/index.js.map +1 -0
- package/dist/field/chevron.js +74 -0
- package/dist/field/chevron.js.map +1 -0
- package/dist/field/index.d.ts +2 -1
- package/dist/field/index.js +350 -153
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +27 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/files/index.d.ts +18 -0
- package/dist/files/index.js +107 -0
- package/dist/files/index.js.map +1 -0
- package/dist/form/index.d.ts +6 -4
- package/dist/form/index.js +64 -85
- package/dist/form/index.js.map +1 -1
- package/dist/glyphs/index.js +92 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +20 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +1394 -34
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +51 -6
- package/dist/index.js +47 -4
- package/dist/indicator/paths.js +23 -1
- package/dist/indicator/paths.js.map +1 -1
- package/dist/modal/index.js +96 -68
- package/dist/modal/index.js.map +1 -1
- package/dist/navigation/index.js +8 -5
- package/dist/navigation/index.js.map +1 -1
- package/dist/number/keyboard.js +16 -0
- package/dist/number/keyboard.js.map +1 -0
- package/dist/overlay/anchored.js +68 -38
- package/dist/overlay/anchored.js.map +1 -1
- package/dist/overlay/keyboard.js +57 -0
- package/dist/overlay/keyboard.js.map +1 -0
- package/dist/overlay/panel.js +173 -19
- package/dist/overlay/panel.js.map +1 -1
- package/dist/overlay/placement.js +16 -2
- package/dist/overlay/placement.js.map +1 -1
- package/dist/picker/index.js +322 -0
- package/dist/picker/index.js.map +1 -0
- package/dist/press/index.d.ts +2 -0
- package/dist/press/index.js +102 -100
- package/dist/press/index.js.map +1 -1
- package/dist/row/index.js +77 -69
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +13 -2
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/field.js +277 -0
- package/dist/segments/field.js.map +1 -0
- package/dist/segments/index.js +574 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/segments/styles.js +24 -0
- package/dist/segments/styles.js.map +1 -0
- package/dist/separator/index.js +7 -0
- package/dist/separator/index.js.map +1 -0
- package/dist/slider/index.js +145 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/swatch/index.js +56 -0
- package/dist/swatch/index.js.map +1 -0
- package/dist/typography/size.js +14 -0
- package/dist/typography/size.js.map +1 -0
- package/package.json +11 -2
- package/dist/badge/styles.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","AccessibilityActionEvent","ColorValue","GestureResponderEvent","HostInstance","ListRenderItemInfo","PressableProps","ScrollViewProps","StyleProp","TextStyle","ViewStyle","Key","Node","Selection","SelectionMode","ListState","ListProps","StatelyListProps","Children","createContext","use","useEffect","useMemo","useRef","AccessibilityInfo","FlatList","Text","NativeText","Platform","Pressable","StyleSheet","View","useListState","AutocompleteValue","ResolvedTheme","AutocompleteContext","toggleState","CheckboxBox","resultsFor","useLocaleOf","useMessages","hitSlop","usePressFeedback","hasContent","RowContent","rowContentColor","rowStyleOf","rowStyles","useTheme","composeStyles","themedStyles","useTypeRole","ProgressIndicator","BOX_SLOT","LOADING_DIAMETER","LOAD_OFFSET","IDLE","ListLoadMoreProps","styles","create","box","alignItems","height","justifyContent","width","idle","status","overflow","pointerEvents","position","stylesOf","colors","sizing","spacing","content","paddingVertical","sm","empty","color","onSurfaceVariant","header","paddingBottom","xxs","paddingHorizontal","lg","paddingTop","lead","flexDirection","gap","list","backgroundColor","surface","loading","minHeight","rowSm","onSurface","ListEntry","kind","node","isLoading","label","onLoadMore","scrollOffset","style","testID","Omit","children","item","T","defaultSelectedKeys","Iterable","disabledKeys","disallowEmptySelection","items","onAction","key","onSelectionChange","keys","ref","renderEmptyState","selectedKeys","selectionMode","selectLabel","ListRowProps","id","isDisabled","leading","overline","supporting","textValue","trailing","ListSectionProps","ListValue","ground","loadMore","state","ListContext","List","t0","$","_c","contentContainerStyle","keyboardShouldPersistTaps","props","t1","t2","undefined","emptyState","theme","own","autocomplete","matches","t3","filterOf","filter","t4","t5","t6","entriesOf","entries","loader","rows","sticky","listStyle","messages","t7","flatten","t8","select","t9","value","T0","T1","t10","t11","t12","EmptyState","t13","LoaderRow","t14","loadMoreOf","t15","t16","keyOf","renderEntry","t17","t18","ListLoadMore","_props","getCollectionNode","hasChildNodes","rendered","type","ListRow","ListSection","forEach","child","push","childNodes","element","EmptyRow","headline","noResults","useList","collection","length","getChildren","row","nodes","keptOf","kept","some","String","ListRowNode","onBlur","onFocus","onHoverIn","onHoverOut","onLongPress","onPress","onPressIn","onPressOut","_id","_isDisabled","_textValue","selectionManager","action","acts","checks","disabled","selectable","selected","canSelectItem","isSelected","listAction","isEmpty","feedback","withBox","lines","Symbol","for","bb0","rowStyle","accessibilityActions","name","onAccessibilityAction","selectionActionOf","handlers","pressThen","noop","ring","layer","loadingMore","useLoadingAnnouncement","then","event","ResultsStatus","count","locale","message","useResultsAnnouncement","OS","SectionHeader","title","SelectBox","drawn","nativeEvent","actionName","Error","was","current","announceForAccessibility","Item","LoadMore","Section","_c","NativeText"],"sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react'\nimport type {\n AccessibilityActionEvent,\n ColorValue,\n GestureResponderEvent,\n HostInstance,\n ListRenderItemInfo,\n PressableProps,\n ScrollViewProps,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { Key, Node, Selection, SelectionMode } from 'react-stately'\nimport type {\n ListState,\n ListProps as StatelyListProps,\n} from 'react-stately/useListState'\n\nimport { Children, createContext, use, useEffect, useMemo, useRef } from 'react'\nimport {\n AccessibilityInfo,\n FlatList,\n Text as NativeText,\n Platform,\n Pressable,\n StyleSheet,\n View,\n} from 'react-native'\nimport { useListState } from 'react-stately/useListState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { toggleState } from '../../button'\nimport { CheckboxBox } from '../../control/checkbox-box'\nimport { resultsFor } from '../../i18n'\nimport { useLocaleOf, useMessages } from '../../i18n/provider'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport {\n hasContent,\n RowContent,\n rowContentColor,\n rowStyleOf,\n rowStyles,\n} from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { ProgressIndicator } from '../progress-indicator'\n\n// kanso-ui's List, from the lists page: a column of the rows ListItem draws,\n// shared through src/row, with selection, an action per row, sections and a\n// row that loads more. It is a `FlatList`, so a long list draws the rows in\n// view and a few screens either side rather than every row it holds.\n//\n// Four things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader.** Web's row is a grid row whose\n// checkbox is a cell a keyboard reaches on its own. VoiceOver and TalkBack\n// read a pressable row as one element and reach nothing inside it, so the\n// row is a button that reports whether it is selected, and selecting it is an\n// accessibility action named by `selectLabel`, which is what web's checkbox\n// is named by. The checkbox is drawn for the eye and hidden from the reader.\n// Under React Native Web the row reports itself pressed instead, as a toggle\n// button does, since a button cannot be selected there.\n//\n// **A press does what React Aria's touch press does.** On a row that selects\n// and has no action, a press selects it. On one with an action, a press runs\n// the action while nothing is selected and selects once something is, and a\n// long press selects; a press on the checkbox selects either way.\n//\n// **Sections are flattened, with sticky headers.** A `FlatList` holds one\n// column of cells, so a section is its header, which stays at the top while\n// its rows scroll under it, and then its rows. The header is a heading to a\n// screen reader rather than the name of a group.\n//\n// **The list is drawn on surface,** the lists page's container colour, which\n// web leaves to the page. A sticky header needs a ground to cover the rows\n// scrolling under it, and it takes the list's, so a `style` giving the list\n// another background gives its headers the same one.\n\n// A checkbox drawn in a row sits in a slot an icon's size, the lists page's\n// 24dp, rather than in the 40dp state layer Checkbox draws it in.\nconst BOX_SLOT = 24\n\n// The ring the loading row draws, a row's icon across.\nconst LOADING_DIAMETER = '24px'\n\n// How far past the visible end of the list `onLoadMore` is called, as a\n// share of the list's visible height, as web's `scrollOffset` defaults.\nconst LOAD_OFFSET = 1\n\n// What the loading row reads when the list has no `List.LoadMore`, which\n// leaves it nothing to draw.\nconst IDLE: ListLoadMoreProps = {}\n\nconst styles = StyleSheet.create({\n box: {\n alignItems: 'center',\n height: BOX_SLOT,\n justifyContent: 'center',\n width: BOX_SLOT,\n },\n // What `List.LoadMore` leaves while nothing is loading: the live region,\n // with nothing in it and no height.\n idle: {\n height: 0,\n },\n // The count a search leaves, which a screen reader hears and no one sees:\n // out of the flow, and a point across, as web's visually hidden status is.\n status: {\n height: 1,\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n width: 1,\n },\n})\n\nconst stylesOf = themedStyles(({ colors, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The 8dp above the first row and below the last, as web's container\n // draws them.\n content: {\n paddingVertical: spacing.sm,\n },\n empty: {\n color: colors.onSurfaceVariant,\n },\n // The lists page's subhead: title small in on surface variant, at the\n // row's inline padding so it lines up with the headlines under it, with\n // more room above than below so it reads as belonging to what follows.\n header: {\n color: colors.onSurfaceVariant,\n paddingBottom: spacing.xxs,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.lg,\n },\n // The checkbox beside whatever the row's leading slot was given, a\n // row's own gap apart.\n lead: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.lg,\n },\n list: {\n backgroundColor: colors.surface,\n },\n // A row's height for the ring, so the list does not jump when the next\n // items land.\n loading: {\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: sizing.rowSm,\n },\n // Never seen, but in a pair that reads, for a checker that looks.\n status: {\n color: colors.onSurface,\n },\n }),\n)\n\n/** One cell of the `FlatList`: a section's header, or a row. */\ntype ListEntry = {\n readonly kind: 'header' | 'item'\n readonly node: Node<unknown>\n}\n\ntype ListLoadMoreProps = {\n /**\n * Draws the ring in a row of its own while more items are being fetched.\n * @default false\n */\n readonly isLoading?: boolean\n /**\n * What a screen reader calls the ring, and hears as it appears. Left out,\n * it is the word for it in the `I18nProvider`'s language, or the device's\n * outside one, \"Loading more\" in English.\n */\n readonly label?: string\n /**\n * Called when the end of the list comes within `scrollOffset` of its\n * visible end, while nothing is loading. Called once for each length the\n * list reaches, so a load that adds nothing does not start another.\n */\n readonly onLoadMore?: () => void\n /**\n * How far past the visible end of the list the next items are asked for,\n * as a share of the list's visible height.\n * @default 1\n */\n readonly scrollOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype ListProps<T extends object = object> = Omit<\n ScrollViewProps,\n 'children' | 'role' | 'stickyHeaderIndices' | 'style'\n> & {\n /**\n * The rows, each a `List.Item`, `List.Section` or `List.LoadMore`. With\n * `items`, a function from an item to its part, called for each item in\n * turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The keys selected at first, when the list keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /** The keys of the rows drawn disabled, which take no presses. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected row selected, so a press on it changes nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** The entries `children` draws a part for, when it is a function. */\n readonly items?: Iterable<T>\n /**\n * Called with a row's key when a press runs its action. A row's own\n * `onAction` takes its place for that row.\n */\n readonly onAction?: (key: Key) => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n readonly ref?: Ref<FlatList>\n /**\n * What the list shows when it has no rows and nothing is loading. Left\n * out, it is a muted row saying \"No results\" in the `I18nProvider`'s\n * language, or the device's outside one, so the list keeps a row's height.\n */\n readonly renderEmptyState?: () => ReactNode\n /**\n * The selected keys, for a call site holding the selection itself with\n * `onSelectionChange`.\n */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether rows can be selected: one at a time, several, or none. A list\n * that selects draws a checkbox on every row.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * What selecting a row is called, for a screen reader: the accessibility\n * action each selectable row offers, which is what its checkbox does. The\n * row's own text is what names the row. Left out, it is the word for it in\n * the `I18nProvider`'s language, or the device's outside one, \"Select\" in\n * English.\n */\n readonly selectLabel?: string\n readonly style?: StyleProp<ViewStyle>\n}\n\n// `Row` rather than `Item`, though the part is `List.Item`, for the reason\n// web gives: `ListItemProps` is the standalone ListItem's, and both are\n// exported from the package.\ntype ListRowProps = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /** The row's headline, the one thing it is mostly about. */\n readonly children?: ReactNode\n /** The key the row is selected and reported by. Give one to every row. */\n readonly id?: Key\n /**\n * Draws the row disabled, and takes no presses on it, as a key in the\n * list's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /** Content before the headline: an avatar, an icon. */\n readonly leading?: ReactNode\n /**\n * Called when a press runs the row's action, in place of the list's\n * `onAction` for this row.\n */\n readonly onAction?: () => void\n /**\n * A line above the headline, in label small and the muted role. Given\n * beside `supporting`, it makes the row the three-line item.\n */\n readonly overline?: ReactNode\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /** A second line under the headline, in body medium and the muted role. */\n readonly supporting?: ReactNode\n /**\n * The row's text, read off `children` when they are a plain string, so a\n * row whose headline is an element passes it.\n */\n readonly textValue?: string\n /** Content after the headline, such as an amount or a control. */\n readonly trailing?: ReactNode\n}\n\ntype ListSectionProps = {\n /** The rows in the section. */\n readonly children?: ReactNode\n /**\n * The section's heading, which stays at the top of the list while the\n * section's rows scroll under it. A section without one is its rows alone.\n */\n readonly header?: ReactNode\n readonly id?: Key\n}\n\n// What the cells of the `FlatList` read from the list they are drawn in.\ntype ListValue = {\n /** The ground a sticky header covers the rows under it with. */\n readonly ground: ColorValue\n /** The `List.LoadMore` the list ends in, if it has one. */\n readonly loadMore: ListLoadMoreProps | undefined\n readonly onAction: ((key: Key) => void) | undefined\n readonly renderEmptyState: () => ReactNode\n readonly selectLabel: string\n readonly state: ListState<unknown>\n}\n\nconst ListContext = createContext<ListValue | null>(null)\n\n/**\n * A list of rows, one or more of which can be selected. Selection is React\n * Stately's, as web's is React Aria's: set `selectionMode` to `single` or\n * `multiple`, and pass `selectedKeys` with `onSelectionChange` to control\n * it or `defaultSelectedKeys` to let it keep its own. A list whose rows do\n * something takes `onAction`, or an `onAction` on each row.\n *\n * ```tsx\n * <List aria-label=\"Label\" selectionMode=\"multiple\">\n * <List.Item id=\"first\" supporting=\"Supporting line\">First item</List.Item>\n * </List>\n * ```\n *\n * ListItem is the row on its own; this is the collection that draws the\n * same row and adds selection, sections and a row that loads more. Composed\n * from parts, `List.Item`, `List.Section` and `List.LoadMore`, which the\n * list draws from their props, so none of them renders anything on its\n * own. Name the list with `aria-label`. It scrolls by itself, so it wants a\n * height to fill: a short list on a page that scrolls takes\n * `scrollEnabled={false}` and is laid out at its full length. `style` and\n * `ref` land on the `FlatList`.\n *\n * Inside an `Autocomplete`, the list shows the rows the search keeps and\n * says how many there are to a screen reader, and a tap on a row reaches it\n * while the keyboard is up.\n */\nfunction List<T extends object = object>({\n children,\n contentContainerStyle,\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n keyboardShouldPersistTaps,\n onAction,\n onSelectionChange,\n ref,\n renderEmptyState = emptyState,\n selectedKeys,\n selectionMode = 'none',\n selectLabel,\n style,\n ...props\n}: ListProps<T>) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const autocomplete = use(AutocompleteContext)\n const matches = autocomplete?.matches\n const filter = useMemo(\n () => (matches === undefined ? undefined : filterOf<T>(matches)),\n [matches],\n )\n const state = useListState<T>({\n // Each part builds its own entry in the collection; see the parts'\n // `getCollectionNode`. The collection skips what is not an element, as a\n // ReactNode may be, and asks any element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as StatelyListProps<T>['children'],\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n filter,\n items,\n onSelectionChange,\n selectedKeys,\n selectionMode,\n })\n const { entries, loader, rows, sticky } = useMemo(\n () => entriesOf(state),\n [state],\n )\n const listStyle = composeStyles<ViewStyle>(own.list, style)\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const loadMore: ListLoadMoreProps | undefined = loader?.props\n const isLoading = loadMore?.isLoading ?? false\n const messages = useMessages()\n // The list's own ground unless `style` gives it another.\n const ground =\n StyleSheet.flatten(style)?.backgroundColor ?? theme.colors.surface\n const value = useMemo<ListValue>(\n () => ({\n ground,\n loadMore,\n onAction,\n renderEmptyState,\n selectLabel: selectLabel ?? messages.select,\n state,\n }),\n [\n ground,\n loadMore,\n messages,\n onAction,\n renderEmptyState,\n selectLabel,\n state,\n ],\n )\n\n return (\n <ListContext value={value}>\n <FlatList\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n own.content,\n contentContainerStyle,\n )}\n data={entries}\n keyboardShouldPersistTaps={\n keyboardShouldPersistTaps ??\n (autocomplete === null ? undefined : 'handled')\n }\n keyExtractor={keyOf}\n ListEmptyComponent={isLoading ? undefined : EmptyState}\n ListFooterComponent={loadMore === undefined ? undefined : LoaderRow}\n onEndReached={loadMore === undefined ? undefined : loadMoreOf(loadMore)}\n onEndReachedThreshold={loadMore?.scrollOffset ?? LOAD_OFFSET}\n ref={ref}\n renderItem={renderEntry}\n stickyHeaderIndices={sticky}\n style={listStyle}\n />\n {autocomplete === null ? null : <ResultsStatus count={rows} />}\n </ListContext>\n )\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * as the reader nears the end of the list, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It\n * goes last, after the rows it loads more of.\n */\nfunction ListLoadMore(_props: ListLoadMoreProps): null {\n return null\n}\n\nListLoadMore.getCollectionNode = function* getCollectionNode(\n props: ListLoadMoreProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'loader' }\n}\n\n/**\n * One row. Its slots are ListItem's: `leading`, the headline as children,\n * `overline` above it, `supporting` under it, and `trailing`. Give every\n * row an `id`, which is the key selection is reported by. A list that\n * selects draws a checkbox before whatever `leading` holds.\n *\n * The list draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction ListRow(_props: ListRowProps): null {\n return null\n}\n\n// The entry the collection holds for a row, as React Stately's own `Item`\n// gives one: keyed by the row's `id`, and carrying the props it is drawn\n// from.\nListRow.getCollectionNode = function* getCollectionNode(props: ListRowProps) {\n yield {\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'item',\n }\n}\n\n/**\n * A group of rows under a heading, which stays at the top of the list while\n * the group's rows scroll under it.\n */\nfunction ListSection(_props: ListSectionProps): null {\n return null\n}\n\nListSection.getCollectionNode = function* getCollectionNode(\n props: ListSectionProps,\n) {\n const children: ReactNode[] = []\n\n // Walked as React Stately's own Section walks them, which leaves each\n // child its own key rather than the one `Children.toArray` gives it.\n Children.forEach(props.children, (child) => {\n if (child !== null && child !== undefined && child !== false) {\n children.push(child)\n }\n })\n\n yield {\n *childNodes() {\n for (const element of children) {\n yield { element }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n rendered: props.header,\n type: 'section',\n }\n}\n\n/**\n * The muted row a list shows when nothing is in it: a row's box and\n * headline in on surface variant, with no press of its own.\n */\nfunction EmptyRow() {\n const theme = useTheme()\n const own = stylesOf(theme)\n const headline = useTypeRole('bodyLarge')\n const messages = useMessages()\n\n return (\n <View style={rowStyleOf(theme, {})}>\n <NativeText style={composeStyles<TextStyle>(headline, own.empty)}>\n {messages.noResults}\n </NativeText>\n </View>\n )\n}\n\n// What the list shows when nothing is in it.\nfunction emptyState() {\n return <EmptyRow />\n}\n\n// The list's empty state, as the component `ListEmptyComponent` takes.\nfunction EmptyState() {\n return <>{useList().renderEmptyState()}</>\n}\n\n/**\n * The cells the `FlatList` draws, in order, where the headers among them\n * are, and how many rows there are: the rows outside any section, and each\n * section's header followed by its rows. The row that loads more is drawn\n * after them all.\n */\nfunction entriesOf<T>(state: ListState<T>) {\n const entries: ListEntry[] = []\n const sticky: number[] = []\n let loader: Node<T> | undefined\n let rows = 0\n\n for (const node of state.collection) {\n if (node.type === 'loader') {\n loader = node\n } else if (node.type === 'section') {\n if (hasContent(node.rendered)) {\n sticky.push(entries.length)\n entries.push({ kind: 'header', node })\n }\n const children =\n state.collection.getChildren?.(node.key) ??\n // oxlint-disable-next-line typescript/no-deprecated -- a fallback for a collection without getChildren\n node.childNodes\n for (const row of children) {\n entries.push({ kind: 'item', node: row })\n rows++\n }\n } else {\n entries.push({ kind: 'item', node })\n rows++\n }\n }\n\n return { entries, loader, rows, sticky }\n}\n\n/**\n * What a list inside an Autocomplete builds its collection from: the rows\n * the search keeps, each section with a row left in it, and the row that\n * loads more. Each node is copied rather than handed on, as React Stately's\n * ComboBox copies its own, since a collection numbers the nodes it holds.\n */\nfunction filterOf<T>(matches: AutocompleteValue['matches']) {\n return (nodes: Iterable<Node<T>>) => keptOf(nodes, matches)\n}\n\nfunction keptOf<T>(\n nodes: Iterable<Node<T>>,\n matches: AutocompleteValue['matches'],\n): Node<T>[] {\n const kept: Node<T>[] = []\n\n for (const node of nodes) {\n if (node.type === 'section') {\n // oxlint-disable-next-line typescript/no-deprecated -- a filter is handed the nodes before a collection holds them, so there is none to ask\n const rows = keptOf(node.childNodes, matches)\n\n if (rows.some((row) => row.type === 'item')) {\n // oxlint-disable-next-line typescript/no-deprecated -- the field the collection reads a section's rows from\n kept.push({ ...node, childNodes: rows })\n }\n } else if (node.type !== 'item' || matches(node.textValue, node)) {\n kept.push({ ...node })\n }\n }\n\n return kept\n}\n\n// A cell's key in the `FlatList`: a header's and a row's apart, since a\n// section's header carries the section's key.\nfunction keyOf({ kind, node }: ListEntry) {\n return `${kind}:${String(node.key)}`\n}\n\n/**\n * A row: the state layer, the ripple and the focus ring over the checkbox,\n * the leading slot, the lines and the trailing slot, on primary container\n * while selected. A row with nothing to do on a press, in a list that\n * neither selects nor acts, is a `View` that only presents.\n */\nfunction ListRowNode({ node }: { readonly node: Node<unknown> }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const list = useList()\n\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its row was written with, which React Stately types as `any`\n const {\n children,\n id: _id,\n isDisabled: _isDisabled,\n leading,\n onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n overline,\n ref,\n style,\n supporting,\n textValue: _textValue,\n trailing,\n ...props\n }: ListRowProps = node.props\n const { selectionManager } = list.state\n const { key } = node\n // The selection manager reads a row's own `isDisabled` off its entry,\n // beside the list's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(key)\n const checks = selectionManager.selectionMode !== 'none'\n const selectable = selectionManager.canSelectItem(key)\n const selected = checks && selectionManager.isSelected(key)\n const listAction = list.onAction\n const action =\n onAction ??\n (listAction === undefined\n ? undefined\n : () => {\n listAction(key)\n })\n // React Aria's rule for a touch press on a row that selects with a\n // checkbox: the action while nothing is selected, the selection after.\n const acts = action !== undefined && (!selectable || selectionManager.isEmpty)\n const select = () => {\n selectionManager.select(key)\n }\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: selected,\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n\n const lead = checks\n ? withBox(\n <SelectBox\n isDisabled={disabled}\n isSelected={selected}\n onPress={acts && selectable ? select : undefined}\n />,\n leading,\n own.lead,\n )\n : leading\n const lines = (\n <RowContent\n isDisabled={disabled}\n isSelected={selected}\n leading={lead}\n overline={overline}\n supporting={supporting}\n trailing={trailing}\n >\n {children}\n </RowContent>\n )\n const rowStyle = rowStyleOf(theme, {\n isSelected: selected,\n overline,\n supporting,\n })\n\n if (!checks && action === undefined && onPress === undefined) {\n return (\n <View\n aria-disabled={disabled || undefined}\n ref={ref}\n style={composeStyles<ViewStyle>(rowStyle, style)}\n testID={props.testID}\n >\n {lines}\n </View>\n )\n }\n\n return (\n <Pressable\n role=\"button\"\n {...props}\n {...(checks ? toggleState(selected) : undefined)}\n {...(selectable\n ? {\n accessibilityActions: [{ label: list.selectLabel, name: 'select' }],\n onAccessibilityAction: selectionActionOf(select),\n }\n : undefined)}\n {...feedback.handlers}\n disabled={disabled}\n onLongPress={\n action !== undefined && selectable\n ? pressThen(onLongPress, select)\n : onLongPress\n }\n onPress={pressThen(onPress, acts ? action : selectable ? select : noop)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n rowStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n {lines}\n </Pressable>\n )\n}\n\n/**\n * The row `List.LoadMore` draws: a live region, empty while idle and\n * holding the ring while loading. Android and React Native Web say what\n * arrives in it; iOS has no live regions, so the ring's name is said there\n * as it appears.\n */\nfunction LoaderRow() {\n const own = stylesOf(useTheme())\n const { isLoading = false, label, style, testID } = useList().loadMore ?? IDLE\n const messages = useMessages()\n const name = label ?? messages.loadingMore\n\n useLoadingAnnouncement(isLoading, name)\n\n return (\n <View\n aria-live=\"polite\"\n style={composeStyles<ViewStyle>(\n isLoading ? own.loading : styles.idle,\n style,\n )}\n testID={testID}\n >\n {isLoading ? (\n <ProgressIndicator\n aria-label={name}\n diameter={LOADING_DIAMETER}\n isIndeterminate\n variant=\"circular\"\n />\n ) : null}\n </View>\n )\n}\n\n// Asks for more as the reader nears the end, unless a load is under way.\nfunction loadMoreOf({ isLoading = false, onLoadMore }: ListLoadMoreProps) {\n return () => {\n if (!isLoading) {\n onLoadMore?.()\n }\n }\n}\n\nfunction noop() {\n // A press on a row with nothing to do runs the call site's `onPress` alone.\n}\n\n/**\n * The press handler of a row: the call site's own handler, then the row's.\n * Built by a call rather than written inline at the prop, which is what\n * react-perf's no-new-function-as-prop is after.\n */\nfunction pressThen(\n onPress: PressableProps['onPress'],\n then: (() => void) | undefined,\n) {\n return (event: GestureResponderEvent) => {\n onPress?.(event)\n then?.()\n }\n}\n\n// One cell, drawn as the part it came from.\nfunction renderEntry({ item }: ListRenderItemInfo<ListEntry>) {\n return item.kind === 'header' ? (\n <SectionHeader node={item.node} />\n ) : (\n <ListRowNode node={item.node} />\n )\n}\n\n/**\n * How many rows a search leaves, said to a screen reader as it changes and\n * never drawn: in a polite live region on Android and under React Native\n * Web, and through `AccessibilityInfo` on iOS, which has no live regions,\n * so nothing is drawn there at all.\n */\nfunction ResultsStatus({ count }: { readonly count: number }) {\n const own = stylesOf(useTheme())\n const locale = useLocaleOf(undefined)\n const message = resultsFor(count, locale)\n\n useResultsAnnouncement(message)\n\n if (Platform.OS === 'ios') {\n return null\n }\n\n return (\n <View aria-live=\"polite\" style={styles.status}>\n <NativeText style={own.status}>{message}</NativeText>\n </View>\n )\n}\n\n/** A section's heading, on the list's ground so the rows pass under it. */\nfunction SectionHeader({ node }: { readonly node: Node<unknown> }) {\n const own = stylesOf(useTheme())\n const title = useTypeRole('titleSmall')\n const { ground } = useList()\n\n return (\n <View style={composeStyles<ViewStyle>({ backgroundColor: ground })}>\n <NativeText\n role=\"heading\"\n style={composeStyles<TextStyle>(title, own.header)}\n >\n {node.rendered}\n </NativeText>\n </View>\n )\n}\n\n/**\n * The checkbox a selecting row draws, for the eye alone: the row is what a\n * screen reader hears and presses. On a row whose press runs an action, a\n * touch on the box selects instead, through a press of its own the size of\n * a 48dp target, hidden from the reader as the box is.\n */\nfunction SelectBox({\n isDisabled,\n isSelected,\n onPress,\n}: {\n readonly isDisabled: boolean\n readonly isSelected: boolean\n readonly onPress: (() => void) | undefined\n}) {\n const drawn = (\n <CheckboxBox\n isDisabled={isDisabled}\n isSelected={isSelected}\n within={BOX_SLOT}\n />\n )\n\n if (onPress === undefined) {\n return <View style={styles.box}>{drawn}</View>\n }\n\n return (\n <Pressable\n accessible={false}\n aria-hidden\n disabled={isDisabled}\n focusable={false}\n hitSlop={hitSlop(BOX_SLOT, BOX_SLOT)}\n onPress={onPress}\n style={styles.box}\n tabIndex={-1}\n >\n {drawn}\n </Pressable>\n )\n}\n\n// Runs the selection when a screen reader asks for the row's select action.\nfunction selectionActionOf(select: () => void) {\n return (event: AccessibilityActionEvent) => {\n if (event.nativeEvent.actionName === 'select') {\n select()\n }\n }\n}\n\n// The list a cell is drawn in. Every cell is the `FlatList`'s, inside the\n// list's own provider, so there always is one.\nfunction useList(): ListValue {\n const list = use(ListContext)\n\n if (list === null) {\n throw new Error('A List part is drawn by the List it is in.')\n }\n return list\n}\n\n// Says the ring's name on iOS as it appears. A list loading as it mounts\n// says nothing, as a live region does not read what it was mounted holding.\nfunction useLoadingAnnouncement(isLoading: boolean, label: string) {\n const was = useRef(isLoading)\n\n useEffect(() => {\n if (isLoading && !was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(label)\n }\n was.current = isLoading\n }, [isLoading, label])\n}\n\n// Says how many rows are left on iOS each time the count changes. The count\n// a list mounts with is not said, as a live region does not read what it was\n// mounted holding.\nfunction useResultsAnnouncement(message: string) {\n const was = useRef(message)\n\n useEffect(() => {\n if (message !== was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(message)\n }\n was.current = message\n }, [message])\n}\n\n/**\n * The leading slot of a row that selects: the checkbox, then whatever the\n * row was given, in a row of their own so the two sit side by side.\n */\nfunction withBox(\n box: ReactElement,\n leading: ReactNode,\n style: StyleProp<ViewStyle>,\n): ReactNode {\n return hasContent(leading) ? (\n <View style={style}>\n {box}\n {leading}\n </View>\n ) : (\n box\n )\n}\n\nList.Item = ListRow\nList.LoadMore = ListLoadMore\nList.Section = ListSection\n\nexport { List, ListLoadMore, ListRow, ListSection }\nexport type { ListLoadMoreProps, ListProps, ListRowProps, ListSectionProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsFA,MAAMuD,WAAW;AAGjB,MAAMC,mBAAmB;AAIzB,MAAMC,cAAc;AAIpB,MAAMC,OAA0B,CAAC;AAEjC,MAAME,SAAS5B,WAAW6B,OAAO;CAC/BC,KAAK;EACHC,YAAY;EACZC,QAAQT;EACRU,gBAAgB;EAChBC,OAAOX;CACT;CAGAY,MAAM,EACJH,QAAQ,EACV;CAGAI,QAAQ;EACNJ,QAAQ;EACRK,UAAU;EACVC,eAAe;EACfC,UAAU;EACVL,OAAO;CACT;AACF,CAAC;AAED,MAAMM,WAAWpB,cAAc,EAAEqB,QAAQC,QAAQC,cAC/C3C,WAAW6B,OAAO;CAGhBe,SAAS,EACPC,iBAAiBF,QAAQG,GAC3B;CACAC,OAAO,EACLC,OAAOP,OAAOQ,iBAChB;CAIAC,QAAQ;EACNF,OAAOP,OAAOQ;EACdE,eAAeR,QAAQS;EACvBC,mBAAmBV,QAAQW;EAC3BC,YAAYZ,QAAQW;CACtB;CAGAE,MAAM;EACJzB,YAAY;EACZ0B,eAAe;EACfC,KAAKf,QAAQW;CACf;CACAK,MAAM,EACJC,iBAAiBnB,OAAOoB,QAC1B;CAGAC,SAAS;EACP/B,YAAY;EACZE,gBAAgB;EAChB8B,WAAWrB,OAAOsB;CACpB;CAEA5B,QAAQ,EACNY,OAAOP,OAAOwB,UAChB;AACF,CAAC,CACH;AA8JA,MAAMyC,cAAcrH,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;;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CAENlE,CAAAA,IAAAA;AAEJ;AAEA6E,KAAKuI,OAAO/E;AACZxD,KAAKwI,WAAWtF;AAChBlD,KAAKyI,UAAUhF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CollectionLoadMoreProps","CollectionProps","CollectionRowProps","CollectionSectionProps","Collection","loaderNode","rowNode","sectionNode","ListLoadMoreProps","ListProps","T","ListRowProps","ListSectionProps","List","props","$","_c","t0","ListLoadMore","_props","getCollectionNode","ListRow","ListSection","Item","LoadMore","Section","_c"],"sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import type {\n CollectionLoadMoreProps,\n CollectionProps,\n CollectionRowProps,\n CollectionSectionProps,\n} from '../../collection'\n\nimport { Collection, loaderNode, rowNode, sectionNode } from '../../collection'\n\n// kanso-ui's List, from the lists page: a column of the rows ListItem draws,\n// with selection, an action per row, sections and a row that loads more.\n// What it draws, and how it differs from web's, is src/collection's, which\n// ListBox draws too; what is List's own is the checkbox on a row that\n// selects, the headers that stick, and the surface it is drawn on.\n\ntype ListLoadMoreProps = CollectionLoadMoreProps\n\ntype ListProps<T extends object = object> = CollectionProps<T>\n\n// `Row` rather than `Item`, though the part is `List.Item`, for the reason\n// web gives: `ListItemProps` is the standalone ListItem's, and both are\n// exported from the package.\ntype ListRowProps = CollectionRowProps\n\ntype ListSectionProps = CollectionSectionProps\n\n/**\n * A list of rows, one or more of which can be selected. Selection is React\n * Stately's, as web's is React Aria's: set `selectionMode` to `single` or\n * `multiple`, and pass `selectedKeys` with `onSelectionChange` to control\n * it or `defaultSelectedKeys` to let it keep its own. A list that selects\n * draws a checkbox on every row. A list whose rows do something takes\n * `onAction`, or an `onAction` on each row.\n *\n * ```tsx\n * <List aria-label=\"Label\" selectionMode=\"multiple\">\n * <List.Item id=\"first\" supporting=\"Supporting line\">First item</List.Item>\n * </List>\n * ```\n *\n * ListItem is the row on its own; this is the collection that draws the\n * same row and adds selection, sections and a row that loads more. Composed\n * from parts, `List.Item`, `List.Section` and `List.LoadMore`, which the\n * list draws from their props, so none of them renders anything on its\n * own. Name the list with `aria-label`. It scrolls by itself, so it wants a\n * height to fill: a short list on a page that scrolls takes\n * `scrollEnabled={false}` and is laid out at its full length. It is drawn\n * on surface, and a section's header stays at the top while its rows scroll\n * under it. `style` and `ref` land on the `FlatList`.\n *\n * Inside an `Autocomplete`, the list shows the rows the search keeps and\n * says how many there are to a screen reader, and a tap on a row reaches it\n * while the keyboard is up.\n */\nfunction List<T extends object = object>(props: ListProps<T>) {\n return <Collection {...props} kind=\"list\" />\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * as the reader nears the end of the list, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It\n * goes last, after the rows it loads more of.\n */\nfunction ListLoadMore(_props: ListLoadMoreProps): null {\n return null\n}\n\nListLoadMore.getCollectionNode = loaderNode\n\n/**\n * One row. Its slots are ListItem's: `leading`, the headline as children,\n * `overline` above it, `supporting` under it, and `trailing`. Give every\n * row an `id`, which is the key selection is reported by. A list that\n * selects draws a checkbox before whatever `leading` holds.\n *\n * The list draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction ListRow(_props: ListRowProps): null {\n return null\n}\n\nListRow.getCollectionNode = rowNode\n\n/**\n * A group of rows under a heading, which stays at the top of the list while\n * the group's rows scroll under it.\n */\nfunction ListSection(_props: ListSectionProps): null {\n return null\n}\n\nListSection.getCollectionNode = sectionNode\n\nList.Item = ListRow\nList.LoadMore = ListLoadMore\nList.Section = ListSection\n\nexport { List, ListLoadMore, ListRow, ListSection }\nexport type { ListLoadMoreProps, ListProps, ListRowProps, ListSectionProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAAAa,KAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,OAAA;EACSG,KAAA,oBAAC,YAAD;GAAW,GAAKH;GAAY,MAAA;EAAM,CAAA;EAAGC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAArCE;AAAqC;;;;;;;AAS9C,SAASC,aAAaC,QAAiC;CACrD,OAAO;AACT;AAEAD,aAAaE,oBAAoBf;;;;;;;;;;AAWjC,SAASgB,QAAQF,QAA4B;CAC3C,OAAO;AACT;AAEAE,QAAQD,oBAAoBd;;;;;AAM5B,SAASgB,YAAYH,QAAgC;CACnD,OAAO;AACT;AAEAG,YAAYF,oBAAoBb;AAEhCM,KAAKU,OAAOF;AACZR,KAAKW,WAAWN;AAChBL,KAAKY,UAAUH"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CollectionLoadMoreProps, CollectionProps, CollectionRowProps, CollectionSectionProps, loaderNode, rowNode, sectionNode } from "../../collection/index.js";
|
|
2
|
+
//#region src/components/list-box/index.d.ts
|
|
3
|
+
type ListBoxItemProps = CollectionRowProps;
|
|
4
|
+
type ListBoxLoadMoreProps = CollectionLoadMoreProps;
|
|
5
|
+
type ListBoxProps<T extends object = object> = CollectionProps<T>;
|
|
6
|
+
type ListBoxSectionProps = CollectionSectionProps;
|
|
7
|
+
/**
|
|
8
|
+
* A list of options one or more of which can be selected. Selection is React
|
|
9
|
+
* Stately's, as web's is React Aria's: set `selectionMode` to `single` or
|
|
10
|
+
* `multiple`, and pass `selectedKeys` with `onSelectionChange` to control
|
|
11
|
+
* it or `defaultSelectedKeys` to let it keep its own. A selected option is
|
|
12
|
+
* drawn on primary container. A list that only responds to a press takes
|
|
13
|
+
* `onAction`, or an `onAction` on each option.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <ListBox aria-label="Label" selectionMode="single">
|
|
17
|
+
* <ListBox.Item id="first">First item</ListBox.Item>
|
|
18
|
+
* <ListBox.Item id="second">Second item</ListBox.Item>
|
|
19
|
+
* </ListBox>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Composed from parts, `ListBox.Item`, `ListBox.Section` and
|
|
23
|
+
* `ListBox.LoadMore`, which the list draws from their props, so none of
|
|
24
|
+
* them renders anything on its own. Name the list with `aria-label`. It has
|
|
25
|
+
* no background of its own, so it takes whatever it sits on. It scrolls by
|
|
26
|
+
* itself, so it wants a height to fill: a short list on a page that scrolls
|
|
27
|
+
* takes `scrollEnabled={false}` and is laid out at its full length. `style`
|
|
28
|
+
* and `ref` land on the `FlatList`.
|
|
29
|
+
*
|
|
30
|
+
* A list with nothing in it shows a muted "No results" row in place of its
|
|
31
|
+
* options; pass `renderEmptyState` to draw something else. Inside an
|
|
32
|
+
* `Autocomplete`, it shows the options the search keeps and says how many
|
|
33
|
+
* there are to a screen reader.
|
|
34
|
+
*/
|
|
35
|
+
declare function ListBox<T extends object = object>(props: ListBoxProps<T>): import("react").JSX.Element;
|
|
36
|
+
declare namespace ListBox {
|
|
37
|
+
var Item: typeof ListBoxItem;
|
|
38
|
+
var LoadMore: typeof ListBoxLoadMore;
|
|
39
|
+
var Section: typeof ListBoxSection;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* One option. Its slots are ListItem's: `leading`, the headline as children,
|
|
43
|
+
* `overline` above it, `supporting` under it, and `trailing`. Give every
|
|
44
|
+
* option an `id`, which is the key selection is reported by.
|
|
45
|
+
*
|
|
46
|
+
* The list draws it from its entry in the collection, so it renders nothing
|
|
47
|
+
* on its own. `style`, `ref` and `testID` land on the option.
|
|
48
|
+
*/
|
|
49
|
+
declare function ListBoxItem(_props: ListBoxItemProps): null;
|
|
50
|
+
declare namespace ListBoxItem {
|
|
51
|
+
var getCollectionNode: typeof rowNode;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The row shown while more options are being fetched. `onLoadMore` is
|
|
55
|
+
* called as the reader nears the end of the list, and the ring is drawn
|
|
56
|
+
* only while `isLoading`, in a live region, so a screen reader hears it
|
|
57
|
+
* arrive. It goes last, after the options it loads more of.
|
|
58
|
+
*/
|
|
59
|
+
declare function ListBoxLoadMore(_props: ListBoxLoadMoreProps): null;
|
|
60
|
+
declare namespace ListBoxLoadMore {
|
|
61
|
+
var getCollectionNode: typeof loaderNode;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A group of options under a heading, which a screen reader reads before the
|
|
65
|
+
* options in it.
|
|
66
|
+
*/
|
|
67
|
+
declare function ListBoxSection(_props: ListBoxSectionProps): null;
|
|
68
|
+
declare namespace ListBoxSection {
|
|
69
|
+
var getCollectionNode: typeof sectionNode;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { ListBox, ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps };
|
|
73
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Collection, loaderNode, rowNode, sectionNode } from "../../collection/index.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/list-box/index.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A list of options one or more of which can be selected. Selection is React
|
|
7
|
+
* Stately's, as web's is React Aria's: set `selectionMode` to `single` or
|
|
8
|
+
* `multiple`, and pass `selectedKeys` with `onSelectionChange` to control
|
|
9
|
+
* it or `defaultSelectedKeys` to let it keep its own. A selected option is
|
|
10
|
+
* drawn on primary container. A list that only responds to a press takes
|
|
11
|
+
* `onAction`, or an `onAction` on each option.
|
|
12
|
+
*
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ListBox aria-label="Label" selectionMode="single">
|
|
15
|
+
* <ListBox.Item id="first">First item</ListBox.Item>
|
|
16
|
+
* <ListBox.Item id="second">Second item</ListBox.Item>
|
|
17
|
+
* </ListBox>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Composed from parts, `ListBox.Item`, `ListBox.Section` and
|
|
21
|
+
* `ListBox.LoadMore`, which the list draws from their props, so none of
|
|
22
|
+
* them renders anything on its own. Name the list with `aria-label`. It has
|
|
23
|
+
* no background of its own, so it takes whatever it sits on. It scrolls by
|
|
24
|
+
* itself, so it wants a height to fill: a short list on a page that scrolls
|
|
25
|
+
* takes `scrollEnabled={false}` and is laid out at its full length. `style`
|
|
26
|
+
* and `ref` land on the `FlatList`.
|
|
27
|
+
*
|
|
28
|
+
* A list with nothing in it shows a muted "No results" row in place of its
|
|
29
|
+
* options; pass `renderEmptyState` to draw something else. Inside an
|
|
30
|
+
* `Autocomplete`, it shows the options the search keeps and says how many
|
|
31
|
+
* there are to a screen reader.
|
|
32
|
+
*/
|
|
33
|
+
function ListBox(props) {
|
|
34
|
+
const $ = c(2);
|
|
35
|
+
let t0;
|
|
36
|
+
if ($[0] !== props) {
|
|
37
|
+
t0 = /* @__PURE__ */ jsx(Collection, {
|
|
38
|
+
...props,
|
|
39
|
+
kind: "listbox"
|
|
40
|
+
});
|
|
41
|
+
$[0] = props;
|
|
42
|
+
$[1] = t0;
|
|
43
|
+
} else t0 = $[1];
|
|
44
|
+
return t0;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* One option. Its slots are ListItem's: `leading`, the headline as children,
|
|
48
|
+
* `overline` above it, `supporting` under it, and `trailing`. Give every
|
|
49
|
+
* option an `id`, which is the key selection is reported by.
|
|
50
|
+
*
|
|
51
|
+
* The list draws it from its entry in the collection, so it renders nothing
|
|
52
|
+
* on its own. `style`, `ref` and `testID` land on the option.
|
|
53
|
+
*/
|
|
54
|
+
function ListBoxItem(_props) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
ListBoxItem.getCollectionNode = rowNode;
|
|
58
|
+
/**
|
|
59
|
+
* The row shown while more options are being fetched. `onLoadMore` is
|
|
60
|
+
* called as the reader nears the end of the list, and the ring is drawn
|
|
61
|
+
* only while `isLoading`, in a live region, so a screen reader hears it
|
|
62
|
+
* arrive. It goes last, after the options it loads more of.
|
|
63
|
+
*/
|
|
64
|
+
function ListBoxLoadMore(_props) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
ListBoxLoadMore.getCollectionNode = loaderNode;
|
|
68
|
+
/**
|
|
69
|
+
* A group of options under a heading, which a screen reader reads before the
|
|
70
|
+
* options in it.
|
|
71
|
+
*/
|
|
72
|
+
function ListBoxSection(_props) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
ListBoxSection.getCollectionNode = sectionNode;
|
|
76
|
+
ListBox.Item = ListBoxItem;
|
|
77
|
+
ListBox.LoadMore = ListBoxLoadMore;
|
|
78
|
+
ListBox.Section = ListBoxSection;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { ListBox, ListBoxItem, ListBoxLoadMore, ListBoxSection };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["CollectionLoadMoreProps","CollectionProps","CollectionRowProps","CollectionSectionProps","Collection","loaderNode","rowNode","sectionNode","ListBoxItemProps","ListBoxLoadMoreProps","ListBoxProps","T","ListBoxSectionProps","ListBox","props","$","_c","t0","ListBoxItem","_props","getCollectionNode","ListBoxLoadMore","ListBoxSection","Item","LoadMore","Section","_c"],"sources":["../../../src/components/list-box/index.tsx"],"sourcesContent":["import type {\n CollectionLoadMoreProps,\n CollectionProps,\n CollectionRowProps,\n CollectionSectionProps,\n} from '../../collection'\n\nimport { Collection, loaderNode, rowNode, sectionNode } from '../../collection'\n\n// kanso-ui's ListBox, from the lists page: the selectable list Select and\n// ComboBox put in an overlay. Its options are the rows every list here\n// draws, through src/collection, which List draws too, so the 56dp floor,\n// the lines, the state layers and the disabled treatment are that module's.\n// What is ListBox's own is what web's is: a selected option is marked by its\n// container alone, primary container and on primary container, with no\n// checkbox drawn, and the list has no ground of its own, which is what lets\n// the same one sit on a page and inside a popover. A list that selects more\n// than one and wants a checkbox puts one in an option's trailing slot, as on\n// web, since which of the two affordances a list wants is the list's\n// decision.\n//\n// Its section headers scroll with the options rather than sticking, as\n// web's do: a header that sticks covers the rows under it, and with no\n// ground there is nothing to cover them with.\n\ntype ListBoxItemProps = CollectionRowProps\n\ntype ListBoxLoadMoreProps = CollectionLoadMoreProps\n\ntype ListBoxProps<T extends object = object> = CollectionProps<T>\n\ntype ListBoxSectionProps = CollectionSectionProps\n\n/**\n * A list of options one or more of which can be selected. Selection is React\n * Stately's, as web's is React Aria's: set `selectionMode` to `single` or\n * `multiple`, and pass `selectedKeys` with `onSelectionChange` to control\n * it or `defaultSelectedKeys` to let it keep its own. A selected option is\n * drawn on primary container. A list that only responds to a press takes\n * `onAction`, or an `onAction` on each option.\n *\n * ```tsx\n * <ListBox aria-label=\"Label\" selectionMode=\"single\">\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * <ListBox.Item id=\"second\">Second item</ListBox.Item>\n * </ListBox>\n * ```\n *\n * Composed from parts, `ListBox.Item`, `ListBox.Section` and\n * `ListBox.LoadMore`, which the list draws from their props, so none of\n * them renders anything on its own. Name the list with `aria-label`. It has\n * no background of its own, so it takes whatever it sits on. It scrolls by\n * itself, so it wants a height to fill: a short list on a page that scrolls\n * takes `scrollEnabled={false}` and is laid out at its full length. `style`\n * and `ref` land on the `FlatList`.\n *\n * A list with nothing in it shows a muted \"No results\" row in place of its\n * options; pass `renderEmptyState` to draw something else. Inside an\n * `Autocomplete`, it shows the options the search keeps and says how many\n * there are to a screen reader.\n */\nfunction ListBox<T extends object = object>(props: ListBoxProps<T>) {\n return <Collection {...props} kind=\"listbox\" />\n}\n\n/**\n * One option. Its slots are ListItem's: `leading`, the headline as children,\n * `overline` above it, `supporting` under it, and `trailing`. Give every\n * option an `id`, which is the key selection is reported by.\n *\n * The list draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the option.\n */\nfunction ListBoxItem(_props: ListBoxItemProps): null {\n return null\n}\n\nListBoxItem.getCollectionNode = rowNode\n\n/**\n * The row shown while more options are being fetched. `onLoadMore` is\n * called as the reader nears the end of the list, and the ring is drawn\n * only while `isLoading`, in a live region, so a screen reader hears it\n * arrive. It goes last, after the options it loads more of.\n */\nfunction ListBoxLoadMore(_props: ListBoxLoadMoreProps): null {\n return null\n}\n\nListBoxLoadMore.getCollectionNode = loaderNode\n\n/**\n * A group of options under a heading, which a screen reader reads before the\n * options in it.\n */\nfunction ListBoxSection(_props: ListBoxSectionProps): null {\n return null\n}\n\nListBoxSection.getCollectionNode = sectionNode\n\nListBox.Item = ListBoxItem\nListBox.LoadMore = ListBoxLoadMore\nListBox.Section = ListBoxSection\n\nexport { ListBox, ListBoxItem, ListBoxLoadMore, ListBoxSection }\nexport type {\n ListBoxItemProps,\n ListBoxLoadMoreProps,\n ListBoxProps,\n ListBoxSectionProps,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,SAAAa,QAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,OAAA;EACSG,KAAA,oBAAC,YAAD;GAAW,GAAKH;GAAY,MAAA;EAAS,CAAA;EAAGC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAxCE;AAAwC;;;;;;;;;AAWjD,SAASC,YAAYC,QAAgC;CACnD,OAAO;AACT;AAEAD,YAAYE,oBAAoBd;;;;;;;AAQhC,SAASe,gBAAgBF,QAAoC;CAC3D,OAAO;AACT;AAEAE,gBAAgBD,oBAAoBf;;;;;AAMpC,SAASiB,eAAeH,QAAmC;CACzD,OAAO;AACT;AAEAG,eAAeF,oBAAoBb;AAEnCM,QAAQU,OAAOL;AACfL,QAAQW,WAAWH;AACnBR,QAAQY,UAAUH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
2
|
+
import { ComponentRef, Ref } from "react";
|
|
3
|
+
//#region src/components/loading-indicator/index.d.ts
|
|
4
|
+
type LoadingIndicatorProps = Omit<ViewProps, 'children' | 'style'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Draws the shape on a circular container in the primary container pair,
|
|
7
|
+
* for an indicator drawn over content, such as a list being refreshed or an
|
|
8
|
+
* image being fetched, where a bare shape would have nothing behind it to
|
|
9
|
+
* read against.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
readonly contained?: boolean;
|
|
13
|
+
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
14
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A shape morphing as it turns, for a wait of a few seconds whose length is
|
|
18
|
+
* not worth showing, where it would otherwise be an indeterminate ring.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <LoadingIndicator aria-label="Label" />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* A screen reader hears it as a busy progress bar. Name it with
|
|
25
|
+
* `aria-label`, or `aria-labelledby` where something on the screen already
|
|
26
|
+
* says what is loading. `style`, `ref` and `testID` land on the container,
|
|
27
|
+
* which is the view a layout positions.
|
|
28
|
+
*/
|
|
29
|
+
declare function LoadingIndicator({ contained, style, ...props }: LoadingIndicatorProps): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { LoadingIndicator, type LoadingIndicatorProps };
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { useTheme } from "../../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../../theme/styles.js";
|
|
3
|
+
import { HIDDEN } from "../../glyphs/hidden.js";
|
|
4
|
+
import { keyframeAt, useLoop } from "../../indicator/motion.js";
|
|
5
|
+
import { TURN, shapePath } from "../../indicator/paths.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { StyleSheet, View } from "react-native";
|
|
8
|
+
import Animated, { useAnimatedProps, useReducedMotion } from "react-native-reanimated";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import Svg, { Path } from "react-native-svg";
|
|
11
|
+
//#region src/components/loading-indicator/index.tsx
|
|
12
|
+
const SHAPES = {
|
|
13
|
+
cookie4Sided: "polygon(79% 50%, 79.1% 52%, 79.6% 54.2%, 80.4% 56.5%, 81.5% 59%, 82.5% 61.8%, 82.9% 64.7%, 82.9% 67.5%, 82.4% 70.3%, 81.5% 72.9%, 80.2% 75.3%, 78.5% 77.5%, 76.4% 79.4%, 74.1% 80.9%, 71.6% 82%, 68.9% 82.7%, 66.1% 83%, 63.2% 82.8%, 60.4% 82.1%, 57.7% 80.9%, 55.3% 79.9%, 53.1% 79.3%, 51% 79%, 49% 79%, 46.9% 79.3%, 44.7% 79.9%, 42.3% 81%, 39.6% 82.1%, 36.8% 82.8%, 33.9% 83%, 31.1% 82.7%, 28.4% 82%, 25.9% 80.9%, 23.6% 79.4%, 21.5% 77.5%, 19.8% 75.3%, 18.5% 72.9%, 17.6% 70.3%, 17.1% 67.5%, 17.1% 64.7%, 17.5% 61.8%, 18.5% 59%, 19.6% 56.5%, 20.4% 54.2%, 20.9% 52%, 21% 50%, 20.9% 48%, 20.4% 45.8%, 19.6% 43.5%, 18.5% 41%, 17.5% 38.2%, 17.1% 35.3%, 17.1% 32.5%, 17.6% 29.7%, 18.5% 27.1%, 19.8% 24.7%, 21.5% 22.5%, 23.6% 20.6%, 25.9% 19.1%, 28.4% 18%, 31.1% 17.3%, 33.9% 17%, 36.8% 17.2%, 39.6% 17.9%, 42.3% 19.1%, 44.7% 20.1%, 46.9% 20.7%, 49% 21%, 51% 21%, 53.1% 20.7%, 55.3% 20.1%, 57.7% 19%, 60.4% 17.9%, 63.2% 17.2%, 66.1% 17%, 68.9% 17.3%, 71.6% 18%, 74.1% 19.1%, 76.4% 20.6%, 78.5% 22.5%, 80.2% 24.7%, 81.5% 27.1%, 82.4% 29.7%, 82.9% 32.5%, 82.9% 35.3%, 82.5% 38.2%, 81.5% 41%, 80.4% 43.5%, 79.6% 45.8%, 79.1% 48%)",
|
|
14
|
+
cookie9Sided: "polygon(82.5% 50%, 81.4% 52.2%, 80.4% 54.3%, 79.9% 56.4%, 79.8% 58.6%, 80.2% 61%, 80.2% 63.4%, 79.6% 65.8%, 78.6% 67.9%, 77.1% 69.7%, 75.2% 71.1%, 72.9% 72.1%, 70.8% 73.1%, 69.1% 74.4%, 67.6% 76.1%, 66.3% 78.3%, 64.7% 80.1%, 62.7% 81.4%, 60.5% 82.3%, 58.1% 82.6%, 55.7% 82.4%, 53.3% 81.7%, 51.1% 81.2%, 48.9% 81.2%, 46.7% 81.7%, 44.3% 82.4%, 41.9% 82.6%, 39.5% 82.3%, 37.3% 81.4%, 35.3% 80.1%, 33.7% 78.3%, 32.4% 76.1%, 30.9% 74.4%, 29.2% 73.1%, 27.1% 72.1%, 24.8% 71.1%, 22.9% 69.7%, 21.4% 67.9%, 20.4% 65.8%, 19.8% 63.4%, 19.8% 61%, 20.2% 58.6%, 20.1% 56.4%, 19.6% 54.3%, 18.6% 52.2%, 17.5% 50%, 17.1% 47.7%, 17.1% 45.4%, 17.7% 43.1%, 18.7% 41%, 20.3% 39.2%, 22.1% 37.6%, 23.4% 35.9%, 24.4% 34%, 24.9% 31.8%, 25.5% 29.5%, 26.6% 27.4%, 28.1% 25.6%, 29.9% 24.2%, 32% 23.3%, 34.3% 22.8%, 36.7% 22.7%, 38.8% 22.4%, 40.8% 21.6%, 42.6% 20.4%, 44.5% 18.9%, 46.6% 17.9%, 48.9% 17.4%, 51.1% 17.4%, 53.4% 17.9%, 55.5% 18.9%, 57.4% 20.4%, 59.2% 21.6%, 61.2% 22.4%, 63.3% 22.7%, 65.7% 22.8%, 68% 23.3%, 70.1% 24.2%, 71.9% 25.6%, 73.4% 27.4%, 74.5% 29.5%, 75.1% 31.8%, 75.6% 34%, 76.6% 35.9%, 77.9% 37.6%, 79.7% 39.2%, 81.3% 41%, 82.3% 43.1%, 82.9% 45.4%, 82.9% 47.7%)",
|
|
15
|
+
oval: "polygon(80% 50%, 79% 52%, 78.1% 53.9%, 77.1% 55.8%, 76% 57.5%, 75% 59.1%, 73.9% 60.6%, 72.8% 62.1%, 71.7% 63.5%, 70.5% 64.9%, 69.3% 66.2%, 68.1% 67.5%, 66.8% 68.7%, 65.6% 69.9%, 64.2% 71.1%, 62.8% 72.2%, 61.4% 73.3%, 59.9% 74.4%, 58.3% 75.5%, 56.6% 76.6%, 54.9% 77.6%, 53% 78.6%, 51% 79.5%, 48.9% 80.4%, 46.7% 81.2%, 44.4% 81.9%, 41.9% 82.4%, 39.3% 82.8%, 36.7% 83%, 34% 82.9%, 31.2% 82.5%, 28.6% 81.8%, 26.1% 80.6%, 23.8% 79.1%, 21.7% 77.3%, 20.1% 75.1%, 18.8% 72.7%, 17.8% 70.1%, 17.3% 67.4%, 17% 64.7%, 17.1% 62%, 17.4% 59.4%, 17.8% 56.8%, 18.5% 54.4%, 19.2% 52.2%, 20% 50%, 21% 48%, 21.9% 46.1%, 22.9% 44.2%, 24% 42.5%, 25% 40.9%, 26.1% 39.4%, 27.2% 37.9%, 28.3% 36.5%, 29.5% 35.1%, 30.7% 33.8%, 31.9% 32.5%, 33.2% 31.3%, 34.4% 30.1%, 35.8% 28.9%, 37.2% 27.8%, 38.6% 26.7%, 40.1% 25.6%, 41.7% 24.5%, 43.4% 23.4%, 45.1% 22.4%, 47% 21.4%, 49% 20.5%, 51.1% 19.6%, 53.3% 18.8%, 55.6% 18.1%, 58.1% 17.6%, 60.7% 17.2%, 63.3% 17%, 66% 17.1%, 68.8% 17.5%, 71.4% 18.2%, 73.9% 19.4%, 76.2% 20.9%, 78.3% 22.7%, 79.9% 24.9%, 81.2% 27.3%, 82.2% 29.9%, 82.7% 32.6%, 83% 35.3%, 82.9% 38%, 82.6% 40.6%, 82.2% 43.2%, 81.5% 45.6%, 80.8% 47.8%)",
|
|
16
|
+
pentagon: "polygon(82% 50%, 81.3% 52.2%, 80.6% 54.3%, 79.9% 56.4%, 79.2% 58.4%, 78.5% 60.4%, 77.9% 62.4%, 77.2% 64.5%, 76.5% 66.5%, 75.8% 68.7%, 75% 71%, 74.2% 73.4%, 73.1% 75.7%, 71.6% 77.7%, 69.7% 79.2%, 67.5% 80.3%, 65.1% 80.9%, 62.5% 81%, 60.1% 81%, 57.7% 81%, 55.5% 81%, 53.3% 81%, 51.1% 81%, 48.9% 81%, 46.7% 81%, 44.5% 81%, 42.3% 81%, 39.9% 81%, 37.5% 81%, 34.9% 80.9%, 32.5% 80.3%, 30.3% 79.2%, 28.4% 77.7%, 26.9% 75.7%, 25.8% 73.4%, 25% 71%, 24.2% 68.7%, 23.5% 66.5%, 22.8% 64.5%, 22.1% 62.4%, 21.5% 60.4%, 20.8% 58.4%, 20.1% 56.4%, 19.4% 54.3%, 18.7% 52.2%, 18% 50%, 17.3% 47.7%, 17% 45.4%, 17.3% 43%, 18% 40.8%, 19.2% 38.8%, 20.9% 37%, 22.9% 35.6%, 24.8% 34.2%, 26.6% 33%, 28.3% 31.8%, 29.9% 30.6%, 31.5% 29.5%, 33.1% 28.4%, 34.7% 27.3%, 36.2% 26.1%, 37.8% 25%, 39.4% 23.9%, 41.1% 22.7%, 42.9% 21.4%, 44.8% 20.3%, 46.8% 19.4%, 48.9% 19%, 51.1% 19%, 53.2% 19.4%, 55.2% 20.3%, 57.1% 21.4%, 58.9% 22.7%, 60.6% 23.9%, 62.2% 25%, 63.8% 26.1%, 65.3% 27.3%, 66.9% 28.4%, 68.5% 29.5%, 70.1% 30.6%, 71.7% 31.8%, 73.4% 33%, 75.2% 34.2%, 77.1% 35.6%, 79.1% 37%, 80.8% 38.8%, 82% 40.8%, 82.7% 43%, 83% 45.4%, 82.7% 47.7%)",
|
|
17
|
+
pill: "polygon(82.6% 50%, 82.1% 52.2%, 81.4% 54.4%, 80.6% 56.5%, 79.7% 58.5%, 78.6% 60.4%, 77.4% 62.2%, 76.1% 63.9%, 74.7% 65.4%, 73.2% 66.9%, 71.8% 68.3%, 70.4% 69.7%, 69% 71.1%, 67.6% 72.5%, 66.2% 73.9%, 64.7% 75.4%, 63.1% 76.8%, 61.3% 78%, 59.5% 79.2%, 57.5% 80.2%, 55.5% 81.1%, 53.3% 81.8%, 51.1% 82.4%, 48.9% 82.7%, 46.5% 83%, 44.2% 82.9%, 41.9% 82.6%, 39.5% 82.2%, 37.2% 81.7%, 34.9% 80.9%, 32.7% 79.9%, 30.6% 78.7%, 28.6% 77.4%, 26.7% 75.9%, 25% 74.2%, 23.4% 72.4%, 21.9% 70.4%, 20.7% 68.3%, 19.6% 66.2%, 18.7% 63.9%, 18% 61.6%, 17.5% 59.3%, 17.2% 57%, 17% 54.6%, 17.1% 52.3%, 17.4% 50%, 17.9% 47.8%, 18.6% 45.6%, 19.4% 43.5%, 20.3% 41.5%, 21.4% 39.6%, 22.6% 37.8%, 23.9% 36.1%, 25.3% 34.6%, 26.8% 33.1%, 28.2% 31.7%, 29.6% 30.3%, 31% 28.9%, 32.4% 27.5%, 33.8% 26.1%, 35.3% 24.6%, 36.9% 23.2%, 38.7% 22%, 40.5% 20.8%, 42.5% 19.8%, 44.5% 18.9%, 46.7% 18.2%, 48.9% 17.6%, 51.1% 17.3%, 53.5% 17%, 55.8% 17.1%, 58.1% 17.4%, 60.5% 17.8%, 62.8% 18.3%, 65.1% 19.1%, 67.3% 20.1%, 69.4% 21.3%, 71.4% 22.6%, 73.3% 24.1%, 75% 25.8%, 76.6% 27.6%, 78.1% 29.6%, 79.3% 31.7%, 80.4% 33.8%, 81.3% 36.1%, 82% 38.4%, 82.5% 40.7%, 82.8% 43%, 83% 45.4%, 82.9% 47.7%)",
|
|
18
|
+
softBurst: "polygon(76% 50%, 76.5% 51.9%, 78.3% 54%, 80.4% 56.5%, 81.5% 59%, 80.8% 61.2%, 78.3% 62.6%, 75.2% 63.4%, 72.5% 64.1%, 71% 65.3%, 70.4% 67.1%, 70.5% 69.8%, 70.8% 73.1%, 70.2% 75.9%, 68.3% 77.2%, 65.5% 76.9%, 62.5% 75.6%, 60% 74.6%, 58% 74.7%, 56.4% 75.8%, 55% 78.1%, 53.2% 80.9%, 51.1% 82.8%, 48.9% 82.8%, 46.8% 80.8%, 45% 78.1%, 43.6% 75.8%, 42% 74.7%, 40% 74.7%, 37.5% 75.7%, 34.5% 76.9%, 31.6% 77.2%, 29.8% 75.9%, 29.2% 73%, 29.5% 69.8%, 29.6% 67.1%, 29% 65.3%, 27.5% 64.1%, 24.8% 63.4%, 21.6% 62.6%, 19.2% 61.2%, 18.5% 59%, 19.7% 56.4%, 21.8% 54%, 23.5% 51.9%, 24% 50%, 23.5% 48.1%, 21.7% 46%, 19.6% 43.5%, 18.5% 41%, 19.2% 38.8%, 21.7% 37.4%, 24.8% 36.6%, 27.5% 35.9%, 29% 34.7%, 29.6% 32.9%, 29.5% 30.2%, 29.2% 26.9%, 29.8% 24.1%, 31.7% 22.8%, 34.5% 23.1%, 37.5% 24.4%, 40% 25.4%, 42% 25.3%, 43.6% 24.2%, 45% 21.9%, 46.8% 19.1%, 48.9% 17.2%, 51.1% 17.2%, 53.2% 19.2%, 55% 21.9%, 56.4% 24.2%, 58% 25.3%, 60% 25.3%, 62.5% 24.3%, 65.5% 23.1%, 68.4% 22.8%, 70.2% 24.1%, 70.8% 27%, 70.5% 30.2%, 70.4% 32.9%, 71% 34.7%, 72.5% 35.9%, 75.2% 36.6%, 78.4% 37.4%, 80.8% 38.8%, 81.5% 41%, 80.3% 43.6%, 78.2% 46%, 76.5% 48.1%)",
|
|
19
|
+
sunny: "polygon(83% 50%, 82.5% 52.3%, 80.9% 54.3%, 79.3% 56.2%, 77.8% 58%, 76.4% 59.6%, 75.6% 61.4%, 75.4% 63.5%, 75.2% 65.7%, 75% 68.2%, 74.7% 70.8%, 73.7% 72.9%, 71.9% 74.3%, 69.4% 74.9%, 66.9% 75.1%, 64.6% 75.3%, 62.4% 75.4%, 60.5% 75.9%, 58.8% 77.1%, 57.1% 78.6%, 55.3% 80.1%, 53.3% 81.8%, 51.1% 82.9%, 48.9% 82.9%, 46.7% 81.8%, 44.7% 80.1%, 42.9% 78.6%, 41.2% 77.1%, 39.5% 75.9%, 37.6% 75.4%, 35.4% 75.3%, 33.1% 75.1%, 30.6% 74.9%, 28.1% 74.3%, 26.3% 72.9%, 25.3% 70.8%, 25% 68.2%, 24.8% 65.7%, 24.6% 63.5%, 24.4% 61.4%, 23.6% 59.6%, 22.2% 58%, 20.7% 56.2%, 19.1% 54.3%, 17.5% 52.3%, 17% 50%, 17.5% 47.7%, 19.1% 45.7%, 20.7% 43.8%, 22.2% 42%, 23.6% 40.4%, 24.4% 38.6%, 24.6% 36.5%, 24.8% 34.3%, 25% 31.8%, 25.3% 29.2%, 26.3% 27.1%, 28.1% 25.7%, 30.6% 25.1%, 33.1% 24.9%, 35.4% 24.7%, 37.6% 24.6%, 39.5% 24.1%, 41.2% 22.9%, 42.9% 21.4%, 44.7% 19.9%, 46.7% 18.2%, 48.9% 17.1%, 51.1% 17.1%, 53.3% 18.2%, 55.3% 19.9%, 57.1% 21.4%, 58.8% 22.9%, 60.5% 24.1%, 62.4% 24.6%, 64.6% 24.7%, 66.9% 24.9%, 69.4% 25.1%, 71.9% 25.7%, 73.7% 27.1%, 74.7% 29.2%, 75% 31.8%, 75.2% 34.3%, 75.4% 36.5%, 75.6% 38.6%, 76.4% 40.4%, 77.8% 42%, 79.3% 43.8%, 80.9% 45.7%, 82.5% 47.7%)"
|
|
20
|
+
};
|
|
21
|
+
const SIZE = 48;
|
|
22
|
+
const BOX = 100;
|
|
23
|
+
const CENTRE = BOX / 2;
|
|
24
|
+
const SEQUENCE = [
|
|
25
|
+
SHAPES.softBurst,
|
|
26
|
+
SHAPES.cookie9Sided,
|
|
27
|
+
SHAPES.pentagon,
|
|
28
|
+
SHAPES.pill,
|
|
29
|
+
SHAPES.sunny,
|
|
30
|
+
SHAPES.cookie4Sided,
|
|
31
|
+
SHAPES.oval
|
|
32
|
+
].map((polygon) => (polygon.match(/\d+(?:\.\d+)?/gu) ?? []).map(Number));
|
|
33
|
+
const MORPH_MS = 650;
|
|
34
|
+
const MORPH_CYCLE_MS = MORPH_MS * SEQUENCE.length;
|
|
35
|
+
const QUARTERS = 4;
|
|
36
|
+
const TURN_CYCLE_MS = MORPH_MS * QUARTERS;
|
|
37
|
+
const SPIN_MS = 4666;
|
|
38
|
+
const SLOWDOWN = 1.25;
|
|
39
|
+
const SPRING = [
|
|
40
|
+
0,
|
|
41
|
+
.054,
|
|
42
|
+
.185,
|
|
43
|
+
.352,
|
|
44
|
+
.527,
|
|
45
|
+
.69,
|
|
46
|
+
.827,
|
|
47
|
+
.934,
|
|
48
|
+
1.011,
|
|
49
|
+
1.06,
|
|
50
|
+
1.086,
|
|
51
|
+
1.095,
|
|
52
|
+
1.091,
|
|
53
|
+
1.079,
|
|
54
|
+
1.063,
|
|
55
|
+
1.047,
|
|
56
|
+
1.031,
|
|
57
|
+
1.018,
|
|
58
|
+
1.007,
|
|
59
|
+
1,
|
|
60
|
+
.995,
|
|
61
|
+
.992,
|
|
62
|
+
.991,
|
|
63
|
+
.991,
|
|
64
|
+
.992,
|
|
65
|
+
.994,
|
|
66
|
+
1
|
|
67
|
+
].map((value, index, samples) => [index / (samples.length - 1), value]);
|
|
68
|
+
const AnimatedPath = Animated.createAnimatedComponent(Path);
|
|
69
|
+
const stylesOf = themedStyles(({ colors, radii }) => StyleSheet.create({
|
|
70
|
+
contained: { backgroundColor: colors.primaryContainer },
|
|
71
|
+
root: {
|
|
72
|
+
alignItems: "center",
|
|
73
|
+
borderRadius: radii.circle,
|
|
74
|
+
flexShrink: 0,
|
|
75
|
+
height: SIZE,
|
|
76
|
+
justifyContent: "center",
|
|
77
|
+
width: SIZE
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
/**
|
|
81
|
+
* A shape morphing as it turns, for a wait of a few seconds whose length is
|
|
82
|
+
* not worth showing, where it would otherwise be an indeterminate ring.
|
|
83
|
+
*
|
|
84
|
+
* ```tsx
|
|
85
|
+
* <LoadingIndicator aria-label="Label" />
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* A screen reader hears it as a busy progress bar. Name it with
|
|
89
|
+
* `aria-label`, or `aria-labelledby` where something on the screen already
|
|
90
|
+
* says what is loading. `style`, `ref` and `testID` land on the container,
|
|
91
|
+
* which is the view a layout positions.
|
|
92
|
+
*/
|
|
93
|
+
function LoadingIndicator(t0) {
|
|
94
|
+
const $ = c(14);
|
|
95
|
+
let props;
|
|
96
|
+
let style;
|
|
97
|
+
let t1;
|
|
98
|
+
if ($[0] !== t0) {
|
|
99
|
+
({contained: t1, style, ...props} = t0);
|
|
100
|
+
$[0] = t0;
|
|
101
|
+
$[1] = props;
|
|
102
|
+
$[2] = style;
|
|
103
|
+
$[3] = t1;
|
|
104
|
+
} else {
|
|
105
|
+
props = $[1];
|
|
106
|
+
style = $[2];
|
|
107
|
+
t1 = $[3];
|
|
108
|
+
}
|
|
109
|
+
const contained = t1 === void 0 ? false : t1;
|
|
110
|
+
const theme = useTheme();
|
|
111
|
+
const own = stylesOf(theme);
|
|
112
|
+
const slowdown = useReducedMotion() ? SLOWDOWN : 1;
|
|
113
|
+
const morph = useLoop(MORPH_CYCLE_MS * slowdown, true);
|
|
114
|
+
const turn = useLoop(TURN_CYCLE_MS * slowdown, true);
|
|
115
|
+
let t2;
|
|
116
|
+
if ($[4] !== slowdown) {
|
|
117
|
+
t2 = Math.round(SPIN_MS * slowdown);
|
|
118
|
+
$[4] = slowdown;
|
|
119
|
+
$[5] = t2;
|
|
120
|
+
} else t2 = $[5];
|
|
121
|
+
const spin = useLoop(t2, true);
|
|
122
|
+
const shape = useAnimatedProps(() => {
|
|
123
|
+
"worklet";
|
|
124
|
+
const morphed = morph.get() * SEQUENCE.length;
|
|
125
|
+
const from = Math.min(Math.floor(morphed), SEQUENCE.length - 1);
|
|
126
|
+
const turned = turn.get() * QUARTERS;
|
|
127
|
+
const quarter = Math.floor(turned);
|
|
128
|
+
const angle = TURN * ((quarter + keyframeAt(SPRING, turned - quarter)) / QUARTERS + spin.get());
|
|
129
|
+
return { d: shapePath(SEQUENCE[from], SEQUENCE[(from + 1) % SEQUENCE.length], keyframeAt(SPRING, morphed - from), angle, CENTRE) };
|
|
130
|
+
});
|
|
131
|
+
const T0 = View;
|
|
132
|
+
const t3 = true;
|
|
133
|
+
const t4 = true;
|
|
134
|
+
const t5 = "progressbar";
|
|
135
|
+
const t6 = composeStyles(own.root, contained ? own.contained : void 0, style);
|
|
136
|
+
const t7 = contained ? theme.colors.onPrimaryContainer : theme.colors.primary;
|
|
137
|
+
let t8;
|
|
138
|
+
if ($[6] !== shape || $[7] !== t7) {
|
|
139
|
+
t8 = /* @__PURE__ */ jsx(Svg, {
|
|
140
|
+
...HIDDEN,
|
|
141
|
+
height: SIZE,
|
|
142
|
+
viewBox: `0 0 ${BOX} ${BOX}`,
|
|
143
|
+
width: SIZE,
|
|
144
|
+
children: /* @__PURE__ */ jsx(AnimatedPath, {
|
|
145
|
+
animatedProps: shape,
|
|
146
|
+
fill: t7
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
$[6] = shape;
|
|
150
|
+
$[7] = t7;
|
|
151
|
+
$[8] = t8;
|
|
152
|
+
} else t8 = $[8];
|
|
153
|
+
let t9;
|
|
154
|
+
if ($[9] !== T0 || $[10] !== props || $[11] !== t6 || $[12] !== t8) {
|
|
155
|
+
t9 = /* @__PURE__ */ jsx(T0, {
|
|
156
|
+
accessible: t3,
|
|
157
|
+
"aria-busy": t4,
|
|
158
|
+
role: t5,
|
|
159
|
+
...props,
|
|
160
|
+
style: t6,
|
|
161
|
+
children: t8
|
|
162
|
+
});
|
|
163
|
+
$[9] = T0;
|
|
164
|
+
$[10] = props;
|
|
165
|
+
$[11] = t6;
|
|
166
|
+
$[12] = t8;
|
|
167
|
+
$[13] = t9;
|
|
168
|
+
} else t9 = $[13];
|
|
169
|
+
return t9;
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
export { LoadingIndicator };
|
|
173
|
+
|
|
174
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentRef","Ref","StyleProp","ViewProps","ViewStyle","StyleSheet","View","Animated","useAnimatedProps","useReducedMotion","Svg","Path","Keyframe","HIDDEN","keyframeAt","useLoop","shapePath","TURN","useTheme","composeStyles","themedStyles","LoadingIndicatorProps","Omit","contained","ref","style","SHAPES","cookie4Sided","cookie9Sided","oval","pentagon","pill","softBurst","sunny","const","SIZE","BOX","CENTRE","SEQUENCE","map","polygon","match","Number","MORPH_MS","MORPH_CYCLE_MS","length","QUARTERS","TURN_CYCLE_MS","SPIN_MS","SLOWDOWN","SPRING","value","index","samples","AnimatedPath","createAnimatedComponent","stylesOf","colors","radii","create","backgroundColor","primaryContainer","root","alignItems","borderRadius","circle","flexShrink","height","justifyContent","width","LoadingIndicator","t0","$","_c","props","t1","undefined","theme","own","reduceMotion","slowdown","morph","turn","t2","Math","round","spin","shape","morphed","get","from","min","floor","turned","quarter","angle","d","T0","t3","t4","t5","t6","t7","onPrimaryContainer","primary","t8","t9","_c"],"sources":["../../../src/components/loading-indicator/index.tsx"],"sourcesContent":["import type { ComponentRef, Ref } from 'react'\nimport type { StyleProp, ViewProps, ViewStyle } from 'react-native'\n\nimport { StyleSheet, View } from 'react-native'\nimport Animated, {\n useAnimatedProps,\n useReducedMotion,\n} from 'react-native-reanimated'\nimport Svg, { Path } from 'react-native-svg'\n\nimport type { Keyframe } from '../../indicator/motion'\n\nimport { HIDDEN } from '../../glyphs/hidden'\nimport { keyframeAt, useLoop } from '../../indicator/motion'\nimport { shapePath, TURN } from '../../indicator/paths'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\n\n// The loading indicator page's indicator, as kanso-ui's LoadingIndicator\n// draws it, at https://m3.material.io/components/loading-indicator/specs: a\n// shape that morphs through a sequence of seven while it turns, for a wait\n// short enough that how long it takes is not worth showing. It is\n// indeterminate: it says that something is happening, and a screen reader\n// hears it as a busy progress bar with no value.\n//\n// The page's tokens are a 48dp container with a full corner and a 38dp\n// active indicator inside it. Uncontained, the container is transparent and\n// the shape is primary; contained, the container is primary container and\n// the shape on primary container, for an indicator drawn over content rather\n// than beside it.\n//\n// The seven shapes are web's, in the page's order: soft burst, nine-sided\n// cookie, pentagon, pill, sunny, four-sided cookie and oval. Each is the\n// polygon Material's own shape library builds for it, traced as 90 points at\n// 4° steps round its centre and scaled so the widest still fits the 38dp\n// indicator at every angle it turns through. They are web's `clip-path`\n// polygons as written, in percentages of the container, which an svg drawn\n// over the container on a 100-unit box reads as they stand. Web interpolates\n// one polygon into the next; here the path is built each frame from the two\n// shapes either side of the clock, point by point, which is the same\n// interpolation drawn on the UI thread.\n//\n// The timing is web's too. Each morph takes the 650ms interval it starts, on\n// a spring of damping ratio 0.6 and stiffness 200 that overshoots by about a\n// tenth and settles inside the interval, and every morph turns the shape a\n// further quarter on the same spring, over a constant turn of the whole every\n// 4666ms. The spring is web's samples of it, read off the morph's clock, so\n// each morph lands on its shape exactly as the next interval starts and the\n// cycle of seven loops back to the first; a spring run by Reanimated's\n// physics settles by a threshold rather than on the interval, and would drift\n// off the beat the quarter turns keep. The quarter turns run on a cycle of\n// their own, four to a full turn, beside the morph's cycle of seven.\n//\n// Under reduced motion it slows rather than stopping, as the progress\n// indicator's ring does and for its reason: an indicator that freezes stops\n// saying the work is going on. The multiplier is the ring's.\n\ntype LoadingIndicatorProps = Omit<ViewProps, 'children' | 'style'> & {\n /**\n * Draws the shape on a circular container in the primary container pair,\n * for an indicator drawn over content, such as a list being refreshed or an\n * image being fetched, where a bare shape would have nothing behind it to\n * read against.\n * @default false\n */\n readonly contained?: boolean\n readonly ref?: Ref<ComponentRef<typeof View>>\n readonly style?: StyleProp<ViewStyle>\n}\n\nconst SHAPES = {\n cookie4Sided:\n 'polygon(79% 50%, 79.1% 52%, 79.6% 54.2%, 80.4% 56.5%, 81.5% 59%, 82.5% 61.8%, 82.9% 64.7%, 82.9% 67.5%, 82.4% 70.3%, 81.5% 72.9%, 80.2% 75.3%, 78.5% 77.5%, 76.4% 79.4%, 74.1% 80.9%, 71.6% 82%, 68.9% 82.7%, 66.1% 83%, 63.2% 82.8%, 60.4% 82.1%, 57.7% 80.9%, 55.3% 79.9%, 53.1% 79.3%, 51% 79%, 49% 79%, 46.9% 79.3%, 44.7% 79.9%, 42.3% 81%, 39.6% 82.1%, 36.8% 82.8%, 33.9% 83%, 31.1% 82.7%, 28.4% 82%, 25.9% 80.9%, 23.6% 79.4%, 21.5% 77.5%, 19.8% 75.3%, 18.5% 72.9%, 17.6% 70.3%, 17.1% 67.5%, 17.1% 64.7%, 17.5% 61.8%, 18.5% 59%, 19.6% 56.5%, 20.4% 54.2%, 20.9% 52%, 21% 50%, 20.9% 48%, 20.4% 45.8%, 19.6% 43.5%, 18.5% 41%, 17.5% 38.2%, 17.1% 35.3%, 17.1% 32.5%, 17.6% 29.7%, 18.5% 27.1%, 19.8% 24.7%, 21.5% 22.5%, 23.6% 20.6%, 25.9% 19.1%, 28.4% 18%, 31.1% 17.3%, 33.9% 17%, 36.8% 17.2%, 39.6% 17.9%, 42.3% 19.1%, 44.7% 20.1%, 46.9% 20.7%, 49% 21%, 51% 21%, 53.1% 20.7%, 55.3% 20.1%, 57.7% 19%, 60.4% 17.9%, 63.2% 17.2%, 66.1% 17%, 68.9% 17.3%, 71.6% 18%, 74.1% 19.1%, 76.4% 20.6%, 78.5% 22.5%, 80.2% 24.7%, 81.5% 27.1%, 82.4% 29.7%, 82.9% 32.5%, 82.9% 35.3%, 82.5% 38.2%, 81.5% 41%, 80.4% 43.5%, 79.6% 45.8%, 79.1% 48%)',\n cookie9Sided:\n 'polygon(82.5% 50%, 81.4% 52.2%, 80.4% 54.3%, 79.9% 56.4%, 79.8% 58.6%, 80.2% 61%, 80.2% 63.4%, 79.6% 65.8%, 78.6% 67.9%, 77.1% 69.7%, 75.2% 71.1%, 72.9% 72.1%, 70.8% 73.1%, 69.1% 74.4%, 67.6% 76.1%, 66.3% 78.3%, 64.7% 80.1%, 62.7% 81.4%, 60.5% 82.3%, 58.1% 82.6%, 55.7% 82.4%, 53.3% 81.7%, 51.1% 81.2%, 48.9% 81.2%, 46.7% 81.7%, 44.3% 82.4%, 41.9% 82.6%, 39.5% 82.3%, 37.3% 81.4%, 35.3% 80.1%, 33.7% 78.3%, 32.4% 76.1%, 30.9% 74.4%, 29.2% 73.1%, 27.1% 72.1%, 24.8% 71.1%, 22.9% 69.7%, 21.4% 67.9%, 20.4% 65.8%, 19.8% 63.4%, 19.8% 61%, 20.2% 58.6%, 20.1% 56.4%, 19.6% 54.3%, 18.6% 52.2%, 17.5% 50%, 17.1% 47.7%, 17.1% 45.4%, 17.7% 43.1%, 18.7% 41%, 20.3% 39.2%, 22.1% 37.6%, 23.4% 35.9%, 24.4% 34%, 24.9% 31.8%, 25.5% 29.5%, 26.6% 27.4%, 28.1% 25.6%, 29.9% 24.2%, 32% 23.3%, 34.3% 22.8%, 36.7% 22.7%, 38.8% 22.4%, 40.8% 21.6%, 42.6% 20.4%, 44.5% 18.9%, 46.6% 17.9%, 48.9% 17.4%, 51.1% 17.4%, 53.4% 17.9%, 55.5% 18.9%, 57.4% 20.4%, 59.2% 21.6%, 61.2% 22.4%, 63.3% 22.7%, 65.7% 22.8%, 68% 23.3%, 70.1% 24.2%, 71.9% 25.6%, 73.4% 27.4%, 74.5% 29.5%, 75.1% 31.8%, 75.6% 34%, 76.6% 35.9%, 77.9% 37.6%, 79.7% 39.2%, 81.3% 41%, 82.3% 43.1%, 82.9% 45.4%, 82.9% 47.7%)',\n oval: 'polygon(80% 50%, 79% 52%, 78.1% 53.9%, 77.1% 55.8%, 76% 57.5%, 75% 59.1%, 73.9% 60.6%, 72.8% 62.1%, 71.7% 63.5%, 70.5% 64.9%, 69.3% 66.2%, 68.1% 67.5%, 66.8% 68.7%, 65.6% 69.9%, 64.2% 71.1%, 62.8% 72.2%, 61.4% 73.3%, 59.9% 74.4%, 58.3% 75.5%, 56.6% 76.6%, 54.9% 77.6%, 53% 78.6%, 51% 79.5%, 48.9% 80.4%, 46.7% 81.2%, 44.4% 81.9%, 41.9% 82.4%, 39.3% 82.8%, 36.7% 83%, 34% 82.9%, 31.2% 82.5%, 28.6% 81.8%, 26.1% 80.6%, 23.8% 79.1%, 21.7% 77.3%, 20.1% 75.1%, 18.8% 72.7%, 17.8% 70.1%, 17.3% 67.4%, 17% 64.7%, 17.1% 62%, 17.4% 59.4%, 17.8% 56.8%, 18.5% 54.4%, 19.2% 52.2%, 20% 50%, 21% 48%, 21.9% 46.1%, 22.9% 44.2%, 24% 42.5%, 25% 40.9%, 26.1% 39.4%, 27.2% 37.9%, 28.3% 36.5%, 29.5% 35.1%, 30.7% 33.8%, 31.9% 32.5%, 33.2% 31.3%, 34.4% 30.1%, 35.8% 28.9%, 37.2% 27.8%, 38.6% 26.7%, 40.1% 25.6%, 41.7% 24.5%, 43.4% 23.4%, 45.1% 22.4%, 47% 21.4%, 49% 20.5%, 51.1% 19.6%, 53.3% 18.8%, 55.6% 18.1%, 58.1% 17.6%, 60.7% 17.2%, 63.3% 17%, 66% 17.1%, 68.8% 17.5%, 71.4% 18.2%, 73.9% 19.4%, 76.2% 20.9%, 78.3% 22.7%, 79.9% 24.9%, 81.2% 27.3%, 82.2% 29.9%, 82.7% 32.6%, 83% 35.3%, 82.9% 38%, 82.6% 40.6%, 82.2% 43.2%, 81.5% 45.6%, 80.8% 47.8%)',\n pentagon:\n 'polygon(82% 50%, 81.3% 52.2%, 80.6% 54.3%, 79.9% 56.4%, 79.2% 58.4%, 78.5% 60.4%, 77.9% 62.4%, 77.2% 64.5%, 76.5% 66.5%, 75.8% 68.7%, 75% 71%, 74.2% 73.4%, 73.1% 75.7%, 71.6% 77.7%, 69.7% 79.2%, 67.5% 80.3%, 65.1% 80.9%, 62.5% 81%, 60.1% 81%, 57.7% 81%, 55.5% 81%, 53.3% 81%, 51.1% 81%, 48.9% 81%, 46.7% 81%, 44.5% 81%, 42.3% 81%, 39.9% 81%, 37.5% 81%, 34.9% 80.9%, 32.5% 80.3%, 30.3% 79.2%, 28.4% 77.7%, 26.9% 75.7%, 25.8% 73.4%, 25% 71%, 24.2% 68.7%, 23.5% 66.5%, 22.8% 64.5%, 22.1% 62.4%, 21.5% 60.4%, 20.8% 58.4%, 20.1% 56.4%, 19.4% 54.3%, 18.7% 52.2%, 18% 50%, 17.3% 47.7%, 17% 45.4%, 17.3% 43%, 18% 40.8%, 19.2% 38.8%, 20.9% 37%, 22.9% 35.6%, 24.8% 34.2%, 26.6% 33%, 28.3% 31.8%, 29.9% 30.6%, 31.5% 29.5%, 33.1% 28.4%, 34.7% 27.3%, 36.2% 26.1%, 37.8% 25%, 39.4% 23.9%, 41.1% 22.7%, 42.9% 21.4%, 44.8% 20.3%, 46.8% 19.4%, 48.9% 19%, 51.1% 19%, 53.2% 19.4%, 55.2% 20.3%, 57.1% 21.4%, 58.9% 22.7%, 60.6% 23.9%, 62.2% 25%, 63.8% 26.1%, 65.3% 27.3%, 66.9% 28.4%, 68.5% 29.5%, 70.1% 30.6%, 71.7% 31.8%, 73.4% 33%, 75.2% 34.2%, 77.1% 35.6%, 79.1% 37%, 80.8% 38.8%, 82% 40.8%, 82.7% 43%, 83% 45.4%, 82.7% 47.7%)',\n pill: 'polygon(82.6% 50%, 82.1% 52.2%, 81.4% 54.4%, 80.6% 56.5%, 79.7% 58.5%, 78.6% 60.4%, 77.4% 62.2%, 76.1% 63.9%, 74.7% 65.4%, 73.2% 66.9%, 71.8% 68.3%, 70.4% 69.7%, 69% 71.1%, 67.6% 72.5%, 66.2% 73.9%, 64.7% 75.4%, 63.1% 76.8%, 61.3% 78%, 59.5% 79.2%, 57.5% 80.2%, 55.5% 81.1%, 53.3% 81.8%, 51.1% 82.4%, 48.9% 82.7%, 46.5% 83%, 44.2% 82.9%, 41.9% 82.6%, 39.5% 82.2%, 37.2% 81.7%, 34.9% 80.9%, 32.7% 79.9%, 30.6% 78.7%, 28.6% 77.4%, 26.7% 75.9%, 25% 74.2%, 23.4% 72.4%, 21.9% 70.4%, 20.7% 68.3%, 19.6% 66.2%, 18.7% 63.9%, 18% 61.6%, 17.5% 59.3%, 17.2% 57%, 17% 54.6%, 17.1% 52.3%, 17.4% 50%, 17.9% 47.8%, 18.6% 45.6%, 19.4% 43.5%, 20.3% 41.5%, 21.4% 39.6%, 22.6% 37.8%, 23.9% 36.1%, 25.3% 34.6%, 26.8% 33.1%, 28.2% 31.7%, 29.6% 30.3%, 31% 28.9%, 32.4% 27.5%, 33.8% 26.1%, 35.3% 24.6%, 36.9% 23.2%, 38.7% 22%, 40.5% 20.8%, 42.5% 19.8%, 44.5% 18.9%, 46.7% 18.2%, 48.9% 17.6%, 51.1% 17.3%, 53.5% 17%, 55.8% 17.1%, 58.1% 17.4%, 60.5% 17.8%, 62.8% 18.3%, 65.1% 19.1%, 67.3% 20.1%, 69.4% 21.3%, 71.4% 22.6%, 73.3% 24.1%, 75% 25.8%, 76.6% 27.6%, 78.1% 29.6%, 79.3% 31.7%, 80.4% 33.8%, 81.3% 36.1%, 82% 38.4%, 82.5% 40.7%, 82.8% 43%, 83% 45.4%, 82.9% 47.7%)',\n softBurst:\n 'polygon(76% 50%, 76.5% 51.9%, 78.3% 54%, 80.4% 56.5%, 81.5% 59%, 80.8% 61.2%, 78.3% 62.6%, 75.2% 63.4%, 72.5% 64.1%, 71% 65.3%, 70.4% 67.1%, 70.5% 69.8%, 70.8% 73.1%, 70.2% 75.9%, 68.3% 77.2%, 65.5% 76.9%, 62.5% 75.6%, 60% 74.6%, 58% 74.7%, 56.4% 75.8%, 55% 78.1%, 53.2% 80.9%, 51.1% 82.8%, 48.9% 82.8%, 46.8% 80.8%, 45% 78.1%, 43.6% 75.8%, 42% 74.7%, 40% 74.7%, 37.5% 75.7%, 34.5% 76.9%, 31.6% 77.2%, 29.8% 75.9%, 29.2% 73%, 29.5% 69.8%, 29.6% 67.1%, 29% 65.3%, 27.5% 64.1%, 24.8% 63.4%, 21.6% 62.6%, 19.2% 61.2%, 18.5% 59%, 19.7% 56.4%, 21.8% 54%, 23.5% 51.9%, 24% 50%, 23.5% 48.1%, 21.7% 46%, 19.6% 43.5%, 18.5% 41%, 19.2% 38.8%, 21.7% 37.4%, 24.8% 36.6%, 27.5% 35.9%, 29% 34.7%, 29.6% 32.9%, 29.5% 30.2%, 29.2% 26.9%, 29.8% 24.1%, 31.7% 22.8%, 34.5% 23.1%, 37.5% 24.4%, 40% 25.4%, 42% 25.3%, 43.6% 24.2%, 45% 21.9%, 46.8% 19.1%, 48.9% 17.2%, 51.1% 17.2%, 53.2% 19.2%, 55% 21.9%, 56.4% 24.2%, 58% 25.3%, 60% 25.3%, 62.5% 24.3%, 65.5% 23.1%, 68.4% 22.8%, 70.2% 24.1%, 70.8% 27%, 70.5% 30.2%, 70.4% 32.9%, 71% 34.7%, 72.5% 35.9%, 75.2% 36.6%, 78.4% 37.4%, 80.8% 38.8%, 81.5% 41%, 80.3% 43.6%, 78.2% 46%, 76.5% 48.1%)',\n sunny:\n 'polygon(83% 50%, 82.5% 52.3%, 80.9% 54.3%, 79.3% 56.2%, 77.8% 58%, 76.4% 59.6%, 75.6% 61.4%, 75.4% 63.5%, 75.2% 65.7%, 75% 68.2%, 74.7% 70.8%, 73.7% 72.9%, 71.9% 74.3%, 69.4% 74.9%, 66.9% 75.1%, 64.6% 75.3%, 62.4% 75.4%, 60.5% 75.9%, 58.8% 77.1%, 57.1% 78.6%, 55.3% 80.1%, 53.3% 81.8%, 51.1% 82.9%, 48.9% 82.9%, 46.7% 81.8%, 44.7% 80.1%, 42.9% 78.6%, 41.2% 77.1%, 39.5% 75.9%, 37.6% 75.4%, 35.4% 75.3%, 33.1% 75.1%, 30.6% 74.9%, 28.1% 74.3%, 26.3% 72.9%, 25.3% 70.8%, 25% 68.2%, 24.8% 65.7%, 24.6% 63.5%, 24.4% 61.4%, 23.6% 59.6%, 22.2% 58%, 20.7% 56.2%, 19.1% 54.3%, 17.5% 52.3%, 17% 50%, 17.5% 47.7%, 19.1% 45.7%, 20.7% 43.8%, 22.2% 42%, 23.6% 40.4%, 24.4% 38.6%, 24.6% 36.5%, 24.8% 34.3%, 25% 31.8%, 25.3% 29.2%, 26.3% 27.1%, 28.1% 25.7%, 30.6% 25.1%, 33.1% 24.9%, 35.4% 24.7%, 37.6% 24.6%, 39.5% 24.1%, 41.2% 22.9%, 42.9% 21.4%, 44.7% 19.9%, 46.7% 18.2%, 48.9% 17.1%, 51.1% 17.1%, 53.3% 18.2%, 55.3% 19.9%, 57.1% 21.4%, 58.8% 22.9%, 60.5% 24.1%, 62.4% 24.6%, 64.6% 24.7%, 66.9% 24.9%, 69.4% 25.1%, 71.9% 25.7%, 73.7% 27.1%, 74.7% 29.2%, 75% 31.8%, 75.2% 34.3%, 75.4% 36.5%, 75.6% 38.6%, 76.4% 40.4%, 77.8% 42%, 79.3% 43.8%, 80.9% 45.7%, 82.5% 47.7%)',\n} as const\n\n// The container's side, and the box the shapes' percentages are read on.\nconst SIZE = 48\nconst BOX = 100\nconst CENTRE = BOX / 2\n\n// The shapes in the order they morph through, each as its points' numbers,\n// x then y, read out of its polygon.\nconst SEQUENCE = [\n SHAPES.softBurst,\n SHAPES.cookie9Sided,\n SHAPES.pentagon,\n SHAPES.pill,\n SHAPES.sunny,\n SHAPES.cookie4Sided,\n SHAPES.oval,\n].map((polygon) => (polygon.match(/\\d+(?:\\.\\d+)?/gu) ?? []).map(Number))\n\n// One morph's interval, the morph's cycle through all seven, and the quarter\n// turns' cycle of four.\nconst MORPH_MS = 650\nconst MORPH_CYCLE_MS = MORPH_MS * SEQUENCE.length\nconst QUARTERS = 4\nconst TURN_CYCLE_MS = MORPH_MS * QUARTERS\nconst SPIN_MS = 4666\n\n// What reduced motion slows every animation by.\nconst SLOWDOWN = 1.25\n\n// The spring, sampled every 25ms of the 650ms interval, as web's `linear()`\n// writes it. It is within half a percent of rest by the end, and the last\n// sample is rest itself, so a morph lands exactly on its shape before the\n// next begins.\nconst SPRING: readonly Keyframe[] = [\n 0, 0.054, 0.185, 0.352, 0.527, 0.69, 0.827, 0.934, 1.011, 1.06, 1.086, 1.095,\n 1.091, 1.079, 1.063, 1.047, 1.031, 1.018, 1.007, 1, 0.995, 0.992, 0.991,\n 0.991, 0.992, 0.994, 1,\n].map((value, index, samples): Keyframe => [\n index / (samples.length - 1),\n value,\n])\n\nconst AnimatedPath = Animated.createAnimatedComponent(Path)\n\nconst stylesOf = themedStyles(({ colors, radii }) =>\n StyleSheet.create({\n contained: { backgroundColor: colors.primaryContainer },\n root: {\n alignItems: 'center',\n borderRadius: radii.circle,\n flexShrink: 0,\n height: SIZE,\n justifyContent: 'center',\n width: SIZE,\n },\n }),\n)\n\n/**\n * A shape morphing as it turns, for a wait of a few seconds whose length is\n * not worth showing, where it would otherwise be an indeterminate ring.\n *\n * ```tsx\n * <LoadingIndicator aria-label=\"Label\" />\n * ```\n *\n * A screen reader hears it as a busy progress bar. Name it with\n * `aria-label`, or `aria-labelledby` where something on the screen already\n * says what is loading. `style`, `ref` and `testID` land on the container,\n * which is the view a layout positions.\n */\nfunction LoadingIndicator({\n contained = false,\n style,\n ...props\n}: LoadingIndicatorProps) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const reduceMotion = useReducedMotion()\n const slowdown = reduceMotion ? SLOWDOWN : 1\n const morph = useLoop(MORPH_CYCLE_MS * slowdown, true)\n const turn = useLoop(TURN_CYCLE_MS * slowdown, true)\n const spin = useLoop(Math.round(SPIN_MS * slowdown), true)\n\n // The shape between the two either side of the morph's clock, turned by\n // the quarter turns gone and the one under way, on top of the spin. A\n // clock that reaches its end is on the last shape's way back to the first,\n // which is where it starts again.\n const shape = useAnimatedProps(() => {\n 'worklet'\n const morphed = morph.get() * SEQUENCE.length\n const from = Math.min(Math.floor(morphed), SEQUENCE.length - 1)\n const turned = turn.get() * QUARTERS\n const quarter = Math.floor(turned)\n const angle =\n TURN *\n ((quarter + keyframeAt(SPRING, turned - quarter)) / QUARTERS + spin.get())\n\n return {\n d: shapePath(\n SEQUENCE[from],\n SEQUENCE[(from + 1) % SEQUENCE.length],\n keyframeAt(SPRING, morphed - from),\n angle,\n CENTRE,\n ),\n }\n })\n\n return (\n <View\n accessible\n aria-busy\n role=\"progressbar\"\n {...props}\n style={composeStyles<ViewStyle>(\n own.root,\n contained ? own.contained : undefined,\n style,\n )}\n >\n <Svg {...HIDDEN} height={SIZE} viewBox={`0 0 ${BOX} ${BOX}`} width={SIZE}>\n <AnimatedPath\n animatedProps={shape}\n fill={\n contained ? theme.colors.onPrimaryContainer : theme.colors.primary\n }\n />\n </Svg>\n </View>\n )\n}\n\nexport { LoadingIndicator }\nexport type { LoadingIndicatorProps }\n"],"mappings":";;;;;;;;;;;AAsEA,MAAM0B,SAAS;CACbC,cACE;CACFC,cACE;CACFC,MAAM;CACNC,UACE;CACFC,MAAM;CACNC,WACE;CACFC,OACE;AACJ;AAGA,MAAME,OAAO;AACb,MAAMC,MAAM;AACZ,MAAMC,SAASD,MAAM;AAIrB,MAAME,WAAW;CACfZ,OAAOM;CACPN,OAAOE;CACPF,OAAOI;CACPJ,OAAOK;CACPL,OAAOO;CACPP,OAAOC;CACPD,OAAOG;AAAI,CACZ,CAACU,KAAKC,aAAaA,QAAQC,MAAM,iBAAiB,KAAK,CAAA,EAAA,CAAIF,IAAIG,MAAM,CAAC;AAIvE,MAAMC,WAAW;AACjB,MAAMC,iBAAiBD,WAAWL,SAASO;AAC3C,MAAMC,WAAW;AACjB,MAAMC,gBAAgBJ,WAAWG;AACjC,MAAME,UAAU;AAGhB,MAAMC,WAAW;AAMjB,MAAMC,SAA8B;CAClC;CAAG;CAAO;CAAO;CAAO;CAAO;CAAM;CAAO;CAAO;CAAO;CAAM;CAAO;CACvE;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAG;CAAO;CAAO;CAClE;CAAO;CA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AlBRC,KAAA,oBAAC,IAAD;GACE,YAAAR;GACA,aAAAC;GACK,MAAAC;GAAa,GACd1B;GACG,OAAA2B;GAMPI,UAAAA;EAXG,CAAA;EAmBEjC,EAAA,KAAAyB;EAAAzB,EAAA,MAAAE;EAAAF,EAAA,MAAA6B;EAAA7B,EAAA,MAAAiC;EAAAjC,EAAA,MAAAkC;CAAA,OAAAA,KAAAlC,EAAA;CAAA,OAnBPkC;AAmBO"}
|
|
@@ -6,8 +6,8 @@ import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
|
6
6
|
import { RowContent, rowStyleOf } from "../../row/index.js";
|
|
7
7
|
import { useMessages } from "../../i18n/provider.js";
|
|
8
8
|
import { CheckGlyph, ChevronEndGlyph } from "../../glyphs/index.js";
|
|
9
|
-
import { refsOf } from "../../ref/index.js";
|
|
10
9
|
import { useOpenLink } from "../../router/index.js";
|
|
10
|
+
import { refsOf } from "../../ref/index.js";
|
|
11
11
|
import { ButtonSlotContext } from "../../button/slots.js";
|
|
12
12
|
import { ProgressIndicator } from "../progress-indicator/index.js";
|
|
13
13
|
import { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, useReturnFocus } from "../../overlay/panel.js";
|