@butternutbox/pawprint-native 0.22.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1609,6 +1609,17 @@ declare const StyledRoot: _emotion_native.StyledComponent<ViewProps & {
1609
1609
  }, {}, {
1610
1610
  ref?: React.Ref<View> | undefined;
1611
1611
  }>;
1612
+ /**
1613
+ * A single item returned by an async `onSearchQuery` resolver. Mirrors the
1614
+ * props of `SelectField.Item` so results render identically to static items.
1615
+ */
1616
+ type SelectFieldSearchResult = {
1617
+ value: string;
1618
+ label: string;
1619
+ leadingIcon?: React.ReactNode;
1620
+ hintText?: string;
1621
+ disabled?: boolean;
1622
+ };
1612
1623
  type SelectFieldOwnProps<Value = Option | string> = {
1613
1624
  label?: string;
1614
1625
  description?: string;
@@ -1625,6 +1636,9 @@ type SelectFieldOwnProps<Value = Option | string> = {
1625
1636
  searchable?: boolean;
1626
1637
  searchPlaceholder?: string;
1627
1638
  noResultsText?: string;
1639
+ onSearchQuery?: (query: string) => Promise<SelectFieldSearchResult[]>;
1640
+ debounceMs?: number;
1641
+ errorText?: string;
1628
1642
  };
1629
1643
  type SelectFieldProps<Value = Option> = SelectFieldOwnProps<Value> & Omit<ViewProps, keyof SelectFieldOwnProps<Value>>;
1630
1644
  type SelectFieldComponent = React.ForwardRefExoticComponent<SelectFieldProps<Option | string> & React.RefAttributes<View>> & {
@@ -2480,4 +2494,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
2480
2494
  contentContainerStyle: StyleProp<ViewStyle>;
2481
2495
  };
2482
2496
 
2483
- export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
2497
+ export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
package/dist/index.d.ts CHANGED
@@ -1609,6 +1609,17 @@ declare const StyledRoot: _emotion_native.StyledComponent<ViewProps & {
1609
1609
  }, {}, {
1610
1610
  ref?: React.Ref<View> | undefined;
1611
1611
  }>;
1612
+ /**
1613
+ * A single item returned by an async `onSearchQuery` resolver. Mirrors the
1614
+ * props of `SelectField.Item` so results render identically to static items.
1615
+ */
1616
+ type SelectFieldSearchResult = {
1617
+ value: string;
1618
+ label: string;
1619
+ leadingIcon?: React.ReactNode;
1620
+ hintText?: string;
1621
+ disabled?: boolean;
1622
+ };
1612
1623
  type SelectFieldOwnProps<Value = Option | string> = {
1613
1624
  label?: string;
1614
1625
  description?: string;
@@ -1625,6 +1636,9 @@ type SelectFieldOwnProps<Value = Option | string> = {
1625
1636
  searchable?: boolean;
1626
1637
  searchPlaceholder?: string;
1627
1638
  noResultsText?: string;
1639
+ onSearchQuery?: (query: string) => Promise<SelectFieldSearchResult[]>;
1640
+ debounceMs?: number;
1641
+ errorText?: string;
1628
1642
  };
1629
1643
  type SelectFieldProps<Value = Option> = SelectFieldOwnProps<Value> & Omit<ViewProps, keyof SelectFieldOwnProps<Value>>;
1630
1644
  type SelectFieldComponent = React.ForwardRefExoticComponent<SelectFieldProps<Option | string> & React.RefAttributes<View>> & {
@@ -2480,4 +2494,4 @@ declare const useDrawerKeyboardAvoidance: (minPadding?: number) => {
2480
2494
  contentContainerStyle: StyleProp<ViewStyle>;
2481
2495
  };
2482
2496
 
2483
- export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
2497
+ export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, BRAND_FONTS, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveFont, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, usePasswordField, usePawprint, useSearchField, useSelectField };
package/dist/index.js CHANGED
@@ -1163,7 +1163,7 @@ var IconWrapper = styled51(View)({
1163
1163
  });
1164
1164
  var StyledButton = styled51(Pressable)(
1165
1165
  ({
1166
- buttonHeight,
1166
+ buttonMinHeight,
1167
1167
  buttonMinWidth,
1168
1168
  buttonPaddingHorizontal,
1169
1169
  buttonPaddingVertical,
@@ -1179,7 +1179,7 @@ var StyledButton = styled51(Pressable)(
1179
1179
  alignItems: "center",
1180
1180
  justifyContent: "center",
1181
1181
  position: "relative",
1182
- height: buttonHeight,
1182
+ minHeight: buttonMinHeight,
1183
1183
  minWidth: buttonMinWidth,
1184
1184
  paddingHorizontal: buttonPaddingHorizontal,
1185
1185
  paddingVertical: buttonPaddingVertical,
@@ -1189,10 +1189,9 @@ var StyledButton = styled51(Pressable)(
1189
1189
  opacity: buttonOpacity
1190
1190
  }, buttonBorderWidth ? { borderWidth: buttonBorderWidth, borderColor: buttonBorderColor } : {}), buttonFullWidth ? { width: "100%" } : {})
1191
1191
  );
1192
- var StyledTextWrapper = styled51(View)(({ textOpacity }) => ({
1193
- opacity: textOpacity,
1194
- flexShrink: 0
1195
- }));
1192
+ var StyledTextWrapper = styled51(View)(({ textOpacity, fullWidth }) => __spreadValues({
1193
+ opacity: textOpacity
1194
+ }, fullWidth ? { flex: 1 } : {}));
1196
1195
  var StyledSpinnerWrapper = styled51(View)({
1197
1196
  position: "absolute",
1198
1197
  alignItems: "center",
@@ -1267,7 +1266,7 @@ var Button = React66.forwardRef(
1267
1266
  accessibilityState: { disabled: isDisabled, busy: loading },
1268
1267
  onPressIn: () => setPressed(true),
1269
1268
  onPressOut: () => setPressed(false),
1270
- buttonHeight: parseTokenValue7(sizeTokens.height),
1269
+ buttonMinHeight: parseTokenValue7(sizeTokens.minHeight),
1271
1270
  buttonMinWidth: parseTokenValue7(sizeTokens.minWidth),
1272
1271
  buttonPaddingHorizontal: parseTokenValue7(
1273
1272
  spacingTokens.horizontalPadding
@@ -1283,7 +1282,7 @@ var Button = React66.forwardRef(
1283
1282
  }, rest), {
1284
1283
  children: [
1285
1284
  startIcon && /* @__PURE__ */ jsx(IconWrapper, { children: startIcon }),
1286
- /* @__PURE__ */ jsx(StyledTextWrapper, { textOpacity: loading ? 0 : 1, children: /* @__PURE__ */ jsx(
1285
+ /* @__PURE__ */ jsx(StyledTextWrapper, { textOpacity: loading ? 0 : 1, fullWidth, children: /* @__PURE__ */ jsx(
1287
1286
  Typography,
1288
1287
  {
1289
1288
  token: {
@@ -1294,6 +1293,7 @@ var Button = React66.forwardRef(
1294
1293
  letterSpacing: typography.letterSpacing
1295
1294
  },
1296
1295
  color: variantStyles.textColor,
1296
+ align: "center",
1297
1297
  children
1298
1298
  }
1299
1299
  ) }),
@@ -1429,7 +1429,7 @@ var IconButton = React66.forwardRef(
1429
1429
  const isDisabled = disabled || loading;
1430
1430
  const buttons = theme2.tokens.components.buttons;
1431
1431
  const sizeTokens = buttons.size[size];
1432
- const dimension = parseTokenValue10(sizeTokens.height);
1432
+ const dimension = parseTokenValue10(sizeTokens.minHeight);
1433
1433
  const iconSizing = theme2.tokens.components.icons.sizing.icons.core;
1434
1434
  const iconDimension = parseTokenValue10(iconSizing[sizeToIconSizeToken[size]]);
1435
1435
  const [pressed, setPressed] = React66.useState(false);
@@ -4861,6 +4861,7 @@ Switch.displayName = "Switch";
4861
4861
  var parseTokenValue18 = (value) => parseFloat(value);
4862
4862
  var StyledTag = styled51(View)(({ theme: theme2, tagVariant, tagSize }) => {
4863
4863
  const { sizing, spacing, colour, badge } = theme2.tokens.components.tags;
4864
+ const { spacing: semanticSpacing } = theme2.tokens.semantics.dimensions;
4864
4865
  const backgroundColorMap = {
4865
4866
  primary: colour.primary.background,
4866
4867
  secondary: colour.primary.secondary,
@@ -4870,13 +4871,21 @@ var StyledTag = styled51(View)(({ theme: theme2, tagVariant, tagSize }) => {
4870
4871
  warning: colour.primary.warning,
4871
4872
  error: colour.primary.error
4872
4873
  };
4874
+ const verticalPaddingMap = {
4875
+ small: semanticSpacing["2xs"],
4876
+ medium: semanticSpacing["3xs"],
4877
+ large: semanticSpacing["2xs"]
4878
+ };
4873
4879
  return {
4874
4880
  flexDirection: "row",
4875
4881
  alignItems: "center",
4876
4882
  justifyContent: "center",
4877
- height: parseTokenValue18(sizing[tagSize].height),
4883
+ minHeight: parseTokenValue18(sizing[tagSize].minHeight),
4878
4884
  minWidth: parseTokenValue18(sizing[tagSize].minWidth),
4879
- paddingHorizontal: parseTokenValue18(spacing.horizontalPadding),
4885
+ paddingLeft: parseTokenValue18(spacing.horizontalPadding) * 2,
4886
+ paddingRight: parseTokenValue18(spacing.horizontalPadding) * 2,
4887
+ paddingTop: parseTokenValue18(verticalPaddingMap[tagSize]),
4888
+ paddingBottom: parseTokenValue18(verticalPaddingMap[tagSize]),
4880
4889
  gap: parseTokenValue18(spacing[tagSize].gap),
4881
4890
  borderRadius: parseTokenValue18(badge.borderRadius.default),
4882
4891
  backgroundColor: backgroundColorMap[tagVariant]
@@ -6325,7 +6334,7 @@ var DrawerBody = React66.forwardRef(
6325
6334
  const horizontalPadding = parseTokenValue27(content.slot.horizontalPadding);
6326
6335
  const topPadding = parseTokenValue27(content.slot.verticalPadding);
6327
6336
  const bodyMaxHeight = providedMaxHeight != null ? providedMaxHeight : windowHeight - 300;
6328
- const paddingRight = headerContext === null ? parseTokenValue27(spacing.close.right.md) + parseTokenValue27(buttons.size.sm.height) : horizontalPadding;
6337
+ const paddingRight = headerContext === null ? parseTokenValue27(spacing.close.right.md) + parseTokenValue27(buttons.size.sm.minHeight) : horizontalPadding;
6329
6338
  const bodyPaddingBottom = !footerContext ? Math.max(
6330
6339
  parseTokenValue27(theme2.tokens.semantics.dimensions.spacing["2xl"]),
6331
6340
  insets.bottom
@@ -6695,7 +6704,7 @@ var StyledRootPressable = styled51(Pressable)(
6695
6704
  alignItems: rootFlexAlign,
6696
6705
  gap: rootGap,
6697
6706
  opacity: rootOpacity
6698
- }, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? rootFitContent ? { maxWidth: rootMaxWidth, alignSelf: "flex-start" } : { maxWidth: rootMaxWidth, width: "100%" } : { width: "100%" }), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
6707
+ }, rootPaddingVertical !== void 0 ? { paddingVertical: rootPaddingVertical } : {}), rootPaddingHorizontal !== void 0 ? { paddingHorizontal: rootPaddingHorizontal } : {}), rootMaxWidth !== void 0 ? rootFitContent ? { maxWidth: rootMaxWidth, alignSelf: "flex-start" } : { maxWidth: rootMaxWidth, width: "100%" } : {}), rootBgColor ? { backgroundColor: rootBgColor } : {}), rootBorderWidth !== void 0 ? { borderWidth: rootBorderWidth, borderColor: rootBorderColor } : {}), rootBorderRadius !== void 0 ? { borderRadius: rootBorderRadius } : {})
6699
6708
  );
6700
6709
  var StyledControl = styled51(View)(
6701
6710
  ({
@@ -6716,12 +6725,12 @@ var StyledControl = styled51(View)(
6716
6725
  justifyContent: "center"
6717
6726
  })
6718
6727
  );
6719
- var StyledContent2 = styled51(View)(({ contentGap }) => ({
6728
+ var StyledContent2 = styled51(View)(({ contentGap, contentFlex, contentFitContent }) => __spreadValues({
6720
6729
  flexDirection: "column",
6721
6730
  gap: contentGap,
6722
- flex: 1,
6731
+ flex: contentFlex,
6723
6732
  minWidth: 0
6724
- }));
6733
+ }, contentFitContent ? { maxWidth: "85%" } : {}));
6725
6734
  var StyledIllustration = styled51(View)(({ illustrationSize }) => ({
6726
6735
  flexShrink: 0,
6727
6736
  width: illustrationSize,
@@ -6808,6 +6817,8 @@ var Checkbox = React66.forwardRef(
6808
6817
  StyledContent2,
6809
6818
  {
6810
6819
  contentGap: parseTokenValue31(checkbox.spacing.content.gap),
6820
+ contentFlex: isTile && fitContent ? 0 : 1,
6821
+ contentFitContent: isTile && fitContent,
6811
6822
  children: [
6812
6823
  label && /* @__PURE__ */ jsx(
6813
6824
  Typography,
@@ -8972,7 +8983,7 @@ var SelectFieldItem = React66.forwardRef(
8972
8983
  );
8973
8984
  SelectFieldItem.displayName = "SelectField.Item";
8974
8985
  var parseTokenValue48 = (value) => parseFloat(value);
8975
- var StyledNoResults = styled51(View)(({ theme: theme2 }) => {
8986
+ var StyledStatusRow = styled51(View)(({ theme: theme2 }) => {
8976
8987
  const { dropdown } = theme2.tokens.components.dropdownList;
8977
8988
  return {
8978
8989
  paddingVertical: parseTokenValue48(dropdown.listItem.spacing.verticalPadding),
@@ -9005,7 +9016,10 @@ var SelectFieldRoot = React66.forwardRef(
9005
9016
  disabled,
9006
9017
  searchable = false,
9007
9018
  searchPlaceholder,
9008
- noResultsText = "No results found"
9019
+ noResultsText = "No results found",
9020
+ onSearchQuery,
9021
+ debounceMs = 300,
9022
+ errorText = "Something went wrong"
9009
9023
  } = _b, rest = __objRest(_b, [
9010
9024
  "label",
9011
9025
  "placeholder",
@@ -9021,7 +9035,10 @@ var SelectFieldRoot = React66.forwardRef(
9021
9035
  "disabled",
9022
9036
  "searchable",
9023
9037
  "searchPlaceholder",
9024
- "noResultsText"
9038
+ "noResultsText",
9039
+ "onSearchQuery",
9040
+ "debounceMs",
9041
+ "errorText"
9025
9042
  ]);
9026
9043
  const [isOpen, setIsOpen] = React66.useState(false);
9027
9044
  const [showContent, setShowContent] = React66.useState(false);
@@ -9031,6 +9048,44 @@ var SelectFieldRoot = React66.forwardRef(
9031
9048
  const [searchQuery, setSearchQuery] = React66.useState("");
9032
9049
  const [clearKey, setClearKey] = React66.useState(0);
9033
9050
  const searchInputRef = React66.useRef(null);
9051
+ const isQueryMode = searchable && typeof onSearchQuery === "function";
9052
+ const [searchResults, setSearchResults] = React66.useState([]);
9053
+ const [isSearching, setIsSearching] = React66.useState(false);
9054
+ const [searchFailed, setSearchFailed] = React66.useState(false);
9055
+ const searchRequestIdRef = React66.useRef(0);
9056
+ const onSearchQueryRef = React66.useRef(onSearchQuery);
9057
+ React66.useEffect(() => {
9058
+ onSearchQueryRef.current = onSearchQuery;
9059
+ });
9060
+ React66.useEffect(() => {
9061
+ if (!isQueryMode) return;
9062
+ if (searchQuery.length === 0) {
9063
+ searchRequestIdRef.current += 1;
9064
+ setSearchResults([]);
9065
+ setIsSearching(false);
9066
+ setSearchFailed(false);
9067
+ return;
9068
+ }
9069
+ const requestId = searchRequestIdRef.current + 1;
9070
+ searchRequestIdRef.current = requestId;
9071
+ setIsSearching(true);
9072
+ setSearchFailed(false);
9073
+ const debounceTimer = setTimeout(() => {
9074
+ const runQuery = onSearchQueryRef.current;
9075
+ if (!runQuery) return;
9076
+ Promise.resolve(runQuery(searchQuery)).then((items) => {
9077
+ if (searchRequestIdRef.current !== requestId) return;
9078
+ setSearchResults(items);
9079
+ setIsSearching(false);
9080
+ }).catch(() => {
9081
+ if (searchRequestIdRef.current !== requestId) return;
9082
+ setSearchResults([]);
9083
+ setSearchFailed(true);
9084
+ setIsSearching(false);
9085
+ });
9086
+ }, debounceMs);
9087
+ return () => clearTimeout(debounceTimer);
9088
+ }, [searchQuery, isQueryMode, debounceMs]);
9034
9089
  React66.useEffect(() => {
9035
9090
  if (!isOpen) {
9036
9091
  setShowContent(false);
@@ -9063,7 +9118,7 @@ var SelectFieldRoot = React66.forwardRef(
9063
9118
  clearTimeout(hardwareKeyboardTimer);
9064
9119
  keyboardSub.remove();
9065
9120
  };
9066
- }, [isOpen, searchable]);
9121
+ }, [isOpen, searchable, isSearching, searchQuery]);
9067
9122
  const isCompound = React66.Children.toArray(children).some(
9068
9123
  (child) => React66.isValidElement(child) && child.type === SelectFieldContent
9069
9124
  );
@@ -9081,7 +9136,7 @@ var SelectFieldRoot = React66.forwardRef(
9081
9136
  };
9082
9137
  const currentValue = value !== void 0 ? value : internalValue;
9083
9138
  const allItems = React66.Children.toArray(children);
9084
- const filteredItems = searchable ? allItems.filter((child) => {
9139
+ const localFilteredItems = searchable && !isQueryMode ? allItems.filter((child) => {
9085
9140
  var _a2;
9086
9141
  if (!searchQuery) return true;
9087
9142
  if (React66.isValidElement(child) && child.type === SelectFieldItem) {
@@ -9092,7 +9147,21 @@ var SelectFieldRoot = React66.forwardRef(
9092
9147
  }
9093
9148
  return true;
9094
9149
  }) : allItems;
9095
- const hasNoResults = searchable && searchQuery.length > 0 && filteredItems.length === 0;
9150
+ const isQueryActive = isQueryMode && searchQuery.length > 0;
9151
+ const queryResultItems = searchResults.map((result) => /* @__PURE__ */ jsx(
9152
+ SelectFieldItem,
9153
+ {
9154
+ value: result.value,
9155
+ leadingIcon: result.leadingIcon,
9156
+ hintText: result.hintText,
9157
+ disabled: result.disabled,
9158
+ children: result.label
9159
+ },
9160
+ String(result.value)
9161
+ ));
9162
+ const itemsToRender = isQueryActive ? queryResultItems : localFilteredItems;
9163
+ const hasNoResults = isQueryMode ? isQueryActive && !isSearching && !searchFailed && searchResults.length === 0 : searchable && searchQuery.length > 0 && localFilteredItems.length === 0;
9164
+ const hasContentToShow = isSearching || searchFailed || hasNoResults || itemsToRender.length > 0;
9096
9165
  const searchActionIcon = (() => {
9097
9166
  if (!searchable) return void 0;
9098
9167
  const showClear = isOpen && searchQuery.length > 0 || !isOpen && Boolean(currentValue);
@@ -9151,8 +9220,8 @@ var SelectFieldRoot = React66.forwardRef(
9151
9220
  description && /* @__PURE__ */ jsx(InputDescription, { state, children: description }),
9152
9221
  error && state === "error" && /* @__PURE__ */ jsx(InputError, { children: error })
9153
9222
  ] })),
9154
- showContent && /* @__PURE__ */ jsxs(SelectFieldContent, { children: [
9155
- filteredItems.map((child) => {
9223
+ showContent && hasContentToShow && /* @__PURE__ */ jsx(SelectFieldContent, { children: isSearching ? /* @__PURE__ */ jsx(StyledStatusRow, { children: /* @__PURE__ */ jsx(Spinner, { size: "sm" }) }) : searchFailed ? /* @__PURE__ */ jsx(StyledStatusRow, { children: /* @__PURE__ */ jsx(Typography, { size: "sm", children: errorText }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
9224
+ itemsToRender.map((child) => {
9156
9225
  if (React66.isValidElement(child) && child.type === SelectFieldItem) {
9157
9226
  const selectedValue = currentValue && typeof currentValue === "object" && "value" in currentValue ? currentValue.value : currentValue;
9158
9227
  const childProps = child.props;
@@ -9165,8 +9234,8 @@ var SelectFieldRoot = React66.forwardRef(
9165
9234
  }
9166
9235
  return child;
9167
9236
  }),
9168
- hasNoResults && /* @__PURE__ */ jsx(StyledNoResults, { children: /* @__PURE__ */ jsx(Typography, { size: "sm", children: noResultsText }) })
9169
- ] })
9237
+ hasNoResults && /* @__PURE__ */ jsx(StyledStatusRow, { children: /* @__PURE__ */ jsx(Typography, { size: "sm", children: noResultsText }) })
9238
+ ] }) })
9170
9239
  ]
9171
9240
  },
9172
9241
  clearKey
@@ -9531,7 +9600,7 @@ var Slider = React66.forwardRef(
9531
9600
  const isControlled = controlledValue !== void 0;
9532
9601
  const [internalValue, setInternalValue] = React66.useState(defaultValue);
9533
9602
  const currentValue = isControlled ? controlledValue : internalValue;
9534
- const thumbSize = parseTokenValue49(buttons.size.md.height);
9603
+ const thumbSize = parseTokenValue49(buttons.size.md.minHeight);
9535
9604
  const trackHeight = parseTokenValue49(slider.sizing.track.height);
9536
9605
  const isWeb = Platform.OS === "web";
9537
9606
  const [trackLayoutWidth, setTrackLayoutWidth] = useState(0);