@developer_tribe/react-builder 1.2.30 → 1.2.32
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/build-components/BIcon/BIcon.d.ts +1 -1
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -1
- package/dist/build-components/BackgroundImage/BackgroundImage.d.ts +1 -1
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +1 -1
- package/dist/build-components/Button/Button.d.ts +1 -1
- package/dist/build-components/Button/ButtonProps.generated.d.ts +1 -1
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +5 -1
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +1 -1
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -1
- package/dist/build-components/Image/ImageProps.generated.d.ts +1 -1
- package/dist/build-components/Main/MainProps.generated.d.ts +1 -1
- package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -1
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardButton/OnboardButton.d.ts +1 -1
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -4
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardDot/OnboardDot.d.ts +1 -1
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallCloseButton/PaywallCloseButton.d.ts +1 -1
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -1
- package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -1
- package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -1
- package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -1
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +1 -1
- package/dist/build-components/Separator/SeparatorProps.generated.d.ts +1 -1
- package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
- package/dist/build-components/Text/Text.d.ts +1 -1
- package/dist/build-components/Text/TextProps.generated.d.ts +1 -1
- package/dist/build-components/View/ViewProps.generated.d.ts +1 -1
- package/dist/build-components/patterns.generated.d.ts +73 -69
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +4 -4
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +4 -4
- package/dist/index.web.esm.js.map +1 -1
- package/dist/utils/attributeStyle.d.ts +2 -2
- package/dist/utils/patterns.d.ts +2 -2
- package/dist/utils/useMergedStyle.d.ts +1 -1
- package/package.json +1 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +9 -9
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +9 -9
- package/src/RenderPage.tsx +42 -1
- package/src/assets/meta.json +1 -1
- package/src/assets/samples/vpn-onboard-1.json +21 -45
- package/src/assets/samples/vpn-onboard-2.json +21 -45
- package/src/assets/samples/vpn-onboard-3.json +21 -53
- package/src/assets/samples/vpn-onboard-4.json +21 -21
- package/src/assets/samples/vpn-onboard-5.json +33 -33
- package/src/assets/samples/vpn-onboard-6.json +21 -21
- package/src/assets/samples/vpn-onboard-7.json +21 -21
- package/src/build-components/BIcon/BIcon.tsx +1 -1
- package/src/build-components/BIcon/BIconProps.generated.ts +1 -1
- package/src/build-components/BIcon/pattern.json +4 -2
- package/src/build-components/BackgroundImage/BackgroundImage.tsx +2 -2
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +1 -1
- package/src/build-components/BackgroundImage/pattern.json +11 -3
- package/src/build-components/Button/Button.tsx +3 -3
- package/src/build-components/Button/ButtonProps.generated.ts +1 -1
- package/src/build-components/Button/pattern.json +5 -3
- package/src/build-components/Carousel/CarouselProps.generated.ts +1 -1
- package/src/build-components/Carousel/pattern.json +9 -3
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +1 -1
- package/src/build-components/CarouselDots/CarouselDots.tsx +8 -17
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +5 -1
- package/src/build-components/CarouselDots/pattern.json +12 -1
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +1 -1
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +1 -1
- package/src/build-components/CarouselProvider/pattern.json +5 -2
- package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
- package/src/build-components/CountDown/pattern.json +4 -2
- package/src/build-components/Image/ImageProps.generated.ts +1 -1
- package/src/build-components/Image/pattern.json +11 -4
- package/src/build-components/Main/Main.tsx +1 -0
- package/src/build-components/Main/MainProps.generated.ts +1 -1
- package/src/build-components/Main/pattern.json +4 -2
- package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -1
- package/src/build-components/NavigationBarColor/pattern.json +5 -3
- package/src/build-components/Onboard/OnboardProps.generated.ts +1 -1
- package/src/build-components/Onboard/pattern.json +7 -3
- package/src/build-components/OnboardButton/OnboardButton.tsx +3 -22
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -4
- package/src/build-components/OnboardButton/pattern.json +42 -44
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +1 -1
- package/src/build-components/OnboardButtons/pattern.json +16 -5
- package/src/build-components/OnboardDot/OnboardDot.tsx +10 -22
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +1 -1
- package/src/build-components/OnboardDot/pattern.json +6 -3
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -1
- package/src/build-components/OnboardFooter/pattern.json +4 -2
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +1 -1
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +1 -1
- package/src/build-components/OnboardItem/pattern.json +12 -4
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +1 -1
- package/src/build-components/OnboardProvider/pattern.json +9 -3
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -1
- package/src/build-components/OnboardSubtitle/pattern.json +5 -2
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -1
- package/src/build-components/OnboardTitle/pattern.json +5 -2
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
- package/src/build-components/PaywallBackground/pattern.json +4 -2
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +2 -2
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallCloseButton/pattern.json +4 -2
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +1 -1
- package/src/build-components/PaywallOptions/pattern.json +4 -2
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +1 -1
- package/src/build-components/PaywallProvider/pattern.json +4 -2
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallSubscribeButton/pattern.json +4 -2
- package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -1
- package/src/build-components/PriceTag/pattern.json +10 -4
- package/src/build-components/Pricing/PricingProps.generated.ts +1 -1
- package/src/build-components/Pricing/pattern.json +4 -2
- package/src/build-components/Promo/PromoProps.generated.ts +1 -1
- package/src/build-components/Promo/pattern.json +4 -2
- package/src/build-components/RadioButton/RadioButton.tsx +6 -3
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +1 -1
- package/src/build-components/RenderNode.generated.tsx +7 -7
- package/src/build-components/Separator/SeparatorProps.generated.ts +1 -1
- package/src/build-components/Separator/pattern.json +5 -3
- package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
- package/src/build-components/StatusBarColor/pattern.json +5 -3
- package/src/build-components/Text/Text.tsx +2 -2
- package/src/build-components/Text/TextProps.generated.ts +1 -1
- package/src/build-components/Text/pattern.json +5 -3
- package/src/build-components/View/ViewProps.generated.ts +1 -1
- package/src/build-components/View/pattern.json +18 -6
- package/src/build-components/patterns.generated.ts +73 -69
- package/src/build-components/useNode.ts +2 -16
- package/src/components/BuilderProvider.tsx +1 -1
- package/src/hooks/useLocalize.ts +1 -1
- package/src/migrations/migrations/1.1.2_extract_component_attributes_from_style.ts +31 -10
- package/src/utils/analyseNodeByPatterns.ts +2 -2
- package/src/utils/attributeStyle.ts +9 -3
- package/src/utils/extractImageStyle.ts +4 -4
- package/src/utils/patterns.ts +3 -3
- package/src/utils/projectColors.ts +3 -2
- package/src/utils/useMergedStyle.ts +9 -7
|
@@ -288,8 +288,6 @@
|
|
|
288
288
|
"type": "OnboardButton",
|
|
289
289
|
"attributes": {
|
|
290
290
|
"labelKey": "onboard.skip.one-page",
|
|
291
|
-
"button_text_color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
292
|
-
"button_background_color": "STATIC_COLORS.TRANSPARENT",
|
|
293
291
|
"events": [
|
|
294
292
|
{
|
|
295
293
|
"type": "Navigate",
|
|
@@ -298,7 +296,9 @@
|
|
|
298
296
|
}
|
|
299
297
|
],
|
|
300
298
|
"styles": {
|
|
301
|
-
"flex": 1
|
|
299
|
+
"flex": 1,
|
|
300
|
+
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
301
|
+
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
},
|
|
@@ -306,8 +306,6 @@
|
|
|
306
306
|
"type": "OnboardButton",
|
|
307
307
|
"attributes": {
|
|
308
308
|
"labelKey": "onboard.next.one-page",
|
|
309
|
-
"button_text_color": "STATIC_COLORS.WHITE",
|
|
310
|
-
"button_background_color": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND",
|
|
311
309
|
"events": [
|
|
312
310
|
{
|
|
313
311
|
"type": "Navigate",
|
|
@@ -316,7 +314,9 @@
|
|
|
316
314
|
}
|
|
317
315
|
],
|
|
318
316
|
"styles": {
|
|
319
|
-
"flex": 1
|
|
317
|
+
"flex": 1,
|
|
318
|
+
"color": "STATIC_COLORS.WHITE",
|
|
319
|
+
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -343,8 +343,6 @@
|
|
|
343
343
|
"type": "OnboardButton",
|
|
344
344
|
"attributes": {
|
|
345
345
|
"labelKey": "onboard.skip.two-page",
|
|
346
|
-
"button_text_color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
347
|
-
"button_background_color": "STATIC_COLORS.TRANSPARENT",
|
|
348
346
|
"events": [
|
|
349
347
|
{
|
|
350
348
|
"type": "Permission",
|
|
@@ -357,7 +355,9 @@
|
|
|
357
355
|
}
|
|
358
356
|
],
|
|
359
357
|
"styles": {
|
|
360
|
-
"flex": 1
|
|
358
|
+
"flex": 1,
|
|
359
|
+
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
360
|
+
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
},
|
|
@@ -365,8 +365,6 @@
|
|
|
365
365
|
"type": "OnboardButton",
|
|
366
366
|
"attributes": {
|
|
367
367
|
"labelKey": "onboard.next.two-page",
|
|
368
|
-
"button_text_color": "STATIC_COLORS.WHITE",
|
|
369
|
-
"button_background_color": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND",
|
|
370
368
|
"events": [
|
|
371
369
|
{
|
|
372
370
|
"type": "Permission",
|
|
@@ -379,7 +377,9 @@
|
|
|
379
377
|
}
|
|
380
378
|
],
|
|
381
379
|
"styles": {
|
|
382
|
-
"flex": 1
|
|
380
|
+
"flex": 1,
|
|
381
|
+
"color": "STATIC_COLORS.WHITE",
|
|
382
|
+
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -406,8 +406,6 @@
|
|
|
406
406
|
"type": "OnboardButton",
|
|
407
407
|
"attributes": {
|
|
408
408
|
"labelKey": "onboard.skip.three-page",
|
|
409
|
-
"button_text_color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
410
|
-
"button_background_color": "STATIC_COLORS.TRANSPARENT",
|
|
411
409
|
"events": [
|
|
412
410
|
{
|
|
413
411
|
"type": "Navigate",
|
|
@@ -416,7 +414,9 @@
|
|
|
416
414
|
}
|
|
417
415
|
],
|
|
418
416
|
"styles": {
|
|
419
|
-
"flex": 1
|
|
417
|
+
"flex": 1,
|
|
418
|
+
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
419
|
+
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
@@ -424,8 +424,6 @@
|
|
|
424
424
|
"type": "OnboardButton",
|
|
425
425
|
"attributes": {
|
|
426
426
|
"labelKey": "onboard.next.three-page",
|
|
427
|
-
"button_text_color": "STATIC_COLORS.WHITE",
|
|
428
|
-
"button_background_color": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND",
|
|
429
427
|
"events": [
|
|
430
428
|
{
|
|
431
429
|
"type": "Permission",
|
|
@@ -438,7 +436,9 @@
|
|
|
438
436
|
}
|
|
439
437
|
],
|
|
440
438
|
"styles": {
|
|
441
|
-
"flex": 1
|
|
439
|
+
"flex": 1,
|
|
440
|
+
"color": "STATIC_COLORS.WHITE",
|
|
441
|
+
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
}
|
|
@@ -465,8 +465,6 @@
|
|
|
465
465
|
"type": "OnboardButton",
|
|
466
466
|
"attributes": {
|
|
467
467
|
"labelKey": "onboard.allow.four-page",
|
|
468
|
-
"button_text_color": "STATIC_COLORS.WHITE",
|
|
469
|
-
"button_background_color": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND",
|
|
470
468
|
"events": [
|
|
471
469
|
{
|
|
472
470
|
"type": "Permission",
|
|
@@ -478,7 +476,9 @@
|
|
|
478
476
|
}
|
|
479
477
|
],
|
|
480
478
|
"styles": {
|
|
481
|
-
"flex": 1
|
|
479
|
+
"flex": 1,
|
|
480
|
+
"color": "STATIC_COLORS.WHITE",
|
|
481
|
+
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
}
|
|
@@ -9,7 +9,7 @@ import { Icon } from '../../components/Icon.generated';
|
|
|
9
9
|
import { IconsType } from '../../types/Icons.generated';
|
|
10
10
|
import { useExtractTextStyle } from '../../attribute-analyser/style/web/useExtractTextStyle';
|
|
11
11
|
|
|
12
|
-
function BIcon({ node }: BIconComponentProps) {
|
|
12
|
+
export function BIcon({ node }: BIconComponentProps) {
|
|
13
13
|
useLogRender('BIcon');
|
|
14
14
|
node = useNode(node);
|
|
15
15
|
const generatedId = useId();
|
|
@@ -63,7 +63,7 @@ export interface BIconStyleGenerated {
|
|
|
63
63
|
export interface BIconPropsGenerated {
|
|
64
64
|
child: string;
|
|
65
65
|
attributes: {
|
|
66
|
-
|
|
66
|
+
styles?: BIconStyleGenerated;
|
|
67
67
|
adjustsFontSizeToFit?: boolean;
|
|
68
68
|
showEllipsis?: boolean;
|
|
69
69
|
translateCounter?: number;
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"meta": {
|
|
16
|
-
"desiredParent": [
|
|
16
|
+
"desiredParent": [
|
|
17
|
+
"all"
|
|
18
|
+
],
|
|
17
19
|
"label": "BIcon",
|
|
18
20
|
"description": "Renders an icon from the icon set.",
|
|
19
21
|
"styles": {},
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
"defaults": {
|
|
45
47
|
"iconType": "activity",
|
|
46
48
|
"strokeWidth": 1.5,
|
|
47
|
-
"
|
|
49
|
+
"styles": {
|
|
48
50
|
"fontSize": "16"
|
|
49
51
|
}
|
|
50
52
|
}
|
|
@@ -8,7 +8,7 @@ import { useLogRender } from '../../utils/useLogRender';
|
|
|
8
8
|
import { isNodeSelected, SELECTED_OUTLINE_STYLE } from '../../utils/selection';
|
|
9
9
|
import { useMergedStyle } from '../../utils/useMergedStyle';
|
|
10
10
|
|
|
11
|
-
function BackgroundImage({ node }: BackgroundImageComponentProps) {
|
|
11
|
+
export function BackgroundImage({ node }: BackgroundImageComponentProps) {
|
|
12
12
|
useLogRender('BackgroundImage');
|
|
13
13
|
node = useNode(node);
|
|
14
14
|
const generatedId = useId();
|
|
@@ -20,7 +20,7 @@ function BackgroundImage({ node }: BackgroundImageComponentProps) {
|
|
|
20
20
|
const baseStyle = useExtractViewStyle(node);
|
|
21
21
|
const backgroundStyle = useMemo(() => {
|
|
22
22
|
const attrs = node.attributes;
|
|
23
|
-
const styleBag = attrs?.
|
|
23
|
+
const styleBag = attrs?.styles;
|
|
24
24
|
const style: React.CSSProperties = {
|
|
25
25
|
backgroundRepeat: 'no-repeat',
|
|
26
26
|
backgroundPosition: 'center',
|
|
@@ -60,7 +60,7 @@ export interface BackgroundImageStyleGenerated {
|
|
|
60
60
|
export interface BackgroundImagePropsGenerated {
|
|
61
61
|
child: string;
|
|
62
62
|
attributes: {
|
|
63
|
-
|
|
63
|
+
styles?: BackgroundImageStyleGenerated;
|
|
64
64
|
scrollable?: boolean;
|
|
65
65
|
src?: string;
|
|
66
66
|
resizeMode?: ResizeModeOptionType;
|
|
@@ -8,11 +8,16 @@
|
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"src": "string",
|
|
11
|
-
"resizeMode": [
|
|
11
|
+
"resizeMode": [
|
|
12
|
+
"cover",
|
|
13
|
+
"contain",
|
|
14
|
+
"stretch",
|
|
15
|
+
"center"
|
|
16
|
+
]
|
|
12
17
|
},
|
|
13
18
|
"defaults": {
|
|
14
19
|
"resizeMode": "cover",
|
|
15
|
-
"
|
|
20
|
+
"styles": {
|
|
16
21
|
"width": "100%",
|
|
17
22
|
"height": "100%",
|
|
18
23
|
"position": "absolute",
|
|
@@ -24,7 +29,10 @@
|
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"meta": {
|
|
27
|
-
"desiredParent": [
|
|
32
|
+
"desiredParent": [
|
|
33
|
+
"all",
|
|
34
|
+
"background"
|
|
35
|
+
],
|
|
28
36
|
"label": "Background Image",
|
|
29
37
|
"description": "Background image.",
|
|
30
38
|
"styles": {
|
|
@@ -9,7 +9,7 @@ import { isNodeSelected, SELECTED_OUTLINE_STYLE } from '../../utils/selection';
|
|
|
9
9
|
import { useMergedStyle } from '../../utils/useMergedStyle';
|
|
10
10
|
import { useLocalize } from '../../hooks/useLocalize';
|
|
11
11
|
|
|
12
|
-
function Button({ node }: ButtonComponentProps) {
|
|
12
|
+
export function Button({ node }: ButtonComponentProps) {
|
|
13
13
|
useLogRender('Button');
|
|
14
14
|
node = useNode(node);
|
|
15
15
|
const generatedId = useId();
|
|
@@ -33,7 +33,7 @@ function Button({ node }: ButtonComponentProps) {
|
|
|
33
33
|
combinedTextStyle.textAlign,
|
|
34
34
|
]);
|
|
35
35
|
const buttonDefaults = useMemo(() => {
|
|
36
|
-
const styleBag = node?.attributes?.
|
|
36
|
+
const styleBag = node?.attributes?.styles;
|
|
37
37
|
const hasExplicitBackground =
|
|
38
38
|
styleBag?.backgroundColor !== undefined &&
|
|
39
39
|
styleBag?.backgroundColor !== null &&
|
|
@@ -45,7 +45,7 @@ function Button({ node }: ButtonComponentProps) {
|
|
|
45
45
|
? undefined
|
|
46
46
|
: { backgroundColor: 'transparent' }),
|
|
47
47
|
} as React.CSSProperties;
|
|
48
|
-
}, [node?.attributes?.
|
|
48
|
+
}, [node?.attributes?.styles]);
|
|
49
49
|
const isSelected = isNodeSelected({
|
|
50
50
|
previewMode: !!previewMode,
|
|
51
51
|
current: selectedKey ? { key: selectedKey } : undefined,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"children": "string",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"
|
|
10
|
+
"styles": {
|
|
11
11
|
"color": "color",
|
|
12
12
|
"fontSize": "size",
|
|
13
13
|
"fontWeight": [
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"meta": {
|
|
30
|
-
"desiredParent": [
|
|
30
|
+
"desiredParent": [
|
|
31
|
+
"all"
|
|
32
|
+
],
|
|
31
33
|
"label": "Button",
|
|
32
34
|
"description": "Simple action button.",
|
|
33
35
|
"styles": {
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
}
|
|
56
58
|
},
|
|
57
59
|
"defaults": {
|
|
58
|
-
"
|
|
60
|
+
"styles": {
|
|
59
61
|
"display": "flex",
|
|
60
62
|
"alignItems": "center",
|
|
61
63
|
"justifyContent": "center",
|
|
@@ -9,17 +9,23 @@
|
|
|
9
9
|
"attributes": {
|
|
10
10
|
"loop": "boolean",
|
|
11
11
|
"dragFree": "boolean",
|
|
12
|
-
"align": [
|
|
12
|
+
"align": [
|
|
13
|
+
"start",
|
|
14
|
+
"center",
|
|
15
|
+
"end"
|
|
16
|
+
]
|
|
13
17
|
}
|
|
14
18
|
},
|
|
15
19
|
"meta": {
|
|
16
|
-
"desiredParent": [
|
|
20
|
+
"desiredParent": [
|
|
21
|
+
"=CarouselProvider"
|
|
22
|
+
],
|
|
17
23
|
"label": "Carousel",
|
|
18
24
|
"description": "Container for carousel items.",
|
|
19
25
|
"styles": {}
|
|
20
26
|
},
|
|
21
27
|
"defaults": {
|
|
22
|
-
"
|
|
28
|
+
"styles": {
|
|
23
29
|
"flexDirection": "row"
|
|
24
30
|
}
|
|
25
31
|
}
|
|
@@ -63,7 +63,7 @@ export interface CarouselButtonsStyleGenerated {
|
|
|
63
63
|
export interface CarouselButtonsPropsGenerated {
|
|
64
64
|
child: string;
|
|
65
65
|
attributes: {
|
|
66
|
-
|
|
66
|
+
styles?: CarouselButtonsStyleGenerated;
|
|
67
67
|
scrollable?: boolean;
|
|
68
68
|
buttonType?: ButtonTypeOptionType;
|
|
69
69
|
skipNumber?: number;
|
|
@@ -34,9 +34,7 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
|
|
|
34
34
|
const onboardApi = useContext(onboardContext);
|
|
35
35
|
const emblaApi = isOnboard ? onboardApi?.emblaApi : carouselApi;
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
const GHOST_DOT_DARK_COLOR = '#E4E5E7';
|
|
39
|
-
const GHOST_DOT_LIGHT_COLOR = '#F7F7F9';
|
|
37
|
+
const { mockTheme: theme, projectColors, baseSize } = useBuilderParams();
|
|
40
38
|
const inactiveDotOpacity =
|
|
41
39
|
(stylesBag?.inactive_dot_opacity as number | undefined) ??
|
|
42
40
|
(attrRecord.inactive_dot_opacity as number | undefined) ??
|
|
@@ -51,23 +49,14 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
|
|
|
51
49
|
(stylesBag?.dot_thickness as string | number | undefined) ??
|
|
52
50
|
(attrRecord.dot_thickness as string | number | undefined);
|
|
53
51
|
|
|
54
|
-
const { mockTheme: theme, projectColors, baseSize } = useBuilderParams();
|
|
55
|
-
const isDark = theme === 'dark';
|
|
56
|
-
const inactiveDotColorBase = isDark
|
|
57
|
-
? GHOST_DOT_DARK_COLOR
|
|
58
|
-
: GHOST_DOT_LIGHT_COLOR;
|
|
59
|
-
|
|
60
52
|
const resolvedActiveDotColor = useMemo(
|
|
61
53
|
() => parseColor(activeDotColor, { theme, projectColors }),
|
|
62
54
|
[activeDotColor, theme, projectColors],
|
|
63
55
|
);
|
|
64
|
-
const resolvedInactiveDotColor = useMemo(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
return parsed ?? inactiveDotColorBase;
|
|
70
|
-
}, [inactiveDotColorBase, inactiveDotColorOverride, theme, projectColors]);
|
|
56
|
+
const resolvedInactiveDotColor = useMemo(
|
|
57
|
+
() => parseColor(inactiveDotColorOverride, { theme, projectColors }),
|
|
58
|
+
[inactiveDotColorOverride, theme, projectColors],
|
|
59
|
+
);
|
|
71
60
|
|
|
72
61
|
const dotSizeCss = useMemo(() => {
|
|
73
62
|
const parsed = parseSize(dotThicknessRaw, baseSize);
|
|
@@ -132,7 +121,9 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
|
|
|
132
121
|
isDotSelected && resolvedActiveDotColor
|
|
133
122
|
? resolvedActiveDotColor
|
|
134
123
|
: resolvedInactiveDotColor;
|
|
135
|
-
const activeFallback =
|
|
124
|
+
const activeFallback =
|
|
125
|
+
resolvedActiveDotColor ??
|
|
126
|
+
parseColor('STATIC_COLORS.ONBOARD_DOT_ACTIVE', { projectColors });
|
|
136
127
|
const dotColor = resolvedColor ?? activeFallback;
|
|
137
128
|
|
|
138
129
|
return (
|
|
@@ -66,9 +66,13 @@ export interface CarouselDotsStyleGenerated {
|
|
|
66
66
|
export interface CarouselDotsPropsGenerated {
|
|
67
67
|
child: string;
|
|
68
68
|
attributes: {
|
|
69
|
-
|
|
69
|
+
styles?: CarouselDotsStyleGenerated;
|
|
70
70
|
scrollable?: boolean;
|
|
71
71
|
dotType?: DotTypeOptionType;
|
|
72
|
+
dot_thickness?: string;
|
|
73
|
+
inactive_dot_opacity?: number;
|
|
74
|
+
inactive_dot_color?: string;
|
|
75
|
+
active_dot_color?: string;
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
78
|
|
|
@@ -14,9 +14,20 @@
|
|
|
14
14
|
"sliding_border",
|
|
15
15
|
"sliding_dot",
|
|
16
16
|
"liquid_like"
|
|
17
|
-
]
|
|
17
|
+
],
|
|
18
|
+
"dot_thickness": "size",
|
|
19
|
+
"inactive_dot_opacity": "number",
|
|
20
|
+
"inactive_dot_color": "color",
|
|
21
|
+
"active_dot_color": "color"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
24
|
+
"defaults": {
|
|
25
|
+
"dotType": "expanding_dot",
|
|
26
|
+
"dot_thickness": 10,
|
|
27
|
+
"inactive_dot_opacity": 0.3,
|
|
28
|
+
"active_dot_color": "STATIC_COLORS.ONBOARD_DOT_ACTIVE",
|
|
29
|
+
"inactive_dot_color": "THEME_COLORS.BACKGROUND"
|
|
30
|
+
},
|
|
20
31
|
"meta": {
|
|
21
32
|
"desiredParent": [">CarouselProvider"],
|
|
22
33
|
"label": "Carousel Dots",
|
|
@@ -59,7 +59,7 @@ export interface CarouselProviderStyleGenerated {
|
|
|
59
59
|
export interface CarouselProviderPropsGenerated {
|
|
60
60
|
child: string;
|
|
61
61
|
attributes: {
|
|
62
|
-
|
|
62
|
+
styles?: CarouselProviderStyleGenerated;
|
|
63
63
|
scrollable?: boolean;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -8,14 +8,17 @@
|
|
|
8
8
|
"children": "node",
|
|
9
9
|
"extends": "View",
|
|
10
10
|
"defaults": {
|
|
11
|
-
"
|
|
11
|
+
"styles": {
|
|
12
12
|
"width": "100%",
|
|
13
13
|
"height": "100%"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"meta": {
|
|
18
|
-
"desiredParent": [
|
|
18
|
+
"desiredParent": [
|
|
19
|
+
"root",
|
|
20
|
+
">View"
|
|
21
|
+
],
|
|
19
22
|
"label": "Carousel Provider",
|
|
20
23
|
"description": "Provides carousel context to its children.",
|
|
21
24
|
"attributes": {}
|
|
@@ -64,7 +64,7 @@ export interface CountDownStyleGenerated {
|
|
|
64
64
|
export interface CountDownPropsGenerated {
|
|
65
65
|
child: string;
|
|
66
66
|
attributes: {
|
|
67
|
-
|
|
67
|
+
styles?: CountDownStyleGenerated;
|
|
68
68
|
adjustsFontSizeToFit?: boolean;
|
|
69
69
|
showEllipsis?: boolean;
|
|
70
70
|
translateCounter?: number;
|
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
"extends": "Text",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"count": "number",
|
|
11
|
-
"
|
|
11
|
+
"styles": {
|
|
12
12
|
"width": "never",
|
|
13
13
|
"textAlign": "never"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"meta": {
|
|
18
|
-
"desiredParent": [
|
|
18
|
+
"desiredParent": [
|
|
19
|
+
"all"
|
|
20
|
+
],
|
|
19
21
|
"label": "Count Down",
|
|
20
22
|
"description": "Displays a countdown timer.",
|
|
21
23
|
"attributes": {
|
|
@@ -8,18 +8,25 @@
|
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"src": "string",
|
|
11
|
-
"
|
|
12
|
-
"resizeMode": [
|
|
11
|
+
"styles": {
|
|
12
|
+
"resizeMode": [
|
|
13
|
+
"cover",
|
|
14
|
+
"contain",
|
|
15
|
+
"stretch",
|
|
16
|
+
"center"
|
|
17
|
+
]
|
|
13
18
|
}
|
|
14
19
|
},
|
|
15
20
|
"defaults": {
|
|
16
|
-
"
|
|
21
|
+
"styles": {
|
|
17
22
|
"resizeMode": "contain"
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
"meta": {
|
|
22
|
-
"desiredParent": [
|
|
27
|
+
"desiredParent": [
|
|
28
|
+
"all"
|
|
29
|
+
],
|
|
23
30
|
"label": "Image",
|
|
24
31
|
"description": "Shows an image or graphic.",
|
|
25
32
|
"styles": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"defaults": {
|
|
14
14
|
"useSafeAreaView": true,
|
|
15
|
-
"
|
|
15
|
+
"styles": {
|
|
16
16
|
"width": "100%",
|
|
17
17
|
"height": "100%",
|
|
18
18
|
"flex": 1,
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"meta": {
|
|
23
|
-
"desiredParent": [
|
|
23
|
+
"desiredParent": [
|
|
24
|
+
"root"
|
|
25
|
+
],
|
|
24
26
|
"label": "Main",
|
|
25
27
|
"description": "Top-level screen wrapper (safe area, base layout).",
|
|
26
28
|
"hideAllAttributes": true,
|
|
@@ -59,7 +59,7 @@ export interface NavigationBarColorStyleGenerated {
|
|
|
59
59
|
export interface NavigationBarColorPropsGenerated {
|
|
60
60
|
child: string;
|
|
61
61
|
attributes: {
|
|
62
|
-
|
|
62
|
+
styles?: NavigationBarColorStyleGenerated;
|
|
63
63
|
scrollable?: boolean;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
"children": "never",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"
|
|
10
|
+
"styles": {
|
|
11
11
|
"backgroundColor": "color"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"meta": {
|
|
16
|
-
"desiredParent": [
|
|
16
|
+
"desiredParent": [
|
|
17
|
+
"all"
|
|
18
|
+
],
|
|
17
19
|
"label": "Navigation Bar Color",
|
|
18
20
|
"description": "Sets the OS navigation bar background color.",
|
|
19
21
|
"styles": {
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
31
|
"defaults": {
|
|
30
|
-
"
|
|
32
|
+
"styles": {
|
|
31
33
|
"backgroundColor": "THEME_COLORS.BACKGROUND"
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -8,14 +8,18 @@
|
|
|
8
8
|
"extends": "View"
|
|
9
9
|
},
|
|
10
10
|
"meta": {
|
|
11
|
-
"desiredParent": [
|
|
12
|
-
|
|
11
|
+
"desiredParent": [
|
|
12
|
+
"=OnboardProvider"
|
|
13
|
+
],
|
|
14
|
+
"desiredChildren": [
|
|
15
|
+
"=OnboardItem"
|
|
16
|
+
],
|
|
13
17
|
"label": "Onboard",
|
|
14
18
|
"description": "Wraps the onboarding flow.",
|
|
15
19
|
"styles": {}
|
|
16
20
|
},
|
|
17
21
|
"defaults": {
|
|
18
|
-
"
|
|
22
|
+
"styles": {
|
|
19
23
|
"flexDirection": "row"
|
|
20
24
|
}
|
|
21
25
|
}
|