@travel-match/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -2
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/AccountMenu/AccountMenu.cjs +2 -0
- package/dist/components/AccountMenu/AccountMenu.cjs.map +1 -0
- package/dist/components/AccountMenu/AccountMenu.js +164 -0
- package/dist/components/AccountMenu/AccountMenu.js.map +1 -0
- package/dist/components/AccountSheet/AccountSheet.cjs +2 -0
- package/dist/components/AccountSheet/AccountSheet.cjs.map +1 -0
- package/dist/components/AccountSheet/AccountSheet.js +76 -0
- package/dist/components/AccountSheet/AccountSheet.js.map +1 -0
- package/dist/components/AgenciesFilter/AgenciesFilter.cjs +2 -0
- package/dist/components/AgenciesFilter/AgenciesFilter.cjs.map +1 -0
- package/dist/components/AgenciesFilter/AgenciesFilter.js +50 -0
- package/dist/components/AgenciesFilter/AgenciesFilter.js.map +1 -0
- package/dist/components/AgencyCard/AgencyCard.cjs +2 -0
- package/dist/components/AgencyCard/AgencyCard.cjs.map +1 -0
- package/dist/components/AgencyCard/AgencyCard.js +129 -0
- package/dist/components/AgencyCard/AgencyCard.js.map +1 -0
- package/dist/components/AgencyLogo/AgencyLogo.cjs +2 -0
- package/dist/components/AgencyLogo/AgencyLogo.cjs.map +1 -0
- package/dist/components/AgencyLogo/AgencyLogo.js +45 -0
- package/dist/components/AgencyLogo/AgencyLogo.js.map +1 -0
- package/dist/components/AgencyOfferCard/AgencyOfferCard.cjs +2 -0
- package/dist/components/AgencyOfferCard/AgencyOfferCard.cjs.map +1 -0
- package/dist/components/AgencyOfferCard/AgencyOfferCard.js +200 -0
- package/dist/components/AgencyOfferCard/AgencyOfferCard.js.map +1 -0
- package/dist/components/BackLink/BackLink.cjs +2 -0
- package/dist/components/BackLink/BackLink.cjs.map +1 -0
- package/dist/components/BackLink/BackLink.js +27 -0
- package/dist/components/BackLink/BackLink.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +56 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/BudgetField/BudgetField.cjs +2 -0
- package/dist/components/BudgetField/BudgetField.cjs.map +1 -0
- package/dist/components/BudgetField/BudgetField.js +117 -0
- package/dist/components/BudgetField/BudgetField.js.map +1 -0
- package/dist/components/Button/Button.cjs +2 -0
- package/dist/components/Button/Button.cjs.map +1 -0
- package/dist/components/Button/Button.js +38 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Calendar/Calendar.cjs +2 -0
- package/dist/components/Calendar/Calendar.cjs.map +1 -0
- package/dist/components/Calendar/Calendar.js +229 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Calendar/dateUtils.cjs +2 -0
- package/dist/components/Calendar/dateUtils.cjs.map +1 -0
- package/dist/components/Calendar/dateUtils.js +211 -0
- package/dist/components/Calendar/dateUtils.js.map +1 -0
- package/dist/components/CalendarDay/CalendarDay.cjs +2 -0
- package/dist/components/CalendarDay/CalendarDay.cjs.map +1 -0
- package/dist/components/CalendarDay/CalendarDay.js +41 -0
- package/dist/components/CalendarDay/CalendarDay.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +2 -0
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +31 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/ChoiceChip/ChoiceChip.cjs +2 -0
- package/dist/components/ChoiceChip/ChoiceChip.cjs.map +1 -0
- package/dist/components/ChoiceChip/ChoiceChip.js +92 -0
- package/dist/components/ChoiceChip/ChoiceChip.js.map +1 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.cjs +2 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.cjs.map +1 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +74 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/dist/components/CtaRequestFlow/CtaRequestFlow.cjs +2 -0
- package/dist/components/CtaRequestFlow/CtaRequestFlow.cjs.map +1 -0
- package/dist/components/CtaRequestFlow/CtaRequestFlow.js +86 -0
- package/dist/components/CtaRequestFlow/CtaRequestFlow.js.map +1 -0
- package/dist/components/CtaRequestFlow/DotMap.cjs +2 -0
- package/dist/components/CtaRequestFlow/DotMap.cjs.map +1 -0
- package/dist/components/CtaRequestFlow/DotMap.js +31 -0
- package/dist/components/CtaRequestFlow/DotMap.js.map +1 -0
- package/dist/components/CtaSentence/CtaSentence.cjs +2 -0
- package/dist/components/CtaSentence/CtaSentence.cjs.map +1 -0
- package/dist/components/CtaSentence/CtaSentence.js +97 -0
- package/dist/components/CtaSentence/CtaSentence.js.map +1 -0
- package/dist/components/CurrencySelect/CurrencySelect.cjs +2 -0
- package/dist/components/CurrencySelect/CurrencySelect.cjs.map +1 -0
- package/dist/components/CurrencySelect/CurrencySelect.js +24 -0
- package/dist/components/CurrencySelect/CurrencySelect.js.map +1 -0
- package/dist/components/DateField/DateField.cjs +2 -0
- package/dist/components/DateField/DateField.cjs.map +1 -0
- package/dist/components/DateField/DateField.js +55 -0
- package/dist/components/DateField/DateField.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.js +85 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DatePicker/pickerParts.cjs +2 -0
- package/dist/components/DatePicker/pickerParts.cjs.map +1 -0
- package/dist/components/DatePicker/pickerParts.js +83 -0
- package/dist/components/DatePicker/pickerParts.js.map +1 -0
- package/dist/components/DatePickerSheet/DatePickerSheet.cjs +2 -0
- package/dist/components/DatePickerSheet/DatePickerSheet.cjs.map +1 -0
- package/dist/components/DatePickerSheet/DatePickerSheet.js +85 -0
- package/dist/components/DatePickerSheet/DatePickerSheet.js.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.cjs +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +134 -0
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/DestinationAccordion/DestinationAccordion.cjs +2 -0
- package/dist/components/DestinationAccordion/DestinationAccordion.cjs.map +1 -0
- package/dist/components/DestinationAccordion/DestinationAccordion.js +56 -0
- package/dist/components/DestinationAccordion/DestinationAccordion.js.map +1 -0
- package/dist/components/Destinations/Destinations.cjs +2 -0
- package/dist/components/Destinations/Destinations.cjs.map +1 -0
- package/dist/components/Destinations/Destinations.js +66 -0
- package/dist/components/Destinations/Destinations.js.map +1 -0
- package/dist/components/Dialog/Dialog.cjs +2 -0
- package/dist/components/Dialog/Dialog.cjs.map +1 -0
- package/dist/components/Dialog/Dialog.js +98 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Divider/Divider.cjs +2 -0
- package/dist/components/Divider/Divider.cjs.map +1 -0
- package/dist/components/Divider/Divider.js +31 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.cjs +2 -0
- package/dist/components/EmptyState/EmptyState.cjs.map +1 -0
- package/dist/components/EmptyState/EmptyState.js +40 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/ErrorState/ErrorState.cjs +2 -0
- package/dist/components/ErrorState/ErrorState.cjs.map +1 -0
- package/dist/components/ErrorState/ErrorState.js +21 -0
- package/dist/components/ErrorState/ErrorState.js.map +1 -0
- package/dist/components/ExampleRequests/ExampleRequests.cjs +2 -0
- package/dist/components/ExampleRequests/ExampleRequests.cjs.map +1 -0
- package/dist/components/ExampleRequests/ExampleRequests.js +97 -0
- package/dist/components/ExampleRequests/ExampleRequests.js.map +1 -0
- package/dist/components/FaqItem/FaqItem.cjs +2 -0
- package/dist/components/FaqItem/FaqItem.cjs.map +1 -0
- package/dist/components/FaqItem/FaqItem.js +63 -0
- package/dist/components/FaqItem/FaqItem.js.map +1 -0
- package/dist/components/Field/Field.cjs +2 -0
- package/dist/components/Field/Field.cjs.map +1 -0
- package/dist/components/Field/Field.js +75 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/focusControl.cjs +2 -0
- package/dist/components/Field/focusControl.cjs.map +1 -0
- package/dist/components/Field/focusControl.js +11 -0
- package/dist/components/Field/focusControl.js.map +1 -0
- package/dist/components/FilterChips/FilterChips.cjs +2 -0
- package/dist/components/FilterChips/FilterChips.cjs.map +1 -0
- package/dist/components/FilterChips/FilterChips.js +19 -0
- package/dist/components/FilterChips/FilterChips.js.map +1 -0
- package/dist/components/FormProgress/FormProgress.cjs +2 -0
- package/dist/components/FormProgress/FormProgress.cjs.map +1 -0
- package/dist/components/FormProgress/FormProgress.js +54 -0
- package/dist/components/FormProgress/FormProgress.js.map +1 -0
- package/dist/components/HeaderItem/HeaderItem.cjs +2 -0
- package/dist/components/HeaderItem/HeaderItem.cjs.map +1 -0
- package/dist/components/HeaderItem/HeaderItem.js +19 -0
- package/dist/components/HeaderItem/HeaderItem.js.map +1 -0
- package/dist/components/HelpQuestionCard/HelpQuestionCard.cjs +2 -0
- package/dist/components/HelpQuestionCard/HelpQuestionCard.cjs.map +1 -0
- package/dist/components/HelpQuestionCard/HelpQuestionCard.js +35 -0
- package/dist/components/HelpQuestionCard/HelpQuestionCard.js.map +1 -0
- package/dist/components/HeroColumns/HeroColumns.cjs +2 -0
- package/dist/components/HeroColumns/HeroColumns.cjs.map +1 -0
- package/dist/components/HeroColumns/HeroColumns.js +73 -0
- package/dist/components/HeroColumns/HeroColumns.js.map +1 -0
- package/dist/components/HeroColumns/heroMotion.cjs +2 -0
- package/dist/components/HeroColumns/heroMotion.cjs.map +1 -0
- package/dist/components/HeroColumns/heroMotion.js +68 -0
- package/dist/components/HeroColumns/heroMotion.js.map +1 -0
- package/dist/components/HeroMap/HeroMap.cjs +2 -0
- package/dist/components/HeroMap/HeroMap.cjs.map +1 -0
- package/dist/components/HeroMap/HeroMap.js +152 -0
- package/dist/components/HeroMap/HeroMap.js.map +1 -0
- package/dist/components/HeroMap/mapDots.cjs +2 -0
- package/dist/components/HeroMap/mapDots.cjs.map +1 -0
- package/dist/components/HeroMap/mapDots.js +15 -0
- package/dist/components/HeroMap/mapDots.js.map +1 -0
- package/dist/components/HeroOrbit/HeroOrbit.cjs +2 -0
- package/dist/components/HeroOrbit/HeroOrbit.cjs.map +1 -0
- package/dist/components/HeroOrbit/HeroOrbit.js +108 -0
- package/dist/components/HeroOrbit/HeroOrbit.js.map +1 -0
- package/dist/components/HeroSwitcher/HeroSwitcher.cjs +2 -0
- package/dist/components/HeroSwitcher/HeroSwitcher.cjs.map +1 -0
- package/dist/components/HeroSwitcher/HeroSwitcher.js +186 -0
- package/dist/components/HeroSwitcher/HeroSwitcher.js.map +1 -0
- package/dist/components/HowItWorksSteps/HowItWorksSteps.cjs +2 -0
- package/dist/components/HowItWorksSteps/HowItWorksSteps.cjs.map +1 -0
- package/dist/components/HowItWorksSteps/HowItWorksSteps.js +163 -0
- package/dist/components/HowItWorksSteps/HowItWorksSteps.js.map +1 -0
- package/dist/components/IconButton/IconButton.cjs +2 -0
- package/dist/components/IconButton/IconButton.cjs.map +1 -0
- package/dist/components/IconButton/IconButton.js +19 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconTile/IconTile.cjs +2 -0
- package/dist/components/IconTile/IconTile.cjs.map +1 -0
- package/dist/components/IconTile/IconTile.js +19 -0
- package/dist/components/IconTile/IconTile.js.map +1 -0
- package/dist/components/InclusionIndicator/InclusionIndicator.cjs +2 -0
- package/dist/components/InclusionIndicator/InclusionIndicator.cjs.map +1 -0
- package/dist/components/InclusionIndicator/InclusionIndicator.js +46 -0
- package/dist/components/InclusionIndicator/InclusionIndicator.js.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.cjs +2 -0
- package/dist/components/InlineAlert/InlineAlert.cjs.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.js +41 -0
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -0
- package/dist/components/LanguageSelect/LanguageSelect.cjs +2 -0
- package/dist/components/LanguageSelect/LanguageSelect.cjs.map +1 -0
- package/dist/components/LanguageSelect/LanguageSelect.js +25 -0
- package/dist/components/LanguageSelect/LanguageSelect.js.map +1 -0
- package/dist/components/Logo/Logo.cjs +2 -0
- package/dist/components/Logo/Logo.cjs.map +1 -0
- package/dist/components/Logo/Logo.js +33 -0
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Logo/LogoArtwork.cjs +2 -0
- package/dist/components/Logo/LogoArtwork.cjs.map +1 -0
- package/dist/components/Logo/LogoArtwork.js +62 -0
- package/dist/components/Logo/LogoArtwork.js.map +1 -0
- package/dist/components/NewRequestOverlay/NewRequestOverlay.cjs +2 -0
- package/dist/components/NewRequestOverlay/NewRequestOverlay.cjs.map +1 -0
- package/dist/components/NewRequestOverlay/NewRequestOverlay.js +112 -0
- package/dist/components/NewRequestOverlay/NewRequestOverlay.js.map +1 -0
- package/dist/components/NotificationItem/NotificationItem.cjs +2 -0
- package/dist/components/NotificationItem/NotificationItem.cjs.map +1 -0
- package/dist/components/NotificationItem/NotificationItem.js +66 -0
- package/dist/components/NotificationItem/NotificationItem.js.map +1 -0
- package/dist/components/NotificationsButton/NotificationsButton.cjs +2 -0
- package/dist/components/NotificationsButton/NotificationsButton.cjs.map +1 -0
- package/dist/components/NotificationsButton/NotificationsButton.js +25 -0
- package/dist/components/NotificationsButton/NotificationsButton.js.map +1 -0
- package/dist/components/NotificationsDropdown/NotificationsDropdown.cjs +2 -0
- package/dist/components/NotificationsDropdown/NotificationsDropdown.cjs.map +1 -0
- package/dist/components/NotificationsDropdown/NotificationsDropdown.js +87 -0
- package/dist/components/NotificationsDropdown/NotificationsDropdown.js.map +1 -0
- package/dist/components/NotificationsDropdown/NotificationsMenu.cjs +2 -0
- package/dist/components/NotificationsDropdown/NotificationsMenu.cjs.map +1 -0
- package/dist/components/NotificationsDropdown/NotificationsMenu.js +52 -0
- package/dist/components/NotificationsDropdown/NotificationsMenu.js.map +1 -0
- package/dist/components/NotificationsPanel/NotificationsPanel.cjs +2 -0
- package/dist/components/NotificationsPanel/NotificationsPanel.cjs.map +1 -0
- package/dist/components/NotificationsPanel/NotificationsPanel.js +95 -0
- package/dist/components/NotificationsPanel/NotificationsPanel.js.map +1 -0
- package/dist/components/OfferComparison/OfferComparison.cjs +2 -0
- package/dist/components/OfferComparison/OfferComparison.cjs.map +1 -0
- package/dist/components/OfferComparison/OfferComparison.js +72 -0
- package/dist/components/OfferComparison/OfferComparison.js.map +1 -0
- package/dist/components/OptionList/OptionList.cjs +2 -0
- package/dist/components/OptionList/OptionList.cjs.map +1 -0
- package/dist/components/OptionList/OptionList.js +76 -0
- package/dist/components/OptionList/OptionList.js.map +1 -0
- package/dist/components/PackageAnimation/PackageAnimation.cjs +2 -0
- package/dist/components/PackageAnimation/PackageAnimation.cjs.map +1 -0
- package/dist/components/PackageAnimation/PackageAnimation.js +67 -0
- package/dist/components/PackageAnimation/PackageAnimation.js.map +1 -0
- package/dist/components/PackageCard/PackageCard.cjs +2 -0
- package/dist/components/PackageCard/PackageCard.cjs.map +1 -0
- package/dist/components/PackageCard/PackageCard.js +179 -0
- package/dist/components/PackageCard/PackageCard.js.map +1 -0
- package/dist/components/PackageCard/PackageCardElement.cjs +2 -0
- package/dist/components/PackageCard/PackageCardElement.cjs.map +1 -0
- package/dist/components/PackageCard/PackageCardElement.js +24 -0
- package/dist/components/PackageCard/PackageCardElement.js.map +1 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.js +55 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/PartnerCard/PartnerCard.cjs +2 -0
- package/dist/components/PartnerCard/PartnerCard.cjs.map +1 -0
- package/dist/components/PartnerCard/PartnerCard.js +62 -0
- package/dist/components/PartnerCard/PartnerCard.js.map +1 -0
- package/dist/components/PartnerCarousel/AutoplayToggle.cjs +2 -0
- package/dist/components/PartnerCarousel/AutoplayToggle.cjs.map +1 -0
- package/dist/components/PartnerCarousel/AutoplayToggle.js +36 -0
- package/dist/components/PartnerCarousel/AutoplayToggle.js.map +1 -0
- package/dist/components/PartnerCarousel/PartnerCarousel.cjs +2 -0
- package/dist/components/PartnerCarousel/PartnerCarousel.cjs.map +1 -0
- package/dist/components/PartnerCarousel/PartnerCarousel.js +162 -0
- package/dist/components/PartnerCarousel/PartnerCarousel.js.map +1 -0
- package/dist/components/PartnerCarousel/autoplay.cjs +2 -0
- package/dist/components/PartnerCarousel/autoplay.cjs.map +1 -0
- package/dist/components/PartnerCarousel/autoplay.js +71 -0
- package/dist/components/PartnerCarousel/autoplay.js.map +1 -0
- package/dist/components/PasswordStrength/PasswordStrength.cjs +2 -0
- package/dist/components/PasswordStrength/PasswordStrength.cjs.map +1 -0
- package/dist/components/PasswordStrength/PasswordStrength.js +51 -0
- package/dist/components/PasswordStrength/PasswordStrength.js.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.cjs +2 -0
- package/dist/components/PhoneInput/PhoneInput.cjs.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.js +86 -0
- package/dist/components/PhoneInput/PhoneInput.js.map +1 -0
- package/dist/components/PhotoAccordion/PhotoAccordion.cjs +2 -0
- package/dist/components/PhotoAccordion/PhotoAccordion.cjs.map +1 -0
- package/dist/components/PhotoAccordion/PhotoAccordion.js +78 -0
- package/dist/components/PhotoAccordion/PhotoAccordion.js.map +1 -0
- package/dist/components/PlansPicker/PlansPicker.cjs +2 -0
- package/dist/components/PlansPicker/PlansPicker.cjs.map +1 -0
- package/dist/components/PlansPicker/PlansPicker.js +107 -0
- package/dist/components/PlansPicker/PlansPicker.js.map +1 -0
- package/dist/components/PopularQuestions/PopularQuestions.cjs +2 -0
- package/dist/components/PopularQuestions/PopularQuestions.cjs.map +1 -0
- package/dist/components/PopularQuestions/PopularQuestions.js +64 -0
- package/dist/components/PopularQuestions/PopularQuestions.js.map +1 -0
- package/dist/components/PortalFooter/PortalFooter.cjs +2 -0
- package/dist/components/PortalFooter/PortalFooter.cjs.map +1 -0
- package/dist/components/PortalFooter/PortalFooter.js +31 -0
- package/dist/components/PortalFooter/PortalFooter.js.map +1 -0
- package/dist/components/PortalHeader/PortalHeader.cjs +2 -0
- package/dist/components/PortalHeader/PortalHeader.cjs.map +1 -0
- package/dist/components/PortalHeader/PortalHeader.js +139 -0
- package/dist/components/PortalHeader/PortalHeader.js.map +1 -0
- package/dist/components/QuantityStepper/QuantityStepper.cjs +2 -0
- package/dist/components/QuantityStepper/QuantityStepper.cjs.map +1 -0
- package/dist/components/QuantityStepper/QuantityStepper.js +47 -0
- package/dist/components/QuantityStepper/QuantityStepper.js.map +1 -0
- package/dist/components/Radio/Radio.cjs +2 -0
- package/dist/components/Radio/Radio.cjs.map +1 -0
- package/dist/components/Radio/Radio.js +70 -0
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/Rating/Rating.cjs +2 -0
- package/dist/components/Rating/Rating.cjs.map +1 -0
- package/dist/components/Rating/Rating.js +26 -0
- package/dist/components/Rating/Rating.js.map +1 -0
- package/dist/components/RequestCard/RequestCard.cjs +2 -0
- package/dist/components/RequestCard/RequestCard.cjs.map +1 -0
- package/dist/components/RequestCard/RequestCard.js +93 -0
- package/dist/components/RequestCard/RequestCard.js.map +1 -0
- package/dist/components/RequestStatus/RequestStatus.cjs +2 -0
- package/dist/components/RequestStatus/RequestStatus.cjs.map +1 -0
- package/dist/components/RequestStatus/RequestStatus.js +61 -0
- package/dist/components/RequestStatus/RequestStatus.js.map +1 -0
- package/dist/components/RequestStatusTimeline/RequestStatusTimeline.cjs +2 -0
- package/dist/components/RequestStatusTimeline/RequestStatusTimeline.cjs.map +1 -0
- package/dist/components/RequestStatusTimeline/RequestStatusTimeline.js +58 -0
- package/dist/components/RequestStatusTimeline/RequestStatusTimeline.js.map +1 -0
- package/dist/components/RequestSummary/RequestSummary.cjs +2 -0
- package/dist/components/RequestSummary/RequestSummary.cjs.map +1 -0
- package/dist/components/RequestSummary/RequestSummary.js +63 -0
- package/dist/components/RequestSummary/RequestSummary.js.map +1 -0
- package/dist/components/ReviewItem/ReviewItem.cjs +2 -0
- package/dist/components/ReviewItem/ReviewItem.cjs.map +1 -0
- package/dist/components/ReviewItem/ReviewItem.js +112 -0
- package/dist/components/ReviewItem/ReviewItem.js.map +1 -0
- package/dist/components/ReviewsEmptyState/ReviewsEmptyState.cjs +2 -0
- package/dist/components/ReviewsEmptyState/ReviewsEmptyState.cjs.map +1 -0
- package/dist/components/ReviewsEmptyState/ReviewsEmptyState.js +48 -0
- package/dist/components/ReviewsEmptyState/ReviewsEmptyState.js.map +1 -0
- package/dist/components/ReviewsSummary/ReviewsSummary.cjs +2 -0
- package/dist/components/ReviewsSummary/ReviewsSummary.cjs.map +1 -0
- package/dist/components/ReviewsSummary/ReviewsSummary.js +67 -0
- package/dist/components/ReviewsSummary/ReviewsSummary.js.map +1 -0
- package/dist/components/RouteField/RouteField.cjs +2 -0
- package/dist/components/RouteField/RouteField.cjs.map +1 -0
- package/dist/components/RouteField/RouteField.js +77 -0
- package/dist/components/RouteField/RouteField.js.map +1 -0
- package/dist/components/SearchInput/SearchInput.cjs +2 -0
- package/dist/components/SearchInput/SearchInput.cjs.map +1 -0
- package/dist/components/SearchInput/SearchInput.js +167 -0
- package/dist/components/SearchInput/SearchInput.js.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +78 -0
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/Select/Select.cjs +2 -0
- package/dist/components/Select/Select.cjs.map +1 -0
- package/dist/components/Select/Select.js +232 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/SelectedItem.cjs +2 -0
- package/dist/components/Select/SelectedItem.cjs.map +1 -0
- package/dist/components/Select/SelectedItem.js +30 -0
- package/dist/components/Select/SelectedItem.js.map +1 -0
- package/dist/components/SelectSheet/SelectSheet.cjs +2 -0
- package/dist/components/SelectSheet/SelectSheet.cjs.map +1 -0
- package/dist/components/SelectSheet/SelectSheet.js +89 -0
- package/dist/components/SelectSheet/SelectSheet.js.map +1 -0
- package/dist/components/Sheet/Sheet.cjs +2 -0
- package/dist/components/Sheet/Sheet.cjs.map +1 -0
- package/dist/components/Sheet/Sheet.js +58 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/SiteFooter/SiteFooter.cjs +2 -0
- package/dist/components/SiteFooter/SiteFooter.cjs.map +1 -0
- package/dist/components/SiteFooter/SiteFooter.js +83 -0
- package/dist/components/SiteFooter/SiteFooter.js.map +1 -0
- package/dist/components/SiteFooter/footerLink.cjs +2 -0
- package/dist/components/SiteFooter/footerLink.cjs.map +1 -0
- package/dist/components/SiteFooter/footerLink.js +17 -0
- package/dist/components/SiteFooter/footerLink.js.map +1 -0
- package/dist/components/SiteHeader/SiteHeader.cjs +2 -0
- package/dist/components/SiteHeader/SiteHeader.cjs.map +1 -0
- package/dist/components/SiteHeader/SiteHeader.js +36 -0
- package/dist/components/SiteHeader/SiteHeader.js.map +1 -0
- package/dist/components/SocialButton/GoogleMark.cjs +2 -0
- package/dist/components/SocialButton/GoogleMark.cjs.map +1 -0
- package/dist/components/SocialButton/GoogleMark.js +35 -0
- package/dist/components/SocialButton/GoogleMark.js.map +1 -0
- package/dist/components/SocialButton/SocialButton.cjs +2 -0
- package/dist/components/SocialButton/SocialButton.cjs.map +1 -0
- package/dist/components/SocialButton/SocialButton.js +33 -0
- package/dist/components/SocialButton/SocialButton.js.map +1 -0
- package/dist/components/StatusTag/StatusTag.cjs +2 -0
- package/dist/components/StatusTag/StatusTag.cjs.map +1 -0
- package/dist/components/StatusTag/StatusTag.js +18 -0
- package/dist/components/StatusTag/StatusTag.js.map +1 -0
- package/dist/components/StepCard/StepCard.cjs +2 -0
- package/dist/components/StepCard/StepCard.cjs.map +1 -0
- package/dist/components/StepCard/StepCard.js +40 -0
- package/dist/components/StepCard/StepCard.js.map +1 -0
- package/dist/components/Tag/Tag.cjs +2 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.js +17 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Text/Text.cjs +2 -0
- package/dist/components/Text/Text.cjs.map +1 -0
- package/dist/components/Text/Text.js +41 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/TextInput/PasswordInput.cjs +2 -0
- package/dist/components/TextInput/PasswordInput.cjs.map +1 -0
- package/dist/components/TextInput/PasswordInput.js +29 -0
- package/dist/components/TextInput/PasswordInput.js.map +1 -0
- package/dist/components/TextInput/TextInput.cjs +2 -0
- package/dist/components/TextInput/TextInput.cjs.map +1 -0
- package/dist/components/TextInput/TextInput.js +60 -0
- package/dist/components/TextInput/TextInput.js.map +1 -0
- package/dist/components/Textarea/Textarea.cjs +2 -0
- package/dist/components/Textarea/Textarea.cjs.map +1 -0
- package/dist/components/Textarea/Textarea.js +63 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Toggle/Toggle.cjs +2 -0
- package/dist/components/Toggle/Toggle.cjs.map +1 -0
- package/dist/components/Toggle/Toggle.js +34 -0
- package/dist/components/Toggle/Toggle.js.map +1 -0
- package/dist/components/TravelerSelector/TravelerSelector.cjs +2 -0
- package/dist/components/TravelerSelector/TravelerSelector.cjs.map +1 -0
- package/dist/components/TravelerSelector/TravelerSelector.js +178 -0
- package/dist/components/TravelerSelector/TravelerSelector.js.map +1 -0
- package/dist/components/TripTypes/TripTypes.cjs +2 -0
- package/dist/components/TripTypes/TripTypes.cjs.map +1 -0
- package/dist/components/TripTypes/TripTypes.js +105 -0
- package/dist/components/TripTypes/TripTypes.js.map +1 -0
- package/dist/components/VerificationBadge/VerificationBadge.cjs +2 -0
- package/dist/components/VerificationBadge/VerificationBadge.cjs.map +1 -0
- package/dist/components/VerificationBadge/VerificationBadge.js +39 -0
- package/dist/components/VerificationBadge/VerificationBadge.js.map +1 -0
- package/dist/components/WhyTravelMatch/WhyTravelMatch.cjs +2 -0
- package/dist/components/WhyTravelMatch/WhyTravelMatch.cjs.map +1 -0
- package/dist/components/WhyTravelMatch/WhyTravelMatch.js +141 -0
- package/dist/components/WhyTravelMatch/WhyTravelMatch.js.map +1 -0
- package/dist/fonts.css +4 -0
- package/dist/icons/Icon.cjs +2 -0
- package/dist/icons/Icon.cjs.map +1 -0
- package/dist/icons/Icon.js +15 -0
- package/dist/icons/Icon.js.map +1 -0
- package/dist/icons/createIcon.cjs +2 -0
- package/dist/icons/createIcon.cjs.map +1 -0
- package/dist/icons/createIcon.js +72 -0
- package/dist/icons/createIcon.js.map +1 -0
- package/dist/icons/generated/AirplaneSeatIcon.cjs +2 -0
- package/dist/icons/generated/AirplaneSeatIcon.cjs.map +1 -0
- package/dist/icons/generated/AirplaneSeatIcon.js +18 -0
- package/dist/icons/generated/AirplaneSeatIcon.js.map +1 -0
- package/dist/icons/generated/BackArrowIcon.cjs +2 -0
- package/dist/icons/generated/BackArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/BackArrowIcon.js +35 -0
- package/dist/icons/generated/BackArrowIcon.js.map +1 -0
- package/dist/icons/generated/BaggageIcon.cjs +2 -0
- package/dist/icons/generated/BaggageIcon.cjs.map +1 -0
- package/dist/icons/generated/BaggageIcon.js +56 -0
- package/dist/icons/generated/BaggageIcon.js.map +1 -0
- package/dist/icons/generated/BedIcon.cjs +2 -0
- package/dist/icons/generated/BedIcon.cjs.map +1 -0
- package/dist/icons/generated/BedIcon.js +92 -0
- package/dist/icons/generated/BedIcon.js.map +1 -0
- package/dist/icons/generated/BookmarkIcon.cjs +2 -0
- package/dist/icons/generated/BookmarkIcon.cjs.map +1 -0
- package/dist/icons/generated/BookmarkIcon.js +32 -0
- package/dist/icons/generated/BookmarkIcon.js.map +1 -0
- package/dist/icons/generated/BriefcaseIcon.cjs +2 -0
- package/dist/icons/generated/BriefcaseIcon.cjs.map +1 -0
- package/dist/icons/generated/BriefcaseIcon.js +25 -0
- package/dist/icons/generated/BriefcaseIcon.js.map +1 -0
- package/dist/icons/generated/CalendarIcon.cjs +2 -0
- package/dist/icons/generated/CalendarIcon.cjs.map +1 -0
- package/dist/icons/generated/CalendarIcon.js +18 -0
- package/dist/icons/generated/CalendarIcon.js.map +1 -0
- package/dist/icons/generated/CarIcon.cjs +2 -0
- package/dist/icons/generated/CarIcon.cjs.map +1 -0
- package/dist/icons/generated/CarIcon.js +111 -0
- package/dist/icons/generated/CarIcon.js.map +1 -0
- package/dist/icons/generated/CheckmarkIcon.cjs +2 -0
- package/dist/icons/generated/CheckmarkIcon.cjs.map +1 -0
- package/dist/icons/generated/CheckmarkIcon.js +18 -0
- package/dist/icons/generated/CheckmarkIcon.js.map +1 -0
- package/dist/icons/generated/CompareIcon.cjs +2 -0
- package/dist/icons/generated/CompareIcon.cjs.map +1 -0
- package/dist/icons/generated/CompareIcon.js +14 -0
- package/dist/icons/generated/CompareIcon.js.map +1 -0
- package/dist/icons/generated/DownArrowIcon.cjs +2 -0
- package/dist/icons/generated/DownArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/DownArrowIcon.js +35 -0
- package/dist/icons/generated/DownArrowIcon.js.map +1 -0
- package/dist/icons/generated/EmailIcon.cjs +2 -0
- package/dist/icons/generated/EmailIcon.cjs.map +1 -0
- package/dist/icons/generated/EmailIcon.js +18 -0
- package/dist/icons/generated/EmailIcon.js.map +1 -0
- package/dist/icons/generated/ErrorCircleIcon.cjs +2 -0
- package/dist/icons/generated/ErrorCircleIcon.cjs.map +1 -0
- package/dist/icons/generated/ErrorCircleIcon.js +18 -0
- package/dist/icons/generated/ErrorCircleIcon.js.map +1 -0
- package/dist/icons/generated/EyeOpenIcon.cjs +2 -0
- package/dist/icons/generated/EyeOpenIcon.cjs.map +1 -0
- package/dist/icons/generated/EyeOpenIcon.js +25 -0
- package/dist/icons/generated/EyeOpenIcon.js.map +1 -0
- package/dist/icons/generated/EyeSlashedIcon.cjs +2 -0
- package/dist/icons/generated/EyeSlashedIcon.cjs.map +1 -0
- package/dist/icons/generated/EyeSlashedIcon.js +25 -0
- package/dist/icons/generated/EyeSlashedIcon.js.map +1 -0
- package/dist/icons/generated/FlagFranceIcon.cjs +2 -0
- package/dist/icons/generated/FlagFranceIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagFranceIcon.js +24 -0
- package/dist/icons/generated/FlagFranceIcon.js.map +1 -0
- package/dist/icons/generated/FlagGermanyIcon.cjs +2 -0
- package/dist/icons/generated/FlagGermanyIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagGermanyIcon.js +24 -0
- package/dist/icons/generated/FlagGermanyIcon.js.map +1 -0
- package/dist/icons/generated/FlagIcon.cjs +2 -0
- package/dist/icons/generated/FlagIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagIcon.js +24 -0
- package/dist/icons/generated/FlagIcon.js.map +1 -0
- package/dist/icons/generated/FlagItalyIcon.cjs +2 -0
- package/dist/icons/generated/FlagItalyIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagItalyIcon.js +24 -0
- package/dist/icons/generated/FlagItalyIcon.js.map +1 -0
- package/dist/icons/generated/FlagNetherlandsIcon.cjs +2 -0
- package/dist/icons/generated/FlagNetherlandsIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagNetherlandsIcon.js +24 -0
- package/dist/icons/generated/FlagNetherlandsIcon.js.map +1 -0
- package/dist/icons/generated/FlagRoundIcon.cjs +2 -0
- package/dist/icons/generated/FlagRoundIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagRoundIcon.js +33 -0
- package/dist/icons/generated/FlagRoundIcon.js.map +1 -0
- package/dist/icons/generated/FlagRussiaIcon.cjs +2 -0
- package/dist/icons/generated/FlagRussiaIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagRussiaIcon.js +24 -0
- package/dist/icons/generated/FlagRussiaIcon.js.map +1 -0
- package/dist/icons/generated/FlagUaeIcon.cjs +2 -0
- package/dist/icons/generated/FlagUaeIcon.cjs.map +1 -0
- package/dist/icons/generated/FlagUaeIcon.js +28 -0
- package/dist/icons/generated/FlagUaeIcon.js.map +1 -0
- package/dist/icons/generated/ForkKnifeIcon.cjs +2 -0
- package/dist/icons/generated/ForkKnifeIcon.cjs.map +1 -0
- package/dist/icons/generated/ForkKnifeIcon.js +18 -0
- package/dist/icons/generated/ForkKnifeIcon.js.map +1 -0
- package/dist/icons/generated/LanguageIcon.cjs +2 -0
- package/dist/icons/generated/LanguageIcon.cjs.map +1 -0
- package/dist/icons/generated/LanguageIcon.js +16 -0
- package/dist/icons/generated/LanguageIcon.js.map +1 -0
- package/dist/icons/generated/LockIcon.cjs +2 -0
- package/dist/icons/generated/LockIcon.cjs.map +1 -0
- package/dist/icons/generated/LockIcon.js +18 -0
- package/dist/icons/generated/LockIcon.js.map +1 -0
- package/dist/icons/generated/MapPinIcon.cjs +2 -0
- package/dist/icons/generated/MapPinIcon.cjs.map +1 -0
- package/dist/icons/generated/MapPinIcon.js +32 -0
- package/dist/icons/generated/MapPinIcon.js.map +1 -0
- package/dist/icons/generated/MenuIcon.cjs +2 -0
- package/dist/icons/generated/MenuIcon.cjs.map +1 -0
- package/dist/icons/generated/MenuIcon.js +17 -0
- package/dist/icons/generated/MenuIcon.js.map +1 -0
- package/dist/icons/generated/MinusIcon.cjs +2 -0
- package/dist/icons/generated/MinusIcon.cjs.map +1 -0
- package/dist/icons/generated/MinusIcon.js +17 -0
- package/dist/icons/generated/MinusIcon.js.map +1 -0
- package/dist/icons/generated/MountainIcon.cjs +2 -0
- package/dist/icons/generated/MountainIcon.cjs.map +1 -0
- package/dist/icons/generated/MountainIcon.js +35 -0
- package/dist/icons/generated/MountainIcon.js.map +1 -0
- package/dist/icons/generated/NextArrowIcon.cjs +2 -0
- package/dist/icons/generated/NextArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/NextArrowIcon.js +35 -0
- package/dist/icons/generated/NextArrowIcon.js.map +1 -0
- package/dist/icons/generated/NotificationIcon.cjs +2 -0
- package/dist/icons/generated/NotificationIcon.cjs.map +1 -0
- package/dist/icons/generated/NotificationIcon.js +25 -0
- package/dist/icons/generated/NotificationIcon.js.map +1 -0
- package/dist/icons/generated/OtherIcon.cjs +2 -0
- package/dist/icons/generated/OtherIcon.cjs.map +1 -0
- package/dist/icons/generated/OtherIcon.js +23 -0
- package/dist/icons/generated/OtherIcon.js.map +1 -0
- package/dist/icons/generated/PaperIcon.cjs +2 -0
- package/dist/icons/generated/PaperIcon.cjs.map +1 -0
- package/dist/icons/generated/PaperIcon.js +25 -0
- package/dist/icons/generated/PaperIcon.js.map +1 -0
- package/dist/icons/generated/PassportIcon.cjs +2 -0
- package/dist/icons/generated/PassportIcon.cjs.map +1 -0
- package/dist/icons/generated/PassportIcon.js +36 -0
- package/dist/icons/generated/PassportIcon.js.map +1 -0
- package/dist/icons/generated/PeopleIcon.cjs +2 -0
- package/dist/icons/generated/PeopleIcon.cjs.map +1 -0
- package/dist/icons/generated/PeopleIcon.js +46 -0
- package/dist/icons/generated/PeopleIcon.js.map +1 -0
- package/dist/icons/generated/PlaneIcon.cjs +2 -0
- package/dist/icons/generated/PlaneIcon.cjs.map +1 -0
- package/dist/icons/generated/PlaneIcon.js +32 -0
- package/dist/icons/generated/PlaneIcon.js.map +1 -0
- package/dist/icons/generated/PlaneLandingIcon.cjs +2 -0
- package/dist/icons/generated/PlaneLandingIcon.cjs.map +1 -0
- package/dist/icons/generated/PlaneLandingIcon.js +52 -0
- package/dist/icons/generated/PlaneLandingIcon.js.map +1 -0
- package/dist/icons/generated/PlaneTakeoffIcon.cjs +2 -0
- package/dist/icons/generated/PlaneTakeoffIcon.cjs.map +1 -0
- package/dist/icons/generated/PlaneTakeoffIcon.js +52 -0
- package/dist/icons/generated/PlaneTakeoffIcon.js.map +1 -0
- package/dist/icons/generated/PlusIcon.cjs +2 -0
- package/dist/icons/generated/PlusIcon.cjs.map +1 -0
- package/dist/icons/generated/PlusIcon.js +50 -0
- package/dist/icons/generated/PlusIcon.js.map +1 -0
- package/dist/icons/generated/PreferencesIcon.cjs +2 -0
- package/dist/icons/generated/PreferencesIcon.cjs.map +1 -0
- package/dist/icons/generated/PreferencesIcon.js +101 -0
- package/dist/icons/generated/PreferencesIcon.js.map +1 -0
- package/dist/icons/generated/ResizeFieldIcon.cjs +2 -0
- package/dist/icons/generated/ResizeFieldIcon.cjs.map +1 -0
- package/dist/icons/generated/ResizeFieldIcon.js +18 -0
- package/dist/icons/generated/ResizeFieldIcon.js.map +1 -0
- package/dist/icons/generated/ReverseArrowIcon.cjs +2 -0
- package/dist/icons/generated/ReverseArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/ReverseArrowIcon.js +32 -0
- package/dist/icons/generated/ReverseArrowIcon.js.map +1 -0
- package/dist/icons/generated/RoadmapIcon.cjs +2 -0
- package/dist/icons/generated/RoadmapIcon.cjs.map +1 -0
- package/dist/icons/generated/RoadmapIcon.js +56 -0
- package/dist/icons/generated/RoadmapIcon.js.map +1 -0
- package/dist/icons/generated/SaveTimeIcon.cjs +2 -0
- package/dist/icons/generated/SaveTimeIcon.cjs.map +1 -0
- package/dist/icons/generated/SaveTimeIcon.js +36 -0
- package/dist/icons/generated/SaveTimeIcon.js.map +1 -0
- package/dist/icons/generated/SearchIcon.cjs +2 -0
- package/dist/icons/generated/SearchIcon.cjs.map +1 -0
- package/dist/icons/generated/SearchIcon.js +56 -0
- package/dist/icons/generated/SearchIcon.js.map +1 -0
- package/dist/icons/generated/ShieldIcon.cjs +2 -0
- package/dist/icons/generated/ShieldIcon.cjs.map +1 -0
- package/dist/icons/generated/ShieldIcon.js +17 -0
- package/dist/icons/generated/ShieldIcon.js.map +1 -0
- package/dist/icons/generated/StarIcon.cjs +2 -0
- package/dist/icons/generated/StarIcon.cjs.map +1 -0
- package/dist/icons/generated/StarIcon.js +32 -0
- package/dist/icons/generated/StarIcon.js.map +1 -0
- package/dist/icons/generated/StopsIcon.cjs +2 -0
- package/dist/icons/generated/StopsIcon.cjs.map +1 -0
- package/dist/icons/generated/StopsIcon.js +44 -0
- package/dist/icons/generated/StopsIcon.js.map +1 -0
- package/dist/icons/generated/TicketIcon.cjs +2 -0
- package/dist/icons/generated/TicketIcon.cjs.map +1 -0
- package/dist/icons/generated/TicketIcon.js +25 -0
- package/dist/icons/generated/TicketIcon.js.map +1 -0
- package/dist/icons/generated/TrashBinIcon.cjs +2 -0
- package/dist/icons/generated/TrashBinIcon.cjs.map +1 -0
- package/dist/icons/generated/TrashBinIcon.js +18 -0
- package/dist/icons/generated/TrashBinIcon.js.map +1 -0
- package/dist/icons/generated/UpArrowIcon.cjs +2 -0
- package/dist/icons/generated/UpArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/UpArrowIcon.js +35 -0
- package/dist/icons/generated/UpArrowIcon.js.map +1 -0
- package/dist/icons/generated/UpDownArrowIcon.cjs +2 -0
- package/dist/icons/generated/UpDownArrowIcon.cjs.map +1 -0
- package/dist/icons/generated/UpDownArrowIcon.js +25 -0
- package/dist/icons/generated/UpDownArrowIcon.js.map +1 -0
- package/dist/icons/generated/UserIcon.cjs +2 -0
- package/dist/icons/generated/UserIcon.cjs.map +1 -0
- package/dist/icons/generated/UserIcon.js +18 -0
- package/dist/icons/generated/UserIcon.js.map +1 -0
- package/dist/icons/generated/WalletIcon.cjs +2 -0
- package/dist/icons/generated/WalletIcon.cjs.map +1 -0
- package/dist/icons/generated/WalletIcon.js +35 -0
- package/dist/icons/generated/WalletIcon.js.map +1 -0
- package/dist/icons/generated/XMarkIcon.cjs +2 -0
- package/dist/icons/generated/XMarkIcon.cjs.map +1 -0
- package/dist/icons/generated/XMarkIcon.js +18 -0
- package/dist/icons/generated/XMarkIcon.js.map +1 -0
- package/dist/icons/generated/index.cjs +2 -0
- package/dist/icons/generated/index.cjs.map +1 -0
- package/dist/icons/generated/index.js +119 -0
- package/dist/icons/generated/index.js.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +3589 -0
- package/dist/index.d.ts +3589 -0
- package/dist/index.js +162 -0
- package/dist/styles.css +2 -0
- package/dist/tailwind.css +134 -0
- package/dist/tokens/generated.cjs +2 -0
- package/dist/tokens/generated.cjs.map +1 -0
- package/dist/tokens/generated.js +561 -0
- package/dist/tokens/generated.js.map +1 -0
- package/dist/tokens.cjs +1 -0
- package/dist/tokens.css +241 -0
- package/dist/tokens.d.cts +701 -0
- package/dist/tokens.d.ts +701 -0
- package/dist/tokens.js +1 -0
- package/dist/tokens.json +219 -0
- package/dist/utils/cn.cjs +2 -0
- package/dist/utils/cn.cjs.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/package.json +102 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FaqItem.cjs","names":["createContext","useContext","useState","useId","cn","DownArrowIcon","require_DownArrowIcon","require_cn","react","react_jsx_runtime","ListContext","FaqItem","props","list","uncontrolled","setUncontrolled","defaultOpen","isOpen","open","autoId","baseId","id","triggerId","panelId","Heading","headingLevel","toggle","onOpenChange","className","question","FaqList"],"sources":["../../../src/components/FaqItem/FaqItem.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext, useId, useState, type HTMLAttributes, type ReactNode } from 'react';\nimport { DownArrowIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './FaqItem.css';\n\n/** Heading level of the question (`<h2>`–`<h6>`); it depends on where the FAQ sits in the page outline. */\nexport type FaqHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\nconst ListContext = createContext<{ headingLevel?: FaqHeadingLevel }>({});\n\n// ── Item ─────────────────────────────────────────────────────────────\nexport interface FaqItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The question (Figma \"Question\"). It is the label of the button that shows and hides the answer. */\n question: ReactNode;\n /** The answer (Figma \"Answer\"): text or any content — paragraphs, lists, links. */\n children?: ReactNode;\n /** Controlled state (Figma \"State\": Closed · Open). */\n open?: boolean;\n /** Initial state of an uncontrolled item. */\n defaultOpen?: boolean;\n /** Called with the new state when the user opens or closes the item. */\n onOpenChange?: (open: boolean) => void;\n /** Heading level of the question. Defaults to the `FaqList`'s level, otherwise `3`. */\n headingLevel?: FaqHeadingLevel;\n}\n\n/**\n * One question of a FAQ (Figma component set \"FAQ item\"): a disclosure — a heading with a button\n * (`aria-expanded`) that reveals the answer below it.\n */\nexport const FaqItem = /* @__PURE__ */ forwardRef<HTMLDivElement, FaqItemProps>(function FaqItem(\n { question, children, open, defaultOpen = false, onOpenChange, headingLevel, id, className, ...props },\n ref,\n) {\n const list = useContext(ListContext);\n const [uncontrolled, setUncontrolled] = useState(defaultOpen);\n const isOpen = open ?? uncontrolled;\n const autoId = useId();\n const baseId = id ?? autoId;\n const triggerId = `${baseId}-question`;\n const panelId = `${baseId}-answer`;\n const Heading = `h${headingLevel ?? list.headingLevel ?? 3}` as 'h3';\n\n const toggle = () => {\n if (open === undefined) setUncontrolled(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n return (\n <div ref={ref} id={id} className={cn('tm-faq-item', className)} data-open={isOpen ? '' : undefined} {...props}>\n <Heading className=\"tm-faq-item__heading\">\n <button type=\"button\" id={triggerId} className=\"tm-faq-item__trigger\" aria-expanded={isOpen} aria-controls={panelId} onClick={toggle}>\n <span className=\"tm-faq-item__question\">{question}</span>\n {/* Figma swaps down-arrow for up-arrow; one icon turned 180° is the same drawing and can animate. */}\n <DownArrowIcon size=\"md\" className=\"tm-faq-item__icon\" />\n </button>\n </Heading>\n {/* `hidden` keeps the closed answer out of the tab order and the accessibility tree; the CSS keeps it in the\n layout (collapsed, `visibility: hidden`) so the height can animate. */}\n <div id={panelId} className=\"tm-faq-item__panel\" role=\"region\" aria-labelledby={triggerId} hidden={!isOpen}>\n <div className=\"tm-faq-item__clip\">\n <div className=\"tm-faq-item__answer\">{children}</div>\n </div>\n </div>\n </div>\n );\n});\n\n// ── List ─────────────────────────────────────────────────────────────\nexport interface FaqListProps extends HTMLAttributes<HTMLDivElement> {\n /** Heading level for the question of every item in the list (an item's own `headingLevel` wins). */\n headingLevel?: FaqHeadingLevel;\n}\n\n/** Stacks `FaqItem`s (each draws its own divider) and sets the heading level of their questions once. */\nexport const FaqList = /* @__PURE__ */ forwardRef<HTMLDivElement, FaqListProps>(function FaqList({ headingLevel, className, children, ...props }, ref) {\n return (\n <div ref={ref} className={cn('tm-faq-list', className)} {...props}>\n <ListContext.Provider value={{ headingLevel }}>{children}</ListContext.Provider>\n </div>\n );\n});\n"],"mappings":"A,2LAQA,IAAMU,GAAA,EAAcV,EAAAA,cAAAA,CAAkD,CAAC,CAAC,EAsB3DW,GAA0B,EAAAH,EAAA,WAAA,CAAyC,SAC9E,CAAE,WAAU,WAAU,OAAM,cAAc,GAAO,eAAc,eAAc,KAAI,YAAW,GAAGI,GAC/F,EACA,CACA,IAAMC,GAAA,EAAOZ,EAAAA,WAAAA,CAAWS,CAAW,EAC7B,CAACI,EAAcC,IAAA,EAAmBb,EAAAA,SAAAA,CAASc,CAAW,EACtDC,EAASC,GAAQJ,EACjBK,GAAA,EAAShB,EAAAA,MAAAA,CAAM,EACfiB,EAASC,GAAMF,EACfG,EAAY,GAAGF,EAAO,WACtBG,EAAU,GAAGH,EAAO,SACpBI,EAAU,IAAIC,GAAgBZ,EAAK,cAAgB,IAEnDa,MAAe,CACfR,IAAS,IAAA,IAAWH,EAAgB,CAACE,CAAM,EAC/CU,IAAe,CAACV,CAAM,CACxB,EAEA,OACE,EAAAR,EAAA,KAAA,CAAC,MAAD,CAAU,MAAS,KAAI,UAAWL,EAAAA,GAAG,cAAewB,CAAS,EAAG,YAAWX,EAAS,GAAK,IAAA,GAAW,GAAIL,EAAxG,SAAA,EACE,EAAAH,EAAA,IAAA,CAACe,EAAD,CAAS,UAAU,uBACjB,UAAA,EAAAf,EAAA,KAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,GAAIa,EAAW,UAAU,uBAAuB,gBAAeL,EAAQ,gBAAeM,EAAS,QAASG,EAA9H,SAAA,EACE,EAAAjB,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,wBAAyB,SAAAoB,CAAe,CAAA,GAExD,EAAApB,EAAA,IAAA,CAACJ,EAAAA,cAAD,CAAe,KAAK,KAAK,UAAU,mBAAqB,CAAA,CAClD,C,EACD,CAAA,GAGT,EAAAI,EAAA,IAAA,CAAC,MAAD,CAAK,GAAIc,EAAS,UAAU,qBAAqB,KAAK,SAAS,kBAAiBD,EAAW,OAAQ,CAACL,EAClG,UAAA,EAAAR,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,oBACb,UAAA,EAAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,sBAAuB,UAAc,CAAA,CACjD,CAAA,CACF,CAAA,CACF,C,EAET,CAAC,EASYqB,GAA0B,EAAAtB,EAAA,WAAA,CAAyC,SAAiB,CAAE,eAAc,YAAW,WAAU,GAAGI,GAAS,EAAK,CACrJ,OACE,EAAAH,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,UAAWL,EAAAA,GAAG,cAAewB,CAAS,EAAG,GAAIhB,EAC1D,UAAA,EAAAH,EAAA,IAAA,CAACC,EAAY,SAAb,CAAsB,MAAO,CAAE,cAAa,EAAI,UAA+B,CAAA,CAC5E,CAAA,CAET,CAAC,E"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DownArrowIcon as e } from "../../icons/generated/DownArrowIcon.js";
|
|
3
|
+
import { cn as t } from "../../utils/cn.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createContext as n, forwardRef as r, useContext as i, useId as a, useState as o } from "react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
// src/components/FaqItem/FaqItem.tsx
|
|
8
|
+
var l = n({}), u = /* @__PURE__ */ r(function({ question: n, children: r, open: u, defaultOpen: d = !1, onOpenChange: f, headingLevel: p, id: m, className: h, ...g }, _) {
|
|
9
|
+
let v = i(l), [y, b] = o(d), x = u ?? y, S = a(), C = m ?? S, w = `${C}-question`, T = `${C}-answer`, E = `h${p ?? v.headingLevel ?? 3}`, D = () => {
|
|
10
|
+
u === void 0 && b(!x), f?.(!x);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ c("div", {
|
|
13
|
+
ref: _,
|
|
14
|
+
id: m,
|
|
15
|
+
className: t("tm-faq-item", h),
|
|
16
|
+
"data-open": x ? "" : void 0,
|
|
17
|
+
...g,
|
|
18
|
+
children: [/* @__PURE__ */ s(E, {
|
|
19
|
+
className: "tm-faq-item__heading",
|
|
20
|
+
children: /* @__PURE__ */ c("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
id: w,
|
|
23
|
+
className: "tm-faq-item__trigger",
|
|
24
|
+
"aria-expanded": x,
|
|
25
|
+
"aria-controls": T,
|
|
26
|
+
onClick: D,
|
|
27
|
+
children: [/* @__PURE__ */ s("span", {
|
|
28
|
+
className: "tm-faq-item__question",
|
|
29
|
+
children: n
|
|
30
|
+
}), /* @__PURE__ */ s(e, {
|
|
31
|
+
size: "md",
|
|
32
|
+
className: "tm-faq-item__icon"
|
|
33
|
+
})]
|
|
34
|
+
})
|
|
35
|
+
}), /* @__PURE__ */ s("div", {
|
|
36
|
+
id: T,
|
|
37
|
+
className: "tm-faq-item__panel",
|
|
38
|
+
role: "region",
|
|
39
|
+
"aria-labelledby": w,
|
|
40
|
+
hidden: !x,
|
|
41
|
+
children: /* @__PURE__ */ s("div", {
|
|
42
|
+
className: "tm-faq-item__clip",
|
|
43
|
+
children: /* @__PURE__ */ s("div", {
|
|
44
|
+
className: "tm-faq-item__answer",
|
|
45
|
+
children: r
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
}), d = /* @__PURE__ */ r(function({ headingLevel: e, className: n, children: r, ...i }, a) {
|
|
51
|
+
return /* @__PURE__ */ s("div", {
|
|
52
|
+
ref: a,
|
|
53
|
+
className: t("tm-faq-list", n),
|
|
54
|
+
...i,
|
|
55
|
+
children: /* @__PURE__ */ s(l.Provider, {
|
|
56
|
+
value: { headingLevel: e },
|
|
57
|
+
children: r
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
export { u as FaqItem, d as FaqList };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=FaqItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FaqItem.js","names":["ListContext","createContext","FaqItem","props","list","useContext","uncontrolled","setUncontrolled","useState","defaultOpen","isOpen","open","autoId","useId","baseId","id","triggerId","panelId","Heading","headingLevel","toggle","onOpenChange","cn","className","question","DownArrowIcon","FaqList"],"sources":["../../../src/components/FaqItem/FaqItem.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext, useId, useState, type HTMLAttributes, type ReactNode } from 'react';\nimport { DownArrowIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './FaqItem.css';\n\n/** Heading level of the question (`<h2>`–`<h6>`); it depends on where the FAQ sits in the page outline. */\nexport type FaqHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\nconst ListContext = createContext<{ headingLevel?: FaqHeadingLevel }>({});\n\n// ── Item ─────────────────────────────────────────────────────────────\nexport interface FaqItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The question (Figma \"Question\"). It is the label of the button that shows and hides the answer. */\n question: ReactNode;\n /** The answer (Figma \"Answer\"): text or any content — paragraphs, lists, links. */\n children?: ReactNode;\n /** Controlled state (Figma \"State\": Closed · Open). */\n open?: boolean;\n /** Initial state of an uncontrolled item. */\n defaultOpen?: boolean;\n /** Called with the new state when the user opens or closes the item. */\n onOpenChange?: (open: boolean) => void;\n /** Heading level of the question. Defaults to the `FaqList`'s level, otherwise `3`. */\n headingLevel?: FaqHeadingLevel;\n}\n\n/**\n * One question of a FAQ (Figma component set \"FAQ item\"): a disclosure — a heading with a button\n * (`aria-expanded`) that reveals the answer below it.\n */\nexport const FaqItem = /* @__PURE__ */ forwardRef<HTMLDivElement, FaqItemProps>(function FaqItem(\n { question, children, open, defaultOpen = false, onOpenChange, headingLevel, id, className, ...props },\n ref,\n) {\n const list = useContext(ListContext);\n const [uncontrolled, setUncontrolled] = useState(defaultOpen);\n const isOpen = open ?? uncontrolled;\n const autoId = useId();\n const baseId = id ?? autoId;\n const triggerId = `${baseId}-question`;\n const panelId = `${baseId}-answer`;\n const Heading = `h${headingLevel ?? list.headingLevel ?? 3}` as 'h3';\n\n const toggle = () => {\n if (open === undefined) setUncontrolled(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n return (\n <div ref={ref} id={id} className={cn('tm-faq-item', className)} data-open={isOpen ? '' : undefined} {...props}>\n <Heading className=\"tm-faq-item__heading\">\n <button type=\"button\" id={triggerId} className=\"tm-faq-item__trigger\" aria-expanded={isOpen} aria-controls={panelId} onClick={toggle}>\n <span className=\"tm-faq-item__question\">{question}</span>\n {/* Figma swaps down-arrow for up-arrow; one icon turned 180° is the same drawing and can animate. */}\n <DownArrowIcon size=\"md\" className=\"tm-faq-item__icon\" />\n </button>\n </Heading>\n {/* `hidden` keeps the closed answer out of the tab order and the accessibility tree; the CSS keeps it in the\n layout (collapsed, `visibility: hidden`) so the height can animate. */}\n <div id={panelId} className=\"tm-faq-item__panel\" role=\"region\" aria-labelledby={triggerId} hidden={!isOpen}>\n <div className=\"tm-faq-item__clip\">\n <div className=\"tm-faq-item__answer\">{children}</div>\n </div>\n </div>\n </div>\n );\n});\n\n// ── List ─────────────────────────────────────────────────────────────\nexport interface FaqListProps extends HTMLAttributes<HTMLDivElement> {\n /** Heading level for the question of every item in the list (an item's own `headingLevel` wins). */\n headingLevel?: FaqHeadingLevel;\n}\n\n/** Stacks `FaqItem`s (each draws its own divider) and sets the heading level of their questions once. */\nexport const FaqList = /* @__PURE__ */ forwardRef<HTMLDivElement, FaqListProps>(function FaqList({ headingLevel, className, children, ...props }, ref) {\n return (\n <div ref={ref} className={cn('tm-faq-list', className)} {...props}>\n <ListContext.Provider value={{ headingLevel }}>{children}</ListContext.Provider>\n </div>\n );\n});\n"],"mappings":";;;;;;;AAQA,IAAMA,IAAcC,EAAkD,CAAC,CAAC,GAsB3DC,IAA0B,kBAAyC,SAC9E,EAAE,aAAU,aAAU,SAAM,iBAAc,IAAO,iBAAc,iBAAc,OAAI,cAAW,GAAGC,KAC/F,GACA;CACA,IAAMC,IAAOC,EAAWL,CAAW,GAC7B,CAACM,GAAcC,KAAmBC,EAASC,CAAW,GACtDC,IAASC,KAAQL,GACjBM,IAASC,EAAM,GACfC,IAASC,KAAMH,GACfI,IAAY,GAAGF,EAAO,YACtBG,IAAU,GAAGH,EAAO,UACpBI,IAAU,IAAIC,KAAgBf,EAAK,gBAAgB,KAEnDgB,UAAe;EAEnB,AADIT,MAAS,KAAA,KAAWJ,EAAgB,CAACG,CAAM,GAC/CW,IAAe,CAACX,CAAM;CACxB;CAEA,OACE,kBAAC,OAAD;EAAU;EAAS;EAAI,WAAWY,EAAG,eAAeC,CAAS;EAAG,aAAWb,IAAS,KAAK,KAAA;EAAW,GAAIP;EAAxG,UAAA,CACE,kBAACe,GAAD;GAAS,WAAU;GACjB,UAAA,kBAAC,UAAD;IAAQ,MAAK;IAAS,IAAIF;IAAW,WAAU;IAAuB,iBAAeN;IAAQ,iBAAeO;IAAS,SAASG;IAA9H,UAAA,CACE,kBAAC,QAAD;KAAM,WAAU;KAAyB,UAAAI;IAAe,CAAA,GAExD,kBAACC,GAAD;KAAe,MAAK;KAAK,WAAU;IAAqB,CAAA,CAClD;;EACD,CAAA,GAGT,kBAAC,OAAD;GAAK,IAAIR;GAAS,WAAU;GAAqB,MAAK;GAAS,mBAAiBD;GAAW,QAAQ,CAACN;GAClG,UAAA,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,OAAD;KAAK,WAAU;KAAuB;IAAc,CAAA;GACjD,CAAA;EACF,CAAA,CACF;;AAET,CAAC,GASYgB,IAA0B,kBAAyC,SAAiB,EAAE,iBAAc,cAAW,aAAU,GAAGvB,KAAS,GAAK;CACrJ,OACE,kBAAC,OAAD;EAAU;EAAK,WAAWmB,EAAG,eAAeC,CAAS;EAAG,GAAIpB;EAC1D,UAAA,kBAACH,EAAY,UAAb;GAAsB,OAAO,EAAE,gBAAa;GAAI;EAA+B,CAAA;CAC5E,CAAA;AAET,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../icons/generated/CheckmarkIcon.cjs"),t=require("../../icons/generated/ErrorCircleIcon.cjs"),n=require("../../utils/cn.cjs");;/* empty css */let r=require("react"),i=require("react/jsx-runtime");var a=(0,r.forwardRef)(function({size:e=`md`,required:t,optional:r,className:a,children:o,...s},c){return(0,i.jsxs)(`label`,{ref:c,className:n.cn(`tm-label`,a),"data-size":e,...s,children:[o,t?(0,i.jsx)(`span`,{className:`tm-label__required`,"aria-hidden":`true`,children:`*`}):null,r?(0,i.jsx)(`span`,{className:`tm-label__optional`,children:typeof r==`string`?r:`(Optional)`}):null]})}),o=(0,r.forwardRef)(function({tone:r=`neutral`,size:a=`md`,icon:o=r!==`neutral`,className:s,children:c,...l},u){return(0,i.jsxs)(`p`,{ref:u,className:n.cn(`tm-field-message`,s),"data-tone":r,"data-size":a,...l,children:[o?r===`success`?(0,i.jsx)(e.CheckmarkIcon,{size:a===`lg`?`md`:`sm`}):(0,i.jsx)(t.ErrorCircleIcon,{size:a===`lg`?`md`:`sm`}):null,(0,i.jsx)(`span`,{children:c})]})});function s(e,t){let n=(0,r.useId)(),i=e??`tm-${n}`;return{controlId:i,labelId:`${i}-label`,messageId:t?`${i}-message`:void 0}}var c=(0,r.forwardRef)(function({ids:e,label:t,helperText:r,error:s,required:c,optional:l,size:u=`md`,helperIcon:d,className:f,children:p,...m},h){let g=s||r;return(0,i.jsxs)(`div`,{ref:h,className:n.cn(`tm-form-field`,f),"data-size":u,...m,children:[t?(0,i.jsx)(a,{id:e.labelId,htmlFor:e.controlId,size:u,required:c,optional:l,children:t}):null,p,g?(0,i.jsx)(o,{id:e.messageId,tone:s?`error`:`neutral`,size:u,icon:s?!0:d,children:g}):null]})});exports.FieldMessage=o,exports.FormField=c,exports.Label=a,exports.useFieldIds=s;
|
|
2
|
+
//# sourceMappingURL=Field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.cjs","names":["cn","CheckmarkIcon","ErrorCircleIcon","useId","require_CheckmarkIcon","require_ErrorCircleIcon","require_cn","react","react_jsx_runtime","Label","props","className","size","children","required","optional","FieldMessage","tone","icon","useFieldIds","generated","controlId","id","hasMessage","FormField","message","error","helperText","label","ids","helperIcon"],"sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type LabelHTMLAttributes, type ReactNode } from 'react';\nimport { CheckmarkIcon, ErrorCircleIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './Field.css';\n\n/** Figma \"Size\" on every form control: L · M · S */\nexport type FieldSize = 'lg' | 'md' | 'sm';\n\n// ── Label ────────────────────────────────────────────────────────────\nexport interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n /** Figma \"Size\": `lg` Label-large · `md` Label · `sm` Label-small. */\n size?: FieldSize;\n /** Adds the red asterisk (Figma \"Style=Required\"). */\n required?: boolean;\n /** Adds the \"(Optional)\" hint (Figma \"Style=Optional\"). Pass a string to translate it. */\n optional?: boolean | string;\n}\n\n/** Figma component set \"Label title\". */\nexport const Label = /* @__PURE__ */ forwardRef<HTMLLabelElement, LabelProps>(function Label(\n { size = 'md', required, optional, className, children, ...props },\n ref,\n) {\n return (\n <label ref={ref} className={cn('tm-label', className)} data-size={size} {...props}>\n {children}\n {required ? (\n <span className=\"tm-label__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n {optional ? <span className=\"tm-label__optional\">{typeof optional === 'string' ? optional : '(Optional)'}</span> : null}\n </label>\n );\n});\n\n// ── Message ──────────────────────────────────────────────────────────\nexport interface FieldMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * `neutral` helper text (Figma \"Field message / Type=Hint\"), `error` with the error icon and colours\n * (Figma \"State=Error\", \"Field message / Type=Error\"), `success` with a check mark in success/content\n * (Figma \"Field message / Type=Success\", node 2606:16067).\n */\n tone?: 'neutral' | 'error' | 'success';\n /** Size of the control the message belongs to; sets the text style and icon size. */\n size?: FieldSize;\n /** Leading icon (Figma \"Style=With-icon-helper-text\"). Defaults to `true` for errors and success, `false` for helper text. */\n icon?: boolean;\n}\n\n/** Helper or error text shown under a control (Figma \"Inputs / With-helper-text\", \"Text inputs / State=Error\"). */\nexport const FieldMessage = /* @__PURE__ */ forwardRef<HTMLParagraphElement, FieldMessageProps>(function FieldMessage(\n { tone = 'neutral', size = 'md', icon = tone !== 'neutral', className, children, ...props },\n ref,\n) {\n return (\n <p ref={ref} className={cn('tm-field-message', className)} data-tone={tone} data-size={size} {...props}>\n {/* Figma: 20px icon next to the L message, 16px at M and S */}\n {icon ? tone === 'success' ? <CheckmarkIcon size={size === 'lg' ? 'md' : 'sm'} /> : <ErrorCircleIcon size={size === 'lg' ? 'md' : 'sm'} /> : null}\n <span>{children}</span>\n </p>\n );\n});\n\n// ── Form field wrapper ───────────────────────────────────────────────\nexport interface FormFieldProps {\n /** Visible label. Omit it only when the control has its own accessible name. */\n label?: ReactNode;\n /** Help text under the control. Replaced by `error` when both are set. */\n helperText?: ReactNode;\n /** Error text under the control; also switches the control to its invalid look. */\n error?: ReactNode;\n /** Marks the label with a red asterisk. */\n required?: boolean;\n /** Adds the \"(Optional)\" hint to the label. Pass a string to translate it. */\n optional?: boolean | string;\n /** Figma \"Size\": L · M · S. */\n size?: FieldSize;\n}\n\nexport interface FieldIds {\n /** id for the focusable control — also the label's `htmlFor`. */\n controlId: string;\n labelId: string;\n /** id of the helper/error text, or undefined when there is none; use it for `aria-describedby`. */\n messageId: string | undefined;\n}\n\n/** Stable ids that tie a control to its label and message. Pass the consumer's `id` to respect it. */\nexport function useFieldIds(id: string | undefined, hasMessage: boolean): FieldIds {\n const generated = useId();\n const controlId = id ?? `tm-${generated}`;\n return { controlId, labelId: `${controlId}-label`, messageId: hasMessage ? `${controlId}-message` : undefined };\n}\n\ninterface FormFieldLayoutProps extends FormFieldProps, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n ids: FieldIds;\n /** Shows the info icon in front of `helperText` (Figma \"Style=With-icon-helper-text\"). Errors always have their icon. */\n helperIcon?: boolean;\n /** The control, normally a `.tm-field` box. */\n children: ReactNode;\n}\n\n/**\n * Lays out label → control → message. Building block for the form controls in this package\n * (TextInput, Select, …); apps normally use those instead of this component.\n */\nexport const FormField = /* @__PURE__ */ forwardRef<HTMLDivElement, FormFieldLayoutProps>(function FormField(\n { ids, label, helperText, error, required, optional, size = 'md', helperIcon, className, children, ...props },\n ref,\n) {\n const message = error || helperText;\n return (\n <div ref={ref} className={cn('tm-form-field', className)} data-size={size} {...props}>\n {label ? (\n <Label id={ids.labelId} htmlFor={ids.controlId} size={size} required={required} optional={optional}>\n {label}\n </Label>\n ) : null}\n {children}\n {message ? (\n <FieldMessage id={ids.messageId} tone={error ? 'error' : 'neutral'} size={size} icon={error ? true : helperIcon}>\n {message}\n </FieldMessage>\n ) : null}\n </div>\n );\n});\n"],"mappings":"A,gPAmBA,IAAaS,GAAwB,EAAAF,EAAA,WAAA,CAAyC,SAC5E,CAAE,OAAO,KAAM,WAAU,WAAU,YAAW,WAAU,GAAGG,GAC3D,EACA,CACA,OACE,EAAAF,EAAA,KAAA,CAAC,QAAD,CAAY,MAAK,UAAWR,EAAAA,GAAG,WAAYW,CAAS,EAAG,YAAWC,EAAM,GAAIF,EAA5E,SAAA,CACGG,EACAC,GACC,EAAAN,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qBAAqB,cAAY,OAAO,SAAA,GAElD,CAAA,EACJ,KACHO,GAAW,EAAAP,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qBAAsB,SAAA,OAAOO,GAAa,SAAWA,EAAW,YAAmB,CAAA,EAAI,IAC9G,C,EAEX,CAAC,EAiBYC,GAA+B,EAAAT,EAAA,WAAA,CAAoD,SAC9F,CAAE,OAAO,UAAW,OAAO,KAAM,OAAOU,IAAS,UAAW,YAAW,WAAU,GAAGP,GACpF,EACA,CACA,OACE,EAAAF,EAAA,KAAA,CAAC,IAAD,CAAQ,MAAK,UAAWR,EAAAA,GAAG,mBAAoBW,CAAS,EAAG,YAAWM,EAAM,YAAWL,EAAM,GAAIF,EAAjG,SAAA,CAEGQ,EAAOD,IAAS,WAAY,EAAAT,EAAA,IAAA,CAACP,EAAAA,cAAD,CAAe,KAAMW,IAAS,KAAO,KAAO,IAAO,CAAA,GAAI,EAAAJ,EAAA,IAAA,CAACN,EAAAA,gBAAD,CAAiB,KAAMU,IAAS,KAAO,KAAO,IAAO,CAAA,EAAI,MAC7I,EAAAJ,EAAA,IAAA,CAAC,OAAD,CAAO,UAAe,CAAA,CACrB,C,EAEP,CAAC,EA2BD,SAAgBW,EAAY,EAAwB,EAA+B,CACjF,IAAMC,GAAA,EAAYjB,EAAAA,MAAAA,CAAM,EAClBkB,EAAYC,GAAM,MAAMF,IAC9B,MAAO,CAAE,YAAW,QAAS,GAAGC,EAAU,QAAS,UAAWE,EAAa,GAAGF,EAAU,UAAY,IAAA,EAAU,CAChH,CAcA,IAAaG,GAA4B,EAAAjB,EAAA,WAAA,CAAiD,SACxF,CAAE,MAAK,QAAO,aAAY,QAAO,WAAU,WAAU,OAAO,KAAM,aAAY,YAAW,WAAU,GAAGG,GACtG,EACA,CACA,IAAMe,EAAUC,GAASC,EACzB,OACE,EAAAnB,EAAA,KAAA,CAAC,MAAD,CAAU,MAAK,UAAWR,EAAAA,GAAG,gBAAiBW,CAAS,EAAG,YAAWC,EAAM,GAAIF,EAA/E,SAAA,CACGkB,GACC,EAAApB,EAAA,IAAA,CAACC,EAAD,CAAO,GAAIoB,EAAI,QAAS,QAASA,EAAI,UAAiB,OAAgB,WAAoB,WACvF,SAAAD,CACI,CAAA,EACL,KACHf,EACAY,GACC,EAAAjB,EAAA,IAAA,CAACQ,EAAD,CAAc,GAAIa,EAAI,UAAW,KAAMH,EAAQ,QAAU,UAAiB,OAAM,KAAMA,EAAQ,GAAOI,EAClG,SAAAL,CACW,CAAA,EACZ,IACD,C,EAET,CAAC,E"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CheckmarkIcon as e } from "../../icons/generated/CheckmarkIcon.js";
|
|
3
|
+
import { ErrorCircleIcon as t } from "../../icons/generated/ErrorCircleIcon.js";
|
|
4
|
+
import { cn as n } from "../../utils/cn.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { forwardRef as r, useId as i } from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
// src/components/Field/Field.tsx
|
|
9
|
+
var s = /* @__PURE__ */ r(function({ size: e = "md", required: t, optional: r, className: i, children: s, ...c }, l) {
|
|
10
|
+
return /* @__PURE__ */ o("label", {
|
|
11
|
+
ref: l,
|
|
12
|
+
className: n("tm-label", i),
|
|
13
|
+
"data-size": e,
|
|
14
|
+
...c,
|
|
15
|
+
children: [
|
|
16
|
+
s,
|
|
17
|
+
t ? /* @__PURE__ */ a("span", {
|
|
18
|
+
className: "tm-label__required",
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
children: "*"
|
|
21
|
+
}) : null,
|
|
22
|
+
r ? /* @__PURE__ */ a("span", {
|
|
23
|
+
className: "tm-label__optional",
|
|
24
|
+
children: typeof r == "string" ? r : "(Optional)"
|
|
25
|
+
}) : null
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}), c = /* @__PURE__ */ r(function({ tone: r = "neutral", size: i = "md", icon: s = r !== "neutral", className: c, children: l, ...u }, d) {
|
|
29
|
+
return /* @__PURE__ */ o("p", {
|
|
30
|
+
ref: d,
|
|
31
|
+
className: n("tm-field-message", c),
|
|
32
|
+
"data-tone": r,
|
|
33
|
+
"data-size": i,
|
|
34
|
+
...u,
|
|
35
|
+
children: [s ? a(r === "success" ? e : t, { size: i === "lg" ? "md" : "sm" }) : null, /* @__PURE__ */ a("span", { children: l })]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
function l(e, t) {
|
|
39
|
+
let n = i(), r = e ?? `tm-${n}`;
|
|
40
|
+
return {
|
|
41
|
+
controlId: r,
|
|
42
|
+
labelId: `${r}-label`,
|
|
43
|
+
messageId: t ? `${r}-message` : void 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var u = /* @__PURE__ */ r(function({ ids: e, label: t, helperText: r, error: i, required: l, optional: u, size: d = "md", helperIcon: f, className: p, children: m, ...h }, g) {
|
|
47
|
+
let _ = i || r;
|
|
48
|
+
return /* @__PURE__ */ o("div", {
|
|
49
|
+
ref: g,
|
|
50
|
+
className: n("tm-form-field", p),
|
|
51
|
+
"data-size": d,
|
|
52
|
+
...h,
|
|
53
|
+
children: [
|
|
54
|
+
t ? /* @__PURE__ */ a(s, {
|
|
55
|
+
id: e.labelId,
|
|
56
|
+
htmlFor: e.controlId,
|
|
57
|
+
size: d,
|
|
58
|
+
required: l,
|
|
59
|
+
optional: u,
|
|
60
|
+
children: t
|
|
61
|
+
}) : null,
|
|
62
|
+
m,
|
|
63
|
+
_ ? /* @__PURE__ */ a(c, {
|
|
64
|
+
id: e.messageId,
|
|
65
|
+
tone: i ? "error" : "neutral",
|
|
66
|
+
size: d,
|
|
67
|
+
icon: i ? !0 : f,
|
|
68
|
+
children: _
|
|
69
|
+
}) : null
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
export { c as FieldMessage, u as FormField, s as Label, l as useFieldIds };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","names":["Label","props","cn","className","size","children","required","optional","FieldMessage","tone","icon","jsx","CheckmarkIcon","ErrorCircleIcon","useFieldIds","generated","useId","controlId","id","hasMessage","FormField","message","error","helperText","label","ids","helperIcon"],"sources":["../../../src/components/Field/Field.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type LabelHTMLAttributes, type ReactNode } from 'react';\nimport { CheckmarkIcon, ErrorCircleIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './Field.css';\n\n/** Figma \"Size\" on every form control: L · M · S */\nexport type FieldSize = 'lg' | 'md' | 'sm';\n\n// ── Label ────────────────────────────────────────────────────────────\nexport interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n /** Figma \"Size\": `lg` Label-large · `md` Label · `sm` Label-small. */\n size?: FieldSize;\n /** Adds the red asterisk (Figma \"Style=Required\"). */\n required?: boolean;\n /** Adds the \"(Optional)\" hint (Figma \"Style=Optional\"). Pass a string to translate it. */\n optional?: boolean | string;\n}\n\n/** Figma component set \"Label title\". */\nexport const Label = /* @__PURE__ */ forwardRef<HTMLLabelElement, LabelProps>(function Label(\n { size = 'md', required, optional, className, children, ...props },\n ref,\n) {\n return (\n <label ref={ref} className={cn('tm-label', className)} data-size={size} {...props}>\n {children}\n {required ? (\n <span className=\"tm-label__required\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n {optional ? <span className=\"tm-label__optional\">{typeof optional === 'string' ? optional : '(Optional)'}</span> : null}\n </label>\n );\n});\n\n// ── Message ──────────────────────────────────────────────────────────\nexport interface FieldMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * `neutral` helper text (Figma \"Field message / Type=Hint\"), `error` with the error icon and colours\n * (Figma \"State=Error\", \"Field message / Type=Error\"), `success` with a check mark in success/content\n * (Figma \"Field message / Type=Success\", node 2606:16067).\n */\n tone?: 'neutral' | 'error' | 'success';\n /** Size of the control the message belongs to; sets the text style and icon size. */\n size?: FieldSize;\n /** Leading icon (Figma \"Style=With-icon-helper-text\"). Defaults to `true` for errors and success, `false` for helper text. */\n icon?: boolean;\n}\n\n/** Helper or error text shown under a control (Figma \"Inputs / With-helper-text\", \"Text inputs / State=Error\"). */\nexport const FieldMessage = /* @__PURE__ */ forwardRef<HTMLParagraphElement, FieldMessageProps>(function FieldMessage(\n { tone = 'neutral', size = 'md', icon = tone !== 'neutral', className, children, ...props },\n ref,\n) {\n return (\n <p ref={ref} className={cn('tm-field-message', className)} data-tone={tone} data-size={size} {...props}>\n {/* Figma: 20px icon next to the L message, 16px at M and S */}\n {icon ? tone === 'success' ? <CheckmarkIcon size={size === 'lg' ? 'md' : 'sm'} /> : <ErrorCircleIcon size={size === 'lg' ? 'md' : 'sm'} /> : null}\n <span>{children}</span>\n </p>\n );\n});\n\n// ── Form field wrapper ───────────────────────────────────────────────\nexport interface FormFieldProps {\n /** Visible label. Omit it only when the control has its own accessible name. */\n label?: ReactNode;\n /** Help text under the control. Replaced by `error` when both are set. */\n helperText?: ReactNode;\n /** Error text under the control; also switches the control to its invalid look. */\n error?: ReactNode;\n /** Marks the label with a red asterisk. */\n required?: boolean;\n /** Adds the \"(Optional)\" hint to the label. Pass a string to translate it. */\n optional?: boolean | string;\n /** Figma \"Size\": L · M · S. */\n size?: FieldSize;\n}\n\nexport interface FieldIds {\n /** id for the focusable control — also the label's `htmlFor`. */\n controlId: string;\n labelId: string;\n /** id of the helper/error text, or undefined when there is none; use it for `aria-describedby`. */\n messageId: string | undefined;\n}\n\n/** Stable ids that tie a control to its label and message. Pass the consumer's `id` to respect it. */\nexport function useFieldIds(id: string | undefined, hasMessage: boolean): FieldIds {\n const generated = useId();\n const controlId = id ?? `tm-${generated}`;\n return { controlId, labelId: `${controlId}-label`, messageId: hasMessage ? `${controlId}-message` : undefined };\n}\n\ninterface FormFieldLayoutProps extends FormFieldProps, Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n ids: FieldIds;\n /** Shows the info icon in front of `helperText` (Figma \"Style=With-icon-helper-text\"). Errors always have their icon. */\n helperIcon?: boolean;\n /** The control, normally a `.tm-field` box. */\n children: ReactNode;\n}\n\n/**\n * Lays out label → control → message. Building block for the form controls in this package\n * (TextInput, Select, …); apps normally use those instead of this component.\n */\nexport const FormField = /* @__PURE__ */ forwardRef<HTMLDivElement, FormFieldLayoutProps>(function FormField(\n { ids, label, helperText, error, required, optional, size = 'md', helperIcon, className, children, ...props },\n ref,\n) {\n const message = error || helperText;\n return (\n <div ref={ref} className={cn('tm-form-field', className)} data-size={size} {...props}>\n {label ? (\n <Label id={ids.labelId} htmlFor={ids.controlId} size={size} required={required} optional={optional}>\n {label}\n </Label>\n ) : null}\n {children}\n {message ? (\n <FieldMessage id={ids.messageId} tone={error ? 'error' : 'neutral'} size={size} icon={error ? true : helperIcon}>\n {message}\n </FieldMessage>\n ) : null}\n </div>\n );\n});\n"],"mappings":";;;;;;;;AAmBA,IAAaA,IAAwB,kBAAyC,SAC5E,EAAE,UAAO,MAAM,aAAU,aAAU,cAAW,aAAU,GAAGC,KAC3D,GACA;CACA,OACE,kBAAC,SAAD;EAAY;EAAK,WAAWC,EAAG,YAAYC,CAAS;EAAG,aAAWC;EAAM,GAAIH;EAA5E,UAAA;GACGI;GACAC,IACC,kBAAC,QAAD;IAAM,WAAU;IAAqB,eAAY;IAAO,UAAA;GAElD,CAAA,IACJ;GACHC,IAAW,kBAAC,QAAD;IAAM,WAAU;IAAsB,UAAA,OAAOA,KAAa,WAAWA,IAAW;GAAmB,CAAA,IAAI;EAC9G;;AAEX,CAAC,GAiBYC,IAA+B,kBAAoD,SAC9F,EAAE,UAAO,WAAW,UAAO,MAAM,UAAOC,MAAS,WAAW,cAAW,aAAU,GAAGR,KACpF,GACA;CACA,OACE,kBAAC,KAAD;EAAQ;EAAK,WAAWC,EAAG,oBAAoBC,CAAS;EAAG,aAAWM;EAAM,aAAWL;EAAM,GAAIH;EAAjG,UAAA,CAEGS,IAA4BC,EAArBF,MAAS,YAAaG,IAAuDC,GAAxD,EAAe,MAAMT,MAAS,OAAO,OAAO,KAAO,CAAyD,IAAI,MAC7I,kBAAC,QAAD,EAAO,YAAe,CAAA,CACrB;;AAEP,CAAC;AA2BD,SAAgBU,EAAY,GAAwB,GAA+B;CACjF,IAAMC,IAAYC,EAAM,GAClBC,IAAYC,KAAM,MAAMH;CAC9B,OAAO;EAAE;EAAW,SAAS,GAAGE,EAAU;EAAS,WAAWE,IAAa,GAAGF,EAAU,YAAY,KAAA;CAAU;AAChH;AAcA,IAAaG,IAA4B,kBAAiD,SACxF,EAAE,QAAK,UAAO,eAAY,UAAO,aAAU,aAAU,UAAO,MAAM,eAAY,cAAW,aAAU,GAAGnB,KACtG,GACA;CACA,IAAMoB,IAAUC,KAASC;CACzB,OACE,kBAAC,OAAD;EAAU;EAAK,WAAWrB,EAAG,iBAAiBC,CAAS;EAAG,aAAWC;EAAM,GAAIH;EAA/E,UAAA;GACGuB,IACC,kBAACxB,GAAD;IAAO,IAAIyB,EAAI;IAAS,SAASA,EAAI;IAAiB;IAAgB;IAAoB;IACvF,UAAAD;GACI,CAAA,IACL;GACHnB;GACAgB,IACC,kBAACb,GAAD;IAAc,IAAIiB,EAAI;IAAW,MAAMH,IAAQ,UAAU;IAAiB;IAAM,MAAMA,IAAQ,KAAOI;IAClG,UAAAL;GACW,CAAA,IACZ;EACD;;AAET,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";function e(e){let t=e.target;if(e.defaultPrevented||t.closest(`input, textarea, select, button, a, [tabindex]`))return;let n=e.currentTarget.querySelector(`.tm-field__control`);n&&!n.matches(`:disabled`)&&(e.preventDefault(),n.focus())}exports.focusControlOnMouseDown=e;
|
|
2
|
+
//# sourceMappingURL=focusControl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusControl.cjs","names":["focusControlOnMouseDown","target","event","control"],"sources":["../../../src/components/Field/focusControl.ts"],"sourcesContent":["import type { MouseEvent } from 'react';\n\n/**\n * `onMouseDown` handler for a `.tm-field` box that wraps a text control: pressing anything inside the box that is not\n * itself interactive (padding, icons, prefix) focuses the `.tm-field__control`, like clicking the control would.\n * Internal helper — import it from this file, it is not part of the package API.\n */\nexport function focusControlOnMouseDown(event: MouseEvent<HTMLElement>) {\n const target = event.target as HTMLElement;\n if (event.defaultPrevented || target.closest('input, textarea, select, button, a, [tabindex]')) return;\n const control = event.currentTarget.querySelector<HTMLElement>('.tm-field__control');\n if (!control || control.matches(':disabled')) return;\n event.preventDefault();\n control.focus();\n}\n"],"mappings":"A,aAOA,SAAgBA,EAAwB,EAAgC,CACtE,IAAMC,EAASC,EAAM,OACrB,GAAIA,EAAM,kBAAoBD,EAAO,QAAQ,gDAAgD,EAAG,OAChG,IAAME,EAAUD,EAAM,cAAc,cAA2B,oBAAoB,EAC9EC,GAAW,GAAQ,QAAQ,WAAW,IAC3CD,EAAM,eAAe,EACrBC,EAAQ,MAAM,EAChB,C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/components/Field/focusControl.ts
|
|
3
|
+
function e(e) {
|
|
4
|
+
let t = e.target;
|
|
5
|
+
if (e.defaultPrevented || t.closest("input, textarea, select, button, a, [tabindex]")) return;
|
|
6
|
+
let n = e.currentTarget.querySelector(".tm-field__control");
|
|
7
|
+
n && !n.matches(":disabled") && (e.preventDefault(), n.focus());
|
|
8
|
+
}
|
|
9
|
+
export { e as focusControlOnMouseDown };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=focusControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusControl.js","names":["focusControlOnMouseDown","target","event","control"],"sources":["../../../src/components/Field/focusControl.ts"],"sourcesContent":["import type { MouseEvent } from 'react';\n\n/**\n * `onMouseDown` handler for a `.tm-field` box that wraps a text control: pressing anything inside the box that is not\n * itself interactive (padding, icons, prefix) focuses the `.tm-field__control`, like clicking the control would.\n * Internal helper — import it from this file, it is not part of the package API.\n */\nexport function focusControlOnMouseDown(event: MouseEvent<HTMLElement>) {\n const target = event.target as HTMLElement;\n if (event.defaultPrevented || target.closest('input, textarea, select, button, a, [tabindex]')) return;\n const control = event.currentTarget.querySelector<HTMLElement>('.tm-field__control');\n if (!control || control.matches(':disabled')) return;\n event.preventDefault();\n control.focus();\n}\n"],"mappings":";;AAOA,SAAgBA,EAAwB,GAAgC;CACtE,IAAMC,IAASC,EAAM;CACrB,IAAIA,EAAM,oBAAoBD,EAAO,QAAQ,gDAAgD,GAAG;CAChG,IAAME,IAAUD,EAAM,cAAc,cAA2B,oBAAoB;CACnF,AAAKC,KAAW,GAAQ,QAAQ,WAAW,MAC3CD,EAAM,eAAe,GACrBC,EAAQ,MAAM;AAChB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../utils/cn.cjs"),t=require("../AgenciesFilter/AgenciesFilter.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=(0,n.forwardRef)(function({className:n,style:i,...a},o){return(0,r.jsx)(t.AgenciesFilter,{ref:o,...a,layout:`scroll`,rootClassName:e.cn(`tm-filter-chips`,n),rootStyle:i,className:`tm-filter-chips__group`})});exports.FilterChips=i;
|
|
2
|
+
//# sourceMappingURL=FilterChips.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterChips.cjs","names":["AgenciesFilter","cn","require_cn","require_AgenciesFilter","react","react_jsx_runtime","FilterChips","props","className","style"],"sources":["../../../src/components/FilterChips/FilterChips.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { AgenciesFilter, type AgenciesFilterOption, type AgenciesFilterProps } from '../AgenciesFilter';\n\n/** Same shape as `AgenciesFilterOption`. */\nexport type FilterChipsOption = AgenciesFilterOption;\n\nexport interface FilterChipsProps extends Omit<AgenciesFilterProps, 'layout' | 'scrollBelow' | 'rootClassName' | 'rootStyle'> {\n /** The filters, in display order (Figma: All agencies · Armenia · Abroad · Flights · Family · Beach & spa). */\n options: FilterChipsOption[];\n}\n\n/**\n * Figma component set \"Mobile / Filter chips\": `AgenciesFilter` with `layout=\"scroll\"` — one row of single-choice\n * `ChoiceChip`s that scrolls sideways instead of wrapping, at every width. The row runs edge to edge with the screen's\n * 16px gutter as scroll padding (`--tm-filter-chips-gutter`), snaps to chips and keeps the selected one in view.\n * A radio group: arrow keys move the selection. Name it with `aria-label` or `aria-labelledby`; these, the ref and the\n * remaining props go to the group (which is the scroll container), `className` and `style` to the outer root.\n * Prefer `<AgenciesFilter layout=\"auto\">` when the same filter is also shown on wide screens.\n */\nexport const FilterChips = /* @__PURE__ */ forwardRef<HTMLDivElement, FilterChipsProps>(function FilterChips({ className, style, ...props }, ref) {\n return (\n <AgenciesFilter\n ref={ref}\n {...props}\n layout=\"scroll\"\n rootClassName={cn('tm-filter-chips', className)}\n rootStyle={style}\n className=\"tm-filter-chips__group\"\n />\n );\n});\n"],"mappings":"A,2JAoBA,IAAaM,GAA8B,EAAAF,EAAA,WAAA,CAA6C,SAAqB,CAAE,YAAW,QAAO,GAAGG,GAAS,EAAK,CAChJ,OACE,EAAAF,EAAA,IAAA,CAACL,EAAAA,eAAD,CACO,MACL,GAAIO,EACJ,OAAO,SACP,cAAeN,EAAAA,GAAG,kBAAmBO,CAAS,EAC9C,UAAWC,EACX,UAAU,wBACX,CAAA,CAEL,CAAC,E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { AgenciesFilter as t } from "../AgenciesFilter/AgenciesFilter.js";
|
|
4
|
+
import { forwardRef as n } from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
// src/components/FilterChips/FilterChips.tsx
|
|
7
|
+
var i = /* @__PURE__ */ n(function({ className: n, style: i, ...a }, o) {
|
|
8
|
+
return /* @__PURE__ */ r(t, {
|
|
9
|
+
ref: o,
|
|
10
|
+
...a,
|
|
11
|
+
layout: "scroll",
|
|
12
|
+
rootClassName: e("tm-filter-chips", n),
|
|
13
|
+
rootStyle: i,
|
|
14
|
+
className: "tm-filter-chips__group"
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
export { i as FilterChips };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=FilterChips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterChips.js","names":["FilterChips","props","AgenciesFilter","cn","className","style"],"sources":["../../../src/components/FilterChips/FilterChips.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { AgenciesFilter, type AgenciesFilterOption, type AgenciesFilterProps } from '../AgenciesFilter';\n\n/** Same shape as `AgenciesFilterOption`. */\nexport type FilterChipsOption = AgenciesFilterOption;\n\nexport interface FilterChipsProps extends Omit<AgenciesFilterProps, 'layout' | 'scrollBelow' | 'rootClassName' | 'rootStyle'> {\n /** The filters, in display order (Figma: All agencies · Armenia · Abroad · Flights · Family · Beach & spa). */\n options: FilterChipsOption[];\n}\n\n/**\n * Figma component set \"Mobile / Filter chips\": `AgenciesFilter` with `layout=\"scroll\"` — one row of single-choice\n * `ChoiceChip`s that scrolls sideways instead of wrapping, at every width. The row runs edge to edge with the screen's\n * 16px gutter as scroll padding (`--tm-filter-chips-gutter`), snaps to chips and keeps the selected one in view.\n * A radio group: arrow keys move the selection. Name it with `aria-label` or `aria-labelledby`; these, the ref and the\n * remaining props go to the group (which is the scroll container), `className` and `style` to the outer root.\n * Prefer `<AgenciesFilter layout=\"auto\">` when the same filter is also shown on wide screens.\n */\nexport const FilterChips = /* @__PURE__ */ forwardRef<HTMLDivElement, FilterChipsProps>(function FilterChips({ className, style, ...props }, ref) {\n return (\n <AgenciesFilter\n ref={ref}\n {...props}\n layout=\"scroll\"\n rootClassName={cn('tm-filter-chips', className)}\n rootStyle={style}\n className=\"tm-filter-chips__group\"\n />\n );\n});\n"],"mappings":";;;;;;AAoBA,IAAaA,IAA8B,kBAA6C,SAAqB,EAAE,cAAW,UAAO,GAAGC,KAAS,GAAK;CAChJ,OACE,kBAACC,GAAD;EACO;EACL,GAAID;EACJ,QAAO;EACP,eAAeE,EAAG,mBAAmBC,CAAS;EAC9C,WAAWC;EACX,WAAU;CACX,CAAA;AAEL,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../icons/generated/CheckmarkIcon.cjs"),t=require("../../utils/cn.cjs");;/* empty css */let n=require("react"),r=require("react/jsx-runtime");var i=(e,t)=>`Step ${e} of ${t}`,a=(0,n.forwardRef)(function({steps:n,currentStep:a,completedLabel:o=`Completed`,formatStepCount:s=i,className:c,...l},u){let d=n.length,f=d>0&&a>d,p=Math.min(Math.max(a,1),d),m=f?o||s(d,d):s(p,d);return(0,r.jsx)(`ol`,{ref:u,className:t.cn(`tm-form-progress`,c),...l,children:n.map((t,n)=>{let i=n+1,s=i<a?`completed`:i===a?`current`:`upcoming`;return(0,r.jsxs)(`li`,{className:`tm-form-progress__step`,"data-state":s,"aria-current":s===`current`?`step`:void 0,children:[(0,r.jsxs)(`span`,{className:`tm-form-progress__stage`,children:[(0,r.jsx)(`span`,{className:`tm-form-progress__marker`,"aria-hidden":`true`,children:s===`completed`?(0,r.jsx)(e.CheckmarkIcon,{size:`sm`}):i}),(0,r.jsx)(`span`,{className:`tm-form-progress__label`,children:t}),s===`completed`&&o?(0,r.jsx)(`span`,{className:`tm-form-progress__status`,children:o}):null]}),i===p?(0,r.jsxs)(`span`,{className:`tm-form-progress__summary`,"aria-hidden":`true`,children:[(0,r.jsx)(`span`,{className:`tm-form-progress__summary-title`,children:t}),(0,r.jsx)(`span`,{className:`tm-form-progress__summary-count`,children:m})]}):null]},n)})})});exports.FormProgress=a;
|
|
2
|
+
//# sourceMappingURL=FormProgress.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormProgress.cjs","names":["cn","CheckmarkIcon","require_CheckmarkIcon","require_cn","react","react_jsx_runtime","defaultFormatStepCount","current","total","FormProgress","props","steps","allCompleted","currentStep","summaryNumber","summaryCount","completedLabel","formatStepCount","className","number","index","state","label"],"sources":["../../../src/components/FormProgress/FormProgress.tsx"],"sourcesContent":["import { forwardRef, type OlHTMLAttributes, type ReactNode } from 'react';\nimport { CheckmarkIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './FormProgress.css';\n\nexport interface FormProgressProps extends Omit<OlHTMLAttributes<HTMLOListElement>, 'children'> {\n /** Step labels in order (Figma \"Stage 1\", \"Stage 2\", …). Any number of steps. */\n steps: ReactNode[];\n /** The step the user is on, 1-based (Figma \"Step\"). Earlier steps are completed; `steps.length + 1` completes them all. */\n currentStep: number;\n /** Screen-reader text added to completed steps, whose number is replaced by a check mark — translate it. In the compact layout it is also the visible count once every step is completed. */\n completedLabel?: string;\n /** Visible \"Step 1 of 3\" text of the compact (narrow container) layout — translate it. */\n formatStepCount?: (current: number, total: number) => ReactNode;\n}\n\nconst defaultFormatStepCount = (current: number, total: number): ReactNode => `Step ${current} of ${total}`;\n\n/**\n * Where the user is in a multi-step form. A stepper with numbered markers; in a container narrower than\n * 520px it switches to the compact Figma \"Mobile / Form progress\" layout (stage title, step count and a segmented bar).\n */\nexport const FormProgress = /* @__PURE__ */ forwardRef<HTMLOListElement, FormProgressProps>(function FormProgress(\n { steps, currentStep, completedLabel = 'Completed', formatStepCount = defaultFormatStepCount, className, ...props },\n ref,\n) {\n const total = steps.length;\n const allCompleted = total > 0 && currentStep > total;\n // The compact layout titles the current stage; before the first step it previews step 1, after the last it keeps the last one.\n const summaryNumber = Math.min(Math.max(currentStep, 1), total);\n const summaryCount = allCompleted ? completedLabel || formatStepCount(total, total) : formatStepCount(summaryNumber, total);\n\n return (\n <ol ref={ref} className={cn('tm-form-progress', className)} {...props}>\n {steps.map((label, index) => {\n const number = index + 1;\n const state = number < currentStep ? 'completed' : number === currentStep ? 'current' : 'upcoming';\n return (\n <li key={index} className=\"tm-form-progress__step\" data-state={state} aria-current={state === 'current' ? 'step' : undefined}>\n <span className=\"tm-form-progress__stage\">\n {/* The list already announces the position, so the marker is decorative. */}\n <span className=\"tm-form-progress__marker\" aria-hidden=\"true\">\n {state === 'completed' ? <CheckmarkIcon size=\"sm\" /> : number}\n </span>\n <span className=\"tm-form-progress__label\">{label}</span>\n {state === 'completed' && completedLabel ? <span className=\"tm-form-progress__status\">{completedLabel}</span> : null}\n </span>\n {/* Compact layout only (hidden by CSS otherwise). A visual copy of what the list already says, so it is hidden from screen readers. */}\n {number === summaryNumber ? (\n <span className=\"tm-form-progress__summary\" aria-hidden=\"true\">\n <span className=\"tm-form-progress__summary-title\">{label}</span>\n <span className=\"tm-form-progress__summary-count\">{summaryCount}</span>\n </span>\n ) : null}\n </li>\n );\n })}\n </ol>\n );\n});\n"],"mappings":"A,gMAgBA,IAAMM,GAA0B,EAAiB,IAA6B,QAAQC,EAAQ,MAAMC,IAMvFC,GAA+B,EAAAL,EAAA,WAAA,CAAgD,SAC1F,CAAE,QAAO,cAAa,iBAAiB,YAAa,kBAAkBE,EAAwB,YAAW,GAAGI,GAC5G,EACA,CACA,IAAMF,EAAQG,EAAM,OACdC,EAAeJ,EAAQ,GAAKK,EAAcL,EAE1CM,EAAgB,KAAK,IAAI,KAAK,IAAID,EAAa,CAAC,EAAGL,CAAK,EACxDO,EAAeH,EAAeI,GAAkBC,EAAgBT,EAAOA,CAAK,EAAIS,EAAgBH,EAAeN,CAAK,EAE1H,OACE,EAAAH,EAAA,IAAA,CAAC,KAAD,CAAS,MAAK,UAAWL,EAAAA,GAAG,mBAAoBkB,CAAS,EAAG,GAAIR,EAC7D,SAAAC,EAAM,KAAK,EAAO,IAAU,CAC3B,IAAMQ,EAASC,EAAQ,EACjBC,EAAQF,EAASN,EAAc,YAAcM,IAAWN,EAAc,UAAY,WACxF,OACE,EAAAR,EAAA,KAAA,CAAC,KAAD,CAAgB,UAAU,yBAAyB,aAAYgB,EAAO,eAAcA,IAAU,UAAY,OAAS,IAAA,GAAnH,SAAA,EACE,EAAAhB,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,0BAAhB,SAAA,EAEE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,2BAA2B,cAAY,OACpD,SAAAgB,IAAU,aAAc,EAAAhB,EAAA,IAAA,CAACJ,EAAAA,cAAD,CAAe,KAAK,IAAM,CAAA,EAAIkB,CACnD,CAAA,GACN,EAAAd,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0BAA2B,SAAAiB,CAAY,CAAA,EACtDD,IAAU,aAAeL,GAAiB,EAAAX,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,2BAA4B,SAAAW,CAAqB,CAAA,EAAI,IAC5G,CAEL,CAAA,EAAAG,IAAWL,GACV,EAAAT,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,4BAA4B,cAAY,OAAxD,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,kCAAmC,SAAAiB,CAAY,CAAA,GAC/D,EAAAjB,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,kCAAmC,SAAAU,CAAmB,CAAA,CAClE,CACJ,CAAA,EAAA,IACF,CAhBK,EAAAK,CAgBL,CAER,CAAC,CACC,CAAA,CAER,CAAC,E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CheckmarkIcon as e } from "../../icons/generated/CheckmarkIcon.js";
|
|
3
|
+
import { cn as t } from "../../utils/cn.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { forwardRef as n } from "react";
|
|
6
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
+
// src/components/FormProgress/FormProgress.tsx
|
|
8
|
+
var a = (e, t) => `Step ${e} of ${t}`, o = /* @__PURE__ */ n(function({ steps: n, currentStep: o, completedLabel: s = "Completed", formatStepCount: c = a, className: l, ...u }, d) {
|
|
9
|
+
let f = n.length, p = f > 0 && o > f, m = Math.min(Math.max(o, 1), f), h = p ? s || c(f, f) : c(m, f);
|
|
10
|
+
return /* @__PURE__ */ r("ol", {
|
|
11
|
+
ref: d,
|
|
12
|
+
className: t("tm-form-progress", l),
|
|
13
|
+
...u,
|
|
14
|
+
children: n.map((t, n) => {
|
|
15
|
+
let a = n + 1, c = a < o ? "completed" : a === o ? "current" : "upcoming";
|
|
16
|
+
return /* @__PURE__ */ i("li", {
|
|
17
|
+
className: "tm-form-progress__step",
|
|
18
|
+
"data-state": c,
|
|
19
|
+
"aria-current": c === "current" ? "step" : void 0,
|
|
20
|
+
children: [/* @__PURE__ */ i("span", {
|
|
21
|
+
className: "tm-form-progress__stage",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ r("span", {
|
|
24
|
+
className: "tm-form-progress__marker",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
children: c === "completed" ? /* @__PURE__ */ r(e, { size: "sm" }) : a
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ r("span", {
|
|
29
|
+
className: "tm-form-progress__label",
|
|
30
|
+
children: t
|
|
31
|
+
}),
|
|
32
|
+
c === "completed" && s ? /* @__PURE__ */ r("span", {
|
|
33
|
+
className: "tm-form-progress__status",
|
|
34
|
+
children: s
|
|
35
|
+
}) : null
|
|
36
|
+
]
|
|
37
|
+
}), a === m ? /* @__PURE__ */ i("span", {
|
|
38
|
+
className: "tm-form-progress__summary",
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
children: [/* @__PURE__ */ r("span", {
|
|
41
|
+
className: "tm-form-progress__summary-title",
|
|
42
|
+
children: t
|
|
43
|
+
}), /* @__PURE__ */ r("span", {
|
|
44
|
+
className: "tm-form-progress__summary-count",
|
|
45
|
+
children: h
|
|
46
|
+
})]
|
|
47
|
+
}) : null]
|
|
48
|
+
}, n);
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
export { o as FormProgress };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=FormProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormProgress.js","names":["defaultFormatStepCount","current","total","FormProgress","props","steps","allCompleted","currentStep","summaryNumber","summaryCount","completedLabel","formatStepCount","cn","className","number","index","state","CheckmarkIcon","label"],"sources":["../../../src/components/FormProgress/FormProgress.tsx"],"sourcesContent":["import { forwardRef, type OlHTMLAttributes, type ReactNode } from 'react';\nimport { CheckmarkIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './FormProgress.css';\n\nexport interface FormProgressProps extends Omit<OlHTMLAttributes<HTMLOListElement>, 'children'> {\n /** Step labels in order (Figma \"Stage 1\", \"Stage 2\", …). Any number of steps. */\n steps: ReactNode[];\n /** The step the user is on, 1-based (Figma \"Step\"). Earlier steps are completed; `steps.length + 1` completes them all. */\n currentStep: number;\n /** Screen-reader text added to completed steps, whose number is replaced by a check mark — translate it. In the compact layout it is also the visible count once every step is completed. */\n completedLabel?: string;\n /** Visible \"Step 1 of 3\" text of the compact (narrow container) layout — translate it. */\n formatStepCount?: (current: number, total: number) => ReactNode;\n}\n\nconst defaultFormatStepCount = (current: number, total: number): ReactNode => `Step ${current} of ${total}`;\n\n/**\n * Where the user is in a multi-step form. A stepper with numbered markers; in a container narrower than\n * 520px it switches to the compact Figma \"Mobile / Form progress\" layout (stage title, step count and a segmented bar).\n */\nexport const FormProgress = /* @__PURE__ */ forwardRef<HTMLOListElement, FormProgressProps>(function FormProgress(\n { steps, currentStep, completedLabel = 'Completed', formatStepCount = defaultFormatStepCount, className, ...props },\n ref,\n) {\n const total = steps.length;\n const allCompleted = total > 0 && currentStep > total;\n // The compact layout titles the current stage; before the first step it previews step 1, after the last it keeps the last one.\n const summaryNumber = Math.min(Math.max(currentStep, 1), total);\n const summaryCount = allCompleted ? completedLabel || formatStepCount(total, total) : formatStepCount(summaryNumber, total);\n\n return (\n <ol ref={ref} className={cn('tm-form-progress', className)} {...props}>\n {steps.map((label, index) => {\n const number = index + 1;\n const state = number < currentStep ? 'completed' : number === currentStep ? 'current' : 'upcoming';\n return (\n <li key={index} className=\"tm-form-progress__step\" data-state={state} aria-current={state === 'current' ? 'step' : undefined}>\n <span className=\"tm-form-progress__stage\">\n {/* The list already announces the position, so the marker is decorative. */}\n <span className=\"tm-form-progress__marker\" aria-hidden=\"true\">\n {state === 'completed' ? <CheckmarkIcon size=\"sm\" /> : number}\n </span>\n <span className=\"tm-form-progress__label\">{label}</span>\n {state === 'completed' && completedLabel ? <span className=\"tm-form-progress__status\">{completedLabel}</span> : null}\n </span>\n {/* Compact layout only (hidden by CSS otherwise). A visual copy of what the list already says, so it is hidden from screen readers. */}\n {number === summaryNumber ? (\n <span className=\"tm-form-progress__summary\" aria-hidden=\"true\">\n <span className=\"tm-form-progress__summary-title\">{label}</span>\n <span className=\"tm-form-progress__summary-count\">{summaryCount}</span>\n </span>\n ) : null}\n </li>\n );\n })}\n </ol>\n );\n});\n"],"mappings":";;;;;;;AAgBA,IAAMA,KAA0B,GAAiB,MAA6B,QAAQC,EAAQ,MAAMC,KAMvFC,IAA+B,kBAAgD,SAC1F,EAAE,UAAO,gBAAa,oBAAiB,aAAa,qBAAkBH,GAAwB,cAAW,GAAGI,KAC5G,GACA;CACA,IAAMF,IAAQG,EAAM,QACdC,IAAeJ,IAAQ,KAAKK,IAAcL,GAE1CM,IAAgB,KAAK,IAAI,KAAK,IAAID,GAAa,CAAC,GAAGL,CAAK,GACxDO,IAAeH,IAAeI,KAAkBC,EAAgBT,GAAOA,CAAK,IAAIS,EAAgBH,GAAeN,CAAK;CAE1H,OACE,kBAAC,MAAD;EAAS;EAAK,WAAWU,EAAG,oBAAoBC,CAAS;EAAG,GAAIT;EAC7D,UAAAC,EAAM,KAAK,GAAO,MAAU;GAC3B,IAAMS,IAASC,IAAQ,GACjBC,IAAQF,IAASP,IAAc,cAAcO,MAAWP,IAAc,YAAY;GACxF,OACE,kBAAC,MAAD;IAAgB,WAAU;IAAyB,cAAYS;IAAO,gBAAcA,MAAU,YAAY,SAAS,KAAA;IAAnH,UAAA,CACE,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MAEE,kBAAC,QAAD;OAAM,WAAU;OAA2B,eAAY;OACpD,UAAAA,MAAU,cAAc,kBAACC,GAAD,EAAe,MAAK,KAAM,CAAA,IAAIH;MACnD,CAAA;MACN,kBAAC,QAAD;OAAM,WAAU;OAA2B,UAAAI;MAAY,CAAA;MACtDF,MAAU,eAAeN,IAAiB,kBAAC,QAAD;OAAM,WAAU;OAA4B,UAAAA;MAAqB,CAAA,IAAI;KAC5G;IAEL,CAAA,GAAAI,MAAWN,IACV,kBAAC,QAAD;KAAM,WAAU;KAA4B,eAAY;KAAxD,UAAA,CACE,kBAAC,QAAD;MAAM,WAAU;MAAmC,UAAAU;KAAY,CAAA,GAC/D,kBAAC,QAAD;MAAM,WAAU;MAAmC,UAAAT;KAAmB,CAAA,CAClE;IACJ,CAAA,IAAA,IACF;GAhBK,GAAAM,CAgBL;EAER,CAAC;CACC,CAAA;AAER,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../utils/cn.cjs");;/* empty css */let t=require("react"),n=require("react/jsx-runtime"),r=require("@radix-ui/react-slot");var i=(0,t.forwardRef)(function({active:t=!1,asChild:i=!1,className:a,...o},s){return(0,n.jsx)(i?r.Slot:`a`,{ref:s,className:e.cn(`tm-header-item`,a),"data-active":t?``:void 0,"aria-current":t?`page`:void 0,...o})});exports.HeaderItem=i;
|
|
2
|
+
//# sourceMappingURL=HeaderItem.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderItem.cjs","names":["Slot","cn","require_cn","react","react_jsx_runtime","_radix_ui_react_slot","HeaderItem","props","asChild","className","active"],"sources":["../../../src/components/HeaderItem/HeaderItem.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, type AnchorHTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport './HeaderItem.css';\n\nexport interface HeaderItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Marks the link to the page the user is on (Figma \"Clicked\"): link colour and `aria-current=\"page\"`. */\n active?: boolean;\n /** Renders the single child element (e.g. a router `<Link>`) with the item's styling instead of an `<a>`. */\n asChild?: boolean;\n}\n\n/** A link in the site header's navigation. */\nexport const HeaderItem = /* @__PURE__ */ forwardRef<HTMLAnchorElement, HeaderItemProps>(function HeaderItem(\n { active = false, asChild = false, className, ...props },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n return <Comp ref={ref} className={cn('tm-header-item', className)} data-active={active ? '' : undefined} aria-current={active ? 'page' : undefined} {...props} />;\n});\n"],"mappings":"A,2KAaA,IAAaM,GAA6B,EAAAH,EAAA,WAAA,CAA+C,SACvF,CAAE,SAAS,GAAO,UAAU,GAAO,YAAW,GAAGI,GACjD,EACA,CAEA,OAAO,EAAAH,EAAA,IAAA,CADMI,EAAUR,EAAAA,KAAO,IACvB,CAAW,MAAK,UAAWC,EAAAA,GAAG,iBAAkBQ,CAAS,EAAG,cAAaC,EAAS,GAAK,IAAA,GAAW,eAAcA,EAAS,OAAS,IAAA,GAAW,GAAIH,CAAQ,CAAA,CAClK,CAAC,E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { forwardRef as t } from "react";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
import { Slot as r } from "@radix-ui/react-slot";
|
|
7
|
+
// src/components/HeaderItem/HeaderItem.tsx
|
|
8
|
+
var i = /* @__PURE__ */ t(function({ active: t = !1, asChild: i = !1, className: a, ...o }, s) {
|
|
9
|
+
return /* @__PURE__ */ n(i ? r : "a", {
|
|
10
|
+
ref: s,
|
|
11
|
+
className: e("tm-header-item", a),
|
|
12
|
+
"data-active": t ? "" : void 0,
|
|
13
|
+
"aria-current": t ? "page" : void 0,
|
|
14
|
+
...o
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
export { i as HeaderItem };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=HeaderItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderItem.js","names":["HeaderItem","props","asChild","Slot","cn","className","active"],"sources":["../../../src/components/HeaderItem/HeaderItem.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, type AnchorHTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport './HeaderItem.css';\n\nexport interface HeaderItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Marks the link to the page the user is on (Figma \"Clicked\"): link colour and `aria-current=\"page\"`. */\n active?: boolean;\n /** Renders the single child element (e.g. a router `<Link>`) with the item's styling instead of an `<a>`. */\n asChild?: boolean;\n}\n\n/** A link in the site header's navigation. */\nexport const HeaderItem = /* @__PURE__ */ forwardRef<HTMLAnchorElement, HeaderItemProps>(function HeaderItem(\n { active = false, asChild = false, className, ...props },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n return <Comp ref={ref} className={cn('tm-header-item', className)} data-active={active ? '' : undefined} aria-current={active ? 'page' : undefined} {...props} />;\n});\n"],"mappings":";;;;;;;AAaA,IAAaA,IAA6B,kBAA+C,SACvF,EAAE,YAAS,IAAO,aAAU,IAAO,cAAW,GAAGC,KACjD,GACA;CAEA,OAAO,kBADMC,IAAUC,IAAO,KACvB;EAAW;EAAK,WAAWC,EAAG,kBAAkBC,CAAS;EAAG,eAAaC,IAAS,KAAK,KAAA;EAAW,gBAAcA,IAAS,SAAS,KAAA;EAAW,GAAIL;CAAQ,CAAA;AAClK,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../icons/generated/NextArrowIcon.cjs"),t=require("../../utils/cn.cjs");;/* empty css */let n=require("react"),r=require("react/jsx-runtime"),i=require("@radix-ui/react-slot");var a=(0,n.forwardRef)(function({question:n,category:a,readLabel:o=`Read answer`,headingLevel:s=3,asChild:c=!1,className:l,children:u,...d},f){let p=c?i.Slot:`a`,m=`h${s}`,h=a!=null&&a!==!1;return(0,r.jsxs)(p,{ref:f,className:t.cn(`tm-help-question-card`,l),...d,children:[h?(0,r.jsx)(`span`,{className:`tm-help-question-card__category`,children:a}):null,(0,r.jsx)(m,{className:`tm-help-question-card__question`,children:n}),(0,r.jsx)(i.Slottable,{children:u}),o!=null&&o!==!1?(0,r.jsxs)(`span`,{className:`tm-help-question-card__read`,"data-tm-icon-size":`sm`,children:[o,(0,r.jsx)(e.NextArrowIcon,{})]}):null]})});exports.HelpQuestionCard=a;
|
|
2
|
+
//# sourceMappingURL=HelpQuestionCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpQuestionCard.cjs","names":["Slot","cn","Slottable","NextArrowIcon","require_NextArrowIcon","require_cn","react","react_jsx_runtime","_radix_ui_react_slot","HelpQuestionCard","props","Comp","asChild","Heading","headingLevel","hasCategory","category","className","question","readLabel"],"sources":["../../../src/components/HelpQuestionCard/HelpQuestionCard.tsx"],"sourcesContent":["import { Slot, Slottable } from '@radix-ui/react-slot';\nimport { forwardRef, type AnchorHTMLAttributes, type ReactNode } from 'react';\nimport { NextArrowIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './HelpQuestionCard.css';\n\nexport interface HelpQuestionCardProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** The question (Figma \"Question\"). */\n question: ReactNode;\n /** Topic pill above the question (Figma \"Category\"), e.g. \"Offers\". */\n category?: ReactNode;\n /** Text of the last line. Defaults to \"Read answer\" — pass the translated text in apps; `null` removes the line. */\n readLabel?: ReactNode;\n /** Heading level of the question; pick the one that fits the page outline. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /**\n * Renders the single child element (e.g. an empty router `<Link href=\"…\" />`) as the card instead of an `<a>`;\n * the card's content is placed inside it.\n */\n asChild?: boolean;\n}\n\n/**\n * A help-centre question teaser (Figma component set \"Help / Question card\"). The whole card is one link whose\n * accessible name is its visible text: category, question and the last line. Figma \"State\": Default · Hover map to\n * the native states.\n */\nexport const HelpQuestionCard = /* @__PURE__ */ forwardRef<HTMLAnchorElement, HelpQuestionCardProps>(function HelpQuestionCard(\n {\n question,\n category,\n readLabel = 'Read answer',\n headingLevel = 3,\n asChild = false,\n className,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n const Heading = `h${headingLevel}` as const;\n const hasCategory = category != null && category !== false;\n\n return (\n <Comp ref={ref} className={cn('tm-help-question-card', className)} {...props}>\n {hasCategory ? <span className=\"tm-help-question-card__category\">{category}</span> : null}\n <Heading className=\"tm-help-question-card__question\">\n {question}\n </Heading>\n {/* With asChild this is where the child's own children go; otherwise any extra content */}\n <Slottable>{children}</Slottable>\n {readLabel != null && readLabel !== false ? (\n <span className=\"tm-help-question-card__read\" data-tm-icon-size=\"sm\">\n {readLabel}\n <NextArrowIcon />\n </span>\n ) : null}\n </Comp>\n );\n});\n"],"mappings":"A,sOA2BA,IAAaS,GAAmC,EAAAH,EAAA,WAAA,CAAqD,SACnG,CACE,WACA,WACA,YAAY,cACZ,eAAe,EACf,UAAU,GACV,YACA,WACA,GAAGI,GAEL,EACA,CACA,IAAMC,EAAOC,EAAUZ,EAAAA,KAAO,IACxBa,EAAU,IAAIC,IACdC,EAAcC,GAAY,MAAQA,IAAa,GAErD,OACE,EAAAT,EAAA,KAAA,CAACI,EAAD,CAAW,MAAK,UAAWV,EAAAA,GAAG,wBAAyBgB,CAAS,EAAG,GAAIP,EAAvE,SAAA,CACGK,GAAc,EAAAR,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,kCAAmC,SAAAS,CAAe,CAAA,EAAI,MACrF,EAAAT,EAAA,IAAA,CAACM,EAAD,CAAS,UAAU,kCAChB,SAAAK,CACM,CAAA,GAET,EAAAX,EAAA,IAAA,CAACL,EAAAA,UAAD,CAAY,UAAoB,CAAA,EAC/BiB,GAAa,MAAQA,IAAc,IAClC,EAAAZ,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,8BAA8B,oBAAkB,KAAhE,SAAA,CACGY,GACD,EAAAZ,EAAA,IAAA,CAACJ,EAAAA,cAAD,CAAgB,CAAA,CACZ,CACJ,CAAA,EAAA,IACA,C,EAEV,CAAC,E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { NextArrowIcon as e } from "../../icons/generated/NextArrowIcon.js";
|
|
3
|
+
import { cn as t } from "../../utils/cn.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { forwardRef as n } from "react";
|
|
6
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
+
import { Slot as a, Slottable as o } from "@radix-ui/react-slot";
|
|
8
|
+
// src/components/HelpQuestionCard/HelpQuestionCard.tsx
|
|
9
|
+
var s = /* @__PURE__ */ n(function({ question: n, category: s, readLabel: c = "Read answer", headingLevel: l = 3, asChild: u = !1, className: d, children: f, ...p }, m) {
|
|
10
|
+
let h = u ? a : "a", g = `h${l}`, _ = s != null && s !== !1;
|
|
11
|
+
return /* @__PURE__ */ i(h, {
|
|
12
|
+
ref: m,
|
|
13
|
+
className: t("tm-help-question-card", d),
|
|
14
|
+
...p,
|
|
15
|
+
children: [
|
|
16
|
+
_ ? /* @__PURE__ */ r("span", {
|
|
17
|
+
className: "tm-help-question-card__category",
|
|
18
|
+
children: s
|
|
19
|
+
}) : null,
|
|
20
|
+
/* @__PURE__ */ r(g, {
|
|
21
|
+
className: "tm-help-question-card__question",
|
|
22
|
+
children: n
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ r(o, { children: f }),
|
|
25
|
+
c != null && c !== !1 ? /* @__PURE__ */ i("span", {
|
|
26
|
+
className: "tm-help-question-card__read",
|
|
27
|
+
"data-tm-icon-size": "sm",
|
|
28
|
+
children: [c, /* @__PURE__ */ r(e, {})]
|
|
29
|
+
}) : null
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
export { s as HelpQuestionCard };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=HelpQuestionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpQuestionCard.js","names":["HelpQuestionCard","props","Comp","asChild","Slot","Heading","headingLevel","hasCategory","category","cn","className","question","Slottable","readLabel","NextArrowIcon"],"sources":["../../../src/components/HelpQuestionCard/HelpQuestionCard.tsx"],"sourcesContent":["import { Slot, Slottable } from '@radix-ui/react-slot';\nimport { forwardRef, type AnchorHTMLAttributes, type ReactNode } from 'react';\nimport { NextArrowIcon } from '../../icons';\nimport { cn } from '../../utils/cn';\nimport './HelpQuestionCard.css';\n\nexport interface HelpQuestionCardProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** The question (Figma \"Question\"). */\n question: ReactNode;\n /** Topic pill above the question (Figma \"Category\"), e.g. \"Offers\". */\n category?: ReactNode;\n /** Text of the last line. Defaults to \"Read answer\" — pass the translated text in apps; `null` removes the line. */\n readLabel?: ReactNode;\n /** Heading level of the question; pick the one that fits the page outline. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /**\n * Renders the single child element (e.g. an empty router `<Link href=\"…\" />`) as the card instead of an `<a>`;\n * the card's content is placed inside it.\n */\n asChild?: boolean;\n}\n\n/**\n * A help-centre question teaser (Figma component set \"Help / Question card\"). The whole card is one link whose\n * accessible name is its visible text: category, question and the last line. Figma \"State\": Default · Hover map to\n * the native states.\n */\nexport const HelpQuestionCard = /* @__PURE__ */ forwardRef<HTMLAnchorElement, HelpQuestionCardProps>(function HelpQuestionCard(\n {\n question,\n category,\n readLabel = 'Read answer',\n headingLevel = 3,\n asChild = false,\n className,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot : 'a';\n const Heading = `h${headingLevel}` as const;\n const hasCategory = category != null && category !== false;\n\n return (\n <Comp ref={ref} className={cn('tm-help-question-card', className)} {...props}>\n {hasCategory ? <span className=\"tm-help-question-card__category\">{category}</span> : null}\n <Heading className=\"tm-help-question-card__question\">\n {question}\n </Heading>\n {/* With asChild this is where the child's own children go; otherwise any extra content */}\n <Slottable>{children}</Slottable>\n {readLabel != null && readLabel !== false ? (\n <span className=\"tm-help-question-card__read\" data-tm-icon-size=\"sm\">\n {readLabel}\n <NextArrowIcon />\n </span>\n ) : null}\n </Comp>\n );\n});\n"],"mappings":";;;;;;;;AA2BA,IAAaA,IAAmC,kBAAqD,SACnG,EACE,aACA,aACA,eAAY,eACZ,kBAAe,GACf,aAAU,IACV,cACA,aACA,GAAGC,KAEL,GACA;CACA,IAAMC,IAAOC,IAAUC,IAAO,KACxBC,IAAU,IAAIC,KACdC,IAAcC,KAAY,QAAQA,MAAa;CAErD,OACE,kBAACN,GAAD;EAAW;EAAK,WAAWO,EAAG,yBAAyBC,CAAS;EAAG,GAAIT;EAAvE,UAAA;GACGM,IAAc,kBAAC,QAAD;IAAM,WAAU;IAAmC,UAAAC;GAAe,CAAA,IAAI;GACrF,kBAACH,GAAD;IAAS,WAAU;IAChB,UAAAM;GACM,CAAA;GAET,kBAACC,GAAD,EAAY,YAAoB,CAAA;GAC/BC,KAAa,QAAQA,MAAc,KAClC,kBAAC,QAAD;IAAM,WAAU;IAA8B,qBAAkB;IAAhE,UAAA,CACGA,GACD,kBAACC,GAAD,CAAgB,CAAA,CACZ;GACJ,CAAA,IAAA;EACA;;AAEV,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";const e=require("../../utils/cn.cjs"),t=require("./heroMotion.cjs");;/* empty css */let n=require("react"),r=require("react/jsx-runtime");var i=[[260,300,240,290],[300,250,290,260]];function a(e,t){let n=i[e%i.length];return 198/n[t%n.length]}var o=(0,n.forwardRef)(function({columns:i,duration:o=24,autoPlay:s=!0,paused:c=!1,progress:l=0,className:u,style:d,...f},p){let m=(0,n.useRef)(null),h=t.useOnScreen(m),g=s&&!c&&h,_=(e,t)=>e.map((e,n)=>(0,r.jsxs)(`div`,{className:`tm-hero-columns__photo`,style:{aspectRatio:String(e.aspectRatio??a(t,n))},children:[e.image??(e.src?(0,r.jsx)(`img`,{className:`tm-hero-columns__image`,src:e.src,alt:``,loading:`lazy`,draggable:!1}):null),e.chip!=null&&e.chip!==!1?(0,r.jsxs)(`span`,{className:`tm-hero-columns__chip`,"data-tm-icon-size":`sm`,children:[e.chipIcon,(0,r.jsx)(`span`,{className:`tm-hero-columns__chip-label`,children:e.chip})]}):null]},e.key??n));return(0,r.jsx)(`div`,{ref:e=>{m.current=e,typeof p==`function`?p(e):p&&(p.current=e)},className:e.cn(`tm-hero-columns`,u),"data-playing":g?``:void 0,"aria-hidden":`true`,style:{"--tm-hero-columns-duration":`${o}s`,"--tm-hero-columns-progress":Math.min(1,Math.max(0,l)),...d},...f,children:i.map((e,t)=>(0,r.jsx)(`div`,{className:`tm-hero-columns__column`,children:(0,r.jsxs)(`div`,{className:`tm-hero-columns__track`,"data-direction":t%2==0?`up`:`down`,children:[(0,r.jsx)(`div`,{className:`tm-hero-columns__group`,children:_(e,t)}),(0,r.jsx)(`div`,{className:`tm-hero-columns__group`,children:_(e,t)})]})},t))})});exports.HeroColumns=o;
|
|
2
|
+
//# sourceMappingURL=HeroColumns.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroColumns.cjs","names":["useRef","useOnScreen","cn","require_cn","require_heroMotion","react","react_jsx_runtime","figmaHeights","defaultRatio","heights","column","index","HeroColumns","props","rootRef","onScreen","playing","autoPlay","paused","renderPhotos","photos","photo","node","ref","className","duration","progress","style","columns"],"sources":["../../../src/components/HeroColumns/HeroColumns.tsx"],"sourcesContent":["import { forwardRef, useRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useOnScreen } from './heroMotion';\nimport './HeroColumns.css';\n\nexport interface HeroColumnsPhoto {\n /** Photo URL. Without it (and without `image`) a neutral tile is shown. */\n src?: string;\n /** Custom photo element (e.g. a framework `<Image>`); it fills the tile and replaces `src`. */\n image?: ReactNode;\n /** Width ÷ height of the tile. Defaults to the rhythm of the Figma sample (198 wide × 240–300 tall). */\n aspectRatio?: number;\n /** Text of the chip in the bottom-left corner (Figma \"Chip\"), e.g. \"Request sent\". Translated by the app. */\n chip?: ReactNode;\n /** Icon in front of the chip text, e.g. `<PaperIcon />`; drawn at 16px. */\n chipIcon?: ReactNode;\n /** React key; defaults to the photo's index. */\n key?: string | number;\n}\n\nexport interface HeroColumnsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** One array of photos per column (Figma: two columns of four). Odd columns drift up, even columns drift down. */\n columns: HeroColumnsPhoto[][];\n /** Seconds one full loop takes (Figma prototype: 24s, linear). */\n duration?: number;\n /** Starts drifting on its own. With `false` the columns rest at `progress`. */\n autoPlay?: boolean;\n /** Freezes the drift where it is. */\n paused?: boolean;\n /** Point of the loop (0–1) the drift starts from, or rests at while not playing. Figma \"Position\": Start = 0, End = 1. */\n progress?: number;\n}\n\n/* Tile heights of the Figma sample on its 198px wide column — column A, then column B. */\nconst figmaHeights = [\n [260, 300, 240, 290],\n [300, 250, 290, 260],\n];\n\nfunction defaultRatio(column: number, index: number): number {\n const heights = figmaHeights[column % figmaHeights.length]!;\n return 198 / heights[index % heights.length]!;\n}\n\n/**\n * Two (or more) columns of destination photos drifting in opposite directions behind a soft top and bottom fade\n * (Figma component set \"How it works / Hero columns\"). Purely decorative: it is hidden from assistive technology,\n * stops while off-screen or in a hidden tab and stands still for users who prefer reduced motion.\n */\nexport const HeroColumns = /* @__PURE__ */ forwardRef<HTMLDivElement, HeroColumnsProps>(function HeroColumns(\n { columns, duration = 24, autoPlay = true, paused = false, progress = 0, className, style, ...props },\n ref,\n) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const onScreen = useOnScreen(rootRef);\n const playing = autoPlay && !paused && onScreen;\n\n const renderPhotos = (photos: HeroColumnsPhoto[], column: number) =>\n photos.map((photo, index) => (\n <div\n key={photo.key ?? index}\n className=\"tm-hero-columns__photo\"\n style={{ aspectRatio: String(photo.aspectRatio ?? defaultRatio(column, index)) }}\n >\n {photo.image ?? (photo.src ? <img className=\"tm-hero-columns__image\" src={photo.src} alt=\"\" loading=\"lazy\" draggable={false} /> : null)}\n {photo.chip != null && photo.chip !== false ? (\n <span className=\"tm-hero-columns__chip\" data-tm-icon-size=\"sm\">\n {photo.chipIcon}\n <span className=\"tm-hero-columns__chip-label\">{photo.chip}</span>\n </span>\n ) : null}\n </div>\n ));\n\n return (\n <div\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn('tm-hero-columns', className)}\n data-playing={playing ? '' : undefined}\n aria-hidden=\"true\"\n style={\n {\n '--tm-hero-columns-duration': `${duration}s`,\n '--tm-hero-columns-progress': Math.min(1, Math.max(0, progress)),\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {columns.map((photos, column) => (\n <div key={column} className=\"tm-hero-columns__column\">\n {/* The photos are rendered twice so the track can loop seamlessly by sliding half of its height. */}\n <div className=\"tm-hero-columns__track\" data-direction={column % 2 === 0 ? 'up' : 'down'}>\n <div className=\"tm-hero-columns__group\">{renderPhotos(photos, column)}</div>\n <div className=\"tm-hero-columns__group\">{renderPhotos(photos, column)}</div>\n </div>\n </div>\n ))}\n </div>\n );\n});\n"],"mappings":"A,wKAkCA,IAAMO,EAAe,CACnB,CAAC,IAAK,IAAK,IAAK,GAAG,EACnB,CAAC,IAAK,IAAK,IAAK,GAAG,CACrB,EAEA,SAASC,EAAa,EAAgB,EAAuB,CAC3D,IAAMC,EAAUF,EAAaG,EAASH,EAAa,QACnD,MAAO,KAAME,EAAQE,EAAQF,EAAQ,OACvC,CAOA,IAAaG,GAA8B,EAAAP,EAAA,WAAA,CAA6C,SACtF,CAAE,UAAS,WAAW,GAAI,WAAW,GAAM,SAAS,GAAO,WAAW,EAAG,YAAW,QAAO,GAAGQ,GAC9F,EACA,CACA,IAAMC,GAAA,EAAUd,EAAAA,OAAAA,CAA8B,IAAI,EAC5Ce,EAAWd,EAAAA,YAAYa,CAAO,EAC9BE,EAAUC,GAAY,CAACC,GAAUH,EAEjCI,GAAgB,EAA4B,IAChDC,EAAO,KAAK,EAAO,KACjB,EAAAd,EAAA,KAAA,CAAC,MAAD,CAEE,UAAU,yBACV,MAAO,CAAE,YAAa,OAAOe,EAAM,aAAeb,EAAaE,EAAQC,CAAK,CAAC,CAAE,EAHjF,SAAA,CAKGU,EAAM,QAAUA,EAAM,KAAM,EAAAf,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,yBAAyB,IAAKe,EAAM,IAAK,IAAI,GAAG,QAAQ,OAAO,UAAW,EAAQ,CAAA,EAAI,MACjIA,EAAM,MAAQ,MAAQA,EAAM,OAAS,IACpC,EAAAf,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,wBAAwB,oBAAkB,KAA1D,SAAA,CACGe,EAAM,UACP,EAAAf,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,8BAA+B,SAAAe,EAAM,IAAW,CAAA,CAC5D,CACJ,CAAA,EAAA,IACD,CAXE,EAAAA,EAAM,KAAOV,CAWf,CACN,EAEH,OACE,EAAAL,EAAA,IAAA,CAAC,MAAD,CACE,IAAM,GAAS,CACb,EAAQ,QAAUgB,EACd,OAAOC,GAAQ,WAAYA,EAAID,CAAI,EAC9BC,IAAK,EAAI,QAAUD,EAC9B,EACA,UAAWpB,EAAAA,GAAG,kBAAmBsB,CAAS,EAC1C,eAAcR,EAAU,GAAK,IAAA,GAC7B,cAAY,OACZ,MACE,CACE,6BAA8B,GAAGS,EAAS,GAC1C,6BAA8B,KAAK,IAAI,EAAG,KAAK,IAAI,EAAGC,CAAQ,CAAC,EAC/D,GAAGC,CACL,EAEF,GAAId,EAEH,SAAAe,EAAQ,KAAK,EAAQ,KACpB,EAAAtB,EAAA,IAAA,CAAC,MAAD,CAAkB,UAAU,0BAE1B,UAAA,EAAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yBAAyB,iBAAgBI,EAAS,GAAM,EAAI,KAAO,OAAlF,SAAA,EACE,EAAAJ,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,yBAA0B,SAAAa,EAAaC,EAAQV,CAAM,CAAO,CAAA,GAC3E,EAAAJ,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,yBAA0B,SAAAa,EAAaC,EAAQV,CAAM,CAAO,CAAA,CACxE,C,EACF,EANKA,CAML,CACN,CACE,CAAA,CAET,CAAC,E"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { useOnScreen as t } from "./heroMotion.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { forwardRef as n, useRef as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/HeroColumns/HeroColumns.tsx
|
|
8
|
+
var o = [[
|
|
9
|
+
260,
|
|
10
|
+
300,
|
|
11
|
+
240,
|
|
12
|
+
290
|
|
13
|
+
], [
|
|
14
|
+
300,
|
|
15
|
+
250,
|
|
16
|
+
290,
|
|
17
|
+
260
|
|
18
|
+
]];
|
|
19
|
+
function s(e, t) {
|
|
20
|
+
let n = o[e % o.length];
|
|
21
|
+
return 198 / n[t % n.length];
|
|
22
|
+
}
|
|
23
|
+
var c = /* @__PURE__ */ n(function({ columns: n, duration: o = 24, autoPlay: c = !0, paused: l = !1, progress: u = 0, className: d, style: f, ...p }, m) {
|
|
24
|
+
let h = r(null), g = t(h), _ = c && !l && g, v = (e, t) => e.map((e, n) => /* @__PURE__ */ a("div", {
|
|
25
|
+
className: "tm-hero-columns__photo",
|
|
26
|
+
style: { aspectRatio: String(e.aspectRatio ?? s(t, n)) },
|
|
27
|
+
children: [e.image ?? (e.src ? /* @__PURE__ */ i("img", {
|
|
28
|
+
className: "tm-hero-columns__image",
|
|
29
|
+
src: e.src,
|
|
30
|
+
alt: "",
|
|
31
|
+
loading: "lazy",
|
|
32
|
+
draggable: !1
|
|
33
|
+
}) : null), e.chip != null && e.chip !== !1 ? /* @__PURE__ */ a("span", {
|
|
34
|
+
className: "tm-hero-columns__chip",
|
|
35
|
+
"data-tm-icon-size": "sm",
|
|
36
|
+
children: [e.chipIcon, /* @__PURE__ */ i("span", {
|
|
37
|
+
className: "tm-hero-columns__chip-label",
|
|
38
|
+
children: e.chip
|
|
39
|
+
})]
|
|
40
|
+
}) : null]
|
|
41
|
+
}, e.key ?? n));
|
|
42
|
+
return /* @__PURE__ */ i("div", {
|
|
43
|
+
ref: (e) => {
|
|
44
|
+
h.current = e, typeof m == "function" ? m(e) : m && (m.current = e);
|
|
45
|
+
},
|
|
46
|
+
className: e("tm-hero-columns", d),
|
|
47
|
+
"data-playing": _ ? "" : void 0,
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
style: {
|
|
50
|
+
"--tm-hero-columns-duration": `${o}s`,
|
|
51
|
+
"--tm-hero-columns-progress": Math.min(1, Math.max(0, u)),
|
|
52
|
+
...f
|
|
53
|
+
},
|
|
54
|
+
...p,
|
|
55
|
+
children: n.map((e, t) => /* @__PURE__ */ i("div", {
|
|
56
|
+
className: "tm-hero-columns__column",
|
|
57
|
+
children: /* @__PURE__ */ a("div", {
|
|
58
|
+
className: "tm-hero-columns__track",
|
|
59
|
+
"data-direction": t % 2 == 0 ? "up" : "down",
|
|
60
|
+
children: [/* @__PURE__ */ i("div", {
|
|
61
|
+
className: "tm-hero-columns__group",
|
|
62
|
+
children: v(e, t)
|
|
63
|
+
}), /* @__PURE__ */ i("div", {
|
|
64
|
+
className: "tm-hero-columns__group",
|
|
65
|
+
children: v(e, t)
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
}, t))
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
export { c as HeroColumns };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=HeroColumns.js.map
|