@lidofinance/ui-primitives 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -39,11 +39,11 @@ const $e59ee56775ea31d8$export$fe8257908279ce23 = (0, ($parcel$interopDefault($4
|
|
|
39
39
|
border-bottom-left-radius: 0;
|
|
40
40
|
border-bottom-right-radius: 0;
|
|
41
41
|
|
|
42
|
-
margin-bottom: ${({ theme: theme
|
|
43
|
-
padding-bottom: ${({ theme: theme
|
|
42
|
+
margin-bottom: ${({ theme: theme })=>-theme.borderRadiusesMap.xl}px;
|
|
43
|
+
padding-bottom: ${({ theme: theme })=>theme.borderRadiusesMap.xl + theme.spaceMap.xxl}px;
|
|
44
44
|
|
|
45
|
-
${({ theme: theme
|
|
46
|
-
padding-bottom: ${({ theme: theme
|
|
45
|
+
${({ theme: theme })=>theme.mediaQueries.md} {
|
|
46
|
+
padding-bottom: ${({ theme: theme })=>theme.borderRadiusesMap.xl + theme.spaceMap.lg}px;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
49
|
|
|
@@ -85,7 +85,7 @@ const $e071e57fc1f1505d$export$125159fec6480082 = (0, ($parcel$interopDefault($4
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
const $ff73dbbcec53aa22$export$36be84b4aed0dcaa = (props)=>{
|
|
88
|
-
const { account: account
|
|
88
|
+
const { account: account, onClickCb: onClickCb, ...rest } = props;
|
|
89
89
|
const isMobile = (0, $41D0Z$lidofinancelidoui.useBreakpoint)("md");
|
|
90
90
|
const mobileSymbols = 3;
|
|
91
91
|
const desktopSymbols = 6;
|
|
@@ -117,7 +117,7 @@ const $1eacde4e26b66524$export$2d1cff8340d03905 = (0, ($parcel$interopDefault($4
|
|
|
117
117
|
margin-right: 18px;
|
|
118
118
|
flex-basis: 50%;
|
|
119
119
|
flex-grow: 1;
|
|
120
|
-
font-size: ${({ theme: theme
|
|
120
|
+
font-size: ${({ theme: theme })=>theme.fontSizesMap.xxs}px;
|
|
121
121
|
line-height: 1.6em;
|
|
122
122
|
|
|
123
123
|
:last-child {
|
|
@@ -127,7 +127,7 @@ const $1eacde4e26b66524$export$2d1cff8340d03905 = (0, ($parcel$interopDefault($4
|
|
|
127
127
|
const $1eacde4e26b66524$export$e4ca13e82989524a = (0, ($parcel$interopDefault($41D0Z$styledcomponents))).div``;
|
|
128
128
|
const $1eacde4e26b66524$export$623cde957a5a324e = (0, ($parcel$interopDefault($41D0Z$styledcomponents))).div`
|
|
129
129
|
margin-top: 2px;
|
|
130
|
-
font-size: ${({ theme: theme
|
|
130
|
+
font-size: ${({ theme: theme, $small: $small })=>$small ? theme.fontSizesMap.sm : theme.fontSizesMap.md}px;
|
|
131
131
|
line-height: 1.4em;
|
|
132
132
|
font-weight: 800;
|
|
133
133
|
white-space: nowrap;
|
|
@@ -138,13 +138,13 @@ const $1eacde4e26b66524$export$ed3240b66ab7bcea = (0, ($parcel$interopDefault($4
|
|
|
138
138
|
`;
|
|
139
139
|
const $1eacde4e26b66524$export$8dce4e443c8afd41 = (0, ($parcel$interopDefault($41D0Z$styledcomponents))).div`
|
|
140
140
|
margin-top: 8px;
|
|
141
|
-
opacity: ${({ $hidden: $hidden
|
|
142
|
-
pointer-events: ${({ $hidden: $hidden
|
|
141
|
+
opacity: ${({ $hidden: $hidden })=>$hidden ? 0 : 1};
|
|
142
|
+
pointer-events: ${({ $hidden: $hidden })=>$hidden ? "none" : "auto"};
|
|
143
143
|
`;
|
|
144
144
|
|
|
145
145
|
|
|
146
146
|
const $dc56f960f8e379a3$export$976f47e15d5defb0 = (props)=>{
|
|
147
|
-
const { title: title
|
|
147
|
+
const { title: title, small: small = false, extra: extra, loading: loading = false, children: children, value: value, ...rest } = props;
|
|
148
148
|
const hasExtra = extra != null;
|
|
149
149
|
const hasChildren = children != null;
|
|
150
150
|
return /*#__PURE__*/ (0, $41D0Z$reactjsxruntime.jsxs)((0, $1eacde4e26b66524$export$2d1cff8340d03905), {
|
|
@@ -179,7 +179,7 @@ $parcel$export($16311673d4ed5791$exports, "WalletCardRow", function () { return
|
|
|
179
179
|
|
|
180
180
|
const $e0c76ff559ce91ed$export$d700fd35c768af1d = (0, ($parcel$interopDefault($41D0Z$styledcomponents))).div`
|
|
181
181
|
display: flex;
|
|
182
|
-
margin: ${({ theme: theme
|
|
182
|
+
margin: ${({ theme: theme })=>theme.spaceMap.lg}px 0;
|
|
183
183
|
|
|
184
184
|
&:first-child {
|
|
185
185
|
margin-top: 0;
|
|
@@ -212,7 +212,7 @@ const $221726d8ec45542f$export$37593eea88cd94ab = (0, ($parcel$interopDefault($4
|
|
|
212
212
|
`;
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
const $35ce4da3f038e635$export$db542de45b23291e = ({ error: error
|
|
215
|
+
const $35ce4da3f038e635$export$db542de45b23291e = ({ error: error, ...rest })=>{
|
|
216
216
|
if (error) return /*#__PURE__*/ (0, $41D0Z$reactjsxruntime.jsx)((0, $221726d8ec45542f$export$37593eea88cd94ab), {
|
|
217
217
|
...rest,
|
|
218
218
|
children: error
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKGO,MAAM,4CAAkB,CAAA,GAAA,iDAAK,EAAE,CAAA,GAAA,8BAAI,EAAE,CAAC;;;;iBAI5B,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,CAAC,MAAM,kBAAkB,GAAG;kBAC5C,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,kBAAkB,KAAK,MAAM,SAAS,IAAI;;EAEjF,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,aAAa,GAAG;oBACrB,E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AE,GAAM,UAAU,IAAI,EAAG;kBAC9B,EAAE,CAAC,WAAE,OAAO,EAAE,GAAM,UAAU,SAAS,OAAQ;AACjE,CAAC;;;ADPM,MAAM,4CAA2C,CAAC;IACvD,MAAM,SAAE,KAAK,SAAE,QAAQ,cAAO,KAAK,WAAE,UAAU,iBAAO,QAAQ,SAAE,KAAK,EAAE,GAAG,MAAM,GAAG;IAEnF,MAAM,WAAW,SAAS;IAC1B,MAAM,cAAc,YAAY;IAEhC,qBACE,iCAAC,CAAA,GAAA,yCAAqB;QAAG,GAAG,IAAI;;0BAC9B,gCAAC,CAAA,GAAA,yCAAmB;0BAAG;;0BACvB,gCAAC,CAAA,GAAA,yCAAmB;gBAAE,QAAQ;0BAAQ,wBAAU,gCAAC,CAAA,GAAA,qCAAW,SAAO;;YAClE,0BAAY,gCAAC,CAAA,GAAA,yCAAmB;0BAAG,wBAAU,gCAAC,CAAA,GAAA,qCAAW,SAAO;;YAChE,6BAAe,gCAAC,CAAA,GAAA,yCAAqB;gBAAE,SAAS;0BAAU;;;;AAGjE;;;;;;;;;;;AItCO,MAAM,4CAAqB,CAAA,GAAA,iDAAK,EAAE,GAAG,CAAC;;UAEnC,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,SAAS,GAAG;;;;;;;;;AAS7C,CAAC;;;ADXM,MAAM,4CAAgB,CAAA,GAAA,yCAAiB;;;;;;;;;;;;;;AIEvC,MAAM,4CAAsB,CAAA,GAAA,iDAAK,EAAE,CAAA,GAAA,yCAAS,EAAE,CAAC;;;;AAItD,CAAC;;;ADEM,MAAM,4CAA0C,CAAC,SAAE,KAAK,EAAE,GAAG,MAAM;IACxE,IAAI,OACF,qBAAO,gCAAC,CAAA,GAAA,yCAAkB;QAAG,GAAG,IAAI;kBAAG;;IAGzC,OAAO;AACT;;;;","sources":["packages/ui/primitives/src/index.ts","packages/ui/primitives/src/components/index.ts","packages/ui/primitives/src/components/wallet/index.ts","packages/ui/primitives/src/components/wallet/walletCard/index.ts","packages/ui/primitives/src/components/wallet/walletCard/walletCard.tsx","packages/ui/primitives/src/components/wallet/walletCard/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardAccount/index.ts","packages/ui/primitives/src/components/wallet/walletCardAccount/walletCardAccount.tsx","packages/ui/primitives/src/components/wallet/walletCardAccount/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardBalance/index.ts","packages/ui/primitives/src/components/wallet/walletCardBalance/walletCardBalance.tsx","packages/ui/primitives/src/components/wallet/walletCardBalance/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardRow/index.ts","packages/ui/primitives/src/components/wallet/walletCardRow/walletCardRow.tsx","packages/ui/primitives/src/components/wallet/walletCardRow/styles.tsx","packages/ui/primitives/src/components/wallet/walletFallback/index.ts","packages/ui/primitives/src/components/wallet/walletFallback/walletFallback.tsx","packages/ui/primitives/src/components/wallet/walletFallback/styles.tsx"],"sourcesContent":["export * from './components'\n","export * from './wallet'\n","export * from './walletCard'\nexport * from './walletCardAccount'\nexport * from './walletCardBalance'\nexport * from './walletCardRow'\nexport * from './walletFallback'\n","export * from './walletCard'\n","import React, { FC } from 'react'\nimport { BlockProps } from '@lidofinance/lido-ui'\nimport { WalletCardStyle } from './styles'\n\nexport type WalletCardComponent = FC<BlockProps>\n\nexport const WalletCard: WalletCardComponent = (props) => {\n return <WalletCardStyle color=\"accent\" {...props} />\n}\n","import styled from 'styled-components'\nimport { Block } from '@lidofinance/lido-ui'\n\nexport const WalletCardStyle = styled(Block)`\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n\n margin-bottom: ${({ theme }) => -theme.borderRadiusesMap.xl}px;\n padding-bottom: ${({ theme }) => theme.borderRadiusesMap.xl + theme.spaceMap.xxl}px;\n\n ${({ theme }) => theme.mediaQueries.md} {\n padding-bottom: ${({ theme }) => theme.borderRadiusesMap.xl + theme.spaceMap.lg}px;\n }\n`\n","export * from './walletCardAccount'\n","import React, { FC } from 'react'\nimport { LidoComponentProps, IdenticonBadge, useBreakpoint } from '@lidofinance/lido-ui'\n\nimport { WalletCardAccountStyle } from './styles'\n\nexport type WalletCardAccountType = FC<\n LidoComponentProps<\n 'div',\n {\n account?: string | null\n onClickCb: (T: unknown) => unknown\n }\n >\n>\n\nexport const WalletCardAccount: WalletCardAccountType = (props) => {\n const { account, onClickCb, ...rest } = props\n\n const isMobile = useBreakpoint('md')\n const mobileSymbols = 3\n const desktopSymbols = 6\n const symbols = isMobile ? mobileSymbols : desktopSymbols\n\n return (\n <WalletCardAccountStyle {...rest}>\n <IdenticonBadge address={account ?? ''} symbols={symbols} onClick={onClickCb} color=\"accent\" />\n </WalletCardAccountStyle>\n )\n}\n","import styled from 'styled-components'\n\nexport const WalletCardAccountStyle = styled.div`\n align-self: stretch;\n display: flex;\n flex-basis: 50%;\n flex-grow: 1;\n flex-shrink: 1;\n overflow: hidden;\n align-items: center;\n justify-content: flex-end;\n margin-left: auto;\n\n & > * {\n cursor: pointer;\n }\n`\n","export * from './walletCardBalance'\n","import React, { FC, PropsWithChildren } from 'react'\nimport { LidoComponentProps, InlineLoader } from '@lidofinance/lido-ui'\n\nimport {\n WalletCardBalanceStyle,\n WalletCardTitleStyle,\n WalletCardValueStyle,\n WalletCardExtraStyle,\n WalletCardContentStyle,\n} from './styles'\n\nexport type WalletCardBalanceType = FC<\n PropsWithChildren<\n LidoComponentProps<\n 'div',\n {\n title: React.ReactNode\n value: React.ReactNode\n small?: boolean\n loading?: boolean\n extra?: React.ReactNode\n }\n >\n >\n>\n\nexport const WalletCardBalance: WalletCardBalanceType = (props) => {\n const { title, small = false, extra, loading = false, children, value, ...rest } = props\n\n const hasExtra = extra != null\n const hasChildren = children != null\n\n return (\n <WalletCardBalanceStyle {...rest}>\n <WalletCardTitleStyle>{title}</WalletCardTitleStyle>\n <WalletCardValueStyle $small={small}>{loading ? <InlineLoader /> : value}</WalletCardValueStyle>\n {hasExtra && <WalletCardExtraStyle>{loading ? <InlineLoader /> : extra}</WalletCardExtraStyle>}\n {hasChildren && <WalletCardContentStyle $hidden={loading}>{children}</WalletCardContentStyle>}\n </WalletCardBalanceStyle>\n )\n}\n","import styled from 'styled-components'\n\nexport const WalletCardBalanceStyle = styled.div`\n margin-right: 18px;\n flex-basis: 50%;\n flex-grow: 1;\n font-size: ${({ theme }) => theme.fontSizesMap.xxs}px;\n line-height: 1.6em;\n\n :last-child {\n margin-right: 0;\n }\n`\n\nexport const WalletCardTitleStyle = styled.div``\n\nexport const WalletCardValueStyle = styled.div<{ $small: boolean }>`\n margin-top: 2px;\n font-size: ${({ theme, $small }) => ($small ? theme.fontSizesMap.sm : theme.fontSizesMap.md)}px;\n line-height: 1.4em;\n font-weight: 800;\n white-space: nowrap;\n`\n\nexport const WalletCardExtraStyle = styled.div`\n margin-top: 2px;\n opacity: 0.5;\n`\n\nexport const WalletCardContentStyle = styled.div<{ $hidden: boolean }>`\n margin-top: 8px;\n opacity: ${({ $hidden }) => ($hidden ? 0 : 1)};\n pointer-events: ${({ $hidden }) => ($hidden ? 'none' : 'auto')};\n`\n","export * from './walletCardRow'\n","import { WalletCardRowStyle } from './styles'\n\nexport const WalletCardRow = WalletCardRowStyle\n","import styled from 'styled-components'\n\nexport const WalletCardRowStyle = styled.div`\n display: flex;\n margin: ${({ theme }) => theme.spaceMap.lg}px 0;\n\n &:first-child {\n margin-top: 0;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n`\n","export * from './walletFallback'\n","import React, { FC } from 'react'\nimport { BlockProps } from '@lidofinance/lido-ui'\nimport { FallbackWalletStyle } from './styles'\n\nexport type FallbackWalletComponent = FC<\n BlockProps & {\n error: string\n }\n>\n\nexport const WalletFallback: FallbackWalletComponent = ({ error, ...rest }) => {\n if (error) {\n return <FallbackWalletStyle {...rest}>{error}</FallbackWalletStyle>\n }\n\n return null\n}\n","import styled from 'styled-components'\n\nimport { WalletCard } from '../walletCard'\n\nexport const FallbackWalletStyle = styled(WalletCard)`\n text-align: center;\n background: var(--lido-color-error);\n background-image: none !important;\n`\n"],"names":[],"version":3,"file":"index.cjs.map"}
|
package/dist/index.mjs
CHANGED
|
@@ -36,11 +36,11 @@ const $cca444b4a3633fd1$export$fe8257908279ce23 = (0, $9LU3C$styledcomponents)((
|
|
|
36
36
|
border-bottom-left-radius: 0;
|
|
37
37
|
border-bottom-right-radius: 0;
|
|
38
38
|
|
|
39
|
-
margin-bottom: ${({ theme: theme
|
|
40
|
-
padding-bottom: ${({ theme: theme
|
|
39
|
+
margin-bottom: ${({ theme: theme })=>-theme.borderRadiusesMap.xl}px;
|
|
40
|
+
padding-bottom: ${({ theme: theme })=>theme.borderRadiusesMap.xl + theme.spaceMap.xxl}px;
|
|
41
41
|
|
|
42
|
-
${({ theme: theme
|
|
43
|
-
padding-bottom: ${({ theme: theme
|
|
42
|
+
${({ theme: theme })=>theme.mediaQueries.md} {
|
|
43
|
+
padding-bottom: ${({ theme: theme })=>theme.borderRadiusesMap.xl + theme.spaceMap.lg}px;
|
|
44
44
|
}
|
|
45
45
|
`;
|
|
46
46
|
|
|
@@ -82,7 +82,7 @@ const $0fb84f8a31124cdc$export$125159fec6480082 = (0, $9LU3C$styledcomponents).d
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
const $24f5534c5a2a2725$export$36be84b4aed0dcaa = (props)=>{
|
|
85
|
-
const { account: account
|
|
85
|
+
const { account: account, onClickCb: onClickCb, ...rest } = props;
|
|
86
86
|
const isMobile = (0, $9LU3C$useBreakpoint)("md");
|
|
87
87
|
const mobileSymbols = 3;
|
|
88
88
|
const desktopSymbols = 6;
|
|
@@ -114,7 +114,7 @@ const $ca8b781e1b38cbcc$export$2d1cff8340d03905 = (0, $9LU3C$styledcomponents).d
|
|
|
114
114
|
margin-right: 18px;
|
|
115
115
|
flex-basis: 50%;
|
|
116
116
|
flex-grow: 1;
|
|
117
|
-
font-size: ${({ theme: theme
|
|
117
|
+
font-size: ${({ theme: theme })=>theme.fontSizesMap.xxs}px;
|
|
118
118
|
line-height: 1.6em;
|
|
119
119
|
|
|
120
120
|
:last-child {
|
|
@@ -124,7 +124,7 @@ const $ca8b781e1b38cbcc$export$2d1cff8340d03905 = (0, $9LU3C$styledcomponents).d
|
|
|
124
124
|
const $ca8b781e1b38cbcc$export$e4ca13e82989524a = (0, $9LU3C$styledcomponents).div``;
|
|
125
125
|
const $ca8b781e1b38cbcc$export$623cde957a5a324e = (0, $9LU3C$styledcomponents).div`
|
|
126
126
|
margin-top: 2px;
|
|
127
|
-
font-size: ${({ theme: theme
|
|
127
|
+
font-size: ${({ theme: theme, $small: $small })=>$small ? theme.fontSizesMap.sm : theme.fontSizesMap.md}px;
|
|
128
128
|
line-height: 1.4em;
|
|
129
129
|
font-weight: 800;
|
|
130
130
|
white-space: nowrap;
|
|
@@ -135,13 +135,13 @@ const $ca8b781e1b38cbcc$export$ed3240b66ab7bcea = (0, $9LU3C$styledcomponents).d
|
|
|
135
135
|
`;
|
|
136
136
|
const $ca8b781e1b38cbcc$export$8dce4e443c8afd41 = (0, $9LU3C$styledcomponents).div`
|
|
137
137
|
margin-top: 8px;
|
|
138
|
-
opacity: ${({ $hidden: $hidden
|
|
139
|
-
pointer-events: ${({ $hidden: $hidden
|
|
138
|
+
opacity: ${({ $hidden: $hidden })=>$hidden ? 0 : 1};
|
|
139
|
+
pointer-events: ${({ $hidden: $hidden })=>$hidden ? "none" : "auto"};
|
|
140
140
|
`;
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
const $f979852e26257adb$export$976f47e15d5defb0 = (props)=>{
|
|
144
|
-
const { title: title
|
|
144
|
+
const { title: title, small: small = false, extra: extra, loading: loading = false, children: children, value: value, ...rest } = props;
|
|
145
145
|
const hasExtra = extra != null;
|
|
146
146
|
const hasChildren = children != null;
|
|
147
147
|
return /*#__PURE__*/ (0, $9LU3C$jsxs)((0, $ca8b781e1b38cbcc$export$2d1cff8340d03905), {
|
|
@@ -176,7 +176,7 @@ $parcel$export($85abde3fc4d2318a$exports, "WalletCardRow", function () { return
|
|
|
176
176
|
|
|
177
177
|
const $850e0b5661e19f5b$export$d700fd35c768af1d = (0, $9LU3C$styledcomponents).div`
|
|
178
178
|
display: flex;
|
|
179
|
-
margin: ${({ theme: theme
|
|
179
|
+
margin: ${({ theme: theme })=>theme.spaceMap.lg}px 0;
|
|
180
180
|
|
|
181
181
|
&:first-child {
|
|
182
182
|
margin-top: 0;
|
|
@@ -209,7 +209,7 @@ const $bf0a356b24b10b1a$export$37593eea88cd94ab = (0, $9LU3C$styledcomponents)((
|
|
|
209
209
|
`;
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
const $69868d219c84490b$export$db542de45b23291e = ({ error: error
|
|
212
|
+
const $69868d219c84490b$export$db542de45b23291e = ({ error: error, ...rest })=>{
|
|
213
213
|
if (error) return /*#__PURE__*/ (0, $9LU3C$jsx)((0, $bf0a356b24b10b1a$export$37593eea88cd94ab), {
|
|
214
214
|
...rest,
|
|
215
215
|
children: error
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKGO,MAAM,4CAAkB,CAAA,GAAA,uBAAK,EAAE,CAAA,GAAA,YAAI,EAAE,CAAC;;;;iBAI5B,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,CAAC,MAAM,kBAAkB,GAAG;kBAC5C,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,kBAAkB,KAAK,MAAM,SAAS,IAAI;;EAEjF,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,aAAa,GAAG;oBACrB,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,kBAAkB,KAAK,MAAM,SAAS,GAAG;;AAEpF,CAAC;;;ADPM,MAAM,4CAAkC,CAAC;IAC9C,qBAAO,gBAAC,CAAA,GAAA,yCAAc;QAAE,OAAM;QAAU,GAAG,KAAK;;AAClD;;;;;;;;;;;;;;AINO,MAAM,4CAAyB,CAAA,GAAA,uB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IAEnF,MAAM,WAAW,SAAS;IAC1B,MAAM,cAAc,YAAY;IAEhC,qBACE,iBAAC,CAAA,GAAA,yCAAqB;QAAG,GAAG,IAAI;;0BAC9B,gBAAC,CAAA,GAAA,yCAAmB;0BAAG;;0BACvB,gBAAC,CAAA,GAAA,yCAAmB;gBAAE,QAAQ;0BAAQ,wBAAU,gBAAC,CAAA,GAAA,mBAAW,SAAO;;YAClE,0BAAY,gBAAC,CAAA,GAAA,yCAAmB;0BAAG,wBAAU,gBAAC,CAAA,GAAA,mBAAW,SAAO;;YAChE,6BAAe,gBAAC,CAAA,GAAA,yCAAqB;gBAAE,SAAS;0BAAU;;;;AAGjE;;;;;;;;;;;AItCO,MAAM,4CAAqB,CAAA,GAAA,uBAAK,EAAE,GAAG,CAAC;;UAEnC,EAAE,CAAC,SAAE,KAAK,EAAE,GAAK,MAAM,SAAS,GAAG;;;;;;;;;AAS7C,CAAC;;;ADXM,MAAM,4CAAgB,CAAA,GAAA,yCAAiB;;;;;;;;;;;;;;AIEvC,MAAM,4CAAsB,CAAA,GAAA,uBAAK,EAAE,CAAA,GAAA,yCAAS,EAAE,CAAC;;;;AAItD,CAAC;;;ADEM,MAAM,4CAA0C,CAAC,SAAE,KAAK,EAAE,GAAG,MAAM;IACxE,IAAI,OACF,qBAAO,gBAAC,CAAA,GAAA,yCAAkB;QAAG,GAAG,IAAI;kBAAG;;IAGzC,OAAO;AACT;;;;","sources":["packages/ui/primitives/src/index.ts","packages/ui/primitives/src/components/index.ts","packages/ui/primitives/src/components/wallet/index.ts","packages/ui/primitives/src/components/wallet/walletCard/index.ts","packages/ui/primitives/src/components/wallet/walletCard/walletCard.tsx","packages/ui/primitives/src/components/wallet/walletCard/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardAccount/index.ts","packages/ui/primitives/src/components/wallet/walletCardAccount/walletCardAccount.tsx","packages/ui/primitives/src/components/wallet/walletCardAccount/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardBalance/index.ts","packages/ui/primitives/src/components/wallet/walletCardBalance/walletCardBalance.tsx","packages/ui/primitives/src/components/wallet/walletCardBalance/styles.tsx","packages/ui/primitives/src/components/wallet/walletCardRow/index.ts","packages/ui/primitives/src/components/wallet/walletCardRow/walletCardRow.tsx","packages/ui/primitives/src/components/wallet/walletCardRow/styles.tsx","packages/ui/primitives/src/components/wallet/walletFallback/index.ts","packages/ui/primitives/src/components/wallet/walletFallback/walletFallback.tsx","packages/ui/primitives/src/components/wallet/walletFallback/styles.tsx"],"sourcesContent":["export * from './components'\n","export * from './wallet'\n","export * from './walletCard'\nexport * from './walletCardAccount'\nexport * from './walletCardBalance'\nexport * from './walletCardRow'\nexport * from './walletFallback'\n","export * from './walletCard'\n","import React, { FC } from 'react'\nimport { BlockProps } from '@lidofinance/lido-ui'\nimport { WalletCardStyle } from './styles'\n\nexport type WalletCardComponent = FC<BlockProps>\n\nexport const WalletCard: WalletCardComponent = (props) => {\n return <WalletCardStyle color=\"accent\" {...props} />\n}\n","import styled from 'styled-components'\nimport { Block } from '@lidofinance/lido-ui'\n\nexport const WalletCardStyle = styled(Block)`\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n\n margin-bottom: ${({ theme }) => -theme.borderRadiusesMap.xl}px;\n padding-bottom: ${({ theme }) => theme.borderRadiusesMap.xl + theme.spaceMap.xxl}px;\n\n ${({ theme }) => theme.mediaQueries.md} {\n padding-bottom: ${({ theme }) => theme.borderRadiusesMap.xl + theme.spaceMap.lg}px;\n }\n`\n","export * from './walletCardAccount'\n","import React, { FC } from 'react'\nimport { LidoComponentProps, IdenticonBadge, useBreakpoint } from '@lidofinance/lido-ui'\n\nimport { WalletCardAccountStyle } from './styles'\n\nexport type WalletCardAccountType = FC<\n LidoComponentProps<\n 'div',\n {\n account?: string | null\n onClickCb: (T: unknown) => unknown\n }\n >\n>\n\nexport const WalletCardAccount: WalletCardAccountType = (props) => {\n const { account, onClickCb, ...rest } = props\n\n const isMobile = useBreakpoint('md')\n const mobileSymbols = 3\n const desktopSymbols = 6\n const symbols = isMobile ? mobileSymbols : desktopSymbols\n\n return (\n <WalletCardAccountStyle {...rest}>\n <IdenticonBadge address={account ?? ''} symbols={symbols} onClick={onClickCb} color=\"accent\" />\n </WalletCardAccountStyle>\n )\n}\n","import styled from 'styled-components'\n\nexport const WalletCardAccountStyle = styled.div`\n align-self: stretch;\n display: flex;\n flex-basis: 50%;\n flex-grow: 1;\n flex-shrink: 1;\n overflow: hidden;\n align-items: center;\n justify-content: flex-end;\n margin-left: auto;\n\n & > * {\n cursor: pointer;\n }\n`\n","export * from './walletCardBalance'\n","import React, { FC, PropsWithChildren } from 'react'\nimport { LidoComponentProps, InlineLoader } from '@lidofinance/lido-ui'\n\nimport {\n WalletCardBalanceStyle,\n WalletCardTitleStyle,\n WalletCardValueStyle,\n WalletCardExtraStyle,\n WalletCardContentStyle,\n} from './styles'\n\nexport type WalletCardBalanceType = FC<\n PropsWithChildren<\n LidoComponentProps<\n 'div',\n {\n title: React.ReactNode\n value: React.ReactNode\n small?: boolean\n loading?: boolean\n extra?: React.ReactNode\n }\n >\n >\n>\n\nexport const WalletCardBalance: WalletCardBalanceType = (props) => {\n const { title, small = false, extra, loading = false, children, value, ...rest } = props\n\n const hasExtra = extra != null\n const hasChildren = children != null\n\n return (\n <WalletCardBalanceStyle {...rest}>\n <WalletCardTitleStyle>{title}</WalletCardTitleStyle>\n <WalletCardValueStyle $small={small}>{loading ? <InlineLoader /> : value}</WalletCardValueStyle>\n {hasExtra && <WalletCardExtraStyle>{loading ? <InlineLoader /> : extra}</WalletCardExtraStyle>}\n {hasChildren && <WalletCardContentStyle $hidden={loading}>{children}</WalletCardContentStyle>}\n </WalletCardBalanceStyle>\n )\n}\n","import styled from 'styled-components'\n\nexport const WalletCardBalanceStyle = styled.div`\n margin-right: 18px;\n flex-basis: 50%;\n flex-grow: 1;\n font-size: ${({ theme }) => theme.fontSizesMap.xxs}px;\n line-height: 1.6em;\n\n :last-child {\n margin-right: 0;\n }\n`\n\nexport const WalletCardTitleStyle = styled.div``\n\nexport const WalletCardValueStyle = styled.div<{ $small: boolean }>`\n margin-top: 2px;\n font-size: ${({ theme, $small }) => ($small ? theme.fontSizesMap.sm : theme.fontSizesMap.md)}px;\n line-height: 1.4em;\n font-weight: 800;\n white-space: nowrap;\n`\n\nexport const WalletCardExtraStyle = styled.div`\n margin-top: 2px;\n opacity: 0.5;\n`\n\nexport const WalletCardContentStyle = styled.div<{ $hidden: boolean }>`\n margin-top: 8px;\n opacity: ${({ $hidden }) => ($hidden ? 0 : 1)};\n pointer-events: ${({ $hidden }) => ($hidden ? 'none' : 'auto')};\n`\n","export * from './walletCardRow'\n","import { WalletCardRowStyle } from './styles'\n\nexport const WalletCardRow = WalletCardRowStyle\n","import styled from 'styled-components'\n\nexport const WalletCardRowStyle = styled.div`\n display: flex;\n margin: ${({ theme }) => theme.spaceMap.lg}px 0;\n\n &:first-child {\n margin-top: 0;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n`\n","export * from './walletFallback'\n","import React, { FC } from 'react'\nimport { BlockProps } from '@lidofinance/lido-ui'\nimport { FallbackWalletStyle } from './styles'\n\nexport type FallbackWalletComponent = FC<\n BlockProps & {\n error: string\n }\n>\n\nexport const WalletFallback: FallbackWalletComponent = ({ error, ...rest }) => {\n if (error) {\n return <FallbackWalletStyle {...rest}>{error}</FallbackWalletStyle>\n }\n\n return null\n}\n","import styled from 'styled-components'\n\nimport { WalletCard } from '../walletCard'\n\nexport const FallbackWalletStyle = styled(WalletCard)`\n text-align: center;\n background: var(--lido-color-error);\n background-image: none !important;\n`\n"],"names":[],"version":3,"file":"index.mjs.map"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "UI primitives (client-side: components, constants, hooks)",
|
|
4
4
|
"repository": "git@github.com:lidofinance/warehouse.git",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.31.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"styled-components": "^5.3.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@lidofinance/config-prettier": "~0.
|
|
30
|
+
"@lidofinance/config-prettier": "~0.31.0",
|
|
31
31
|
"@lidofinance/lido-ui": "^3.7.3",
|
|
32
32
|
"@storybook/react": "^7.0.7",
|
|
33
33
|
"@types/react": "^18.0.25",
|