@bosonprotocol/react-kit 0.33.0-alpha.2 → 0.33.0-alpha.3
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/components/ui/Grid.d.ts.map +1 -1
- package/dist/cjs/components/ui/Grid.js +22 -21
- package/dist/cjs/components/ui/Grid.js.map +1 -1
- package/dist/cjs/components/ui/Typography.d.ts.map +1 -1
- package/dist/cjs/components/ui/Typography.js +29 -28
- package/dist/cjs/components/ui/Typography.js.map +1 -1
- package/dist/cjs/components/ui/common.d.ts +2 -0
- package/dist/cjs/components/ui/common.d.ts.map +1 -0
- package/dist/cjs/components/ui/common.js +6 -0
- package/dist/cjs/components/ui/common.js.map +1 -0
- package/dist/esm/components/ui/Grid.d.ts.map +1 -1
- package/dist/esm/components/ui/Grid.js +22 -21
- package/dist/esm/components/ui/Grid.js.map +1 -1
- package/dist/esm/components/ui/Typography.d.ts.map +1 -1
- package/dist/esm/components/ui/Typography.js +29 -28
- package/dist/esm/components/ui/Typography.js.map +1 -1
- package/dist/esm/components/ui/common.d.ts +2 -0
- package/dist/esm/components/ui/common.d.ts.map +1 -0
- package/dist/esm/components/ui/common.js +2 -0
- package/dist/esm/components/ui/common.js.map +1 -0
- package/package.json +4 -4
- package/src/components/ui/Grid.tsx +33 -21
- package/src/components/ui/Typography.tsx +39 -29
- package/src/components/ui/common.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACtE,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACtE,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;CAsBP,CAAC;AACX,KAAK,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,OAAO,WAAW,CAAC,CAAC;AA0C3D,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;CACxC,GAAG,KAAK,GACP,cAAc,CAAC,OAAO,CAAC,CAAC;AAE1B,eAAO,MAAM,IAAI;eAPJ,MAAM,SAAS;;YAElB,aAAa,GAAG,SAAS;;gFAuBlC,CAAC"}
|
|
@@ -41,6 +41,7 @@ exports.Grid = void 0;
|
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
43
43
|
const getTransientCustomProps_1 = require("./getTransientCustomProps");
|
|
44
|
+
const common_1 = require("./common");
|
|
44
45
|
const pickedProps = {
|
|
45
46
|
alignItems: true,
|
|
46
47
|
flexBasis: true,
|
|
@@ -65,29 +66,29 @@ const pickedProps = {
|
|
|
65
66
|
height: true
|
|
66
67
|
};
|
|
67
68
|
const Container = styled_components_1.default.div `
|
|
68
|
-
|
|
69
|
-
height: ${({ $height }) => $height
|
|
69
|
+
${({ $width }) => ((0, common_1.isDefined)($width) ? `width:${$width};` : "width: 100%;")}
|
|
70
|
+
height: ${({ $height }) => ((0, common_1.isDefined)($height) ? $height : "initial")};
|
|
70
71
|
display: flex;
|
|
71
|
-
align-items: ${({ $alignItems }) => $alignItems
|
|
72
|
-
flex-basis: ${({ $flexBasis }) => $flexBasis
|
|
73
|
-
flex-direction: ${({ $flexDirection }) => $flexDirection
|
|
74
|
-
flex-grow: ${({ $flexGrow }) => $flexGrow
|
|
75
|
-
flex-shrink: ${({ $flexShrink }) => $flexShrink
|
|
76
|
-
justify-content: ${({ $justifyContent }) => $justifyContent
|
|
72
|
+
align-items: ${({ $alignItems }) => (0, common_1.isDefined)($alignItems) ? $alignItems : "center"};
|
|
73
|
+
flex-basis: ${({ $flexBasis }) => (0, common_1.isDefined)($flexBasis) ? $flexBasis : "auto"};
|
|
74
|
+
flex-direction: ${({ $flexDirection }) => (0, common_1.isDefined)($flexDirection) ? $flexDirection : "row"};
|
|
75
|
+
flex-grow: ${({ $flexGrow }) => (0, common_1.isDefined)($flexGrow) ? $flexGrow : "initial"};
|
|
76
|
+
flex-shrink: ${({ $flexShrink }) => (0, common_1.isDefined)($flexShrink) ? $flexShrink : "initial"};
|
|
77
|
+
justify-content: ${({ $justifyContent }) => (0, common_1.isDefined)($justifyContent) ? $justifyContent : "space-between"};
|
|
77
78
|
|
|
78
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
79
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
80
|
-
${({ $columnGap }) => ($columnGap ? `column-gap:${$columnGap};` : ""
|
|
81
|
-
${({ $gap }) => ($gap ? `gap:${$gap};` : "")}
|
|
82
|
-
${({ $flex }) => ($flex ? `> * { flex: ${$flex}; }` : "")}
|
|
83
|
-
${({ $padding }) => ($padding ? `padding:${$padding};` : "")}
|
|
84
|
-
${({ $margin }) => ($margin ? `margin:${$margin};` : "")}
|
|
85
|
-
${({ $marginTop }) => ($marginTop ? `margin-top:${$marginTop};` : ""
|
|
86
|
-
${({ $marginRight }) => ($marginRight ? `margin-right:${$marginRight};` : ""
|
|
87
|
-
${({ $marginBottom }) => $marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
88
|
-
${({ $marginLeft }) => ($marginLeft ? `margin-left:${$marginLeft};` : ""
|
|
89
|
-
${({ $alignSelf }) => ($alignSelf ? `align-self:${$alignSelf};` : ""
|
|
90
|
-
${({ $justifySelf }) => ($justifySelf ? `justify-self:${$justifySelf};` : ""
|
|
79
|
+
${({ $flexWrap }) => ((0, common_1.isDefined)($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
80
|
+
${({ $rowGap }) => ((0, common_1.isDefined)($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
81
|
+
${({ $columnGap }) => (0, common_1.isDefined)($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
82
|
+
${({ $gap }) => ((0, common_1.isDefined)($gap) ? `gap:${$gap};` : "")}
|
|
83
|
+
${({ $flex }) => ((0, common_1.isDefined)($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
84
|
+
${({ $padding }) => ((0, common_1.isDefined)($padding) ? `padding:${$padding};` : "")}
|
|
85
|
+
${({ $margin }) => ((0, common_1.isDefined)($margin) ? `margin:${$margin};` : "")}
|
|
86
|
+
${({ $marginTop }) => (0, common_1.isDefined)($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
87
|
+
${({ $marginRight }) => (0, common_1.isDefined)($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
88
|
+
${({ $marginBottom }) => (0, common_1.isDefined)($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
89
|
+
${({ $marginLeft }) => (0, common_1.isDefined)($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
90
|
+
${({ $alignSelf }) => (0, common_1.isDefined)($alignSelf) ? `align-self:${$alignSelf};` : ""}
|
|
91
|
+
${({ $justifySelf }) => (0, common_1.isDefined)($justifySelf) ? `justify-self:${$justifySelf};` : ""}
|
|
91
92
|
`;
|
|
92
93
|
exports.Grid = (0, react_1.forwardRef)((_a, ref) => {
|
|
93
94
|
var { children, as, style } = _a, props = __rest(_a, ["children", "as", "style"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,0EAA0D;AAC1D,uEAAoE;AACpE,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACJ,CAAC;AAKX,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAgB;
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,0EAA0D;AAC1D,uEAAoE;AACpE,qCAAqC;AACrC,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EA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AAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAC1D,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAC1D,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BP,CAAC;AACX,KAAK,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,OAAO,WAAW,CAAC,CAAC;AAsDlE,MAAM,MAAM,eAAe,GAAG,YAAY,GACxC,cAAc,CAAC,OAAO,CAAC,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,eAAO,MAAM,UAAU;eAPR,MAAM,GAAG,MAAM,SAAS;;;qBAGnB,IAAI;;wCA2BvB,CAAC"}
|
|
@@ -41,6 +41,7 @@ exports.Typography = void 0;
|
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
43
43
|
const getTransientCustomProps_1 = require("./getTransientCustomProps");
|
|
44
|
+
const common_1 = require("./common");
|
|
44
45
|
const pickedProps = {
|
|
45
46
|
alignItems: true,
|
|
46
47
|
flexBasis: true,
|
|
@@ -73,36 +74,36 @@ const pickedProps = {
|
|
|
73
74
|
};
|
|
74
75
|
const Wrapper = styled_components_1.default.div `
|
|
75
76
|
display: flex;
|
|
76
|
-
${({ $display }) => ($display ? `display:${$display};` : "")}
|
|
77
|
-
${({ $alignItems }) => $alignItems && `align-items: ${$alignItems}`};
|
|
78
|
-
${({ $flexBasis }) => $flexBasis && `flex-basis: ${$flexBasis}`};
|
|
79
|
-
${({ $flexDirection }) => $flexDirection && `flex-direction: ${$flexDirection}`};
|
|
80
|
-
${({ $flexGrow }) => $flexGrow && `flex-grow: ${$flexGrow}`};
|
|
81
|
-
${({ $flexShrink }) => $flexShrink && `flex-shrink: ${$flexShrink}`};
|
|
82
|
-
${({ $justifyContent }) => $justifyContent && `justify-content: ${$justifyContent}`};
|
|
83
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
84
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
85
|
-
${({ $columnGap }) => ($columnGap ? `column-gap:${$columnGap};` : ""
|
|
86
|
-
${({ $gap }) => ($gap ? `gap:${$gap};` : "")}
|
|
87
|
-
${({ $flex }) => ($flex ? `> * { flex: ${$flex}; }` : "")}
|
|
88
|
-
${({ $padding }) => ($padding ? `padding:${$padding};` : "")}
|
|
89
|
-
${({ $margin }) => ($margin ? `margin:${$margin};` : "")}
|
|
90
|
-
${({ $marginTop }) => ($marginTop ? `margin-top:${$marginTop};` : ""
|
|
91
|
-
${({ $marginRight }) => ($marginRight ? `margin-right:${$marginRight};` : ""
|
|
92
|
-
${({ $marginBottom }) => $marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
93
|
-
${({ $marginLeft }) => ($marginLeft ? `margin-left:${$marginLeft};` : ""
|
|
77
|
+
${({ $display }) => ((0, common_1.isDefined)($display) ? `display:${$display};` : "")}
|
|
78
|
+
${({ $alignItems }) => (0, common_1.isDefined)($alignItems) && `align-items: ${$alignItems}`};
|
|
79
|
+
${({ $flexBasis }) => (0, common_1.isDefined)($flexBasis) && `flex-basis: ${$flexBasis}`};
|
|
80
|
+
${({ $flexDirection }) => (0, common_1.isDefined)($flexDirection) && `flex-direction: ${$flexDirection}`};
|
|
81
|
+
${({ $flexGrow }) => (0, common_1.isDefined)($flexGrow) && `flex-grow: ${$flexGrow}`};
|
|
82
|
+
${({ $flexShrink }) => (0, common_1.isDefined)($flexShrink) && `flex-shrink: ${$flexShrink}`};
|
|
83
|
+
${({ $justifyContent }) => (0, common_1.isDefined)($justifyContent) && `justify-content: ${$justifyContent}`};
|
|
84
|
+
${({ $flexWrap }) => ((0, common_1.isDefined)($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
85
|
+
${({ $rowGap }) => ((0, common_1.isDefined)($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
86
|
+
${({ $columnGap }) => (0, common_1.isDefined)($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
87
|
+
${({ $gap }) => ((0, common_1.isDefined)($gap) ? `gap:${$gap};` : "")}
|
|
88
|
+
${({ $flex }) => ((0, common_1.isDefined)($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
89
|
+
${({ $padding }) => ((0, common_1.isDefined)($padding) ? `padding:${$padding};` : "")}
|
|
90
|
+
${({ $margin }) => ((0, common_1.isDefined)($margin) ? `margin:${$margin};` : "")}
|
|
91
|
+
${({ $marginTop }) => (0, common_1.isDefined)($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
92
|
+
${({ $marginRight }) => (0, common_1.isDefined)($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
93
|
+
${({ $marginBottom }) => (0, common_1.isDefined)($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
94
|
+
${({ $marginLeft }) => (0, common_1.isDefined)($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
94
95
|
|
|
95
96
|
|
|
96
|
-
${({ $fontSize }) => ($fontSize ? `font-size:${$fontSize};` : "")}
|
|
97
|
-
${({ $fontWeight }) => ($fontWeight ? `font-weight:${$fontWeight};` : ""
|
|
98
|
-
${({ $lineHeight }) => ($lineHeight ? `line-height:${$lineHeight};` : ""
|
|
99
|
-
${({ $color }) => ($color ? `color:${$color};` : "")}
|
|
100
|
-
${({ $background }) => ($background ? `background:${$background};` : ""
|
|
101
|
-
${({ $cursor }) => ($cursor ? `cursor:${$cursor};` : "")}
|
|
102
|
-
${({ $letterSpacing }) => $letterSpacing ? `letter-spacing:${$letterSpacing};` : ""}
|
|
103
|
-
${({ $textAlign }) => ($textAlign ? `text-align:${$textAlign};` : ""
|
|
104
|
-
${({ $opacity }) => ($opacity ? `opacity:${$opacity};` : "")}
|
|
105
|
-
${({ $width }) => ($width ? `width:${$width};` : "")}
|
|
97
|
+
${({ $fontSize }) => ((0, common_1.isDefined)($fontSize) ? `font-size:${$fontSize};` : "")}
|
|
98
|
+
${({ $fontWeight }) => (0, common_1.isDefined)($fontWeight) ? `font-weight:${$fontWeight};` : ""}
|
|
99
|
+
${({ $lineHeight }) => (0, common_1.isDefined)($lineHeight) ? `line-height:${$lineHeight};` : ""}
|
|
100
|
+
${({ $color }) => ((0, common_1.isDefined)($color) ? `color:${$color};` : "")}
|
|
101
|
+
${({ $background }) => (0, common_1.isDefined)($background) ? `background:${$background};` : ""}
|
|
102
|
+
${({ $cursor }) => ((0, common_1.isDefined)($cursor) ? `cursor:${$cursor};` : "")}
|
|
103
|
+
${({ $letterSpacing }) => (0, common_1.isDefined)($letterSpacing) ? `letter-spacing:${$letterSpacing};` : ""}
|
|
104
|
+
${({ $textAlign }) => (0, common_1.isDefined)($textAlign) ? `text-align:${$textAlign};` : ""}
|
|
105
|
+
${({ $opacity }) => ((0, common_1.isDefined)($opacity) ? `opacity:${$opacity};` : "")}
|
|
106
|
+
${({ $width }) => ((0, common_1.isDefined)($width) ? `width:${$width};` : "")}
|
|
106
107
|
`;
|
|
107
108
|
exports.Typography = (0, react_1.forwardRef)((_a, ref) => {
|
|
108
109
|
var { tag = "div", children, style = {}, className, onClick } = _a, props = __rest(_a, ["tag", "children", "style", "className", "onClick"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0D;AAC1D,0EAA0D;AAC1D,uEAAoE;
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0D;AAC1D,0EAA0D;AAC1D,uEAAoE;AACpE,qCAAqC;AAErC,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;CACL,CAAC;AAOX,MAAM,OAAO,GAAG,2BAAM,CAAC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,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;MACrE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;CAClE,CAAC;AAWW,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EAAmE,EACnE,GAAG,EACH,EAAE;QAFF,EAAE,GAAG,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,EAAE,OAAO,OAAY,EAAP,KAAK,cAAjE,oDAAmE,CAAF;IAGjE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAA,iDAAuB,EAG5D,KAAK,EAAE,WAAW,CAAC,CAAC;IACtB,OAAO,CACL,8BAAC,OAAO,kBACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,IAChB,cAAc,EACd,UAAU,IACd,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,GAAG,EACP,GAAG,EAAE,GAAG,KAEP,QAAQ,CACD,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,UAAW,OAAO,YACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/components/ui/common.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CAC1C,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAD3B,QAAA,SAAS,aACkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACtE,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACtE,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;CAsBP,CAAC;AACX,KAAK,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,OAAO,WAAW,CAAC,CAAC;AA0C3D,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;CACxC,GAAG,KAAK,GACP,cAAc,CAAC,OAAO,CAAC,CAAC;AAE1B,eAAO,MAAM,IAAI;eAPJ,MAAM,SAAS;;YAElB,aAAa,GAAG,SAAS;;gFAuBlC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { getTransientCustomProps } from "./getTransientCustomProps";
|
|
4
|
+
import { isDefined } from "./common";
|
|
4
5
|
const pickedProps = {
|
|
5
6
|
alignItems: true,
|
|
6
7
|
flexBasis: true,
|
|
@@ -25,29 +26,29 @@ const pickedProps = {
|
|
|
25
26
|
height: true
|
|
26
27
|
};
|
|
27
28
|
const Container = styled.div `
|
|
28
|
-
|
|
29
|
-
height: ${({ $height }) => $height
|
|
29
|
+
${({ $width }) => (isDefined($width) ? `width:${$width};` : "width: 100%;")}
|
|
30
|
+
height: ${({ $height }) => (isDefined($height) ? $height : "initial")};
|
|
30
31
|
display: flex;
|
|
31
|
-
align-items: ${({ $alignItems }) => $alignItems
|
|
32
|
-
flex-basis: ${({ $flexBasis }) => $flexBasis
|
|
33
|
-
flex-direction: ${({ $flexDirection }) => $flexDirection
|
|
34
|
-
flex-grow: ${({ $flexGrow }) => $flexGrow
|
|
35
|
-
flex-shrink: ${({ $flexShrink }) => $flexShrink
|
|
36
|
-
justify-content: ${({ $justifyContent }) => $justifyContent
|
|
32
|
+
align-items: ${({ $alignItems }) => isDefined($alignItems) ? $alignItems : "center"};
|
|
33
|
+
flex-basis: ${({ $flexBasis }) => isDefined($flexBasis) ? $flexBasis : "auto"};
|
|
34
|
+
flex-direction: ${({ $flexDirection }) => isDefined($flexDirection) ? $flexDirection : "row"};
|
|
35
|
+
flex-grow: ${({ $flexGrow }) => isDefined($flexGrow) ? $flexGrow : "initial"};
|
|
36
|
+
flex-shrink: ${({ $flexShrink }) => isDefined($flexShrink) ? $flexShrink : "initial"};
|
|
37
|
+
justify-content: ${({ $justifyContent }) => isDefined($justifyContent) ? $justifyContent : "space-between"};
|
|
37
38
|
|
|
38
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
39
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
40
|
-
${({ $columnGap }) => ($columnGap ? `column-gap:${$columnGap};` : ""
|
|
41
|
-
${({ $gap }) => ($gap ? `gap:${$gap};` : "")}
|
|
42
|
-
${({ $flex }) => ($flex ? `> * { flex: ${$flex}; }` : "")}
|
|
43
|
-
${({ $padding }) => ($padding ? `padding:${$padding};` : "")}
|
|
44
|
-
${({ $margin }) => ($margin ? `margin:${$margin};` : "")}
|
|
45
|
-
${({ $marginTop }) => ($marginTop ? `margin-top:${$marginTop};` : ""
|
|
46
|
-
${({ $marginRight }) => ($marginRight ? `margin-right:${$marginRight};` : ""
|
|
47
|
-
${({ $marginBottom }) => $marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
48
|
-
${({ $marginLeft }) => ($marginLeft ? `margin-left:${$marginLeft};` : ""
|
|
49
|
-
${({ $alignSelf }) => ($alignSelf ? `align-self:${$alignSelf};` : ""
|
|
50
|
-
${({ $justifySelf }) => ($justifySelf ? `justify-self:${$justifySelf};` : ""
|
|
39
|
+
${({ $flexWrap }) => (isDefined($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
40
|
+
${({ $rowGap }) => (isDefined($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
41
|
+
${({ $columnGap }) => isDefined($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
42
|
+
${({ $gap }) => (isDefined($gap) ? `gap:${$gap};` : "")}
|
|
43
|
+
${({ $flex }) => (isDefined($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
44
|
+
${({ $padding }) => (isDefined($padding) ? `padding:${$padding};` : "")}
|
|
45
|
+
${({ $margin }) => (isDefined($margin) ? `margin:${$margin};` : "")}
|
|
46
|
+
${({ $marginTop }) => isDefined($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
47
|
+
${({ $marginRight }) => isDefined($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
48
|
+
${({ $marginBottom }) => isDefined($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
49
|
+
${({ $marginLeft }) => isDefined($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
50
|
+
${({ $alignSelf }) => isDefined($alignSelf) ? `align-self:${$alignSelf};` : ""}
|
|
51
|
+
${({ $justifySelf }) => isDefined($justifySelf) ? `justify-self:${$justifySelf};` : ""}
|
|
51
52
|
`;
|
|
52
53
|
export const Grid = forwardRef(({ children, as, style, ...props }, ref) => {
|
|
53
54
|
const { transientProps, otherProps } = getTransientCustomProps(props, pickedProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,UAAU,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,MAAyB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;CACJ,CAAC;AAKX,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAgB;
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../../src/components/ui/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,UAAU,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,MAAyB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACp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AAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAC1D,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAC1D,OAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BP,CAAC;AACX,KAAK,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,OAAO,WAAW,CAAC,CAAC;AAsDlE,MAAM,MAAM,eAAe,GAAG,YAAY,GACxC,cAAc,CAAC,OAAO,CAAC,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,eAAO,MAAM,UAAU;eAPR,MAAM,GAAG,MAAM,SAAS;;;qBAGnB,IAAI;;wCA2BvB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { getTransientCustomProps } from "./getTransientCustomProps";
|
|
4
|
+
import { isDefined } from "./common";
|
|
4
5
|
const pickedProps = {
|
|
5
6
|
alignItems: true,
|
|
6
7
|
flexBasis: true,
|
|
@@ -33,36 +34,36 @@ const pickedProps = {
|
|
|
33
34
|
};
|
|
34
35
|
const Wrapper = styled.div `
|
|
35
36
|
display: flex;
|
|
36
|
-
${({ $display }) => ($display ? `display:${$display};` : "")}
|
|
37
|
-
${({ $alignItems }) => $alignItems && `align-items: ${$alignItems}`};
|
|
38
|
-
${({ $flexBasis }) => $flexBasis && `flex-basis: ${$flexBasis}`};
|
|
39
|
-
${({ $flexDirection }) => $flexDirection && `flex-direction: ${$flexDirection}`};
|
|
40
|
-
${({ $flexGrow }) => $flexGrow && `flex-grow: ${$flexGrow}`};
|
|
41
|
-
${({ $flexShrink }) => $flexShrink && `flex-shrink: ${$flexShrink}`};
|
|
42
|
-
${({ $justifyContent }) => $justifyContent && `justify-content: ${$justifyContent}`};
|
|
43
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
44
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
45
|
-
${({ $columnGap }) => ($columnGap ? `column-gap:${$columnGap};` : ""
|
|
46
|
-
${({ $gap }) => ($gap ? `gap:${$gap};` : "")}
|
|
47
|
-
${({ $flex }) => ($flex ? `> * { flex: ${$flex}; }` : "")}
|
|
48
|
-
${({ $padding }) => ($padding ? `padding:${$padding};` : "")}
|
|
49
|
-
${({ $margin }) => ($margin ? `margin:${$margin};` : "")}
|
|
50
|
-
${({ $marginTop }) => ($marginTop ? `margin-top:${$marginTop};` : ""
|
|
51
|
-
${({ $marginRight }) => ($marginRight ? `margin-right:${$marginRight};` : ""
|
|
52
|
-
${({ $marginBottom }) => $marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
53
|
-
${({ $marginLeft }) => ($marginLeft ? `margin-left:${$marginLeft};` : ""
|
|
37
|
+
${({ $display }) => (isDefined($display) ? `display:${$display};` : "")}
|
|
38
|
+
${({ $alignItems }) => isDefined($alignItems) && `align-items: ${$alignItems}`};
|
|
39
|
+
${({ $flexBasis }) => isDefined($flexBasis) && `flex-basis: ${$flexBasis}`};
|
|
40
|
+
${({ $flexDirection }) => isDefined($flexDirection) && `flex-direction: ${$flexDirection}`};
|
|
41
|
+
${({ $flexGrow }) => isDefined($flexGrow) && `flex-grow: ${$flexGrow}`};
|
|
42
|
+
${({ $flexShrink }) => isDefined($flexShrink) && `flex-shrink: ${$flexShrink}`};
|
|
43
|
+
${({ $justifyContent }) => isDefined($justifyContent) && `justify-content: ${$justifyContent}`};
|
|
44
|
+
${({ $flexWrap }) => (isDefined($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
45
|
+
${({ $rowGap }) => (isDefined($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
46
|
+
${({ $columnGap }) => isDefined($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
47
|
+
${({ $gap }) => (isDefined($gap) ? `gap:${$gap};` : "")}
|
|
48
|
+
${({ $flex }) => (isDefined($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
49
|
+
${({ $padding }) => (isDefined($padding) ? `padding:${$padding};` : "")}
|
|
50
|
+
${({ $margin }) => (isDefined($margin) ? `margin:${$margin};` : "")}
|
|
51
|
+
${({ $marginTop }) => isDefined($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
52
|
+
${({ $marginRight }) => isDefined($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
53
|
+
${({ $marginBottom }) => isDefined($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
54
|
+
${({ $marginLeft }) => isDefined($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
${({ $fontSize }) => ($fontSize ? `font-size:${$fontSize};` : "")}
|
|
57
|
-
${({ $fontWeight }) => ($fontWeight ? `font-weight:${$fontWeight};` : ""
|
|
58
|
-
${({ $lineHeight }) => ($lineHeight ? `line-height:${$lineHeight};` : ""
|
|
59
|
-
${({ $color }) => ($color ? `color:${$color};` : "")}
|
|
60
|
-
${({ $background }) => ($background ? `background:${$background};` : ""
|
|
61
|
-
${({ $cursor }) => ($cursor ? `cursor:${$cursor};` : "")}
|
|
62
|
-
${({ $letterSpacing }) => $letterSpacing ? `letter-spacing:${$letterSpacing};` : ""}
|
|
63
|
-
${({ $textAlign }) => ($textAlign ? `text-align:${$textAlign};` : ""
|
|
64
|
-
${({ $opacity }) => ($opacity ? `opacity:${$opacity};` : "")}
|
|
65
|
-
${({ $width }) => ($width ? `width:${$width};` : "")}
|
|
57
|
+
${({ $fontSize }) => (isDefined($fontSize) ? `font-size:${$fontSize};` : "")}
|
|
58
|
+
${({ $fontWeight }) => isDefined($fontWeight) ? `font-weight:${$fontWeight};` : ""}
|
|
59
|
+
${({ $lineHeight }) => isDefined($lineHeight) ? `line-height:${$lineHeight};` : ""}
|
|
60
|
+
${({ $color }) => (isDefined($color) ? `color:${$color};` : "")}
|
|
61
|
+
${({ $background }) => isDefined($background) ? `background:${$background};` : ""}
|
|
62
|
+
${({ $cursor }) => (isDefined($cursor) ? `cursor:${$cursor};` : "")}
|
|
63
|
+
${({ $letterSpacing }) => isDefined($letterSpacing) ? `letter-spacing:${$letterSpacing};` : ""}
|
|
64
|
+
${({ $textAlign }) => isDefined($textAlign) ? `text-align:${$textAlign};` : ""}
|
|
65
|
+
${({ $opacity }) => (isDefined($opacity) ? `opacity:${$opacity};` : "")}
|
|
66
|
+
${({ $width }) => (isDefined($width) ? `width:${$width};` : "")}
|
|
66
67
|
`;
|
|
67
68
|
export const Typography = forwardRef(({ tag = "div", children, style = {}, className, onClick, ...props }, ref) => {
|
|
68
69
|
const { transientProps, otherProps } = getTransientCustomProps(props, pickedProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../../src/components/ui/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,MAAyB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAA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,GAAG,EACH,EAAE;IACF,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,uBAAuB,CAG5D,KAAK,EAAE,WAAW,CAAC,CAAC;IACtB,OAAO,CACL,oBAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,KAChB,cAAc,KACd,UAAU,EACd,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,GAAG,EACP,GAAG,EAAE,GAAG,IAEP,QAAQ,CACD,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,UAAW,OAAO,YACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/components/ui/common.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CAC1C,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bosonprotocol/react-kit",
|
|
3
3
|
"description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.",
|
|
4
|
-
"version": "0.33.0-alpha.
|
|
4
|
+
"version": "0.33.0-alpha.3",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/cjs/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@bosonprotocol/chat-sdk": "^1.3.1-alpha.9",
|
|
18
|
-
"@bosonprotocol/core-sdk": "^1.40.5-alpha.
|
|
19
|
-
"@bosonprotocol/ethers-sdk": "^1.14.5-alpha.
|
|
18
|
+
"@bosonprotocol/core-sdk": "^1.40.5-alpha.2",
|
|
19
|
+
"@bosonprotocol/ethers-sdk": "^1.14.5-alpha.2",
|
|
20
20
|
"@bosonprotocol/ipfs-storage": "^1.11.3",
|
|
21
21
|
"@davatar/react": "1.11.1",
|
|
22
22
|
"@ethersproject/units": "5.6.0",
|
|
@@ -188,5 +188,5 @@
|
|
|
188
188
|
"overrides": {
|
|
189
189
|
"typescript": "^5.1.6"
|
|
190
190
|
},
|
|
191
|
-
"gitHead": "
|
|
191
|
+
"gitHead": "f9a65b89ba5ddc092d2b55abefe48643b5292032"
|
|
192
192
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ElementRef, HTMLAttributes, forwardRef } from "react";
|
|
2
2
|
import styled, { CSSProperties } from "styled-components";
|
|
3
3
|
import { getTransientCustomProps } from "./getTransientCustomProps";
|
|
4
|
+
import { isDefined } from "./common";
|
|
4
5
|
const pickedProps = {
|
|
5
6
|
alignItems: true,
|
|
6
7
|
flexBasis: true,
|
|
@@ -29,31 +30,42 @@ type IGrid = Pick<CSSProperties, keyof typeof pickedProps>;
|
|
|
29
30
|
type InnerGridProps = Record<`$${keyof IGrid}`, IGrid[keyof IGrid]>;
|
|
30
31
|
|
|
31
32
|
const Container = styled.div<InnerGridProps>`
|
|
32
|
-
|
|
33
|
-
height: ${({ $height }) => $height
|
|
33
|
+
${({ $width }) => (isDefined($width) ? `width:${$width};` : "width: 100%;")}
|
|
34
|
+
height: ${({ $height }) => (isDefined($height) ? $height : "initial")};
|
|
34
35
|
display: flex;
|
|
35
|
-
align-items: ${({ $alignItems }) =>
|
|
36
|
-
|
|
37
|
-
flex-
|
|
38
|
-
|
|
39
|
-
flex-
|
|
36
|
+
align-items: ${({ $alignItems }) =>
|
|
37
|
+
isDefined($alignItems) ? $alignItems : "center"};
|
|
38
|
+
flex-basis: ${({ $flexBasis }) =>
|
|
39
|
+
isDefined($flexBasis) ? $flexBasis : "auto"};
|
|
40
|
+
flex-direction: ${({ $flexDirection }) =>
|
|
41
|
+
isDefined($flexDirection) ? $flexDirection : "row"};
|
|
42
|
+
flex-grow: ${({ $flexGrow }) =>
|
|
43
|
+
isDefined($flexGrow) ? $flexGrow : "initial"};
|
|
44
|
+
flex-shrink: ${({ $flexShrink }) =>
|
|
45
|
+
isDefined($flexShrink) ? $flexShrink : "initial"};
|
|
40
46
|
justify-content: ${({ $justifyContent }) =>
|
|
41
|
-
$justifyContent
|
|
47
|
+
isDefined($justifyContent) ? $justifyContent : "space-between"};
|
|
42
48
|
|
|
43
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
44
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
45
|
-
${({ $columnGap }) =>
|
|
46
|
-
|
|
47
|
-
${({ $
|
|
48
|
-
${({ $
|
|
49
|
-
${({ $
|
|
50
|
-
${({ $
|
|
51
|
-
${({ $
|
|
49
|
+
${({ $flexWrap }) => (isDefined($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
50
|
+
${({ $rowGap }) => (isDefined($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
51
|
+
${({ $columnGap }) =>
|
|
52
|
+
isDefined($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
53
|
+
${({ $gap }) => (isDefined($gap) ? `gap:${$gap};` : "")}
|
|
54
|
+
${({ $flex }) => (isDefined($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
55
|
+
${({ $padding }) => (isDefined($padding) ? `padding:${$padding};` : "")}
|
|
56
|
+
${({ $margin }) => (isDefined($margin) ? `margin:${$margin};` : "")}
|
|
57
|
+
${({ $marginTop }) =>
|
|
58
|
+
isDefined($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
59
|
+
${({ $marginRight }) =>
|
|
60
|
+
isDefined($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
52
61
|
${({ $marginBottom }) =>
|
|
53
|
-
$marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
54
|
-
${({ $marginLeft }) =>
|
|
55
|
-
|
|
56
|
-
${({ $
|
|
62
|
+
isDefined($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
63
|
+
${({ $marginLeft }) =>
|
|
64
|
+
isDefined($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
65
|
+
${({ $alignSelf }) =>
|
|
66
|
+
isDefined($alignSelf) ? `align-self:${$alignSelf};` : ""}
|
|
67
|
+
${({ $justifySelf }) =>
|
|
68
|
+
isDefined($justifySelf) ? `justify-self:${$justifySelf};` : ""}
|
|
57
69
|
`;
|
|
58
70
|
export type GridProps = {
|
|
59
71
|
children?: React.ReactNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes, forwardRef } from "react";
|
|
2
2
|
import styled, { CSSProperties } from "styled-components";
|
|
3
3
|
import { getTransientCustomProps } from "./getTransientCustomProps";
|
|
4
|
+
import { isDefined } from "./common";
|
|
4
5
|
|
|
5
6
|
const pickedProps = {
|
|
6
7
|
alignItems: true,
|
|
@@ -38,43 +39,52 @@ type InnerTypographyProps = Record<
|
|
|
38
39
|
`$${keyof WrapperProps}`,
|
|
39
40
|
WrapperProps[keyof WrapperProps]
|
|
40
41
|
>;
|
|
41
|
-
|
|
42
42
|
const Wrapper = styled.div<InnerTypographyProps>`
|
|
43
43
|
display: flex;
|
|
44
|
-
${({ $display }) => ($display ? `display:${$display};` : "")}
|
|
45
|
-
${({ $alignItems }) =>
|
|
46
|
-
|
|
44
|
+
${({ $display }) => (isDefined($display) ? `display:${$display};` : "")}
|
|
45
|
+
${({ $alignItems }) =>
|
|
46
|
+
isDefined($alignItems) && `align-items: ${$alignItems}`};
|
|
47
|
+
${({ $flexBasis }) => isDefined($flexBasis) && `flex-basis: ${$flexBasis}`};
|
|
47
48
|
${({ $flexDirection }) =>
|
|
48
|
-
$flexDirection && `flex-direction: ${$flexDirection}`};
|
|
49
|
-
${({ $flexGrow }) => $flexGrow && `flex-grow: ${$flexGrow}`};
|
|
50
|
-
${({ $flexShrink }) =>
|
|
49
|
+
isDefined($flexDirection) && `flex-direction: ${$flexDirection}`};
|
|
50
|
+
${({ $flexGrow }) => isDefined($flexGrow) && `flex-grow: ${$flexGrow}`};
|
|
51
|
+
${({ $flexShrink }) =>
|
|
52
|
+
isDefined($flexShrink) && `flex-shrink: ${$flexShrink}`};
|
|
51
53
|
${({ $justifyContent }) =>
|
|
52
|
-
$justifyContent && `justify-content: ${$justifyContent}`};
|
|
53
|
-
${({ $flexWrap }) => ($flexWrap ? `flex-wrap:${$flexWrap};` : "")}
|
|
54
|
-
${({ $rowGap }) => ($rowGap ? `row-gap:${$rowGap};` : "")}
|
|
55
|
-
${({ $columnGap }) =>
|
|
56
|
-
|
|
57
|
-
${({ $
|
|
58
|
-
${({ $
|
|
59
|
-
${({ $
|
|
60
|
-
${({ $
|
|
61
|
-
${({ $
|
|
54
|
+
isDefined($justifyContent) && `justify-content: ${$justifyContent}`};
|
|
55
|
+
${({ $flexWrap }) => (isDefined($flexWrap) ? `flex-wrap:${$flexWrap};` : "")}
|
|
56
|
+
${({ $rowGap }) => (isDefined($rowGap) ? `row-gap:${$rowGap};` : "")}
|
|
57
|
+
${({ $columnGap }) =>
|
|
58
|
+
isDefined($columnGap) ? `column-gap:${$columnGap};` : ""}
|
|
59
|
+
${({ $gap }) => (isDefined($gap) ? `gap:${$gap};` : "")}
|
|
60
|
+
${({ $flex }) => (isDefined($flex) ? `> * { flex: ${$flex}; }` : "")}
|
|
61
|
+
${({ $padding }) => (isDefined($padding) ? `padding:${$padding};` : "")}
|
|
62
|
+
${({ $margin }) => (isDefined($margin) ? `margin:${$margin};` : "")}
|
|
63
|
+
${({ $marginTop }) =>
|
|
64
|
+
isDefined($marginTop) ? `margin-top:${$marginTop};` : ""}
|
|
65
|
+
${({ $marginRight }) =>
|
|
66
|
+
isDefined($marginRight) ? `margin-right:${$marginRight};` : ""}
|
|
62
67
|
${({ $marginBottom }) =>
|
|
63
|
-
$marginBottom ? `margin-bottom:${$marginBottom};` : ""}
|
|
64
|
-
${({ $marginLeft }) =>
|
|
68
|
+
isDefined($marginBottom) ? `margin-bottom:${$marginBottom};` : ""}
|
|
69
|
+
${({ $marginLeft }) =>
|
|
70
|
+
isDefined($marginLeft) ? `margin-left:${$marginLeft};` : ""}
|
|
65
71
|
|
|
66
72
|
|
|
67
|
-
${({ $fontSize }) => ($fontSize ? `font-size:${$fontSize};` : "")}
|
|
68
|
-
${({ $fontWeight }) =>
|
|
69
|
-
|
|
70
|
-
${({ $
|
|
71
|
-
|
|
72
|
-
${({ $
|
|
73
|
+
${({ $fontSize }) => (isDefined($fontSize) ? `font-size:${$fontSize};` : "")}
|
|
74
|
+
${({ $fontWeight }) =>
|
|
75
|
+
isDefined($fontWeight) ? `font-weight:${$fontWeight};` : ""}
|
|
76
|
+
${({ $lineHeight }) =>
|
|
77
|
+
isDefined($lineHeight) ? `line-height:${$lineHeight};` : ""}
|
|
78
|
+
${({ $color }) => (isDefined($color) ? `color:${$color};` : "")}
|
|
79
|
+
${({ $background }) =>
|
|
80
|
+
isDefined($background) ? `background:${$background};` : ""}
|
|
81
|
+
${({ $cursor }) => (isDefined($cursor) ? `cursor:${$cursor};` : "")}
|
|
73
82
|
${({ $letterSpacing }) =>
|
|
74
|
-
$letterSpacing ? `letter-spacing:${$letterSpacing};` : ""}
|
|
75
|
-
${({ $textAlign }) =>
|
|
76
|
-
|
|
77
|
-
${({ $
|
|
83
|
+
isDefined($letterSpacing) ? `letter-spacing:${$letterSpacing};` : ""}
|
|
84
|
+
${({ $textAlign }) =>
|
|
85
|
+
isDefined($textAlign) ? `text-align:${$textAlign};` : ""}
|
|
86
|
+
${({ $opacity }) => (isDefined($opacity) ? `opacity:${$opacity};` : "")}
|
|
87
|
+
${({ $width }) => (isDefined($width) ? `width:${$width};` : "")}
|
|
78
88
|
`;
|
|
79
89
|
|
|
80
90
|
export type TypographyProps = WrapperProps &
|