@lidofinance/lido-ui 3.4.1 → 3.6.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/cjs/addressBadge/AddressBadge.js +24 -0
- package/dist/cjs/addressBadge/AddressBadge.js.map +1 -0
- package/dist/cjs/addressBadge/AddressBadgeStyles.js +26 -0
- package/dist/cjs/addressBadge/AddressBadgeStyles.js.map +1 -0
- package/dist/cjs/addressBadge/types.js +6 -0
- package/dist/cjs/addressBadge/types.js.map +1 -0
- package/dist/cjs/section/Section.js +21 -0
- package/dist/cjs/section/Section.js.map +1 -0
- package/dist/cjs/section/SectionStyles.js +54 -0
- package/dist/cjs/section/SectionStyles.js.map +1 -0
- package/dist/cjs/section/types.js +8 -0
- package/dist/cjs/section/types.js.map +1 -0
- package/dist/esm/addressBadge/AddressBadge.js +15 -0
- package/dist/esm/addressBadge/AddressBadge.js.map +1 -0
- package/dist/esm/addressBadge/AddressBadgeStyles.js +17 -0
- package/dist/esm/addressBadge/AddressBadgeStyles.js.map +1 -0
- package/dist/esm/addressBadge/types.js +3 -0
- package/dist/esm/addressBadge/types.js.map +1 -0
- package/dist/esm/section/Section.js +12 -0
- package/dist/esm/section/Section.js.map +1 -0
- package/dist/esm/section/SectionStyles.js +37 -0
- package/dist/esm/section/SectionStyles.js.map +1 -0
- package/dist/esm/section/types.js +3 -0
- package/dist/esm/section/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>_default
|
|
8
|
+
});
|
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _hooks = require("../hooks/index");
|
|
12
|
+
const _addressBadgeStyles = require("./AddressBadgeStyles");
|
|
13
|
+
function AddressBadge(props, ref) {
|
|
14
|
+
const { address , symbolsMobile =3 , symbolsDesktop =6 } = props;
|
|
15
|
+
const isMobile = (0, _hooks.useBreakpoint)('md');
|
|
16
|
+
return /*#__PURE__*/ _react.default.createElement(_addressBadgeStyles.AddressBadgeStyle, {
|
|
17
|
+
symbols: isMobile ? symbolsMobile : symbolsDesktop,
|
|
18
|
+
address: address !== null && address !== void 0 ? address : '',
|
|
19
|
+
ref: ref
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const _default = /*#__PURE__*/ (0, _react.forwardRef)(AddressBadge);
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=AddressBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/AddressBadge.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef } from 'react'\nimport { useBreakpoint } from '@lidofinance/hooks'\nimport { AddressBadgeStyle } from './AddressBadgeStyles'\nimport { AddressBadgeProps } from './types'\n\nfunction AddressBadge(\n props: AddressBadgeProps,\n ref?: ForwardedRef<HTMLDivElement>\n) {\n const { address, symbolsMobile = 3, symbolsDesktop = 6 } = props\n const isMobile = useBreakpoint('md')\n\n return (\n <AddressBadgeStyle\n symbols={isMobile ? symbolsMobile : symbolsDesktop}\n address={address ?? ''}\n ref={ref}\n />\n )\n}\n\nexport default forwardRef(AddressBadge)\n"],"names":["AddressBadge","props","ref","address","symbolsMobile","symbolsDesktop","isMobile","useBreakpoint","AddressBadgeStyle","symbols","forwardRef"],"mappings":"AAAA;;;;+BAqBA,SAAuC;;aAAvC,QAAuC;;;6DArBS,OAAO;uBACzB,gBAAoB;oCAChB,sBAAsB;AAGxD,SAASA,YAAY,CACnBC,KAAwB,EACxBC,GAAkC,EAClC;IACA,MAAM,EAAEC,OAAO,CAAA,EAAEC,aAAa,EAAG,CAAC,CAAA,EAAEC,cAAc,EAAG,CAAC,CAAA,EAAE,GAAGJ,KAAK;IAChE,MAAMK,QAAQ,GAAGC,IAAAA,MAAa,cAAA,EAAC,IAAI,CAAC;IAEpC,qBACE,6BAACC,mBAAiB,kBAAA;QAChBC,OAAO,EAAEH,QAAQ,GAAGF,aAAa,GAAGC,cAAc;QAClDF,OAAO,EAAEA,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE;QACtBD,GAAG,EAAEA,GAAG;MACR,CACH;AACH,CAAC;MAED,QAAuC,iBAAxBQ,IAAAA,MAAU,WAAA,EAACV,YAAY,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AddressBadgeStyle", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>AddressBadgeStyle
|
|
8
|
+
});
|
|
9
|
+
const _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
|
10
|
+
const _identicon = require("../identicon/index");
|
|
11
|
+
const _styledComponents = /*#__PURE__*/ _interopRequireDefault(require("styled-components"));
|
|
12
|
+
const AddressBadgeStyle = (0, _styledComponents.default)(_identicon.IdenticonBadge)`
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
& > * {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
}
|
|
19
|
+
& > :first-child {
|
|
20
|
+
flex-shrink: 1;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=AddressBadgeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/AddressBadgeStyles.tsx"],"sourcesContent":["import { IdenticonBadge } from '@lidofinance/identicon'\nimport styled from 'styled-components'\n\nexport const AddressBadgeStyle = styled(IdenticonBadge)`\n max-width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n & > * {\n flex-shrink: 0;\n }\n & > :first-child {\n flex-shrink: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`\n"],"names":["AddressBadgeStyle","styled","IdenticonBadge"],"mappings":"AAAA;;;;+BAGaA,mBAAiB;;aAAjBA,iBAAiB;;;2BAHC,oBAAwB;uEACpC,mBAAmB;AAE/B,MAAMA,iBAAiB,GAAGC,IAAAA,iBAAM,QAAA,EAACC,UAAc,eAAA,CAAC,CAAC;;;;;;;;;;;;AAYxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/types.ts"],"sourcesContent":["import { LidoComponentProps } from '@lidofinance/utils'\n\nexport type AddressBadgeProps = LidoComponentProps<\n 'div',\n {\n address?: string\n symbolsMobile?: number\n symbolsDesktop?: number\n }\n>\n"],"names":[],"mappings":"AAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>_default
|
|
8
|
+
});
|
|
9
|
+
const _extends = require("@swc/helpers/lib/_extends.js").default;
|
|
10
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
11
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
12
|
+
const _sectionStyles = require("./SectionStyles");
|
|
13
|
+
function Section(props, ref) {
|
|
14
|
+
const { title , headerDecorator , children , ...rest } = props;
|
|
15
|
+
return /*#__PURE__*/ _react.default.createElement(_sectionStyles.SectionStyle, _extends({}, rest, {
|
|
16
|
+
ref: ref
|
|
17
|
+
}), title && /*#__PURE__*/ _react.default.createElement(_sectionStyles.SectionHeaderStyle, null, /*#__PURE__*/ _react.default.createElement(_sectionStyles.SectionTitleStyle, null, title), headerDecorator && /*#__PURE__*/ _react.default.createElement(_sectionStyles.SectionHeaderDecoratorStyle, null, headerDecorator)), children);
|
|
18
|
+
}
|
|
19
|
+
const _default = /*#__PURE__*/ (0, _react.forwardRef)(Section);
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/Section.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef } from 'react'\nimport { SectionProps } from './types'\nimport {\n SectionStyle,\n SectionHeaderStyle,\n SectionTitleStyle,\n SectionHeaderDecoratorStyle,\n} from './SectionStyles'\n\nfunction Section(props: SectionProps, ref?: ForwardedRef<HTMLDivElement>) {\n const { title, headerDecorator, children, ...rest } = props\n\n return (\n <SectionStyle {...rest} ref={ref}>\n {title && (\n <SectionHeaderStyle>\n <SectionTitleStyle>{title}</SectionTitleStyle>\n {headerDecorator && (\n <SectionHeaderDecoratorStyle>\n {headerDecorator}\n </SectionHeaderDecoratorStyle>\n )}\n </SectionHeaderStyle>\n )}\n {children}\n </SectionStyle>\n )\n}\n\nexport default forwardRef(Section)\n"],"names":["Section","props","ref","title","headerDecorator","children","rest","SectionStyle","SectionHeaderStyle","SectionTitleStyle","SectionHeaderDecoratorStyle","forwardRef"],"mappings":"AAAA;;;;+BA6BA,SAAkC;;aAAlC,QAAkC;;;;6DA7Bc,OAAO;+BAOhD,iBAAiB;AAExB,SAASA,OAAO,CAACC,KAAmB,EAAEC,GAAkC,EAAE;IACxE,MAAM,EAAEC,KAAK,CAAA,EAAEC,eAAe,CAAA,EAAEC,QAAQ,CAAA,EAAE,GAAGC,IAAI,EAAE,GAAGL,KAAK;IAE3D,qBACE,6BAACM,cAAY,aAAA,eAAKD,IAAI;QAAEJ,GAAG,EAAEA,GAAG;QAC7BC,KAAK,kBACJ,6BAACK,cAAkB,mBAAA,sBACjB,6BAACC,cAAiB,kBAAA,QAAEN,KAAK,CAAqB,EAC7CC,eAAe,kBACd,6BAACM,cAA2B,4BAAA,QACzBN,eAAe,CACY,AAC/B,CACkB,AACtB,EACAC,QAAQ,CACI,CAChB;AACH,CAAC;MAED,QAAkC,iBAAnBM,IAAAA,MAAU,WAAA,EAACX,OAAO,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
SectionStyle: ()=>SectionStyle,
|
|
13
|
+
SectionHeaderStyle: ()=>SectionHeaderStyle,
|
|
14
|
+
SectionTitleStyle: ()=>SectionTitleStyle,
|
|
15
|
+
SectionHeaderDecoratorStyle: ()=>SectionHeaderDecoratorStyle
|
|
16
|
+
});
|
|
17
|
+
const _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
|
18
|
+
const _styledComponents = /*#__PURE__*/ _interopRequireDefault(require("styled-components"));
|
|
19
|
+
const SectionStyle = _styledComponents.default.section`
|
|
20
|
+
margin: ${(param)=>{
|
|
21
|
+
let { theme } = param;
|
|
22
|
+
return theme.spaceMap.xxl;
|
|
23
|
+
}}px 0;
|
|
24
|
+
`;
|
|
25
|
+
const SectionHeaderStyle = _styledComponents.default.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: flex-end;
|
|
28
|
+
margin-bottom: ${(param)=>{
|
|
29
|
+
let { theme } = param;
|
|
30
|
+
return theme.fontSizesMap.xxs;
|
|
31
|
+
}}px;
|
|
32
|
+
`;
|
|
33
|
+
const SectionTitleStyle = _styledComponents.default.h2`
|
|
34
|
+
margin-right: auto;
|
|
35
|
+
font-weight: 800;
|
|
36
|
+
font-size: ${(param)=>{
|
|
37
|
+
let { theme } = param;
|
|
38
|
+
return theme.fontSizesMap.md;
|
|
39
|
+
}}px;
|
|
40
|
+
line-height: 1.3em;
|
|
41
|
+
`;
|
|
42
|
+
const SectionHeaderDecoratorStyle = _styledComponents.default.div`
|
|
43
|
+
margin-left: ${(param)=>{
|
|
44
|
+
let { theme } = param;
|
|
45
|
+
return theme.spaceMap.lg;
|
|
46
|
+
}}px;
|
|
47
|
+
font-size: ${(param)=>{
|
|
48
|
+
let { theme } = param;
|
|
49
|
+
return theme.fontSizesMap.xxs;
|
|
50
|
+
}}px;
|
|
51
|
+
line-height: 1.5em;
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=SectionStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/SectionStyles.tsx"],"sourcesContent":["import styled from 'styled-components'\n\nexport const SectionStyle = styled.section`\n margin: ${({ theme }) => theme.spaceMap.xxl}px 0;\n`\n\nexport const SectionHeaderStyle = styled.div`\n display: flex;\n align-items: flex-end;\n margin-bottom: ${({ theme }) => theme.fontSizesMap.xxs}px;\n`\n\nexport const SectionTitleStyle = styled.h2`\n margin-right: auto;\n font-weight: 800;\n font-size: ${({ theme }) => theme.fontSizesMap.md}px;\n line-height: 1.3em;\n`\n\nexport const SectionHeaderDecoratorStyle = styled.div`\n margin-left: ${({ theme }) => theme.spaceMap.lg}px;\n font-size: ${({ theme }) => theme.fontSizesMap.xxs}px;\n line-height: 1.5em;\n`\n"],"names":["SectionStyle","SectionHeaderStyle","SectionTitleStyle","SectionHeaderDecoratorStyle","styled","section","theme","spaceMap","xxl","div","fontSizesMap","xxs","h2","md","lg"],"mappings":"AAAA;;;;;;;;;;;IAEaA,YAAY,MAAZA,YAAY;IAIZC,kBAAkB,MAAlBA,kBAAkB;IAMlBC,iBAAiB,MAAjBA,iBAAiB;IAOjBC,2BAA2B,MAA3BA,2BAA2B;;;uEAnBrB,mBAAmB;AAE/B,MAAMH,YAAY,GAAGI,iBAAM,QAAA,CAACC,OAAO,CAAC;UACjC,EAAE,SAAeC;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACC,QAAQ,CAACC,GAAG;AAAD,CAAC,CAAC;AAC9C,CAAC;AAEM,MAAMP,kBAAkB,GAAGG,iBAAM,QAAA,CAACK,GAAG,CAAC;;;iBAG5B,EAAE,SAAeH;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACI,YAAY,CAACC,GAAG;AAAD,CAAC,CAAC;AACzD,CAAC;AAEM,MAAMT,iBAAiB,GAAGE,iBAAM,QAAA,CAACQ,EAAE,CAAC;;;aAG9B,EAAE,SAAeN;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACI,YAAY,CAACG,EAAE;AAAD,CAAC,CAAC;;AAEpD,CAAC;AAEM,MAAMV,2BAA2B,GAAGC,iBAAM,QAAA,CAACK,GAAG,CAAC;eACvC,EAAE,SAAeH;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACC,QAAQ,CAACO,EAAE;AAAD,CAAC,CAAC;aACrC,EAAE,SAAeR;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACI,YAAY,CAACC,GAAG;AAAD,CAAC,CAAC;;AAErD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
|
6
|
+
const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/types.ts"],"sourcesContent":["import React from 'react'\nimport { LidoComponentProps } from '@lidofinance/utils'\n\nexport type SectionProps = LidoComponentProps<\n 'div',\n {\n title?: React.ReactNode\n headerDecorator?: React.ReactNode\n }\n>\n"],"names":[],"mappings":"AAAA;;;;;4DAAkB,OAAO"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { useBreakpoint } from "../hooks/index";
|
|
3
|
+
import { AddressBadgeStyle } from "./AddressBadgeStyles";
|
|
4
|
+
function AddressBadge(props, ref) {
|
|
5
|
+
const { address , symbolsMobile =3 , symbolsDesktop =6 } = props;
|
|
6
|
+
const isMobile = useBreakpoint('md');
|
|
7
|
+
return /*#__PURE__*/ React.createElement(AddressBadgeStyle, {
|
|
8
|
+
symbols: isMobile ? symbolsMobile : symbolsDesktop,
|
|
9
|
+
address: address !== null && address !== void 0 ? address : '',
|
|
10
|
+
ref: ref
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export default /*#__PURE__*/ forwardRef(AddressBadge);
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=AddressBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/AddressBadge.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef } from 'react'\nimport { useBreakpoint } from '@lidofinance/hooks'\nimport { AddressBadgeStyle } from './AddressBadgeStyles'\nimport { AddressBadgeProps } from './types'\n\nfunction AddressBadge(\n props: AddressBadgeProps,\n ref?: ForwardedRef<HTMLDivElement>\n) {\n const { address, symbolsMobile = 3, symbolsDesktop = 6 } = props\n const isMobile = useBreakpoint('md')\n\n return (\n <AddressBadgeStyle\n symbols={isMobile ? symbolsMobile : symbolsDesktop}\n address={address ?? ''}\n ref={ref}\n />\n )\n}\n\nexport default forwardRef(AddressBadge)\n"],"names":["React","forwardRef","useBreakpoint","AddressBadgeStyle","AddressBadge","props","ref","address","symbolsMobile","symbolsDesktop","isMobile","symbols"],"mappings":"AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO,CAAA;AACvD,SAASC,aAAa,QAAQ,gBAAoB,CAAA;AAClD,SAASC,iBAAiB,QAAQ,sBAAsB,CAAA;AAGxD,SAASC,YAAY,CACnBC,KAAwB,EACxBC,GAAkC,EAClC;IACA,MAAM,EAAEC,OAAO,CAAA,EAAEC,aAAa,EAAG,CAAC,CAAA,EAAEC,cAAc,EAAG,CAAC,CAAA,EAAE,GAAGJ,KAAK;IAChE,MAAMK,QAAQ,GAAGR,aAAa,CAAC,IAAI,CAAC;IAEpC,qBACE,oBAACC,iBAAiB;QAChBQ,OAAO,EAAED,QAAQ,GAAGF,aAAa,GAAGC,cAAc;QAClDF,OAAO,EAAEA,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE;QACtBD,GAAG,EAAEA,GAAG;MACR,CACH;AACH,CAAC;AAED,6BAAeL,UAAU,CAACG,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IdenticonBadge } from "../identicon/index";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
export const AddressBadgeStyle = styled(IdenticonBadge)`
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
& > * {
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
}
|
|
10
|
+
& > :first-child {
|
|
11
|
+
flex-shrink: 1;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=AddressBadgeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/AddressBadgeStyles.tsx"],"sourcesContent":["import { IdenticonBadge } from '@lidofinance/identicon'\nimport styled from 'styled-components'\n\nexport const AddressBadgeStyle = styled(IdenticonBadge)`\n max-width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n & > * {\n flex-shrink: 0;\n }\n & > :first-child {\n flex-shrink: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`\n"],"names":["IdenticonBadge","styled","AddressBadgeStyle"],"mappings":"AAAA,SAASA,cAAc,QAAQ,oBAAwB,CAAA;AACvD,OAAOC,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,MAAMC,iBAAiB,GAAGD,MAAM,CAACD,cAAc,CAAC,CAAC;;;;;;;;;;;;AAYxD,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/addressBadge/types.ts"],"sourcesContent":["import { LidoComponentProps } from '@lidofinance/utils'\n\nexport type AddressBadgeProps = LidoComponentProps<\n 'div',\n {\n address?: string\n symbolsMobile?: number\n symbolsDesktop?: number\n }\n>\n"],"names":[],"mappings":"AAAA,WASC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _extends from "@swc/helpers/src/_extends.mjs";
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import { SectionStyle, SectionHeaderStyle, SectionTitleStyle, SectionHeaderDecoratorStyle } from "./SectionStyles";
|
|
4
|
+
function Section(props, ref) {
|
|
5
|
+
const { title , headerDecorator , children , ...rest } = props;
|
|
6
|
+
return /*#__PURE__*/ React.createElement(SectionStyle, _extends({}, rest, {
|
|
7
|
+
ref: ref
|
|
8
|
+
}), title && /*#__PURE__*/ React.createElement(SectionHeaderStyle, null, /*#__PURE__*/ React.createElement(SectionTitleStyle, null, title), headerDecorator && /*#__PURE__*/ React.createElement(SectionHeaderDecoratorStyle, null, headerDecorator)), children);
|
|
9
|
+
}
|
|
10
|
+
export default /*#__PURE__*/ forwardRef(Section);
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/Section.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef } from 'react'\nimport { SectionProps } from './types'\nimport {\n SectionStyle,\n SectionHeaderStyle,\n SectionTitleStyle,\n SectionHeaderDecoratorStyle,\n} from './SectionStyles'\n\nfunction Section(props: SectionProps, ref?: ForwardedRef<HTMLDivElement>) {\n const { title, headerDecorator, children, ...rest } = props\n\n return (\n <SectionStyle {...rest} ref={ref}>\n {title && (\n <SectionHeaderStyle>\n <SectionTitleStyle>{title}</SectionTitleStyle>\n {headerDecorator && (\n <SectionHeaderDecoratorStyle>\n {headerDecorator}\n </SectionHeaderDecoratorStyle>\n )}\n </SectionHeaderStyle>\n )}\n {children}\n </SectionStyle>\n )\n}\n\nexport default forwardRef(Section)\n"],"names":["React","forwardRef","SectionStyle","SectionHeaderStyle","SectionTitleStyle","SectionHeaderDecoratorStyle","Section","props","ref","title","headerDecorator","children","rest"],"mappings":"AAAA;AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO,CAAA;AAEvD,SACEC,YAAY,EACZC,kBAAkB,EAClBC,iBAAiB,EACjBC,2BAA2B,QACtB,iBAAiB,CAAA;AAExB,SAASC,OAAO,CAACC,KAAmB,EAAEC,GAAkC,EAAE;IACxE,MAAM,EAAEC,KAAK,CAAA,EAAEC,eAAe,CAAA,EAAEC,QAAQ,CAAA,EAAE,GAAGC,IAAI,EAAE,GAAGL,KAAK;IAE3D,qBACE,oBAACL,YAAY,eAAKU,IAAI;QAAEJ,GAAG,EAAEA,GAAG;QAC7BC,KAAK,kBACJ,oBAACN,kBAAkB,sBACjB,oBAACC,iBAAiB,QAAEK,KAAK,CAAqB,EAC7CC,eAAe,kBACd,oBAACL,2BAA2B,QACzBK,eAAe,CACY,AAC/B,CACkB,AACtB,EACAC,QAAQ,CACI,CAChB;AACH,CAAC;AAED,6BAAeV,UAAU,CAACK,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
export const SectionStyle = styled.section`
|
|
3
|
+
margin: ${(param)=>{
|
|
4
|
+
let { theme } = param;
|
|
5
|
+
return theme.spaceMap.xxl;
|
|
6
|
+
}}px 0;
|
|
7
|
+
`;
|
|
8
|
+
export const SectionHeaderStyle = styled.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: flex-end;
|
|
11
|
+
margin-bottom: ${(param)=>{
|
|
12
|
+
let { theme } = param;
|
|
13
|
+
return theme.fontSizesMap.xxs;
|
|
14
|
+
}}px;
|
|
15
|
+
`;
|
|
16
|
+
export const SectionTitleStyle = styled.h2`
|
|
17
|
+
margin-right: auto;
|
|
18
|
+
font-weight: 800;
|
|
19
|
+
font-size: ${(param)=>{
|
|
20
|
+
let { theme } = param;
|
|
21
|
+
return theme.fontSizesMap.md;
|
|
22
|
+
}}px;
|
|
23
|
+
line-height: 1.3em;
|
|
24
|
+
`;
|
|
25
|
+
export const SectionHeaderDecoratorStyle = styled.div`
|
|
26
|
+
margin-left: ${(param)=>{
|
|
27
|
+
let { theme } = param;
|
|
28
|
+
return theme.spaceMap.lg;
|
|
29
|
+
}}px;
|
|
30
|
+
font-size: ${(param)=>{
|
|
31
|
+
let { theme } = param;
|
|
32
|
+
return theme.fontSizesMap.xxs;
|
|
33
|
+
}}px;
|
|
34
|
+
line-height: 1.5em;
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=SectionStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/SectionStyles.tsx"],"sourcesContent":["import styled from 'styled-components'\n\nexport const SectionStyle = styled.section`\n margin: ${({ theme }) => theme.spaceMap.xxl}px 0;\n`\n\nexport const SectionHeaderStyle = styled.div`\n display: flex;\n align-items: flex-end;\n margin-bottom: ${({ theme }) => theme.fontSizesMap.xxs}px;\n`\n\nexport const SectionTitleStyle = styled.h2`\n margin-right: auto;\n font-weight: 800;\n font-size: ${({ theme }) => theme.fontSizesMap.md}px;\n line-height: 1.3em;\n`\n\nexport const SectionHeaderDecoratorStyle = styled.div`\n margin-left: ${({ theme }) => theme.spaceMap.lg}px;\n font-size: ${({ theme }) => theme.fontSizesMap.xxs}px;\n line-height: 1.5em;\n`\n"],"names":["styled","SectionStyle","section","theme","spaceMap","xxl","SectionHeaderStyle","div","fontSizesMap","xxs","SectionTitleStyle","h2","md","SectionHeaderDecoratorStyle","lg"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB,CAAA;AAEtC,OAAO,MAAMC,YAAY,GAAGD,MAAM,CAACE,OAAO,CAAC;UACjC,EAAE,SAAeC;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACC,QAAQ,CAACC,GAAG;AAAD,CAAC,CAAC;AAC9C,CAAC,CAAA;AAED,OAAO,MAAMC,kBAAkB,GAAGN,MAAM,CAACO,GAAG,CAAC;;;iBAG5B,EAAE,SAAeJ;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACK,YAAY,CAACC,GAAG;AAAD,CAAC,CAAC;AACzD,CAAC,CAAA;AAED,OAAO,MAAMC,iBAAiB,GAAGV,MAAM,CAACW,EAAE,CAAC;;;aAG9B,EAAE,SAAeR;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACK,YAAY,CAACI,EAAE;AAAD,CAAC,CAAC;;AAEpD,CAAC,CAAA;AAED,OAAO,MAAMC,2BAA2B,GAAGb,MAAM,CAACO,GAAG,CAAC;eACvC,EAAE,SAAeJ;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACC,QAAQ,CAACU,EAAE;AAAD,CAAC,CAAC;aACrC,EAAE,SAAeX;QAAd,EAAEA,KAAK,CAAA,EAAE;WAAKA,KAAK,CAACK,YAAY,CAACC,GAAG;AAAD,CAAC,CAAC;;AAErD,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../packages/section/types.ts"],"sourcesContent":["import React from 'react'\nimport { LidoComponentProps } from '@lidofinance/utils'\n\nexport type SectionProps = LidoComponentProps<\n 'div',\n {\n title?: React.ReactNode\n headerDecorator?: React.ReactNode\n }\n>\n"],"names":["React"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO,CAAA"}
|