@kanso-labs/react-native-kanso-ui 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +4 -1
  2. package/dist/badge/index.js +74 -0
  3. package/dist/badge/index.js.map +1 -0
  4. package/dist/badge/styles.js +51 -0
  5. package/dist/badge/styles.js.map +1 -0
  6. package/dist/button/index.d.ts +1 -1
  7. package/dist/button/index.js +1 -1
  8. package/dist/button/pending.js +1 -1
  9. package/dist/button/slots.d.ts +2 -2
  10. package/dist/chip/index.js +2 -2
  11. package/dist/components/app-bar/index.d.ts +111 -0
  12. package/dist/components/app-bar/index.js +341 -0
  13. package/dist/components/app-bar/index.js.map +1 -0
  14. package/dist/components/avatar/index.d.ts +1 -1
  15. package/dist/components/button/index.d.ts +1 -1
  16. package/dist/components/button/index.js +2 -2
  17. package/dist/components/card/index.d.ts +1 -1
  18. package/dist/components/card/index.js +3 -3
  19. package/dist/components/checkbox/index.d.ts +1 -1
  20. package/dist/components/checkbox/index.js +1 -1
  21. package/dist/components/chip/index.d.ts +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chip-group/index.d.ts +1 -1
  24. package/dist/components/chip-group/index.js +4 -4
  25. package/dist/components/copy-field/index.d.ts +1 -1
  26. package/dist/components/copy-field/index.js +1 -1
  27. package/dist/components/currency/index.d.ts +1 -1
  28. package/dist/components/currency/index.js +1 -1
  29. package/dist/components/dialog/index.d.ts +1 -1
  30. package/dist/components/dialog/index.js +2 -2
  31. package/dist/components/icon-button/index.d.ts +1 -1
  32. package/dist/components/icon-button/index.js +2 -2
  33. package/dist/components/link/index.d.ts +1 -1
  34. package/dist/components/link/index.js +3 -3
  35. package/dist/components/list/index.d.ts +1 -1
  36. package/dist/components/list/index.js +5 -5
  37. package/dist/components/list-detail/index.d.ts +56 -0
  38. package/dist/components/list-detail/index.js +169 -0
  39. package/dist/components/list-detail/index.js.map +1 -0
  40. package/dist/components/list-item/index.d.ts +1 -1
  41. package/dist/components/list-item/index.js +1 -1
  42. package/dist/components/menu/index.d.ts +1 -1
  43. package/dist/components/menu/index.js +6 -6
  44. package/dist/components/meter/index.d.ts +1 -1
  45. package/dist/components/meter/index.js +1 -1
  46. package/dist/components/navigation-bar/index.d.ts +170 -0
  47. package/dist/components/navigation-bar/index.js +494 -0
  48. package/dist/components/navigation-bar/index.js.map +1 -0
  49. package/dist/components/number-field/index.d.ts +1 -1
  50. package/dist/components/number-field/index.js +5 -5
  51. package/dist/components/popover/index.d.ts +1 -1
  52. package/dist/components/popover/index.js +2 -2
  53. package/dist/components/product-icon/index.d.ts +1 -1
  54. package/dist/components/progress-indicator/index.d.ts +1 -1
  55. package/dist/components/progress-indicator/index.js +3 -3
  56. package/dist/components/radio-group/index.d.ts +1 -1
  57. package/dist/components/radio-group/index.js +3 -3
  58. package/dist/components/search-field/index.d.ts +1 -1
  59. package/dist/components/search-field/index.js +5 -5
  60. package/dist/components/segmented-button/index.d.ts +1 -1
  61. package/dist/components/segmented-button/index.js +5 -5
  62. package/dist/components/separator/index.d.ts +1 -1
  63. package/dist/components/separator/index.js +1 -1
  64. package/dist/components/sheet/index.d.ts +1 -1
  65. package/dist/components/sheet/index.js +3 -3
  66. package/dist/components/snackbar/index.d.ts +1 -1
  67. package/dist/components/snackbar/index.js +4 -4
  68. package/dist/components/stack/index.d.ts +1 -1
  69. package/dist/components/stack/index.js +1 -1
  70. package/dist/components/switch/index.d.ts +1 -1
  71. package/dist/components/switch/index.js +4 -4
  72. package/dist/components/text/index.d.ts +1 -1
  73. package/dist/components/text/index.js +1 -1
  74. package/dist/components/text-field/index.d.ts +1 -1
  75. package/dist/components/text-field/index.js +1 -1
  76. package/dist/control/checkbox-box.js +2 -2
  77. package/dist/control/index.js +1 -1
  78. package/dist/field/index.d.ts +1 -1
  79. package/dist/field/index.js +4 -4
  80. package/dist/form/index.d.ts +1 -1
  81. package/dist/glyphs/index.js +2 -2
  82. package/dist/hooks/useAppBarScroll.d.ts +56 -0
  83. package/dist/hooks/useAppBarScroll.js +87 -0
  84. package/dist/hooks/useAppBarScroll.js.map +1 -0
  85. package/dist/index.d.ts +7 -3
  86. package/dist/index.js +7 -3
  87. package/dist/indicator/index.d.ts +2 -2
  88. package/dist/indicator/index.js +3 -3
  89. package/dist/indicator/motion.js +1 -1
  90. package/dist/mark/index.d.ts +1 -1
  91. package/dist/mark/index.js +2 -2
  92. package/dist/modal/index.d.ts +1 -1
  93. package/dist/modal/index.js +2 -2
  94. package/dist/navigation/index.d.ts +29 -0
  95. package/dist/navigation/index.js +405 -0
  96. package/dist/navigation/index.js.map +1 -0
  97. package/dist/navigation/styles.js +61 -0
  98. package/dist/navigation/styles.js.map +1 -0
  99. package/dist/overlay/anchored.d.ts +2 -2
  100. package/dist/overlay/anchored.js +1 -1
  101. package/dist/overlay/host.d.ts +2 -2
  102. package/dist/overlay/host.js +1 -1
  103. package/dist/overlay/panel.js +2 -2
  104. package/dist/press/index.js +75 -69
  105. package/dist/press/index.js.map +1 -1
  106. package/dist/router/index.js +1 -1
  107. package/dist/row/index.js +1 -1
  108. package/dist/theme/scope.js +1 -1
  109. package/dist/theme-scope.d.ts +1 -1
  110. package/dist/theme-scope.js +1 -1
  111. package/dist/typography/fonts.js +1 -1
  112. package/package.json +2 -2
@@ -1,15 +1,15 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
+ import { hitSlop, usePressFeedback } from "../../press/index.js";
3
4
  import { useTypeRole } from "../../typography/roles.js";
4
5
  import { withOpacity } from "../../theme/color.js";
5
- import { hitSlop, usePressFeedback } from "../../press/index.js";
6
6
  import { controlStylesOf } from "../../control/styles.js";
7
7
  import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { createContext, use, useId } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
12
10
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, withTiming } from "react-native-reanimated";
11
+ import { createContext, use, useId } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { useRadioGroupState } from "react-stately/useRadioGroupState";
14
14
  //#region src/components/radio-group/index.tsx
15
15
  const RING_SIZE = 20;
@@ -1,6 +1,6 @@
1
1
  import { ValidationResult } from "../../form/index.js";
2
- import { ComponentRef, Ref } from "react";
3
2
  import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
3
+ import { ComponentRef, Ref } from "react";
4
4
  //#region src/components/search-field/index.d.ts
5
5
  type SearchFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilityLabel' | 'aria-disabled' | 'aria-label' | 'children' | 'cursorColor' | 'defaultValue' | 'editable' | 'multiline' | 'numberOfLines' | 'onChange' | 'onChangeText' | 'placeholderTextColor' | 'readOnly' | 'returnKeyType' | 'role' | 'selectionColor' | 'style' | 'underlineColorAndroid' | 'value'> & {
6
6
  /**
@@ -1,17 +1,17 @@
1
- import { AutocompleteContext } from "../../autocomplete/index.js";
2
1
  import { IconStyleContext } from "../../glyphs/icon-style.js";
3
- import { CloseGlyph, SearchGlyph } from "../../glyphs/index.js";
4
2
  import { useTheme } from "../../theme/scope.js";
5
3
  import { composeStyles, themedStyles } from "../../theme/styles.js";
6
- import { useFieldValidation } from "../../form/index.js";
7
- import { withOpacity } from "../../theme/color.js";
8
4
  import { usePressFeedback } from "../../press/index.js";
5
+ import { withOpacity } from "../../theme/color.js";
6
+ import { AutocompleteContext } from "../../autocomplete/index.js";
7
+ import { CloseGlyph, SearchGlyph } from "../../glyphs/index.js";
8
+ import { useFieldValidation } from "../../form/index.js";
9
9
  import { IconButton } from "../icon-button/index.js";
10
10
  import { FieldInput, FieldMessage, FieldStates, FieldStroke, describedBy, useFieldFocus, useStrokeMotion } from "../../field/index.js";
11
11
  import { c } from "react/compiler-runtime";
12
+ import { Pressable, StyleSheet, View, useWindowDimensions } from "react-native";
12
13
  import { use, useId, useImperativeHandle, useRef, useState } from "react";
13
14
  import { jsx, jsxs } from "react/jsx-runtime";
14
- import { Pressable, StyleSheet, View, useWindowDimensions } from "react-native";
15
15
  //#region src/components/search-field/index.tsx
16
16
  const ICON_SIZE = 24;
17
17
  const MAX_WIDTH = 720;
@@ -1,5 +1,5 @@
1
- import { ComponentRef, ReactNode, Ref } from "react";
2
1
  import { PressableProps, StyleProp, View, ViewProps, ViewStyle } from "react-native";
2
+ import { ComponentRef, ReactNode, Ref } from "react";
3
3
  import { Key } from "react-stately";
4
4
  //#region src/components/segmented-button/index.d.ts
5
5
  /** A name for the set: its own label, or the id of what labels it. */
@@ -1,16 +1,16 @@
1
1
  import { IconStyleContext } from "../../glyphs/icon-style.js";
2
- import { CheckGlyph } from "../../glyphs/index.js";
3
2
  import { useTheme } from "../../theme/scope.js";
4
3
  import { composeStyles, themedStyles } from "../../theme/styles.js";
4
+ import { hitSlop, usePressFeedback } from "../../press/index.js";
5
5
  import { useTypeRole } from "../../typography/roles.js";
6
- import { toggleState } from "../../button/index.js";
7
6
  import { withOpacity } from "../../theme/color.js";
8
- import { hitSlop, usePressFeedback } from "../../press/index.js";
7
+ import { CheckGlyph } from "../../glyphs/index.js";
8
+ import { toggleState } from "../../button/index.js";
9
9
  import { c } from "react/compiler-runtime";
10
- import { Children, Fragment, createContext, isValidElement, use, useLayoutEffect, useRef, useState } from "react";
11
- import { jsx, jsxs } from "react/jsx-runtime";
12
10
  import { Pressable, StyleSheet, Text, View } from "react-native";
13
11
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
12
+ import { Children, Fragment, createContext, isValidElement, use, useLayoutEffect, useRef, useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { useToggleGroupState } from "react-stately/useToggleGroupState";
15
15
  //#region src/components/segmented-button/index.tsx
16
16
  const GLYPH_SIZE = 18;
@@ -1,5 +1,5 @@
1
- import { ComponentRef, Ref } from "react";
2
1
  import { View, ViewProps } from "react-native";
2
+ import { ComponentRef, Ref } from "react";
3
3
  //#region src/components/separator/index.d.ts
4
4
  type SeparatorInset = 'both' | 'none' | 'start';
5
5
  type SeparatorProps = ViewProps & {
@@ -1,8 +1,8 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
4
  import { StyleSheet, View } from "react-native";
5
+ import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/separator/index.tsx
7
7
  const styles = StyleSheet.create({
8
8
  horizontal: {
@@ -1,6 +1,6 @@
1
1
  import { ModalOpenProps } from "../../modal/index.js";
2
- import { ComponentRef, ReactNode, Ref } from "react";
3
2
  import { HostInstance, ScrollView, ScrollViewProps, StyleProp, TextProps, View, ViewProps, ViewStyle } from "react-native";
3
+ import { ComponentRef, ReactNode, Ref } from "react";
4
4
  //#region src/components/sheet/index.d.ts
5
5
  type SheetBodyProps = ScrollViewProps & {
6
6
  readonly ref?: Ref<ComponentRef<typeof ScrollView>>;
@@ -1,18 +1,18 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
+ import { usePressFeedback } from "../../press/index.js";
3
4
  import { useTypeRole } from "../../typography/roles.js";
4
5
  import { refsOf } from "../../ref/index.js";
5
6
  import { ButtonSlotContext } from "../../button/slots.js";
6
7
  import { messagesFor } from "../../i18n/index.js";
7
- import { usePressFeedback } from "../../press/index.js";
8
8
  import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
9
9
  import { ModalWindow, NO_INSETS, insetsOf, panelRoleOf, useModalState, useModalTrigger } from "../../modal/index.js";
10
10
  import { c } from "react/compiler-runtime";
11
- import { createContext, use, useEffect, useId, useState } from "react";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
11
  import { I18nManager, Pressable, ScrollView, StyleSheet, Text, View, useWindowDimensions } from "react-native";
14
12
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
15
13
  import { SafeAreaInsetsContext } from "react-native-safe-area-context";
14
+ import { createContext, use, useEffect, useId, useState } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
16
  import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
17
17
  //#region src/components/sheet/index.tsx
18
18
  const SIDE_WIDTH = 400;
@@ -1,5 +1,5 @@
1
- import { ComponentRef, Ref } from "react";
2
1
  import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
2
+ import { ComponentRef, Ref } from "react";
3
3
  //#region src/components/snackbar/index.d.ts
4
4
  type ShownMessage = {
5
5
  readonly action: SnackbarAction | undefined;
@@ -1,16 +1,16 @@
1
- import { CloseGlyph } from "../../glyphs/index.js";
2
1
  import { useTheme } from "../../theme/scope.js";
3
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
4
- import { useTypeRole } from "../../typography/roles.js";
5
3
  import { hitSlop, usePressFeedback } from "../../press/index.js";
4
+ import { useTypeRole } from "../../typography/roles.js";
5
+ import { CloseGlyph } from "../../glyphs/index.js";
6
6
  import { useWindowSizeClass } from "../../hooks/useWindowSizeClass.js";
7
7
  import { Overlay } from "../../overlay/host.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { use, useEffect, useRef, useState, useSyncExternalStore } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { AccessibilityInfo, Platform, Pressable, StyleSheet, Text, View } from "react-native";
12
10
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
13
11
  import { SafeAreaInsetsContext } from "react-native-safe-area-context";
12
+ import { use, useEffect, useRef, useState, useSyncExternalStore } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region src/components/snackbar/index.tsx
15
15
  const MESSAGE_MS = 5e3;
16
16
  const UNTIL_CLOSED = 0;
@@ -1,5 +1,5 @@
1
- import { ComponentRef, Ref } from "react";
2
1
  import { View, ViewProps } from "react-native";
2
+ import { ComponentRef, Ref } from "react";
3
3
  //#region src/components/stack/index.d.ts
4
4
  type StackAlign = 'baseline' | 'center' | 'end' | 'start' | 'stretch';
5
5
  type StackGap = 'lg' | 'md' | 'none' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs' | 'xxxl';
@@ -1,8 +1,8 @@
1
1
  import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
4
  import { StyleSheet, View } from "react-native";
5
+ import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/stack/index.tsx
7
7
  const alignments = StyleSheet.create({
8
8
  baseline: { alignItems: "baseline" },
@@ -1,5 +1,5 @@
1
- import { ComponentRef, ReactNode, Ref } from "react";
2
1
  import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
2
+ import { ComponentRef, ReactNode, Ref } from "react";
3
3
  //#region src/components/switch/index.d.ts
4
4
  type SwitchProps = Omit<ViewProps, 'children' | 'style'> & {
5
5
  /**
@@ -1,15 +1,15 @@
1
- import { CheckGlyph } from "../../glyphs/index.js";
2
1
  import { useTheme } from "../../theme/scope.js";
3
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
4
- import { withOpacity } from "../../theme/color.js";
5
3
  import { hitSlop, usePressFeedback } from "../../press/index.js";
4
+ import { withOpacity } from "../../theme/color.js";
5
+ import { CheckGlyph } from "../../glyphs/index.js";
6
6
  import { controlStylesOf } from "../../control/styles.js";
7
7
  import { ControlLabel, ControlMessage, describedBy, messageOf } from "../../control/index.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { useId, useState } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { I18nManager, Platform, Pressable, StyleSheet, View } from "react-native";
12
10
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
11
+ import { useId, useState } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { useToggleState } from "react-stately/useToggleState";
14
14
  import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
15
15
  //#region src/components/switch/index.tsx
@@ -1,6 +1,6 @@
1
1
  import { TypeRole } from "../../typography/roles.js";
2
- import { ComponentRef, Ref } from "react";
3
2
  import { Text, TextProps } from "react-native";
3
+ import { ComponentRef, Ref } from "react";
4
4
  //#region src/components/text/index.d.ts
5
5
  type TextProps$1 = TextProps & {
6
6
  readonly ref?: Ref<ComponentRef<typeof Text>>;
@@ -2,8 +2,8 @@ import { useTheme } from "../../theme/scope.js";
2
2
  import { composeStyles, themedStyles } from "../../theme/styles.js";
3
3
  import { useTypeRole } from "../../typography/roles.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { jsx } from "react/jsx-runtime";
6
5
  import { StyleSheet, Text } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/text/index.tsx
8
8
  const stylesOf = themedStyles(({ colors }) => StyleSheet.create({
9
9
  error: { color: colors.error },
@@ -1,7 +1,7 @@
1
1
  import { ValidationResult } from "../../form/index.js";
2
2
  import { FieldVariant } from "../../field/index.js";
3
- import { ComponentRef, ReactNode, Ref } from "react";
4
3
  import { StyleProp, TextInput, TextInputProps, View, ViewStyle } from "react-native";
4
+ import { ComponentRef, ReactNode, Ref } from "react";
5
5
  //#region src/components/text-field/index.d.ts
6
6
  type TextFieldProps = Omit<TextInputProps, 'accessibilityHint' | 'accessibilityLabel' | 'aria-disabled' | 'aria-label' | 'children' | 'cursorColor' | 'defaultValue' | 'editable' | 'multiline' | 'numberOfLines' | 'onChange' | 'onChangeText' | 'placeholder' | 'placeholderTextColor' | 'readOnly' | 'selectionColor' | 'style' | 'underlineColorAndroid' | 'value'> & {
7
7
  /**
@@ -1,9 +1,9 @@
1
1
  import { useFieldValidation } from "../../form/index.js";
2
2
  import { FieldBox, FieldInput, FieldMessage, describedBy, useFieldFocus } from "../../field/index.js";
3
3
  import { c } from "react/compiler-runtime";
4
+ import { View } from "react-native";
4
5
  import { useId, useImperativeHandle, useRef, useState } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { View } from "react-native";
7
7
  //#region src/components/text-field/index.tsx
8
8
  function blurThen(onBlur, then) {
9
9
  return (event) => {
@@ -1,11 +1,11 @@
1
- import { CheckGlyph, IndeterminateGlyph } from "../glyphs/index.js";
2
1
  import { useTheme } from "../theme/scope.js";
3
2
  import { composeStyles } from "../theme/styles.js";
4
3
  import { withOpacity } from "../theme/color.js";
4
+ import { CheckGlyph, IndeterminateGlyph } from "../glyphs/index.js";
5
5
  import { c } from "react/compiler-runtime";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
6
  import { StyleSheet } from "react-native";
8
7
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, withTiming } from "react-native-reanimated";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/control/checkbox-box.tsx
10
10
  const BOX_SIZE = 18;
11
11
  const styles = StyleSheet.create({ box: {
@@ -3,8 +3,8 @@ import { composeStyles } from "../theme/styles.js";
3
3
  import { useTypeRole } from "../typography/roles.js";
4
4
  import { controlStylesOf } from "./styles.js";
5
5
  import { c } from "react/compiler-runtime";
6
- import { jsx } from "react/jsx-runtime";
7
6
  import { Platform, Text, View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
8
  //#region src/control/index.tsx
9
9
  const HIDDEN = {
10
10
  accessibilityElementsHidden: true,
@@ -1,6 +1,6 @@
1
- import { ComponentRef, ReactNode, Ref, RefObject } from "react";
2
1
  import { StyleProp, TextInput, TextInputProps, ViewStyle } from "react-native";
3
2
  import "react-native-reanimated";
3
+ import { ComponentRef, ReactNode, Ref, RefObject } from "react";
4
4
  //#region src/field/index.d.ts
5
5
  /**
6
6
  * The filled box, or the outlined one: no fill, an outline that thickens and
@@ -1,17 +1,17 @@
1
1
  import { IconStyleContext } from "../glyphs/icon-style.js";
2
2
  import { useTheme } from "../theme/scope.js";
3
3
  import { composeStyles } from "../theme/styles.js";
4
+ import { usePressFeedback } from "../press/index.js";
4
5
  import { useFontFamily } from "../typography/fonts.js";
5
6
  import { useTypeRole } from "../typography/roles.js";
6
- import { useInsideForm } from "../form/index.js";
7
7
  import { withOpacity } from "../theme/color.js";
8
- import { usePressFeedback } from "../press/index.js";
8
+ import { useInsideForm } from "../form/index.js";
9
9
  import { fieldStylesOf } from "./styles.js";
10
10
  import { c } from "react/compiler-runtime";
11
- import { createContext, use, useEffect, useId, useRef, useState } from "react";
12
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
11
  import { AccessibilityInfo, Platform, Pressable, Text, TextInput, View, useWindowDimensions } from "react-native";
14
12
  import Animated, { Easing, useAnimatedStyle, useDerivedValue, useReducedMotion, withTiming } from "react-native-reanimated";
13
+ import { createContext, use, useEffect, useId, useRef, useState } from "react";
14
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
15
  //#region src/field/index.tsx
16
16
  const ICON_SIZE = 24;
17
17
  const OUTSIDE_BOX = {
@@ -1,5 +1,5 @@
1
- import { ComponentRef, RefObject } from "react";
2
1
  import { TextInput } from "react-native";
2
+ import { ComponentRef, RefObject } from "react";
3
3
  //#region src/form/index.d.ts
4
4
  /**
5
5
  * `aria` shows a field's error as soon as the field says so, and lets the
@@ -1,9 +1,9 @@
1
- import { HIDDEN } from "./hidden.js";
2
1
  import { useIconStyle } from "./icon-style.js";
2
+ import { HIDDEN } from "./hidden.js";
3
3
  import { glyphStyles } from "./styles.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { jsx } from "react/jsx-runtime";
6
5
  import { I18nManager, StyleSheet } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
7
  import Svg, { Path } from "react-native-svg";
8
8
  //#region src/glyphs/index.tsx
9
9
  function CheckGlyph(props) {
@@ -0,0 +1,56 @@
1
+ import { LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent } from "react-native";
2
+ //#region src/hooks/useAppBarScroll.d.ts
3
+ type AppBarScroll = {
4
+ /** For the bar's `collapsed`. */
5
+ readonly collapsed: boolean;
6
+ /**
7
+ * For the bar's `onLayout`. The bar's height is what tells the hook how
8
+ * much room collapsing gives back, so without it every screen counts as
9
+ * long enough to collapse on.
10
+ */
11
+ readonly onLayout: (event: LayoutChangeEvent) => void;
12
+ /** For the `onScroll` of the view that scrolls. */
13
+ readonly onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
14
+ /** For the bar's `scrolled`. */
15
+ readonly scrolled: boolean;
16
+ };
17
+ type AppBarScrollOptions = {
18
+ /**
19
+ * How far the screen scrolls, in dp, before the bar collapses. It expands
20
+ * again once the screen is scrolled back to this offset or less.
21
+ * @default 0
22
+ */
23
+ readonly collapseAfter?: number;
24
+ };
25
+ /**
26
+ * Derives an `AppBar`'s `scrolled` and `collapsed` from the view its screen
27
+ * scrolls in. Pass `onLayout` to the bar and `onScroll` to that view, and
28
+ * hand the bar the two states.
29
+ *
30
+ * ```tsx
31
+ * const { collapsed, onLayout, onScroll, scrolled } = useAppBarScroll()
32
+ *
33
+ * <AppBar collapsed={collapsed} onLayout={onLayout} pinned scrolled={scrolled} size="lg" />
34
+ * <ScrollView onScroll={onScroll} scrollEventThrottle={16}>…</ScrollView>
35
+ * ```
36
+ *
37
+ * `onScroll` is a plain handler, so it fits any scroll view: a `ScrollView`,
38
+ * a `FlatList`, the library's `List`, and Reanimated's animated ones. Give
39
+ * the view a `scrollEventThrottle` of 16, so the event comes once a frame:
40
+ * React Native's default of 0 sends it once each time the view is scrolled.
41
+ *
42
+ * It collapses the bar only on a screen long enough to stay collapsed.
43
+ * Collapsing shortens the bar, which the scroll view below it grows into, so
44
+ * a screen that overflows by less than the height the bar gives back plus
45
+ * `collapseAfter` cannot scroll that far any more: the offset is pulled back
46
+ * inside the shorter content, below `collapseAfter`, the bar expands, and
47
+ * the two take turns on every scroll event. On such a screen the bar stays
48
+ * expanded, which is also all there is room for. The bar's height counts its
49
+ * safe-area inset as well, which collapsing keeps, so a screen that only
50
+ * just overflows by enough is taken to be too short, and the bar stays
51
+ * expanded there too.
52
+ */
53
+ declare function useAppBarScroll({ collapseAfter }?: AppBarScrollOptions): AppBarScroll;
54
+ //#endregion
55
+ export { type AppBarScroll, type AppBarScrollOptions, useAppBarScroll };
56
+ //# sourceMappingURL=useAppBarScroll.d.ts.map
@@ -0,0 +1,87 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { useRef, useState } from "react";
3
+ /**
4
+ * Derives an `AppBar`'s `scrolled` and `collapsed` from the view its screen
5
+ * scrolls in. Pass `onLayout` to the bar and `onScroll` to that view, and
6
+ * hand the bar the two states.
7
+ *
8
+ * ```tsx
9
+ * const { collapsed, onLayout, onScroll, scrolled } = useAppBarScroll()
10
+ *
11
+ * <AppBar collapsed={collapsed} onLayout={onLayout} pinned scrolled={scrolled} size="lg" />
12
+ * <ScrollView onScroll={onScroll} scrollEventThrottle={16}>…</ScrollView>
13
+ * ```
14
+ *
15
+ * `onScroll` is a plain handler, so it fits any scroll view: a `ScrollView`,
16
+ * a `FlatList`, the library's `List`, and Reanimated's animated ones. Give
17
+ * the view a `scrollEventThrottle` of 16, so the event comes once a frame:
18
+ * React Native's default of 0 sends it once each time the view is scrolled.
19
+ *
20
+ * It collapses the bar only on a screen long enough to stay collapsed.
21
+ * Collapsing shortens the bar, which the scroll view below it grows into, so
22
+ * a screen that overflows by less than the height the bar gives back plus
23
+ * `collapseAfter` cannot scroll that far any more: the offset is pulled back
24
+ * inside the shorter content, below `collapseAfter`, the bar expands, and
25
+ * the two take turns on every scroll event. On such a screen the bar stays
26
+ * expanded, which is also all there is room for. The bar's height counts its
27
+ * safe-area inset as well, which collapsing keeps, so a screen that only
28
+ * just overflows by enough is taken to be too short, and the bar stays
29
+ * expanded there too.
30
+ */
31
+ function useAppBarScroll(t0) {
32
+ const $ = c(10);
33
+ let t1;
34
+ if ($[0] !== t0) {
35
+ t1 = t0 === void 0 ? {} : t0;
36
+ $[0] = t0;
37
+ $[1] = t1;
38
+ } else t1 = $[1];
39
+ const { collapseAfter: t2 } = t1;
40
+ const collapseAfter = t2 === void 0 ? 0 : t2;
41
+ const height = useRef(64);
42
+ const [collapsed, setCollapsed] = useState(false);
43
+ const [scrolled, setScrolled] = useState(false);
44
+ let t3;
45
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
46
+ t3 = (event) => {
47
+ height.current = event.nativeEvent.layout.height;
48
+ };
49
+ $[2] = t3;
50
+ } else t3 = $[2];
51
+ const onLayout = t3;
52
+ let t4;
53
+ if ($[3] !== collapseAfter || $[4] !== collapsed) {
54
+ t4 = (event_0) => {
55
+ const { contentOffset, contentSize, layoutMeasurement } = event_0.nativeEvent;
56
+ const offset = contentOffset.y;
57
+ setScrolled(offset > 0);
58
+ if (offset <= collapseAfter) setCollapsed(false);
59
+ else if (!collapsed) {
60
+ const givesBack = Math.max(0, height.current - 64);
61
+ setCollapsed(contentSize.height - layoutMeasurement.height - givesBack > collapseAfter);
62
+ }
63
+ };
64
+ $[3] = collapseAfter;
65
+ $[4] = collapsed;
66
+ $[5] = t4;
67
+ } else t4 = $[5];
68
+ const onScroll = t4;
69
+ let t5;
70
+ if ($[6] !== collapsed || $[7] !== onScroll || $[8] !== scrolled) {
71
+ t5 = {
72
+ collapsed,
73
+ onLayout,
74
+ onScroll,
75
+ scrolled
76
+ };
77
+ $[6] = collapsed;
78
+ $[7] = onScroll;
79
+ $[8] = scrolled;
80
+ $[9] = t5;
81
+ } else t5 = $[9];
82
+ return t5;
83
+ }
84
+ //#endregion
85
+ export { useAppBarScroll };
86
+
87
+ //# sourceMappingURL=useAppBarScroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppBarScroll.js","names":["LayoutChangeEvent","NativeScrollEvent","NativeSyntheticEvent","useRef","useState","COLLAPSED_BLOCK_SIZE","AppBarScroll","collapsed","onLayout","event","onScroll","scrolled","AppBarScrollOptions","collapseAfter","useAppBarScroll","t0","$","_c","t1","undefined","t2","height","setCollapsed","setScrolled","t3","Symbol","for","current","nativeEvent","layout","t4","event_0","contentOffset","contentSize","layoutMeasurement","offset","y","givesBack","Math","max","t5","_c"],"sources":["../../src/hooks/useAppBarScroll.ts"],"sourcesContent":["import type {\n LayoutChangeEvent,\n NativeScrollEvent,\n NativeSyntheticEvent,\n} from 'react-native'\n\nimport { useRef, useState } from 'react'\n\n/**\n * The small bar's height in dp, which is what a flexible bar collapses to.\n * AppBar draws its small height from this, so the hook's arithmetic and the\n * bar it measures cannot disagree.\n */\nconst COLLAPSED_BLOCK_SIZE = 64\n\ntype AppBarScroll = {\n /** For the bar's `collapsed`. */\n readonly collapsed: boolean\n /**\n * For the bar's `onLayout`. The bar's height is what tells the hook how\n * much room collapsing gives back, so without it every screen counts as\n * long enough to collapse on.\n */\n readonly onLayout: (event: LayoutChangeEvent) => void\n /** For the `onScroll` of the view that scrolls. */\n readonly onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void\n /** For the bar's `scrolled`. */\n readonly scrolled: boolean\n}\n\ntype AppBarScrollOptions = {\n /**\n * How far the screen scrolls, in dp, before the bar collapses. It expands\n * again once the screen is scrolled back to this offset or less.\n * @default 0\n */\n readonly collapseAfter?: number\n}\n\n/**\n * Derives an `AppBar`'s `scrolled` and `collapsed` from the view its screen\n * scrolls in. Pass `onLayout` to the bar and `onScroll` to that view, and\n * hand the bar the two states.\n *\n * ```tsx\n * const { collapsed, onLayout, onScroll, scrolled } = useAppBarScroll()\n *\n * <AppBar collapsed={collapsed} onLayout={onLayout} pinned scrolled={scrolled} size=\"lg\" />\n * <ScrollView onScroll={onScroll} scrollEventThrottle={16}>…</ScrollView>\n * ```\n *\n * `onScroll` is a plain handler, so it fits any scroll view: a `ScrollView`,\n * a `FlatList`, the library's `List`, and Reanimated's animated ones. Give\n * the view a `scrollEventThrottle` of 16, so the event comes once a frame:\n * React Native's default of 0 sends it once each time the view is scrolled.\n *\n * It collapses the bar only on a screen long enough to stay collapsed.\n * Collapsing shortens the bar, which the scroll view below it grows into, so\n * a screen that overflows by less than the height the bar gives back plus\n * `collapseAfter` cannot scroll that far any more: the offset is pulled back\n * inside the shorter content, below `collapseAfter`, the bar expands, and\n * the two take turns on every scroll event. On such a screen the bar stays\n * expanded, which is also all there is room for. The bar's height counts its\n * safe-area inset as well, which collapsing keeps, so a screen that only\n * just overflows by enough is taken to be too short, and the bar stays\n * expanded there too.\n */\nfunction useAppBarScroll({\n collapseAfter = 0,\n}: AppBarScrollOptions = {}): AppBarScroll {\n const height = useRef(COLLAPSED_BLOCK_SIZE)\n const [collapsed, setCollapsed] = useState(false)\n const [scrolled, setScrolled] = useState(false)\n\n const onLayout = (event: LayoutChangeEvent) => {\n height.current = event.nativeEvent.layout.height\n }\n\n const onScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const { contentOffset, contentSize, layoutMeasurement } = event.nativeEvent\n const offset = contentOffset.y\n\n setScrolled(offset > 0)\n if (offset <= collapseAfter) {\n setCollapsed(false)\n } else if (!collapsed) {\n const givesBack = Math.max(0, height.current - COLLAPSED_BLOCK_SIZE)\n setCollapsed(\n contentSize.height - layoutMeasurement.height - givesBack >\n collapseAfter,\n )\n }\n }\n\n return { collapsed, onLayout, onScroll, scrolled }\n}\n\nexport { COLLAPSED_BLOCK_SIZE, useAppBarScroll }\nexport type { AppBarScroll, AppBarScrollOptions }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,SAAAc,gBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAyBG,KAAAH,OAAAI,KAAAA,IAAA,CAEC,IAFDJ;EAEEC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAFF,MAAA,EAAAH,eAAAO,OAAAF;CACvB,MAAAL,gBAAAO,OAAAD,KAAAA,IAAA,IAAAC;CAEA,MAAAC,SAAelB,OAAAA,EAA2B;CAC1C,MAAA,CAAAI,WAAAe,gBAAkClB,SAAS,KAAK;CAChD,MAAA,CAAAO,UAAAY,eAAgCnB,SAAS,KAAK;CAAC,IAAAoB;CAAA,IAAAR,EAAA,OAAAS,OAAAC,IAAA,2BAAA,GAAA;EAE9BF,MAAAf,UAAA;GACfY,OAAMM,UAAWlB,MAAKmB,YAAYC,OAAOR;EAA3B;EACfL,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAFD,MAAAR,WAAiBgB;CAEhB,IAAAM;CAAA,IAAAd,EAAA,OAAAH,iBAAAG,EAAA,OAAAT,WAAA;EAEgBuB,MAAAC,YAAA;GACf,MAAA,EAAAC,eAAAC,aAAAC,sBAA0DzB,QAAKmB;GAC/D,MAAAO,SAAeH,cAAaI;GAE5Bb,YAAYY,SAAS,CAAC;GACtB,IAAIA,UAAUtB,eACZS,aAAa,KAAK;QACb,IAAI,CAACf,WAAS;IACnB,MAAA8B,YAAkBC,KAAIC,IAAK,GAAGlB,OAAMM,UAAAA,EAA+B;IACnEL,aACEW,YAAWZ,SAAUa,kBAAiBb,SAAUgB,YAC9CxB,aACJ;GAAC;EACF;EACFG,EAAA,KAAAH;EAAAG,EAAA,KAAAT;EAAAS,EAAA,KAAAc;CAAA,OAAAA,KAAAd,EAAA;CAdD,MAAAN,WAAiBoB;CAchB,IAAAU;CAAA,IAAAxB,EAAA,OAAAT,aAAAS,EAAA,OAAAN,YAAAM,EAAA,OAAAL,UAAA;EAEM6B,KAAA;GAAAjC;GAAAC;GAAAE;GAAAC;EAA0C;EAACK,EAAA,KAAAT;EAAAS,EAAA,KAAAN;EAAAM,EAAA,KAAAL;EAAAK,EAAA,KAAAwB;CAAA,OAAAA,KAAAxB,EAAA;CAAA,OAA3CwB;AAA2C"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AppBar, AppBarProps } from "./components/app-bar/index.js";
1
2
  import { Autocomplete, AutocompleteFilter, AutocompleteProps } from "./components/autocomplete/index.js";
2
3
  import { Avatar, AvatarProps } from "./components/avatar/index.js";
3
4
  import { Button, ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "./components/button/index.js";
@@ -12,9 +13,13 @@ import { Form, FormHandle, FormProps } from "./components/form/index.js";
12
13
  import { IconButton, IconButtonProps, IconButtonSize, IconButtonVariant } from "./components/icon-button/index.js";
13
14
  import { Link, LinkProps, LinkTone, LinkUnderline } from "./components/link/index.js";
14
15
  import { List, ListLoadMore, ListLoadMoreProps, ListProps, ListRow, ListRowProps, ListSection, ListSectionProps } from "./components/list/index.js";
16
+ import { ListDetail, ListDetailProps } from "./components/list-detail/index.js";
15
17
  import { ListItem, ListItemProps } from "./components/list-item/index.js";
16
18
  import { Menu, MenuAlign, MenuContent, MenuContentProps, MenuItem, MenuItemProps, MenuLoadMore, MenuLoadMoreProps, MenuProps, MenuSection, MenuSectionProps, MenuSeparator, MenuSeparatorProps, MenuSide, MenuSubmenu, MenuSubmenuProps, MenuTrigger } from "./components/menu/index.js";
17
19
  import { Meter, MeterProps, MeterTone } from "./components/meter/index.js";
20
+ import { KuiTheme } from "./tokens/defaults.js";
21
+ import { ResolvedTheme, useTheme } from "./theme/scope.js";
22
+ import { NavigationBar, NavigationBarItem, NavigationBarItemProps, NavigationBarProps, NavigationTabBar, NavigationTabBarProps } from "./components/navigation-bar/index.js";
18
23
  import { FieldVariant } from "./field/index.js";
19
24
  import { NumberField, NumberFieldProps } from "./components/number-field/index.js";
20
25
  import { Popover, PopoverAlign, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverProps, PopoverSide, PopoverSize, PopoverTitle, PopoverTitleProps, PopoverTrigger } from "./components/popover/index.js";
@@ -32,10 +37,9 @@ import { TypeRole } from "./typography/roles.js";
32
37
  import { Text, TextProps } from "./components/text/index.js";
33
38
  import { TextField, TextFieldProps } from "./components/text-field/index.js";
34
39
  import { IconStyle, useIconStyle } from "./glyphs/icon-style.js";
35
- import { KuiTheme } from "./tokens/defaults.js";
40
+ import { AppBarScroll, AppBarScrollOptions, useAppBarScroll } from "./hooks/useAppBarScroll.js";
36
41
  import { WindowSizeClass, useWindowSizeClass } from "./hooks/useWindowSizeClass.js";
37
42
  import { RouterProvider, RouterProviderProps } from "./router/index.js";
38
43
  import { ThemeScope, ThemeScopeProps } from "./theme-scope.js";
39
- import { ResolvedTheme, useTheme } from "./theme/scope.js";
40
44
  import { Key, Selection } from "react-stately";
41
- export { Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipActionProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, CopyField, type CopyFieldProps, Currency, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, Dialog, DialogBody, type DialogBodyProps, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogPartProps, type DialogProps, DialogTitle, type DialogTitleProps, type FieldVariant, Form, type FormHandle, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconStyle, type Key, type KuiTheme, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, type MenuTrigger, Meter, type MeterProps, type MeterTone, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, type ResolvedTheme, RouterProvider, type RouterProviderProps, SearchField, type SearchFieldProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, type Selection, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, type SheetHandleProps, SheetHeader, type SheetPartProps, type SheetProps, SheetTitle, type SheetTitleProps, Snackbar, type SnackbarAction, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Text, TextField, type TextFieldProps, type TextProps, ThemeScope, type ThemeScopeProps, type TypeRole, type WindowSizeClass, useIconStyle, useTheme, useWindowSizeClass };
45
+ export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipActionProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, CopyField, type CopyFieldProps, Currency, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, Dialog, DialogBody, type DialogBodyProps, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogPartProps, type DialogProps, DialogTitle, type DialogTitleProps, type FieldVariant, Form, type FormHandle, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconStyle, type Key, type KuiTheme, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, type MenuTrigger, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationBarItemProps, type NavigationBarProps, NavigationTabBar, type NavigationTabBarProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, type ResolvedTheme, RouterProvider, type RouterProviderProps, SearchField, type SearchFieldProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, type Selection, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, type SheetHandleProps, SheetHeader, type SheetPartProps, type SheetProps, SheetTitle, type SheetTitleProps, Snackbar, type SnackbarAction, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Text, TextField, type TextFieldProps, type TextProps, ThemeScope, type ThemeScopeProps, type TypeRole, type WindowSizeClass, useAppBarScroll, useIconStyle, useTheme, useWindowSizeClass };
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
- import { Autocomplete } from "./components/autocomplete/index.js";
2
1
  import { useIconStyle } from "./glyphs/icon-style.js";
2
+ import { useAppBarScroll } from "./hooks/useAppBarScroll.js";
3
3
  import { useTheme } from "./theme/scope.js";
4
+ import { Text } from "./components/text/index.js";
5
+ import { AppBar } from "./components/app-bar/index.js";
6
+ import { Autocomplete } from "./components/autocomplete/index.js";
4
7
  import { Avatar } from "./components/avatar/index.js";
5
8
  import { RouterProvider } from "./router/index.js";
6
- import { Text } from "./components/text/index.js";
7
9
  import { ProgressIndicator } from "./components/progress-indicator/index.js";
8
10
  import { Button } from "./components/button/index.js";
9
11
  import { Card } from "./components/card/index.js";
@@ -18,10 +20,12 @@ import { Form } from "./components/form/index.js";
18
20
  import { IconButton } from "./components/icon-button/index.js";
19
21
  import { Link } from "./components/link/index.js";
20
22
  import { List, ListLoadMore, ListRow, ListSection } from "./components/list/index.js";
23
+ import { ListDetail } from "./components/list-detail/index.js";
21
24
  import { ListItem } from "./components/list-item/index.js";
22
25
  import { Separator } from "./components/separator/index.js";
23
26
  import { Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu } from "./components/menu/index.js";
24
27
  import { Meter } from "./components/meter/index.js";
28
+ import { NavigationBar, NavigationBarItem, NavigationTabBar } from "./components/navigation-bar/index.js";
25
29
  import { NumberField } from "./components/number-field/index.js";
26
30
  import { Popover, PopoverContent, PopoverDescription, PopoverTitle } from "./components/popover/index.js";
27
31
  import { ProductIcon } from "./components/product-icon/index.js";
@@ -34,4 +38,4 @@ import { Stack } from "./components/stack/index.js";
34
38
  import { Switch } from "./components/switch/index.js";
35
39
  import { TextField } from "./components/text-field/index.js";
36
40
  import { ThemeScope } from "./theme-scope.js";
37
- export { Autocomplete, Avatar, Button, Card, Checkbox, Chip, ChipGroup, ChipGroupChip, CopyField, Currency, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Form, IconButton, Link, List, ListItem, ListLoadMore, ListRow, ListSection, Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Meter, NumberField, Popover, PopoverContent, PopoverDescription, PopoverTitle, ProductIcon, ProgressIndicator, Radio, RadioGroup, RouterProvider, SearchField, SegmentedButton, SegmentedButtonSegment, Separator, Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle, Snackbar, Stack, Switch, Text, TextField, ThemeScope, useIconStyle, useTheme, useWindowSizeClass };
41
+ export { AppBar, Autocomplete, Avatar, Button, Card, Checkbox, Chip, ChipGroup, ChipGroupChip, CopyField, Currency, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Form, IconButton, Link, List, ListDetail, ListItem, ListLoadMore, ListRow, ListSection, Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Meter, NavigationBar, NavigationBarItem, NavigationTabBar, NumberField, Popover, PopoverContent, PopoverDescription, PopoverTitle, ProductIcon, ProgressIndicator, Radio, RadioGroup, RouterProvider, SearchField, SegmentedButton, SegmentedButtonSegment, Separator, Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle, Snackbar, Stack, Switch, Text, TextField, ThemeScope, useAppBarScroll, useIconStyle, useTheme, useWindowSizeClass };
@@ -1,6 +1,6 @@
1
- import { ReactNode } from "react";
2
- import "react-native";
1
+ import { LayoutChangeEvent } from "react-native";
3
2
  import "react-native-reanimated";
3
+ import { ReactNode } from "react";
4
4
  //#region src/indicator/index.d.ts
5
5
  /**
6
6
  * The line's colour. `primary` is the page's own pair. `negative` and
@@ -1,15 +1,15 @@
1
- import { localeOf } from "../number/locale.js";
2
1
  import { useIconStyle } from "../glyphs/icon-style.js";
3
2
  import { useTheme } from "../theme/scope.js";
4
3
  import { composeStyles } from "../theme/styles.js";
5
4
  import { withOpacity } from "../theme/color.js";
6
5
  import { Text as Text$1 } from "../components/text/index.js";
6
+ import { localeOf } from "../number/locale.js";
7
7
  import { styles, stylesOf } from "./styles.js";
8
8
  import { c } from "react/compiler-runtime";
9
- import { useEffect, useState } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { View } from "react-native";
12
10
  import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
11
+ import { useEffect, useState } from "react";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { NumberFormatter } from "@internationalized/number";
14
14
  //#region src/indicator/index.tsx
15
15
  /**
@@ -1,6 +1,6 @@
1
1
  import { c } from "react/compiler-runtime";
2
- import { useEffect } from "react";
3
2
  import { Easing, ReduceMotion, cancelAnimation, useSharedValue, withRepeat, withTiming } from "react-native-reanimated";
3
+ import { useEffect } from "react";
4
4
  //#region src/indicator/motion.ts
5
5
  const SEARCH_STEPS = 24;
6
6
  /**