@ledgerhq/lumen-ui-rnative 0.1.22 → 0.1.24
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/module/i18n/I18nProvider.js.map +1 -1
- package/dist/module/i18n/i18n.js.map +1 -1
- package/dist/module/lib/Components/AmountDisplay/AmountDisplay.js.map +1 -1
- package/dist/module/lib/Components/BaseInput/BaseInput.js +1 -1
- package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/module/lib/Components/BottomSheet/BottomSheet.test.js.map +1 -1
- package/dist/module/lib/Components/Card/Card.js +1 -1
- package/dist/module/lib/Components/Card/Card.js.map +1 -1
- package/dist/module/lib/Components/Checkbox/BaseCheckbox.js.map +1 -1
- package/dist/module/lib/Components/InteractiveIcon/InteractiveIcon.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.js +57 -27
- package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.mdx +15 -7
- package/dist/module/lib/Components/ListItem/ListItem.stories.js +497 -283
- package/dist/module/lib/Components/ListItem/ListItem.stories.js.map +1 -1
- package/dist/module/lib/Components/ListItem/ListItem.test.js +153 -0
- package/dist/module/lib/Components/ListItem/ListItem.test.js.map +1 -0
- package/dist/module/lib/Components/{TriggerButton/TriggerButton.js → MediaButton/MediaButton.js} +13 -10
- package/dist/module/lib/Components/MediaButton/MediaButton.js.map +1 -0
- package/{src/lib/Components/TriggerButton/TriggerButton.mdx → dist/module/lib/Components/MediaButton/MediaButton.mdx} +10 -10
- package/dist/module/lib/Components/{TriggerButton/TriggerButton.stories.js → MediaButton/MediaButton.stories.js} +18 -18
- package/dist/module/lib/Components/MediaButton/MediaButton.stories.js.map +1 -0
- package/dist/module/lib/Components/{TriggerButton/TriggerButton.test.js → MediaButton/MediaButton.test.js} +14 -14
- package/dist/module/lib/Components/MediaButton/MediaButton.test.js.map +1 -0
- package/dist/module/lib/Components/MediaButton/index.js +5 -0
- package/dist/module/lib/Components/MediaButton/index.js.map +1 -0
- package/dist/module/lib/Components/MediaButton/types.js.map +1 -0
- package/dist/module/lib/Components/NavBar/NavBar.js.map +1 -1
- package/dist/module/lib/Components/OptionList/OptionList.figma.js +28 -0
- package/dist/module/lib/Components/OptionList/OptionList.figma.js.map +1 -0
- package/dist/module/lib/Components/OptionList/OptionList.js +452 -0
- package/dist/module/lib/Components/OptionList/OptionList.js.map +1 -0
- package/dist/module/lib/Components/OptionList/OptionList.mdx +304 -0
- package/dist/module/lib/Components/OptionList/OptionList.stories.js +735 -0
- package/dist/module/lib/Components/OptionList/OptionList.stories.js.map +1 -0
- package/dist/module/lib/Components/OptionList/OptionList.test.js +443 -0
- package/dist/module/lib/Components/OptionList/OptionList.test.js.map +1 -0
- package/dist/module/lib/Components/OptionList/index.js +5 -0
- package/dist/module/lib/Components/OptionList/index.js.map +1 -0
- package/dist/module/lib/Components/OptionList/types.js +4 -0
- package/dist/module/lib/Components/OptionList/types.js.map +1 -0
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.js +36 -0
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.js.map +1 -0
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.test.js +84 -0
- package/dist/module/lib/Components/OptionList/useOptionList/useOptionListItems.test.js.map +1 -0
- package/dist/module/lib/Components/SegmentedControl/usePillLayout.js.map +1 -1
- package/dist/module/lib/Components/Select/GlobalSelectContext.js.map +1 -1
- package/dist/module/lib/Components/Select/Select.js.map +1 -1
- package/dist/module/lib/Components/Slot/Slot.js.map +1 -1
- package/dist/module/lib/Components/Spinner/Spinner.js.map +1 -1
- package/dist/module/lib/Components/Spot/Spot.js.map +1 -1
- package/dist/module/lib/Components/TabBar/TabBar.js +4 -4
- package/dist/module/lib/Components/TabBar/TabBar.js.map +1 -1
- package/dist/module/lib/Components/Tooltip/GlobalTooltipContext.js.map +1 -1
- package/dist/module/lib/Components/Tooltip/Tooltip.js.map +1 -1
- package/dist/module/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.test.js.map +1 -1
- package/dist/module/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.test.js.map +1 -1
- package/dist/module/lib/Components/Utility/Pressable/Pressable.test.js.map +1 -1
- package/dist/module/lib/Components/index.js +2 -1
- package/dist/module/lib/Components/index.js.map +1 -1
- package/dist/module/lib/utils/components/InjectStylesIntoChildren.js.map +1 -1
- package/dist/module/lib/utils/constants/constants.js.map +1 -1
- package/dist/module/lib/utils/react/extractTextFromChildren.js.map +1 -1
- package/dist/module/lib/utils/useControllableState/useControllableState.js.map +1 -1
- package/dist/module/styles/hooks/useStyleSheet.js.map +1 -1
- package/dist/module/styles/hooks/useStyleSheet.test.js.map +1 -1
- package/dist/module/styles/lx/createStyledPressable.test.js.map +1 -1
- package/dist/module/styles/lx/createStyledText.test.js.map +1 -1
- package/dist/module/styles/lx/createStyledView.js.map +1 -1
- package/dist/module/styles/lx/createStyledView.test.js.map +1 -1
- package/dist/module/styles/provider/LumenStyleSheetProvider.js.map +1 -1
- package/dist/module/styles/provider/LumenStyleSheetProvider.test.js.map +1 -1
- package/dist/module/utils/icon-template.js +0 -1
- package/dist/module/utils/icon-template.js.map +1 -1
- package/dist/typescript/src/i18n/I18nProvider.d.ts +1 -1
- package/dist/typescript/src/i18n/I18nProvider.d.ts.map +1 -1
- package/dist/typescript/src/i18n/i18n.d.ts +1 -1
- package/dist/typescript/src/i18n/i18n.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/Pulse.d.ts +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/Pulse.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Pulse/types.d.ts +2 -2
- package/dist/typescript/src/lib/Animations/Pulse/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Spin/Spin.d.ts +1 -1
- package/dist/typescript/src/lib/Animations/Spin/Spin.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/Spin/types.d.ts +2 -2
- package/dist/typescript/src/lib/Animations/Spin/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/types.d.ts +2 -2
- package/dist/typescript/src/lib/Animations/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Animations/useTimingConfig.d.ts +1 -1
- package/dist/typescript/src/lib/Animations/useTimingConfig.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AddressInput/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/AddressInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AmountDisplay/AmountDisplay.d.ts +1 -1
- package/dist/typescript/src/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AmountDisplay/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/AmountDisplay/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AmountInput/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Avatar/Avatar.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Avatar/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Avatar/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Banner/Banner.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Banner/Banner.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Banner/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Banner/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheetHeader.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/BottomSheetHeader.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/CustomBackdrop.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/CustomBackdrop.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts +2 -2
- package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/Scrollables.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/Scrollables.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/BottomSheet/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/useBottomSheetRef.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BottomSheet/useBottomSheetRef.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Button/BaseButton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Button/Button.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Button/Button.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Button/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/Button/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Card/Card.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Card/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Card/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/CardButton/CardButton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/CardButton/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/CardButton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Checkbox/BaseCheckbox.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Checkbox/BaseCheckbox.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Checkbox/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Checkbox/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ContentBanner/ContentBanner.d.ts +1 -1
- package/dist/typescript/src/lib/Components/ContentBanner/ContentBanner.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ContentBanner/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/ContentBanner/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Divider/Divider.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Divider/Divider.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Divider/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Divider/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DotSymbol/DotSymbol.d.ts +3 -3
- package/dist/typescript/src/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/DotSymbol/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/DotSymbol/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Icon/Icon.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Icon/Icon.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Icon/createIcon.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Icon/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/Icon/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/IconButton/IconButton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/IconButton/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/IconButton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
- package/dist/typescript/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/InteractiveIcon/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Label/Label.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Label/Label.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Label/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Label/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Link/Link.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Link/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/Link/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts +9 -9
- package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ListItem/types.d.ts +12 -8
- package/dist/typescript/src/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaBanner/MediaBanner.d.ts +1 -1
- package/dist/typescript/src/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaBanner/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/MediaBanner/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaButton/MediaButton.d.ts +23 -0
- package/dist/typescript/src/lib/Components/MediaButton/MediaButton.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaButton/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/MediaButton/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/{TriggerButton → MediaButton}/types.d.ts +12 -7
- package/dist/typescript/src/lib/Components/MediaButton/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaCard/MediaCard.d.ts +1 -1
- package/dist/typescript/src/lib/Components/MediaCard/MediaCard.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaCard/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/MediaCard/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/NavBar/CoinCapsule.d.ts +1 -1
- package/dist/typescript/src/lib/Components/NavBar/CoinCapsule.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/NavBar/NavBar.d.ts +1 -1
- package/dist/typescript/src/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/NavBar/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/NavBar/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/OptionList/OptionList.d.ts +12 -0
- package/dist/typescript/src/lib/Components/OptionList/OptionList.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/OptionList/OptionList.figma.d.ts +2 -0
- package/dist/typescript/src/lib/Components/OptionList/OptionList.figma.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/OptionList/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/OptionList/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/OptionList/types.d.ts +97 -0
- package/dist/typescript/src/lib/Components/OptionList/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/OptionList/useOptionList/useOptionListItems.d.ts +12 -0
- package/dist/typescript/src/lib/Components/OptionList/useOptionList/useOptionListItems.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/PageIndicator/PageIndicator.d.ts +1 -1
- package/dist/typescript/src/lib/Components/PageIndicator/PageIndicator.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/PageIndicator/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/PageIndicator/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/SearchInput/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/SegmentedControl/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/SegmentedControl/usePillLayout.d.ts +3 -2
- package/dist/typescript/src/lib/Components/SegmentedControl/usePillLayout.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Select/GlobalSelectContext.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Select/GlobalSelectContext.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Select/SelectContext.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Select/SelectContext.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Select/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Skeleton/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Skeleton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Slot/Slot.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Slot/Slot.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Spinner/Spinner.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Spinner/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Spinner/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Spot/Spot.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Spot/Spot.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Spot/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Spot/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Stepper/Stepper.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Stepper/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Stepper/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Subheader/Subheader.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Subheader/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Switch/BaseSwitch.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Switch/BaseSwitch.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Switch/Switch.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Switch/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Switch/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TabBar/TabBar.d.ts +1 -1
- package/dist/typescript/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TabBar/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/TabBar/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tag/Tag.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tag/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Tag/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TextInput/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/TextInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/typescript/src/lib/Components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/ThemeProvider/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/ThemeProvider/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tile/Tile.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tile/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts +1 -1
- package/dist/typescript/src/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/TileButton/types.d.ts +4 -4
- package/dist/typescript/src/lib/Components/TileButton/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipContext.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipContext.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tooltip/TooltipContext.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Tooltip/TooltipContext.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Tooltip/types.d.ts +2 -2
- package/dist/typescript/src/lib/Components/Tooltip/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Utility/Box/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Utility/Box/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Utility/Gradient/LinearGradient/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Utility/Gradient/LinearGradient/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Utility/Gradient/RadialGradient/types.d.ts +3 -3
- package/dist/typescript/src/lib/Components/Utility/Gradient/RadialGradient/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Utility/Pressable/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Utility/Text/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Utility/Text/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Wrap/Wrap.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Wrap/Wrap.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Wrap/types.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Wrap/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/index.d.ts +2 -1
- package/dist/typescript/src/lib/Components/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/types/index.d.ts +1 -1
- package/dist/typescript/src/lib/types/index.d.ts.map +1 -1
- package/dist/typescript/src/lib/utils/components/InjectStylesIntoChildren.d.ts +2 -2
- package/dist/typescript/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
- package/dist/typescript/src/lib/utils/constants/constants.d.ts.map +1 -1
- package/dist/typescript/src/lib/utils/react/extractTextFromChildren.d.ts +1 -1
- package/dist/typescript/src/lib/utils/react/extractTextFromChildren.d.ts.map +1 -1
- package/dist/typescript/src/lib/utils/useControllableState/useControllableState.d.ts +1 -1
- package/dist/typescript/src/lib/utils/useControllableState/useControllableState.d.ts.map +1 -1
- package/dist/typescript/src/styles/hooks/useStyleSheet.d.ts +1 -1
- package/dist/typescript/src/styles/hooks/useStyleSheet.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/areLxPropsEqual.d.ts +1 -1
- package/dist/typescript/src/styles/lx/areLxPropsEqual.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/createStyledPressable.d.ts +1 -1
- package/dist/typescript/src/styles/lx/createStyledPressable.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/createStyledText.d.ts +1 -1
- package/dist/typescript/src/styles/lx/createStyledText.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/createStyledView.d.ts +1 -1
- package/dist/typescript/src/styles/lx/createStyledView.d.ts.map +1 -1
- package/dist/typescript/src/styles/lx/resolveConfig.d.ts +1 -1
- package/dist/typescript/src/styles/lx/resolveConfig.d.ts.map +1 -1
- package/dist/typescript/src/styles/provider/LumenStyleSheetProvider.d.ts +1 -1
- package/dist/typescript/src/styles/provider/LumenStyleSheetProvider.d.ts.map +1 -1
- package/dist/typescript/src/styles/provider/types.d.ts +3 -3
- package/dist/typescript/src/styles/provider/types.d.ts.map +1 -1
- package/dist/typescript/src/styles/theme/createStylesheetTheme.d.ts +1 -1
- package/dist/typescript/src/styles/theme/createStylesheetTheme.d.ts.map +1 -1
- package/dist/typescript/src/styles/theme/resolvers/resolveFontWeights.d.ts +1 -1
- package/dist/typescript/src/styles/theme/resolvers/resolveFontWeights.d.ts.map +1 -1
- package/dist/typescript/src/styles/theme/resolvers/resolveNegativeSpacing.d.ts +2 -2
- package/dist/typescript/src/styles/theme/resolvers/resolveNegativeSpacing.d.ts.map +1 -1
- package/dist/typescript/src/styles/types/factories.types.d.ts +3 -3
- package/dist/typescript/src/styles/types/factories.types.d.ts.map +1 -1
- package/dist/typescript/src/styles/types/theme.types.d.ts +8 -7
- package/dist/typescript/src/styles/types/theme.types.d.ts.map +1 -1
- package/dist/typescript/src/utils/icon-template.d.ts +1 -1
- package/dist/typescript/src/utils/icon-template.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/i18n/I18nProvider.tsx +2 -1
- package/src/i18n/i18n.ts +2 -5
- package/src/lib/Animations/Pulse/Pulse.tsx +2 -2
- package/src/lib/Animations/Pulse/types.ts +2 -2
- package/src/lib/Animations/Spin/Spin.tsx +2 -2
- package/src/lib/Animations/Spin/types.ts +2 -2
- package/src/lib/Animations/types.ts +2 -2
- package/src/lib/Animations/useTimingConfig.ts +1 -1
- package/src/lib/Components/AddressInput/AddressInput.stories.tsx +1 -1
- package/src/lib/Components/AddressInput/types.ts +2 -2
- package/src/lib/Components/AmountDisplay/AmountDisplay.test.tsx +1 -1
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +3 -3
- package/src/lib/Components/AmountDisplay/types.ts +2 -2
- package/src/lib/Components/AmountInput/types.ts +2 -2
- package/src/lib/Components/Avatar/Avatar.stories.tsx +1 -1
- package/src/lib/Components/Avatar/Avatar.tsx +1 -1
- package/src/lib/Components/Avatar/types.ts +1 -1
- package/src/lib/Components/Banner/Banner.tsx +3 -3
- package/src/lib/Components/Banner/types.ts +2 -2
- package/src/lib/Components/BaseInput/BaseInput.tsx +2 -1
- package/src/lib/Components/BaseInput/types.ts +5 -5
- package/src/lib/Components/BottomSheet/BottomSheet.test.tsx +2 -1
- package/src/lib/Components/BottomSheet/BottomSheet.tsx +3 -5
- package/src/lib/Components/BottomSheet/BottomSheetHeader.tsx +1 -1
- package/src/lib/Components/BottomSheet/CustomBackdrop.tsx +1 -1
- package/src/lib/Components/BottomSheet/CustomHandle.tsx +2 -2
- package/src/lib/Components/BottomSheet/Scrollables.tsx +2 -2
- package/src/lib/Components/BottomSheet/types.ts +4 -4
- package/src/lib/Components/BottomSheet/useBottomSheetRef.ts +1 -1
- package/src/lib/Components/Button/BaseButton.test.tsx +1 -1
- package/src/lib/Components/Button/BaseButton.tsx +3 -3
- package/src/lib/Components/Button/Button.tsx +1 -1
- package/src/lib/Components/Button/types.ts +4 -4
- package/src/lib/Components/Card/Card.test.tsx +1 -1
- package/src/lib/Components/Card/Card.tsx +5 -3
- package/src/lib/Components/Card/types.ts +3 -3
- package/src/lib/Components/CardButton/CardButton.tsx +1 -1
- package/src/lib/Components/CardButton/types.ts +3 -3
- package/src/lib/Components/Checkbox/BaseCheckbox.tsx +4 -8
- package/src/lib/Components/Checkbox/Checkbox.tsx +1 -1
- package/src/lib/Components/Checkbox/types.ts +1 -1
- package/src/lib/Components/ContentBanner/ContentBanner.tsx +1 -1
- package/src/lib/Components/ContentBanner/types.ts +1 -1
- package/src/lib/Components/Divider/Divider.tsx +1 -1
- package/src/lib/Components/Divider/types.ts +1 -1
- package/src/lib/Components/DotSymbol/DotSymbol.tsx +3 -3
- package/src/lib/Components/DotSymbol/types.ts +1 -1
- package/src/lib/Components/Icon/Icon.tsx +2 -2
- package/src/lib/Components/Icon/createIcon.ts +2 -2
- package/src/lib/Components/Icon/types.ts +4 -4
- package/src/lib/Components/IconButton/IconButton.tsx +1 -1
- package/src/lib/Components/IconButton/types.ts +1 -1
- package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +4 -3
- package/src/lib/Components/InteractiveIcon/types.ts +4 -4
- package/src/lib/Components/Label/Label.tsx +1 -1
- package/src/lib/Components/Label/types.ts +1 -1
- package/src/lib/Components/Link/Link.test.tsx +1 -1
- package/src/lib/Components/Link/Link.tsx +2 -2
- package/src/lib/Components/Link/types.ts +4 -4
- package/src/lib/Components/ListItem/ListItem.mdx +15 -7
- package/src/lib/Components/ListItem/ListItem.stories.tsx +354 -220
- package/src/lib/Components/ListItem/ListItem.test.tsx +152 -0
- package/src/lib/Components/ListItem/ListItem.tsx +64 -28
- package/src/lib/Components/ListItem/types.ts +12 -9
- package/src/lib/Components/MediaBanner/MediaBanner.tsx +1 -1
- package/src/lib/Components/MediaBanner/types.ts +2 -2
- package/{dist/module/lib/Components/TriggerButton/TriggerButton.mdx → src/lib/Components/MediaButton/MediaButton.mdx} +10 -10
- package/src/lib/Components/{TriggerButton/TriggerButton.stories.tsx → MediaButton/MediaButton.stories.tsx} +28 -28
- package/src/lib/Components/{TriggerButton/TriggerButton.test.tsx → MediaButton/MediaButton.test.tsx} +24 -23
- package/src/lib/Components/{TriggerButton/TriggerButton.tsx → MediaButton/MediaButton.tsx} +28 -22
- package/src/lib/Components/MediaButton/index.ts +2 -0
- package/src/lib/Components/{TriggerButton → MediaButton}/types.ts +12 -7
- package/src/lib/Components/MediaCard/MediaCard.tsx +1 -1
- package/src/lib/Components/MediaCard/types.ts +1 -1
- package/src/lib/Components/MediaImage/MediaImage.tsx +1 -1
- package/src/lib/Components/MediaImage/types.ts +1 -1
- package/src/lib/Components/NavBar/CoinCapsule.tsx +1 -1
- package/src/lib/Components/NavBar/NavBar.tsx +5 -3
- package/src/lib/Components/NavBar/types.ts +4 -4
- package/src/lib/Components/OptionList/OptionList.figma.tsx +37 -0
- package/src/lib/Components/OptionList/OptionList.mdx +304 -0
- package/src/lib/Components/OptionList/OptionList.stories.tsx +755 -0
- package/src/lib/Components/OptionList/OptionList.test.tsx +412 -0
- package/src/lib/Components/OptionList/OptionList.tsx +532 -0
- package/src/lib/Components/OptionList/index.ts +2 -0
- package/src/lib/Components/OptionList/types.ts +115 -0
- package/src/lib/Components/OptionList/useOptionList/useOptionListItems.test.ts +73 -0
- package/src/lib/Components/OptionList/useOptionList/useOptionListItems.ts +49 -0
- package/src/lib/Components/PageIndicator/PageIndicator.tsx +1 -1
- package/src/lib/Components/PageIndicator/types.ts +1 -1
- package/src/lib/Components/SearchInput/SearchInput.stories.tsx +1 -1
- package/src/lib/Components/SearchInput/types.ts +2 -2
- package/src/lib/Components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/lib/Components/SegmentedControl/types.ts +4 -4
- package/src/lib/Components/SegmentedControl/usePillLayout.ts +2 -2
- package/src/lib/Components/Select/GlobalSelectContext.tsx +3 -2
- package/src/lib/Components/Select/Select.tsx +1 -1
- package/src/lib/Components/Select/SelectContext.tsx +2 -2
- package/src/lib/Components/Select/types.ts +4 -4
- package/src/lib/Components/Skeleton/Skeleton.stories.tsx +1 -1
- package/src/lib/Components/Skeleton/types.ts +1 -1
- package/src/lib/Components/Slot/Slot.tsx +4 -5
- package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -1
- package/src/lib/Components/Spinner/Spinner.tsx +3 -2
- package/src/lib/Components/Spinner/types.ts +3 -3
- package/src/lib/Components/Spot/Spot.stories.tsx +2 -2
- package/src/lib/Components/Spot/Spot.tsx +6 -4
- package/src/lib/Components/Spot/types.ts +3 -3
- package/src/lib/Components/Stepper/Stepper.stories.tsx +1 -1
- package/src/lib/Components/Stepper/Stepper.tsx +1 -1
- package/src/lib/Components/Stepper/types.ts +1 -1
- package/src/lib/Components/Subheader/Subheader.tsx +1 -1
- package/src/lib/Components/Subheader/types.ts +3 -3
- package/src/lib/Components/Switch/BaseSwitch.tsx +2 -2
- package/src/lib/Components/Switch/Switch.tsx +1 -1
- package/src/lib/Components/Switch/types.ts +1 -1
- package/src/lib/Components/TabBar/TabBar.tsx +4 -9
- package/src/lib/Components/TabBar/types.ts +4 -4
- package/src/lib/Components/Tag/Tag.tsx +2 -2
- package/src/lib/Components/Tag/types.ts +3 -3
- package/src/lib/Components/TextInput/types.ts +2 -2
- package/src/lib/Components/ThemeProvider/ThemeProvider.tsx +1 -1
- package/src/lib/Components/ThemeProvider/types.ts +4 -4
- package/src/lib/Components/Tile/Tile.tsx +2 -2
- package/src/lib/Components/Tile/types.ts +2 -2
- package/src/lib/Components/TileButton/TileButton.test.tsx +1 -1
- package/src/lib/Components/TileButton/TileButton.tsx +3 -3
- package/src/lib/Components/TileButton/types.ts +4 -4
- package/src/lib/Components/Tooltip/GlobalTooltipContext.tsx +2 -1
- package/src/lib/Components/Tooltip/Tooltip.tsx +1 -1
- package/src/lib/Components/Tooltip/TooltipContext.tsx +1 -1
- package/src/lib/Components/Tooltip/types.ts +2 -2
- package/src/lib/Components/Utility/Box/types.ts +1 -1
- package/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.test.tsx +2 -1
- package/src/lib/Components/Utility/Gradient/LinearGradient/types.ts +3 -3
- package/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.test.tsx +2 -1
- package/src/lib/Components/Utility/Gradient/RadialGradient/types.ts +3 -3
- package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +2 -1
- package/src/lib/Components/Utility/Pressable/types.ts +1 -1
- package/src/lib/Components/Utility/Text/Text.stories.tsx +1 -1
- package/src/lib/Components/Utility/Text/types.ts +1 -1
- package/src/lib/Components/Wrap/Wrap.tsx +1 -1
- package/src/lib/Components/Wrap/types.ts +1 -1
- package/src/lib/Components/index.ts +2 -1
- package/src/lib/types/index.ts +1 -1
- package/src/lib/utils/components/InjectStylesIntoChildren.tsx +3 -8
- package/src/lib/utils/constants/constants.ts +2 -4
- package/src/lib/utils/react/extractTextFromChildren.ts +2 -1
- package/src/lib/utils/useControllableState/useControllableState.ts +2 -1
- package/src/styles/hooks/useStyleSheet.test.tsx +2 -1
- package/src/styles/hooks/useStyleSheet.ts +2 -1
- package/src/styles/lx/areLxPropsEqual.ts +1 -1
- package/src/styles/lx/createStyledPressable.test.tsx +2 -2
- package/src/styles/lx/createStyledPressable.tsx +1 -1
- package/src/styles/lx/createStyledText.test.tsx +2 -1
- package/src/styles/lx/createStyledText.tsx +1 -1
- package/src/styles/lx/createStyledView.test.tsx +2 -1
- package/src/styles/lx/createStyledView.tsx +2 -1
- package/src/styles/lx/resolveConfig.ts +1 -1
- package/src/styles/provider/LumenStyleSheetProvider.test.tsx +2 -1
- package/src/styles/provider/LumenStyleSheetProvider.tsx +2 -4
- package/src/styles/provider/types.ts +3 -3
- package/src/styles/theme/createStylesheetTheme.ts +1 -1
- package/src/styles/theme/resolvers/resolveFontWeights.ts +1 -1
- package/src/styles/theme/resolvers/resolveNegativeSpacing.test.ts +1 -1
- package/src/styles/theme/resolvers/resolveNegativeSpacing.ts +2 -2
- package/src/styles/types/factories.types.ts +3 -3
- package/src/styles/types/theme.types.ts +10 -8
- package/src/utils/icon-template.ts +1 -2
- package/dist/module/lib/Components/TriggerButton/TriggerButton.js.map +0 -1
- package/dist/module/lib/Components/TriggerButton/TriggerButton.stories.js.map +0 -1
- package/dist/module/lib/Components/TriggerButton/TriggerButton.test.js.map +0 -1
- package/dist/module/lib/Components/TriggerButton/index.js +0 -5
- package/dist/module/lib/Components/TriggerButton/index.js.map +0 -1
- package/dist/module/lib/Components/TriggerButton/types.js.map +0 -1
- package/dist/typescript/src/lib/Components/TriggerButton/TriggerButton.d.ts +0 -23
- package/dist/typescript/src/lib/Components/TriggerButton/TriggerButton.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/TriggerButton/index.d.ts +0 -3
- package/dist/typescript/src/lib/Components/TriggerButton/index.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/TriggerButton/types.d.ts.map +0 -1
- package/src/lib/Components/TriggerButton/index.ts +0 -2
- /package/dist/module/lib/Components/{TriggerButton → MediaButton}/types.js +0 -0
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { CryptoIcon } from '@ledgerhq/crypto-icons';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Settings } from "../../Symbols/index.js";
|
|
6
|
+
import { BottomSheet } from "../BottomSheet/index.js";
|
|
7
|
+
import { BottomSheetHeader } from "../BottomSheet/BottomSheetHeader.js";
|
|
8
|
+
import { BottomSheetScrollView, BottomSheetView } from "../BottomSheet/Scrollables.js";
|
|
9
|
+
import { useBottomSheetRef } from "../BottomSheet/useBottomSheetRef.js";
|
|
10
|
+
import { MediaButton } from "../MediaButton/index.js";
|
|
11
|
+
import { Spot } from "../Spot/index.js";
|
|
12
|
+
import { Tag } from "../Tag/Tag.js";
|
|
13
|
+
import { Box, Text } from "../Utility/index.js";
|
|
14
|
+
import { OptionList, OptionListContent, OptionListEmptyState, OptionListItem, OptionListItemLeading, OptionListItemContent, OptionListItemDescription, OptionListItemContentRow, OptionListTrigger, OptionListItemText } from "./OptionList.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
const meta = {
|
|
17
|
+
component: OptionList,
|
|
18
|
+
title: 'Selection/OptionList',
|
|
19
|
+
subcomponents: {
|
|
20
|
+
OptionListContent,
|
|
21
|
+
OptionListItem,
|
|
22
|
+
OptionListItemLeading,
|
|
23
|
+
OptionListItemContent,
|
|
24
|
+
OptionListItemText,
|
|
25
|
+
OptionListItemDescription,
|
|
26
|
+
OptionListItemContentRow,
|
|
27
|
+
OptionListTrigger
|
|
28
|
+
},
|
|
29
|
+
decorators: [Story => /*#__PURE__*/_jsx("div", {
|
|
30
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
31
|
+
lx: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
padding: 's24',
|
|
34
|
+
alignItems: 'flex-start',
|
|
35
|
+
width: 's320',
|
|
36
|
+
height: 's480'
|
|
37
|
+
},
|
|
38
|
+
children: /*#__PURE__*/_jsx(Story, {})
|
|
39
|
+
})
|
|
40
|
+
})],
|
|
41
|
+
parameters: {
|
|
42
|
+
layout: 'fullscreen',
|
|
43
|
+
docs: {
|
|
44
|
+
source: {
|
|
45
|
+
language: 'tsx',
|
|
46
|
+
format: true,
|
|
47
|
+
type: 'code'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
const CURRENCIES = [{
|
|
54
|
+
value: 'btc',
|
|
55
|
+
label: 'Bitcoin',
|
|
56
|
+
meta: {
|
|
57
|
+
ticker: 'BTC',
|
|
58
|
+
ledgerId: 'bitcoin'
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
value: 'eth',
|
|
62
|
+
label: 'Ethereum',
|
|
63
|
+
meta: {
|
|
64
|
+
ticker: 'ETH',
|
|
65
|
+
ledgerId: 'ethereum'
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
value: 'sol',
|
|
69
|
+
label: 'Solana',
|
|
70
|
+
meta: {
|
|
71
|
+
ticker: 'SOL',
|
|
72
|
+
ledgerId: 'solana'
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
value: 'dot',
|
|
76
|
+
label: 'Polkadot',
|
|
77
|
+
meta: {
|
|
78
|
+
ticker: 'DOT',
|
|
79
|
+
ledgerId: 'polkadot'
|
|
80
|
+
}
|
|
81
|
+
}];
|
|
82
|
+
export const Base = {
|
|
83
|
+
render: () => {
|
|
84
|
+
const [value, setValue] = useState(null);
|
|
85
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
86
|
+
const selected = CURRENCIES.find(c => c.value === value);
|
|
87
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
88
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
89
|
+
label: "Currency",
|
|
90
|
+
onPress: () => bottomSheetRef.current?.present(),
|
|
91
|
+
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
92
|
+
lx: {
|
|
93
|
+
color: 'base'
|
|
94
|
+
},
|
|
95
|
+
children: selected.label
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
98
|
+
ref: bottomSheetRef,
|
|
99
|
+
enableDynamicSizing: true,
|
|
100
|
+
snapPoints: null,
|
|
101
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
102
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
103
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
104
|
+
title: "Select currency"
|
|
105
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
106
|
+
items: CURRENCIES,
|
|
107
|
+
value: value,
|
|
108
|
+
onValueChange: v => {
|
|
109
|
+
setValue(v);
|
|
110
|
+
bottomSheetRef.current?.dismiss();
|
|
111
|
+
},
|
|
112
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
113
|
+
renderItem: item => {
|
|
114
|
+
const ticker = item.meta.ticker;
|
|
115
|
+
return /*#__PURE__*/_jsxs(OptionListItem, {
|
|
116
|
+
value: item.value,
|
|
117
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
118
|
+
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
119
|
+
ledgerId: item.meta?.ledgerId ?? '',
|
|
120
|
+
ticker: ticker,
|
|
121
|
+
size: "32px"
|
|
122
|
+
})
|
|
123
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
124
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
125
|
+
children: item.label
|
|
126
|
+
}), /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
127
|
+
children: ticker
|
|
128
|
+
})]
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const FOODS = [{
|
|
140
|
+
value: 'apple',
|
|
141
|
+
label: 'Apple',
|
|
142
|
+
group: 'Fruits'
|
|
143
|
+
}, {
|
|
144
|
+
value: 'banana',
|
|
145
|
+
label: 'Banana',
|
|
146
|
+
group: 'Fruits'
|
|
147
|
+
}, {
|
|
148
|
+
value: 'orange',
|
|
149
|
+
label: 'Orange',
|
|
150
|
+
group: 'Fruits'
|
|
151
|
+
}, {
|
|
152
|
+
value: 'carrot',
|
|
153
|
+
label: 'Carrot',
|
|
154
|
+
group: 'Vegetables'
|
|
155
|
+
}, {
|
|
156
|
+
value: 'broccoli',
|
|
157
|
+
label: 'Broccoli',
|
|
158
|
+
group: 'Vegetables'
|
|
159
|
+
}, {
|
|
160
|
+
value: 'spinach',
|
|
161
|
+
label: 'Spinach',
|
|
162
|
+
group: 'Vegetables'
|
|
163
|
+
}];
|
|
164
|
+
export const WithGroups = {
|
|
165
|
+
render: () => {
|
|
166
|
+
const [value, setValue] = useState(null);
|
|
167
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
168
|
+
const selected = FOODS.find(f => f.value === value);
|
|
169
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
170
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
171
|
+
label: "Food",
|
|
172
|
+
onPress: () => bottomSheetRef.current?.present(),
|
|
173
|
+
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
174
|
+
lx: {
|
|
175
|
+
color: 'base'
|
|
176
|
+
},
|
|
177
|
+
children: selected.label
|
|
178
|
+
})
|
|
179
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
180
|
+
ref: bottomSheetRef,
|
|
181
|
+
enableDynamicSizing: true,
|
|
182
|
+
snapPoints: null,
|
|
183
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
184
|
+
children: /*#__PURE__*/_jsxs(BottomSheetScrollView, {
|
|
185
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
186
|
+
title: "Pick a food"
|
|
187
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
188
|
+
items: FOODS,
|
|
189
|
+
value: value,
|
|
190
|
+
onValueChange: v => {
|
|
191
|
+
setValue(v);
|
|
192
|
+
bottomSheetRef.current?.dismiss();
|
|
193
|
+
},
|
|
194
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
195
|
+
renderItem: item => /*#__PURE__*/_jsx(OptionListItem, {
|
|
196
|
+
value: item.value,
|
|
197
|
+
children: /*#__PURE__*/_jsx(OptionListItemContent, {
|
|
198
|
+
children: /*#__PURE__*/_jsx(OptionListItemText, {
|
|
199
|
+
children: item.label
|
|
200
|
+
})
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
})]
|
|
205
|
+
})
|
|
206
|
+
})]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const NETWORKS = [{
|
|
211
|
+
value: 'ethereum',
|
|
212
|
+
label: 'Ethereum',
|
|
213
|
+
meta: {
|
|
214
|
+
ticker: 'ETH',
|
|
215
|
+
ledgerId: 'ethereum',
|
|
216
|
+
tag: 'ERC-20'
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
value: 'polygon',
|
|
220
|
+
label: 'Polygon',
|
|
221
|
+
meta: {
|
|
222
|
+
ticker: 'MATIC',
|
|
223
|
+
ledgerId: 'polygon',
|
|
224
|
+
tag: 'Layer 2'
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
value: 'arbitrum',
|
|
228
|
+
label: 'Arbitrum',
|
|
229
|
+
meta: {
|
|
230
|
+
ticker: 'ARB',
|
|
231
|
+
ledgerId: 'arbitrum',
|
|
232
|
+
tag: 'Layer 2'
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
value: 'optimism',
|
|
236
|
+
label: 'Optimism',
|
|
237
|
+
meta: {
|
|
238
|
+
ticker: 'OP',
|
|
239
|
+
ledgerId: 'optimism',
|
|
240
|
+
tag: 'Layer 2'
|
|
241
|
+
}
|
|
242
|
+
}];
|
|
243
|
+
export const WithContentRow = {
|
|
244
|
+
render: () => {
|
|
245
|
+
const [value, setValue] = useState(null);
|
|
246
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
247
|
+
const selected = NETWORKS.find(n => n.value === value);
|
|
248
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
249
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
250
|
+
label: "Network",
|
|
251
|
+
onPress: () => bottomSheetRef.current?.present(),
|
|
252
|
+
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
253
|
+
lx: {
|
|
254
|
+
color: 'base'
|
|
255
|
+
},
|
|
256
|
+
children: selected.label
|
|
257
|
+
})
|
|
258
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
259
|
+
ref: bottomSheetRef,
|
|
260
|
+
enableDynamicSizing: true,
|
|
261
|
+
snapPoints: null,
|
|
262
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
263
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
264
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
265
|
+
title: "Select network"
|
|
266
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
267
|
+
items: NETWORKS,
|
|
268
|
+
value: value,
|
|
269
|
+
onValueChange: v => {
|
|
270
|
+
setValue(v);
|
|
271
|
+
bottomSheetRef.current?.dismiss();
|
|
272
|
+
},
|
|
273
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
274
|
+
renderItem: item => {
|
|
275
|
+
const meta = item.meta;
|
|
276
|
+
return /*#__PURE__*/_jsxs(OptionListItem, {
|
|
277
|
+
value: item.value,
|
|
278
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
279
|
+
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
280
|
+
ledgerId: meta.ledgerId,
|
|
281
|
+
ticker: meta.ticker,
|
|
282
|
+
size: "32px"
|
|
283
|
+
})
|
|
284
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
285
|
+
children: [/*#__PURE__*/_jsxs(OptionListItemContentRow, {
|
|
286
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
287
|
+
children: item.label
|
|
288
|
+
}), /*#__PURE__*/_jsx(Tag, {
|
|
289
|
+
label: meta.tag,
|
|
290
|
+
appearance: "gray",
|
|
291
|
+
size: "sm"
|
|
292
|
+
})]
|
|
293
|
+
}), /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
294
|
+
children: meta.ticker
|
|
295
|
+
})]
|
|
296
|
+
})]
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
})
|
|
300
|
+
})]
|
|
301
|
+
})
|
|
302
|
+
})]
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const ACCOUNTS = [{
|
|
307
|
+
value: 'savings',
|
|
308
|
+
label: 'Savings Account',
|
|
309
|
+
description: 'High-yield savings'
|
|
310
|
+
}, {
|
|
311
|
+
value: 'checking',
|
|
312
|
+
label: 'Checking Account',
|
|
313
|
+
description: 'Primary checking',
|
|
314
|
+
disabled: true
|
|
315
|
+
}, {
|
|
316
|
+
value: 'investment',
|
|
317
|
+
label: 'Investment Account'
|
|
318
|
+
}, {
|
|
319
|
+
value: 'retirement',
|
|
320
|
+
label: 'Retirement Fund',
|
|
321
|
+
description: 'Long-term growth',
|
|
322
|
+
disabled: true
|
|
323
|
+
}];
|
|
324
|
+
export const WithDisabledItems = {
|
|
325
|
+
render: () => {
|
|
326
|
+
const [value, setValue] = useState(null);
|
|
327
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
328
|
+
const selected = ACCOUNTS.find(a => a.value === value);
|
|
329
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
330
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
331
|
+
label: "Account",
|
|
332
|
+
onPress: () => bottomSheetRef.current?.present(),
|
|
333
|
+
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
334
|
+
lx: {
|
|
335
|
+
color: 'base'
|
|
336
|
+
},
|
|
337
|
+
children: selected.label
|
|
338
|
+
})
|
|
339
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
340
|
+
ref: bottomSheetRef,
|
|
341
|
+
enableDynamicSizing: true,
|
|
342
|
+
snapPoints: null,
|
|
343
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
344
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
345
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
346
|
+
title: "Select account"
|
|
347
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
348
|
+
items: ACCOUNTS,
|
|
349
|
+
value: value,
|
|
350
|
+
onValueChange: v => {
|
|
351
|
+
setValue(v);
|
|
352
|
+
bottomSheetRef.current?.dismiss();
|
|
353
|
+
},
|
|
354
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
355
|
+
renderItem: item => /*#__PURE__*/_jsxs(OptionListItem, {
|
|
356
|
+
value: item.value,
|
|
357
|
+
disabled: item.disabled,
|
|
358
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
359
|
+
children: /*#__PURE__*/_jsx(Spot, {
|
|
360
|
+
appearance: "icon",
|
|
361
|
+
icon: Settings
|
|
362
|
+
})
|
|
363
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
364
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
365
|
+
children: item.label
|
|
366
|
+
}), item.description && /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
367
|
+
children: item.description
|
|
368
|
+
})]
|
|
369
|
+
})]
|
|
370
|
+
})
|
|
371
|
+
})
|
|
372
|
+
})]
|
|
373
|
+
})
|
|
374
|
+
})]
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
const GROUPED_NETWORKS = [{
|
|
379
|
+
value: 'eth-main',
|
|
380
|
+
label: 'Ethereum',
|
|
381
|
+
group: 'Layer 1',
|
|
382
|
+
meta: {
|
|
383
|
+
ticker: 'ETH',
|
|
384
|
+
ledgerId: 'ethereum',
|
|
385
|
+
tag: 'Mainnet'
|
|
386
|
+
}
|
|
387
|
+
}, {
|
|
388
|
+
value: 'btc-main',
|
|
389
|
+
label: 'Bitcoin',
|
|
390
|
+
group: 'Layer 1',
|
|
391
|
+
meta: {
|
|
392
|
+
ticker: 'BTC',
|
|
393
|
+
ledgerId: 'bitcoin',
|
|
394
|
+
tag: 'Mainnet'
|
|
395
|
+
}
|
|
396
|
+
}, {
|
|
397
|
+
value: 'polygon',
|
|
398
|
+
label: 'Polygon',
|
|
399
|
+
group: 'Layer 2',
|
|
400
|
+
meta: {
|
|
401
|
+
ticker: 'MATIC',
|
|
402
|
+
ledgerId: 'polygon',
|
|
403
|
+
tag: 'Rollup'
|
|
404
|
+
}
|
|
405
|
+
}, {
|
|
406
|
+
value: 'arbitrum',
|
|
407
|
+
label: 'Arbitrum',
|
|
408
|
+
group: 'Layer 2',
|
|
409
|
+
meta: {
|
|
410
|
+
ticker: 'ARB',
|
|
411
|
+
ledgerId: 'arbitrum',
|
|
412
|
+
tag: 'Rollup'
|
|
413
|
+
}
|
|
414
|
+
}, {
|
|
415
|
+
value: 'optimism',
|
|
416
|
+
label: 'Optimism',
|
|
417
|
+
group: 'Layer 2',
|
|
418
|
+
meta: {
|
|
419
|
+
ticker: 'OP',
|
|
420
|
+
ledgerId: 'optimism',
|
|
421
|
+
tag: 'Rollup'
|
|
422
|
+
}
|
|
423
|
+
}];
|
|
424
|
+
export const GroupedWithContentRow = {
|
|
425
|
+
render: () => {
|
|
426
|
+
const [value, setValue] = useState(null);
|
|
427
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
428
|
+
const selected = GROUPED_NETWORKS.find(n => n.value === value);
|
|
429
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
430
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
431
|
+
label: "Network",
|
|
432
|
+
onPress: () => bottomSheetRef.current?.present(),
|
|
433
|
+
children: selected && /*#__PURE__*/_jsx(Text, {
|
|
434
|
+
lx: {
|
|
435
|
+
color: 'base'
|
|
436
|
+
},
|
|
437
|
+
children: selected.label
|
|
438
|
+
})
|
|
439
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
440
|
+
ref: bottomSheetRef,
|
|
441
|
+
enableDynamicSizing: true,
|
|
442
|
+
snapPoints: null,
|
|
443
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
444
|
+
children: /*#__PURE__*/_jsxs(BottomSheetScrollView, {
|
|
445
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
446
|
+
title: "Select network"
|
|
447
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
448
|
+
items: GROUPED_NETWORKS,
|
|
449
|
+
value: value,
|
|
450
|
+
onValueChange: v => {
|
|
451
|
+
setValue(v);
|
|
452
|
+
bottomSheetRef.current?.dismiss();
|
|
453
|
+
},
|
|
454
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
455
|
+
renderItem: item => {
|
|
456
|
+
const meta = item.meta;
|
|
457
|
+
return /*#__PURE__*/_jsxs(OptionListItem, {
|
|
458
|
+
value: item.value,
|
|
459
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
460
|
+
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
461
|
+
ledgerId: meta.ledgerId,
|
|
462
|
+
ticker: meta.ticker,
|
|
463
|
+
size: "32px"
|
|
464
|
+
})
|
|
465
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
466
|
+
children: [/*#__PURE__*/_jsxs(OptionListItemContentRow, {
|
|
467
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
468
|
+
children: item.label
|
|
469
|
+
}), /*#__PURE__*/_jsx(Tag, {
|
|
470
|
+
label: meta.tag,
|
|
471
|
+
appearance: "gray",
|
|
472
|
+
size: "sm"
|
|
473
|
+
})]
|
|
474
|
+
}), /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
475
|
+
children: meta.ticker
|
|
476
|
+
})]
|
|
477
|
+
})]
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
})
|
|
481
|
+
})]
|
|
482
|
+
})
|
|
483
|
+
})]
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
export const EmptyState = {
|
|
488
|
+
render: () => {
|
|
489
|
+
const bottomSheetRef = useBottomSheetRef();
|
|
490
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
491
|
+
children: [/*#__PURE__*/_jsx(OptionListTrigger, {
|
|
492
|
+
label: "Currency",
|
|
493
|
+
onPress: () => bottomSheetRef.current?.present()
|
|
494
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
495
|
+
ref: bottomSheetRef,
|
|
496
|
+
enableDynamicSizing: true,
|
|
497
|
+
snapPoints: null,
|
|
498
|
+
onClose: () => bottomSheetRef.current?.dismiss(),
|
|
499
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
500
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
501
|
+
title: "Select currency"
|
|
502
|
+
}), /*#__PURE__*/_jsxs(OptionList, {
|
|
503
|
+
items: [],
|
|
504
|
+
value: null,
|
|
505
|
+
children: [/*#__PURE__*/_jsx(OptionListContent, {
|
|
506
|
+
renderItem: item => /*#__PURE__*/_jsx(OptionListItem, {
|
|
507
|
+
value: item.value,
|
|
508
|
+
children: /*#__PURE__*/_jsx(OptionListItemContent, {
|
|
509
|
+
children: /*#__PURE__*/_jsx(OptionListItemText, {
|
|
510
|
+
children: item.label
|
|
511
|
+
})
|
|
512
|
+
})
|
|
513
|
+
})
|
|
514
|
+
}), /*#__PURE__*/_jsx(OptionListEmptyState, {
|
|
515
|
+
title: "No options available",
|
|
516
|
+
description: "There are no items to display"
|
|
517
|
+
})]
|
|
518
|
+
})]
|
|
519
|
+
})
|
|
520
|
+
})]
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
const SIMPLE_OPTIONS = [{
|
|
525
|
+
value: 'all',
|
|
526
|
+
label: 'All accounts'
|
|
527
|
+
}, {
|
|
528
|
+
value: 'savings',
|
|
529
|
+
label: 'Savings'
|
|
530
|
+
}, {
|
|
531
|
+
value: 'checking',
|
|
532
|
+
label: 'Checking'
|
|
533
|
+
}];
|
|
534
|
+
const SETTINGS_OPTIONS = [{
|
|
535
|
+
value: 'general',
|
|
536
|
+
label: 'General'
|
|
537
|
+
}, {
|
|
538
|
+
value: 'security',
|
|
539
|
+
label: 'Security'
|
|
540
|
+
}, {
|
|
541
|
+
value: 'notifications',
|
|
542
|
+
label: 'Notifications'
|
|
543
|
+
}];
|
|
544
|
+
const appearances = ['gray', 'transparent', 'no-background'];
|
|
545
|
+
const SimpleOptionListSheet = ({
|
|
546
|
+
sheetRef,
|
|
547
|
+
items,
|
|
548
|
+
title,
|
|
549
|
+
value,
|
|
550
|
+
onValueChange
|
|
551
|
+
}) => /*#__PURE__*/_jsx(BottomSheet, {
|
|
552
|
+
ref: sheetRef,
|
|
553
|
+
enableDynamicSizing: true,
|
|
554
|
+
snapPoints: null,
|
|
555
|
+
onClose: () => sheetRef.current?.dismiss(),
|
|
556
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
557
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
558
|
+
title: title
|
|
559
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
560
|
+
items: items,
|
|
561
|
+
value: value,
|
|
562
|
+
onValueChange: v => {
|
|
563
|
+
onValueChange(v);
|
|
564
|
+
sheetRef.current?.dismiss();
|
|
565
|
+
},
|
|
566
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
567
|
+
renderItem: item => /*#__PURE__*/_jsx(OptionListItem, {
|
|
568
|
+
value: item.value,
|
|
569
|
+
children: /*#__PURE__*/_jsx(OptionListItemContent, {
|
|
570
|
+
children: /*#__PURE__*/_jsx(OptionListItemText, {
|
|
571
|
+
children: item.label
|
|
572
|
+
})
|
|
573
|
+
})
|
|
574
|
+
})
|
|
575
|
+
})
|
|
576
|
+
})]
|
|
577
|
+
})
|
|
578
|
+
});
|
|
579
|
+
export const TriggerShowcase = {
|
|
580
|
+
render: () => {
|
|
581
|
+
const [buttonValue, setButtonValue] = useState(null);
|
|
582
|
+
const [iconValue, setIconValue] = useState(null);
|
|
583
|
+
const [cryptoValue, setCryptoValue] = useState(null);
|
|
584
|
+
const [appearanceValues, setAppearanceValues] = useState({});
|
|
585
|
+
const buttonRef = useBottomSheetRef();
|
|
586
|
+
const iconRef = useBottomSheetRef();
|
|
587
|
+
const cryptoRef = useBottomSheetRef();
|
|
588
|
+
const appearanceRefs = {
|
|
589
|
+
gray: useBottomSheetRef(),
|
|
590
|
+
transparent: useBottomSheetRef(),
|
|
591
|
+
'no-background': useBottomSheetRef()
|
|
592
|
+
};
|
|
593
|
+
const selectedButton = SIMPLE_OPTIONS.find(o => o.value === buttonValue);
|
|
594
|
+
const selectedIcon = SETTINGS_OPTIONS.find(o => o.value === iconValue);
|
|
595
|
+
const selectedCrypto = CURRENCIES.find(c => c.value === cryptoValue);
|
|
596
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
597
|
+
lx: {
|
|
598
|
+
gap: 's16',
|
|
599
|
+
alignItems: 'flex-start'
|
|
600
|
+
},
|
|
601
|
+
children: [/*#__PURE__*/_jsx(MediaButton, {
|
|
602
|
+
appearance: "gray",
|
|
603
|
+
onPress: () => buttonRef.current?.present(),
|
|
604
|
+
children: selectedButton?.label ?? 'All accounts'
|
|
605
|
+
}), /*#__PURE__*/_jsx(MediaButton, {
|
|
606
|
+
appearance: "gray",
|
|
607
|
+
disabled: true,
|
|
608
|
+
children: "Disabled"
|
|
609
|
+
}), /*#__PURE__*/_jsx(MediaButton, {
|
|
610
|
+
appearance: "gray",
|
|
611
|
+
onPress: () => iconRef.current?.present(),
|
|
612
|
+
icon: /*#__PURE__*/_jsx(Settings, {
|
|
613
|
+
size: 20
|
|
614
|
+
}),
|
|
615
|
+
iconType: "flat",
|
|
616
|
+
children: selectedIcon?.label ?? 'Settings'
|
|
617
|
+
}), /*#__PURE__*/_jsx(MediaButton, {
|
|
618
|
+
appearance: "gray",
|
|
619
|
+
onPress: () => cryptoRef.current?.present(),
|
|
620
|
+
icon: selectedCrypto?.meta ? /*#__PURE__*/_jsx(CryptoIcon, {
|
|
621
|
+
ledgerId: selectedCrypto.meta.ledgerId,
|
|
622
|
+
ticker: selectedCrypto.meta.ticker,
|
|
623
|
+
size: "32px"
|
|
624
|
+
}) : undefined,
|
|
625
|
+
iconType: "rounded",
|
|
626
|
+
children: selectedCrypto?.label ?? 'Network'
|
|
627
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
628
|
+
lx: {
|
|
629
|
+
flexDirection: 'row',
|
|
630
|
+
gap: 's16'
|
|
631
|
+
},
|
|
632
|
+
children: appearances.map(appearance => {
|
|
633
|
+
const selected = SIMPLE_OPTIONS.find(o => o.value === appearanceValues[appearance]);
|
|
634
|
+
return /*#__PURE__*/_jsx(MediaButton, {
|
|
635
|
+
appearance: appearance,
|
|
636
|
+
onPress: () => appearanceRefs[appearance].current?.present(),
|
|
637
|
+
children: selected?.label ?? appearance
|
|
638
|
+
}, appearance);
|
|
639
|
+
})
|
|
640
|
+
}), /*#__PURE__*/_jsx(SimpleOptionListSheet, {
|
|
641
|
+
sheetRef: buttonRef,
|
|
642
|
+
items: SIMPLE_OPTIONS,
|
|
643
|
+
title: "All accounts",
|
|
644
|
+
value: buttonValue,
|
|
645
|
+
onValueChange: setButtonValue
|
|
646
|
+
}), /*#__PURE__*/_jsx(SimpleOptionListSheet, {
|
|
647
|
+
sheetRef: iconRef,
|
|
648
|
+
items: SETTINGS_OPTIONS,
|
|
649
|
+
title: "Settings",
|
|
650
|
+
value: iconValue,
|
|
651
|
+
onValueChange: setIconValue
|
|
652
|
+
}), /*#__PURE__*/_jsx(BottomSheet, {
|
|
653
|
+
ref: cryptoRef,
|
|
654
|
+
enableDynamicSizing: true,
|
|
655
|
+
snapPoints: null,
|
|
656
|
+
onClose: () => cryptoRef.current?.dismiss(),
|
|
657
|
+
children: /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
658
|
+
children: [/*#__PURE__*/_jsx(BottomSheetHeader, {
|
|
659
|
+
title: "Select network"
|
|
660
|
+
}), /*#__PURE__*/_jsx(OptionList, {
|
|
661
|
+
items: CURRENCIES,
|
|
662
|
+
value: cryptoValue,
|
|
663
|
+
onValueChange: v => {
|
|
664
|
+
setCryptoValue(v);
|
|
665
|
+
cryptoRef.current?.dismiss();
|
|
666
|
+
},
|
|
667
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
668
|
+
renderItem: item => {
|
|
669
|
+
const ticker = item.meta.ticker;
|
|
670
|
+
return /*#__PURE__*/_jsxs(OptionListItem, {
|
|
671
|
+
value: item.value,
|
|
672
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
673
|
+
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
674
|
+
ledgerId: item.meta?.ledgerId ?? '',
|
|
675
|
+
ticker: ticker,
|
|
676
|
+
size: "32px"
|
|
677
|
+
})
|
|
678
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
679
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
680
|
+
children: item.label
|
|
681
|
+
}), /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
682
|
+
children: ticker
|
|
683
|
+
})]
|
|
684
|
+
})]
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
})
|
|
688
|
+
})]
|
|
689
|
+
})
|
|
690
|
+
}), appearances.map(appearance => /*#__PURE__*/_jsx(SimpleOptionListSheet, {
|
|
691
|
+
sheetRef: appearanceRefs[appearance],
|
|
692
|
+
items: SIMPLE_OPTIONS,
|
|
693
|
+
title: appearance,
|
|
694
|
+
value: appearanceValues[appearance] ?? null,
|
|
695
|
+
onValueChange: v => setAppearanceValues(prev => ({
|
|
696
|
+
...prev,
|
|
697
|
+
[appearance]: v
|
|
698
|
+
}))
|
|
699
|
+
}, appearance))]
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
export const WithDefaultValue = {
|
|
704
|
+
render: () => /*#__PURE__*/_jsx(Box, {
|
|
705
|
+
lx: {
|
|
706
|
+
width: 's320'
|
|
707
|
+
},
|
|
708
|
+
children: /*#__PURE__*/_jsx(OptionList, {
|
|
709
|
+
items: CURRENCIES,
|
|
710
|
+
defaultValue: "eth",
|
|
711
|
+
children: /*#__PURE__*/_jsx(OptionListContent, {
|
|
712
|
+
renderItem: item => {
|
|
713
|
+
const meta = item.meta;
|
|
714
|
+
return /*#__PURE__*/_jsxs(OptionListItem, {
|
|
715
|
+
value: item.value,
|
|
716
|
+
children: [/*#__PURE__*/_jsx(OptionListItemLeading, {
|
|
717
|
+
children: /*#__PURE__*/_jsx(CryptoIcon, {
|
|
718
|
+
ledgerId: meta.ledgerId,
|
|
719
|
+
ticker: meta.ticker,
|
|
720
|
+
size: "32px"
|
|
721
|
+
})
|
|
722
|
+
}), /*#__PURE__*/_jsxs(OptionListItemContent, {
|
|
723
|
+
children: [/*#__PURE__*/_jsx(OptionListItemText, {
|
|
724
|
+
children: item.label
|
|
725
|
+
}), /*#__PURE__*/_jsx(OptionListItemDescription, {
|
|
726
|
+
children: meta.ticker
|
|
727
|
+
})]
|
|
728
|
+
})]
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
})
|
|
732
|
+
})
|
|
733
|
+
})
|
|
734
|
+
};
|
|
735
|
+
//# sourceMappingURL=OptionList.stories.js.map
|