@telefonica/mistica 16.67.0 → 16.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -5
- package/css/mistica.css +1 -1
- package/dist/accordion.css-mistica.js +6 -6
- package/dist/align.css-mistica.js +1 -1
- package/dist/autocomplete.css-mistica.js +1 -1
- package/dist/avatar.css-mistica.js +1 -1
- package/dist/badge.css-mistica.js +1 -1
- package/dist/box.css-mistica.js +13 -13
- package/dist/boxed.css-mistica.js +24 -24
- package/dist/button-group.css-mistica.js +1 -1
- package/dist/button-layout.css-mistica.js +14 -14
- package/dist/button.css-mistica.js +55 -46
- package/dist/button.css.d.ts +3 -0
- package/dist/button.js +133 -124
- package/dist/callout.css-mistica.js +11 -11
- package/dist/card-internal.css-mistica.js +15 -15
- package/dist/carousel.css-mistica.js +8 -8
- package/dist/checkbox.css-mistica.js +11 -11
- package/dist/chip.css-mistica.js +15 -15
- package/dist/circle.css-mistica.js +1 -1
- package/dist/community/advanced-data-card.css-mistica.js +6 -6
- package/dist/community/ai-card.css-mistica.js +11 -11
- package/dist/community/blocks.css-mistica.js +1 -1
- package/dist/community/cyber/example-component.css-mistica.js +1 -1
- package/dist/community/example-component.css-mistica.js +2 -2
- package/dist/community/skins/cyber-skin.js +9 -8
- package/dist/counter.css-mistica.js +1 -1
- package/dist/cover-hero.css-mistica.js +2 -2
- package/dist/credit-card-number-field.css-mistica.js +3 -3
- package/dist/date-field.css-mistica.js +1 -1
- package/dist/date-time-picker.css-mistica.js +1 -1
- package/dist/dialog.css-mistica.js +4 -4
- package/dist/divider.css-mistica.js +5 -5
- package/dist/double-field.css-mistica.js +2 -2
- package/dist/drawer.css-mistica.js +1 -1
- package/dist/empty-state-card.css-mistica.js +1 -1
- package/dist/empty-state.css-mistica.js +5 -5
- package/dist/fade-in.css-mistica.js +1 -1
- package/dist/feedback.css-mistica.js +1 -1
- package/dist/file-upload.css-mistica.js +7 -7
- package/dist/fixed-footer-layout.css-mistica.js +2 -2
- package/dist/focus-trap.d.ts +3 -1
- package/dist/focus-trap.js +6 -5
- package/dist/form.css-mistica.js +1 -1
- package/dist/grid-layout.css-mistica.js +3 -3
- package/dist/grid.css-mistica.js +120 -120
- package/dist/header.css-mistica.js +1 -1
- package/dist/hero.css-mistica.js +2 -2
- package/dist/horizontal-scroll.css-mistica.js +1 -1
- package/dist/icon-button.css-mistica.js +53 -53
- package/dist/icons/icon-chevron.css-mistica.js +2 -2
- package/dist/icons/icon-error.css-mistica.js +1 -1
- package/dist/image.css-mistica.js +11 -11
- package/dist/inline.css-mistica.js +9 -9
- package/dist/list.css-mistica.js +1 -1
- package/dist/loading-bar.css-mistica.js +1 -1
- package/dist/loading-screen.css-mistica.js +4 -4
- package/dist/logo.css-mistica.js +5 -5
- package/dist/menu.css-mistica.js +13 -13
- package/dist/menu.js +27 -27
- package/dist/mosaic.css-mistica.js +1 -1
- package/dist/navigation-bar.css-mistica.js +18 -18
- package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
- package/dist/package-version.js +1 -1
- package/dist/pin-field.css-mistica.js +1 -1
- package/dist/popover.css-mistica.js +1 -1
- package/dist/progress-bar.css-mistica.js +6 -6
- package/dist/radio-button.css-mistica.js +19 -19
- package/dist/rating.css-mistica.js +2 -2
- package/dist/responsive-layout.css-mistica.js +6 -6
- package/dist/screen-reader-only.css-mistica.js +1 -1
- package/dist/select.css-mistica.js +15 -15
- package/dist/sheet-action-row.css-mistica.js +1 -1
- package/dist/sheet-common.css-mistica.js +1 -1
- package/dist/sheet-info.css-mistica.js +1 -1
- package/dist/skeletons.css-mistica.js +6 -6
- package/dist/skins/skin-contract.css-mistica.js +684 -684
- package/dist/skip-link.css-mistica.js +1 -1
- package/dist/slider.css-mistica.js +18 -18
- package/dist/snackbar.css-mistica.js +4 -4
- package/dist/spinner.css-mistica.js +1 -1
- package/dist/square.css-mistica.js +1 -1
- package/dist/stack.css-mistica.js +5 -5
- package/dist/stacking-group.css-mistica.js +1 -1
- package/dist/stepper.css-mistica.js +2 -2
- package/dist/switch-component.css-mistica.js +35 -35
- package/dist/table.css-mistica.js +9 -9
- package/dist/tabs.css-mistica.js +17 -17
- package/dist/tag.css-mistica.js +1 -1
- package/dist/text-field-base.css-mistica.js +15 -15
- package/dist/text-field-components.css-mistica.js +3 -3
- package/dist/text-link.css-mistica.js +6 -6
- package/dist/text.css-mistica.js +6 -6
- package/dist/theme-context.css-mistica.js +1 -1
- package/dist/timeline.css-mistica.js +9 -9
- package/dist/timer.css-mistica.js +6 -6
- package/dist/tooltip.css-mistica.js +1 -1
- package/dist/touchable.css-mistica.js +1 -1
- package/dist/utils/aspect-ratio-support.css-mistica.js +2 -2
- package/dist/video.css-mistica.js +1 -1
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
- package/dist-es/accordion.css-mistica.js +6 -6
- package/dist-es/align.css-mistica.js +1 -1
- package/dist-es/autocomplete.css-mistica.js +1 -1
- package/dist-es/avatar.css-mistica.js +1 -1
- package/dist-es/badge.css-mistica.js +1 -1
- package/dist-es/box.css-mistica.js +13 -13
- package/dist-es/boxed.css-mistica.js +23 -23
- package/dist-es/button-group.css-mistica.js +1 -1
- package/dist-es/button-layout.css-mistica.js +14 -14
- package/dist-es/button.css-mistica.js +35 -35
- package/dist-es/button.js +168 -159
- package/dist-es/callout.css-mistica.js +11 -11
- package/dist-es/card-internal.css-mistica.js +15 -15
- package/dist-es/carousel.css-mistica.js +8 -8
- package/dist-es/checkbox.css-mistica.js +11 -11
- package/dist-es/chip.css-mistica.js +15 -15
- package/dist-es/circle.css-mistica.js +1 -1
- package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
- package/dist-es/community/ai-card.css-mistica.js +4 -4
- package/dist-es/community/blocks.css-mistica.js +1 -1
- package/dist-es/community/cyber/example-component.css-mistica.js +1 -1
- package/dist-es/community/example-component.css-mistica.js +2 -2
- package/dist-es/community/skins/cyber-skin.js +9 -8
- package/dist-es/counter.css-mistica.js +1 -1
- package/dist-es/cover-hero.css-mistica.js +2 -2
- package/dist-es/credit-card-number-field.css-mistica.js +3 -3
- package/dist-es/date-field.css-mistica.js +1 -1
- package/dist-es/date-time-picker.css-mistica.js +1 -1
- package/dist-es/dialog.css-mistica.js +4 -4
- package/dist-es/divider.css-mistica.js +5 -5
- package/dist-es/double-field.css-mistica.js +2 -2
- package/dist-es/drawer.css-mistica.js +1 -1
- package/dist-es/empty-state-card.css-mistica.js +1 -1
- package/dist-es/empty-state.css-mistica.js +5 -5
- package/dist-es/fade-in.css-mistica.js +1 -1
- package/dist-es/feedback.css-mistica.js +1 -1
- package/dist-es/file-upload.css-mistica.js +7 -7
- package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
- package/dist-es/focus-trap.js +8 -7
- package/dist-es/form.css-mistica.js +1 -1
- package/dist-es/grid-layout.css-mistica.js +3 -3
- package/dist-es/grid.css-mistica.js +120 -120
- package/dist-es/header.css-mistica.js +1 -1
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/horizontal-scroll.css-mistica.js +1 -1
- package/dist-es/icon-button.css-mistica.js +53 -53
- package/dist-es/icons/icon-chevron.css-mistica.js +2 -2
- package/dist-es/icons/icon-error.css-mistica.js +1 -1
- package/dist-es/image.css-mistica.js +4 -4
- package/dist-es/inline.css-mistica.js +9 -9
- package/dist-es/list.css-mistica.js +1 -1
- package/dist-es/loading-bar.css-mistica.js +1 -1
- package/dist-es/loading-screen.css-mistica.js +4 -4
- package/dist-es/logo.css-mistica.js +5 -5
- package/dist-es/menu.css-mistica.js +13 -13
- package/dist-es/menu.js +35 -35
- package/dist-es/mosaic.css-mistica.js +1 -1
- package/dist-es/navigation-bar.css-mistica.js +18 -18
- package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.css-mistica.js +1 -1
- package/dist-es/popover.css-mistica.js +1 -1
- package/dist-es/progress-bar.css-mistica.js +6 -6
- package/dist-es/radio-button.css-mistica.js +19 -19
- package/dist-es/rating.css-mistica.js +2 -2
- package/dist-es/responsive-layout.css-mistica.js +6 -6
- package/dist-es/screen-reader-only.css-mistica.js +1 -1
- package/dist-es/select.css-mistica.js +15 -15
- package/dist-es/sheet-action-row.css-mistica.js +1 -1
- package/dist-es/sheet-common.css-mistica.js +1 -1
- package/dist-es/sheet-info.css-mistica.js +1 -1
- package/dist-es/skeletons.css-mistica.js +6 -6
- package/dist-es/skins/skin-contract.css-mistica.js +684 -684
- package/dist-es/skip-link.css-mistica.js +1 -1
- package/dist-es/slider.css-mistica.js +18 -18
- package/dist-es/snackbar.css-mistica.js +4 -4
- package/dist-es/spinner.css-mistica.js +1 -1
- package/dist-es/square.css-mistica.js +1 -1
- package/dist-es/stack.css-mistica.js +5 -5
- package/dist-es/stacking-group.css-mistica.js +1 -1
- package/dist-es/stepper.css-mistica.js +2 -2
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +35 -35
- package/dist-es/table.css-mistica.js +9 -9
- package/dist-es/tabs.css-mistica.js +17 -17
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/text-field-base.css-mistica.js +15 -15
- package/dist-es/text-field-components.css-mistica.js +3 -3
- package/dist-es/text-link.css-mistica.js +6 -6
- package/dist-es/text.css-mistica.js +6 -6
- package/dist-es/theme-context.css-mistica.js +1 -1
- package/dist-es/timeline.css-mistica.js +9 -9
- package/dist-es/timer.css-mistica.js +6 -6
- package/dist-es/tooltip.css-mistica.js +1 -1
- package/dist-es/touchable.css-mistica.js +1 -1
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +2 -2
- package/dist-es/video.css-mistica.js +1 -1
- package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
- package/doc/{figma-mcp.md → llms/figma-mcp.md} +1 -22
- package/doc/{llms.md → llms/llms.md} +1 -1
- package/doc/patterns.md +2 -2
- package/package.json +1 -1
- package/src/button.css.ts +133 -401
- package/src/button.tsx +80 -60
- package/src/community/__screenshot_tests__/advanced-data-card-screenshot-test.tsx +5 -5
- package/src/community/__screenshot_tests__/blocks-screenshot-test.tsx +6 -6
- package/src/community/__stories__/advanced-data-card-carousel-story.tsx +1 -1
- package/src/community/__stories__/advanced-data-card-story.tsx +1 -1
- package/src/community/__stories__/ai-card-story.tsx +1 -1
- package/src/community/__stories__/blocks-story.tsx +1 -1
- package/src/community/skins/cyber-skin.tsx +8 -8
- package/src/focus-trap.tsx +10 -2
- package/src/menu.tsx +0 -1
- package/src/package-version.tsx +1 -1
- package/src/community/__stories__/example-component-story.tsx +0 -15
- /package/doc/{agents → llms/agents}/figma-verifier.md +0 -0
package/src/button.tsx
CHANGED
|
@@ -403,52 +403,66 @@ const BaseButton = React.forwardRef<
|
|
|
403
403
|
props.buttonType === 'linkDanger' && isDarkMode && variant === 'brand'
|
|
404
404
|
? 'linkDangerDark'
|
|
405
405
|
: props.buttonType;
|
|
406
|
+
const buttonVariantClassName =
|
|
407
|
+
variant === 'media'
|
|
408
|
+
? styles.overMediaButtonVariants[finalType]
|
|
409
|
+
: variant === 'brand'
|
|
410
|
+
? styles.overBrandButtonVariants[finalType]
|
|
411
|
+
: variant === 'negative'
|
|
412
|
+
? styles.overNegativeButtonVariants[finalType]
|
|
413
|
+
: styles.buttonVariants[finalType];
|
|
414
|
+
const stateClassNames = {
|
|
415
|
+
[styles.small]: props.small,
|
|
416
|
+
[styles.isLoading]: showSpinner,
|
|
417
|
+
};
|
|
418
|
+
const content = renderButtonContent({
|
|
419
|
+
showSpinner,
|
|
420
|
+
shouldRenderSpinner,
|
|
421
|
+
setShouldRenderSpinner,
|
|
422
|
+
children: props.children,
|
|
423
|
+
loadingText,
|
|
424
|
+
small: props.small,
|
|
425
|
+
StartIcon: props.StartIcon,
|
|
426
|
+
EndIcon: props.EndIcon,
|
|
427
|
+
withChevron: showChevron,
|
|
428
|
+
platformOverrides,
|
|
429
|
+
});
|
|
430
|
+
const buttonStyle: React.CSSProperties = {
|
|
431
|
+
...applyCssVars({
|
|
432
|
+
[styles.buttonVars.minWidth]: props.small ? minWidthProps.small : minWidthProps.default,
|
|
433
|
+
}),
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Setting bleed classes with style to override the margin:0 set by the Touchable component.
|
|
437
|
+
* If we set it using className, it may not work depending on the order in which the styles are applied.
|
|
438
|
+
*/
|
|
439
|
+
...(props.bleedLeft
|
|
440
|
+
? {
|
|
441
|
+
marginLeft: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingLeft.small : styles.buttonPaddingLeft.default}))`,
|
|
442
|
+
}
|
|
443
|
+
: undefined),
|
|
444
|
+
...(props.bleedRight
|
|
445
|
+
? {
|
|
446
|
+
marginRight: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingRight.small : styles.buttonPaddingRight.default}))`,
|
|
447
|
+
}
|
|
448
|
+
: undefined),
|
|
449
|
+
...(props.bleedY
|
|
450
|
+
? {
|
|
451
|
+
marginTop: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingY.small : styles.buttonPaddingY.default}))`,
|
|
452
|
+
marginBottom: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingY.small : styles.buttonPaddingY.default}))`,
|
|
453
|
+
}
|
|
454
|
+
: undefined),
|
|
455
|
+
|
|
456
|
+
cursor: props.fake ? 'pointer' : undefined,
|
|
457
|
+
...props.style,
|
|
458
|
+
};
|
|
406
459
|
|
|
407
460
|
const commonProps = {
|
|
408
461
|
ref,
|
|
409
|
-
className:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
? styles.overBrandButtonVariants[finalType]
|
|
414
|
-
: variant === 'negative'
|
|
415
|
-
? styles.overNegativeButtonVariants[finalType]
|
|
416
|
-
: styles.buttonVariants[finalType],
|
|
417
|
-
props.className,
|
|
418
|
-
{
|
|
419
|
-
[styles.small]: props.small,
|
|
420
|
-
[styles.isLoading]: showSpinner,
|
|
421
|
-
}
|
|
422
|
-
),
|
|
423
|
-
style: {
|
|
424
|
-
...applyCssVars({
|
|
425
|
-
[styles.buttonVars.minWidth]: props.small ? minWidthProps.small : minWidthProps.default,
|
|
426
|
-
}),
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Setting bleed classes with style to override the margin:0 set by the Touchable component.
|
|
430
|
-
* If we set it using className, it may not work depending on the order in which the styles are applied.
|
|
431
|
-
*/
|
|
432
|
-
...(props.bleedLeft
|
|
433
|
-
? {
|
|
434
|
-
marginLeft: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingLeft.small : styles.buttonPaddingLeft.default}))`,
|
|
435
|
-
}
|
|
436
|
-
: undefined),
|
|
437
|
-
...(props.bleedRight
|
|
438
|
-
? {
|
|
439
|
-
marginRight: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingRight.small : styles.buttonPaddingRight.default}))`,
|
|
440
|
-
}
|
|
441
|
-
: undefined),
|
|
442
|
-
...(props.bleedY
|
|
443
|
-
? {
|
|
444
|
-
marginTop: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingY.small : styles.buttonPaddingY.default}))`,
|
|
445
|
-
marginBottom: `calc(-1 * (${styles.borderSize} + ${props.small ? styles.buttonPaddingY.small : styles.buttonPaddingY.default}))`,
|
|
446
|
-
}
|
|
447
|
-
: undefined),
|
|
448
|
-
|
|
449
|
-
cursor: props.fake ? 'pointer' : undefined,
|
|
450
|
-
...props.style,
|
|
451
|
-
},
|
|
462
|
+
className: props.small
|
|
463
|
+
? classnames(styles.smallTouchableArea, stateClassNames)
|
|
464
|
+
: classnames(buttonVariantClassName, props.className, stateClassNames),
|
|
465
|
+
style: props.small ? {cursor: props.fake ? 'pointer' : undefined} : buttonStyle,
|
|
452
466
|
trackingEvent: props.trackingEvent ?? (props.trackEvent ? createDefaultTrackingEvent() : undefined),
|
|
453
467
|
dataAttributes: props.dataAttributes,
|
|
454
468
|
'aria-label': props['aria-label'],
|
|
@@ -460,22 +474,26 @@ const BaseButton = React.forwardRef<
|
|
|
460
474
|
'aria-description': props['aria-description'],
|
|
461
475
|
'aria-describedby': props['aria-describedby'],
|
|
462
476
|
tabIndex: props.tabIndex,
|
|
463
|
-
children:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
loadingText,
|
|
469
|
-
small: props.small,
|
|
470
|
-
StartIcon: props.StartIcon,
|
|
471
|
-
EndIcon: props.EndIcon,
|
|
472
|
-
withChevron: showChevron,
|
|
473
|
-
platformOverrides,
|
|
474
|
-
}),
|
|
477
|
+
children: props.small ? (
|
|
478
|
+
<div className={classnames(buttonVariantClassName, styles.smallTouchableVisual)}>{content}</div>
|
|
479
|
+
) : (
|
|
480
|
+
content
|
|
481
|
+
),
|
|
475
482
|
disabled: props.disabled || showSpinner || isFormSending,
|
|
476
483
|
role: props.role,
|
|
477
484
|
};
|
|
478
485
|
|
|
486
|
+
const containerClassName = classnames(styles.smallTouchableContainer, props.className);
|
|
487
|
+
|
|
488
|
+
const wrapInContainer = (touchable: React.ReactNode) =>
|
|
489
|
+
props.small ? (
|
|
490
|
+
<div className={containerClassName} style={buttonStyle}>
|
|
491
|
+
{touchable}
|
|
492
|
+
</div>
|
|
493
|
+
) : (
|
|
494
|
+
touchable
|
|
495
|
+
);
|
|
496
|
+
|
|
479
497
|
if (process.env.NODE_ENV !== 'production') {
|
|
480
498
|
if (props.to === '' || props.href === '') {
|
|
481
499
|
throw Error('to or href props are empty strings');
|
|
@@ -483,16 +501,18 @@ const BaseButton = React.forwardRef<
|
|
|
483
501
|
}
|
|
484
502
|
|
|
485
503
|
if (props.fake) {
|
|
486
|
-
return <BaseTouchable maybe {...commonProps}
|
|
504
|
+
return wrapInContainer(<BaseTouchable maybe {...commonProps} />);
|
|
487
505
|
}
|
|
488
506
|
|
|
489
507
|
if (props.submit) {
|
|
490
508
|
// using empty onPress handler so it gets rendered as a button
|
|
491
|
-
return
|
|
509
|
+
return wrapInContainer(
|
|
510
|
+
<BaseTouchable type="submit" formId={formId} onPress={() => {}} {...commonProps} />
|
|
511
|
+
);
|
|
492
512
|
}
|
|
493
513
|
|
|
494
514
|
if (props.onPress) {
|
|
495
|
-
return (
|
|
515
|
+
return wrapInContainer(
|
|
496
516
|
<BaseTouchable
|
|
497
517
|
{...commonProps}
|
|
498
518
|
onPress={(e) => {
|
|
@@ -507,7 +527,7 @@ const BaseButton = React.forwardRef<
|
|
|
507
527
|
}
|
|
508
528
|
|
|
509
529
|
if (props.to || props.to === '') {
|
|
510
|
-
return (
|
|
530
|
+
return wrapInContainer(
|
|
511
531
|
<BaseTouchable
|
|
512
532
|
{...commonProps}
|
|
513
533
|
to={props.to}
|
|
@@ -519,7 +539,7 @@ const BaseButton = React.forwardRef<
|
|
|
519
539
|
}
|
|
520
540
|
|
|
521
541
|
if (props.href || props.href === '') {
|
|
522
|
-
return (
|
|
542
|
+
return wrapInContainer(
|
|
523
543
|
<BaseTouchable
|
|
524
544
|
{...commonProps}
|
|
525
545
|
href={props.href}
|
|
@@ -12,7 +12,7 @@ test.each`
|
|
|
12
12
|
${'button and link'} | ${true}
|
|
13
13
|
`('Advanced Data Card actions: $actions - footerImage: $footerImage', async ({actions, footerImage}) => {
|
|
14
14
|
await openStoryPage({
|
|
15
|
-
id: 'community-advanceddatacard--default',
|
|
15
|
+
id: 'community-vivo-advanceddatacard--default',
|
|
16
16
|
device: 'MOBILE_IOS',
|
|
17
17
|
args: {actions, footerImage},
|
|
18
18
|
});
|
|
@@ -30,7 +30,7 @@ test.each`
|
|
|
30
30
|
${3}
|
|
31
31
|
`('Advanced Data Card extras: $extra', async ({extra}) => {
|
|
32
32
|
await openStoryPage({
|
|
33
|
-
id: 'community-advanceddatacard--default',
|
|
33
|
+
id: 'community-vivo-advanceddatacard--default',
|
|
34
34
|
device: 'MOBILE_IOS',
|
|
35
35
|
args: {extra},
|
|
36
36
|
});
|
|
@@ -43,7 +43,7 @@ test.each`
|
|
|
43
43
|
|
|
44
44
|
test('Advanced Data Card extras: 3 no divider', async () => {
|
|
45
45
|
await openStoryPage({
|
|
46
|
-
id: 'community-advanceddatacard--default',
|
|
46
|
+
id: 'community-vivo-advanceddatacard--default',
|
|
47
47
|
device: 'MOBILE_IOS',
|
|
48
48
|
args: {extra: 3, noExtraDivider: true},
|
|
49
49
|
});
|
|
@@ -56,7 +56,7 @@ test('Advanced Data Card extras: 3 no divider', async () => {
|
|
|
56
56
|
|
|
57
57
|
test('Advanced Data Card inside Carousel', async () => {
|
|
58
58
|
await openStoryPage({
|
|
59
|
-
id: 'community-advanceddatacards-in-carousel--default',
|
|
59
|
+
id: 'community-vivo-advanceddatacards-in-carousel--default',
|
|
60
60
|
device: 'DESKTOP',
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ test('Advanced Data Card inside Carousel', async () => {
|
|
|
68
68
|
|
|
69
69
|
test('Advanced Data Card without stackingGroup, with top actions and too long title', async () => {
|
|
70
70
|
const page = await openStoryPage({
|
|
71
|
-
id: 'community-advanceddatacard--default',
|
|
71
|
+
id: 'community-vivo-advanceddatacard--default',
|
|
72
72
|
device: 'MOBILE_IOS',
|
|
73
73
|
args: {
|
|
74
74
|
stackingGroup: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {openStoryPage, screen} from '../../test-utils';
|
|
2
2
|
|
|
3
3
|
test('Blocks Highlighted Value Block', async () => {
|
|
4
|
-
await openStoryPage({id: 'community-blocks--block-highlighted-value', device: 'MOBILE_IOS'});
|
|
4
|
+
await openStoryPage({id: 'community-vivo-blocks--block-highlighted-value', device: 'MOBILE_IOS'});
|
|
5
5
|
|
|
6
6
|
const stepper = await screen.findByTestId('highlighted-value-block');
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ test('Blocks Highlighted Value Block', async () => {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
test('Blocks Information Block', async () => {
|
|
14
|
-
await openStoryPage({id: 'community-blocks--block-information', device: 'MOBILE_IOS'});
|
|
14
|
+
await openStoryPage({id: 'community-vivo-blocks--block-information', device: 'MOBILE_IOS'});
|
|
15
15
|
|
|
16
16
|
const stepper = await screen.findByTestId('information-block');
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@ test.each`
|
|
|
25
25
|
${false} | ${true}
|
|
26
26
|
`('Blocks Progress Block', async ({stackingGroup}) => {
|
|
27
27
|
await openStoryPage({
|
|
28
|
-
id: 'community-blocks--block-progress',
|
|
28
|
+
id: 'community-vivo-blocks--block-progress',
|
|
29
29
|
device: 'MOBILE_IOS',
|
|
30
30
|
args: {stackingGroup},
|
|
31
31
|
});
|
|
@@ -39,7 +39,7 @@ test.each`
|
|
|
39
39
|
|
|
40
40
|
test('Blocks Row Block', async () => {
|
|
41
41
|
await openStoryPage({
|
|
42
|
-
id: 'community-blocks--block-row',
|
|
42
|
+
id: 'community-vivo-blocks--block-row',
|
|
43
43
|
device: 'MOBILE_IOS',
|
|
44
44
|
args: {description: 'This is a very long description to verify text alignment'},
|
|
45
45
|
});
|
|
@@ -52,7 +52,7 @@ test('Blocks Row Block', async () => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
test('Blocks Simple Block', async () => {
|
|
55
|
-
await openStoryPage({id: 'community-blocks--block-simple', device: 'MOBILE_IOS'});
|
|
55
|
+
await openStoryPage({id: 'community-vivo-blocks--block-simple', device: 'MOBILE_IOS'});
|
|
56
56
|
|
|
57
57
|
const stepper = await screen.findByTestId('simple-block');
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ test('Blocks Simple Block', async () => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
test('Blocks Value Block', async () => {
|
|
65
|
-
await openStoryPage({id: 'community-blocks--block-value', device: 'MOBILE_IOS'});
|
|
65
|
+
await openStoryPage({id: 'community-vivo-blocks--block-value', device: 'MOBILE_IOS'});
|
|
66
66
|
|
|
67
67
|
const stepper = await screen.findByTestId('value-block');
|
|
68
68
|
|
|
@@ -109,9 +109,9 @@ export const getCyberSkin = (): Skin => {
|
|
|
109
109
|
backgroundDropZoneMediaHover: applyAlpha(palette.brand80, 0.2),
|
|
110
110
|
backgroundDropZoneMediaDragover: applyAlpha(palette.brand80, 0.4),
|
|
111
111
|
skeletonWave: palette.grey100,
|
|
112
|
-
borderLow: palette.
|
|
113
|
-
border: palette.
|
|
114
|
-
borderHigh: palette.
|
|
112
|
+
borderLow: palette.grey15,
|
|
113
|
+
border: palette.grey100,
|
|
114
|
+
borderHigh: palette.grey400,
|
|
115
115
|
borderSelected: palette.brand,
|
|
116
116
|
coverBackgroundHover: applyAlpha(palette.darkModeBlack, 0.25),
|
|
117
117
|
coverBackgroundPressed: applyAlpha(palette.darkModeBlack, 0.35),
|
|
@@ -481,7 +481,7 @@ export const getCyberSkin = (): Skin => {
|
|
|
481
481
|
textLinkDanger: palette.red30,
|
|
482
482
|
textLinkDangerMedia: palette.red50,
|
|
483
483
|
textLinkSnackbar: palette.darkModeBrand,
|
|
484
|
-
textActivated: palette.
|
|
484
|
+
textActivated: palette.darkModeBrand,
|
|
485
485
|
textBrand: palette.brand30,
|
|
486
486
|
inputBorder: palette.grey400,
|
|
487
487
|
inputBorderInverse: palette.grey400,
|
|
@@ -501,10 +501,10 @@ export const getCyberSkin = (): Skin => {
|
|
|
501
501
|
controlActivatedBrand: palette.darkModeBrand,
|
|
502
502
|
controlError: palette.red30,
|
|
503
503
|
chevronIndicator: palette.grey400,
|
|
504
|
-
barTrack: palette.
|
|
505
|
-
barTrackInverse: palette.
|
|
506
|
-
barTrackNegative: palette.
|
|
507
|
-
barTrackBrand: palette.
|
|
504
|
+
barTrack: palette.grey800,
|
|
505
|
+
barTrackInverse: palette.grey800,
|
|
506
|
+
barTrackNegative: palette.grey800,
|
|
507
|
+
barTrackBrand: palette.grey800,
|
|
508
508
|
loadingBar: palette.darkModeBrand,
|
|
509
509
|
loadingBarBackground: palette.grey500,
|
|
510
510
|
toggleAndroidInactive: palette.grey100,
|
package/src/focus-trap.tsx
CHANGED
|
@@ -6,10 +6,18 @@ type Props = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
group?: string;
|
|
9
|
+
returnFocus?: React.ComponentProps<typeof ReactFocusLock>['returnFocus'];
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
// TODO https://github.com/Telefonica/mistica-web/issues/1589 unify focus-restoration logic with consumers that restore focus manually (e.g. Drawer's useRestoreFocus)
|
|
13
|
+
const FocusTrap = ({children, disabled, className, group, returnFocus = true}: Props): JSX.Element => (
|
|
14
|
+
<ReactFocusLock
|
|
15
|
+
noFocusGuards
|
|
16
|
+
disabled={disabled}
|
|
17
|
+
className={className}
|
|
18
|
+
group={group}
|
|
19
|
+
returnFocus={returnFocus}
|
|
20
|
+
>
|
|
13
21
|
{children}
|
|
14
22
|
</ReactFocusLock>
|
|
15
23
|
);
|
package/src/menu.tsx
CHANGED
package/src/package-version.tsx
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// DO NOT EDIT THIS FILE. It's autogenerated by set-version.js
|
|
2
|
-
export const PACKAGE_VERSION = '16.
|
|
2
|
+
export const PACKAGE_VERSION = '16.68.0' as string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import ExampleComponent from '../example-component';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Community/ExampleComponent',
|
|
6
|
-
parameters: {
|
|
7
|
-
fullScreen: true,
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Default: StoryComponent = () => {
|
|
12
|
-
return <ExampleComponent>Example story</ExampleComponent>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
Default.storyName = 'ExampleComponent';
|
|
File without changes
|