@reown/appkit-ui-react-native 0.0.0-refactor-modal-migration-20241004184043 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/svg/{X.js → Twitter.js} +28 -18
- package/lib/commonjs/assets/svg/Twitter.js.map +1 -0
- package/lib/commonjs/assets/svg/{More.js → TwitterIcon.js} +5 -16
- package/lib/commonjs/assets/svg/TwitterIcon.js.map +1 -0
- package/lib/commonjs/components/wui-icon/index.js +6 -14
- package/lib/commonjs/components/wui-icon/index.js.map +1 -1
- package/lib/commonjs/composites/wui-account-button/index.js +7 -13
- package/lib/commonjs/composites/wui-account-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-account-button/styles.js +3 -3
- package/lib/commonjs/composites/wui-account-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-avatar/styles.js +1 -2
- package/lib/commonjs/composites/wui-avatar/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-button/index.js +3 -3
- package/lib/commonjs/composites/wui-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-button/styles.js +2 -2
- package/lib/commonjs/composites/wui-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-chip/index.js +7 -5
- package/lib/commonjs/composites/wui-chip/index.js.map +1 -1
- package/lib/commonjs/composites/wui-chip/styles.js +1 -1
- package/lib/commonjs/composites/wui-chip/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-list-item/index.js +10 -10
- package/lib/commonjs/composites/wui-list-item/index.js.map +1 -1
- package/lib/commonjs/composites/wui-list-item/styles.js +3 -4
- package/lib/commonjs/composites/wui-list-item/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-logo/index.js +2 -4
- package/lib/commonjs/composites/wui-logo/index.js.map +1 -1
- package/lib/commonjs/composites/wui-logo-select/index.js +3 -6
- package/lib/commonjs/composites/wui-logo-select/index.js.map +1 -1
- package/lib/commonjs/composites/wui-logo-select/styles.js +3 -3
- package/lib/commonjs/composites/wui-logo-select/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-network-button/index.js +10 -14
- package/lib/commonjs/composites/wui-network-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-network-button/styles.js +3 -3
- package/lib/commonjs/composites/wui-network-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-network-image/index.js +21 -48
- package/lib/commonjs/composites/wui-network-image/index.js.map +1 -1
- package/lib/commonjs/composites/wui-network-image/styles.js +1 -3
- package/lib/commonjs/composites/wui-network-image/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-qr-code/index.js +12 -16
- package/lib/commonjs/composites/wui-qr-code/index.js.map +1 -1
- package/lib/commonjs/composites/wui-snackbar/index.js +0 -1
- package/lib/commonjs/composites/wui-snackbar/index.js.map +1 -1
- package/lib/commonjs/composites/wui-snackbar/styles.js +1 -2
- package/lib/commonjs/composites/wui-snackbar/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-tabs/index.js +8 -22
- package/lib/commonjs/composites/wui-tabs/index.js.map +1 -1
- package/lib/commonjs/composites/wui-tabs/styles.js +2 -1
- package/lib/commonjs/composites/wui-tabs/styles.js.map +1 -1
- package/lib/commonjs/index.js +0 -63
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/ThemeUtil.js +1 -2
- package/lib/commonjs/utils/ThemeUtil.js.map +1 -1
- package/lib/commonjs/utils/UiUtil.js +0 -15
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/module/assets/svg/Twitter.js +37 -0
- package/lib/module/assets/svg/Twitter.js.map +1 -0
- package/lib/module/assets/svg/TwitterIcon.js +11 -0
- package/lib/module/assets/svg/TwitterIcon.js.map +1 -0
- package/lib/module/components/wui-icon/index.js +6 -14
- package/lib/module/components/wui-icon/index.js.map +1 -1
- package/lib/module/composites/wui-account-button/index.js +7 -13
- package/lib/module/composites/wui-account-button/index.js.map +1 -1
- package/lib/module/composites/wui-account-button/styles.js +4 -4
- package/lib/module/composites/wui-account-button/styles.js.map +1 -1
- package/lib/module/composites/wui-avatar/styles.js +1 -2
- package/lib/module/composites/wui-avatar/styles.js.map +1 -1
- package/lib/module/composites/wui-button/index.js +3 -3
- package/lib/module/composites/wui-button/index.js.map +1 -1
- package/lib/module/composites/wui-button/styles.js +2 -2
- package/lib/module/composites/wui-button/styles.js.map +1 -1
- package/lib/module/composites/wui-chip/index.js +8 -6
- package/lib/module/composites/wui-chip/index.js.map +1 -1
- package/lib/module/composites/wui-chip/styles.js +1 -1
- package/lib/module/composites/wui-chip/styles.js.map +1 -1
- package/lib/module/composites/wui-list-item/index.js +10 -10
- package/lib/module/composites/wui-list-item/index.js.map +1 -1
- package/lib/module/composites/wui-list-item/styles.js +3 -4
- package/lib/module/composites/wui-list-item/styles.js.map +1 -1
- package/lib/module/composites/wui-logo/index.js +2 -4
- package/lib/module/composites/wui-logo/index.js.map +1 -1
- package/lib/module/composites/wui-logo-select/index.js +3 -6
- package/lib/module/composites/wui-logo-select/index.js.map +1 -1
- package/lib/module/composites/wui-logo-select/styles.js +3 -3
- package/lib/module/composites/wui-logo-select/styles.js.map +1 -1
- package/lib/module/composites/wui-network-button/index.js +11 -15
- package/lib/module/composites/wui-network-button/index.js.map +1 -1
- package/lib/module/composites/wui-network-button/styles.js +4 -4
- package/lib/module/composites/wui-network-button/styles.js.map +1 -1
- package/lib/module/composites/wui-network-image/index.js +22 -49
- package/lib/module/composites/wui-network-image/index.js.map +1 -1
- package/lib/module/composites/wui-network-image/styles.js +0 -2
- package/lib/module/composites/wui-network-image/styles.js.map +1 -1
- package/lib/module/composites/wui-qr-code/index.js +12 -16
- package/lib/module/composites/wui-qr-code/index.js.map +1 -1
- package/lib/module/composites/wui-snackbar/index.js +0 -1
- package/lib/module/composites/wui-snackbar/index.js.map +1 -1
- package/lib/module/composites/wui-snackbar/styles.js +1 -2
- package/lib/module/composites/wui-snackbar/styles.js.map +1 -1
- package/lib/module/composites/wui-tabs/index.js +8 -22
- package/lib/module/composites/wui-tabs/index.js.map +1 -1
- package/lib/module/composites/wui-tabs/styles.js +2 -1
- package/lib/module/composites/wui-tabs/styles.js.map +1 -1
- package/lib/module/index.js +0 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/ThemeUtil.js +1 -2
- package/lib/module/utils/ThemeUtil.js.map +1 -1
- package/lib/module/utils/UiUtil.js +0 -15
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/typescript/assets/svg/Twitter.d.ts +4 -0
- package/lib/typescript/assets/svg/Twitter.d.ts.map +1 -0
- package/lib/typescript/assets/svg/TwitterIcon.d.ts +4 -0
- package/lib/typescript/assets/svg/TwitterIcon.d.ts.map +1 -0
- package/lib/typescript/components/wui-icon/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-account-button/index.d.ts +2 -2
- package/lib/typescript/composites/wui-account-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-avatar/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-chip/index.d.ts +2 -2
- package/lib/typescript/composites/wui-chip/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-item/index.d.ts +4 -6
- package/lib/typescript/composites/wui-list-item/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-item/styles.d.ts +0 -1
- package/lib/typescript/composites/wui-list-item/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-logo/index.d.ts +1 -3
- package/lib/typescript/composites/wui-logo/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-logo-select/index.d.ts +1 -4
- package/lib/typescript/composites/wui-logo-select/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-button/index.d.ts +4 -6
- package/lib/typescript/composites/wui-network-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-button/styles.d.ts +1 -1
- package/lib/typescript/composites/wui-network-image/index.d.ts +2 -6
- package/lib/typescript/composites/wui-network-image/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-image/styles.d.ts +0 -2
- package/lib/typescript/composites/wui-network-image/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-qr-code/index.d.ts +1 -6
- package/lib/typescript/composites/wui-qr-code/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-snackbar/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-snackbar/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-tabs/index.d.ts +2 -4
- package/lib/typescript/composites/wui-tabs/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-tabs/styles.d.ts +2 -1
- package/lib/typescript/composites/wui-tabs/styles.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +0 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/ThemeUtil.d.ts +0 -1
- package/lib/typescript/utils/ThemeUtil.d.ts.map +1 -1
- package/lib/typescript/utils/TypesUtil.d.ts +4 -5
- package/lib/typescript/utils/TypesUtil.d.ts.map +1 -1
- package/lib/typescript/utils/UiUtil.d.ts +0 -1
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/package.json +4 -4
- package/readme.md +1 -1
- package/src/assets/svg/Twitter.tsx +27 -0
- package/src/assets/svg/TwitterIcon.tsx +10 -0
- package/src/components/wui-icon/index.tsx +6 -14
- package/src/composites/wui-account-button/index.tsx +8 -17
- package/src/composites/wui-account-button/styles.ts +4 -4
- package/src/composites/wui-avatar/styles.ts +1 -2
- package/src/composites/wui-button/index.tsx +10 -12
- package/src/composites/wui-button/styles.ts +2 -2
- package/src/composites/wui-chip/index.tsx +9 -7
- package/src/composites/wui-chip/styles.ts +1 -1
- package/src/composites/wui-list-item/index.tsx +14 -15
- package/src/composites/wui-list-item/styles.ts +3 -4
- package/src/composites/wui-logo/index.tsx +2 -4
- package/src/composites/wui-logo-select/index.tsx +4 -7
- package/src/composites/wui-logo-select/styles.ts +3 -3
- package/src/composites/wui-network-button/index.tsx +15 -22
- package/src/composites/wui-network-button/styles.ts +4 -4
- package/src/composites/wui-network-image/index.tsx +21 -57
- package/src/composites/wui-network-image/styles.ts +0 -6
- package/src/composites/wui-qr-code/index.tsx +11 -18
- package/src/composites/wui-snackbar/index.tsx +0 -1
- package/src/composites/wui-snackbar/styles.ts +1 -2
- package/src/composites/wui-tabs/index.tsx +9 -33
- package/src/composites/wui-tabs/styles.ts +2 -1
- package/src/index.ts +0 -12
- package/src/utils/ThemeUtil.ts +1 -2
- package/src/utils/TypesUtil.ts +6 -45
- package/src/utils/UiUtil.ts +0 -18
- package/lib/commonjs/assets/svg/ArrowBottomCircle.js +0 -21
- package/lib/commonjs/assets/svg/ArrowBottomCircle.js.map +0 -1
- package/lib/commonjs/assets/svg/Farcaster.js +0 -28
- package/lib/commonjs/assets/svg/Farcaster.js.map +0 -1
- package/lib/commonjs/assets/svg/FarcasterSquare.js +0 -28
- package/lib/commonjs/assets/svg/FarcasterSquare.js.map +0 -1
- package/lib/commonjs/assets/svg/More.js.map +0 -1
- package/lib/commonjs/assets/svg/Paperplane.js +0 -21
- package/lib/commonjs/assets/svg/Paperplane.js.map +0 -1
- package/lib/commonjs/assets/svg/X.js.map +0 -1
- package/lib/commonjs/composites/wui-account-pill/index.js +0 -73
- package/lib/commonjs/composites/wui-account-pill/index.js.map +0 -1
- package/lib/commonjs/composites/wui-account-pill/styles.js +0 -25
- package/lib/commonjs/composites/wui-account-pill/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-balance/index.js +0 -27
- package/lib/commonjs/composites/wui-balance/index.js.map +0 -1
- package/lib/commonjs/composites/wui-banner/index.js +0 -36
- package/lib/commonjs/composites/wui-banner/index.js.map +0 -1
- package/lib/commonjs/composites/wui-banner/styles.js +0 -21
- package/lib/commonjs/composites/wui-banner/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-compatible-network/index.js +0 -58
- package/lib/commonjs/composites/wui-compatible-network/index.js.map +0 -1
- package/lib/commonjs/composites/wui-list-social/index.js +0 -54
- package/lib/commonjs/composites/wui-list-social/index.js.map +0 -1
- package/lib/commonjs/composites/wui-list-social/styles.js +0 -34
- package/lib/commonjs/composites/wui-list-social/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-list-token/index.js +0 -78
- package/lib/commonjs/composites/wui-list-token/index.js.map +0 -1
- package/lib/commonjs/composites/wui-list-token/styles.js +0 -30
- package/lib/commonjs/composites/wui-list-token/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-list-transaction/index.js +0 -64
- package/lib/commonjs/composites/wui-list-transaction/index.js.map +0 -1
- package/lib/commonjs/composites/wui-list-transaction/styles.js +0 -16
- package/lib/commonjs/composites/wui-list-transaction/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-list-transaction/utils.js +0 -88
- package/lib/commonjs/composites/wui-list-transaction/utils.js.map +0 -1
- package/lib/commonjs/composites/wui-token-button/index.js +0 -37
- package/lib/commonjs/composites/wui-token-button/index.js.map +0 -1
- package/lib/commonjs/composites/wui-token-button/styles.js +0 -24
- package/lib/commonjs/composites/wui-token-button/styles.js.map +0 -1
- package/lib/commonjs/composites/wui-transaction-visual/index.js +0 -73
- package/lib/commonjs/composites/wui-transaction-visual/index.js.map +0 -1
- package/lib/commonjs/composites/wui-transaction-visual/styles.js +0 -42
- package/lib/commonjs/composites/wui-transaction-visual/styles.js.map +0 -1
- package/lib/commonjs/utils/TransactionUtil.js +0 -139
- package/lib/commonjs/utils/TransactionUtil.js.map +0 -1
- package/lib/module/assets/svg/ArrowBottomCircle.js +0 -13
- package/lib/module/assets/svg/ArrowBottomCircle.js.map +0 -1
- package/lib/module/assets/svg/Farcaster.js +0 -20
- package/lib/module/assets/svg/Farcaster.js.map +0 -1
- package/lib/module/assets/svg/FarcasterSquare.js +0 -20
- package/lib/module/assets/svg/FarcasterSquare.js.map +0 -1
- package/lib/module/assets/svg/More.js +0 -22
- package/lib/module/assets/svg/More.js.map +0 -1
- package/lib/module/assets/svg/Paperplane.js +0 -13
- package/lib/module/assets/svg/Paperplane.js.map +0 -1
- package/lib/module/assets/svg/X.js +0 -27
- package/lib/module/assets/svg/X.js.map +0 -1
- package/lib/module/composites/wui-account-pill/index.js +0 -66
- package/lib/module/composites/wui-account-pill/index.js.map +0 -1
- package/lib/module/composites/wui-account-pill/styles.js +0 -19
- package/lib/module/composites/wui-account-pill/styles.js.map +0 -1
- package/lib/module/composites/wui-balance/index.js +0 -21
- package/lib/module/composites/wui-balance/index.js.map +0 -1
- package/lib/module/composites/wui-banner/index.js +0 -29
- package/lib/module/composites/wui-banner/index.js.map +0 -1
- package/lib/module/composites/wui-banner/styles.js +0 -15
- package/lib/module/composites/wui-banner/styles.js.map +0 -1
- package/lib/module/composites/wui-compatible-network/index.js +0 -52
- package/lib/module/composites/wui-compatible-network/index.js.map +0 -1
- package/lib/module/composites/wui-list-social/index.js +0 -47
- package/lib/module/composites/wui-list-social/index.js.map +0 -1
- package/lib/module/composites/wui-list-social/styles.js +0 -28
- package/lib/module/composites/wui-list-social/styles.js.map +0 -1
- package/lib/module/composites/wui-list-token/index.js +0 -71
- package/lib/module/composites/wui-list-token/index.js.map +0 -1
- package/lib/module/composites/wui-list-token/styles.js +0 -24
- package/lib/module/composites/wui-list-token/styles.js.map +0 -1
- package/lib/module/composites/wui-list-transaction/index.js +0 -57
- package/lib/module/composites/wui-list-transaction/index.js.map +0 -1
- package/lib/module/composites/wui-list-transaction/styles.js +0 -10
- package/lib/module/composites/wui-list-transaction/styles.js.map +0 -1
- package/lib/module/composites/wui-list-transaction/utils.js +0 -79
- package/lib/module/composites/wui-list-transaction/utils.js.map +0 -1
- package/lib/module/composites/wui-token-button/index.js +0 -30
- package/lib/module/composites/wui-token-button/index.js.map +0 -1
- package/lib/module/composites/wui-token-button/styles.js +0 -18
- package/lib/module/composites/wui-token-button/styles.js.map +0 -1
- package/lib/module/composites/wui-transaction-visual/index.js +0 -66
- package/lib/module/composites/wui-transaction-visual/index.js.map +0 -1
- package/lib/module/composites/wui-transaction-visual/styles.js +0 -36
- package/lib/module/composites/wui-transaction-visual/styles.js.map +0 -1
- package/lib/module/utils/TransactionUtil.js +0 -134
- package/lib/module/utils/TransactionUtil.js.map +0 -1
- package/lib/typescript/assets/svg/ArrowBottomCircle.d.ts +0 -4
- package/lib/typescript/assets/svg/ArrowBottomCircle.d.ts.map +0 -1
- package/lib/typescript/assets/svg/Farcaster.d.ts +0 -4
- package/lib/typescript/assets/svg/Farcaster.d.ts.map +0 -1
- package/lib/typescript/assets/svg/FarcasterSquare.d.ts +0 -4
- package/lib/typescript/assets/svg/FarcasterSquare.d.ts.map +0 -1
- package/lib/typescript/assets/svg/More.d.ts +0 -4
- package/lib/typescript/assets/svg/More.d.ts.map +0 -1
- package/lib/typescript/assets/svg/Paperplane.d.ts +0 -4
- package/lib/typescript/assets/svg/Paperplane.d.ts.map +0 -1
- package/lib/typescript/assets/svg/X.d.ts +0 -4
- package/lib/typescript/assets/svg/X.d.ts.map +0 -1
- package/lib/typescript/composites/wui-account-pill/index.d.ts +0 -11
- package/lib/typescript/composites/wui-account-pill/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-account-pill/styles.d.ts +0 -18
- package/lib/typescript/composites/wui-account-pill/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-balance/index.d.ts +0 -6
- package/lib/typescript/composites/wui-balance/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-banner/index.d.ts +0 -7
- package/lib/typescript/composites/wui-banner/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-banner/styles.d.ts +0 -14
- package/lib/typescript/composites/wui-banner/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-compatible-network/index.d.ts +0 -10
- package/lib/typescript/composites/wui-compatible-network/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-social/index.d.ts +0 -15
- package/lib/typescript/composites/wui-list-social/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-social/styles.d.ts +0 -27
- package/lib/typescript/composites/wui-list-social/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-token/index.d.ts +0 -11
- package/lib/typescript/composites/wui-list-token/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-token/styles.d.ts +0 -23
- package/lib/typescript/composites/wui-list-token/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-transaction/index.d.ts +0 -15
- package/lib/typescript/composites/wui-list-transaction/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-transaction/styles.d.ts +0 -10
- package/lib/typescript/composites/wui-list-transaction/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-list-transaction/utils.d.ts +0 -6
- package/lib/typescript/composites/wui-list-transaction/utils.d.ts.map +0 -1
- package/lib/typescript/composites/wui-token-button/index.d.ts +0 -7
- package/lib/typescript/composites/wui-token-button/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-token-button/styles.d.ts +0 -17
- package/lib/typescript/composites/wui-token-button/styles.d.ts.map +0 -1
- package/lib/typescript/composites/wui-transaction-visual/index.d.ts +0 -8
- package/lib/typescript/composites/wui-transaction-visual/index.d.ts.map +0 -1
- package/lib/typescript/composites/wui-transaction-visual/styles.d.ts +0 -35
- package/lib/typescript/composites/wui-transaction-visual/styles.d.ts.map +0 -1
- package/lib/typescript/utils/TransactionUtil.d.ts +0 -13
- package/lib/typescript/utils/TransactionUtil.d.ts.map +0 -1
- package/src/assets/svg/ArrowBottomCircle.tsx +0 -12
- package/src/assets/svg/Farcaster.tsx +0 -15
- package/src/assets/svg/FarcasterSquare.tsx +0 -15
- package/src/assets/svg/More.tsx +0 -16
- package/src/assets/svg/Paperplane.tsx +0 -12
- package/src/assets/svg/X.tsx +0 -26
- package/src/composites/wui-account-pill/index.tsx +0 -72
- package/src/composites/wui-account-pill/styles.ts +0 -19
- package/src/composites/wui-balance/index.tsx +0 -25
- package/src/composites/wui-banner/index.tsx +0 -28
- package/src/composites/wui-banner/styles.ts +0 -15
- package/src/composites/wui-compatible-network/index.tsx +0 -64
- package/src/composites/wui-list-social/index.tsx +0 -65
- package/src/composites/wui-list-social/styles.ts +0 -28
- package/src/composites/wui-list-token/index.tsx +0 -83
- package/src/composites/wui-list-token/styles.ts +0 -24
- package/src/composites/wui-list-transaction/index.tsx +0 -65
- package/src/composites/wui-list-transaction/styles.ts +0 -10
- package/src/composites/wui-list-transaction/utils.ts +0 -83
- package/src/composites/wui-token-button/index.tsx +0 -29
- package/src/composites/wui-token-button/styles.ts +0 -18
- package/src/composites/wui-transaction-visual/index.tsx +0 -78
- package/src/composites/wui-transaction-visual/styles.ts +0 -36
- package/src/utils/TransactionUtil.ts +0 -173
|
@@ -15,7 +15,7 @@ export interface AccountButtonProps {
|
|
|
15
15
|
imageHeaders?: Record<string, string>;
|
|
16
16
|
avatarSrc?: string;
|
|
17
17
|
address?: string;
|
|
18
|
-
|
|
18
|
+
isProfileName?: boolean;
|
|
19
19
|
balance?: string;
|
|
20
20
|
onPress?: () => void;
|
|
21
21
|
disabled?: boolean;
|
|
@@ -28,7 +28,7 @@ export function AccountButton({
|
|
|
28
28
|
imageHeaders,
|
|
29
29
|
avatarSrc,
|
|
30
30
|
address,
|
|
31
|
-
|
|
31
|
+
isProfileName,
|
|
32
32
|
balance,
|
|
33
33
|
onPress,
|
|
34
34
|
disabled,
|
|
@@ -73,20 +73,6 @@ export function AccountButton({
|
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const formattedAddress = profileName
|
|
77
|
-
? UiUtil.getTruncateString({
|
|
78
|
-
string: profileName,
|
|
79
|
-
charsStart: 18,
|
|
80
|
-
charsEnd: 0,
|
|
81
|
-
truncate: 'end'
|
|
82
|
-
})
|
|
83
|
-
: UiUtil.getTruncateString({
|
|
84
|
-
string: address || '',
|
|
85
|
-
charsStart: 4,
|
|
86
|
-
charsEnd: 6,
|
|
87
|
-
truncate: 'middle'
|
|
88
|
-
});
|
|
89
|
-
|
|
90
76
|
return (
|
|
91
77
|
<AnimatedPressable
|
|
92
78
|
onPress={onPress}
|
|
@@ -116,7 +102,12 @@ export function AccountButton({
|
|
|
116
102
|
/>
|
|
117
103
|
{address && (
|
|
118
104
|
<Text variant="paragraph-500" color="fg-200" style={styles.address}>
|
|
119
|
-
{
|
|
105
|
+
{UiUtil.getTruncateString({
|
|
106
|
+
string: address,
|
|
107
|
+
charsStart: isProfileName ? 18 : 4,
|
|
108
|
+
charsEnd: isProfileName ? 0 : 6,
|
|
109
|
+
truncate: isProfileName ? 'end' : 'middle'
|
|
110
|
+
})}
|
|
120
111
|
</Text>
|
|
121
112
|
)}
|
|
122
113
|
</View>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { Spacing } from '../../utils/ThemeUtil';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
container: {
|
|
6
6
|
flexDirection: 'row',
|
|
7
7
|
height: 40,
|
|
8
|
-
borderRadius:
|
|
8
|
+
borderRadius: 100,
|
|
9
9
|
borderWidth: 1,
|
|
10
10
|
justifyContent: 'center',
|
|
11
11
|
alignItems: 'center',
|
|
@@ -14,7 +14,7 @@ export default StyleSheet.create({
|
|
|
14
14
|
image: {
|
|
15
15
|
height: 24,
|
|
16
16
|
width: 24,
|
|
17
|
-
borderRadius:
|
|
17
|
+
borderRadius: 100,
|
|
18
18
|
borderWidth: 2
|
|
19
19
|
},
|
|
20
20
|
avatarPlaceholder: {
|
|
@@ -35,7 +35,7 @@ export default StyleSheet.create({
|
|
|
35
35
|
alignItems: 'center',
|
|
36
36
|
paddingLeft: Spacing['3xs'],
|
|
37
37
|
paddingRight: Spacing.xs,
|
|
38
|
-
borderRadius:
|
|
38
|
+
borderRadius: 100,
|
|
39
39
|
borderWidth: 1
|
|
40
40
|
},
|
|
41
41
|
address: {
|
|
@@ -95,18 +95,16 @@ export function Button({
|
|
|
95
95
|
style={[styles.iconLeft, iconStyle]}
|
|
96
96
|
/>
|
|
97
97
|
)}
|
|
98
|
-
{loading
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
children
|
|
109
|
-
))}
|
|
98
|
+
{loading ? (
|
|
99
|
+
<LoadingSpinner color={iconColor} />
|
|
100
|
+
) : (
|
|
101
|
+
<Text
|
|
102
|
+
variant={size === 'md' ? 'paragraph-600' : 'small-600'}
|
|
103
|
+
style={[styles.text, themedTextStyle]}
|
|
104
|
+
>
|
|
105
|
+
{children}
|
|
106
|
+
</Text>
|
|
107
|
+
)}
|
|
110
108
|
{iconRight && (
|
|
111
109
|
<Icon
|
|
112
110
|
color={iconColor}
|
|
@@ -14,7 +14,7 @@ export const getThemedButtonStyle = (
|
|
|
14
14
|
|
|
15
15
|
if (disabled) {
|
|
16
16
|
return {
|
|
17
|
-
backgroundColor: variant === 'fill' ? theme['gray-glass-
|
|
17
|
+
backgroundColor: variant === 'fill' ? theme['gray-glass-002'] : theme['gray-glass-010'],
|
|
18
18
|
borderColor: theme['gray-glass-002']
|
|
19
19
|
};
|
|
20
20
|
}
|
|
@@ -28,7 +28,7 @@ export const getThemedButtonStyle = (
|
|
|
28
28
|
|
|
29
29
|
return {
|
|
30
30
|
...buttonBaseStyle,
|
|
31
|
-
backgroundColor: variant === 'fill' ? theme['accent-100'] :
|
|
31
|
+
backgroundColor: variant === 'fill' ? theme['accent-100'] : 'transparent'
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
|
-
import { Animated, Pressable, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Animated, Linking, Pressable, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import type { ChipType, ColorType, IconType, SizeType } from '../../utils/TypesUtil';
|
|
4
4
|
import { useTheme } from '../../hooks/useTheme';
|
|
5
5
|
import { Text } from '../../components/wui-text';
|
|
@@ -10,6 +10,7 @@ import styles, { getThemedChipStyle, getThemedTextColor } from './styles';
|
|
|
10
10
|
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
11
11
|
|
|
12
12
|
export interface ChipProps {
|
|
13
|
+
link: string;
|
|
13
14
|
label?: string;
|
|
14
15
|
imageSrc?: string;
|
|
15
16
|
icon?: IconType;
|
|
@@ -17,11 +18,10 @@ export interface ChipProps {
|
|
|
17
18
|
size?: Exclude<SizeType, 'xl' | 'lg' | 'xs' | 'xxs'>;
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
style?: StyleProp<ViewStyle>;
|
|
20
|
-
onPress?: () => void;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function Chip({
|
|
24
|
-
|
|
24
|
+
link,
|
|
25
25
|
imageSrc,
|
|
26
26
|
icon,
|
|
27
27
|
variant = 'fill',
|
|
@@ -38,8 +38,10 @@ export function Chip({
|
|
|
38
38
|
const themedTextColor = getThemedTextColor(variant, disabled, pressed);
|
|
39
39
|
const iconSize = size === 'md' ? 'sm' : 'xs';
|
|
40
40
|
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const onPress = () => {
|
|
42
|
+
Linking.canOpenURL(link).then(supported => {
|
|
43
|
+
if (supported) Linking.openURL(link);
|
|
44
|
+
});
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
const onPressIn = () => {
|
|
@@ -76,7 +78,7 @@ export function Chip({
|
|
|
76
78
|
style={[styles.container, styles[`${size}Chip`], { borderColor, backgroundColor }, style]}
|
|
77
79
|
onPressIn={onPressIn}
|
|
78
80
|
onPressOut={onPressOut}
|
|
79
|
-
onPress={
|
|
81
|
+
onPress={onPress}
|
|
80
82
|
>
|
|
81
83
|
{imageSrc && (
|
|
82
84
|
<Image
|
|
@@ -93,7 +95,7 @@ export function Chip({
|
|
|
93
95
|
variant={size === 'md' ? 'paragraph-600' : 'small-600'}
|
|
94
96
|
style={[styles.link, { color: Theme[themedTextColor] }]}
|
|
95
97
|
>
|
|
96
|
-
{label}
|
|
98
|
+
{label || link}
|
|
97
99
|
</Text>
|
|
98
100
|
{icon && (
|
|
99
101
|
<Icon
|
|
@@ -5,7 +5,7 @@ import { Image } from '../../components/wui-image';
|
|
|
5
5
|
import { LoadingSpinner } from '../../components/wui-loading-spinner';
|
|
6
6
|
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
7
7
|
import { useTheme } from '../../hooks/useTheme';
|
|
8
|
-
import type {
|
|
8
|
+
import type { IconType } from '../../utils/TypesUtil';
|
|
9
9
|
import { IconBox } from '../wui-icon-box';
|
|
10
10
|
import styles from './styles';
|
|
11
11
|
|
|
@@ -13,9 +13,8 @@ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
|
13
13
|
|
|
14
14
|
export interface ListItemProps {
|
|
15
15
|
icon?: IconType;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
iconBorderColor?: ColorType;
|
|
16
|
+
iconVariant?: 'blue' | 'overlay';
|
|
17
|
+
variant?: 'image' | 'icon';
|
|
19
18
|
imageSrc?: string;
|
|
20
19
|
imageHeaders?: Record<string, string>;
|
|
21
20
|
chevron?: boolean;
|
|
@@ -24,24 +23,21 @@ export interface ListItemProps {
|
|
|
24
23
|
onPress?: () => void;
|
|
25
24
|
children?: ReactNode;
|
|
26
25
|
style?: StyleProp<ViewStyle>;
|
|
27
|
-
contentStyle?: StyleProp<ViewStyle>;
|
|
28
26
|
testID?: string;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
export function ListItem({
|
|
32
30
|
children,
|
|
33
31
|
icon,
|
|
32
|
+
variant,
|
|
34
33
|
imageSrc,
|
|
35
34
|
imageHeaders,
|
|
36
|
-
|
|
37
|
-
iconBackgroundColor,
|
|
38
|
-
iconBorderColor = 'gray-glass-005',
|
|
35
|
+
iconVariant = 'blue',
|
|
39
36
|
chevron,
|
|
40
37
|
loading,
|
|
41
38
|
disabled,
|
|
42
39
|
onPress,
|
|
43
40
|
style,
|
|
44
|
-
contentStyle,
|
|
45
41
|
testID
|
|
46
42
|
}: ListItemProps) {
|
|
47
43
|
const Theme = useTheme();
|
|
@@ -51,7 +47,7 @@ export function ListItem({
|
|
|
51
47
|
);
|
|
52
48
|
|
|
53
49
|
function visualTemplate() {
|
|
54
|
-
if (imageSrc) {
|
|
50
|
+
if (variant === 'image' && imageSrc) {
|
|
55
51
|
return (
|
|
56
52
|
<View style={[styles.imageContainer, { borderColor: Theme['gray-glass-005'] }]}>
|
|
57
53
|
<Image
|
|
@@ -61,15 +57,18 @@ export function ListItem({
|
|
|
61
57
|
/>
|
|
62
58
|
</View>
|
|
63
59
|
);
|
|
64
|
-
} else if (icon) {
|
|
60
|
+
} else if (variant === 'icon' && icon) {
|
|
61
|
+
const iconColor = iconVariant === 'blue' ? 'accent-100' : 'fg-200';
|
|
62
|
+
const borderColor = iconVariant === 'blue' ? 'accent-glass-005' : 'gray-glass-005';
|
|
63
|
+
|
|
65
64
|
return (
|
|
66
|
-
<View style={[styles.imageContainer, { borderColor: Theme[
|
|
65
|
+
<View style={[styles.imageContainer, { borderColor: Theme[borderColor] }]}>
|
|
67
66
|
<IconBox
|
|
68
67
|
icon={icon}
|
|
69
68
|
iconColor={iconColor}
|
|
70
69
|
size="md"
|
|
71
70
|
background
|
|
72
|
-
backgroundColor=
|
|
71
|
+
backgroundColor="gray-glass-010"
|
|
73
72
|
/>
|
|
74
73
|
</View>
|
|
75
74
|
);
|
|
@@ -82,7 +81,7 @@ export function ListItem({
|
|
|
82
81
|
if (loading) {
|
|
83
82
|
return <LoadingSpinner color="fg-200" size="lg" style={styles.rightIcon} />;
|
|
84
83
|
} else if (chevron) {
|
|
85
|
-
return <Icon name="chevronRight" size="md" color="fg-
|
|
84
|
+
return <Icon name="chevronRight" size="md" color="fg-150" style={styles.rightIcon} />;
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
return null;
|
|
@@ -102,7 +101,7 @@ export function ListItem({
|
|
|
102
101
|
testID={testID}
|
|
103
102
|
>
|
|
104
103
|
{visualTemplate()}
|
|
105
|
-
<View style={
|
|
104
|
+
<View style={styles.content}>{children}</View>
|
|
106
105
|
{rightTemplate()}
|
|
107
106
|
</AnimatedPressable>
|
|
108
107
|
);
|
|
@@ -13,13 +13,12 @@ export default StyleSheet.create({
|
|
|
13
13
|
content: {
|
|
14
14
|
flexDirection: 'row',
|
|
15
15
|
flexGrow: 1,
|
|
16
|
-
paddingHorizontal: Spacing.s
|
|
17
|
-
alignItems: 'center'
|
|
16
|
+
paddingHorizontal: Spacing.s
|
|
18
17
|
},
|
|
19
18
|
imageContainer: {
|
|
20
19
|
width: 36,
|
|
21
20
|
height: 36,
|
|
22
|
-
borderRadius:
|
|
21
|
+
borderRadius: 100,
|
|
23
22
|
borderWidth: 2,
|
|
24
23
|
alignItems: 'center',
|
|
25
24
|
justifyContent: 'center'
|
|
@@ -27,7 +26,7 @@ export default StyleSheet.create({
|
|
|
27
26
|
image: {
|
|
28
27
|
width: 32,
|
|
29
28
|
height: 32,
|
|
30
|
-
borderRadius:
|
|
29
|
+
borderRadius: 100
|
|
31
30
|
},
|
|
32
31
|
disabledImage: {
|
|
33
32
|
opacity: 0.4
|
|
@@ -6,11 +6,9 @@ import type { LogoType } from '../../utils/TypesUtil';
|
|
|
6
6
|
export interface LogoProps {
|
|
7
7
|
logo: LogoType;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
-
height?: number;
|
|
10
|
-
width?: number;
|
|
11
9
|
style?: SvgProps['style'];
|
|
12
10
|
}
|
|
13
11
|
|
|
14
|
-
export function Logo({
|
|
15
|
-
return <Icon width={
|
|
12
|
+
export function Logo({ logo, style }: LogoProps) {
|
|
13
|
+
return <Icon width={40} height={40} name={logo} style={style} />;
|
|
16
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animated, Pressable
|
|
1
|
+
import { Animated, Pressable } from 'react-native';
|
|
2
2
|
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
3
3
|
import { useTheme } from '../../hooks/useTheme';
|
|
4
4
|
import type { LogoType } from '../../utils/TypesUtil';
|
|
@@ -10,23 +10,20 @@ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
|
10
10
|
export interface LogoSelectProps {
|
|
11
11
|
logo: LogoType;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
onPress?: () => void;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
export function LogoSelect({ logo, disabled
|
|
15
|
+
export function LogoSelect({ logo, disabled }: LogoSelectProps) {
|
|
18
16
|
const Theme = useTheme();
|
|
19
17
|
const { animatedValue, setStartValue, setEndValue } = useAnimatedValue(
|
|
20
|
-
Theme['gray-glass-
|
|
18
|
+
Theme['gray-glass-005'],
|
|
21
19
|
Theme['gray-glass-010']
|
|
22
20
|
);
|
|
23
21
|
|
|
24
22
|
return (
|
|
25
23
|
<AnimatedPressable
|
|
26
|
-
onPress={onPress}
|
|
27
24
|
onPressIn={setEndValue}
|
|
28
25
|
onPressOut={setStartValue}
|
|
29
|
-
style={[styles.box, { backgroundColor: animatedValue }
|
|
26
|
+
style={[styles.box, { backgroundColor: animatedValue }]}
|
|
30
27
|
disabled={disabled}
|
|
31
28
|
>
|
|
32
29
|
<Logo logo={logo} style={disabled && styles.disabled} />
|
|
@@ -3,9 +3,9 @@ import { BorderRadius } from '../../utils/ThemeUtil';
|
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
box: {
|
|
6
|
-
height:
|
|
7
|
-
width:
|
|
8
|
-
borderRadius: BorderRadius.
|
|
6
|
+
height: 50,
|
|
7
|
+
width: 50,
|
|
8
|
+
borderRadius: BorderRadius.xs,
|
|
9
9
|
alignItems: 'center',
|
|
10
10
|
justifyContent: 'center'
|
|
11
11
|
},
|
|
@@ -1,50 +1,47 @@
|
|
|
1
|
-
import { Animated, Pressable,
|
|
1
|
+
import { Animated, Pressable, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
2
|
import { Image } from '../../components/wui-image';
|
|
3
3
|
import { Text } from '../../components/wui-text';
|
|
4
4
|
import { useTheme } from '../../hooks/useTheme';
|
|
5
5
|
import { IconBox } from '../wui-icon-box';
|
|
6
|
-
import { LoadingSpinner } from '../../components/wui-loading-spinner';
|
|
7
|
-
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
8
6
|
|
|
9
7
|
import styles from './styles';
|
|
8
|
+
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
9
|
+
import { LoadingSpinner } from '../../components/wui-loading-spinner';
|
|
10
10
|
|
|
11
11
|
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
12
12
|
|
|
13
13
|
export interface NetworkButtonProps {
|
|
14
|
-
children: string
|
|
14
|
+
children: string;
|
|
15
15
|
onPress: () => void;
|
|
16
|
-
background?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
16
|
imageSrc?: string;
|
|
19
17
|
imageHeaders?: Record<string, string>;
|
|
20
|
-
|
|
18
|
+
disabled?: boolean;
|
|
21
19
|
style?: StyleProp<ViewStyle>;
|
|
20
|
+
loading?: boolean;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export function NetworkButton({
|
|
25
|
-
children,
|
|
26
|
-
onPress,
|
|
27
|
-
background = true,
|
|
28
|
-
disabled,
|
|
29
24
|
imageSrc,
|
|
30
25
|
imageHeaders,
|
|
26
|
+
disabled,
|
|
27
|
+
onPress,
|
|
28
|
+
style,
|
|
31
29
|
loading,
|
|
32
|
-
|
|
30
|
+
children
|
|
33
31
|
}: NetworkButtonProps) {
|
|
34
32
|
const Theme = useTheme();
|
|
35
33
|
const textColor = disabled ? 'fg-300' : 'fg-100';
|
|
36
34
|
|
|
37
35
|
const { animatedValue, setStartValue, setEndValue } = useAnimatedValue(
|
|
38
|
-
|
|
36
|
+
Theme['gray-glass-005'],
|
|
39
37
|
Theme['gray-glass-010']
|
|
40
38
|
);
|
|
41
39
|
|
|
42
40
|
const backgroundColor = disabled ? Theme['gray-glass-015'] : animatedValue;
|
|
43
|
-
const borderColor = background ? Theme['gray-glass-005'] : 'transparent';
|
|
44
41
|
|
|
45
42
|
return (
|
|
46
43
|
<AnimatedPressable
|
|
47
|
-
style={[styles.container, { backgroundColor, borderColor }, style]}
|
|
44
|
+
style={[styles.container, { backgroundColor, borderColor: Theme['gray-glass-005'] }, style]}
|
|
48
45
|
onPress={onPress}
|
|
49
46
|
onPressIn={setEndValue}
|
|
50
47
|
onPressOut={setStartValue}
|
|
@@ -58,13 +55,9 @@ export function NetworkButton({
|
|
|
58
55
|
imageHeaders={imageHeaders}
|
|
59
56
|
borderColor={Theme['gray-glass-005']}
|
|
60
57
|
/>
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</Text>
|
|
65
|
-
) : (
|
|
66
|
-
<View style={styles.children}>{children}</View>
|
|
67
|
-
)}
|
|
58
|
+
<Text style={styles.text} variant="paragraph-600" color={textColor}>
|
|
59
|
+
{children}
|
|
60
|
+
</Text>
|
|
68
61
|
</AnimatedPressable>
|
|
69
62
|
);
|
|
70
63
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { Spacing } from '../../utils/ThemeUtil';
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
container: {
|
|
@@ -8,10 +8,10 @@ export default StyleSheet.create({
|
|
|
8
8
|
alignItems: 'center',
|
|
9
9
|
justifyContent: 'center',
|
|
10
10
|
borderWidth: 1,
|
|
11
|
-
borderRadius:
|
|
11
|
+
borderRadius: 100,
|
|
12
12
|
paddingHorizontal: Spacing['2xs']
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
text: {
|
|
15
15
|
paddingHorizontal: Spacing['2xs']
|
|
16
16
|
},
|
|
17
17
|
loader: {
|
|
@@ -20,7 +20,7 @@ export default StyleSheet.create({
|
|
|
20
20
|
image: {
|
|
21
21
|
height: 24,
|
|
22
22
|
width: 24,
|
|
23
|
-
borderRadius:
|
|
23
|
+
borderRadius: 100,
|
|
24
24
|
borderWidth: 2,
|
|
25
25
|
paddingLeft: Spacing['4xs']
|
|
26
26
|
},
|
|
@@ -1,85 +1,49 @@
|
|
|
1
1
|
import { Path, Svg, Image, Defs, Pattern } from 'react-native-svg';
|
|
2
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
2
|
import { useTheme } from '../../hooks/useTheme';
|
|
4
3
|
import type { SizeType } from '../../utils/TypesUtil';
|
|
5
|
-
import {
|
|
6
|
-
import { FlexView } from '../../layout/wui-flex';
|
|
7
|
-
import { PathLg, PathNormal, PathSmall, PathXS } from './styles';
|
|
4
|
+
import { PathLg, PathNormal } from './styles';
|
|
8
5
|
|
|
9
6
|
export interface NetworkImageProps {
|
|
10
7
|
imageSrc?: string;
|
|
11
8
|
imageHeaders?: Record<string, string>;
|
|
12
9
|
selected?: boolean;
|
|
13
|
-
size?: Exclude<SizeType, 'xl' | 'xxs'>;
|
|
10
|
+
size?: Exclude<SizeType, 'xl' | 'sm' | 'xs' | 'xxs'>;
|
|
14
11
|
disabled?: boolean;
|
|
15
|
-
style?: StyleProp<ViewStyle>;
|
|
16
|
-
borderColor?: string;
|
|
17
|
-
borderWidth?: number;
|
|
18
12
|
}
|
|
19
13
|
|
|
20
|
-
const sizeToPath = {
|
|
21
|
-
lg: PathLg,
|
|
22
|
-
md: PathNormal,
|
|
23
|
-
sm: PathSmall,
|
|
24
|
-
xs: PathXS
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const sizeToHeight = {
|
|
28
|
-
lg: 96,
|
|
29
|
-
md: 56,
|
|
30
|
-
sm: 40,
|
|
31
|
-
xs: 20
|
|
32
|
-
};
|
|
33
|
-
|
|
34
14
|
export function NetworkImage({
|
|
35
15
|
imageSrc,
|
|
36
16
|
imageHeaders,
|
|
37
17
|
disabled,
|
|
38
18
|
selected,
|
|
39
|
-
size = 'md'
|
|
40
|
-
style,
|
|
41
|
-
borderColor,
|
|
42
|
-
borderWidth = 1
|
|
19
|
+
size = 'md'
|
|
43
20
|
}: NetworkImageProps) {
|
|
44
21
|
const Theme = useTheme();
|
|
22
|
+
const isLg = size === 'lg';
|
|
23
|
+
const svgWidth = isLg ? 96 : 56;
|
|
24
|
+
const svgHeight = isLg ? 96 : 56;
|
|
45
25
|
const svgStroke = selected ? Theme['accent-100'] : Theme['gray-glass-010'];
|
|
46
26
|
const opacity = disabled ? 0.5 : 1;
|
|
47
27
|
|
|
48
28
|
return (
|
|
49
|
-
<Svg
|
|
50
|
-
width={sizeToHeight[size]}
|
|
51
|
-
height={sizeToHeight[size]}
|
|
52
|
-
stroke={borderColor ?? svgStroke}
|
|
53
|
-
strokeWidth={borderWidth}
|
|
54
|
-
style={style}
|
|
55
|
-
>
|
|
29
|
+
<Svg width={svgWidth} height={svgHeight} stroke={svgStroke} strokeWidth={1}>
|
|
56
30
|
<Defs>
|
|
57
|
-
<Pattern id="image-pattern">
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<FlexView
|
|
67
|
-
alignItems="center"
|
|
68
|
-
justifyContent="center"
|
|
69
|
-
// eslint-disable-next-line react-native/no-inline-styles
|
|
70
|
-
style={{
|
|
71
|
-
height: sizeToHeight[size],
|
|
72
|
-
width: sizeToHeight[size],
|
|
73
|
-
backgroundColor: 'transparent'
|
|
74
|
-
}}
|
|
75
|
-
>
|
|
76
|
-
<Icon name="networkPlaceholder" size={size} color="fg-200" />
|
|
77
|
-
</FlexView>
|
|
78
|
-
)}
|
|
31
|
+
<Pattern id="image-pattern" x="0" y="0" width="1" height="1">
|
|
32
|
+
<Image
|
|
33
|
+
height={svgHeight}
|
|
34
|
+
width={svgWidth}
|
|
35
|
+
x="0"
|
|
36
|
+
y="0"
|
|
37
|
+
opacity={opacity}
|
|
38
|
+
href={{ uri: imageSrc, headers: imageHeaders }}
|
|
39
|
+
/>
|
|
79
40
|
</Pattern>
|
|
80
41
|
</Defs>
|
|
81
|
-
|
|
82
|
-
|
|
42
|
+
<Path
|
|
43
|
+
d={`${isLg ? PathLg : PathNormal}`}
|
|
44
|
+
opacity={opacity}
|
|
45
|
+
fill={imageSrc ? 'url(#image-pattern)' : Theme['gray-glass-005']}
|
|
46
|
+
/>
|
|
83
47
|
</Svg>
|
|
84
48
|
);
|
|
85
49
|
}
|
|
@@ -3,9 +3,3 @@ export const PathLg =
|
|
|
3
3
|
|
|
4
4
|
export const PathNormal =
|
|
5
5
|
'M24.0002 2.34328C26.4754 0.914219 29.525 0.914219 32.0002 2.34328L48.2489 11.7245C50.7241 13.1535 52.2489 15.7946 52.2489 18.6527V37.4151C52.2489 40.2732 50.7241 42.9142 48.2489 44.3433L32.0002 53.7245C29.525 55.1535 26.4754 55.1535 24.0002 53.7245L7.75146 44.3433C5.27625 42.9142 3.75146 40.2732 3.75146 37.4151V18.6527C3.75146 15.7946 5.27626 13.1535 7.75146 11.7245L24.0002 2.34328Z';
|
|
6
|
-
|
|
7
|
-
export const PathSmall =
|
|
8
|
-
'M17.1428 1.67377C18.9108 0.653013 21.0891 0.653014 22.8571 1.67377L34.4633 8.37463C36.2313 9.39539 37.3205 11.2818 37.3205 13.3233V26.7251C37.3205 28.7666 36.2313 30.653 34.4633 31.6738L22.8571 38.3746C21.0891 39.3954 18.9108 39.3954 17.1428 38.3746L5.53659 31.6738C3.76858 30.653 2.67944 28.7666 2.67944 26.7251V13.3233C2.67944 11.2818 3.76858 9.39539 5.53659 8.37463L17.1428 1.67377Z';
|
|
9
|
-
|
|
10
|
-
export const PathXS =
|
|
11
|
-
'M8.57153 0.836886C9.45553 0.326507 10.5447 0.326507 11.4287 0.836886L17.2318 4.18731C18.1158 4.69769 18.6604 5.64091 18.6604 6.66167V13.3625C18.6604 14.3833 18.1158 15.3265 17.2318 15.8369L11.4287 19.1873C10.5447 19.6977 9.45553 19.6977 8.57153 19.1873L2.76841 15.8369C1.88441 15.3265 1.33984 14.3833 1.33984 13.3625V6.66167C1.33984 5.64091 1.88441 4.69769 2.76841 4.18731L8.57153 0.836886Z';
|