@ledgerhq/react-ui 0.53.0 → 0.53.1-nightly.20260902021544
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -6
- package/lib/assets/logos/LedgerLiveAltRegular.d.ts.map +1 -1
- package/lib/assets/logos/LedgerLiveRegular.d.ts.map +1 -1
- package/lib/cjs/components/animations/GlitchText/index.js +16 -42
- package/lib/cjs/components/animations/GlitchText/index.js.map +1 -1
- package/lib/cjs/components/form/Radio/RadioElement.js +2 -2
- package/lib/cjs/components/form/Radio/RadioElement.js.map +1 -1
- package/lib/cjs/components/form/Radio/RadioListElement.js +2 -2
- package/lib/cjs/components/form/Radio/RadioListElement.js.map +1 -1
- package/lib/cjs/components/form/Radio/index.js +2 -2
- package/lib/cjs/components/form/Radio/index.js.map +1 -1
- package/lib/cjs/components/form/index.js +2 -2
- package/lib/cjs/components/form/index.js.map +1 -1
- package/lib/cjs/components/index.js +2 -2
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/index.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js.map +1 -1
- package/lib/cjs/components/layout/Carousel/index.js.map +1 -1
- package/lib/cjs/components/layout/index.js.map +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/components/Table/index.d.ts +5 -11
- package/lib/components/Table/index.d.ts.map +1 -1
- package/lib/components/asorted/Divider/index.d.ts.map +1 -1
- package/lib/components/asorted/Icon/BoxedIcon.d.ts.map +1 -1
- package/lib/components/asorted/Icon/Icon.d.ts.map +1 -1
- package/lib/components/asorted/Text/index.d.ts.map +1 -1
- package/lib/components/cta/Button/index.d.ts.map +1 -1
- package/lib/components/cta/Link/index.d.ts.map +1 -1
- package/lib/components/cta/Toggle/index.d.ts.map +1 -1
- package/lib/components/form/BaseInput/index.d.ts +2 -2
- package/lib/components/form/BaseInput/index.d.ts.map +1 -1
- package/lib/components/form/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/form/LegendInput/index.d.ts +2 -2
- package/lib/components/form/LegendInput/index.d.ts.map +1 -1
- package/lib/components/form/NumberInput/index.d.ts +2 -2
- package/lib/components/form/NumberInput/index.d.ts.map +1 -1
- package/lib/components/form/QrCodeInput/index.d.ts +2 -2
- package/lib/components/form/QrCodeInput/index.d.ts.map +1 -1
- package/lib/components/form/QuantityInput/index.d.ts +2 -2
- package/lib/components/form/QuantityInput/index.d.ts.map +1 -1
- package/lib/components/form/Radio/RadioElement.d.ts +6 -5
- package/lib/components/form/Radio/RadioElement.d.ts.map +1 -1
- package/lib/components/form/Radio/RadioElement.js +1 -1
- package/lib/components/form/Radio/RadioElement.js.map +1 -1
- package/lib/components/form/Radio/RadioListElement.d.ts +5 -5
- package/lib/components/form/Radio/RadioListElement.d.ts.map +1 -1
- package/lib/components/form/Radio/RadioListElement.js +1 -1
- package/lib/components/form/Radio/RadioListElement.js.map +1 -1
- package/lib/components/form/Radio/index.d.ts +7 -16
- package/lib/components/form/Radio/index.d.ts.map +1 -1
- package/lib/components/form/SearchInput/index.d.ts +2 -2
- package/lib/components/form/SearchInput/index.d.ts.map +1 -1
- package/lib/components/form/SelectInput/index.d.ts.map +1 -1
- package/lib/components/form/Switch/Switch.d.ts.map +1 -1
- package/lib/components/layout/Box/index.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/index.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts +4 -4
- package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/types.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/index.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/variantDefault.d.ts.map +1 -1
- package/lib/components/layout/Carousel/index.d.ts.map +1 -1
- package/lib/components/layout/Drawer/index.d.ts.map +1 -1
- package/lib/components/layout/Flex/index.d.ts +1 -1
- package/lib/components/layout/Flex/index.d.ts.map +1 -1
- package/lib/components/layout/Grid/index.d.ts.map +1 -1
- package/lib/components/layout/List/VerticalTimeline/TimelineIndicator.d.ts +0 -3
- package/lib/components/layout/List/VerticalTimeline/TimelineIndicator.d.ts.map +1 -1
- package/lib/components/layout/List/VerticalTimeline/TimelineItem.d.ts.map +1 -1
- package/lib/components/layout/List/VerticalTimeline/index.d.ts.map +1 -1
- package/lib/components/layout/Popin/index.d.ts +26 -23
- package/lib/components/layout/Popin/index.d.ts.map +1 -1
- package/lib/components/layout/Side/Provider.d.ts.map +1 -1
- package/lib/components/layout/Side/index.d.ts.map +1 -1
- package/lib/components/message/Alert/index.d.ts +12 -10
- package/lib/components/message/Alert/index.d.ts.map +1 -1
- package/lib/components/message/ContinueOnDevice/index.d.ts.map +1 -1
- package/lib/components/message/Log/index.d.ts.map +1 -1
- package/lib/components/message/Notification/index.d.ts.map +1 -1
- package/lib/components/message/StatusNotification/index.d.ts.map +1 -1
- package/lib/components/message/Tooltip/styles.d.ts.map +1 -1
- package/lib/components/navigation/Aside/index.d.ts +1 -1
- package/lib/components/navigation/Breadcrumb/index.d.ts.map +1 -1
- package/lib/components/navigation/FlowStepper/index.d.ts +3 -6
- package/lib/components/navigation/FlowStepper/index.d.ts.map +1 -1
- package/lib/components/navigation/progress/ProgressBar/Onboarding.d.ts.map +1 -1
- package/lib/components/navigation/progress/Stepper/index.d.ts.map +1 -1
- package/lib/components/navigation/sideBar/Item/Item.d.ts.map +1 -1
- package/lib/components/navigation/sideBar/Logo/Logo.d.ts.map +1 -1
- package/lib/components/navigation/sideBar/SideBar/SideBar.d.ts +5 -4
- package/lib/components/navigation/sideBar/SideBar/SideBar.d.ts.map +1 -1
- package/lib/components/navigation/sideBar/Toggle/Toggle.d.ts.map +1 -1
- package/lib/components/navigation/sideBar/index.d.ts.map +1 -1
- package/lib/components/styled.d.ts.map +1 -1
- package/lib/components/transitions/TransitionInOut.d.ts.map +1 -1
- package/lib/components/transitions/TransitionScale.d.ts.map +1 -1
- package/lib/components/transitions/TransitionSlide.d.ts.map +1 -1
- package/lib/helpers.d.ts.map +1 -1
- package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts.map +1 -1
- package/lib/pre-ldls/components/AccountList/AccountList.d.ts.map +1 -1
- package/lib/pre-ldls/components/Address/Address.d.ts.map +1 -1
- package/lib/pre-ldls/components/Address/formatAddress.d.ts.map +1 -1
- package/lib/pre-ldls/components/Address/formatAddress.js.map +1 -1
- package/lib/pre-ldls/components/CardButton/CardButton.d.ts.map +1 -1
- package/lib/pre-ldls/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/pre-ldls/components/Tag/Tag.d.ts.map +1 -1
- package/lib/pre-ldls/components/Tag/Tag.js +1 -1
- package/lib/pre-ldls/components/Tag/Tag.js.map +1 -1
- package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/pre-ldls/libs/design-tokens.d.ts.map +1 -1
- package/lib/pre-ldls/libs/index.d.ts.map +1 -1
- package/lib/styles/InvertTheme.d.ts.map +1 -1
- package/lib/styles/StyleProvider.d.ts.map +1 -1
- package/lib/styles/helpers.d.ts.map +1 -1
- package/lib/styles/styled/fontFamily.d.ts +3 -3
- package/lib/styles/styled/fontFamily.d.ts.map +1 -1
- package/lib/styles/system/gaps.d.ts.map +1 -1
- package/lib/styles/theme.d.ts.map +1 -1
- package/package.json +14 -24
- package/lib/cjs/components/Table/Table.stories.js +0 -1985
- package/lib/cjs/components/Table/Table.stories.js.map +0 -1
- package/lib/cjs/components/Table/stories.helper.js +0 -1188
- package/lib/cjs/components/Table/stories.helper.js.map +0 -1
- package/lib/cjs/components/Tag/Tag.stories.js +0 -918
- package/lib/cjs/components/Tag/Tag.stories.js.map +0 -1
- package/lib/cjs/components/animations/GlitchText/GlitchText.stories.js +0 -905
- package/lib/cjs/components/animations/GlitchText/GlitchText.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Divider/Divider.stories.js +0 -794
- package/lib/cjs/components/asorted/Divider/Divider.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Icon/BoxedIcon.stories.js +0 -393
- package/lib/cjs/components/asorted/Icon/BoxedIcon.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Icon/Icons.stories.js +0 -789
- package/lib/cjs/components/asorted/Icon/Icons.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Icon/IconsLegacy.stories.js +0 -1472
- package/lib/cjs/components/asorted/Icon/IconsLegacy.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js +0 -348
- package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js.map +0 -1
- package/lib/cjs/components/asorted/Text/Text.stories.js +0 -836
- package/lib/cjs/components/asorted/Text/Text.stories.js.map +0 -1
- package/lib/cjs/components/cta/Button/Button.stories.js +0 -1286
- package/lib/cjs/components/cta/Button/Button.stories.js.map +0 -1
- package/lib/cjs/components/cta/Link/Link.stories.js +0 -911
- package/lib/cjs/components/cta/Link/Link.stories.js.map +0 -1
- package/lib/cjs/components/cta/Toggle/Toggle.stories.js +0 -873
- package/lib/cjs/components/cta/Toggle/Toggle.stories.js.map +0 -1
- package/lib/cjs/components/form/BaseInput/Input.stories.js +0 -1310
- package/lib/cjs/components/form/BaseInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/Checkbox/Checkbox.stories.js +0 -909
- package/lib/cjs/components/form/Checkbox/Checkbox.stories.js.map +0 -1
- package/lib/cjs/components/form/Dropdown/Dropdown.stories.js +0 -1758
- package/lib/cjs/components/form/Dropdown/Dropdown.stories.js.map +0 -1
- package/lib/cjs/components/form/LegendInput/Input.stories.js +0 -1283
- package/lib/cjs/components/form/LegendInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/NumberInput/Input.stories.js +0 -1341
- package/lib/cjs/components/form/NumberInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/QrCodeInput/Input.stories.js +0 -1305
- package/lib/cjs/components/form/QrCodeInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/QuantityInput/Input.stories.js +0 -1332
- package/lib/cjs/components/form/QuantityInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/Radio/Radio.stories.js +0 -1196
- package/lib/cjs/components/form/Radio/Radio.stories.js.map +0 -1
- package/lib/cjs/components/form/Radio/RadioElement.stories.js +0 -1084
- package/lib/cjs/components/form/Radio/RadioElement.stories.js.map +0 -1
- package/lib/cjs/components/form/Radio/RadioListElement.stories.js +0 -1052
- package/lib/cjs/components/form/Radio/RadioListElement.stories.js.map +0 -1
- package/lib/cjs/components/form/SearchInput/Input.stories.js +0 -1278
- package/lib/cjs/components/form/SearchInput/Input.stories.js.map +0 -1
- package/lib/cjs/components/form/SelectInput/Select.stories.js +0 -2175
- package/lib/cjs/components/form/SelectInput/Select.stories.js.map +0 -1
- package/lib/cjs/components/form/SplitInput/SplitInput.stories.js +0 -2020
- package/lib/cjs/components/form/SplitInput/SplitInput.stories.js.map +0 -1
- package/lib/cjs/components/form/Switch/Switch.stories.js +0 -940
- package/lib/cjs/components/form/Switch/Switch.stories.js.map +0 -1
- package/lib/cjs/components/form/TabSelector/TabSelector.stories.js +0 -837
- package/lib/cjs/components/form/TabSelector/TabSelector.stories.js.map +0 -1
- package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js +0 -1625
- package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js.map +0 -1
- package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js +0 -1110
- package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js.map +0 -1
- package/lib/cjs/components/layout/Box/Box.stories.js +0 -221
- package/lib/cjs/components/layout/Box/Box.stories.js.map +0 -1
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js +0 -2064
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js.map +0 -1
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js +0 -1514
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js.map +0 -1
- package/lib/cjs/components/layout/Drawer/Drawer.stories.js +0 -1482
- package/lib/cjs/components/layout/Drawer/Drawer.stories.js.map +0 -1
- package/lib/cjs/components/layout/Flex/Flex.stories.js +0 -491
- package/lib/cjs/components/layout/Flex/Flex.stories.js.map +0 -1
- package/lib/cjs/components/layout/Grid/Grid.stories.js +0 -959
- package/lib/cjs/components/layout/Grid/Grid.stories.js.map +0 -1
- package/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js +0 -928
- package/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js.map +0 -1
- package/lib/cjs/components/layout/List/VerticalTimeline/VerticalTimeline.stories.js +0 -1884
- package/lib/cjs/components/layout/List/VerticalTimeline/VerticalTimeline.stories.js.map +0 -1
- package/lib/cjs/components/layout/Popin/Popin.stories.js +0 -1478
- package/lib/cjs/components/layout/Popin/Popin.stories.js.map +0 -1
- package/lib/cjs/components/layout/Side/Side.stories.js +0 -1623
- package/lib/cjs/components/layout/Side/Side.stories.js.map +0 -1
- package/lib/cjs/components/loaders/InfiniteLoader/InfiniteLoader.stories.js +0 -262
- package/lib/cjs/components/loaders/InfiniteLoader/InfiniteLoader.stories.js.map +0 -1
- package/lib/cjs/components/loaders/ProgressLoader/ProgressLoader.stories.js +0 -862
- package/lib/cjs/components/loaders/ProgressLoader/ProgressLoader.stories.js.map +0 -1
- package/lib/cjs/components/message/Alert/Alert.stories.js +0 -1345
- package/lib/cjs/components/message/Alert/Alert.stories.js.map +0 -1
- package/lib/cjs/components/message/ContinueOnDevice/ContinueOnDevice.stories.js +0 -854
- package/lib/cjs/components/message/ContinueOnDevice/ContinueOnDevice.stories.js.map +0 -1
- package/lib/cjs/components/message/Log/Log.stories.js +0 -839
- package/lib/cjs/components/message/Log/Log.stories.js.map +0 -1
- package/lib/cjs/components/message/Notification/Badge.stories.js +0 -319
- package/lib/cjs/components/message/Notification/Badge.stories.js.map +0 -1
- package/lib/cjs/components/message/Notification/Notification.stories.js +0 -1085
- package/lib/cjs/components/message/Notification/Notification.stories.js.map +0 -1
- package/lib/cjs/components/message/StatusNotification/StatusNotification.stories.js +0 -977
- package/lib/cjs/components/message/StatusNotification/StatusNotification.stories.js.map +0 -1
- package/lib/cjs/components/message/Tip/Tip.stories.js +0 -812
- package/lib/cjs/components/message/Tip/Tip.stories.js.map +0 -1
- package/lib/cjs/components/message/Tooltip/Tooltip.stories.js +0 -853
- package/lib/cjs/components/message/Tooltip/Tooltip.stories.js.map +0 -1
- package/lib/cjs/components/navigation/Aside/Aside.stories.js +0 -961
- package/lib/cjs/components/navigation/Aside/Aside.stories.js.map +0 -1
- package/lib/cjs/components/navigation/Aside/stories.helper.js +0 -48
- package/lib/cjs/components/navigation/Aside/stories.helper.js.map +0 -1
- package/lib/cjs/components/navigation/Breadcrumb/Breadcrumb.stories.js +0 -1953
- package/lib/cjs/components/navigation/Breadcrumb/Breadcrumb.stories.js.map +0 -1
- package/lib/cjs/components/navigation/FlowStepper/FlowStepper.stories.js +0 -2054
- package/lib/cjs/components/navigation/FlowStepper/FlowStepper.stories.js.map +0 -1
- package/lib/cjs/components/navigation/Header/Header.stories.js +0 -815
- package/lib/cjs/components/navigation/Header/Header.stories.js.map +0 -1
- package/lib/cjs/components/navigation/progress/ProgressBar/Onboarding.stories.js +0 -822
- package/lib/cjs/components/navigation/progress/ProgressBar/Onboarding.stories.js.map +0 -1
- package/lib/cjs/components/navigation/progress/Stepper/Item.stories.js +0 -907
- package/lib/cjs/components/navigation/progress/Stepper/Item.stories.js.map +0 -1
- package/lib/cjs/components/navigation/progress/Stepper/ProgressSteps.stories.js +0 -927
- package/lib/cjs/components/navigation/progress/Stepper/ProgressSteps.stories.js.map +0 -1
- package/lib/cjs/components/navigation/sideBar/Item/Item.stories.js +0 -1030
- package/lib/cjs/components/navigation/sideBar/Item/Item.stories.js.map +0 -1
- package/lib/cjs/components/navigation/sideBar/SideBar/SideBar.stories.js +0 -1318
- package/lib/cjs/components/navigation/sideBar/SideBar/SideBar.stories.js.map +0 -1
- package/lib/cjs/components/styled.stories.js +0 -200
- package/lib/cjs/components/styled.stories.js.map +0 -1
- package/lib/cjs/components/tabs/Bar/Bar.stories.js +0 -808
- package/lib/cjs/components/tabs/Bar/Bar.stories.js.map +0 -1
- package/lib/cjs/components/tabs/Chip/Chip.stories.js +0 -818
- package/lib/cjs/components/tabs/Chip/Chip.stories.js.map +0 -1
- package/lib/cjs/components/tabs/Pill/Pill.stories.js +0 -873
- package/lib/cjs/components/tabs/Pill/Pill.stories.js.map +0 -1
- package/lib/cjs/components/tabs/Tabs/Tabs.stories.js +0 -1061
- package/lib/cjs/components/tabs/Tabs/Tabs.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js +0 -2372
- package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js +0 -2513
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/Address/Address.stories.js +0 -1873
- package/lib/cjs/pre-ldls/components/Address/Address.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js +0 -1282
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/Checkbox/Checkbox.stories.js +0 -1263
- package/lib/cjs/pre-ldls/components/Checkbox/Checkbox.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js +0 -1834
- package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/TextInput/TextInput.stories.js +0 -1498
- package/lib/cjs/pre-ldls/components/TextInput/TextInput.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js +0 -606
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js.map +0 -1
- package/lib/cjs/pre-ldls/components/sharedStoryBook.js +0 -1819
- package/lib/cjs/pre-ldls/components/sharedStoryBook.js.map +0 -1
- package/lib/cjs/styles/Spacing.stories.js +0 -759
- package/lib/cjs/styles/Spacing.stories.js.map +0 -1
- package/lib/cjs/styles/breakpoints.stories.js +0 -823
- package/lib/cjs/styles/breakpoints.stories.js.map +0 -1
- package/lib/cjs/styles/palettes/colors.stories.js +0 -785
- package/lib/cjs/styles/palettes/colors.stories.js.map +0 -1
- package/lib/components/Table/stories.helper.d.ts +0 -30
- package/lib/components/Table/stories.helper.d.ts.map +0 -1
- package/lib/components/Table/stories.helper.js +0 -185
- package/lib/components/Table/stories.helper.js.map +0 -1
- package/lib/components/navigation/Aside/stories.helper.d.ts +0 -3
- package/lib/components/navigation/Aside/stories.helper.d.ts.map +0 -1
- package/lib/components/navigation/Aside/stories.helper.js +0 -3
- package/lib/components/navigation/Aside/stories.helper.js.map +0 -1
- package/lib/pre-ldls/components/sharedStoryBook.d.ts +0 -5
- package/lib/pre-ldls/components/sharedStoryBook.d.ts.map +0 -1
- package/lib/pre-ldls/components/sharedStoryBook.js +0 -15
- package/lib/pre-ldls/components/sharedStoryBook.js.map +0 -1
|
@@ -1,1985 +0,0 @@
|
|
|
1
|
-
(() => {
|
|
2
|
-
"use strict";
|
|
3
|
-
var __webpack_modules__ = ({
|
|
4
|
-
3957(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
5
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
7
|
-
icon: () => (iconColumn),
|
|
8
|
-
text: () => (textColumn)
|
|
9
|
-
});
|
|
10
|
-
/* import */ var react__rspack_import_0 = __webpack_require__(2015);
|
|
11
|
-
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
|
|
12
|
-
/* import */ var _asorted_Icon__rspack_import_2 = __webpack_require__(1215);
|
|
13
|
-
/* import */ var _layout_Flex__rspack_import_3 = __webpack_require__(3696);
|
|
14
|
-
/* import */ var _asorted_Text__rspack_import_1 = __webpack_require__(348);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* A column which contains a single icon and that has a fixed width.
|
|
21
|
-
*/ function iconColumn({ props, header, layout }) {
|
|
22
|
-
return {
|
|
23
|
-
layout: layout || "min-content",
|
|
24
|
-
render: ({ elt })=>{
|
|
25
|
-
const { name, weight, ...textProps } = props(elt);
|
|
26
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_1["default"], {
|
|
27
|
-
...textProps,
|
|
28
|
-
style: {
|
|
29
|
-
display: "flex",
|
|
30
|
-
alignItems: "center"
|
|
31
|
-
}
|
|
32
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Icon__rspack_import_2["default"], {
|
|
33
|
-
name: name,
|
|
34
|
-
weight: weight
|
|
35
|
-
}));
|
|
36
|
-
},
|
|
37
|
-
header
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* A column that contains a title and a subtitle.
|
|
43
|
-
*/ function textColumn({ title, subtitle, header, layout, titleProps, subtitleProps }) {
|
|
44
|
-
return {
|
|
45
|
-
layout: layout || "auto",
|
|
46
|
-
render: ({ elt })=>/*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_3["default"], {
|
|
47
|
-
flexDirection: "column",
|
|
48
|
-
justifyContent: "center"
|
|
49
|
-
}, title && /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_1["default"], {
|
|
50
|
-
fontWeight: "medium",
|
|
51
|
-
variant: "body",
|
|
52
|
-
textOverflow: "ellipsis",
|
|
53
|
-
overflow: "hidden",
|
|
54
|
-
color: "neutral.c100",
|
|
55
|
-
...titleProps && titleProps(elt) || {}
|
|
56
|
-
}, title(elt)), subtitle && /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_1["default"], {
|
|
57
|
-
fontWeight: "medium",
|
|
58
|
-
variant: "paragraph",
|
|
59
|
-
textOverflow: "ellipsis",
|
|
60
|
-
overflow: "hidden",
|
|
61
|
-
color: "neutral.c80",
|
|
62
|
-
...subtitleProps && subtitleProps(elt) || {}
|
|
63
|
-
}, subtitle(elt))),
|
|
64
|
-
header
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
2352(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
72
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
73
|
-
Rows: () => (Rows),
|
|
74
|
-
"default": () => (__rspack_default_export)
|
|
75
|
-
});
|
|
76
|
-
/* import */ var react__rspack_import_0 = __webpack_require__(2015);
|
|
77
|
-
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
|
|
78
|
-
/* import */ var styled_components__rspack_import_1 = __webpack_require__(2770);
|
|
79
|
-
/* import */ var styled_components__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_1);
|
|
80
|
-
/* import */ var styled_system__rspack_import_2 = __webpack_require__(9351);
|
|
81
|
-
/* import */ var styled_system__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_2);
|
|
82
|
-
/* import */ var _layout_Grid__rspack_import_3 = __webpack_require__(2843);
|
|
83
|
-
/* import */ var _layout_Flex__rspack_import_4 = __webpack_require__(3696);
|
|
84
|
-
/* import */ var _Columns__rspack_import_5 = __webpack_require__(3957);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const Container = styled_components__rspack_import_1_default()((0,_layout_Grid__rspack_import_3["default"]))`
|
|
92
|
-
${styled_system__rspack_import_2.border}
|
|
93
|
-
`;
|
|
94
|
-
const ExtraRowContainer = styled_components__rspack_import_1_default().div.attrs({
|
|
95
|
-
gridColumn: "1 / -1"
|
|
96
|
-
})`
|
|
97
|
-
${styled_system__rspack_import_2.gridColumn}
|
|
98
|
-
`;
|
|
99
|
-
const RowContainer = styled_components__rspack_import_1_default()((0,_layout_Flex__rspack_import_4["default"]))`
|
|
100
|
-
display: contents;
|
|
101
|
-
`;
|
|
102
|
-
function RowsComponent({ data, columns, render, extraRender, renderRow }) {
|
|
103
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), {
|
|
104
|
-
key: "row-component"
|
|
105
|
-
}, data.map((elt, rowIndex)=>{
|
|
106
|
-
const row = /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), null, columns.map((column, columnIndex)=>/*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), {
|
|
107
|
-
key: `row-component-column-${rowIndex}${columnIndex}`
|
|
108
|
-
}, render ? render({
|
|
109
|
-
column,
|
|
110
|
-
rowIndex,
|
|
111
|
-
columnIndex,
|
|
112
|
-
children: column.render({
|
|
113
|
-
elt,
|
|
114
|
-
rowIndex,
|
|
115
|
-
columnIndex
|
|
116
|
-
})
|
|
117
|
-
}) : column.render({
|
|
118
|
-
elt,
|
|
119
|
-
rowIndex,
|
|
120
|
-
columnIndex
|
|
121
|
-
}))), extraRender && extraRender(elt, rowIndex) || null);
|
|
122
|
-
if (renderRow) {
|
|
123
|
-
return renderRow(rowIndex, row);
|
|
124
|
-
} else {
|
|
125
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), {
|
|
126
|
-
key: `row-component-row-${rowIndex}`
|
|
127
|
-
}, row);
|
|
128
|
-
}
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
const Rows = /*#__PURE__*/ (0,react__rspack_import_0.memo)(RowsComponent);
|
|
132
|
-
function Table({ data, columns, withHeaders, extraRender, renderRow, ...containerProps }) {
|
|
133
|
-
const gridTemplateColumns = (0,react__rspack_import_0.useMemo)(()=>columns.reduce((acc, col)=>`${acc} ${col.layout || "auto"}`, ""), [
|
|
134
|
-
columns
|
|
135
|
-
]);
|
|
136
|
-
const headers = (0,react__rspack_import_0.useMemo)(()=>withHeaders ? columns.reduce((acc, col, index)=>[
|
|
137
|
-
...acc,
|
|
138
|
-
/*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), {
|
|
139
|
-
key: `header-col-${index}`
|
|
140
|
-
}, col.header ? col.header() : /*#__PURE__*/ react__rspack_import_0_default().createElement("div", null))
|
|
141
|
-
], []) : null, [
|
|
142
|
-
withHeaders,
|
|
143
|
-
columns
|
|
144
|
-
]);
|
|
145
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement(Container, {
|
|
146
|
-
gridTemplateColumns: gridTemplateColumns,
|
|
147
|
-
gridAutoRows: "auto",
|
|
148
|
-
columns: "none",
|
|
149
|
-
alignItems: "center",
|
|
150
|
-
...containerProps
|
|
151
|
-
}, headers, /*#__PURE__*/ react__rspack_import_0_default().createElement(Rows, {
|
|
152
|
-
data: data,
|
|
153
|
-
columns: columns,
|
|
154
|
-
extraRender: extraRender,
|
|
155
|
-
renderRow: renderRow
|
|
156
|
-
}));
|
|
157
|
-
}
|
|
158
|
-
Table.Columns = _Columns__rspack_import_5;
|
|
159
|
-
Table.ExtraRowContainer = ExtraRowContainer;
|
|
160
|
-
Table.RowContainer = RowContainer;
|
|
161
|
-
const memoTable = /*#__PURE__*/ (0,react__rspack_import_0.memo)(Table);
|
|
162
|
-
memoTable.Columns = _Columns__rspack_import_5;
|
|
163
|
-
memoTable.RowContainer = RowContainer;
|
|
164
|
-
memoTable.ExtraRowContainer = ExtraRowContainer;
|
|
165
|
-
/* export default */ const __rspack_default_export = (memoTable);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
3105(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
170
|
-
/* import */ var react__rspack_import_0 = __webpack_require__(2015);
|
|
171
|
-
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
|
|
172
|
-
/* import */ var styled_components__rspack_import_1 = __webpack_require__(2770);
|
|
173
|
-
/* import */ var styled_components__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_1);
|
|
174
|
-
/* import */ var _asorted_Text__rspack_import_3 = __webpack_require__(348);
|
|
175
|
-
/* import */ var _index__rspack_import_2 = __webpack_require__(2352);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const { Columns } = _index__rspack_import_2["default"];
|
|
181
|
-
function Header({ children }) {
|
|
182
|
-
const theme = (0,styled_components__rspack_import_1.useTheme)();
|
|
183
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_3["default"], {
|
|
184
|
-
fontWeight: "semiBold",
|
|
185
|
-
variant: "paragraph",
|
|
186
|
-
style: {
|
|
187
|
-
borderBottom: `1px solid ${theme.colors.neutral.c40}`
|
|
188
|
-
},
|
|
189
|
-
mx: -4,
|
|
190
|
-
px: 4,
|
|
191
|
-
pb: 8
|
|
192
|
-
}, children);
|
|
193
|
-
}
|
|
194
|
-
const balance = {
|
|
195
|
-
data: [
|
|
196
|
-
{
|
|
197
|
-
currency: "Ethereum Classic",
|
|
198
|
-
amount: 128.26484,
|
|
199
|
-
counterValue: 53.29,
|
|
200
|
-
address: "0x32Be343B94f860124dC4fEe278FDCBD38C102D88",
|
|
201
|
-
evolution: 0.1,
|
|
202
|
-
starred: false
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
currency: "Ethereum",
|
|
206
|
-
amount: 1.23,
|
|
207
|
-
counterValue: 3029.29,
|
|
208
|
-
address: "0xa910f92acdaf488fa6ef02174fb86208ad7722ba",
|
|
209
|
-
evolution: 3.0,
|
|
210
|
-
starred: true
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
currency: "Bitcoin",
|
|
214
|
-
amount: 0.003,
|
|
215
|
-
counterValue: 1920.23,
|
|
216
|
-
address: "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX",
|
|
217
|
-
evolution: -2.1,
|
|
218
|
-
starred: true
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
currency: "Dai",
|
|
222
|
-
amount: 128,
|
|
223
|
-
counterValue: 128,
|
|
224
|
-
address: "0x380389E04f7671AB849baF10bd89C75C3bf99cbB",
|
|
225
|
-
evolution: 0.2,
|
|
226
|
-
starred: false
|
|
227
|
-
}
|
|
228
|
-
],
|
|
229
|
-
columns: [
|
|
230
|
-
Columns.text({
|
|
231
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(Header, null, "Currency"),
|
|
232
|
-
title: (elt)=>elt.currency
|
|
233
|
-
}),
|
|
234
|
-
Columns.text({
|
|
235
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(Header, null, "Amount"),
|
|
236
|
-
title: (elt)=>elt.amount,
|
|
237
|
-
subtitle: (elt)=>elt.counterValue
|
|
238
|
-
}),
|
|
239
|
-
Columns.text({
|
|
240
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(Header, null, "Address"),
|
|
241
|
-
subtitle: (elt)=>elt.address
|
|
242
|
-
}),
|
|
243
|
-
Columns.text({
|
|
244
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(Header, null, "Evolution"),
|
|
245
|
-
subtitle: (elt)=>(elt.evolution > 0 ? "+" : "") + elt.evolution,
|
|
246
|
-
subtitleProps: (elt)=>({
|
|
247
|
-
color: elt.evolution < 0 ? "error.c50" : "success.c50"
|
|
248
|
-
})
|
|
249
|
-
}),
|
|
250
|
-
Columns.icon({
|
|
251
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(Header, null, " "),
|
|
252
|
-
props: (elt)=>({
|
|
253
|
-
name: "StarSolid",
|
|
254
|
-
color: elt.starred ? "neutral.c100" : "neutral.c70"
|
|
255
|
-
})
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
};
|
|
259
|
-
const accounts = {
|
|
260
|
-
data: [
|
|
261
|
-
{
|
|
262
|
-
name: "Bitcoin 1",
|
|
263
|
-
currency: {
|
|
264
|
-
name: "Bitcoin",
|
|
265
|
-
abbrev: "BTC"
|
|
266
|
-
},
|
|
267
|
-
synchronized: false,
|
|
268
|
-
amount: 0.304,
|
|
269
|
-
evolution: 1.3,
|
|
270
|
-
starred: false
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
name: "Bitcoin 2",
|
|
274
|
-
currency: {
|
|
275
|
-
name: "Bitcoin",
|
|
276
|
-
abbrev: "BTC"
|
|
277
|
-
},
|
|
278
|
-
synchronized: true,
|
|
279
|
-
amount: 0.409,
|
|
280
|
-
evolution: 1.1,
|
|
281
|
-
starred: false
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
name: "Bitcoin 3",
|
|
285
|
-
currency: {
|
|
286
|
-
name: "Bitcoin",
|
|
287
|
-
abbrev: "BTC"
|
|
288
|
-
},
|
|
289
|
-
synchronized: true,
|
|
290
|
-
amount: 2.304,
|
|
291
|
-
evolution: -1.3,
|
|
292
|
-
starred: true
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
name: "Ethereum 1",
|
|
296
|
-
currency: {
|
|
297
|
-
name: "Ethereum",
|
|
298
|
-
abbrev: "ETH"
|
|
299
|
-
},
|
|
300
|
-
synchronized: true,
|
|
301
|
-
amount: 1.23,
|
|
302
|
-
evolution: 4,
|
|
303
|
-
starred: true,
|
|
304
|
-
subAccounts: [
|
|
305
|
-
{
|
|
306
|
-
name: "Tether",
|
|
307
|
-
currency: {
|
|
308
|
-
name: "Tether",
|
|
309
|
-
abbrev: "USDT"
|
|
310
|
-
},
|
|
311
|
-
synchronized: false,
|
|
312
|
-
amount: 0.304,
|
|
313
|
-
evolution: 1.3,
|
|
314
|
-
starred: false
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
name: "Tether 2",
|
|
318
|
-
currency: {
|
|
319
|
-
name: "Tether",
|
|
320
|
-
abbrev: "USDT"
|
|
321
|
-
},
|
|
322
|
-
synchronized: false,
|
|
323
|
-
amount: 0.904,
|
|
324
|
-
evolution: 8.3,
|
|
325
|
-
starred: true
|
|
326
|
-
}
|
|
327
|
-
]
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: "Ethereum 2",
|
|
331
|
-
currency: {
|
|
332
|
-
name: "Ethereum",
|
|
333
|
-
abbrev: "ETH"
|
|
334
|
-
},
|
|
335
|
-
synchronized: false,
|
|
336
|
-
amount: 0.23,
|
|
337
|
-
evolution: -3,
|
|
338
|
-
starred: false
|
|
339
|
-
}
|
|
340
|
-
],
|
|
341
|
-
columns: [
|
|
342
|
-
{
|
|
343
|
-
layout: "64px",
|
|
344
|
-
render: ({ elt })=>elt.currency.abbrev === "BTC" ? svgBtc : elt.currency.abbrev === "ETH" ? svgEth : svgUsdt
|
|
345
|
-
},
|
|
346
|
-
Columns.text({
|
|
347
|
-
layout: "2fr",
|
|
348
|
-
title: (elt)=>elt.name,
|
|
349
|
-
subtitle: (elt)=>elt.currency.name
|
|
350
|
-
}),
|
|
351
|
-
Columns.icon({
|
|
352
|
-
props: (elt)=>({
|
|
353
|
-
name: elt.synchronized ? "CircledCheck" : "Clock",
|
|
354
|
-
color: elt.synchronized ? "success.c50" : "neutral.c80"
|
|
355
|
-
})
|
|
356
|
-
}),
|
|
357
|
-
Columns.text({
|
|
358
|
-
layout: "1fr",
|
|
359
|
-
subtitle: (elt)=>elt.currency.abbrev
|
|
360
|
-
}),
|
|
361
|
-
Columns.text({
|
|
362
|
-
layout: "1fr",
|
|
363
|
-
title: (elt)=>elt.amount
|
|
364
|
-
}),
|
|
365
|
-
Columns.text({
|
|
366
|
-
layout: "1fr",
|
|
367
|
-
subtitle: (elt)=>(elt.evolution > 0 ? "+" : "") + elt.evolution,
|
|
368
|
-
subtitleProps: (elt)=>({
|
|
369
|
-
color: elt.evolution < 0 ? "error.c50" : "success.c50"
|
|
370
|
-
})
|
|
371
|
-
}),
|
|
372
|
-
Columns.icon({
|
|
373
|
-
props: (elt)=>({
|
|
374
|
-
name: "StarSolid",
|
|
375
|
-
color: elt.starred ? "neutral.c100" : "neutral.c70"
|
|
376
|
-
})
|
|
377
|
-
})
|
|
378
|
-
]
|
|
379
|
-
};
|
|
380
|
-
const svgBtc = /*#__PURE__*/ react__rspack_import_0_default().createElement("svg", {
|
|
381
|
-
width: "32",
|
|
382
|
-
height: "32",
|
|
383
|
-
viewBox: "0 0 32 32",
|
|
384
|
-
fill: "none",
|
|
385
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
386
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
387
|
-
d: "M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",
|
|
388
|
-
fill: "#F7931A"
|
|
389
|
-
}), /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
390
|
-
d: "M21.8917 14.3672C22.154 12.616 20.8198 11.6745 18.9968 11.0462L19.5883 8.67348L18.1446 8.31423L17.5682 10.6243C17.1889 10.529 16.7995 10.4405 16.4111 10.3519L16.9917 8.02683L15.548 7.66675L14.9565 10.0386C14.6424 9.96678 14.3333 9.8966 14.0342 9.82141L14.0358 9.81389L12.0441 9.31679L11.6598 10.8591C11.6598 10.8591 12.7317 11.1047 12.7091 11.1197C13.2939 11.2659 13.3992 11.6527 13.3817 11.9602L12.7083 14.6629C12.7484 14.6729 12.8002 14.688 12.8587 14.7105L12.7058 14.6729L11.7617 18.4593C11.6899 18.6364 11.5086 18.9029 11.0992 18.8018C11.1142 18.8227 10.0498 18.5403 10.0498 18.5403L9.33301 20.1929L11.2128 20.6616C11.562 20.7493 11.9046 20.8412 12.2413 20.9272L11.6439 23.3267L13.0867 23.6859L13.6783 21.3132C14.0726 21.4193 14.4552 21.5179 14.8295 21.6115L14.2397 23.9742L15.6834 24.3334L16.2807 21.939C18.7437 22.4052 20.5951 22.2172 21.3745 19.9898C22.0028 18.1969 21.3436 17.1618 20.0478 16.4876C20.9919 16.2704 21.7021 15.6496 21.8917 14.3672ZM18.5916 18.994C18.1463 20.7877 15.1261 19.8177 14.147 19.5746L14.9406 16.3957C15.9198 16.6405 19.0586 17.1242 18.5916 18.994ZM19.0386 14.3413C18.6317 15.9729 16.1186 15.1433 15.3041 14.9403L16.0226 12.0579C16.8371 12.261 19.463 12.6394 19.0386 14.3413Z",
|
|
391
|
-
fill: "white"
|
|
392
|
-
}));
|
|
393
|
-
const svgEth = /*#__PURE__*/ react__rspack_import_0_default().createElement("svg", {
|
|
394
|
-
width: "32",
|
|
395
|
-
height: "32",
|
|
396
|
-
viewBox: "0 0 32 32",
|
|
397
|
-
fill: "none",
|
|
398
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
399
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
400
|
-
d: "M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",
|
|
401
|
-
fill: "#0EBDCD"
|
|
402
|
-
}), /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
403
|
-
d: "M21.2066 15.5834L15.9992 7.66669L10.7916 15.5834L15.9992 18.6067L21.2066 15.5834Z",
|
|
404
|
-
fill: "white"
|
|
405
|
-
}), /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
406
|
-
d: "M15.9992 24.3333L21.21 17.1241L15.9992 20.147L10.7916 17.1241L15.9992 24.3333Z",
|
|
407
|
-
fill: "white"
|
|
408
|
-
}));
|
|
409
|
-
const svgUsdt = /*#__PURE__*/ react__rspack_import_0_default().createElement("svg", {
|
|
410
|
-
width: "32",
|
|
411
|
-
height: "32",
|
|
412
|
-
viewBox: "0 0 32 32",
|
|
413
|
-
fill: "none",
|
|
414
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
415
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
416
|
-
d: "M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",
|
|
417
|
-
fill: "#00A478"
|
|
418
|
-
}), /*#__PURE__*/ react__rspack_import_0_default().createElement("path", {
|
|
419
|
-
fillRule: "evenodd",
|
|
420
|
-
clipRule: "evenodd",
|
|
421
|
-
d: "M17.7205 16.6265V16.6246C17.6175 16.6321 17.0863 16.6639 15.9013 16.6639C14.9551 16.6639 14.289 16.6358 14.0548 16.6246V16.6274C10.4125 16.4672 7.69393 15.833 7.69393 15.0742C7.69393 14.3163 10.4125 13.6821 14.0548 13.5191V15.996C14.2928 16.0128 14.9748 16.0531 15.9172 16.0531C17.0479 16.0531 17.6147 16.0063 17.7205 15.9969V13.521C21.3553 13.683 24.0674 14.3172 24.0674 15.0742C24.0674 15.833 21.3553 16.4653 17.7205 16.6265ZM17.7205 13.2633V11.0469H22.7924V7.66687H8.98297V11.0469H14.0548V13.2624C9.93289 13.4516 6.83301 14.2685 6.83301 15.2465C6.83301 16.2246 9.93289 17.0405 14.0548 17.2307V24.3335H17.7205V17.2288C21.8359 17.0396 24.9283 16.2236 24.9283 15.2465C24.9283 14.2695 21.8359 13.4535 17.7205 13.2633Z",
|
|
422
|
-
fill: "white"
|
|
423
|
-
}));
|
|
424
|
-
|
|
425
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
426
|
-
}, {
|
|
427
|
-
accounts: accounts,
|
|
428
|
-
balance: balance
|
|
429
|
-
});
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
1215(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
434
|
-
/* import */ var _ledgerhq_icons_ui_reactLegacy__rspack_import_0 = __webpack_require__(9979);
|
|
435
|
-
/* import */ var _ledgerhq_icons_ui_reactLegacy__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(_ledgerhq_icons_ui_reactLegacy__rspack_import_0);
|
|
436
|
-
/* import */ var react__rspack_import_1 = __webpack_require__(2015);
|
|
437
|
-
/* import */ var react__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_1);
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
const iconNames = Array.from(Object.keys(_ledgerhq_icons_ui_reactLegacy__rspack_import_0).reduce((set, rawKey)=>{
|
|
441
|
-
const key = rawKey.replace(/(.+)(Medium)+$/g, "$1");
|
|
442
|
-
if (!set.has(key)) set.add(key);
|
|
443
|
-
return set;
|
|
444
|
-
}, new Set()));
|
|
445
|
-
const Icon = ({ name, size = 16, color = "currentColor", weight = "Medium" })=>{
|
|
446
|
-
const maybeIconName = `${name}${weight}`;
|
|
447
|
-
if (maybeIconName in _ledgerhq_icons_ui_reactLegacy__rspack_import_0) {
|
|
448
|
-
// @ts-expect-error FIXME I don't know how to make you happy ts
|
|
449
|
-
const Component = _ledgerhq_icons_ui_reactLegacy__rspack_import_0[maybeIconName];
|
|
450
|
-
return /*#__PURE__*/ react__rspack_import_1_default().createElement(Component, {
|
|
451
|
-
size: size,
|
|
452
|
-
color: color
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
return null;
|
|
456
|
-
};
|
|
457
|
-
/* export default */ const __rspack_default_export = (Icon);
|
|
458
|
-
|
|
459
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
460
|
-
}, {
|
|
461
|
-
"default": __rspack_default_export
|
|
462
|
-
});
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
},
|
|
466
|
-
348(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
467
|
-
/* import */ var react__rspack_import_0 = __webpack_require__(2015);
|
|
468
|
-
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
|
|
469
|
-
/* import */ var _styled__rspack_import_2 = __webpack_require__(7680);
|
|
470
|
-
/* import */ var styled_system__rspack_import_1 = __webpack_require__(9351);
|
|
471
|
-
/* import */ var styled_system__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_1);
|
|
472
|
-
/* import */ var _styles_styled_fontFamily__rspack_import_4 = __webpack_require__(3364);
|
|
473
|
-
/* import */ var _styles__rspack_import_3 = __webpack_require__(4368);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
const uppercase = (0,styled_system__rspack_import_1.system)({
|
|
480
|
-
uppercase: {
|
|
481
|
-
property: "textTransform",
|
|
482
|
-
transform: (value)=>value ? "uppercase" : "none"
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
|
-
const Text = _styled__rspack_import_2["default"].span.attrs(({ variant = "body", fontSize, color })=>({
|
|
486
|
-
fontSize: fontSize ? fontSize : variant,
|
|
487
|
-
color: color || "neutral.c100"
|
|
488
|
-
}))`
|
|
489
|
-
font-weight: 500;
|
|
490
|
-
white-space: ${(props)=>props.whiteSpace ?? "normal"};
|
|
491
|
-
${(p)=>_styles__rspack_import_3.textVariantStyle[p.variant || "body"]}
|
|
492
|
-
${(0,styled_system__rspack_import_1.compose)(uppercase, styled_system__rspack_import_1.lineHeight, _styles_styled_fontFamily__rspack_import_4["default"], styled_system__rspack_import_1.fontSize, styled_system__rspack_import_1.textAlign, styled_system__rspack_import_1.fontWeight, styled_system__rspack_import_1.letterSpacing, (0,styled_system__rspack_import_1.system)({
|
|
493
|
-
textOverflow: true
|
|
494
|
-
}))}
|
|
495
|
-
${(p)=>p.textTransform ? `text-transform: ${p.textTransform};` : ""}
|
|
496
|
-
`;
|
|
497
|
-
/* export default */ const __rspack_default_export = (Text);
|
|
498
|
-
|
|
499
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
500
|
-
}, {
|
|
501
|
-
"default": __rspack_default_export
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
4368(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
507
|
-
/* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
|
|
508
|
-
/* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
|
|
509
|
-
|
|
510
|
-
const getFontSource = (name)=>(props)=>{
|
|
511
|
-
const fontsPath = props.fontsPath ?? "assets/fonts";
|
|
512
|
-
const fontName = props.fontMappings && props.fontMappings(name) || `${name}.woff2`;
|
|
513
|
-
return `url("${fontsPath}/${fontName}") format("woff2")`;
|
|
514
|
-
};
|
|
515
|
-
const fontStyles = (0,styled_components__rspack_import_0.css)`
|
|
516
|
-
@font-face {
|
|
517
|
-
font-family: "Inter";
|
|
518
|
-
src: ${getFontSource("Inter-ExtraLight-BETA")};
|
|
519
|
-
font-weight: 100;
|
|
520
|
-
font-style: normal;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
@font-face {
|
|
524
|
-
font-family: "Inter";
|
|
525
|
-
src: ${getFontSource("Inter-Light-BETA")};
|
|
526
|
-
font-weight: 300;
|
|
527
|
-
font-style: normal;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
@font-face {
|
|
531
|
-
font-family: "Inter";
|
|
532
|
-
src: ${getFontSource("Inter-Regular")};
|
|
533
|
-
font-weight: 400;
|
|
534
|
-
font-style: normal;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
@font-face {
|
|
538
|
-
font-family: "Inter";
|
|
539
|
-
src: ${getFontSource("Inter-Medium")};
|
|
540
|
-
font-weight: 500;
|
|
541
|
-
font-style: normal;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
@font-face {
|
|
545
|
-
font-family: "Inter";
|
|
546
|
-
src: ${getFontSource("Inter-SemiBold")};
|
|
547
|
-
font-weight: 600;
|
|
548
|
-
font-style: normal;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
@font-face {
|
|
552
|
-
font-family: "Inter";
|
|
553
|
-
src: ${getFontSource("Inter-ExtraBold")};
|
|
554
|
-
font-weight: 900;
|
|
555
|
-
font-style: normal;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
@font-face {
|
|
559
|
-
font-family: "Alpha";
|
|
560
|
-
src: ${getFontSource("HMAlphaMono-Medium")};
|
|
561
|
-
font-weight: 500;
|
|
562
|
-
font-style: normal;
|
|
563
|
-
}
|
|
564
|
-
`;
|
|
565
|
-
const textVariantStyle = {
|
|
566
|
-
h1: {
|
|
567
|
-
fontFamily: "Alpha, Inter, Sans",
|
|
568
|
-
fontWeight: 500,
|
|
569
|
-
"text-transform": "uppercase"
|
|
570
|
-
},
|
|
571
|
-
h1Inter: {
|
|
572
|
-
fontFamily: "Inter, Sans",
|
|
573
|
-
fontWeight: 500,
|
|
574
|
-
"text-transform": "uppercase"
|
|
575
|
-
},
|
|
576
|
-
h2: {
|
|
577
|
-
fontFamily: "Alpha, Inter, Sans",
|
|
578
|
-
fontWeight: 500,
|
|
579
|
-
"text-transform": "uppercase"
|
|
580
|
-
},
|
|
581
|
-
h2Inter: {
|
|
582
|
-
fontFamily: "Inter, Sans",
|
|
583
|
-
fontWeight: 500,
|
|
584
|
-
"text-transform": "uppercase"
|
|
585
|
-
},
|
|
586
|
-
h3: {
|
|
587
|
-
fontFamily: "Alpha, Inter, Sans",
|
|
588
|
-
fontWeight: 500,
|
|
589
|
-
"text-transform": "uppercase"
|
|
590
|
-
},
|
|
591
|
-
h3Inter: {
|
|
592
|
-
fontFamily: "Inter, Sans",
|
|
593
|
-
fontWeight: 500
|
|
594
|
-
},
|
|
595
|
-
h4: {
|
|
596
|
-
fontFamily: "Alpha, Inter, Sans",
|
|
597
|
-
fontWeight: 500,
|
|
598
|
-
"text-transform": "uppercase"
|
|
599
|
-
},
|
|
600
|
-
h4Inter: {
|
|
601
|
-
fontFamily: "Inter, Sans",
|
|
602
|
-
fontWeight: 600
|
|
603
|
-
},
|
|
604
|
-
h5: {
|
|
605
|
-
fontFamily: "Alpha, Inter, Sans",
|
|
606
|
-
fontWeight: 500,
|
|
607
|
-
"text-transform": "uppercase"
|
|
608
|
-
},
|
|
609
|
-
h5Inter: {
|
|
610
|
-
fontFamily: "Inter, Sans",
|
|
611
|
-
fontWeight: 500
|
|
612
|
-
},
|
|
613
|
-
large: {
|
|
614
|
-
fontFamily: "Inter, Sans"
|
|
615
|
-
},
|
|
616
|
-
largeLineHeight: {
|
|
617
|
-
fontFamily: "Inter, Sans",
|
|
618
|
-
lineHeight: 1.7
|
|
619
|
-
},
|
|
620
|
-
body: {
|
|
621
|
-
fontFamily: "Inter, Sans"
|
|
622
|
-
},
|
|
623
|
-
bodyLineHeight: {
|
|
624
|
-
fontFamily: "Inter, Sans",
|
|
625
|
-
lineHeight: 1.7
|
|
626
|
-
},
|
|
627
|
-
paragraph: {
|
|
628
|
-
fontFamily: "Inter, Sans"
|
|
629
|
-
},
|
|
630
|
-
paragraphLineHeight: {
|
|
631
|
-
fontFamily: "Inter, Sans",
|
|
632
|
-
lineHeight: 1.7
|
|
633
|
-
},
|
|
634
|
-
small: {
|
|
635
|
-
fontFamily: "Inter, Sans"
|
|
636
|
-
},
|
|
637
|
-
extraSmall: {
|
|
638
|
-
fontFamily: "Inter, Sans"
|
|
639
|
-
},
|
|
640
|
-
tiny: {
|
|
641
|
-
fontFamily: "Inter, Sans"
|
|
642
|
-
},
|
|
643
|
-
micro: {
|
|
644
|
-
fontFamily: "Inter, Sans"
|
|
645
|
-
},
|
|
646
|
-
subtitle: {
|
|
647
|
-
fontFamily: "Inter, Sans",
|
|
648
|
-
fontWeight: 600,
|
|
649
|
-
"text-transform": "uppercase"
|
|
650
|
-
}
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
654
|
-
}, {
|
|
655
|
-
textVariantStyle: textVariantStyle
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
6599(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
661
|
-
|
|
662
|
-
// EXPORTS
|
|
663
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
664
|
-
"default": () => (/* binding */ cta_Button)
|
|
665
|
-
});
|
|
666
|
-
|
|
667
|
-
// UNUSED EXPORTS: Base, ButtonExpand, ButtonUnstyled, buttonSizeStyle
|
|
668
|
-
|
|
669
|
-
;// CONCATENATED MODULE: external "@ledgerhq/icons-ui/reactLegacy/ChevronBottomMedium"
|
|
670
|
-
const ChevronBottomMedium_namespaceObject = require("@ledgerhq/icons-ui/reactLegacy/ChevronBottomMedium");
|
|
671
|
-
var ChevronBottomMedium_default = /*#__PURE__*/__webpack_require__.n(ChevronBottomMedium_namespaceObject);
|
|
672
|
-
// EXTERNAL MODULE: external "react"
|
|
673
|
-
var external_react_ = __webpack_require__(2015);
|
|
674
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
675
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
676
|
-
var external_styled_components_ = __webpack_require__(2770);
|
|
677
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
678
|
-
// EXTERNAL MODULE: external "styled-system"
|
|
679
|
-
var external_styled_system_ = __webpack_require__(9351);
|
|
680
|
-
// EXTERNAL MODULE: ./src/styles/helpers.ts + 1 modules
|
|
681
|
-
var helpers = __webpack_require__(205);
|
|
682
|
-
// EXTERNAL MODULE: ./src/styles/styled/fontFamily.ts
|
|
683
|
-
var fontFamily = __webpack_require__(3364);
|
|
684
|
-
// EXTERNAL MODULE: ./src/styles/theme.ts
|
|
685
|
-
var theme = __webpack_require__(5548);
|
|
686
|
-
// EXTERNAL MODULE: ./src/components/styled.ts
|
|
687
|
-
var styled = __webpack_require__(7680);
|
|
688
|
-
;// CONCATENATED MODULE: ./src/components/cta/Button/index.tsx
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
const IconContainer = (external_styled_components_default()).div`
|
|
698
|
-
display: inline-block;
|
|
699
|
-
${(p)=>`${p.iconPosition === "left" ? "margin-right" : "margin-left"}: ${p.theme.space[4]}px;`}
|
|
700
|
-
padding-top: 0.2em;
|
|
701
|
-
`;
|
|
702
|
-
const getVariantColors = (p)=>({
|
|
703
|
-
main: {
|
|
704
|
-
outline: `
|
|
705
|
-
border-color: ${p.theme.colors.neutral.c100};
|
|
706
|
-
color: ${p.theme.colors.neutral.c100};
|
|
707
|
-
background-color: transparent;
|
|
708
|
-
&:hover, &:focus {
|
|
709
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.neutral.c100, 0.03)};
|
|
710
|
-
}
|
|
711
|
-
&:active {
|
|
712
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.neutral.c100, 0.05)};
|
|
713
|
-
}
|
|
714
|
-
`,
|
|
715
|
-
filled: `
|
|
716
|
-
color: ${p.theme.colors.neutral.c00};
|
|
717
|
-
background-color: ${p.theme.colors.neutral.c100};
|
|
718
|
-
&:hover, &:focus {
|
|
719
|
-
background-color: ${p.theme.colors.neutral.c90};
|
|
720
|
-
}
|
|
721
|
-
`
|
|
722
|
-
},
|
|
723
|
-
shade: `
|
|
724
|
-
border-color: ${p.theme.colors.neutral.c40};
|
|
725
|
-
color: ${p.theme.colors.neutral.c100};
|
|
726
|
-
&:focus {
|
|
727
|
-
border-color: ${p.theme.colors.primary.c80};
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
&:hover, &:focus {
|
|
731
|
-
background-color: ${p.theme.colors.neutral.c20};
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
&:active {
|
|
735
|
-
background-color: ${p.theme.colors.neutral.c30};
|
|
736
|
-
}
|
|
737
|
-
`,
|
|
738
|
-
error: {
|
|
739
|
-
outline: `
|
|
740
|
-
border-color: ${p.theme.colors.error.c50};
|
|
741
|
-
color: ${p.theme.colors.error.c50};
|
|
742
|
-
background-color: transparent;
|
|
743
|
-
&:hover {
|
|
744
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.error.c50, 0.02)};
|
|
745
|
-
}
|
|
746
|
-
&:active {
|
|
747
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.error.c50, 0.05)};
|
|
748
|
-
}
|
|
749
|
-
`,
|
|
750
|
-
filled: `
|
|
751
|
-
color: ${p.theme.colors.neutral.c00};
|
|
752
|
-
background-color: ${p.theme.colors.error.c50};
|
|
753
|
-
&:hover {
|
|
754
|
-
background-color: ${p.theme.colors.error.c40};
|
|
755
|
-
}
|
|
756
|
-
`
|
|
757
|
-
},
|
|
758
|
-
neutral: `
|
|
759
|
-
color: ${p.theme.colors.neutral.c100};
|
|
760
|
-
background-color: ${p.theme.colors.neutral.c30};
|
|
761
|
-
&:hover {
|
|
762
|
-
background-color: ${p.theme.colors.neutral.c40};
|
|
763
|
-
}
|
|
764
|
-
`,
|
|
765
|
-
color: {
|
|
766
|
-
outline: `
|
|
767
|
-
border-color: ${p.theme.colors.primary.c80};
|
|
768
|
-
color: ${p.theme.colors.primary.c80};
|
|
769
|
-
background-color: transparent;
|
|
770
|
-
&:hover {
|
|
771
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.primary.c100, 0.02)};
|
|
772
|
-
}
|
|
773
|
-
&:active {
|
|
774
|
-
background-color: ${(0,helpers.rgba)(p.theme.colors.primary.c100, 0.05)};
|
|
775
|
-
}
|
|
776
|
-
`,
|
|
777
|
-
filled: `
|
|
778
|
-
color: ${p.theme.colors.neutral.c00};
|
|
779
|
-
background-color: ${p.theme.colors.primary.c80};
|
|
780
|
-
&:hover {
|
|
781
|
-
background-color: ${p.theme.colors.primary.c70};
|
|
782
|
-
}
|
|
783
|
-
`
|
|
784
|
-
},
|
|
785
|
-
disabled: {
|
|
786
|
-
outline: `
|
|
787
|
-
border-color: ${p.theme.colors.neutral.c50};
|
|
788
|
-
color: ${p.theme.colors.neutral.c50};
|
|
789
|
-
background-color: transparent;
|
|
790
|
-
&:focus, &:hover {
|
|
791
|
-
box-shadow: none;
|
|
792
|
-
}
|
|
793
|
-
`,
|
|
794
|
-
filled: `
|
|
795
|
-
color: ${p.theme.colors.neutral.c50};
|
|
796
|
-
background-color: ${p.theme.colors.neutral.c30};
|
|
797
|
-
&:focus, &:hover {
|
|
798
|
-
box-shadow: none;
|
|
799
|
-
}
|
|
800
|
-
`
|
|
801
|
-
},
|
|
802
|
-
default: `
|
|
803
|
-
color: ${p.theme.colors.neutral.c100};
|
|
804
|
-
background-color: transparent;
|
|
805
|
-
&:hover {
|
|
806
|
-
text-decoration: underline;
|
|
807
|
-
}
|
|
808
|
-
`
|
|
809
|
-
});
|
|
810
|
-
const ButtonUnstyled = styled["default"].button`
|
|
811
|
-
all: unset;
|
|
812
|
-
cursor: pointer;
|
|
813
|
-
|
|
814
|
-
&:disabled {
|
|
815
|
-
cursor: default;
|
|
816
|
-
}
|
|
817
|
-
`;
|
|
818
|
-
const Base = styled["default"].button.attrs((p)=>({
|
|
819
|
-
fontFamily: "Inter",
|
|
820
|
-
fontSize: p.fontSize ?? 4
|
|
821
|
-
}))`
|
|
822
|
-
background-color: transparent;
|
|
823
|
-
border-color: transparent;
|
|
824
|
-
border-radius: 44px;
|
|
825
|
-
border-style: solid;
|
|
826
|
-
border-width: ${(p)=>p.outline || p.variant === "shade" ? 1 : 0}px;
|
|
827
|
-
font-weight: 600;
|
|
828
|
-
${(0,external_styled_system_.compose)(fontFamily["default"], external_styled_system_.fontSize, external_styled_system_.border)};
|
|
829
|
-
line-height: ${(p)=>p.theme.fontSizes[p.fontSize]}px;
|
|
830
|
-
text-align: center;
|
|
831
|
-
display: inline-flex;
|
|
832
|
-
align-items: center;
|
|
833
|
-
justify-content: center;
|
|
834
|
-
overflow: hidden;
|
|
835
|
-
${(p)=>buttonSizeStyle[p.size || "medium"]}
|
|
836
|
-
text-overflow: ellipsis;
|
|
837
|
-
white-space: ${(p)=>p.whiteSpace ? p.whiteSpace : "nowrap"};
|
|
838
|
-
max-width: 100%;
|
|
839
|
-
position: relative;
|
|
840
|
-
cursor: ${(p)=>p.disabled ? "default" : "pointer"};
|
|
841
|
-
&:active {
|
|
842
|
-
box-shadow: 0 0 0 4px ${(p)=>(0,helpers.rgba)(p.theme.colors.primary.c60, 0.4)};
|
|
843
|
-
}
|
|
844
|
-
&:focus, &:hover {
|
|
845
|
-
box-shadow: 0 0 0 2px ${(p)=>(0,helpers.rgba)(p.theme.colors.primary.c60, 0.4)};
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
${(p)=>{
|
|
849
|
-
const variants = getVariantColors(p);
|
|
850
|
-
if (p.disabled) {
|
|
851
|
-
return p.outline || p.variant === "shade" ? variants.disabled.outline : variants.disabled.filled;
|
|
852
|
-
}
|
|
853
|
-
const variant = p.variant ?? "default";
|
|
854
|
-
switch(variant){
|
|
855
|
-
case "main":
|
|
856
|
-
return p.outline ? variants.main.outline : variants.main.filled;
|
|
857
|
-
case "shade":
|
|
858
|
-
return variants.shade;
|
|
859
|
-
case "error":
|
|
860
|
-
return p.outline ? variants.error.outline : variants.error.filled;
|
|
861
|
-
case "color":
|
|
862
|
-
return p.outline ? variants.color.outline : variants.color.filled;
|
|
863
|
-
case "neutral":
|
|
864
|
-
return variants.neutral;
|
|
865
|
-
case "default":
|
|
866
|
-
default:
|
|
867
|
-
return variants.default;
|
|
868
|
-
}
|
|
869
|
-
}}
|
|
870
|
-
${(p)=>p.iconButton ? (0,external_styled_components_.css)`
|
|
871
|
-
width: ${p.theme.space[12]}px;
|
|
872
|
-
padding: 0;
|
|
873
|
-
${IconContainer} {
|
|
874
|
-
margin: 0;
|
|
875
|
-
}
|
|
876
|
-
` : ""}
|
|
877
|
-
${(p)=>p.theme.transition([
|
|
878
|
-
"background-color",
|
|
879
|
-
"color",
|
|
880
|
-
"border-color",
|
|
881
|
-
"box-shadow"
|
|
882
|
-
], "0.2s")}
|
|
883
|
-
`;
|
|
884
|
-
const ContentContainer = (external_styled_components_default()).div``;
|
|
885
|
-
const Button = ({ Icon, iconPosition = "right", iconSize = 16, children, onClick, ...props }, ref)=>{
|
|
886
|
-
const iconNodeSize = iconSize || theme.fontSizes[props.fontSize ?? 4];
|
|
887
|
-
const IconNode = (0,external_react_.useMemo)(()=>{
|
|
888
|
-
if (!Icon) return null;
|
|
889
|
-
if (typeof Icon === "object") return Icon;
|
|
890
|
-
return /*#__PURE__*/ external_react_default().createElement(Icon, {
|
|
891
|
-
size: iconNodeSize
|
|
892
|
-
});
|
|
893
|
-
}, [
|
|
894
|
-
iconNodeSize,
|
|
895
|
-
Icon
|
|
896
|
-
]);
|
|
897
|
-
return /*#__PURE__*/ external_react_default().createElement(Base, {
|
|
898
|
-
...props,
|
|
899
|
-
ref: ref,
|
|
900
|
-
iconButton: !(Icon == null) && !children,
|
|
901
|
-
onClick: onClick
|
|
902
|
-
}, iconPosition === "right" ? /*#__PURE__*/ external_react_default().createElement(ContentContainer, null, children) : null, IconNode && /*#__PURE__*/ external_react_default().createElement(IconContainer, {
|
|
903
|
-
iconPosition: iconPosition
|
|
904
|
-
}, IconNode), iconPosition === "left" ? /*#__PURE__*/ external_react_default().createElement(ContentContainer, null, children) : null);
|
|
905
|
-
};
|
|
906
|
-
const ButtonWithRef = /*#__PURE__*/ external_react_default().forwardRef(Button);
|
|
907
|
-
const StyledButtonExpand = external_styled_components_default()(ButtonWithRef).attrs((props)=>({
|
|
908
|
-
Icon: props.Icon != null || (ChevronBottomMedium_default()),
|
|
909
|
-
iconPosition: props.iconPosition || "right"
|
|
910
|
-
}))`
|
|
911
|
-
${IconContainer} {
|
|
912
|
-
transition: transform 0.25s;
|
|
913
|
-
${(p)=>p.expanded ? "transform: rotate(180deg)" : ""}
|
|
914
|
-
}
|
|
915
|
-
`;
|
|
916
|
-
function ButtonExpand({ onToggle, onClick, ...props }, ref) {
|
|
917
|
-
const [expanded, setExpanded] = (0,external_react_.useState)(false);
|
|
918
|
-
return /*#__PURE__*/ external_react_default().createElement(StyledButtonExpand, {
|
|
919
|
-
...props,
|
|
920
|
-
ref: ref,
|
|
921
|
-
expanded: expanded,
|
|
922
|
-
onClick: (event)=>{
|
|
923
|
-
setExpanded((expanded)=>!expanded);
|
|
924
|
-
onToggle != null && onToggle(!expanded);
|
|
925
|
-
onClick != null && onClick(event);
|
|
926
|
-
}
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
const buttonSizeStyle = {
|
|
930
|
-
xs: {
|
|
931
|
-
padding: "0 12px",
|
|
932
|
-
height: "28px"
|
|
933
|
-
},
|
|
934
|
-
small: {
|
|
935
|
-
padding: "0 20px",
|
|
936
|
-
height: "32px"
|
|
937
|
-
},
|
|
938
|
-
medium: {
|
|
939
|
-
padding: "0 24px",
|
|
940
|
-
height: "40px"
|
|
941
|
-
},
|
|
942
|
-
large: {
|
|
943
|
-
padding: "0 28px",
|
|
944
|
-
height: "48px"
|
|
945
|
-
},
|
|
946
|
-
xl: {
|
|
947
|
-
padding: "0 28px",
|
|
948
|
-
height: "56px"
|
|
949
|
-
}
|
|
950
|
-
};
|
|
951
|
-
Button.Unstyled = ButtonUnstyled;
|
|
952
|
-
Button.Expand = /*#__PURE__*/ external_react_default().forwardRef(ButtonExpand);
|
|
953
|
-
ButtonWithRef.Unstyled = Button.Unstyled;
|
|
954
|
-
ButtonWithRef.Expand = Button.Expand;
|
|
955
|
-
/* export default */ const cta_Button = (ButtonWithRef);
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
3696(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
960
|
-
/* import */ var _styled__rspack_import_0 = __webpack_require__(7680);
|
|
961
|
-
|
|
962
|
-
const FlexBox = _styled__rspack_import_0["default"].div.attrs({
|
|
963
|
-
display: "flex",
|
|
964
|
-
minWidth: 0
|
|
965
|
-
})``;
|
|
966
|
-
/* export default */ const __rspack_default_export = (FlexBox);
|
|
967
|
-
|
|
968
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
969
|
-
}, {
|
|
970
|
-
"default": __rspack_default_export
|
|
971
|
-
});
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
2843(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
976
|
-
/* import */ var styled_system__rspack_import_0 = __webpack_require__(9351);
|
|
977
|
-
/* import */ var styled_system__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_0);
|
|
978
|
-
/* import */ var _styled__rspack_import_1 = __webpack_require__(7680);
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
function getColumns(props) {
|
|
982
|
-
const { columns } = props;
|
|
983
|
-
return columns === "none" ? columns : `repeat(${columns || 12}, minmax(0, 1fr));`;
|
|
984
|
-
}
|
|
985
|
-
function getRows(props) {
|
|
986
|
-
const { rows } = props;
|
|
987
|
-
return !rows ? "initial" : rows === "none" ? rows : `repeat(${rows}, minmax(0, 1fr));`;
|
|
988
|
-
}
|
|
989
|
-
const Grid = _styled__rspack_import_1["default"].div`
|
|
990
|
-
display: grid;
|
|
991
|
-
grid-template-columns: ${getColumns};
|
|
992
|
-
grid-template-rows: ${getRows};
|
|
993
|
-
${styled_system__rspack_import_0.grid};
|
|
994
|
-
`;
|
|
995
|
-
/* export default */ const __rspack_default_export = (Grid);
|
|
996
|
-
|
|
997
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
998
|
-
}, {
|
|
999
|
-
"default": __rspack_default_export
|
|
1000
|
-
});
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
7680(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1005
|
-
/* import */ var _styles_system_gaps__rspack_import_2 = __webpack_require__(4182);
|
|
1006
|
-
/* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
|
|
1007
|
-
/* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
|
|
1008
|
-
/* import */ var styled_system__rspack_import_1 = __webpack_require__(9351);
|
|
1009
|
-
/* import */ var styled_system__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_1);
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
const baseStyles = (0,styled_system__rspack_import_1.compose)(styled_system__rspack_import_1.flexbox, styled_system__rspack_import_1.space, styled_system__rspack_import_1.position, styled_system__rspack_import_1.color, styled_system__rspack_import_1.layout, styled_system__rspack_import_1.overflow, _styles_system_gaps__rspack_import_2["default"], styled_system__rspack_import_1.border);
|
|
1014
|
-
const proxyStyled = new Proxy((styled_components__rspack_import_0_default()), {
|
|
1015
|
-
apply (target, thisArg, argumentsList) {
|
|
1016
|
-
return styled_components__rspack_import_0_default()(target.apply(thisArg, argumentsList)(baseStyles));
|
|
1017
|
-
},
|
|
1018
|
-
get (target, property) {
|
|
1019
|
-
if (typeof target[property] === "function") {
|
|
1020
|
-
return styled_components__rspack_import_0_default()(target[property].apply((styled_components__rspack_import_0_default()), [
|
|
1021
|
-
baseStyles
|
|
1022
|
-
]));
|
|
1023
|
-
}
|
|
1024
|
-
return target[property];
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
/* export default */ const __rspack_default_export = (proxyStyled);
|
|
1028
|
-
|
|
1029
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1030
|
-
}, {
|
|
1031
|
-
"default": __rspack_default_export
|
|
1032
|
-
});
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
},
|
|
1036
|
-
205(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1037
|
-
|
|
1038
|
-
// EXPORTS
|
|
1039
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1040
|
-
ff: () => (/* binding */ ff),
|
|
1041
|
-
rgba: () => (/* binding */ rgba)
|
|
1042
|
-
});
|
|
1043
|
-
|
|
1044
|
-
// UNUSED EXPORTS: darken, ensureContrast, lighten, mix
|
|
1045
|
-
|
|
1046
|
-
;// CONCATENATED MODULE: external "color"
|
|
1047
|
-
const external_color_namespaceObject = require("color");
|
|
1048
|
-
var external_color_default = /*#__PURE__*/__webpack_require__.n(external_color_namespaceObject);
|
|
1049
|
-
// EXTERNAL MODULE: ./src/styles/theme.ts
|
|
1050
|
-
var theme = __webpack_require__(5548);
|
|
1051
|
-
;// CONCATENATED MODULE: ./src/styles/helpers.ts
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
const rgba = (c, a)=>external_color_default()(c).alpha(a).rgb().toString();
|
|
1055
|
-
const darken = (c, a)=>Color(c).darken(a).toString();
|
|
1056
|
-
const lighten = (c, a)=>Color(c).lighten(a).toString();
|
|
1057
|
-
const mix = (c, b, a)=>Color(c).mix(Color(b), a).toString();
|
|
1058
|
-
const ff = (v)=>{
|
|
1059
|
-
const [font, type = "Regular"] = v.split("|");
|
|
1060
|
-
// @ts-expect-error FIXME
|
|
1061
|
-
const { style, weight } = theme.fontFamilies[font][type];
|
|
1062
|
-
// @ts-expect-error FIXME
|
|
1063
|
-
const fallback = theme.fontFamilies[font].fallback ?? "Arial";
|
|
1064
|
-
return {
|
|
1065
|
-
fontFamily: `${font}, ${fallback}`,
|
|
1066
|
-
fontWeight: weight,
|
|
1067
|
-
fontStyle: style
|
|
1068
|
-
};
|
|
1069
|
-
};
|
|
1070
|
-
const ensureContrast = (color1, color2)=>{
|
|
1071
|
-
const colorL1 = Color(color1).luminosity() + 0.05;
|
|
1072
|
-
const colorL2 = Color(color2).luminosity() + 0.05;
|
|
1073
|
-
const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;
|
|
1074
|
-
if (lRatio < 1.5) {
|
|
1075
|
-
return Color(color1).rotate(180).negate().string();
|
|
1076
|
-
}
|
|
1077
|
-
return color1;
|
|
1078
|
-
};
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1082
|
-
3364(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1083
|
-
/* import */ var _helpers__rspack_import_0 = __webpack_require__(205);
|
|
1084
|
-
|
|
1085
|
-
/* export default */ const __rspack_default_export = ((props)=>{
|
|
1086
|
-
const prop = props.ff;
|
|
1087
|
-
if (prop == null) {
|
|
1088
|
-
return null;
|
|
1089
|
-
}
|
|
1090
|
-
return (0,_helpers__rspack_import_0.ff)(prop);
|
|
1091
|
-
});
|
|
1092
|
-
|
|
1093
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1094
|
-
}, {
|
|
1095
|
-
"default": __rspack_default_export
|
|
1096
|
-
});
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
},
|
|
1100
|
-
4182(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1101
|
-
/* import */ var styled_system__rspack_import_0 = __webpack_require__(9351);
|
|
1102
|
-
/* import */ var styled_system__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_0);
|
|
1103
|
-
|
|
1104
|
-
const gaps = (0,styled_system__rspack_import_0.system)({
|
|
1105
|
-
rowGap: {
|
|
1106
|
-
property: "rowGap",
|
|
1107
|
-
scale: "space"
|
|
1108
|
-
},
|
|
1109
|
-
columnGap: {
|
|
1110
|
-
property: "columnGap",
|
|
1111
|
-
scale: "space"
|
|
1112
|
-
}
|
|
1113
|
-
});
|
|
1114
|
-
/* export default */ const __rspack_default_export = (gaps);
|
|
1115
|
-
|
|
1116
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1117
|
-
}, {
|
|
1118
|
-
"default": __rspack_default_export
|
|
1119
|
-
});
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
5548(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1124
|
-
/* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
|
|
1125
|
-
/* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
|
|
1126
|
-
/* import */ var _ledgerhq_ui_shared__rspack_import_1 = __webpack_require__(2993);
|
|
1127
|
-
/* import */ var _ledgerhq_ui_shared__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(_ledgerhq_ui_shared__rspack_import_1);
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
const breakpoints = {
|
|
1131
|
-
sm: "640px",
|
|
1132
|
-
md: "768px",
|
|
1133
|
-
lg: "1024px",
|
|
1134
|
-
xl: "1280px",
|
|
1135
|
-
xxl: "1536px"
|
|
1136
|
-
};
|
|
1137
|
-
const space = [
|
|
1138
|
-
/* space indexes:
|
|
1139
|
-
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */ 0,
|
|
1140
|
-
2,
|
|
1141
|
-
4,
|
|
1142
|
-
8,
|
|
1143
|
-
10,
|
|
1144
|
-
12,
|
|
1145
|
-
16,
|
|
1146
|
-
20,
|
|
1147
|
-
24,
|
|
1148
|
-
28,
|
|
1149
|
-
32,
|
|
1150
|
-
36,
|
|
1151
|
-
40,
|
|
1152
|
-
44,
|
|
1153
|
-
48,
|
|
1154
|
-
52,
|
|
1155
|
-
56,
|
|
1156
|
-
60,
|
|
1157
|
-
64,
|
|
1158
|
-
68,
|
|
1159
|
-
72,
|
|
1160
|
-
76
|
|
1161
|
-
];
|
|
1162
|
-
const fontSizes = [
|
|
1163
|
-
8,
|
|
1164
|
-
10,
|
|
1165
|
-
11,
|
|
1166
|
-
12,
|
|
1167
|
-
13,
|
|
1168
|
-
14,
|
|
1169
|
-
16,
|
|
1170
|
-
20,
|
|
1171
|
-
24,
|
|
1172
|
-
28,
|
|
1173
|
-
32,
|
|
1174
|
-
36
|
|
1175
|
-
];
|
|
1176
|
-
[fontSizes.micro, fontSizes.tiny, fontSizes.extraSmall, fontSizes.small, fontSizes.paragraph, fontSizes.body, fontSizes.large, fontSizes.h5, fontSizes.h4, fontSizes.h3, fontSizes.h2, fontSizes.h1] = fontSizes;
|
|
1177
|
-
fontSizes.largeLineHeight = fontSizes.large;
|
|
1178
|
-
fontSizes.bodyLineHeight = fontSizes.body;
|
|
1179
|
-
fontSizes.paragraphLineHeight = fontSizes.paragraph;
|
|
1180
|
-
fontSizes.subtitle = fontSizes.extraSmall;
|
|
1181
|
-
fontSizes.h1Inter = fontSizes.h1;
|
|
1182
|
-
fontSizes.h2Inter = fontSizes.h2;
|
|
1183
|
-
fontSizes.h3Inter = fontSizes.h3;
|
|
1184
|
-
fontSizes.h4Inter = fontSizes.h4;
|
|
1185
|
-
fontSizes.h5Inter = fontSizes.h5;
|
|
1186
|
-
const fontWeights = {
|
|
1187
|
-
extraLight: "100",
|
|
1188
|
-
light: "300",
|
|
1189
|
-
regular: "400",
|
|
1190
|
-
medium: "500",
|
|
1191
|
-
semiBold: "600",
|
|
1192
|
-
bold: "700",
|
|
1193
|
-
extraBold: "800"
|
|
1194
|
-
};
|
|
1195
|
-
const radii = [
|
|
1196
|
-
0,
|
|
1197
|
-
4,
|
|
1198
|
-
8,
|
|
1199
|
-
12,
|
|
1200
|
-
16,
|
|
1201
|
-
20
|
|
1202
|
-
];
|
|
1203
|
-
const shadows = [
|
|
1204
|
-
"0 4px 8px 0 rgba(0, 0, 0, 0.03)"
|
|
1205
|
-
];
|
|
1206
|
-
const zIndexes = [
|
|
1207
|
-
-1,
|
|
1208
|
-
0,
|
|
1209
|
-
1,
|
|
1210
|
-
9,
|
|
1211
|
-
10,
|
|
1212
|
-
90,
|
|
1213
|
-
100,
|
|
1214
|
-
900,
|
|
1215
|
-
1000
|
|
1216
|
-
];
|
|
1217
|
-
// Those fonts are now defined in global.css, this is just a mapping for styled-system
|
|
1218
|
-
const fontFamilies = {
|
|
1219
|
-
Inter: {
|
|
1220
|
-
ExtraLight: {
|
|
1221
|
-
weight: 100,
|
|
1222
|
-
style: "normal"
|
|
1223
|
-
},
|
|
1224
|
-
Light: {
|
|
1225
|
-
weight: 300,
|
|
1226
|
-
style: "normal"
|
|
1227
|
-
},
|
|
1228
|
-
Regular: {
|
|
1229
|
-
weight: 400,
|
|
1230
|
-
style: "normal"
|
|
1231
|
-
},
|
|
1232
|
-
Medium: {
|
|
1233
|
-
weight: 500,
|
|
1234
|
-
style: "normal"
|
|
1235
|
-
},
|
|
1236
|
-
SemiBold: {
|
|
1237
|
-
weight: 600,
|
|
1238
|
-
style: "normal"
|
|
1239
|
-
},
|
|
1240
|
-
Bold: {
|
|
1241
|
-
weight: 700,
|
|
1242
|
-
style: "normal"
|
|
1243
|
-
},
|
|
1244
|
-
ExtraBold: {
|
|
1245
|
-
weight: 800,
|
|
1246
|
-
style: "normal"
|
|
1247
|
-
}
|
|
1248
|
-
},
|
|
1249
|
-
Alpha: {
|
|
1250
|
-
Medium: {
|
|
1251
|
-
weight: 500,
|
|
1252
|
-
style: "normal"
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
};
|
|
1256
|
-
const animationDuration = "0.33s";
|
|
1257
|
-
const easings = {
|
|
1258
|
-
outQuadratic: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
1259
|
-
};
|
|
1260
|
-
const transition = (properties = [
|
|
1261
|
-
"all"
|
|
1262
|
-
], duration = animationDuration, easing = easings.outQuadratic)=>(0,styled_components__rspack_import_0.css)`
|
|
1263
|
-
transition-property: ${properties.join(",")};
|
|
1264
|
-
transition-duration: ${duration};
|
|
1265
|
-
transition-timing-function: ${easing};
|
|
1266
|
-
`;
|
|
1267
|
-
const fadeIn = (0,styled_components__rspack_import_0.keyframes)`
|
|
1268
|
-
0% {
|
|
1269
|
-
opacity: 0;
|
|
1270
|
-
}
|
|
1271
|
-
100% {
|
|
1272
|
-
opacity: 1;
|
|
1273
|
-
}
|
|
1274
|
-
`;
|
|
1275
|
-
const fadeOut = (0,styled_components__rspack_import_0.keyframes)`
|
|
1276
|
-
0% {
|
|
1277
|
-
opacity: 1;
|
|
1278
|
-
}
|
|
1279
|
-
100% {
|
|
1280
|
-
opacity: 0;
|
|
1281
|
-
}
|
|
1282
|
-
`;
|
|
1283
|
-
const fadeInGrowX = (0,styled_components__rspack_import_0.keyframes)`
|
|
1284
|
-
0% {
|
|
1285
|
-
opacity: 0;
|
|
1286
|
-
transform: scaleX(0);
|
|
1287
|
-
}
|
|
1288
|
-
100% {
|
|
1289
|
-
opacity: 1;
|
|
1290
|
-
transform: scaleX(1);
|
|
1291
|
-
}
|
|
1292
|
-
`;
|
|
1293
|
-
const fadeInUp = (0,styled_components__rspack_import_0.keyframes)`
|
|
1294
|
-
0% {
|
|
1295
|
-
opacity: 0;
|
|
1296
|
-
transform: translateY(66%);
|
|
1297
|
-
}
|
|
1298
|
-
100% {
|
|
1299
|
-
opacity: 1;
|
|
1300
|
-
transform: translateY(0%);
|
|
1301
|
-
}
|
|
1302
|
-
`;
|
|
1303
|
-
const animations = {
|
|
1304
|
-
fadeIn: ()=>(0,styled_components__rspack_import_0.css)`
|
|
1305
|
-
${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards
|
|
1306
|
-
`,
|
|
1307
|
-
fadeOut: ()=>(0,styled_components__rspack_import_0.css)`
|
|
1308
|
-
${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards
|
|
1309
|
-
`,
|
|
1310
|
-
fadeInGrowX: ()=>(0,styled_components__rspack_import_0.css)`
|
|
1311
|
-
${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards
|
|
1312
|
-
`,
|
|
1313
|
-
fadeInUp: ()=>(0,styled_components__rspack_import_0.css)`
|
|
1314
|
-
${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards
|
|
1315
|
-
`
|
|
1316
|
-
};
|
|
1317
|
-
const overflow = {
|
|
1318
|
-
x: (0,styled_components__rspack_import_0.css)`
|
|
1319
|
-
overflow-y: hidden;
|
|
1320
|
-
overflow-x: scroll;
|
|
1321
|
-
will-change: transform;
|
|
1322
|
-
&:hover {
|
|
1323
|
-
--track-color: ${(p)=>p.theme.colors.neutral.c30};
|
|
1324
|
-
}
|
|
1325
|
-
`,
|
|
1326
|
-
y: (0,styled_components__rspack_import_0.css)`
|
|
1327
|
-
overflow-x: hidden;
|
|
1328
|
-
overflow-y: scroll;
|
|
1329
|
-
will-change: transform;
|
|
1330
|
-
&:hover {
|
|
1331
|
-
--track-color: ${(p)=>p.theme.colors.neutral.c30};
|
|
1332
|
-
}
|
|
1333
|
-
`,
|
|
1334
|
-
yAuto: (0,styled_components__rspack_import_0.css)`
|
|
1335
|
-
overflow-x: hidden;
|
|
1336
|
-
overflow-y: auto;
|
|
1337
|
-
will-change: transform;
|
|
1338
|
-
&:hover {
|
|
1339
|
-
--track-color: ${(p)=>p.theme.colors.neutral.c30};
|
|
1340
|
-
}
|
|
1341
|
-
`,
|
|
1342
|
-
xy: (0,styled_components__rspack_import_0.css)`
|
|
1343
|
-
overflow: scroll;
|
|
1344
|
-
will-change: transform;
|
|
1345
|
-
&:hover {
|
|
1346
|
-
--track-color: ${(p)=>p.theme.colors.neutral.c30};
|
|
1347
|
-
}
|
|
1348
|
-
`,
|
|
1349
|
-
trackSize: 12
|
|
1350
|
-
};
|
|
1351
|
-
const theme = {
|
|
1352
|
-
theme: "light",
|
|
1353
|
-
sizes: {
|
|
1354
|
-
drawer: {
|
|
1355
|
-
side: {
|
|
1356
|
-
big: {
|
|
1357
|
-
width: 580
|
|
1358
|
-
},
|
|
1359
|
-
small: {
|
|
1360
|
-
width: 420
|
|
1361
|
-
}
|
|
1362
|
-
},
|
|
1363
|
-
popin: {
|
|
1364
|
-
min: {
|
|
1365
|
-
height: 158,
|
|
1366
|
-
width: 462
|
|
1367
|
-
},
|
|
1368
|
-
max: {
|
|
1369
|
-
height: 522,
|
|
1370
|
-
width: 622
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
},
|
|
1374
|
-
topBarHeight: 58,
|
|
1375
|
-
sideBarWidth: 230
|
|
1376
|
-
},
|
|
1377
|
-
radii,
|
|
1378
|
-
fontFamilies,
|
|
1379
|
-
fontSizes,
|
|
1380
|
-
fontWeights,
|
|
1381
|
-
space,
|
|
1382
|
-
shadows,
|
|
1383
|
-
colors: _ledgerhq_ui_shared__rspack_import_1.palettes.light,
|
|
1384
|
-
animations,
|
|
1385
|
-
overflow,
|
|
1386
|
-
transition,
|
|
1387
|
-
zIndexes,
|
|
1388
|
-
breakpoints
|
|
1389
|
-
};
|
|
1390
|
-
/* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (theme)));
|
|
1391
|
-
|
|
1392
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1393
|
-
}, {
|
|
1394
|
-
fontFamilies: fontFamilies,
|
|
1395
|
-
fontSizes: fontSizes
|
|
1396
|
-
});
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
},
|
|
1400
|
-
9979(module) {
|
|
1401
|
-
module.exports = require("@ledgerhq/icons-ui/reactLegacy");
|
|
1402
|
-
|
|
1403
|
-
},
|
|
1404
|
-
2993(module) {
|
|
1405
|
-
module.exports = require("@ledgerhq/ui-shared");
|
|
1406
|
-
|
|
1407
|
-
},
|
|
1408
|
-
2015(module) {
|
|
1409
|
-
module.exports = require("react");
|
|
1410
|
-
|
|
1411
|
-
},
|
|
1412
|
-
2770(module) {
|
|
1413
|
-
module.exports = require("styled-components");
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1416
|
-
9351(module) {
|
|
1417
|
-
module.exports = require("styled-system");
|
|
1418
|
-
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1421
|
-
});
|
|
1422
|
-
// The module cache
|
|
1423
|
-
var __webpack_module_cache__ = {};
|
|
1424
|
-
|
|
1425
|
-
// The require function
|
|
1426
|
-
function __webpack_require__(moduleId) {
|
|
1427
|
-
|
|
1428
|
-
// Check if module is in cache
|
|
1429
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
1430
|
-
if (cachedModule !== undefined) {
|
|
1431
|
-
return cachedModule.exports;
|
|
1432
|
-
}
|
|
1433
|
-
// Create a new module (and put it into the cache)
|
|
1434
|
-
var module = (__webpack_module_cache__[moduleId] = {
|
|
1435
|
-
exports: {}
|
|
1436
|
-
});
|
|
1437
|
-
// Execute the module function
|
|
1438
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
1439
|
-
|
|
1440
|
-
// Return the exports of the module
|
|
1441
|
-
return module.exports;
|
|
1442
|
-
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
// webpack/runtime/compat_get_default_export
|
|
1446
|
-
(() => {
|
|
1447
|
-
// getDefaultExport function for compatibility with non-ESM modules
|
|
1448
|
-
__webpack_require__.n = (module) => {
|
|
1449
|
-
var getter = module && module.__esModule ?
|
|
1450
|
-
() => (module['default']) :
|
|
1451
|
-
() => (module);
|
|
1452
|
-
__webpack_require__.d(getter, { a: getter });
|
|
1453
|
-
return getter;
|
|
1454
|
-
};
|
|
1455
|
-
|
|
1456
|
-
})();
|
|
1457
|
-
// webpack/runtime/define_property_getters
|
|
1458
|
-
(() => {
|
|
1459
|
-
__webpack_require__.d = (exports, getters, values) => {
|
|
1460
|
-
var define = (defs, kind) => {
|
|
1461
|
-
for(var key in defs) {
|
|
1462
|
-
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
1463
|
-
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
};
|
|
1467
|
-
define(getters, "get");
|
|
1468
|
-
define(values, "value");
|
|
1469
|
-
};
|
|
1470
|
-
})();
|
|
1471
|
-
// webpack/runtime/has_own_property
|
|
1472
|
-
(() => {
|
|
1473
|
-
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1474
|
-
})();
|
|
1475
|
-
// webpack/runtime/make_namespace_object
|
|
1476
|
-
(() => {
|
|
1477
|
-
// define __esModule on exports
|
|
1478
|
-
__webpack_require__.r = (exports) => {
|
|
1479
|
-
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1480
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1481
|
-
}
|
|
1482
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1483
|
-
};
|
|
1484
|
-
})();
|
|
1485
|
-
var __webpack_exports__ = {};
|
|
1486
|
-
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
1487
|
-
(() => {
|
|
1488
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1489
|
-
/* import */ var react__rspack_import_0 = __webpack_require__(2015);
|
|
1490
|
-
/* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
|
|
1491
|
-
/* import */ var styled_components__rspack_import_1 = __webpack_require__(2770);
|
|
1492
|
-
/* import */ var styled_components__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_1);
|
|
1493
|
-
/* import */ var _cta_Button__rspack_import_6 = __webpack_require__(6599);
|
|
1494
|
-
/* import */ var _layout_Flex__rspack_import_3 = __webpack_require__(3696);
|
|
1495
|
-
/* import */ var _asorted_Text__rspack_import_2 = __webpack_require__(348);
|
|
1496
|
-
/* import */ var _index__rspack_import_4 = __webpack_require__(2352);
|
|
1497
|
-
/* import */ var _stories_helper__rspack_import_5 = __webpack_require__(3105);
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
const description = `
|
|
1506
|
-
### A flexible table component.
|
|
1507
|
-
|
|
1508
|
-
Define columns and pass some data to the component that will render it appropriately.
|
|
1509
|
-
|
|
1510
|
-
## Usage
|
|
1511
|
-
|
|
1512
|
-
\`\`\`js
|
|
1513
|
-
|
|
1514
|
-
import { Table } from "@ledgerhq/react-ui"
|
|
1515
|
-
|
|
1516
|
-
\`\`\`
|
|
1517
|
-
|
|
1518
|
-
### Define columns
|
|
1519
|
-
|
|
1520
|
-
To use the Table component the first thing to do is to define an array of columns.
|
|
1521
|
-
|
|
1522
|
-
A column is an object that specifies:
|
|
1523
|
-
|
|
1524
|
-
- how cells are rendered
|
|
1525
|
-
- how the header is rendered
|
|
1526
|
-
- the cells layout
|
|
1527
|
-
|
|
1528
|
-
<details>
|
|
1529
|
-
<summary>Column object shape</summary>
|
|
1530
|
-
\`\`\`ts
|
|
1531
|
-
// Note for typescript users, these types are importable from "@ledgerhq/react-ui/components/Table/Columns"
|
|
1532
|
-
// <T> is the type the data that will be rendered by the table.
|
|
1533
|
-
|
|
1534
|
-
interface Column<T> {
|
|
1535
|
-
/**
|
|
1536
|
-
* A function called to render each cell of the column.
|
|
1537
|
-
*/
|
|
1538
|
-
render: (props: CellProps<T>) => React.ReactNode;
|
|
1539
|
-
/**
|
|
1540
|
-
* A valid grid template [value](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns#values).
|
|
1541
|
-
* This layout is applied to every cell of the column.
|
|
1542
|
-
* Default to "min-content" - the largest minimal content contribution of the grid item.
|
|
1543
|
-
*/
|
|
1544
|
-
layout?: string;
|
|
1545
|
-
/**
|
|
1546
|
-
* A function called to render the header cell.
|
|
1547
|
-
* If omitted the rendered header element will be an empty div.
|
|
1548
|
-
*/
|
|
1549
|
-
header?: () => React.ReactNode;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
interface CellProps<T> {
|
|
1553
|
-
/**
|
|
1554
|
-
* The cell element.
|
|
1555
|
-
*/
|
|
1556
|
-
elt: T;
|
|
1557
|
-
/**
|
|
1558
|
-
* The row index.
|
|
1559
|
-
*/
|
|
1560
|
-
rowIndex: number;
|
|
1561
|
-
/**
|
|
1562
|
-
* The column index.
|
|
1563
|
-
*/
|
|
1564
|
-
columnIndex: number;
|
|
1565
|
-
}
|
|
1566
|
-
\`\`\`
|
|
1567
|
-
</details>
|
|
1568
|
-
|
|
1569
|
-
You can either define custom columns or reuse predefined ones that take care of the style
|
|
1570
|
-
and the layout and match the global look and feel.
|
|
1571
|
-
|
|
1572
|
-
<details>
|
|
1573
|
-
<summary>Predefined columns</summary>
|
|
1574
|
-
\`\`\`tsx
|
|
1575
|
-
Table.Columns.text(args: {
|
|
1576
|
-
/**
|
|
1577
|
-
* An optional title.
|
|
1578
|
-
*/
|
|
1579
|
-
title?: (elt: T) => React.ReactNode;
|
|
1580
|
-
/**
|
|
1581
|
-
* An optional subtitle.
|
|
1582
|
-
*/
|
|
1583
|
-
subtitle?: (elt: T) => React.ReactNode;
|
|
1584
|
-
/**
|
|
1585
|
-
* An optional render function to display the column header.
|
|
1586
|
-
*/
|
|
1587
|
-
header?: () => React.ReactNode;
|
|
1588
|
-
/**
|
|
1589
|
-
* The grid column layout, by default "auto".
|
|
1590
|
-
*/
|
|
1591
|
-
layout?: string;
|
|
1592
|
-
/**
|
|
1593
|
-
* Optional extra props passed to the title <Text /> wrapper.
|
|
1594
|
-
*/
|
|
1595
|
-
titleProps?: (elt: T) => Partial<React.ComponentProps<typeof Text>>;
|
|
1596
|
-
/**
|
|
1597
|
-
* Optional extra props passed to the subtitle <Text /> wrapper.
|
|
1598
|
-
*/
|
|
1599
|
-
subtitleProps?: (elt: T) => Partial<React.ComponentProps<typeof Text>>;
|
|
1600
|
-
})
|
|
1601
|
-
|
|
1602
|
-
Table.Columns.icon(args: {
|
|
1603
|
-
/**
|
|
1604
|
-
* An object containing the unerlying <Text /> wrapper props as well as
|
|
1605
|
-
* the "name" and "weight" props of the unerlying <Icon />.
|
|
1606
|
-
*/
|
|
1607
|
-
props: (elt: T) => Pick<IconProps, "name" | "weight"> & TextProps;
|
|
1608
|
-
/**
|
|
1609
|
-
* An optional render function to display the column header.
|
|
1610
|
-
*/
|
|
1611
|
-
header?: () => React.ReactNode;
|
|
1612
|
-
/**
|
|
1613
|
-
* The grid column layout, by default "min-content".
|
|
1614
|
-
*/
|
|
1615
|
-
layout?: string;
|
|
1616
|
-
})
|
|
1617
|
-
\`\`\`
|
|
1618
|
-
</details>
|
|
1619
|
-
|
|
1620
|
-
\`\`\`tsx
|
|
1621
|
-
const columns = [
|
|
1622
|
-
// Custom column. (layout is optional)
|
|
1623
|
-
{
|
|
1624
|
-
layout: "64px",
|
|
1625
|
-
render: ({ elt }) => <div>elt.value</div>
|
|
1626
|
-
},
|
|
1627
|
-
// Predefined columns.
|
|
1628
|
-
Table.Columns.text({
|
|
1629
|
-
layout: "2fr",
|
|
1630
|
-
title: (elt) => elt.name,
|
|
1631
|
-
subtitle: (elt) => elt.currency.name,
|
|
1632
|
-
}),
|
|
1633
|
-
Table.Columns.icon({
|
|
1634
|
-
props: (elt) => ({
|
|
1635
|
-
name: elt.synchronized ? "CircledCheck" : "Clock",
|
|
1636
|
-
color: elt.synchronized ? "success.c50" : "neutral.c80",
|
|
1637
|
-
}),
|
|
1638
|
-
}),
|
|
1639
|
-
]
|
|
1640
|
-
\`\`\`
|
|
1641
|
-
|
|
1642
|
-
### Minimal Working Example
|
|
1643
|
-
|
|
1644
|
-
\`\`\`tsx
|
|
1645
|
-
// An array of 12 items - each mapped to a row in the table.
|
|
1646
|
-
const data = new Array(12).fill(0).map((_, idx) => ({
|
|
1647
|
-
value: idx,
|
|
1648
|
-
}));
|
|
1649
|
-
|
|
1650
|
-
// We have 4 columns here.
|
|
1651
|
-
const NB_OF_COLUMNS = 4;
|
|
1652
|
-
const columns: Column<typeof data[0]>[] = Array(NB_OF_COLUMNS)
|
|
1653
|
-
.fill(0)
|
|
1654
|
-
.map((_, idx) => ({
|
|
1655
|
-
// The header will be a letter based on the column (A / B / C / D).
|
|
1656
|
-
// 65 is the char code for the letter 'A'.
|
|
1657
|
-
header: () => <Text variant="h5">{String.fromCharCode(65 + idx)}</Text>,
|
|
1658
|
-
// Each cell will contain an incremental number as well as the cell position.
|
|
1659
|
-
render: ({ elt, rowIndex, columnIndex }) => (
|
|
1660
|
-
<Flex alignItems="baseline">
|
|
1661
|
-
<Text mr={4}>{elt.value * NB_OF_COLUMNS + columnIndex}</Text>
|
|
1662
|
-
<Text variant="extraSmall">
|
|
1663
|
-
({rowIndex} / {columnIndex})
|
|
1664
|
-
</Text>
|
|
1665
|
-
</Flex>
|
|
1666
|
-
),
|
|
1667
|
-
}));
|
|
1668
|
-
|
|
1669
|
-
function MinimalExample(args) {
|
|
1670
|
-
return <Table {...args} data={data} columns={columns} />;
|
|
1671
|
-
};
|
|
1672
|
-
\`\`\`
|
|
1673
|
-
`;
|
|
1674
|
-
/* Default minimal example */ // An array of 12 items - each mapped to a row in the table.
|
|
1675
|
-
const data = new Array(12).fill(0).map((_, idx)=>({
|
|
1676
|
-
value: idx
|
|
1677
|
-
}));
|
|
1678
|
-
// We have 4 columns here.
|
|
1679
|
-
const NB_OF_COLUMNS = 4;
|
|
1680
|
-
const columns = Array(NB_OF_COLUMNS).fill(0).map((_, idx)=>({
|
|
1681
|
-
// The header will be a letter based on the column (A / B / C / D).
|
|
1682
|
-
// 65 is the char code for the letter 'A'.
|
|
1683
|
-
header: ()=>/*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
|
|
1684
|
-
variant: "h5"
|
|
1685
|
-
}, String.fromCharCode(65 + idx)),
|
|
1686
|
-
// Each cell will contain an incremental number as well as the cell position.
|
|
1687
|
-
render: ({ elt, rowIndex, columnIndex })=>/*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_3["default"], {
|
|
1688
|
-
alignItems: "baseline"
|
|
1689
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
|
|
1690
|
-
mr: 4
|
|
1691
|
-
}, elt.value * NB_OF_COLUMNS + columnIndex), /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
|
|
1692
|
-
variant: "extraSmall"
|
|
1693
|
-
}, "(", rowIndex, " / ", columnIndex, ")"))
|
|
1694
|
-
}));
|
|
1695
|
-
const Default = (args)=>{
|
|
1696
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4["default"], {
|
|
1697
|
-
...args,
|
|
1698
|
-
data: data,
|
|
1699
|
-
columns: columns
|
|
1700
|
-
});
|
|
1701
|
-
};
|
|
1702
|
-
/* Styled example */ const styledExampleDescription = `
|
|
1703
|
-
A more advanced example that applies some styles to the table and uses predefined columns.
|
|
1704
|
-
|
|
1705
|
-
Additional props passed to the Table are applied to the outer container which is
|
|
1706
|
-
an instance of the \`Grid\` component.
|
|
1707
|
-
|
|
1708
|
-
In this example we are taking advantage of that by using the \`p\`, \`gridRowGap\`, \`gridColumnGap\`,
|
|
1709
|
-
\`borderRadius\` and \`backgroundColor\` props to style the table container.
|
|
1710
|
-
`;
|
|
1711
|
-
const Styled = (args)=>{
|
|
1712
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), null, /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4["default"], {
|
|
1713
|
-
...args,
|
|
1714
|
-
data: _stories_helper__rspack_import_5.balance.data,
|
|
1715
|
-
columns: _stories_helper__rspack_import_5.balance.columns,
|
|
1716
|
-
p: 8,
|
|
1717
|
-
gridRowGap: 8,
|
|
1718
|
-
gridColumnGap: 6,
|
|
1719
|
-
borderRadius: 8,
|
|
1720
|
-
backgroundColor: "neutral.c20"
|
|
1721
|
-
}));
|
|
1722
|
-
};
|
|
1723
|
-
Styled.parameters = {
|
|
1724
|
-
docs: {
|
|
1725
|
-
description: {
|
|
1726
|
-
story: styledExampleDescription
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
};
|
|
1730
|
-
/* Nested example */ const nestedExampleDescription = `
|
|
1731
|
-
A complex example that takes in entry nested data and conditonally adds a custom additional row to the table.
|
|
1732
|
-
|
|
1733
|
-
The data has the following shape:
|
|
1734
|
-
|
|
1735
|
-
\`\`\`ts
|
|
1736
|
-
type Account = {
|
|
1737
|
-
name: string;
|
|
1738
|
-
currency: { name: string; abbrev: string };
|
|
1739
|
-
synchronized: boolean;
|
|
1740
|
-
amount: number;
|
|
1741
|
-
evolution: number;
|
|
1742
|
-
starred: boolean;
|
|
1743
|
-
// The interesting thing is that an account can contain sub-accounts
|
|
1744
|
-
subAccounts?: Account[];
|
|
1745
|
-
};
|
|
1746
|
-
\`\`\`
|
|
1747
|
-
|
|
1748
|
-
The table used in this example adds an extra row containing a nested table when an account contains sub-accounts.
|
|
1749
|
-
|
|
1750
|
-
In order to achieve that the \`extraRender\` prop is used and set to a function that will render the extra row.
|
|
1751
|
-
|
|
1752
|
-
You can use the \`ExtraRowContainer\` wrapper as the row container if you want the extra content to span the entire row.
|
|
1753
|
-
Otherwise be careful not to disturb the grid layout order.
|
|
1754
|
-
|
|
1755
|
-
\`\`\`tsx
|
|
1756
|
-
<Table
|
|
1757
|
-
/* ... */
|
|
1758
|
-
extraRender={(account) =>
|
|
1759
|
-
// If there are sub accounts…
|
|
1760
|
-
account.subAccounts &&
|
|
1761
|
-
account.subAccounts.length > 0 && (
|
|
1762
|
-
// …render the extra row.
|
|
1763
|
-
// ExtraRowContainer is a component that will span to the whole row.
|
|
1764
|
-
<Table.ExtraRowContainer>{/* stuff */}</Table.ExtraRowContainer>
|
|
1765
|
-
)
|
|
1766
|
-
}
|
|
1767
|
-
/>
|
|
1768
|
-
\`\`\`
|
|
1769
|
-
|
|
1770
|
-
`;
|
|
1771
|
-
function SubAccounts({ account, columns }) {
|
|
1772
|
-
const theme = (0,styled_components__rspack_import_1.useTheme)();
|
|
1773
|
-
const [expanded, setExpanded] = (0,react__rspack_import_0.useState)(false);
|
|
1774
|
-
const { subAccounts } = account;
|
|
1775
|
-
if (!subAccounts) return null;
|
|
1776
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), null, expanded && /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4.Rows, {
|
|
1777
|
-
data: subAccounts,
|
|
1778
|
-
columns: columns,
|
|
1779
|
-
render: ({ columnIndex, children })=>columnIndex === 0 ? /*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_3["default"], {
|
|
1780
|
-
alignItems: "center",
|
|
1781
|
-
justifyContent: "flex-end"
|
|
1782
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement("div", {
|
|
1783
|
-
style: {
|
|
1784
|
-
width: "1px",
|
|
1785
|
-
height: "2em",
|
|
1786
|
-
marginRight: `${theme.space[6]}px`,
|
|
1787
|
-
borderLeft: `1px solid ${theme.colors.neutral.c40}`
|
|
1788
|
-
}
|
|
1789
|
-
}), children) : children
|
|
1790
|
-
}), /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4["default"].ExtraRowContainer, null, /*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_3["default"], {
|
|
1791
|
-
justifyContent: "center",
|
|
1792
|
-
mt: -8
|
|
1793
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement(_cta_Button__rspack_import_6["default"].Expand, {
|
|
1794
|
-
onToggle: setExpanded
|
|
1795
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
|
|
1796
|
-
variant: "paragraph"
|
|
1797
|
-
}, expanded ? "Hide" : "Show", " tokens (", subAccounts.length, ")")))));
|
|
1798
|
-
}
|
|
1799
|
-
function Nested(args) {
|
|
1800
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4["default"], {
|
|
1801
|
-
...args,
|
|
1802
|
-
data: _stories_helper__rspack_import_5.accounts.data,
|
|
1803
|
-
columns: _stories_helper__rspack_import_5.accounts.columns,
|
|
1804
|
-
gridRowGap: 8,
|
|
1805
|
-
gridColumnGap: 6,
|
|
1806
|
-
p: 8,
|
|
1807
|
-
borderRadius: 8,
|
|
1808
|
-
backgroundColor: "neutral.c20",
|
|
1809
|
-
extraRender: (account)=>account.subAccounts && account.subAccounts.length > 0 && /*#__PURE__*/ react__rspack_import_0_default().createElement(SubAccounts, {
|
|
1810
|
-
account: account,
|
|
1811
|
-
columns: _stories_helper__rspack_import_5.accounts.columns
|
|
1812
|
-
})
|
|
1813
|
-
});
|
|
1814
|
-
}
|
|
1815
|
-
Nested.parameters = {
|
|
1816
|
-
docs: {
|
|
1817
|
-
description: {
|
|
1818
|
-
story: nestedExampleDescription
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
};
|
|
1822
|
-
/* Custom row example */ const customRowExampleDescription = `
|
|
1823
|
-
This example showcases how to styles rows, wrap them inside custom containers and add event handlers.
|
|
1824
|
-
|
|
1825
|
-
#### Row containers and event handlers
|
|
1826
|
-
|
|
1827
|
-
The \`renderRow\` prop is a render function that allows to customize the jsx output for each row of the table.
|
|
1828
|
-
|
|
1829
|
-
Note that the container should have the [\`display: contents\`](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout#grid_and_display_contents) css rule
|
|
1830
|
-
in order to preserve the table grid layout order.
|
|
1831
|
-
|
|
1832
|
-
\`\`\`tsx
|
|
1833
|
-
const renderRow = React.useCallback(
|
|
1834
|
-
(rowIndex, children) => (
|
|
1835
|
-
// RowContainer is a convenience component having "display: contents" hardcoded.
|
|
1836
|
-
// You can pass any event handler here.
|
|
1837
|
-
<Table.RowContainer onClick={() => alert(rowIndex)}>
|
|
1838
|
-
{children}
|
|
1839
|
-
</Table.RowContainer>
|
|
1840
|
-
),
|
|
1841
|
-
[],
|
|
1842
|
-
);
|
|
1843
|
-
|
|
1844
|
-
<Table
|
|
1845
|
-
/* ... */
|
|
1846
|
-
renderRow={renderRow}
|
|
1847
|
-
/>
|
|
1848
|
-
\`\`\`
|
|
1849
|
-
|
|
1850
|
-
#### Styling
|
|
1851
|
-
|
|
1852
|
-
Styling the container itself will not work.
|
|
1853
|
-
Since it has the \`display: contents\` rule the element will not produce a content box.
|
|
1854
|
-
|
|
1855
|
-
One working solution is to style the children instead.
|
|
1856
|
-
|
|
1857
|
-
\`\`\`ts
|
|
1858
|
-
const CustomRowContainer = styled(Table.RowContainer).attrs(
|
|
1859
|
-
({ onClick }) => ({
|
|
1860
|
-
onClick,
|
|
1861
|
-
}),
|
|
1862
|
-
)\`
|
|
1863
|
-
& > * {
|
|
1864
|
-
padding-left: \${(p) => p.theme.space[5]}px;
|
|
1865
|
-
padding-right: \${(p) => p.theme.space[5]}px;
|
|
1866
|
-
padding-top: \${(p) => p.theme.space[5]}px;
|
|
1867
|
-
padding-bottom: \${(p) => p.theme.space[5]}px;
|
|
1868
|
-
|
|
1869
|
-
&:first-child {
|
|
1870
|
-
padding-left: \${(p) => p.theme.space[8]}px;
|
|
1871
|
-
}
|
|
1872
|
-
&:last-child {
|
|
1873
|
-
padding-right: \${(p) => p.theme.space[8]}px;
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
&:hover > * {
|
|
1878
|
-
transition: background-color 0.2s;
|
|
1879
|
-
cursor: pointer;
|
|
1880
|
-
background-color: \${(p) =>
|
|
1881
|
-
p.rowIndex % 2 === 0
|
|
1882
|
-
? p.theme.colors.neutral.c30
|
|
1883
|
-
: p.theme.colors.primary.c20};
|
|
1884
|
-
}
|
|
1885
|
-
\`;
|
|
1886
|
-
\`\`\`
|
|
1887
|
-
`;
|
|
1888
|
-
const CustomRowContainer = styled_components__rspack_import_1_default()(_index__rspack_import_4["default"].RowContainer).attrs(({ onClick })=>({
|
|
1889
|
-
onClick
|
|
1890
|
-
}))`
|
|
1891
|
-
& > * {
|
|
1892
|
-
padding-left: ${(p)=>p.theme.space[5]}px;
|
|
1893
|
-
padding-right: ${(p)=>p.theme.space[5]}px;
|
|
1894
|
-
padding-top: ${(p)=>p.theme.space[5]}px;
|
|
1895
|
-
padding-bottom: ${(p)=>p.theme.space[5]}px;
|
|
1896
|
-
|
|
1897
|
-
&:first-child {
|
|
1898
|
-
padding-left: ${(p)=>p.theme.space[8]}px;
|
|
1899
|
-
}
|
|
1900
|
-
&:last-child {
|
|
1901
|
-
padding-right: ${(p)=>p.theme.space[8]}px;
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
&:hover > * {
|
|
1906
|
-
transition: background-color 0.2s;
|
|
1907
|
-
cursor: pointer;
|
|
1908
|
-
background-color: ${(p)=>p.rowIndex % 2 === 0 ? p.theme.colors.neutral.c30 : p.theme.colors.primary.c20};
|
|
1909
|
-
}
|
|
1910
|
-
`;
|
|
1911
|
-
const CustomRows = (args)=>{
|
|
1912
|
-
const [selectedRowIndex, setSelectedRowIndex] = (0,react__rspack_import_0.useState)();
|
|
1913
|
-
const renderRow = (0,react__rspack_import_0.useCallback)((rowIndex, children)=>/*#__PURE__*/ react__rspack_import_0_default().createElement(CustomRowContainer, {
|
|
1914
|
-
rowIndex: rowIndex,
|
|
1915
|
-
onClick: ()=>setSelectedRowIndex(rowIndex)
|
|
1916
|
-
}, children), []);
|
|
1917
|
-
return /*#__PURE__*/ react__rspack_import_0_default().createElement((react__rspack_import_0_default().Fragment), null, /*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_3["default"], {
|
|
1918
|
-
mb: 8
|
|
1919
|
-
}, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
|
|
1920
|
-
variant: "h5"
|
|
1921
|
-
}, "Selected index: ", selectedRowIndex ?? "none")), /*#__PURE__*/ react__rspack_import_0_default().createElement(_index__rspack_import_4["default"], {
|
|
1922
|
-
...args,
|
|
1923
|
-
data: _stories_helper__rspack_import_5.balance.data,
|
|
1924
|
-
columns: _stories_helper__rspack_import_5.balance.columns,
|
|
1925
|
-
renderRow: renderRow,
|
|
1926
|
-
borderRadius: 8,
|
|
1927
|
-
justifyItems: "stretch",
|
|
1928
|
-
alignItems: "stretch",
|
|
1929
|
-
border: "1px solid",
|
|
1930
|
-
borderColor: "neutral.c50",
|
|
1931
|
-
overflow: "hidden",
|
|
1932
|
-
withHeaders: false
|
|
1933
|
-
}));
|
|
1934
|
-
};
|
|
1935
|
-
CustomRows.parameters = {
|
|
1936
|
-
docs: {
|
|
1937
|
-
description: {
|
|
1938
|
-
story: customRowExampleDescription
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
};
|
|
1942
|
-
/* Export */ /* export default */ const __rspack_default_export = ({
|
|
1943
|
-
title: "Tables/Table",
|
|
1944
|
-
component: _index__rspack_import_4["default"],
|
|
1945
|
-
argTypes: {
|
|
1946
|
-
withHeaders: {
|
|
1947
|
-
type: "boolean",
|
|
1948
|
-
defaultValue: false
|
|
1949
|
-
},
|
|
1950
|
-
data: {
|
|
1951
|
-
control: false
|
|
1952
|
-
},
|
|
1953
|
-
columns: {
|
|
1954
|
-
control: false
|
|
1955
|
-
},
|
|
1956
|
-
rows: {
|
|
1957
|
-
table: {
|
|
1958
|
-
disable: true
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
},
|
|
1962
|
-
parameters: {
|
|
1963
|
-
docs: {
|
|
1964
|
-
description: {
|
|
1965
|
-
component: description
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
});
|
|
1970
|
-
|
|
1971
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
1972
|
-
Nested: () => (Nested)
|
|
1973
|
-
}, {
|
|
1974
|
-
CustomRows: CustomRows,
|
|
1975
|
-
Default: Default,
|
|
1976
|
-
Styled: Styled,
|
|
1977
|
-
"default": __rspack_default_export
|
|
1978
|
-
});
|
|
1979
|
-
|
|
1980
|
-
})();
|
|
1981
|
-
|
|
1982
|
-
module.exports = __webpack_exports__;
|
|
1983
|
-
})()
|
|
1984
|
-
;
|
|
1985
|
-
//# sourceMappingURL=Table.stories.js.map
|