@funkit/connect 9.3.1 → 9.4.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/{chunk-JKGPN2BQ.js → chunk-BSF2AKBC.js} +17 -0
  3. package/dist/{chunk-VIJQ5A6W.js → chunk-DBRUJYOQ.js} +12 -1
  4. package/dist/{chunk-WXEL44DS.js → chunk-IZC4ZKKQ.js} +12 -1
  5. package/dist/clients/fanatics.css +5283 -4386
  6. package/dist/clients/fanatics.js +2 -2
  7. package/dist/clients/polymarket.d.ts +5 -1
  8. package/dist/clients/polymarket.js +11 -15
  9. package/dist/components/Box/Box.d.ts +40 -40
  10. package/dist/components/Dropdown/BaseDropdown.css.d.ts +2 -0
  11. package/dist/components/Dropdown/BaseDropdown.d.ts +49 -6
  12. package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +2 -2
  13. package/dist/components/FunInput/FunInput.css.d.ts +1 -0
  14. package/dist/components/Tabs/Tabs.d.ts +1 -0
  15. package/dist/components/Tabs/tabs.css.d.ts +1 -1
  16. package/dist/config/getDefaultConfig.d.ts +1 -1
  17. package/dist/css/sprinkles.css.d.ts +110 -40
  18. package/dist/domains/asset.d.ts +8 -3
  19. package/dist/hooks/track/CheckoutModalEvent.d.ts +3 -1
  20. package/dist/hooks/useMainnetEnsAvatar.d.ts +1 -1
  21. package/dist/hooks/useScrollDivider.d.ts +10 -2
  22. package/dist/index.css +5340 -4393
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +1077 -687
  25. package/dist/modals/CheckoutModal/CheckoutBlockedReason.d.ts +1 -0
  26. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +1 -1
  27. package/dist/modals/CheckoutModal/useCheckoutBlocked.d.ts +18 -0
  28. package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
  29. package/dist/providers/FunkitThemeProvider.d.ts +105 -0
  30. package/dist/providers/GeneralWalletProvider.d.ts +5 -5
  31. package/dist/providers/SwappedProvider.d.ts +3 -1
  32. package/dist/themes/baseTheme.js +1 -1
  33. package/dist/themes/darkTheme.js +2 -2
  34. package/dist/themes/lightTheme.js +2 -2
  35. package/dist/utils/checkout.d.ts +1 -1
  36. package/dist/utils/swapped.d.ts +4 -0
  37. package/dist/wallets/walletConnectors/index.js +35 -35
  38. package/package.json +5 -5
@@ -1,5 +1,7 @@
1
+ export declare const SCROLL_GRADIENT_SIZE_PX = 48;
1
2
  export declare const BORDER_RADIUS = "dropdown";
2
3
  export declare const DROPDOWN_ANIMATION_DURATION = 150;
3
4
  export declare const dropdownBoxStyles: string;
4
5
  export declare const scrollableDropdownStyles: string;
6
+ export declare const scrollGradientWrapperStyles: string;
5
7
  export declare const baseDropdownItemWrapperStyles: string;
@@ -5,17 +5,60 @@ import { type BaseActiveDropdownItemProps } from './BaseActiveDropdownItem';
5
5
  export declare const HORIZONTAL_ICON_GAP = "4";
6
6
  /** safe spacing, ie. padding, on the left & right of the active item and dropdown item */
7
7
  export declare const HORIZONTAL_OUTER_PADDING_X = "12";
8
- export interface BaseDropdownOption<T = string> {
8
+ export declare const NO_SELECTION_VALUE = "";
9
+ export interface BaseDropdownOption<T = string, G extends string = never> {
9
10
  label: string;
10
11
  value: T;
12
+ /**
13
+ * For grouped dropdowns, this is the {@link BaseDropdownGroup.key} of the group this option belongs to.
14
+ *
15
+ * If omitted, or if no group has the key, the option is treated as ungrouped.
16
+ *
17
+ * _See {@link BaseDropdownProps.groups} and {@link BaseDropdownProps.showOthersGroup}_
18
+ */
19
+ group?: G;
20
+ }
21
+ export interface BaseDropdownGroup<G extends string> {
22
+ key: G;
23
+ label: string;
11
24
  }
12
- export interface BaseDropdownProps {
25
+ export interface BaseDropdownProps<T = string, G extends string = never> {
13
26
  value: string;
14
27
  activeItemProps?: Partial<Pick<BaseActiveDropdownItemProps, 'iconComponent' | 'label' | 'color' | 'alwaysVisibleLabel' | 'tagComponent' | 'tagPosition' | 'background'>>;
15
- options: BaseDropdownOption[];
28
+ /**
29
+ * List of groups to show and the corresponding labels, in the expected order.
30
+ *
31
+ * _Defaults to ungrouped dropdown behavior_
32
+ */
33
+ groups?: BaseDropdownGroup<G>[];
34
+ /**
35
+ * Additional group displayed after configured groups (only if there are non-empty groups).
36
+ * - "all": display all options (grouped options will effectively be shown twice in total)
37
+ * - "others": display only ungrouped options
38
+ *
39
+ * _Defaults to "others"_
40
+ */
41
+ additionalGroup?: 'all' | 'others';
42
+ /**
43
+ * Label for the {@link additionalGroup}.
44
+ *
45
+ * Shows only if the additional group is not empty.
46
+ */
47
+ additionalGroupLabel?: string;
48
+ /**
49
+ * If specified, show an "Unselect" option with value {@link NO_SELECTION_VALUE} above other options/groups
50
+ *
51
+ * _Defaults to `false`_
52
+ */
53
+ allowUnselect?: boolean;
54
+ /**
55
+ * Label for {@link allowUnselect}
56
+ */
57
+ unselectLabel?: string;
58
+ options: BaseDropdownOption<T, G>[];
16
59
  onOpen?: () => void;
17
- onOptionSelected?: (item: BaseDropdownOption) => void;
18
- renderDropdownOption: (item: BaseDropdownOption, isSelected: boolean) => React.ReactNode;
60
+ onOptionSelected?: (item: BaseDropdownOption<T, G>) => void;
61
+ renderDropdownOption: (item: BaseDropdownOption<T, G>, isSelected: boolean) => React.ReactNode;
19
62
  searchableOptions?: boolean;
20
63
  searchPlaceholder?: string;
21
64
  placeholder?: string;
@@ -37,5 +80,5 @@ export interface BaseDropdownProps {
37
80
  maxDropdownHeight?: number;
38
81
  testId?: string;
39
82
  }
40
- declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, testId, }: BaseDropdownProps): React.JSX.Element;
83
+ declare function BaseDropdown<T extends string = string, G extends string = never>({ activeItemProps, value, options, groups, additionalGroup, additionalGroupLabel, allowUnselect, unselectLabel, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, testId, }: BaseDropdownProps<T, G>): React.JSX.Element;
41
84
  export default BaseDropdown;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- type CheckoutBlockedReason = 'geoblock' | 'security' | 'unloggedin';
2
+ import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutBlockedReason';
3
3
  interface FunCheckoutBlockedProps {
4
4
  reason: CheckoutBlockedReason;
5
5
  }
6
- export declare const FunCheckoutBlocked: ({ reason }: FunCheckoutBlockedProps) => React.JSX.Element;
6
+ export declare const FunCheckoutBlocked: ({ reason }: FunCheckoutBlockedProps) => React.JSX.Element | null;
7
7
  export {};
@@ -6,4 +6,5 @@ export declare const inputClassNoTransition: string;
6
6
  export declare const inputClassDisabled: string;
7
7
  export declare const inputClassDisabledNoTransition: string;
8
8
  export declare const inputClassError: string;
9
+ export declare const hoverWithParentInput: string;
9
10
  export declare const inputClassErrorNoTransition: string;
@@ -17,6 +17,7 @@ export type TabsProps = {
17
17
  fontWeight?: BoxProps['fontWeight'];
18
18
  fontSize?: BoxProps['fontSize'];
19
19
  activeTabStyles?: React.CSSProperties;
20
+ inactiveTabProps?: BoxProps;
20
21
  containerStyles?: React.CSSProperties;
21
22
  };
22
23
  export declare const Tabs: React.FC<TabsProps>;
@@ -2,4 +2,4 @@ export declare const tabSlideContentIn: string;
2
2
  export declare const tabSlideContentOut: string;
3
3
  export declare const tabSlideContentInReverse: string;
4
4
  export declare const tabSlideContentOutReverse: string;
5
- export declare const activeTabStyle: string;
5
+ export declare const baseTabStyle: string;
@@ -13,7 +13,7 @@ export interface CreateFunkitWagmiConfigParameters extends WagmiConfigParameters
13
13
  wallets?: WalletList;
14
14
  projectId: string;
15
15
  }
16
- export declare const createFunkitWagmiConfig: (rawWagmiConfig: CreateFunkitWagmiConfigParameters) => import("../wagmi/hooks").Config;
16
+ export declare const createFunkitWagmiConfig: (rawWagmiConfig: CreateFunkitWagmiConfigParameters) => import("wagmi").Config;
17
17
  /**
18
18
  * Get default funkit-supported checkout chains
19
19
  */