@telefonica/mistica 16.60.0 → 16.61.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 +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-fixed-footer-layout.d.ts +2 -1
- package/dist/button-fixed-footer-layout.js +4 -3
- package/dist/button-group.css-mistica.js +1 -1
- package/dist/button-layout.css-mistica.js +14 -14
- package/dist/button.css-mistica.js +30 -30
- 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/blocks.css-mistica.js +1 -1
- package/dist/community/example-component.css-mistica.js +1 -1
- 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/fixed-footer-layout.d.ts +6 -1
- package/dist/fixed-footer-layout.js +29 -28
- 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 +2 -2
- package/dist/image.js +8 -1
- 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/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-fixed-footer-layout.js +12 -11
- 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 +30 -30
- 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/blocks.css-mistica.js +1 -1
- package/dist-es/community/example-component.css-mistica.js +1 -1
- 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/fixed-footer-layout.js +57 -56
- 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 +2 -2
- package/dist-es/image.js +8 -1
- 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/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/llms.md +11 -0
- package/package.json +13 -1
- package/src/accordion.css.ts +121 -0
- package/src/accordion.tsx +366 -0
- package/src/align.css.ts +7 -0
- package/src/align.tsx +32 -0
- package/src/autocomplete.css.ts +62 -0
- package/src/autocomplete.tsx +239 -0
- package/src/avatar.css.ts +14 -0
- package/src/avatar.tsx +120 -0
- package/src/badge.css.ts +51 -0
- package/src/badge.tsx +79 -0
- package/src/box.css.ts +51 -0
- package/src/box.tsx +114 -0
- package/src/boxed.css.ts +132 -0
- package/src/boxed.tsx +153 -0
- package/src/button-fixed-footer-layout.tsx +65 -0
- package/src/button-group.css.ts +75 -0
- package/src/button-group.tsx +91 -0
- package/src/button-layout.css.ts +162 -0
- package/src/button-layout.tsx +91 -0
- package/src/button.css.ts +758 -0
- package/src/button.tsx +632 -0
- package/src/callout.css.ts +50 -0
- package/src/callout.tsx +147 -0
- package/src/card-cover.tsx +242 -0
- package/src/card-data.tsx +152 -0
- package/src/card-internal.css.ts +271 -0
- package/src/card-internal.tsx +1724 -0
- package/src/card-media.tsx +157 -0
- package/src/card-naked.tsx +63 -0
- package/src/carousel.css.ts +522 -0
- package/src/carousel.tsx +1300 -0
- package/src/checkbox.css.ts +94 -0
- package/src/checkbox.tsx +192 -0
- package/src/chip.css.ts +204 -0
- package/src/chip.tsx +191 -0
- package/src/circle.css.ts +14 -0
- package/src/circle.tsx +52 -0
- 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 +84 -0
- package/src/community/__screenshot_tests__/blocks-screenshot-test.tsx +72 -0
- package/src/community/__stories__/advanced-data-card-carousel-story.tsx +66 -0
- package/src/community/__stories__/advanced-data-card-story.tsx +158 -0
- package/src/community/__stories__/blocks-story.tsx +272 -0
- package/src/community/__stories__/example-component-story.tsx +15 -0
- package/src/community/__stories__/index-story.tsx +154 -0
- package/src/community/__type_tests__/advanced-data-card-type-test.tsx +40 -0
- package/src/community/advanced-data-card.css.ts +271 -0
- package/src/community/advanced-data-card.tsx +431 -0
- package/src/community/blocks.css.ts +12 -0
- package/src/community/blocks.tsx +290 -0
- package/src/community/example-component.css.ts +7 -0
- package/src/community/example-component.tsx +17 -0
- package/src/community/index.tsx +10 -0
- package/src/counter.css.ts +150 -0
- package/src/counter.tsx +215 -0
- package/src/cover-hero-media.tsx +39 -0
- package/src/cover-hero.css.ts +133 -0
- package/src/cover-hero.tsx +262 -0
- package/src/credit-card-expiration-field.tsx +187 -0
- package/src/credit-card-fields.tsx +56 -0
- package/src/credit-card-number-field.css.ts +47 -0
- package/src/credit-card-number-field.tsx +245 -0
- package/src/cvv-field.tsx +169 -0
- package/src/date-field.css.ts +14 -0
- package/src/date-field.tsx +130 -0
- package/src/date-time-field.tsx +141 -0
- package/src/date-time-picker.css.ts +126 -0
- package/src/date-time-picker.tsx +188 -0
- package/src/decimal-field.tsx +160 -0
- package/src/desktop-container-type-context.tsx +15 -0
- package/src/dialog-context.tsx +81 -0
- package/src/dialog.css.ts +155 -0
- package/src/dialog.tsx +423 -0
- package/src/divider.css.ts +10 -0
- package/src/divider.tsx +11 -0
- package/src/double-field.css.ts +33 -0
- package/src/double-field.tsx +71 -0
- package/src/drawer.css.ts +123 -0
- package/src/drawer.tsx +304 -0
- package/src/email-field.tsx +76 -0
- package/src/empty-state-card.css.ts +40 -0
- package/src/empty-state-card.tsx +92 -0
- package/src/empty-state.css.ts +119 -0
- package/src/empty-state.tsx +141 -0
- package/src/fade-in.css.ts +12 -0
- package/src/fade-in.tsx +40 -0
- package/src/feedback.css.ts +119 -0
- package/src/feedback.tsx +432 -0
- package/src/file-upload.css.ts +156 -0
- package/src/file-upload.tsx +612 -0
- package/src/fixed-footer-layout.css.ts +96 -0
- package/src/fixed-footer-layout.tsx +227 -0
- package/src/fixed-to-top.tsx +21 -0
- package/src/focus-trap.tsx +17 -0
- package/src/form-context.tsx +198 -0
- package/src/form.css.ts +5 -0
- package/src/form.tsx +287 -0
- package/src/grid-layout.css.ts +68 -0
- package/src/grid-layout.tsx +201 -0
- package/src/grid.css.ts +203 -0
- package/src/grid.tsx +241 -0
- package/src/header.css.ts +30 -0
- package/src/header.tsx +319 -0
- package/src/hero.css.ts +71 -0
- package/src/hero.tsx +318 -0
- package/src/hooks.tsx +313 -0
- package/src/horizontal-scroll.css.ts +43 -0
- package/src/horizontal-scroll.tsx +18 -0
- package/src/iban-field.tsx +218 -0
- package/src/icon-button.css.ts +561 -0
- package/src/icon-button.tsx +221 -0
- package/src/icons/__stories__/mistica-icons-story.tsx +192 -0
- package/src/icons/icon-amex.tsx +40 -0
- package/src/icons/icon-chevron.css.ts +23 -0
- package/src/icons/icon-chevron.tsx +150 -0
- package/src/icons/icon-cvv-amex.tsx +31 -0
- package/src/icons/icon-cvv-visa-mc.tsx +31 -0
- package/src/icons/icon-error.css.ts +27 -0
- package/src/icons/icon-error.tsx +207 -0
- package/src/icons/icon-info.tsx +86 -0
- package/src/icons/icon-mastercard.tsx +36 -0
- package/src/icons/icon-success-vivo-new.tsx +51 -0
- package/src/icons/icon-success-vivo.tsx +36 -0
- package/src/icons/icon-success.tsx +211 -0
- package/src/icons/icon-visa.tsx +32 -0
- package/src/image.css.ts +48 -0
- package/src/image.tsx +352 -0
- package/src/index.tsx +2466 -0
- package/src/inline.css.ts +131 -0
- package/src/inline.tsx +135 -0
- package/src/integer-field.tsx +93 -0
- package/src/list.css.ts +281 -0
- package/src/list.tsx +963 -0
- package/src/loading-bar.css.ts +69 -0
- package/src/loading-bar.tsx +25 -0
- package/src/loading-screen.css.ts +114 -0
- package/src/loading-screen.tsx +376 -0
- package/src/logo-blau-shell.tsx +30 -0
- package/src/logo-blau.tsx +60 -0
- package/src/logo-common.tsx +29 -0
- package/src/logo-esimflag-shell.tsx +30 -0
- package/src/logo-esimflag.tsx +56 -0
- package/src/logo-movistar-new-shell.tsx +30 -0
- package/src/logo-movistar-new.tsx +85 -0
- package/src/logo-movistar-shell.tsx +30 -0
- package/src/logo-movistar.tsx +63 -0
- package/src/logo-o2-new-shell.tsx +26 -0
- package/src/logo-o2-new.tsx +27 -0
- package/src/logo-o2-shell.tsx +26 -0
- package/src/logo-o2.tsx +27 -0
- package/src/logo-telefonica-shell.tsx +30 -0
- package/src/logo-telefonica.tsx +95 -0
- package/src/logo-tu-shell.tsx +26 -0
- package/src/logo-tu.tsx +28 -0
- package/src/logo-vivo-shell.tsx +30 -0
- package/src/logo-vivo.tsx +53 -0
- package/src/logo.css.ts +33 -0
- package/src/logo.tsx +313 -0
- package/src/master-detail-layout.tsx +28 -0
- package/src/maybe-dismissable.css.ts +37 -0
- package/src/maybe-dismissable.tsx +58 -0
- package/src/media-queries.css.ts +67 -0
- package/src/menu.css.ts +132 -0
- package/src/menu.tsx +468 -0
- package/src/meter.tsx +516 -0
- package/src/modal-context-provider.tsx +45 -0
- package/src/month-field.tsx +124 -0
- package/src/mosaic.css.ts +73 -0
- package/src/mosaic.tsx +205 -0
- package/src/navigation-bar.css.ts +558 -0
- package/src/navigation-bar.tsx +1637 -0
- package/src/navigation-breadcrumbs.css.ts +22 -0
- package/src/navigation-breadcrumbs.tsx +69 -0
- package/src/negative-box.tsx +15 -0
- package/src/nestable-context.tsx +139 -0
- package/src/overlay.tsx +86 -0
- package/src/overscroll-color-context.tsx +141 -0
- package/src/package-version.tsx +2 -0
- package/src/password-field.tsx +126 -0
- package/src/phone-number-field-lite.tsx +265 -0
- package/src/phone-number-field.tsx +171 -0
- package/src/pin-field.css.ts +90 -0
- package/src/pin-field.tsx +346 -0
- package/src/placeholder.tsx +41 -0
- package/src/popover.css.ts +8 -0
- package/src/popover.tsx +85 -0
- package/src/portal.tsx +43 -0
- package/src/progress-bar.css.ts +61 -0
- package/src/progress-bar.tsx +174 -0
- package/src/radio-button.css.ts +174 -0
- package/src/radio-button.tsx +322 -0
- package/src/rating.css.ts +128 -0
- package/src/rating.tsx +351 -0
- package/src/responsive-layout.css.ts +162 -0
- package/src/responsive-layout.tsx +106 -0
- package/src/screen-reader-only.css.ts +27 -0
- package/src/screen-reader-only.tsx +33 -0
- package/src/screen-size-context-provider.tsx +96 -0
- package/src/screen-size-context.tsx +23 -0
- package/src/search-field.tsx +126 -0
- package/src/select.css.ts +226 -0
- package/src/select.tsx +513 -0
- package/src/sheet-action-row.css.ts +33 -0
- package/src/sheet-actions-list.tsx +113 -0
- package/src/sheet-actions.tsx +95 -0
- package/src/sheet-common.css.ts +254 -0
- package/src/sheet-common.tsx +402 -0
- package/src/sheet-info.css.ts +19 -0
- package/src/sheet-info.tsx +127 -0
- package/src/sheet-native.tsx +189 -0
- package/src/sheet-radio-list.tsx +118 -0
- package/src/sheet-root.tsx +127 -0
- package/src/sheet-types.tsx +94 -0
- package/src/sheet-web.tsx +140 -0
- package/src/skeleton-base.tsx +38 -0
- package/src/skeletons.css.ts +56 -0
- package/src/skeletons.tsx +133 -0
- package/src/skins/blau.tsx +724 -0
- package/src/skins/constants.tsx +10 -0
- package/src/skins/defaults.tsx +104 -0
- package/src/skins/esimflag.tsx +728 -0
- package/src/skins/movistar-new.tsx +735 -0
- package/src/skins/movistar.tsx +740 -0
- package/src/skins/o2-new.tsx +731 -0
- package/src/skins/o2.tsx +727 -0
- package/src/skins/skin-contract.css.ts +380 -0
- package/src/skins/telefonica.tsx +768 -0
- package/src/skins/tu.tsx +741 -0
- package/src/skins/types/colors.tsx +286 -0
- package/src/skins/types/index.tsx +153 -0
- package/src/skins/utils.tsx +66 -0
- package/src/skins/vivo-new.tsx +745 -0
- package/src/skins/vivo.tsx +720 -0
- package/src/skip-link.css.ts +34 -0
- package/src/skip-link.tsx +52 -0
- package/src/slider.css.ts +181 -0
- package/src/slider.tsx +384 -0
- package/src/snackbar-context.tsx +98 -0
- package/src/snackbar-native.ts +37 -0
- package/src/snackbar.css.ts +176 -0
- package/src/snackbar.tsx +258 -0
- package/src/spinner.css.ts +66 -0
- package/src/spinner.tsx +136 -0
- package/src/sprinkles.css.ts +83 -0
- package/src/square.css.ts +15 -0
- package/src/square.tsx +55 -0
- package/src/stack.css.ts +44 -0
- package/src/stack.tsx +79 -0
- package/src/stacking-group.css.ts +15 -0
- package/src/stacking-group.tsx +82 -0
- package/src/stepper.css.ts +233 -0
- package/src/stepper.tsx +156 -0
- package/src/switch-component.css.ts +181 -0
- package/src/switch-component.tsx +187 -0
- package/src/tab-focus.tsx +68 -0
- package/src/table-actions-header.tsx +21 -0
- package/src/table-cell-text.tsx +35 -0
- package/src/table.css.ts +297 -0
- package/src/table.tsx +398 -0
- package/src/tabs.css.ts +212 -0
- package/src/tabs.tsx +263 -0
- package/src/tag.css.ts +42 -0
- package/src/tag.tsx +161 -0
- package/src/test-utils/environment/setup-ssr.tsx +10 -0
- package/src/test-utils/fail-test-on-console-error.tsx +22 -0
- package/src/test-utils/index.tsx +341 -0
- package/src/test-utils/setup-ssr-test-env.tsx +13 -0
- package/src/test-utils/ssr.tsx +197 -0
- package/src/text-field-base.css.ts +416 -0
- package/src/text-field-base.tsx +628 -0
- package/src/text-field-components.css.ts +165 -0
- package/src/text-field-components.tsx +230 -0
- package/src/text-field.tsx +118 -0
- package/src/text-link.css.ts +83 -0
- package/src/text-link.tsx +85 -0
- package/src/text-tokens.tsx +708 -0
- package/src/text.css.ts +60 -0
- package/src/text.tsx +516 -0
- package/src/theme-context-provider.tsx +370 -0
- package/src/theme-context.css.ts +3 -0
- package/src/theme-context.tsx +8 -0
- package/src/theme-variant-context.tsx +51 -0
- package/src/theme.tsx +184 -0
- package/src/time-field.tsx +99 -0
- package/src/timeline.css.ts +135 -0
- package/src/timeline.tsx +250 -0
- package/src/timer.css.ts +99 -0
- package/src/timer.tsx +420 -0
- package/src/title.tsx +119 -0
- package/src/tooltip-context-provider.tsx +57 -0
- package/src/tooltip.css.ts +106 -0
- package/src/tooltip.tsx +649 -0
- package/src/touchable.css.ts +56 -0
- package/src/touchable.tsx +355 -0
- package/src/types/font-face.d.ts +47 -0
- package/src/types/libs.d.ts +3 -0
- package/src/utils/__tests__/analytics-test.tsx +35 -0
- package/src/utils/__tests__/browser-test.tsx +28 -0
- package/src/utils/__tests__/dom-test.tsx +23 -0
- package/src/utils/__tests__/helpers-test.tsx +166 -0
- package/src/utils/analytics.tsx +28 -0
- package/src/utils/animation.tsx +201 -0
- package/src/utils/aspect-ratio-support.css.ts +28 -0
- package/src/utils/aspect-ratio-support.tsx +141 -0
- package/src/utils/browser.tsx +9 -0
- package/src/utils/color.tsx +46 -0
- package/src/utils/common.tsx +27 -0
- package/src/utils/credit-card.tsx +46 -0
- package/src/utils/css.tsx +25 -0
- package/src/utils/document-visibility.tsx +52 -0
- package/src/utils/dom.tsx +155 -0
- package/src/utils/environment.tsx +6 -0
- package/src/utils/headings.tsx +18 -0
- package/src/utils/helpers.tsx +182 -0
- package/src/utils/keys.tsx +8 -0
- package/src/utils/locale.tsx +27 -0
- package/src/utils/platform.tsx +94 -0
- package/src/utils/region-code.tsx +1 -0
- package/src/utils/renders-element.tsx +6 -0
- package/src/utils/time.tsx +22 -0
- package/src/utils/types.tsx +19 -0
- package/src/utils/utility-types.tsx +8 -0
- package/src/video.css.ts +11 -0
- package/src/video.tsx +355 -0
- package/src/vivinho-loading-animation/in-lottie.json +402 -0
- package/src/vivinho-loading-animation/index.tsx +90 -0
- package/src/vivinho-loading-animation/out-lottie.json +575 -0
- package/src/vivinho-loading-animation/pulse-lottie.json +551 -0
- package/src/vivinho-loading-animation/vivinho-loading-animation.css.ts +15 -0
- package/src/vivinho-loading-animation/wave-lottie.json +2829 -0
|
@@ -0,0 +1,221 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,192 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
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;
|
|
@@ -0,0 +1,31 @@
|
|
|
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;
|
|
@@ -0,0 +1,31 @@
|
|
|
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;
|