@telefonica/mistica 16.59.0-beta.1 → 16.60.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/css/mistica.css +1 -1
- package/dist/accordion.css-mistica.js +16 -16
- package/dist/align.css-mistica.js +2 -2
- package/dist/autocomplete.css-mistica.js +6 -6
- package/dist/avatar.css-mistica.js +3 -3
- package/dist/badge.css-mistica.js +7 -7
- package/dist/box.css-mistica.js +15 -15
- package/dist/boxed.css-mistica.js +31 -31
- package/dist/button-group.css-mistica.js +10 -10
- package/dist/button-layout.css-mistica.js +21 -21
- package/dist/button.css-mistica.js +51 -51
- package/dist/callout.css-mistica.js +16 -16
- package/dist/card-internal.css-mistica.js +38 -38
- package/dist/carousel.css-mistica.js +18 -18
- package/dist/checkbox.css-mistica.js +21 -21
- package/dist/chip.css-mistica.js +30 -30
- package/dist/circle.css-mistica.js +2 -2
- package/dist/community/advanced-data-card.css-mistica.js +26 -26
- package/dist/community/blocks.css-mistica.js +3 -3
- package/dist/community/example-component.css-mistica.js +2 -2
- package/dist/counter.css-mistica.js +12 -12
- package/dist/cover-hero.css-mistica.js +16 -16
- package/dist/credit-card-number-field.css-mistica.js +6 -6
- package/dist/date-field.css-mistica.js +1 -1
- package/dist/date-time-picker.css-mistica.js +2 -2
- package/dist/dialog.css-mistica.js +15 -15
- package/dist/divider.css-mistica.js +5 -5
- package/dist/double-field.css-mistica.js +4 -4
- package/dist/drawer.css-mistica.js +15 -15
- package/dist/empty-state-card.css-mistica.js +4 -4
- package/dist/empty-state.css-mistica.js +14 -14
- package/dist/fade-in.css-mistica.js +1 -1
- package/dist/feedback.css-mistica.js +14 -14
- package/dist/file-upload.css-mistica.js +14 -14
- package/dist/fixed-footer-layout.css-mistica.js +12 -12
- package/dist/form.css-mistica.js +2 -2
- package/dist/grid-layout.css-mistica.js +9 -9
- package/dist/grid.css-mistica.js +147 -147
- package/dist/header.css-mistica.js +5 -5
- package/dist/hero.css-mistica.js +11 -11
- package/dist/horizontal-scroll.css-mistica.js +3 -3
- package/dist/icon-button.css-mistica.js +66 -66
- package/dist/icons/icon-chevron.css-mistica.js +6 -6
- package/dist/icons/icon-error.css-mistica.js +3 -3
- package/dist/image.css-mistica.js +11 -11
- package/dist/inline.css-mistica.js +16 -16
- package/dist/list.css-mistica.js +15 -15
- package/dist/loading-bar.css-mistica.js +5 -5
- package/dist/loading-screen.css-mistica.js +15 -15
- package/dist/logo.css-mistica.js +9 -9
- package/dist/menu.css-mistica.js +24 -24
- package/dist/mosaic.css-mistica.js +3 -3
- package/dist/navigation-bar.css-mistica.js +45 -45
- package/dist/navigation-breadcrumbs.css-mistica.js +5 -5
- package/dist/package-version.js +2 -2
- package/dist/pin-field.css-mistica.js +10 -10
- package/dist/popover.css-mistica.js +2 -2
- package/dist/progress-bar.css-mistica.js +12 -12
- package/dist/radio-button.css-mistica.js +33 -33
- package/dist/rating.css-mistica.js +12 -12
- package/dist/responsive-layout.css-mistica.js +20 -20
- package/dist/screen-reader-only.css-mistica.js +2 -2
- package/dist/select.css-mistica.js +29 -29
- package/dist/sheet-action-row.css-mistica.js +2 -2
- package/dist/sheet-common.css-mistica.js +16 -16
- package/dist/sheet-info.css-mistica.js +4 -4
- package/dist/skeletons.css-mistica.js +12 -12
- package/dist/skins/skin-contract.css-mistica.js +686 -686
- package/dist/skip-link.css-mistica.js +3 -3
- package/dist/slider.css-mistica.js +28 -28
- package/dist/snackbar.css-mistica.js +16 -16
- package/dist/spinner.css-mistica.js +5 -5
- package/dist/square.css-mistica.js +2 -2
- package/dist/stack.css-mistica.js +9 -9
- package/dist/stacking-group.css-mistica.js +2 -2
- package/dist/stepper.css-mistica.js +16 -16
- package/dist/switch-component.css-mistica.js +53 -53
- package/dist/table.css-mistica.js +24 -24
- package/dist/tabs.css-mistica.js +30 -30
- package/dist/tag.css-mistica.js +5 -5
- package/dist/text-field-base.css-mistica.js +30 -30
- package/dist/text-field-components.css-mistica.js +23 -20
- package/dist/text-field-components.css.d.ts +1 -0
- package/dist/text-field-components.js +31 -25
- package/dist/text-link.css-mistica.js +10 -10
- package/dist/text.css-mistica.js +13 -13
- package/dist/theme-context.css-mistica.js +2 -2
- package/dist/timeline.css-mistica.js +18 -18
- package/dist/timer.css-mistica.js +13 -13
- package/dist/tooltip.css-mistica.js +12 -12
- package/dist/touchable.css-mistica.js +5 -5
- package/dist/utils/aspect-ratio-support.css-mistica.js +7 -7
- package/dist/video.css-mistica.js +2 -2
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -3
- package/dist-es/accordion.css-mistica.js +7 -7
- package/dist-es/align.css-mistica.js +2 -2
- package/dist-es/autocomplete.css-mistica.js +2 -2
- package/dist-es/avatar.css-mistica.js +2 -2
- package/dist-es/badge.css-mistica.js +2 -2
- package/dist-es/box.css-mistica.js +15 -15
- package/dist-es/boxed.css-mistica.js +25 -25
- package/dist-es/button-group.css-mistica.js +2 -2
- package/dist-es/button-layout.css-mistica.js +16 -16
- package/dist-es/button.css-mistica.js +38 -38
- package/dist-es/callout.css-mistica.js +12 -12
- package/dist-es/card-internal.css-mistica.js +20 -20
- package/dist-es/carousel.css-mistica.js +10 -10
- package/dist-es/checkbox.css-mistica.js +14 -14
- package/dist-es/chip.css-mistica.js +17 -17
- package/dist-es/circle.css-mistica.js +2 -2
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/blocks.css-mistica.js +2 -2
- package/dist-es/community/example-component.css-mistica.js +2 -2
- package/dist-es/counter.css-mistica.js +2 -2
- package/dist-es/cover-hero.css-mistica.js +4 -4
- package/dist-es/credit-card-number-field.css-mistica.js +4 -4
- package/dist-es/date-field.css-mistica.js +1 -1
- package/dist-es/date-time-picker.css-mistica.js +2 -2
- package/dist-es/dialog.css-mistica.js +5 -5
- package/dist-es/divider.css-mistica.js +5 -5
- package/dist-es/double-field.css-mistica.js +4 -4
- package/dist-es/drawer.css-mistica.js +2 -2
- package/dist-es/empty-state-card.css-mistica.js +2 -2
- package/dist-es/empty-state.css-mistica.js +7 -7
- package/dist-es/fade-in.css-mistica.js +1 -1
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/file-upload.css-mistica.js +8 -8
- package/dist-es/fixed-footer-layout.css-mistica.js +4 -4
- package/dist-es/form.css-mistica.js +2 -2
- package/dist-es/grid-layout.css-mistica.js +4 -4
- package/dist-es/grid.css-mistica.js +127 -127
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/hero.css-mistica.js +4 -4
- package/dist-es/horizontal-scroll.css-mistica.js +2 -2
- package/dist-es/icon-button.css-mistica.js +56 -56
- package/dist-es/icons/icon-chevron.css-mistica.js +4 -4
- package/dist-es/icons/icon-error.css-mistica.js +2 -2
- package/dist-es/image.css-mistica.js +4 -4
- package/dist-es/inline.css-mistica.js +10 -10
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-screen.css-mistica.js +5 -5
- package/dist-es/logo.css-mistica.js +7 -7
- package/dist-es/menu.css-mistica.js +15 -15
- package/dist-es/mosaic.css-mistica.js +2 -2
- package/dist-es/navigation-bar.css-mistica.js +20 -20
- package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
- package/dist-es/package-version.js +2 -2
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/popover.css-mistica.js +2 -2
- package/dist-es/progress-bar.css-mistica.js +8 -8
- package/dist-es/radio-button.css-mistica.js +25 -25
- package/dist-es/rating.css-mistica.js +4 -4
- package/dist-es/responsive-layout.css-mistica.js +7 -7
- package/dist-es/screen-reader-only.css-mistica.js +2 -2
- package/dist-es/select.css-mistica.js +20 -20
- package/dist-es/sheet-action-row.css-mistica.js +2 -2
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/skeletons.css-mistica.js +8 -8
- package/dist-es/skins/skin-contract.css-mistica.js +686 -686
- package/dist-es/skip-link.css-mistica.js +2 -2
- package/dist-es/slider.css-mistica.js +20 -20
- package/dist-es/snackbar.css-mistica.js +5 -5
- package/dist-es/spinner.css-mistica.js +2 -2
- package/dist-es/square.css-mistica.js +2 -2
- package/dist-es/stack.css-mistica.js +7 -7
- package/dist-es/stacking-group.css-mistica.js +2 -2
- package/dist-es/stepper.css-mistica.js +4 -4
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +41 -41
- package/dist-es/table.css-mistica.js +11 -11
- package/dist-es/tabs.css-mistica.js +21 -21
- package/dist-es/tag.css-mistica.js +2 -2
- package/dist-es/text-field-base.css-mistica.js +17 -17
- package/dist-es/text-field-components.css-mistica.js +4 -4
- package/dist-es/text-field-components.js +52 -46
- package/dist-es/text-link.css-mistica.js +9 -9
- package/dist-es/text.css-mistica.js +8 -8
- package/dist-es/theme-context.css-mistica.js +2 -2
- package/dist-es/timeline.css-mistica.js +11 -11
- package/dist-es/timer.css-mistica.js +7 -7
- package/dist-es/tooltip.css-mistica.js +3 -3
- package/dist-es/touchable.css-mistica.js +2 -2
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +4 -4
- package/dist-es/video.css-mistica.js +2 -2
- package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +2 -2
- package/doc/llms.md +0 -24
- package/package.json +2 -14
- package/src/accordion.css.ts +0 -121
- package/src/accordion.tsx +0 -366
- package/src/align.css.ts +0 -7
- package/src/align.tsx +0 -32
- package/src/autocomplete.css.ts +0 -62
- package/src/autocomplete.tsx +0 -239
- package/src/avatar.css.ts +0 -14
- package/src/avatar.tsx +0 -120
- package/src/badge.css.ts +0 -51
- package/src/badge.tsx +0 -79
- package/src/box.css.ts +0 -51
- package/src/box.tsx +0 -114
- package/src/boxed.css.ts +0 -132
- package/src/boxed.tsx +0 -153
- package/src/button-fixed-footer-layout.tsx +0 -62
- package/src/button-group.css.ts +0 -75
- package/src/button-group.tsx +0 -91
- package/src/button-layout.css.ts +0 -162
- package/src/button-layout.tsx +0 -91
- package/src/button.css.ts +0 -758
- package/src/button.tsx +0 -632
- package/src/callout.css.ts +0 -50
- package/src/callout.tsx +0 -147
- package/src/card-cover.tsx +0 -242
- package/src/card-data.tsx +0 -152
- package/src/card-internal.css.ts +0 -271
- package/src/card-internal.tsx +0 -1724
- package/src/card-media.tsx +0 -157
- package/src/card-naked.tsx +0 -63
- package/src/carousel.css.ts +0 -522
- package/src/carousel.tsx +0 -1300
- package/src/checkbox.css.ts +0 -94
- package/src/checkbox.tsx +0 -192
- package/src/chip.css.ts +0 -204
- package/src/chip.tsx +0 -191
- package/src/circle.css.ts +0 -14
- package/src/circle.tsx +0 -52
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-button-and-link-footer-image-false-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-button-and-link-footer-image-true-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-button-footer-image-false-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-button-footer-image-true-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-link-footer-image-false-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-link-footer-image-true-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-none-footer-image-false-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-actions-none-footer-image-true-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-extras-0-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-extras-1-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-extras-3-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-extras-3-no-divider-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-inside-carousel-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/advanced-data-card-screenshot-test-tsx-advanced-data-card-without-stacking-group-with-top-actions-and-too-long-title-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-highlighted-value-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-information-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-progress-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-progress-block-2-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-row-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-simple-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/__image_snapshots__/blocks-screenshot-test-tsx-blocks-value-block-1-snap.png +0 -0
- package/src/community/__screenshot_tests__/advanced-data-card-screenshot-test.tsx +0 -84
- package/src/community/__screenshot_tests__/blocks-screenshot-test.tsx +0 -72
- package/src/community/__stories__/advanced-data-card-carousel-story.tsx +0 -66
- package/src/community/__stories__/advanced-data-card-story.tsx +0 -158
- package/src/community/__stories__/blocks-story.tsx +0 -272
- package/src/community/__stories__/example-component-story.tsx +0 -15
- package/src/community/__stories__/index-story.tsx +0 -154
- package/src/community/__type_tests__/advanced-data-card-type-test.tsx +0 -40
- package/src/community/advanced-data-card.css.ts +0 -271
- package/src/community/advanced-data-card.tsx +0 -431
- package/src/community/blocks.css.ts +0 -12
- package/src/community/blocks.tsx +0 -290
- package/src/community/example-component.css.ts +0 -7
- package/src/community/example-component.tsx +0 -17
- package/src/community/index.tsx +0 -10
- package/src/counter.css.ts +0 -150
- package/src/counter.tsx +0 -215
- package/src/cover-hero-media.tsx +0 -39
- package/src/cover-hero.css.ts +0 -133
- package/src/cover-hero.tsx +0 -262
- package/src/credit-card-expiration-field.tsx +0 -187
- package/src/credit-card-fields.tsx +0 -56
- package/src/credit-card-number-field.css.ts +0 -47
- package/src/credit-card-number-field.tsx +0 -245
- package/src/cvv-field.tsx +0 -169
- package/src/date-field.css.ts +0 -14
- package/src/date-field.tsx +0 -130
- package/src/date-time-field.tsx +0 -141
- package/src/date-time-picker.css.ts +0 -126
- package/src/date-time-picker.tsx +0 -188
- package/src/decimal-field.tsx +0 -160
- package/src/desktop-container-type-context.tsx +0 -15
- package/src/dialog-context.tsx +0 -81
- package/src/dialog.css.ts +0 -155
- package/src/dialog.tsx +0 -423
- package/src/divider.css.ts +0 -10
- package/src/divider.tsx +0 -11
- package/src/double-field.css.ts +0 -33
- package/src/double-field.tsx +0 -71
- package/src/drawer.css.ts +0 -123
- package/src/drawer.tsx +0 -304
- package/src/email-field.tsx +0 -76
- package/src/empty-state-card.css.ts +0 -40
- package/src/empty-state-card.tsx +0 -92
- package/src/empty-state.css.ts +0 -119
- package/src/empty-state.tsx +0 -141
- package/src/fade-in.css.ts +0 -12
- package/src/fade-in.tsx +0 -40
- package/src/feedback.css.ts +0 -119
- package/src/feedback.tsx +0 -432
- package/src/file-upload.css.ts +0 -156
- package/src/file-upload.tsx +0 -612
- package/src/fixed-footer-layout.css.ts +0 -96
- package/src/fixed-footer-layout.tsx +0 -215
- package/src/fixed-to-top.tsx +0 -21
- package/src/focus-trap.tsx +0 -17
- package/src/form-context.tsx +0 -198
- package/src/form.css.ts +0 -5
- package/src/form.tsx +0 -287
- package/src/grid-layout.css.ts +0 -68
- package/src/grid-layout.tsx +0 -201
- package/src/grid.css.ts +0 -203
- package/src/grid.tsx +0 -241
- package/src/header.css.ts +0 -30
- package/src/header.tsx +0 -319
- package/src/hero.css.ts +0 -71
- package/src/hero.tsx +0 -318
- package/src/hooks.tsx +0 -313
- package/src/horizontal-scroll.css.ts +0 -43
- package/src/horizontal-scroll.tsx +0 -18
- package/src/iban-field.tsx +0 -218
- package/src/icon-button.css.ts +0 -561
- package/src/icon-button.tsx +0 -221
- package/src/icons/__stories__/mistica-icons-story.tsx +0 -192
- package/src/icons/icon-amex.tsx +0 -40
- package/src/icons/icon-chevron.css.ts +0 -23
- package/src/icons/icon-chevron.tsx +0 -150
- package/src/icons/icon-cvv-amex.tsx +0 -31
- package/src/icons/icon-cvv-visa-mc.tsx +0 -31
- package/src/icons/icon-error.css.ts +0 -27
- package/src/icons/icon-error.tsx +0 -207
- package/src/icons/icon-info.tsx +0 -86
- package/src/icons/icon-mastercard.tsx +0 -36
- package/src/icons/icon-success-vivo-new.tsx +0 -51
- package/src/icons/icon-success-vivo.tsx +0 -36
- package/src/icons/icon-success.tsx +0 -211
- package/src/icons/icon-visa.tsx +0 -32
- package/src/image.css.ts +0 -48
- package/src/image.tsx +0 -345
- package/src/index.tsx +0 -2466
- package/src/inline.css.ts +0 -131
- package/src/inline.tsx +0 -135
- package/src/integer-field.tsx +0 -93
- package/src/list.css.ts +0 -281
- package/src/list.tsx +0 -963
- package/src/loading-bar.css.ts +0 -69
- package/src/loading-bar.tsx +0 -25
- package/src/loading-screen.css.ts +0 -114
- package/src/loading-screen.tsx +0 -376
- package/src/logo-blau-shell.tsx +0 -30
- package/src/logo-blau.tsx +0 -60
- package/src/logo-common.tsx +0 -29
- package/src/logo-esimflag-shell.tsx +0 -30
- package/src/logo-esimflag.tsx +0 -56
- package/src/logo-movistar-new-shell.tsx +0 -30
- package/src/logo-movistar-new.tsx +0 -85
- package/src/logo-movistar-shell.tsx +0 -30
- package/src/logo-movistar.tsx +0 -63
- package/src/logo-o2-new-shell.tsx +0 -26
- package/src/logo-o2-new.tsx +0 -27
- package/src/logo-o2-shell.tsx +0 -26
- package/src/logo-o2.tsx +0 -27
- package/src/logo-telefonica-shell.tsx +0 -30
- package/src/logo-telefonica.tsx +0 -95
- package/src/logo-tu-shell.tsx +0 -26
- package/src/logo-tu.tsx +0 -28
- package/src/logo-vivo-shell.tsx +0 -30
- package/src/logo-vivo.tsx +0 -53
- package/src/logo.css.ts +0 -33
- package/src/logo.tsx +0 -313
- package/src/master-detail-layout.tsx +0 -28
- package/src/maybe-dismissable.css.ts +0 -37
- package/src/maybe-dismissable.tsx +0 -58
- package/src/media-queries.css.ts +0 -67
- package/src/menu.css.ts +0 -132
- package/src/menu.tsx +0 -468
- package/src/meter.tsx +0 -516
- package/src/modal-context-provider.tsx +0 -45
- package/src/month-field.tsx +0 -124
- package/src/mosaic.css.ts +0 -73
- package/src/mosaic.tsx +0 -205
- package/src/navigation-bar.css.ts +0 -558
- package/src/navigation-bar.tsx +0 -1637
- package/src/navigation-breadcrumbs.css.ts +0 -22
- package/src/navigation-breadcrumbs.tsx +0 -69
- package/src/negative-box.tsx +0 -15
- package/src/nestable-context.tsx +0 -139
- package/src/overlay.tsx +0 -86
- package/src/overscroll-color-context.tsx +0 -141
- package/src/package-version.tsx +0 -2
- package/src/password-field.tsx +0 -126
- package/src/phone-number-field-lite.tsx +0 -265
- package/src/phone-number-field.tsx +0 -171
- package/src/pin-field.css.ts +0 -90
- package/src/pin-field.tsx +0 -346
- package/src/placeholder.tsx +0 -41
- package/src/popover.css.ts +0 -8
- package/src/popover.tsx +0 -85
- package/src/portal.tsx +0 -43
- package/src/progress-bar.css.ts +0 -61
- package/src/progress-bar.tsx +0 -174
- package/src/radio-button.css.ts +0 -174
- package/src/radio-button.tsx +0 -322
- package/src/rating.css.ts +0 -128
- package/src/rating.tsx +0 -351
- package/src/responsive-layout.css.ts +0 -162
- package/src/responsive-layout.tsx +0 -106
- package/src/screen-reader-only.css.ts +0 -27
- package/src/screen-reader-only.tsx +0 -33
- package/src/screen-size-context-provider.tsx +0 -96
- package/src/screen-size-context.tsx +0 -23
- package/src/search-field.tsx +0 -126
- package/src/select.css.ts +0 -226
- package/src/select.tsx +0 -513
- package/src/sheet-action-row.css.ts +0 -33
- package/src/sheet-actions-list.tsx +0 -113
- package/src/sheet-actions.tsx +0 -95
- package/src/sheet-common.css.ts +0 -254
- package/src/sheet-common.tsx +0 -402
- package/src/sheet-info.css.ts +0 -19
- package/src/sheet-info.tsx +0 -127
- package/src/sheet-native.tsx +0 -189
- package/src/sheet-radio-list.tsx +0 -118
- package/src/sheet-root.tsx +0 -127
- package/src/sheet-types.tsx +0 -94
- package/src/sheet-web.tsx +0 -140
- package/src/skeleton-base.tsx +0 -38
- package/src/skeletons.css.ts +0 -56
- package/src/skeletons.tsx +0 -133
- package/src/skins/blau.tsx +0 -724
- package/src/skins/constants.tsx +0 -10
- package/src/skins/defaults.tsx +0 -104
- package/src/skins/esimflag.tsx +0 -728
- package/src/skins/movistar-new.tsx +0 -735
- package/src/skins/movistar.tsx +0 -740
- package/src/skins/o2-new.tsx +0 -731
- package/src/skins/o2.tsx +0 -727
- package/src/skins/skin-contract.css.ts +0 -380
- package/src/skins/telefonica.tsx +0 -768
- package/src/skins/tu.tsx +0 -741
- package/src/skins/types/colors.tsx +0 -286
- package/src/skins/types/index.tsx +0 -153
- package/src/skins/utils.tsx +0 -66
- package/src/skins/vivo-new.tsx +0 -745
- package/src/skins/vivo.tsx +0 -720
- package/src/skip-link.css.ts +0 -34
- package/src/skip-link.tsx +0 -52
- package/src/slider.css.ts +0 -181
- package/src/slider.tsx +0 -384
- package/src/snackbar-context.tsx +0 -98
- package/src/snackbar-native.ts +0 -37
- package/src/snackbar.css.ts +0 -176
- package/src/snackbar.tsx +0 -258
- package/src/spinner.css.ts +0 -66
- package/src/spinner.tsx +0 -136
- package/src/sprinkles.css.ts +0 -83
- package/src/square.css.ts +0 -15
- package/src/square.tsx +0 -55
- package/src/stack.css.ts +0 -44
- package/src/stack.tsx +0 -79
- package/src/stacking-group.css.ts +0 -15
- package/src/stacking-group.tsx +0 -82
- package/src/stepper.css.ts +0 -233
- package/src/stepper.tsx +0 -156
- package/src/switch-component.css.ts +0 -181
- package/src/switch-component.tsx +0 -187
- package/src/tab-focus.tsx +0 -68
- package/src/table-actions-header.tsx +0 -21
- package/src/table-cell-text.tsx +0 -35
- package/src/table.css.ts +0 -297
- package/src/table.tsx +0 -398
- package/src/tabs.css.ts +0 -212
- package/src/tabs.tsx +0 -263
- package/src/tag.css.ts +0 -42
- package/src/tag.tsx +0 -161
- package/src/test-utils/environment/setup-ssr.tsx +0 -10
- package/src/test-utils/fail-test-on-console-error.tsx +0 -22
- package/src/test-utils/index.tsx +0 -341
- package/src/test-utils/setup-ssr-test-env.tsx +0 -13
- package/src/test-utils/ssr.tsx +0 -197
- package/src/text-field-base.css.ts +0 -416
- package/src/text-field-base.tsx +0 -628
- package/src/text-field-components.css.ts +0 -159
- package/src/text-field-components.tsx +0 -225
- package/src/text-field.tsx +0 -118
- package/src/text-link.css.ts +0 -83
- package/src/text-link.tsx +0 -85
- package/src/text-tokens.tsx +0 -708
- package/src/text.css.ts +0 -60
- package/src/text.tsx +0 -516
- package/src/theme-context-provider.tsx +0 -370
- package/src/theme-context.css.ts +0 -3
- package/src/theme-context.tsx +0 -8
- package/src/theme-variant-context.tsx +0 -51
- package/src/theme.tsx +0 -184
- package/src/time-field.tsx +0 -99
- package/src/timeline.css.ts +0 -135
- package/src/timeline.tsx +0 -250
- package/src/timer.css.ts +0 -99
- package/src/timer.tsx +0 -420
- package/src/title.tsx +0 -119
- package/src/tooltip-context-provider.tsx +0 -57
- package/src/tooltip.css.ts +0 -106
- package/src/tooltip.tsx +0 -649
- package/src/touchable.css.ts +0 -56
- package/src/touchable.tsx +0 -355
- package/src/types/font-face.d.ts +0 -47
- package/src/types/libs.d.ts +0 -3
- package/src/utils/__tests__/analytics-test.tsx +0 -35
- package/src/utils/__tests__/browser-test.tsx +0 -28
- package/src/utils/__tests__/dom-test.tsx +0 -23
- package/src/utils/__tests__/helpers-test.tsx +0 -166
- package/src/utils/analytics.tsx +0 -28
- package/src/utils/animation.tsx +0 -201
- package/src/utils/aspect-ratio-support.css.ts +0 -28
- package/src/utils/aspect-ratio-support.tsx +0 -141
- package/src/utils/browser.tsx +0 -9
- package/src/utils/color.tsx +0 -46
- package/src/utils/common.tsx +0 -27
- package/src/utils/credit-card.tsx +0 -46
- package/src/utils/css.tsx +0 -25
- package/src/utils/document-visibility.tsx +0 -52
- package/src/utils/dom.tsx +0 -155
- package/src/utils/environment.tsx +0 -6
- package/src/utils/headings.tsx +0 -18
- package/src/utils/helpers.tsx +0 -182
- package/src/utils/keys.tsx +0 -8
- package/src/utils/locale.tsx +0 -27
- package/src/utils/platform.tsx +0 -94
- package/src/utils/region-code.tsx +0 -1
- package/src/utils/renders-element.tsx +0 -6
- package/src/utils/time.tsx +0 -22
- package/src/utils/types.tsx +0 -19
- package/src/utils/utility-types.tsx +0 -8
- package/src/video.css.ts +0 -11
- package/src/video.tsx +0 -355
- package/src/vivinho-loading-animation/in-lottie.json +0 -402
- package/src/vivinho-loading-animation/index.tsx +0 -90
- package/src/vivinho-loading-animation/out-lottie.json +0 -575
- package/src/vivinho-loading-animation/pulse-lottie.json +0 -551
- package/src/vivinho-loading-animation/vivinho-loading-animation.css.ts +0 -15
- package/src/vivinho-loading-animation/wave-lottie.json +0 -2829
package/src/icon-button.tsx
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import {BaseTouchable} from './touchable';
|
|
4
|
-
import * as styles from './icon-button.css';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
import Spinner from './spinner';
|
|
7
|
-
import {useThemeVariant} from './theme-variant-context';
|
|
8
|
-
|
|
9
|
-
import type {TouchableElement, TouchableComponentProps} from './touchable';
|
|
10
|
-
import type {ExclusifyUnion} from './utils/utility-types';
|
|
11
|
-
import type {DataAttributes, IconProps, TrackingEvent} from './utils/types';
|
|
12
|
-
|
|
13
|
-
export type IconButtonType = 'neutral' | 'brand' | 'danger';
|
|
14
|
-
export type IconButtonBackgroundType = 'transparent' | 'solid' | 'soft';
|
|
15
|
-
|
|
16
|
-
type AriaProps = ExclusifyUnion<{'aria-label': string} | {'aria-labelledby': string}>;
|
|
17
|
-
|
|
18
|
-
interface BaseProps {
|
|
19
|
-
children?: undefined;
|
|
20
|
-
trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
|
|
21
|
-
dataAttributes?: DataAttributes;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
showSpinner?: boolean;
|
|
24
|
-
small?: boolean;
|
|
25
|
-
bleedLeft?: boolean;
|
|
26
|
-
bleedRight?: boolean;
|
|
27
|
-
bleedY?: boolean;
|
|
28
|
-
role?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface IconButtonBaseProps {
|
|
32
|
-
Icon: (props: IconProps) => JSX.Element;
|
|
33
|
-
type?: IconButtonType;
|
|
34
|
-
backgroundType?: IconButtonBackgroundType;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface InternalIconButtonBaseProps {
|
|
38
|
-
hasOverlay?: boolean;
|
|
39
|
-
'aria-disabled'?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type IconButtonProps = TouchableComponentProps<BaseProps & IconButtonBaseProps & AriaProps>;
|
|
43
|
-
|
|
44
|
-
export const RawIconButton = React.forwardRef<
|
|
45
|
-
TouchableElement,
|
|
46
|
-
IconButtonProps & InternalIconButtonBaseProps
|
|
47
|
-
>(
|
|
48
|
-
(
|
|
49
|
-
{
|
|
50
|
-
disabled,
|
|
51
|
-
trackingEvent,
|
|
52
|
-
role,
|
|
53
|
-
dataAttributes,
|
|
54
|
-
type = 'neutral',
|
|
55
|
-
backgroundType = 'transparent',
|
|
56
|
-
hasOverlay = true,
|
|
57
|
-
small,
|
|
58
|
-
Icon,
|
|
59
|
-
bleedLeft,
|
|
60
|
-
bleedRight,
|
|
61
|
-
bleedY,
|
|
62
|
-
showSpinner: showSpinnerProp,
|
|
63
|
-
'aria-disabled': ariaDisabled,
|
|
64
|
-
...touchableProps
|
|
65
|
-
},
|
|
66
|
-
ref
|
|
67
|
-
) => {
|
|
68
|
-
const themeVariant = useThemeVariant();
|
|
69
|
-
const [isOnPressPromiseResolving, setIsOnPressPromiseResolving] = React.useState(false);
|
|
70
|
-
|
|
71
|
-
const showSpinner = showSpinnerProp || isOnPressPromiseResolving;
|
|
72
|
-
|
|
73
|
-
// This state is needed to not render the spinner when hidden (because it causes high CPU usage
|
|
74
|
-
// specially in iPhone). But we want the spinner to be visible during the show/hide animation.
|
|
75
|
-
// * When showSpinner prop is true, state is changed immediately.
|
|
76
|
-
// * When the transition ends this state is updated again if needed
|
|
77
|
-
const [shouldRenderSpinner, setShouldRenderSpinner] = React.useState(!!showSpinner);
|
|
78
|
-
|
|
79
|
-
React.useEffect(() => {
|
|
80
|
-
if (showSpinner && !shouldRenderSpinner) {
|
|
81
|
-
setShouldRenderSpinner(true);
|
|
82
|
-
}
|
|
83
|
-
}, [showSpinner, shouldRenderSpinner]);
|
|
84
|
-
|
|
85
|
-
const buttonSize = small ? 'small' : 'default';
|
|
86
|
-
const buttonTokensKey: keyof typeof styles.iconButtonTokens =
|
|
87
|
-
themeVariant === 'media' ? `${type}-media` : `${type}-${backgroundType}-${themeVariant}`;
|
|
88
|
-
|
|
89
|
-
const commonProps = {
|
|
90
|
-
disabled: disabled || showSpinner,
|
|
91
|
-
'aria-disabled': ariaDisabled,
|
|
92
|
-
ref,
|
|
93
|
-
trackingEvent,
|
|
94
|
-
role,
|
|
95
|
-
dataAttributes: {'component-name': 'IconButton', testid: 'IconButton', ...dataAttributes},
|
|
96
|
-
className: classNames(
|
|
97
|
-
styles.button,
|
|
98
|
-
styles.iconButtonTokens[buttonTokensKey],
|
|
99
|
-
styles.minimumInteractiveArea,
|
|
100
|
-
{
|
|
101
|
-
[styles.disabled]: disabled || ariaDisabled,
|
|
102
|
-
[styles.overlayContainer]: !disabled && !showSpinner && !ariaDisabled,
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
resetMargin: !bleedLeft && !bleedRight && !bleedY,
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const content = (
|
|
109
|
-
<div className={classNames(styles.iconContainer[buttonSize], {[styles.isLoading]: showSpinner})}>
|
|
110
|
-
{hasOverlay && <div className={styles.overlay} />}
|
|
111
|
-
|
|
112
|
-
<div aria-hidden={showSpinner ? true : undefined} className={styles.icon}>
|
|
113
|
-
<Icon size={styles.iconSize[buttonSize]} color="currentColor" />
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<div
|
|
117
|
-
aria-hidden={showSpinner ? undefined : true}
|
|
118
|
-
className={styles.spinner}
|
|
119
|
-
onTransitionEnd={() => {
|
|
120
|
-
if (showSpinner !== shouldRenderSpinner) {
|
|
121
|
-
setShouldRenderSpinner(showSpinner);
|
|
122
|
-
}
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
{shouldRenderSpinner && (
|
|
126
|
-
<Spinner size={styles.iconSize[buttonSize]} color="currentColor" delay="0s" />
|
|
127
|
-
)}
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
if (touchableProps.onPress) {
|
|
133
|
-
const originalOnPress = touchableProps.onPress;
|
|
134
|
-
touchableProps.onPress = (e) => {
|
|
135
|
-
const promise = originalOnPress(e);
|
|
136
|
-
if (promise) {
|
|
137
|
-
setIsOnPressPromiseResolving(true);
|
|
138
|
-
promise.finally(() => setIsOnPressPromiseResolving(false));
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<div
|
|
145
|
-
className={classNames(styles.buttonContainer[buttonSize], {
|
|
146
|
-
[styles.bleedLeft[buttonSize]]: bleedLeft,
|
|
147
|
-
[styles.bleedRight[buttonSize]]: bleedRight,
|
|
148
|
-
[styles.bleedY[buttonSize]]: bleedY,
|
|
149
|
-
})}
|
|
150
|
-
>
|
|
151
|
-
<BaseTouchable {...commonProps} {...touchableProps} maybe>
|
|
152
|
-
{content}
|
|
153
|
-
</BaseTouchable>
|
|
154
|
-
</div>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
export const InternalIconButton = React.forwardRef<
|
|
160
|
-
TouchableElement,
|
|
161
|
-
IconButtonProps & InternalIconButtonBaseProps
|
|
162
|
-
>((props, ref) => <RawIconButton ref={ref} {...props} />);
|
|
163
|
-
|
|
164
|
-
export const IconButton = React.forwardRef<TouchableElement, IconButtonProps>((props, ref) => (
|
|
165
|
-
<InternalIconButton ref={ref} {...props} />
|
|
166
|
-
));
|
|
167
|
-
|
|
168
|
-
type ToggleStateProps = {
|
|
169
|
-
Icon: (props: IconProps) => JSX.Element;
|
|
170
|
-
type?: IconButtonType;
|
|
171
|
-
backgroundType?: IconButtonBackgroundType;
|
|
172
|
-
} & AriaProps;
|
|
173
|
-
|
|
174
|
-
interface BaseToggleProps {
|
|
175
|
-
checkedProps: ToggleStateProps;
|
|
176
|
-
uncheckedProps: ToggleStateProps;
|
|
177
|
-
onChange?: (checked: boolean) => void | undefined | Promise<void>;
|
|
178
|
-
checked?: boolean;
|
|
179
|
-
defaultChecked?: boolean;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export type ToggleIconButtonProps = BaseProps & BaseToggleProps;
|
|
183
|
-
|
|
184
|
-
export const InternalToggleIconButton = React.forwardRef<
|
|
185
|
-
TouchableElement,
|
|
186
|
-
ToggleIconButtonProps & InternalIconButtonBaseProps
|
|
187
|
-
>(({checked, defaultChecked, checkedProps, uncheckedProps, onChange, dataAttributes, ...props}, ref) => {
|
|
188
|
-
const [checkedState, setCheckedState] = React.useState(!!defaultChecked);
|
|
189
|
-
|
|
190
|
-
const handleChange = () => {
|
|
191
|
-
if (checked === undefined) {
|
|
192
|
-
// if onChange is asynchronous, wait until it finishes and change the state if there was no error
|
|
193
|
-
const promise = onChange?.(!checkedState);
|
|
194
|
-
if (promise) {
|
|
195
|
-
return promise.then(() => setCheckedState((checkedState) => !checkedState)).catch(() => {});
|
|
196
|
-
} else {
|
|
197
|
-
setCheckedState((checkedState) => !checkedState);
|
|
198
|
-
}
|
|
199
|
-
} else {
|
|
200
|
-
return onChange?.(!checked);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
return (
|
|
205
|
-
<RawIconButton
|
|
206
|
-
ref={ref}
|
|
207
|
-
{...props}
|
|
208
|
-
{...(checked ?? checkedState ? checkedProps : uncheckedProps)}
|
|
209
|
-
dataAttributes={{
|
|
210
|
-
'component-name': 'ToggleIconButton',
|
|
211
|
-
testid: 'ToggleIconButton',
|
|
212
|
-
...dataAttributes,
|
|
213
|
-
}}
|
|
214
|
-
onPress={handleChange}
|
|
215
|
-
/>
|
|
216
|
-
);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
export const ToggleIconButton = React.forwardRef<TouchableElement, ToggleIconButtonProps>((props, ref) => {
|
|
220
|
-
return <InternalToggleIconButton ref={ref} {...props} />;
|
|
221
|
-
});
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {Box, ResponsiveLayout, Text} from '../..';
|
|
3
|
-
import {kebabCase, camelCase, upperFirst, sortBy} from 'lodash';
|
|
4
|
-
import {iconKeywords, iconCategories} from '../../generated/mistica-icons/icons-keywords';
|
|
5
|
-
|
|
6
|
-
import type {Variant} from '../../theme-variant-context';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* './path/icon-name-filled.tsx' => 'IconNameFilled'
|
|
10
|
-
*/
|
|
11
|
-
const fileNameToComponentName = (fileName: string) => {
|
|
12
|
-
const lastSlashIdx = fileName.lastIndexOf('/');
|
|
13
|
-
return upperFirst(camelCase(fileName.slice(lastSlashIdx + 1).replace('.tsx', '')));
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const iconModules = import.meta.glob(
|
|
17
|
-
['../../generated/mistica-icons/**/*.tsx', '!../../generated/mistica-icons/icons-keywords.tsx'],
|
|
18
|
-
{eager: true}
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
// require all icons
|
|
22
|
-
const misticaIcons = Object.entries(iconModules).map(([id, module]) => {
|
|
23
|
-
const component = (module as any).default;
|
|
24
|
-
component.componentName = fileNameToComponentName(id);
|
|
25
|
-
return component;
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const availableCategories = ['All', ...new Set(sortBy(Object.values(iconCategories).flat()))];
|
|
29
|
-
|
|
30
|
-
export default {
|
|
31
|
-
title: 'Icons/Catalog',
|
|
32
|
-
argTypes: {
|
|
33
|
-
size: {
|
|
34
|
-
control: {type: 'range', min: 16, max: 48, step: 4},
|
|
35
|
-
},
|
|
36
|
-
category: {
|
|
37
|
-
control: {type: 'select'},
|
|
38
|
-
options: availableCategories,
|
|
39
|
-
},
|
|
40
|
-
variantOutside: {
|
|
41
|
-
options: ['default', 'brand', 'negative', 'alternative'],
|
|
42
|
-
control: {type: 'select'},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
parameters: {
|
|
46
|
-
fullScreen: true,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
type Args = {
|
|
51
|
-
category: string;
|
|
52
|
-
filter: string;
|
|
53
|
-
size: number;
|
|
54
|
-
regular: boolean;
|
|
55
|
-
light: boolean;
|
|
56
|
-
filled: boolean;
|
|
57
|
-
variantOutside: Variant;
|
|
58
|
-
names: boolean;
|
|
59
|
-
background: boolean;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Catalog: StoryComponent<Args> = ({
|
|
63
|
-
category,
|
|
64
|
-
filter,
|
|
65
|
-
size,
|
|
66
|
-
regular,
|
|
67
|
-
light,
|
|
68
|
-
filled,
|
|
69
|
-
variantOutside,
|
|
70
|
-
names,
|
|
71
|
-
background,
|
|
72
|
-
}) => {
|
|
73
|
-
const getRealName = (name: string) => name.replace(/^Icon/, '').replace(/(Regular|Filled|Light)$/, '');
|
|
74
|
-
const getTypeSortValue = (name: string) => {
|
|
75
|
-
if (name.endsWith('Regular')) {
|
|
76
|
-
return 0;
|
|
77
|
-
}
|
|
78
|
-
if (name.endsWith('Light')) {
|
|
79
|
-
return 1;
|
|
80
|
-
}
|
|
81
|
-
return 2;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const filterIcon = (name: string): boolean => {
|
|
85
|
-
if (!filled && name.endsWith('Filled')) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
if (!light && name.endsWith('Light')) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
if (!regular && name.endsWith('Regular')) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const realName = getRealName(name);
|
|
96
|
-
const iconKeywordsData = iconKeywords[kebabCase(realName)];
|
|
97
|
-
const iconCategoriesData = iconCategories[kebabCase(realName)];
|
|
98
|
-
|
|
99
|
-
if (category && category !== 'All') {
|
|
100
|
-
const categories = iconCategoriesData || [];
|
|
101
|
-
|
|
102
|
-
if (!categories.includes(category)) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (filter) {
|
|
108
|
-
const keywords = iconKeywordsData || [];
|
|
109
|
-
const categories = iconCategoriesData || [];
|
|
110
|
-
const allSearchableTerms = [...keywords, ...categories, realName.toLowerCase()];
|
|
111
|
-
return allSearchableTerms.some((key) => key.toLowerCase().includes(filter.toLowerCase()));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return true;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const compareNames = (a: string, b: string): number => {
|
|
118
|
-
const realA = getRealName(a);
|
|
119
|
-
const realB = getRealName(b);
|
|
120
|
-
if (realA < realB) {
|
|
121
|
-
return -1;
|
|
122
|
-
}
|
|
123
|
-
if (realA > realB) {
|
|
124
|
-
return 1;
|
|
125
|
-
}
|
|
126
|
-
return getTypeSortValue(a) < getTypeSortValue(b) ? -1 : 1;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const breakName = (name: string) =>
|
|
130
|
-
kebabCase(name)
|
|
131
|
-
.split('-')
|
|
132
|
-
.map(upperFirst)
|
|
133
|
-
.map((part, i) => (
|
|
134
|
-
<span key={i}>
|
|
135
|
-
{part}
|
|
136
|
-
<wbr />
|
|
137
|
-
</span>
|
|
138
|
-
));
|
|
139
|
-
|
|
140
|
-
const iconBackgroundColor = background ? '#aaa' : 'none';
|
|
141
|
-
|
|
142
|
-
return (
|
|
143
|
-
<ResponsiveLayout fullWidth variant={variantOutside}>
|
|
144
|
-
{misticaIcons
|
|
145
|
-
.filter(({componentName}) => filterIcon(componentName))
|
|
146
|
-
.sort((a, b) => compareNames(a.componentName, b.componentName))
|
|
147
|
-
.map((Icon, index) => (
|
|
148
|
-
<div
|
|
149
|
-
key={index}
|
|
150
|
-
style={{display: 'inline-block', verticalAlign: 'top', textAlign: 'center'}}
|
|
151
|
-
>
|
|
152
|
-
<div
|
|
153
|
-
style={{
|
|
154
|
-
textAlign: 'center',
|
|
155
|
-
padding: 16,
|
|
156
|
-
width: size,
|
|
157
|
-
minWidth: names ? 100 : 0,
|
|
158
|
-
}}
|
|
159
|
-
>
|
|
160
|
-
<div
|
|
161
|
-
style={{
|
|
162
|
-
width: size,
|
|
163
|
-
margin: 'auto',
|
|
164
|
-
background: iconBackgroundColor,
|
|
165
|
-
fontSize: 0,
|
|
166
|
-
}}
|
|
167
|
-
>
|
|
168
|
-
<Icon size={size} />
|
|
169
|
-
</div>
|
|
170
|
-
{names && (
|
|
171
|
-
<Box paddingTop={8}>
|
|
172
|
-
<Text size={13}>{breakName(Icon.componentName)}</Text>
|
|
173
|
-
</Box>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
))}
|
|
178
|
-
</ResponsiveLayout>
|
|
179
|
-
);
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
Catalog.args = {
|
|
183
|
-
category: 'All',
|
|
184
|
-
filter: '',
|
|
185
|
-
size: 24,
|
|
186
|
-
regular: true,
|
|
187
|
-
light: true,
|
|
188
|
-
filled: true,
|
|
189
|
-
variantOutside: 'default',
|
|
190
|
-
names: true,
|
|
191
|
-
background: false,
|
|
192
|
-
};
|
package/src/icons/icon-amex.tsx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
role?: string;
|
|
5
|
-
size?: number | string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const IconAmex = ({role = 'presentation', size = 24}: Props): JSX.Element => (
|
|
9
|
-
<svg width={size} height={size} role={role} viewBox="0 0 20 20" fill="none">
|
|
10
|
-
<g clipPath="url(#clip0_10652_7690)">
|
|
11
|
-
<path
|
|
12
|
-
d="M17 -2H-1C-2.65685 -2 -4 -0.656854 -4 1V19C-4 20.6569 -2.65685 22 -1 22H17C18.6569 22 20 20.6569 20 19V1C20 -0.656854 18.6569 -2 17 -2Z"
|
|
13
|
-
fill="white"
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
d="M5.72824 17.8315V10.666H11.9982V12.2695H7.66999V13.495H11.897V15.0033H7.66999V16.276H11.9975V17.8315H5.72824Z"
|
|
17
|
-
fill="#016FD0"
|
|
18
|
-
/>
|
|
19
|
-
<path
|
|
20
|
-
d="M11.9922 17.8315L14.8955 14.293L11.9232 10.666H14.2257L15.9957 12.9085L17.7717 10.666H19.9842L17.051 14.2488L19.9595 17.8315H17.657L15.9395 15.625L14.2625 17.8315H11.9922Z"
|
|
21
|
-
fill="#016FD0"
|
|
22
|
-
/>
|
|
23
|
-
<path
|
|
24
|
-
d="M5.81975 2.50525L2.681 9.42775H4.724L5.303 8.04175H8.6705L9.2465 9.42775H11.3345L8.1995 2.50525H5.81975ZM6.98075 4.11625L8.00675 6.53875H5.95175L6.98075 4.11625Z"
|
|
25
|
-
fill="#016FD0"
|
|
26
|
-
/>
|
|
27
|
-
<path
|
|
28
|
-
d="M11.3345 9.42775V2.50525L14.0893 2.515L15.692 6.979L17.2558 2.50525H19.9888V9.42775H18.2578V4.327L16.4233 9.42775H14.9053L13.0655 4.327V9.42775H11.3345Z"
|
|
29
|
-
fill="#016FD0"
|
|
30
|
-
/>
|
|
31
|
-
</g>
|
|
32
|
-
<defs>
|
|
33
|
-
<clipPath id="clip0_10652_7690">
|
|
34
|
-
<rect width="20" height="20" fill="white" />
|
|
35
|
-
</clipPath>
|
|
36
|
-
</defs>
|
|
37
|
-
</svg>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
export default IconAmex;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {createVar, style} from '@vanilla-extract/css';
|
|
2
|
-
|
|
3
|
-
const transitionDuration = createVar();
|
|
4
|
-
|
|
5
|
-
export const vars = {transitionDuration};
|
|
6
|
-
|
|
7
|
-
export const chevronRotateTransition = style({
|
|
8
|
-
transition: `transform ${transitionDuration}`,
|
|
9
|
-
'@media': {
|
|
10
|
-
['(prefers-reduced-motion)']: {
|
|
11
|
-
transition: 'none',
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const chevronColorTransition = style({
|
|
17
|
-
transition: `fill ${transitionDuration}`,
|
|
18
|
-
'@media': {
|
|
19
|
-
['(prefers-reduced-motion)']: {
|
|
20
|
-
transition: 'none',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import {vars} from '../skins/skin-contract.css';
|
|
5
|
-
import {applyCssVars} from '../utils/css';
|
|
6
|
-
import * as styles from './icon-chevron.css';
|
|
7
|
-
import {useTheme} from '../hooks';
|
|
8
|
-
import {O2_NEW_SKIN, BLAU_SKIN} from '../skins/constants';
|
|
9
|
-
|
|
10
|
-
type IconChevronRightSvgProps = {
|
|
11
|
-
size: number | string;
|
|
12
|
-
color: string;
|
|
13
|
-
transform: string;
|
|
14
|
-
transitionDuration?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
style?: React.CSSProperties;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const IconChevronRightSvgDefault = ({
|
|
20
|
-
size,
|
|
21
|
-
color,
|
|
22
|
-
transform,
|
|
23
|
-
transitionDuration,
|
|
24
|
-
className,
|
|
25
|
-
style,
|
|
26
|
-
}: IconChevronRightSvgProps) => (
|
|
27
|
-
<svg
|
|
28
|
-
role="presentation"
|
|
29
|
-
width={size}
|
|
30
|
-
height={size}
|
|
31
|
-
viewBox="0 0 24 24"
|
|
32
|
-
className={classNames(className, styles.chevronRotateTransition)}
|
|
33
|
-
style={{
|
|
34
|
-
transform,
|
|
35
|
-
...style,
|
|
36
|
-
...applyCssVars({[styles.vars.transitionDuration]: `${transitionDuration}ms`}),
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<path
|
|
40
|
-
d="M12.0001 16.6333C11.7199 16.6333 11.4596 16.5232 11.2695 16.3131L4.2733 8.87648C3.89296 8.47613 3.91298 7.83556 4.31333 7.45523C4.71368 7.07489 5.35425 7.09491 5.73459 7.49526L12.0001 14.1511L18.2657 7.49526C18.646 7.0849 19.2866 7.07489 19.6869 7.45523C20.0873 7.83556 20.1073 8.47613 19.7269 8.87648L12.7308 16.3131C12.5406 16.5132 12.2704 16.6333 12.0001 16.6333Z"
|
|
41
|
-
className={styles.chevronColorTransition}
|
|
42
|
-
fill={color}
|
|
43
|
-
/>
|
|
44
|
-
</svg>
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const IconChevronRightSvgO2 = ({
|
|
48
|
-
size,
|
|
49
|
-
color,
|
|
50
|
-
transform,
|
|
51
|
-
transitionDuration,
|
|
52
|
-
className,
|
|
53
|
-
style,
|
|
54
|
-
}: IconChevronRightSvgProps) => (
|
|
55
|
-
<svg
|
|
56
|
-
role="presentation"
|
|
57
|
-
width={size}
|
|
58
|
-
height={size}
|
|
59
|
-
viewBox="0 0 24 24"
|
|
60
|
-
className={classNames(className, styles.chevronRotateTransition)}
|
|
61
|
-
style={{
|
|
62
|
-
transform,
|
|
63
|
-
...style,
|
|
64
|
-
...applyCssVars({[styles.vars.transitionDuration]: `${transitionDuration}ms`}),
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
<path
|
|
68
|
-
d="M12.0018 16.571C11.7518 16.571 11.5118 16.481 11.3118 16.301L4.32183 9.74098C3.91183 9.36098 3.89183 8.72098 4.27183 8.32098C4.65183 7.92098 5.29183 7.89098 5.69183 8.27098L12.0018 14.181L18.3118 8.27098C18.7118 7.89098 19.3518 7.91098 19.7318 8.32098C20.1118 8.73098 20.0918 9.36098 19.6818 9.74098L12.6918 16.301C12.5018 16.481 12.2518 16.571 12.0018 16.571Z"
|
|
69
|
-
className={styles.chevronColorTransition}
|
|
70
|
-
fill={color}
|
|
71
|
-
/>
|
|
72
|
-
</svg>
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
const IconChevronRightSvgBlau = ({
|
|
76
|
-
size,
|
|
77
|
-
color,
|
|
78
|
-
transform,
|
|
79
|
-
transitionDuration,
|
|
80
|
-
className,
|
|
81
|
-
style,
|
|
82
|
-
}: IconChevronRightSvgProps) => (
|
|
83
|
-
<svg
|
|
84
|
-
role="presentation"
|
|
85
|
-
width={size}
|
|
86
|
-
height={size}
|
|
87
|
-
viewBox="0 0 24 24"
|
|
88
|
-
className={classNames(className, styles.chevronRotateTransition)}
|
|
89
|
-
style={{
|
|
90
|
-
transform,
|
|
91
|
-
...style,
|
|
92
|
-
...applyCssVars({[styles.vars.transitionDuration]: `${transitionDuration}ms`}),
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
<path
|
|
96
|
-
d="M12.0021 16.942L4.32208 9.74195C3.91208 9.36195 3.89208 8.72195 4.27208 8.32195C4.65208 7.92195 5.29208 7.89195 5.69208 8.27195L12.0021 14.182L18.3121 8.27195C18.7121 7.89195 19.3521 7.91195 19.7321 8.32195C20.1121 8.73195 20.0921 9.36195 19.6821 9.74195L12.0021 16.942Z"
|
|
97
|
-
className={styles.chevronColorTransition}
|
|
98
|
-
fill={color}
|
|
99
|
-
/>
|
|
100
|
-
</svg>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
type Direction = 'up' | 'down' | 'left' | 'right';
|
|
104
|
-
|
|
105
|
-
const rotateAngleByDirection: Record<Direction, number> = {
|
|
106
|
-
up: -180,
|
|
107
|
-
down: 0,
|
|
108
|
-
left: 90,
|
|
109
|
-
right: -90,
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
type Props = {
|
|
113
|
-
size?: number;
|
|
114
|
-
color?: string;
|
|
115
|
-
className?: string;
|
|
116
|
-
style?: React.CSSProperties;
|
|
117
|
-
direction?: Direction;
|
|
118
|
-
transitionDuration?: number;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const IconChevron = ({
|
|
122
|
-
size = 24,
|
|
123
|
-
color,
|
|
124
|
-
className,
|
|
125
|
-
style,
|
|
126
|
-
transitionDuration = 300,
|
|
127
|
-
direction = 'right',
|
|
128
|
-
}: Props): JSX.Element => {
|
|
129
|
-
const {skinName} = useTheme();
|
|
130
|
-
const fillColor = color || vars.colors.neutralHigh;
|
|
131
|
-
const props = {
|
|
132
|
-
size,
|
|
133
|
-
color: fillColor,
|
|
134
|
-
transform: `rotate(${rotateAngleByDirection[direction]}deg)`,
|
|
135
|
-
className,
|
|
136
|
-
transitionDuration,
|
|
137
|
-
style,
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
switch (skinName) {
|
|
141
|
-
case O2_NEW_SKIN:
|
|
142
|
-
return <IconChevronRightSvgO2 {...props} />;
|
|
143
|
-
case BLAU_SKIN:
|
|
144
|
-
return <IconChevronRightSvgBlau {...props} />;
|
|
145
|
-
default:
|
|
146
|
-
return <IconChevronRightSvgDefault {...props} />;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export default IconChevron;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {vars} from '../skins/skin-contract.css';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
role?: string;
|
|
6
|
-
size?: number | string;
|
|
7
|
-
color?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const IconCvvAmex = ({role = 'presentation', size = 48, color}: Props): JSX.Element => {
|
|
11
|
-
return (
|
|
12
|
-
<svg width={size} height={size} viewBox="0 0 48 48" role={role} style={{flexShrink: 0}}>
|
|
13
|
-
<g fill={color || vars.colors.brand}>
|
|
14
|
-
<path
|
|
15
|
-
d="M2.571 0H45.43C46.849 0 48 1.075 48 2.4v27.2c0 1.325-1.151 2.4-2.571 2.4H2.57C1.151 32 0 30.925 0 29.6V2.4C0 1.075 1.151 0 2.571 0zm0 1.2c-.71 0-1.285.537-1.285 1.2v27.2c0 .663.575 1.2 1.285 1.2H45.43c.71 0 1.285-.537 1.285-1.2V2.4c0-.663-.575-1.2-1.285-1.2H2.57z"
|
|
16
|
-
transform="translate(0 8)"
|
|
17
|
-
/>
|
|
18
|
-
<path
|
|
19
|
-
d="M24.286 6.4H42c.473 0 .857.358.857.8v6.4c0 .442-.384.8-.857.8H24.286c-.474 0-.857-.358-.857-.8V7.2c0-.442.383-.8.857-.8zm.268 1.05v5.9h17.178v-5.9H24.554z"
|
|
20
|
-
transform="translate(0 8)"
|
|
21
|
-
/>
|
|
22
|
-
<path
|
|
23
|
-
d="M26.949 12h.708V8.618h-.706l-.874.602v.659l.83-.572h.042V12zm2.509-2.56l-.015.202h.656c0-.326.225-.541.553-.541.31 0 .53.192.53.464 0 .22-.12.396-.595.86l-1.104 1.08V12h2.44v-.588h-1.481v-.042l.646-.617c.586-.55.786-.867.786-1.235 0-.581-.493-.987-1.198-.987-.658 0-1.13.361-1.218.91zm4.828 1.093h.42c.379 0 .61.183.61.478 0 .288-.245.487-.6.487-.362 0-.604-.18-.625-.466h-.677c.03.638.541 1.055 1.296 1.055.77 0 1.329-.43 1.329-1.022 0-.445-.291-.755-.755-.806v-.043c.377-.077.623-.382.623-.773 0-.532-.499-.912-1.193-.912-.738 0-1.214.403-1.237 1.043h.654c.019-.293.237-.478.565-.478.33 0 .541.174.541.445 0 .277-.218.464-.539.464h-.412v.528zM39.14 12h.675v-.59h.443v-.589h-.443V8.618h-.992l-.542.83c-.33.515-.593.953-.796 1.336v.625h1.655V12zm-1.02-1.195c.387-.701.69-1.175.999-1.636h.037v1.673H38.12v-.037z"
|
|
24
|
-
transform="translate(0 8)"
|
|
25
|
-
/>
|
|
26
|
-
</g>
|
|
27
|
-
</svg>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default IconCvvAmex;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {vars} from '../skins/skin-contract.css';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
role?: string;
|
|
6
|
-
size?: number | string;
|
|
7
|
-
color?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const IconCvvVisaMc = ({role = 'presentation', size = 48, color}: Props): JSX.Element => {
|
|
11
|
-
return (
|
|
12
|
-
<svg width={size} height={size} viewBox="0 0 48 48" role={role} style={{flexShrink: 0}}>
|
|
13
|
-
<g fill={color || vars.colors.brand}>
|
|
14
|
-
<path
|
|
15
|
-
d="M2.571 0H45.43C46.849 0 48 1.075 48 2.4v27.2c0 1.325-1.151 2.4-2.571 2.4H2.57C1.151 32 0 30.925 0 29.6V2.4C0 1.075 1.151 0 2.571 0zm0 1.2c-.71 0-1.285.537-1.285 1.2v27.2c0 .663.575 1.2 1.285 1.2H45.43c.71 0 1.285-.537 1.285-1.2V2.4c0-.663-.575-1.2-1.285-1.2H2.57z"
|
|
16
|
-
transform="translate(0 8)"
|
|
17
|
-
/>
|
|
18
|
-
<path
|
|
19
|
-
d="M0 7.2H48V12H0zM28.286 18.4H42c.473 0 .857.358.857.8v6.4c0 .442-.384.8-.857.8H28.286c-.474 0-.857-.358-.857-.8v-6.4c0-.442.383-.8.857-.8zm.268 1.05v5.9h13.178v-5.9H28.554z"
|
|
20
|
-
transform="translate(0 8)"
|
|
21
|
-
/>
|
|
22
|
-
<path
|
|
23
|
-
d="M31.02 24v-2.693h-.045l-.89.572v-.659l.937-.602h.756V24h-.758zm2.577-2.37c0-.653.537-1.099 1.32-1.099.757 0 1.284.406 1.284.987 0 .368-.213.684-.841 1.235l-.693.617v.042h1.587V24H33.64v-.495l1.182-1.08c.51-.464.638-.64.638-.86 0-.272-.236-.464-.567-.464-.352 0-.593.215-.593.527v.014h-.703v-.012zm5.093.903v-.528h.442c.344 0 .578-.187.578-.464 0-.271-.226-.445-.58-.445-.352 0-.585.185-.605.478h-.7c.024-.64.534-1.043 1.325-1.043.743 0 1.278.38 1.278.912 0 .391-.263.696-.668.773v.043c.497.051.809.36.809.806 0 .593-.598 1.022-1.424 1.022-.809 0-1.356-.417-1.389-1.055h.726c.023.286.281.466.67.466.38 0 .643-.199.643-.487 0-.295-.248-.478-.655-.478h-.45z"
|
|
24
|
-
transform="translate(0 8)"
|
|
25
|
-
/>
|
|
26
|
-
</g>
|
|
27
|
-
</svg>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default IconCvvVisaMc;
|