@bosonprotocol/react-kit 0.33.0-alpha.1 → 0.33.0-alpha.11

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.
Files changed (250) hide show
  1. package/dist/cjs/components/buttons/BaseButton.d.ts +1 -0
  2. package/dist/cjs/components/buttons/BaseButton.d.ts.map +1 -1
  3. package/dist/cjs/components/buttons/BaseButton.js +1 -0
  4. package/dist/cjs/components/buttons/BaseButton.js.map +1 -1
  5. package/dist/cjs/components/form/Select.d.ts +2 -1
  6. package/dist/cjs/components/form/Select.d.ts.map +1 -1
  7. package/dist/cjs/components/form/Select.js +18 -15
  8. package/dist/cjs/components/form/Select.js.map +1 -1
  9. package/dist/cjs/components/form/index.d.ts +1 -1
  10. package/dist/cjs/components/form/index.d.ts.map +1 -1
  11. package/dist/cjs/components/form/index.js.map +1 -1
  12. package/dist/cjs/components/form/types.d.ts +33 -0
  13. package/dist/cjs/components/form/types.d.ts.map +1 -1
  14. package/dist/cjs/components/image/Image.js +2 -2
  15. package/dist/cjs/components/image/Image.js.map +1 -1
  16. package/dist/cjs/components/image/Image.styles.d.ts +2 -1
  17. package/dist/cjs/components/image/Image.styles.d.ts.map +1 -1
  18. package/dist/cjs/components/image/Image.styles.js +2 -2
  19. package/dist/cjs/components/image/Image.styles.js.map +1 -1
  20. package/dist/cjs/components/modal/components/Commit/DetailView/InnerCommitDetailView.js +3 -3
  21. package/dist/cjs/components/modal/components/Commit/DetailView/InnerCommitDetailView.js.map +1 -1
  22. package/dist/cjs/components/modal/components/Redeem/ExchangeView/RedeemSuccess.js +3 -3
  23. package/dist/cjs/components/modal/components/Redeem/ExchangeView/RedeemSuccess.js.map +1 -1
  24. package/dist/cjs/components/modal/components/common/OfferFullDescription/DigitalProductData.js +2 -2
  25. package/dist/cjs/components/modal/components/common/OfferFullDescription/DigitalProductData.js.map +1 -1
  26. package/dist/cjs/components/modal/components/common/detail/DetailSlider.js +2 -2
  27. package/dist/cjs/components/modal/components/common/detail/DetailSlider.js.map +1 -1
  28. package/dist/cjs/components/modal/components/common/detail/PhygitalProduct.js +2 -2
  29. package/dist/cjs/components/modal/components/common/detail/PhygitalProduct.js.map +1 -1
  30. package/dist/cjs/components/modal/components/common/detail/SlickSlider.js +2 -2
  31. package/dist/cjs/components/modal/components/common/detail/SlickSlider.js.map +1 -1
  32. package/dist/cjs/components/ui/CardCTA.d.ts +21 -0
  33. package/dist/cjs/components/ui/CardCTA.d.ts.map +1 -0
  34. package/dist/cjs/components/ui/CardCTA.js +77 -0
  35. package/dist/cjs/components/ui/CardCTA.js.map +1 -0
  36. package/dist/cjs/components/ui/Grid.d.ts.map +1 -1
  37. package/dist/cjs/components/ui/Grid.js +22 -21
  38. package/dist/cjs/components/ui/Grid.js.map +1 -1
  39. package/dist/cjs/components/ui/IpfsImage.d.ts +2 -2
  40. package/dist/cjs/components/ui/IpfsImage.d.ts.map +1 -1
  41. package/dist/cjs/components/ui/IpfsImage.js +2 -1
  42. package/dist/cjs/components/ui/IpfsImage.js.map +1 -1
  43. package/dist/cjs/components/ui/Typography.d.ts.map +1 -1
  44. package/dist/cjs/components/ui/Typography.js +29 -28
  45. package/dist/cjs/components/ui/Typography.js.map +1 -1
  46. package/dist/cjs/components/ui/Video.d.ts.map +1 -1
  47. package/dist/cjs/components/ui/Video.js +22 -12
  48. package/dist/cjs/components/ui/Video.js.map +1 -1
  49. package/dist/cjs/components/ui/common.d.ts +2 -0
  50. package/dist/cjs/components/ui/common.d.ts.map +1 -0
  51. package/dist/cjs/components/ui/common.js +6 -0
  52. package/dist/cjs/components/ui/common.js.map +1 -0
  53. package/dist/cjs/components/wallet/ConnectButton.js +2 -2
  54. package/dist/cjs/components/wallet/ConnectButton.js.map +1 -1
  55. package/dist/cjs/components/widgets/finance/convertion-rate/ConvertionRateContext.js +2 -2
  56. package/dist/cjs/components/widgets/finance/convertion-rate/ConvertionRateContext.js.map +1 -1
  57. package/dist/cjs/components/widgets/finance/convertion-rate/ConvertionRateProvider.js +2 -2
  58. package/dist/cjs/components/widgets/finance/convertion-rate/ConvertionRateProvider.js.map +1 -1
  59. package/dist/cjs/components/widgets/finance/useOffersBacked.js +1 -1
  60. package/dist/cjs/components/widgets/finance/useOffersBacked.js.map +1 -1
  61. package/dist/cjs/hooks/connection/connection.d.ts +2 -2
  62. package/dist/cjs/hooks/connection/connection.d.ts.map +1 -1
  63. package/dist/cjs/hooks/connection/connection.js +15 -6
  64. package/dist/cjs/hooks/connection/connection.js.map +1 -1
  65. package/dist/cjs/hooks/core-sdk/useCoreSdk.d.ts.map +1 -1
  66. package/dist/cjs/hooks/core-sdk/useCoreSdk.js +2 -2
  67. package/dist/cjs/hooks/core-sdk/useCoreSdk.js.map +1 -1
  68. package/dist/cjs/hooks/form/useForm.d.ts +55 -0
  69. package/dist/cjs/hooks/form/useForm.d.ts.map +1 -0
  70. package/dist/cjs/hooks/form/useForm.js +11 -0
  71. package/dist/cjs/hooks/form/useForm.js.map +1 -0
  72. package/dist/cjs/hooks/index.d.ts +6 -0
  73. package/dist/cjs/hooks/index.d.ts.map +1 -1
  74. package/dist/cjs/hooks/index.js +8 -1
  75. package/dist/cjs/hooks/index.js.map +1 -1
  76. package/dist/cjs/hooks/ipfs/useIpfsStorage.d.ts +2 -0
  77. package/dist/cjs/hooks/ipfs/useIpfsStorage.d.ts.map +1 -0
  78. package/dist/cjs/hooks/ipfs/useIpfsStorage.js +14 -0
  79. package/dist/cjs/hooks/ipfs/useIpfsStorage.js.map +1 -0
  80. package/dist/cjs/hooks/location/buildUseSearchParams.d.ts +12 -0
  81. package/dist/cjs/hooks/location/buildUseSearchParams.d.ts.map +1 -0
  82. package/dist/cjs/hooks/location/buildUseSearchParams.js +36 -0
  83. package/dist/cjs/hooks/location/buildUseSearchParams.js.map +1 -0
  84. package/dist/cjs/{components/widgets/finance/storage/useLocalStorage.d.ts → hooks/storage/useBosonLocalStorage.d.ts} +3 -3
  85. package/dist/cjs/hooks/storage/useBosonLocalStorage.d.ts.map +1 -0
  86. package/dist/cjs/hooks/storage/useBosonLocalStorage.js +22 -0
  87. package/dist/cjs/hooks/storage/useBosonLocalStorage.js.map +1 -0
  88. package/dist/cjs/hooks/storage/useLocalStorage.d.ts +6 -0
  89. package/dist/cjs/hooks/storage/useLocalStorage.d.ts.map +1 -0
  90. package/dist/cjs/hooks/storage/useLocalStorage.js.map +1 -0
  91. package/dist/cjs/hooks/useIpfsMetadataStorage.d.ts.map +1 -1
  92. package/dist/cjs/hooks/useIpfsMetadataStorage.js +1 -1
  93. package/dist/cjs/hooks/useIpfsMetadataStorage.js.map +1 -1
  94. package/dist/cjs/index.d.ts +4 -0
  95. package/dist/cjs/index.d.ts.map +1 -1
  96. package/dist/cjs/index.js +4 -0
  97. package/dist/cjs/index.js.map +1 -1
  98. package/dist/cjs/lib/url/url.d.ts +1 -0
  99. package/dist/cjs/lib/url/url.d.ts.map +1 -1
  100. package/dist/cjs/lib/url/url.js +2 -1
  101. package/dist/cjs/lib/url/url.js.map +1 -1
  102. package/dist/cjs/types/helpers.d.ts +3 -0
  103. package/dist/cjs/types/helpers.d.ts.map +1 -1
  104. package/dist/cjs/types/helpers.js.map +1 -1
  105. package/dist/esm/components/buttons/BaseButton.d.ts +1 -0
  106. package/dist/esm/components/buttons/BaseButton.d.ts.map +1 -1
  107. package/dist/esm/components/buttons/BaseButton.js +1 -0
  108. package/dist/esm/components/buttons/BaseButton.js.map +1 -1
  109. package/dist/esm/components/form/Select.d.ts +2 -1
  110. package/dist/esm/components/form/Select.d.ts.map +1 -1
  111. package/dist/esm/components/form/Select.js +19 -15
  112. package/dist/esm/components/form/Select.js.map +1 -1
  113. package/dist/esm/components/form/index.d.ts +1 -1
  114. package/dist/esm/components/form/index.d.ts.map +1 -1
  115. package/dist/esm/components/form/index.js.map +1 -1
  116. package/dist/esm/components/form/types.d.ts +33 -0
  117. package/dist/esm/components/form/types.d.ts.map +1 -1
  118. package/dist/esm/components/image/Image.js +2 -2
  119. package/dist/esm/components/image/Image.js.map +1 -1
  120. package/dist/esm/components/image/Image.styles.d.ts +2 -1
  121. package/dist/esm/components/image/Image.styles.d.ts.map +1 -1
  122. package/dist/esm/components/image/Image.styles.js +2 -2
  123. package/dist/esm/components/image/Image.styles.js.map +1 -1
  124. package/dist/esm/components/modal/components/Commit/DetailView/InnerCommitDetailView.js +1 -1
  125. package/dist/esm/components/modal/components/Commit/DetailView/InnerCommitDetailView.js.map +1 -1
  126. package/dist/esm/components/modal/components/Redeem/ExchangeView/RedeemSuccess.js +1 -1
  127. package/dist/esm/components/modal/components/Redeem/ExchangeView/RedeemSuccess.js.map +1 -1
  128. package/dist/esm/components/modal/components/common/OfferFullDescription/DigitalProductData.js +1 -1
  129. package/dist/esm/components/modal/components/common/OfferFullDescription/DigitalProductData.js.map +1 -1
  130. package/dist/esm/components/modal/components/common/detail/DetailSlider.js +1 -1
  131. package/dist/esm/components/modal/components/common/detail/DetailSlider.js.map +1 -1
  132. package/dist/esm/components/modal/components/common/detail/PhygitalProduct.js +1 -1
  133. package/dist/esm/components/modal/components/common/detail/PhygitalProduct.js.map +1 -1
  134. package/dist/esm/components/modal/components/common/detail/SlickSlider.js +1 -1
  135. package/dist/esm/components/modal/components/common/detail/SlickSlider.js.map +1 -1
  136. package/dist/esm/components/ui/CardCTA.d.ts +21 -0
  137. package/dist/esm/components/ui/CardCTA.d.ts.map +1 -0
  138. package/dist/esm/components/ui/CardCTA.js +35 -0
  139. package/dist/esm/components/ui/CardCTA.js.map +1 -0
  140. package/dist/esm/components/ui/Grid.d.ts.map +1 -1
  141. package/dist/esm/components/ui/Grid.js +22 -21
  142. package/dist/esm/components/ui/Grid.js.map +1 -1
  143. package/dist/esm/components/ui/IpfsImage.d.ts +2 -2
  144. package/dist/esm/components/ui/IpfsImage.d.ts.map +1 -1
  145. package/dist/esm/components/ui/IpfsImage.js +1 -2
  146. package/dist/esm/components/ui/IpfsImage.js.map +1 -1
  147. package/dist/esm/components/ui/Typography.d.ts.map +1 -1
  148. package/dist/esm/components/ui/Typography.js +29 -28
  149. package/dist/esm/components/ui/Typography.js.map +1 -1
  150. package/dist/esm/components/ui/Video.d.ts.map +1 -1
  151. package/dist/esm/components/ui/Video.js +22 -12
  152. package/dist/esm/components/ui/Video.js.map +1 -1
  153. package/dist/esm/components/ui/common.d.ts +2 -0
  154. package/dist/esm/components/ui/common.d.ts.map +1 -0
  155. package/dist/esm/components/ui/common.js +2 -0
  156. package/dist/esm/components/ui/common.js.map +1 -0
  157. package/dist/esm/components/wallet/ConnectButton.js +1 -1
  158. package/dist/esm/components/wallet/ConnectButton.js.map +1 -1
  159. package/dist/esm/components/widgets/finance/convertion-rate/ConvertionRateContext.js +1 -1
  160. package/dist/esm/components/widgets/finance/convertion-rate/ConvertionRateContext.js.map +1 -1
  161. package/dist/esm/components/widgets/finance/convertion-rate/ConvertionRateProvider.js +1 -1
  162. package/dist/esm/components/widgets/finance/convertion-rate/ConvertionRateProvider.js.map +1 -1
  163. package/dist/esm/components/widgets/finance/useOffersBacked.js +1 -1
  164. package/dist/esm/components/widgets/finance/useOffersBacked.js.map +1 -1
  165. package/dist/esm/hooks/connection/connection.d.ts +2 -2
  166. package/dist/esm/hooks/connection/connection.d.ts.map +1 -1
  167. package/dist/esm/hooks/connection/connection.js +14 -6
  168. package/dist/esm/hooks/connection/connection.js.map +1 -1
  169. package/dist/esm/hooks/core-sdk/useCoreSdk.d.ts.map +1 -1
  170. package/dist/esm/hooks/core-sdk/useCoreSdk.js +3 -3
  171. package/dist/esm/hooks/core-sdk/useCoreSdk.js.map +1 -1
  172. package/dist/esm/hooks/form/useForm.d.ts +55 -0
  173. package/dist/esm/hooks/form/useForm.d.ts.map +1 -0
  174. package/dist/esm/hooks/form/useForm.js +10 -0
  175. package/dist/esm/hooks/form/useForm.js.map +1 -0
  176. package/dist/esm/hooks/index.d.ts +6 -0
  177. package/dist/esm/hooks/index.d.ts.map +1 -1
  178. package/dist/esm/hooks/index.js +6 -0
  179. package/dist/esm/hooks/index.js.map +1 -1
  180. package/dist/esm/hooks/ipfs/useIpfsStorage.d.ts +2 -0
  181. package/dist/esm/hooks/ipfs/useIpfsStorage.d.ts.map +1 -0
  182. package/dist/esm/hooks/ipfs/useIpfsStorage.js +10 -0
  183. package/dist/esm/hooks/ipfs/useIpfsStorage.js.map +1 -0
  184. package/dist/esm/hooks/location/buildUseSearchParams.d.ts +12 -0
  185. package/dist/esm/hooks/location/buildUseSearchParams.d.ts.map +1 -0
  186. package/dist/esm/hooks/location/buildUseSearchParams.js +32 -0
  187. package/dist/esm/hooks/location/buildUseSearchParams.js.map +1 -0
  188. package/dist/esm/{components/widgets/finance/storage/useLocalStorage.d.ts → hooks/storage/useBosonLocalStorage.d.ts} +3 -3
  189. package/dist/esm/hooks/storage/useBosonLocalStorage.d.ts.map +1 -0
  190. package/dist/esm/hooks/storage/useBosonLocalStorage.js +15 -0
  191. package/dist/esm/hooks/storage/useBosonLocalStorage.js.map +1 -0
  192. package/dist/esm/hooks/storage/useLocalStorage.d.ts +6 -0
  193. package/dist/esm/hooks/storage/useLocalStorage.d.ts.map +1 -0
  194. package/dist/esm/hooks/storage/useLocalStorage.js.map +1 -0
  195. package/dist/esm/hooks/useIpfsMetadataStorage.d.ts.map +1 -1
  196. package/dist/esm/hooks/useIpfsMetadataStorage.js +2 -2
  197. package/dist/esm/hooks/useIpfsMetadataStorage.js.map +1 -1
  198. package/dist/esm/index.d.ts +4 -0
  199. package/dist/esm/index.d.ts.map +1 -1
  200. package/dist/esm/index.js +4 -0
  201. package/dist/esm/index.js.map +1 -1
  202. package/dist/esm/lib/url/url.d.ts +1 -0
  203. package/dist/esm/lib/url/url.d.ts.map +1 -1
  204. package/dist/esm/lib/url/url.js +1 -0
  205. package/dist/esm/lib/url/url.js.map +1 -1
  206. package/dist/esm/types/helpers.d.ts +3 -0
  207. package/dist/esm/types/helpers.d.ts.map +1 -1
  208. package/dist/esm/types/helpers.js.map +1 -1
  209. package/package.json +5 -5
  210. package/src/components/buttons/BaseButton.tsx +4 -0
  211. package/src/components/form/Select.tsx +20 -14
  212. package/src/components/form/index.ts +1 -1
  213. package/src/components/form/types.ts +33 -0
  214. package/src/components/image/Image.styles.ts +7 -5
  215. package/src/components/image/Image.tsx +2 -2
  216. package/src/components/modal/components/Commit/DetailView/InnerCommitDetailView.tsx +1 -1
  217. package/src/components/modal/components/Redeem/ExchangeView/RedeemSuccess.tsx +1 -1
  218. package/src/components/modal/components/common/OfferFullDescription/DigitalProductData.tsx +1 -1
  219. package/src/components/modal/components/common/detail/DetailSlider.tsx +1 -1
  220. package/src/components/modal/components/common/detail/PhygitalProduct.tsx +1 -1
  221. package/src/components/modal/components/common/detail/SlickSlider.tsx +1 -1
  222. package/src/components/ui/CardCTA.tsx +77 -0
  223. package/src/components/ui/Grid.tsx +33 -21
  224. package/src/components/ui/IpfsImage.tsx +3 -3
  225. package/src/components/ui/Typography.tsx +39 -29
  226. package/src/components/ui/Video.tsx +28 -14
  227. package/src/components/ui/common.ts +2 -0
  228. package/src/components/wallet/ConnectButton.tsx +1 -1
  229. package/src/components/widgets/finance/convertion-rate/ConvertionRateContext.tsx +1 -1
  230. package/src/components/widgets/finance/convertion-rate/ConvertionRateProvider.tsx +1 -1
  231. package/src/components/widgets/finance/useOffersBacked.ts +1 -1
  232. package/src/hooks/connection/connection.ts +18 -8
  233. package/src/hooks/core-sdk/useCoreSdk.tsx +4 -3
  234. package/src/hooks/form/useForm.ts +12 -0
  235. package/src/hooks/index.ts +6 -0
  236. package/src/hooks/ipfs/useIpfsStorage.ts +16 -0
  237. package/src/hooks/location/buildUseSearchParams.tsx +45 -0
  238. package/src/hooks/storage/useBosonLocalStorage.ts +40 -0
  239. package/src/{components/widgets/finance → hooks}/storage/useLocalStorage.ts +5 -17
  240. package/src/hooks/useIpfsMetadataStorage.tsx +6 -2
  241. package/src/index.tsx +4 -0
  242. package/src/lib/url/url.ts +3 -0
  243. package/src/stories/selects/Select.stories.tsx +117 -0
  244. package/src/types/helpers.ts +4 -0
  245. package/dist/cjs/components/widgets/finance/storage/useLocalStorage.d.ts.map +0 -1
  246. package/dist/cjs/components/widgets/finance/storage/useLocalStorage.js.map +0 -1
  247. package/dist/esm/components/widgets/finance/storage/useLocalStorage.d.ts.map +0 -1
  248. package/dist/esm/components/widgets/finance/storage/useLocalStorage.js.map +0 -1
  249. /package/dist/cjs/{components/widgets/finance → hooks}/storage/useLocalStorage.js +0 -0
  250. /package/dist/esm/{components/widgets/finance → hooks}/storage/useLocalStorage.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/types/helpers.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAI,CAAY,EAAU,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AA4BzD,YAAY"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/types/helpers.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAI,CAAY,EAAU,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AA4BzD,YAAY"}
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.1",
4
+ "version": "0.33.0-alpha.11",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
7
7
  "types": "./dist/cjs/index.d.ts",
@@ -15,9 +15,9 @@
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.0",
19
- "@bosonprotocol/ethers-sdk": "^1.14.5-alpha.0",
20
- "@bosonprotocol/ipfs-storage": "^1.11.3",
18
+ "@bosonprotocol/core-sdk": "^1.40.5-alpha.10",
19
+ "@bosonprotocol/ethers-sdk": "^1.14.5-alpha.10",
20
+ "@bosonprotocol/ipfs-storage": "^1.11.4-alpha.5",
21
21
  "@davatar/react": "1.11.1",
22
22
  "@ethersproject/units": "5.6.0",
23
23
  "@glidejs/glide": "3.6.0",
@@ -188,5 +188,5 @@
188
188
  "overrides": {
189
189
  "typescript": "^5.1.6"
190
190
  },
191
- "gitHead": "1c23ba2ae19b282fc300ddb8a69d50771fb7c8c3"
191
+ "gitHead": "ef36d597644bb21937e62fc64d86ff22ef714651"
192
192
  }
@@ -19,6 +19,7 @@ const colors = theme.colors.light;
19
19
  const ButtonWithThemeProps = styled.button<{
20
20
  size: ButtonSizeProp;
21
21
  fill: boolean | undefined;
22
+ theme: BaseButtonTheme;
22
23
  }>`
23
24
  ${() => Styles.button};
24
25
  ${(props) => Styles[props.size as keyof typeof Styles]}
@@ -26,6 +27,8 @@ const ButtonWithThemeProps = styled.button<{
26
27
  border-color: ${(props) => props.theme?.borderColor || "transparent"};
27
28
  border-width: ${(props) => props.theme?.borderWidth || 0}px;
28
29
  border-radius: ${(props) => props.theme?.borderRadius || 0}px;
30
+ ${(props) =>
31
+ props.theme?.boxShadow ? `box-shadow: ${props.theme.boxShadow}` : ""};
29
32
  color: ${(props) => props.theme?.color || "#000000"};
30
33
  background-color: ${(props) => props.theme?.background || "transparent"};
31
34
  svg {
@@ -110,6 +113,7 @@ export type BaseButtonTheme = {
110
113
  borderColor?: CSSProperties["borderColor"];
111
114
  borderRadius?: CSSProperties["borderRadius"];
112
115
  borderWidth?: CSSProperties["borderWidth"];
116
+ boxShadow?: CSSProperties["boxShadow"];
113
117
  color?: CSSProperties["color"];
114
118
  padding?: CSSProperties["padding"];
115
119
  gap?: CSSProperties["gap"];
@@ -8,9 +8,10 @@ import { zIndex } from "../ui/zIndex";
8
8
 
9
9
  import Error from "./Error";
10
10
  import type { SelectDataProps, SelectProps } from "./types";
11
+ export type { SelectProps } from "./types";
11
12
  const colors = theme.colors.light;
12
13
 
13
- const customStyles = (error: any) => ({
14
+ const customStyles = (error: any, customTheme: SelectProps["theme"]) => ({
14
15
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
16
  singleValue: (provided: any, state: any) => {
16
17
  return {
@@ -34,16 +35,18 @@ const customStyles = (error: any) => ({
34
35
  borderRadius: 0,
35
36
  padding: "0.4rem 0.25rem",
36
37
  boxShadow: "none",
37
- ":hover": {
38
- borderColor: colors.secondary,
39
- borderWidth: "1px"
40
- },
41
38
  background: colors.lightGrey,
39
+ ...customTheme?.control,
42
40
  border: state.isFocused
43
- ? `1px solid ${colors.secondary}`
41
+ ? customTheme?.control?.focus?.border ?? `1px solid ${colors.secondary}`
44
42
  : !checkIfValueIsEmpty(error)
45
- ? `1px solid ${colors.orange}`
46
- : `1px solid ${colors.border}`,
43
+ ? customTheme?.control?.error?.border ?? `1px solid ${colors.orange}`
44
+ : customTheme?.control?.border ?? `1px solid ${colors.border}`,
45
+ ":hover": {
46
+ borderColor: colors.secondary,
47
+ borderWidth: "1px",
48
+ ...customTheme?.control?.hover
49
+ },
47
50
  ...before
48
51
  };
49
52
  },
@@ -56,15 +59,17 @@ const customStyles = (error: any) => ({
56
59
  option: (provided: any, state: any) => ({
57
60
  ...provided,
58
61
  cursor: state.isDisabled ? "not-allowed" : "pointer",
59
- opacity: state.isDisabled ? "0.5" : "1",
62
+ opacity: state.isDisabled
63
+ ? customTheme?.option?.disabled?.opacity ?? "0.5"
64
+ : customTheme?.option?.opacity ?? "1",
60
65
  background:
61
66
  state.isOptionSelected || state.isSelected || state.isFocused
62
- ? colors.lightGrey
63
- : colors.white,
67
+ ? customTheme?.option?.selected?.background ?? colors.lightGrey
68
+ : customTheme?.option?.background ?? colors.white,
64
69
  color:
65
70
  state.isOptionSelected || state.isSelected
66
- ? colors.secondary
67
- : colors.black
71
+ ? customTheme?.option?.selected?.color ?? colors.secondary
72
+ : customTheme?.option?.color ?? colors.black
68
73
  }),
69
74
  indicatorSeparator: () => ({
70
75
  display: "none"
@@ -80,6 +85,7 @@ export default function SelectComponent({
80
85
  disabled = false,
81
86
  errorMessage,
82
87
  onChange,
88
+ theme,
83
89
  ...props
84
90
  }: SelectProps) {
85
91
  const [field, meta, helpers] = useField(name);
@@ -109,7 +115,7 @@ export default function SelectComponent({
109
115
  return (
110
116
  <>
111
117
  <Select
112
- styles={customStyles(displayErrorMessage)}
118
+ styles={customStyles(displayErrorMessage, theme)}
113
119
  {...field}
114
120
  {...props}
115
121
  placeholder={placeholder}
@@ -5,7 +5,7 @@ export { FormField } from "./FormField";
5
5
  export * from "./BaseInput";
6
6
  export { default as Input, InputProps } from "./Input";
7
7
  export { default as Phone } from "./Phone";
8
- export { default as Select } from "./Select";
8
+ export { default as Select, SelectProps } from "./Select";
9
9
  export * from "./CountrySelect";
10
10
  export * from "./BaseTagsInput";
11
11
  export * from "./BaseTextArea";
@@ -89,6 +89,39 @@ export interface SelectProps extends BaseProps {
89
89
  errorMessage?: string;
90
90
  onChange?: (option: SelectDataProps<string>) => void;
91
91
  label?: string;
92
+ theme?: Partial<{
93
+ control: Partial<{
94
+ background: CSSProperties["background"];
95
+ borderRadius: CSSProperties["borderRadius"];
96
+ padding: CSSProperties["padding"];
97
+ boxShadow: CSSProperties["boxShadow"];
98
+ borderWidth: CSSProperties["borderWidth"];
99
+ border: CSSProperties["border"];
100
+ focus: Partial<{
101
+ border: CSSProperties["border"];
102
+ }>;
103
+ hover: Partial<{
104
+ borderColor: CSSProperties["borderColor"];
105
+ borderWidth: CSSProperties["borderWidth"];
106
+ border: CSSProperties["border"];
107
+ }>;
108
+ error: Partial<{
109
+ border: CSSProperties["border"];
110
+ }>;
111
+ }>;
112
+ option: Partial<{
113
+ opacity: CSSProperties["opacity"];
114
+ background: CSSProperties["background"];
115
+ color: CSSProperties["color"];
116
+ selected: Partial<{
117
+ background: CSSProperties["background"];
118
+ color: CSSProperties["color"];
119
+ }>;
120
+ disabled: Partial<{
121
+ opacity: CSSProperties["opacity"];
122
+ }>;
123
+ }>;
124
+ }>;
92
125
  }
93
126
 
94
127
  export type UploadProps = BaseProps & {
@@ -1,4 +1,4 @@
1
- import styled, { css } from "styled-components";
1
+ import styled, { CSSProperties, css } from "styled-components";
2
2
  import { theme } from "../../theme";
3
3
 
4
4
  export const ImageWrapper = styled.div<{ $hide?: boolean }>`
@@ -27,11 +27,13 @@ const buttonText = css`
27
27
  line-height: 24px;
28
28
  `;
29
29
 
30
- export const ImagePlaceholder = styled.div<{ position?: string }>`
31
- ${({ position }) =>
32
- position
30
+ export const ImagePlaceholder = styled.div<{
31
+ $position?: CSSProperties["position"];
32
+ }>`
33
+ ${({ $position }) =>
34
+ $position
33
35
  ? css`
34
- position: ${position};
36
+ position: ${$position};
35
37
  `
36
38
  : css`
37
39
  position: absolute;
@@ -48,7 +48,7 @@ export const Image: React.FC<IBaseImage> = ({
48
48
  return (
49
49
  <>
50
50
  <ImageWrapper {...rest} data-image-wrapper $hide={!isError}>
51
- <ImagePlaceholder data-image-placeholder position="static">
51
+ <ImagePlaceholder data-image-placeholder $position="static">
52
52
  {errorConfig.errorIcon ?? null}
53
53
  <ImageErrorText>
54
54
  {errorConfig.errorImageText || "Failed to load image"}
@@ -56,7 +56,7 @@ export const Image: React.FC<IBaseImage> = ({
56
56
  </ImagePlaceholder>
57
57
  </ImageWrapper>
58
58
  <ImageWrapper {...rest} data-image-wrapper $hide={!isLoading}>
59
- <ImagePlaceholder data-image-placeholder position="static">
59
+ <ImagePlaceholder data-image-placeholder $position="static">
60
60
  <Loading />
61
61
  </ImagePlaceholder>
62
62
  </ImageWrapper>
@@ -28,7 +28,7 @@ import { Typography } from "../../../../ui/Typography";
28
28
  import {
29
29
  getItemFromStorage,
30
30
  saveItemInStorage
31
- } from "../../../../widgets/finance/storage/useLocalStorage";
31
+ } from "../../../../../hooks/storage/useBosonLocalStorage";
32
32
  import { useModal } from "../../../useModal";
33
33
  import { InnerDetailViewWithPortal } from "../../common/detail/InnerDetailViewWithPortal";
34
34
  import { BuyOrSwapContainer } from "../../common/detail/BuyOrSwapContainer";
@@ -4,7 +4,7 @@ import styled from "styled-components";
4
4
  import { useExchanges } from "../../../../../hooks/useExchanges";
5
5
  import { getOfferDetails } from "../../../../../lib/offer/getOfferDetails";
6
6
  import { Grid } from "../../../../ui/Grid";
7
- import IpfsImage from "../../../../ui/IpfsImage";
7
+ import { IpfsImage } from "../../../../ui/IpfsImage";
8
8
  import Loading from "../../../../ui/loading/LoadingWrapper";
9
9
  import { Typography } from "../../../../ui/Typography";
10
10
  import DetailOpenSea from "../../common/DetailOpenSea";
@@ -19,7 +19,7 @@ import { useCoreSDKWithContext } from "../../../../../hooks/core-sdk/useCoreSdkW
19
19
  import { isNftItem } from "../../../../../lib/bundle/filter";
20
20
  import { isTruthy } from "../../../../../types/helpers";
21
21
  import Video from "../../../../ui/Video";
22
- import IpfsImage from "../../../../ui/IpfsImage";
22
+ import { IpfsImage } from "../../../../ui/IpfsImage";
23
23
 
24
24
  const StyledDetailsSummary = styled(DetailsSummary)`
25
25
  .icon-wrapper {
@@ -13,7 +13,7 @@ import styled, { css } from "styled-components";
13
13
  import { breakpointNumbers } from "../../../../../lib/ui/breakpoint";
14
14
  import { theme } from "../../../../../theme";
15
15
  import { Grid } from "../../../../ui/Grid";
16
- import IpfsImage from "../../../../ui/IpfsImage";
16
+ import { IpfsImage } from "../../../../ui/IpfsImage";
17
17
  import Video from "../../../../ui/Video";
18
18
  import { zIndex } from "../../../../ui/zIndex";
19
19
  import { GlideSlide } from "./Detail.style";
@@ -12,7 +12,7 @@ import { theme } from "../../../../../theme";
12
12
  import { Offer } from "../../../../../types/offer";
13
13
  import { Tooltip } from "../../../../tooltip/Tooltip";
14
14
  import { Grid } from "../../../../ui/Grid";
15
- import IpfsImage from "../../../../ui/IpfsImage";
15
+ import { IpfsImage } from "../../../../ui/IpfsImage";
16
16
  import ThemedButton from "../../../../ui/ThemedButton";
17
17
  import { Typography } from "../../../../ui/Typography";
18
18
  import Video from "../../../../ui/Video";
@@ -3,7 +3,7 @@ import "slick-carousel/slick/slick.css";
3
3
  import "slick-carousel/slick/slick-theme.css";
4
4
  import _Slider, { Settings } from "react-slick";
5
5
 
6
- import IpfsImage from "../../../../ui/IpfsImage";
6
+ import { IpfsImage } from "../../../../ui/IpfsImage";
7
7
  import Video from "../../../../ui/Video";
8
8
  import styled, { CSSProperties, css } from "styled-components";
9
9
  import { theme } from "../../../../../theme";
@@ -0,0 +1,77 @@
1
+ import React, { ReactElement } from "react";
2
+ import styled, { CSSProperties, css } from "styled-components";
3
+ import { Grid, GridProps } from "./Grid";
4
+ import { Typography, TypographyProps } from "./Typography";
5
+
6
+ export type CardCTAProps = GridProps & {
7
+ title: string;
8
+ text: string;
9
+ icon: ReactElement;
10
+ cta: ReactElement;
11
+ titleProps?: TypographyProps;
12
+ textProps?: TypographyProps;
13
+ theme: {
14
+ background: CSSProperties["background"];
15
+ color: CSSProperties["color"];
16
+ padding: CSSProperties["padding"];
17
+ border: CSSProperties["border"];
18
+ borderRadius: CSSProperties["borderRadius"];
19
+ };
20
+ };
21
+
22
+ const StyledGrid = styled(Grid)<{ theme: CardCTAProps["theme"] }>`
23
+ ${(props) => {
24
+ return css`
25
+ background: ${props.theme.background};
26
+ color: ${props.theme.color};
27
+ padding: ${props.theme.padding};
28
+ border: ${props.theme.border};
29
+ border-radius: ${props.theme.borderRadius};
30
+ `;
31
+ }}
32
+ `;
33
+
34
+ const IconContainer = styled(Grid)`
35
+ top: 0.5rem;
36
+ right: 0;
37
+ margin-bottom: 1rem;
38
+ svg {
39
+ > * {
40
+ stroke-width: 14px;
41
+ }
42
+ }
43
+ `;
44
+
45
+ export const CardCTA: React.FC<CardCTAProps> = ({
46
+ title,
47
+ text,
48
+ icon,
49
+ cta,
50
+ theme,
51
+ titleProps,
52
+ textProps,
53
+ ...rest
54
+ }) => {
55
+ return (
56
+ <StyledGrid
57
+ flexDirection="column"
58
+ alignItems="flex-start"
59
+ padding="1.5rem"
60
+ theme={theme}
61
+ {...rest}
62
+ >
63
+ <>
64
+ <div>
65
+ <IconContainer>{icon}</IconContainer>
66
+ <Typography fontWeight="600" fontSize="1.25rem" {...titleProps}>
67
+ {title}
68
+ </Typography>
69
+ </div>
70
+ <Typography tag="p" {...textProps}>
71
+ {text}
72
+ </Typography>
73
+ {cta}
74
+ </>
75
+ </StyledGrid>
76
+ );
77
+ };
@@ -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
- width: ${({ $width }) => $width || "100%"};
33
- height: ${({ $height }) => $height || "initial"};
33
+ ${({ $width }) => (isDefined($width) ? `width:${$width};` : "width: 100%;")}
34
+ height: ${({ $height }) => (isDefined($height) ? $height : "initial")};
34
35
  display: flex;
35
- align-items: ${({ $alignItems }) => $alignItems || "center"};
36
- flex-basis: ${({ $flexBasis }) => $flexBasis || "auto"};
37
- flex-direction: ${({ $flexDirection }) => $flexDirection || "row"};
38
- flex-grow: ${({ $flexGrow }) => $flexGrow || "initial"};
39
- flex-shrink: ${({ $flexShrink }) => $flexShrink || "initial"};
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 || "space-between"};
47
+ isDefined($justifyContent) ? $justifyContent : "space-between"};
42
48
 
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};` : "")}
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 }) => ($marginLeft ? `margin-left:${$marginLeft};` : "")}
55
- ${({ $alignSelf }) => ($alignSelf ? `align-self:${$alignSelf};` : "")}
56
- ${({ $justifySelf }) => ($justifySelf ? `justify-self:${$justifySelf};` : "")}
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;
@@ -86,7 +86,9 @@ interface IImage {
86
86
  ipfsGateway?: string;
87
87
  };
88
88
  }
89
- const IpfsImage: React.FC<IImage & React.HTMLAttributes<HTMLDivElement>> = ({
89
+ export const IpfsImage: React.FC<
90
+ IImage & React.HTMLAttributes<HTMLDivElement>
91
+ > = ({
90
92
  src,
91
93
  children,
92
94
  dataTestId = "image",
@@ -179,5 +181,3 @@ const IpfsImage: React.FC<IImage & React.HTMLAttributes<HTMLDivElement>> = ({
179
181
  </>
180
182
  );
181
183
  };
182
-
183
- export default IpfsImage;
@@ -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 }) => $alignItems && `align-items: ${$alignItems}`};
46
- ${({ $flexBasis }) => $flexBasis && `flex-basis: ${$flexBasis}`};
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 }) => $flexShrink && `flex-shrink: ${$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 }) => ($columnGap ? `column-gap:${$columnGap};` : "")}
56
- ${({ $gap }) => ($gap ? `gap:${$gap};` : "")}
57
- ${({ $flex }) => ($flex ? `> * { flex: ${$flex}; }` : "")}
58
- ${({ $padding }) => ($padding ? `padding:${$padding};` : "")}
59
- ${({ $margin }) => ($margin ? `margin:${$margin};` : "")}
60
- ${({ $marginTop }) => ($marginTop ? `margin-top:${$marginTop};` : "")}
61
- ${({ $marginRight }) => ($marginRight ? `margin-right:${$marginRight};` : "")}
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 }) => ($marginLeft ? `margin-left:${$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 }) => ($fontWeight ? `font-weight:${$fontWeight};` : "")}
69
- ${({ $lineHeight }) => ($lineHeight ? `line-height:${$lineHeight};` : "")}
70
- ${({ $color }) => ($color ? `color:${$color};` : "")}
71
- ${({ $background }) => ($background ? `background:${$background};` : "")}
72
- ${({ $cursor }) => ($cursor ? `cursor:${$cursor};` : "")}
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 }) => ($textAlign ? `text-align:${$textAlign};` : "")}
76
- ${({ $opacity }) => ($opacity ? `opacity:${$opacity};` : "")}
77
- ${({ $width }) => ($width ? `width:${$width};` : "")}
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 &