@proulr/sdui-components 0.1.43 → 0.1.44
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/package.json
CHANGED
|
Binary file
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import QRCode from 'react-native-qrcode-svg';
|
|
4
|
-
import
|
|
4
|
+
import brandMarkAsset from '../assets/proulr-brand-mark.png';
|
|
5
|
+
import { gradients, m3Colors, m3Shape, m3Type, spacing } from '../theme/proulr-theme';
|
|
5
6
|
import { resolveViewStyleProps } from '../theme/resolve-style-props';
|
|
6
7
|
import type { SduiBlockRenderProps } from './SduiPrimitiveBlocks';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Nametag de QR estilo "cartão de convite" (ref. Instagram): cartão claro
|
|
10
|
-
* (inverseSurface) com QR
|
|
11
|
+
* (inverseSurface) com QR customizado da marca — módulos no gradiente Proulr
|
|
12
|
+
* (roxo → fúcsia) e brand mark no centro (ECC alto para manter a leitura).
|
|
11
13
|
* Wire: `value` = conteúdo do QR, `size` em px, `label` = texto sob o código.
|
|
12
14
|
*/
|
|
13
15
|
export function SduiQrCodeBlock({ block }: SduiBlockRenderProps) {
|
|
@@ -24,8 +26,15 @@ export function SduiQrCodeBlock({ block }: SduiBlockRenderProps) {
|
|
|
24
26
|
<QRCode
|
|
25
27
|
value={value}
|
|
26
28
|
size={size}
|
|
27
|
-
color={m3Colors.inverseOnSurface}
|
|
28
29
|
backgroundColor={m3Colors.inverseSurface}
|
|
30
|
+
enableLinearGradient
|
|
31
|
+
linearGradient={[...gradients.brand]}
|
|
32
|
+
ecl="H"
|
|
33
|
+
logo={brandMarkAsset}
|
|
34
|
+
logoSize={Math.round(size * 0.22)}
|
|
35
|
+
logoBackgroundColor={m3Colors.inverseSurface}
|
|
36
|
+
logoMargin={Math.max(3, Math.round(size * 0.02))}
|
|
37
|
+
logoBorderRadius={m3Shape.cornerMedium}
|
|
29
38
|
/>
|
|
30
39
|
{label ? <Text style={styles.label}>{label}</Text> : null}
|
|
31
40
|
</View>
|