@mittwald/flow-react-components 1.5.0-next.3 → 1.5.0-next.30
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/AGENTS.md +21 -10
- package/USAGE.md +7 -0
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/css/all-layered.css +1 -1
- package/dist/css/all.css +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/lib/ariaLive.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/models/ActionState.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AlertBadge/AlertBadge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AlertIcon/AlertIcon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AlertText/AlertText.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +14 -7
- package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/BigNumber/BigNumber.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Button/Button.mjs +5 -17
- package/dist/js/packages/components/src/components/Button/Button.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Button/Button.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Calendar/Calendar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Calendar/components/CalendarHeader/CalendarHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/RangeCalendar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Calendar/components/RangeCalendar/helpers/useCalendarDateRangePresets.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +5 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +3 -3
- package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +3 -3
- package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +3 -3
- package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CoachMark/CoachMark.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +35 -16
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/languages/dotEnv/index.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/languages/index.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Combine/Combine.mjs +1 -0
- package/dist/js/packages/components/src/components/Combine/Combine.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Combine/Combine.module.mjs +4 -2
- package/dist/js/packages/components/src/components/Combine/Combine.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +3 -3
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Content/Content.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs +5 -1
- package/dist/js/packages/components/src/components/ContextMenu/ContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextMenu/components/ContextMenuSelectAll/ContextMenuSelectAll.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextualHelp/ContextualHelp.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CopyButton/CopyButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CounterBadge/CounterBadge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CountryOptions/CountryOptions.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +6 -5
- package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +4 -3
- package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/DonutChart.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/Donut.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartLegend.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
- package/dist/js/packages/components/src/components/EmulatedBoldText/EmulatedBoldText.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FieldDescription/FieldDescription.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FieldError/FieldError.mjs +40 -31
- package/dist/js/packages/components/src/components/FieldError/FieldError.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/components/DeleteButton/DeleteButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/components/FileSizeText/FileSizeText.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +8 -6
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileField/FileField.mjs +3 -3
- package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileField/components/FileInput.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Flex/Flex.mjs +5 -5
- package/dist/js/packages/components/src/components/Flex/Flex.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Header/Header.mjs.map +1 -1
- package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAI.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAIHosting.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAnalytics.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconApp.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAscending.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAttachment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconAutoresponder.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconBackLink.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconBackup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconBold.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCamera.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCertificate.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconChangelog.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCheck.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxChecked.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxEmpty.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCheckboxIndeterminate.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronDown.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronLeft.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronRight.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconChevronUp.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconClose.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCode.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContainer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContextMenuVertical.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContract.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContractPartner.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconContributor.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCopy.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCronjob.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconCustomer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDanger.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDashboard.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDatabase.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDate.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDelete.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDeliveryBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDescending.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDesktop.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDirectory.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsSubZone.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDnsZone.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDomain.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconDownload.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconEdit.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconEmail.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconEmailArchive.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconExtension.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconExternalLink.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconFailed.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconFeedback.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconFile.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconFilter.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardAddress.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconForwardLink.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconHide.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconHome.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconImage.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconInfo.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconInvite.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconInvoice.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconItalic.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconKnowledgeHint.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLanguage.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLeadFyndr.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLink.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLock.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLockOpen.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconLogout.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMainUser.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMarketplace.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMaximize.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMember.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMinimize.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMinus.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMittwald.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMobile.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMonitoring.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconMove.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconNewsletter.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconNotification.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconNumber.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconOrder.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconOrderedList.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPassword.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPath.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPause.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPayment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPending.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPicture.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconPlus.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconProject.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconQuote.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOff.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconRadioOn.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconRedo.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconRefresh.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconRegistry.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSave.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSearch.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSecurity.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSend.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconServer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSettings.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconShare.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconShow.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSorting.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSsh.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSshKey.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSshSftp.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconStack.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconStar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconStarFilled.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconStart.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconStrikeThrough.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSubdomain.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSucceeded.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSuccess.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconSupport.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconTerminate.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconTicket.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconTime.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconUnavailable.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconUndo.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconUnorderedList.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconUpload.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconUser.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconVhost.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconVolume.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/components/icons/IconWarning.mjs.map +1 -1
- package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Image/Image.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ImageCropper/ImageCropper.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Initials/Initials.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
- package/dist/js/packages/components/src/components/InlineCode/InlineCode.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Kbd/Kbd.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LabeledValue/LabeledValue.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs +2 -1
- package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs +3 -1
- package/dist/js/packages/components/src/components/LayoutCard/LayoutCard.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Legend/Legend.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/Controls.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGallery/LightBoxGallery.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/components/LightBoxGalleryItem/LightBoxGalleryItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/Link.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/components/LinkIcon/LinkIcon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/DataLoader/DataLoaderSuspense.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/EmptySearchResultView/EmptySearchResultView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/EmptyView/EmptyView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/Footer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/components/PaginationInfos/PaginationInfos.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Footer/components/ShowNextBatchButton/ShowNextBatchButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionCheckboxGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionDateRange.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/FilterAccordionRadioGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/DateRangeFilterPopover.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/Items.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/Item.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/views/GridListItem/GridListItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListSummary/ListSummary.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Table/components/TableBodyLoadingView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Table/components/TableRowSkeletonView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs +2 -2
- package/dist/js/packages/components/src/components/List/model/filter/dateRangeFilterFn.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/views/EmptyView/EmptyView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/views/EmptyViewContainer/EmptyViewContainer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Markdown/Markdown.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/AttachmentButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ModeButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/Toolbar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/components/ToolbarButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/lib/useFileUpload.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MenuItem/MenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MenuItem/components/MenuItemContent/MenuItemContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Message/Message.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MessageThread/MessageThread.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MessageThread/components/MessageSeparator/MessageSeparator.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Notification/Notification.mjs.map +1 -1
- package/dist/js/packages/components/src/components/NotificationProvider/NotificationContainer/NotificationContainer.mjs.map +1 -1
- package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +3 -2
- package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Option/Option.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Options/Options.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs +6 -1
- package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +42 -19
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs +2 -2
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/PasswordGenerateButton/PasswordGenerateButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultButton/ValidationResultButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/ValidationResultEntry/ValidationResultEntry.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/lib/ariaAnnounce.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs +12 -0
- package/dist/js/packages/components/src/components/PasswordCreationField/lib/usePolicyValidationResult.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/Popover.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/components/NonModalPopoverContent/NonModalPopoverContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/components/PopoverTip/PopoverTip.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/viewportPadding.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarLegend.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarValue.mjs.map +1 -1
- package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +3 -2
- package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/RadioGroup/components/Radio/Radio.mjs.map +1 -1
- package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/Rating.mjs +3 -2
- package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +3 -3
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +3 -2
- package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SegmentedControl/components/Segment/Segment.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Select/Select.mjs +3 -3
- package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Separator/Separator.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Skeleton/Skeleton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SkeletonText/SkeletonText.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Slider/Slider.mjs +4 -3
- package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Switch/Switch.mjs +3 -2
- package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TabNavigation/TabNavigation.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TabNavigation/components/LinkContent/LinkContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/components/TableBody/TableBody.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/components/TableCell/TableCell.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/components/TableColumn/TableColumn.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/components/TableHeader/TableHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Table/components/TableRow/TableRow.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/FallbackTab/FallbackTab.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Text/Text.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +3 -3
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextField/TextField.mjs +3 -3
- package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +5 -3
- package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Truncate/Truncate.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TunnelEntry/TunnelEntry.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/nextjs/components/RouterProvider/RouterProvider.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs.map +1 -1
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs +6 -3
- package/dist/js/packages/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs +16 -0
- package/dist/js/packages/components/src/lib/hooks/fieldErrorRenderedContext.mjs.map +1 -0
- package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +8 -7
- package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +34 -21
- package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/react/cloneElement.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/react/components/Render/Render.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/react/getPropsMerger.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/theming/hooks/useDesignTokens.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/tokens/isCategoricalColor.mjs.map +1 -1
- package/dist/js/packages/components/src/status/componentStatus.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +16 -0
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +16 -0
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts +3 -2
- package/dist/types/components/Button/Button.d.ts +7 -1
- package/dist/types/components/Button/stories/lib.d.ts +1 -1
- package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +7 -0
- package/dist/types/components/CodeEditor/CodeEditor.d.ts +7 -0
- package/dist/types/components/FileField/FileField.d.ts +1 -1
- package/dist/types/components/Flex/Flex.d.ts +4 -0
- package/dist/types/components/Link/Link.d.ts +5 -1
- package/dist/types/components/List/components/DataLoader/DataLoader.d.ts +1 -1
- package/dist/types/components/List/components/Items/components/Item/Item.d.ts +1 -1
- package/dist/types/components/List/components/Items/components/Item/hooks/useGridItemProps.d.ts +1 -1
- package/dist/types/components/List/components/ListItemView/components/ListItemViewContent/ListItemViewContent.d.ts +1 -1
- package/dist/types/components/PasswordCreationField/components/ComplexityIndicator/ComplexityIndicator.d.ts +5 -0
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/FormRootError/FormRootError.d.ts +12 -2
- package/dist/types/integrations/react-hook-form/components/FormSettingsProvider/FormSettingsProvider.d.ts +1 -1
- package/dist/types/lib/hooks/fieldErrorRenderedContext.d.ts +1 -0
- package/dist/types/lib/hooks/useFieldComponent.d.ts +15 -4
- package/dist/types/lib/hooks/useFieldError.d.ts +7 -1
- package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +12 -0
- package/package.json +13 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItemContent.mjs","names":[],"sources":["../../../../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"../../MenuItem.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconCheckboxIndeterminate,\n IconRadioOff,\n IconRadioOn,\n} from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { Switch } from \"@/components/Switch\";\n\ninterface Props extends Aria.MenuItemRenderProps, PropsWithChildren {\n selectionVariant?: \"control\" | \"navigation\" | \"switch\";\n isIndeterminate?: boolean;\n}\n\nexport const MenuItemContent: FC<Props> = (props) => {\n const {\n selectionMode,\n isSelected,\n selectionVariant = \"control\",\n isIndeterminate,\n children,\n } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n },\n Avatar: {\n className: styles.avatar,\n },\n Kbd: {\n className: styles.kbd,\n },\n Badge: {\n className: styles.badge,\n },\n };\n\n const controlIconPropsContext: PropsContext = {\n Icon: {\n className: clsx(\n styles.controlIcon,\n styles.icon,\n (isSelected || isIndeterminate) && styles.controlIconActive,\n ),\n },\n Switch: {\n className: clsx(styles.controlIcon, styles.switch),\n labelPosition: \"leading\",\n },\n };\n\n const selectionIcon =\n selectionMode === \"none\" ||\n selectionVariant === \"navigation\" ? null : selectionVariant === \"switch\" ? (\n <Switch isReadOnly isSelected={isSelected} />\n ) : selectionMode === \"single\" && isSelected ? (\n <IconRadioOn />\n ) : selectionMode === \"single\" && !isSelected ? (\n <IconRadioOff />\n ) : selectionMode === \"multiple\" && isSelected ? (\n <IconCheckboxChecked />\n ) : selectionMode === \"multiple\" && isIndeterminate ? (\n <IconCheckboxIndeterminate />\n ) : (\n <IconCheckboxEmpty />\n );\n\n return (\n <>\n <PropsContextProvider props={controlIconPropsContext}>\n {selectionIcon}\n </PropsContextProvider>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EACJ,eACA,YACA,mBAAmB,WACnB,iBACA,aACE;CAEJ,MAAM,eAA6B;EACjC,MAAM,EACJ,
|
|
1
|
+
{"version":3,"file":"MenuItemContent.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport type * as Aria from \"react-aria-components\";\nimport styles from \"../../MenuItem.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n IconCheckboxChecked,\n IconCheckboxEmpty,\n IconCheckboxIndeterminate,\n IconRadioOff,\n IconRadioOn,\n} from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { Switch } from \"@/components/Switch\";\n\ninterface Props extends Aria.MenuItemRenderProps, PropsWithChildren {\n selectionVariant?: \"control\" | \"navigation\" | \"switch\";\n isIndeterminate?: boolean;\n}\n\nexport const MenuItemContent: FC<Props> = (props) => {\n const {\n selectionMode,\n isSelected,\n selectionVariant = \"control\",\n isIndeterminate,\n children,\n } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n },\n Avatar: {\n className: styles.avatar,\n },\n Kbd: {\n className: styles.kbd,\n },\n Badge: {\n className: styles.badge,\n },\n };\n\n const controlIconPropsContext: PropsContext = {\n Icon: {\n className: clsx(\n styles.controlIcon,\n styles.icon,\n (isSelected || isIndeterminate) && styles.controlIconActive,\n ),\n },\n Switch: {\n className: clsx(styles.controlIcon, styles.switch),\n labelPosition: \"leading\",\n },\n };\n\n const selectionIcon =\n selectionMode === \"none\" ||\n selectionVariant === \"navigation\" ? null : selectionVariant === \"switch\" ? (\n <Switch isReadOnly isSelected={isSelected} />\n ) : selectionMode === \"single\" && isSelected ? (\n <IconRadioOn />\n ) : selectionMode === \"single\" && !isSelected ? (\n <IconRadioOff />\n ) : selectionMode === \"multiple\" && isSelected ? (\n <IconCheckboxChecked />\n ) : selectionMode === \"multiple\" && isIndeterminate ? (\n <IconCheckboxIndeterminate />\n ) : (\n <IconCheckboxEmpty />\n );\n\n return (\n <>\n <PropsContextProvider props={controlIconPropsContext}>\n {selectionIcon}\n </PropsContextProvider>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EACJ,eACA,YACA,mBAAmB,WACnB,iBACA,aACE;CAEJ,MAAM,eAA6B;EACjC,MAAM,EACJ,WAAWA,wBAAO,KACpB;EACA,QAAQ,EACN,WAAWA,wBAAO,OACpB;EACA,KAAK,EACH,WAAWA,wBAAO,IACpB;EACA,OAAO,EACL,WAAWA,wBAAO,MACpB;CACF;CAEA,MAAM,0BAAwC;EAC5C,MAAM,EACJ,WAAW,KACTA,wBAAO,aACPA,wBAAO,OACN,cAAc,oBAAoBA,wBAAO,iBAC5C,EACF;EACA,QAAQ;GACN,WAAW,KAAKA,wBAAO,aAAaA,wBAAO,MAAM;GACjD,eAAe;EACjB;CACF;CAkBA,OACE,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,sBAAD;EAAsB,OAAO;EAC1B,UAlBL,kBAAkB,UAClB,qBAAqB,eAAe,OAAO,qBAAqB,WAC9D,oBAAC,QAAD;GAAQ,YAAA;GAAuB;EAAa,CAAA,IAC1C,kBAAkB,YAAY,aAChC,oBAAC,aAAD,CAAc,CAAA,IACZ,kBAAkB,YAAY,CAAC,aACjC,oBAAC,cAAD,CAAe,CAAA,IACb,kBAAkB,cAAc,aAClC,oBAAC,qBAAD,CAAsB,CAAA,IACpB,kBAAkB,cAAc,kBAClC,oBAAC,2BAAD,CAA4B,CAAA,IAE5B,oBAAC,mBAAD,CAAoB,CAAA;CAOE,CAAA,GACtB,oBAAC,sBAAD;EAAsB,OAAO;EAC1B;CACmB,CAAA,CACtB,EAAA,CAAA;AAEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.mjs","names":[],"sources":["../../../../../../../src/components/Message/Message.tsx"],"sourcesContent":["import { type CSSProperties, type PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Message.module.scss\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { IconContextMenu } from \"@/components/Icon/components/icons\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport * as Aria from \"react-aria-components\";\n\nexport interface MessageProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps,\n PropsWithElementType<\"article\" | \"li\"> {\n /** Determines the color and orientation of the message. @default \"responder\" */\n type?: \"responder\" | \"sender\";\n /** A custom background color of the message as a CSS color value. */\n color?: string;\n}\n\n/** @flr-generate all */\nexport const Message = flowComponent(\"Message\", (props) => {\n const {\n type = \"responder\",\n children,\n className,\n color,\n elementType = \"article\",\n } = props;\n\n const Element = elementType;\n\n const rootClassName = clsx(styles.message, styles[type], className);\n\n const style: CSSProperties | undefined = color\n ? { \"--message-background\": color }\n : undefined;\n\n const formatter = useLocalizedStringFormatter(locales, \"Message\");\n\n const senderContext: PropsContext[\"Combine\"] = {\n wrapWith: <ClearPropsContext />,\n className: styles.user,\n Avatar: { Initials: { \"aria-hidden\": true } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n className: styles.content,\n children: dynamic((props) => {\n return (\n <>\n <div className={styles.tipBorder} aria-hidden />\n <div className={styles.tip} aria-hidden />\n {props.children}\n </>\n );\n }),\n },\n Header: {\n className: styles.header,\n Button: {\n className: styles.headerAction,\n size: \"s\",\n variant: \"plain\",\n color: \"secondary\",\n },\n ContextMenuTrigger: {\n Button: {\n className: styles.headerAction,\n size: \"s\",\n variant: \"plain\",\n color: \"secondary\",\n children: <IconContextMenu />,\n \"aria-label\": formatter.format(\"options\"),\n },\n },\n Text: { className: styles.date },\n Combine: senderContext,\n // Deprecated alias of Combine — keep it arranged the same way.\n Align: senderContext,\n children: dynamic((props) => (\n <>\n <Aria.VisuallyHidden>\n {formatter.format(\"headerLabel\")}\n </Aria.VisuallyHidden>\n {props.children}\n </>\n )),\n },\n\n Button: {\n size: \"s\",\n className: styles.action,\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n className: styles.actionGroup,\n Button: {\n className: styles.actionGroupAction,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName} style={style}>\n {children}\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Message;\n"],"mappings":";;;;;;;;;;;;;;;;AAmCA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EACJ,OAAO,aACP,UACA,WACA,OACA,cAAc,cACZ;CAEJ,MAAM,UAAU;CAEhB,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Message.mjs","names":["styles","locales","_Fragment"],"sources":["../../../../../../../src/components/Message/Message.tsx"],"sourcesContent":["import { type CSSProperties, type PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./Message.module.scss\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { IconContextMenu } from \"@/components/Icon/components/icons\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport * as Aria from \"react-aria-components\";\n\nexport interface MessageProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps,\n PropsWithElementType<\"article\" | \"li\"> {\n /** Determines the color and orientation of the message. @default \"responder\" */\n type?: \"responder\" | \"sender\";\n /** A custom background color of the message as a CSS color value. */\n color?: string;\n}\n\n/** @flr-generate all */\nexport const Message = flowComponent(\"Message\", (props) => {\n const {\n type = \"responder\",\n children,\n className,\n color,\n elementType = \"article\",\n } = props;\n\n const Element = elementType;\n\n const rootClassName = clsx(styles.message, styles[type], className);\n\n const style: CSSProperties | undefined = color\n ? { \"--message-background\": color }\n : undefined;\n\n const formatter = useLocalizedStringFormatter(locales, \"Message\");\n\n const senderContext: PropsContext[\"Combine\"] = {\n wrapWith: <ClearPropsContext />,\n className: styles.user,\n Avatar: { Initials: { \"aria-hidden\": true } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n className: styles.content,\n children: dynamic((props) => {\n return (\n <>\n <div className={styles.tipBorder} aria-hidden />\n <div className={styles.tip} aria-hidden />\n {props.children}\n </>\n );\n }),\n },\n Header: {\n className: styles.header,\n Button: {\n className: styles.headerAction,\n size: \"s\",\n variant: \"plain\",\n color: \"secondary\",\n },\n ContextMenuTrigger: {\n Button: {\n className: styles.headerAction,\n size: \"s\",\n variant: \"plain\",\n color: \"secondary\",\n children: <IconContextMenu />,\n \"aria-label\": formatter.format(\"options\"),\n },\n },\n Text: { className: styles.date },\n Combine: senderContext,\n // Deprecated alias of Combine — keep it arranged the same way.\n Align: senderContext,\n children: dynamic((props) => (\n <>\n <Aria.VisuallyHidden>\n {formatter.format(\"headerLabel\")}\n </Aria.VisuallyHidden>\n {props.children}\n </>\n )),\n },\n\n Button: {\n size: \"s\",\n className: styles.action,\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n className: styles.actionGroup,\n Button: {\n className: styles.actionGroupAction,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName} style={style}>\n {children}\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Message;\n"],"mappings":";;;;;;;;;;;;;;;;AAmCA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EACJ,OAAO,aACP,UACA,WACA,OACA,cAAc,cACZ;CAEJ,MAAM,UAAU;CAEhB,MAAM,gBAAgB,KAAKA,uBAAO,SAASA,uBAAO,OAAO,SAAS;CAElE,MAAM,QAAmC,QACrC,EAAE,wBAAwB,MAAM,IAChC,KAAA;CAEJ,MAAM,YAAY,4BAA4BC,kBAAS,SAAS;CAEhE,MAAM,gBAAyC;EAC7C,UAAU,oBAAC,mBAAD,CAAoB,CAAA;EAC9B,WAAWD,uBAAO;EAClB,QAAQ,EAAE,UAAU,EAAE,eAAe,KAAK,EAAE;CAC9C;CAEA,MAAM,eAA6B;EACjC,SAAS;GACP,WAAWA,uBAAO;GAClB,UAAU,SAAS,UAAU;IAC3B,OACE,qBAAAE,YAAA,EAAA,UAAA;KACE,oBAAC,OAAD;MAAK,WAAWF,uBAAO;MAAW,eAAA;KAAa,CAAA;KAC/C,oBAAC,OAAD;MAAK,WAAWA,uBAAO;MAAK,eAAA;KAAa,CAAA;KACxC,MAAM;IACP,EAAA,CAAA;GAEN,CAAC;EACH;EACA,QAAQ;GACN,WAAWA,uBAAO;GAClB,QAAQ;IACN,WAAWA,uBAAO;IAClB,MAAM;IACN,SAAS;IACT,OAAO;GACT;GACA,oBAAoB,EAClB,QAAQ;IACN,WAAWA,uBAAO;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU,oBAAC,iBAAD,CAAkB,CAAA;IAC5B,cAAc,UAAU,OAAO,SAAS;GAC1C,EACF;GACA,MAAM,EAAE,WAAWA,uBAAO,KAAK;GAC/B,SAAS;GAET,OAAO;GACP,UAAU,SAAS,UACjB,qBAAAE,YAAA,EAAA,UAAA,CACE,oBAAC,KAAK,gBAAN,EAAA,UACG,UAAU,OAAO,aAAa,EACZ,CAAA,GACpB,MAAM,QACP,EAAA,CAAA,CACH;EACH;EAEA,QAAQ;GACN,MAAM;GACN,WAAWF,uBAAO;EACpB;EACA,aAAa;GACX,eAAe;GACf,MAAM;GACN,WAAWA,uBAAO;GAClB,QAAQ,EACN,WAAWA,uBAAO,kBACpB;EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,SAAD;GAAS,WAAW;GAAsB;GACvC;EACM,CAAA;CACW,CAAA;AAE1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageThread.mjs","names":[],"sources":["../../../../../../../src/components/MessageThread/MessageThread.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./MessageThread.module.scss\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\nexport type MessageThreadProps = PropsWithChildren &\n PropsWithClassName &\n FlowComponentProps;\n\n/** @flr-generate all */\nexport const MessageThread = flowComponent(\"MessageThread\", (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.messageThread, className);\n\n const propsContext: PropsContext = {\n Message: {\n className: dynamic((props) => {\n return clsx(\n props.className,\n styles.message,\n styles[props.type ?? \"responder\"],\n );\n }),\n elementType: \"li\",\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <ul className={rootClassName}>{children}</ul>\n </PropsContextProvider>\n );\n});\n\nexport default MessageThread;\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,gBAAgB,cAAc,kBAAkB,UAAU;CACrE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MessageThread.mjs","names":["styles"],"sources":["../../../../../../../src/components/MessageThread/MessageThread.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./MessageThread.module.scss\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\nexport type MessageThreadProps = PropsWithChildren &\n PropsWithClassName &\n FlowComponentProps;\n\n/** @flr-generate all */\nexport const MessageThread = flowComponent(\"MessageThread\", (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.messageThread, className);\n\n const propsContext: PropsContext = {\n Message: {\n className: dynamic((props) => {\n return clsx(\n props.className,\n styles.message,\n styles[props.type ?? \"responder\"],\n );\n }),\n elementType: \"li\",\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <ul className={rootClassName}>{children}</ul>\n </PropsContextProvider>\n );\n});\n\nexport default MessageThread;\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,gBAAgB,cAAc,kBAAkB,UAAU;CACrE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAKA,6BAAO,eAAe,SAAS;CAE1D,MAAM,eAA6B,EACjC,SAAS;EACP,WAAW,SAAS,UAAU;GAC5B,OAAO,KACL,MAAM,WACNA,6BAAO,SACPA,6BAAO,MAAM,QAAQ,YACvB;EACF,CAAC;EACD,aAAa;CACf,EACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,oBAAC,MAAD;GAAI,WAAW;GAAgB;EAAa,CAAA;CACxB,CAAA;AAE1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageSeparator.mjs","names":[],"sources":["../../../../../../../../../src/components/MessageThread/components/MessageSeparator/MessageSeparator.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./MessageSeparator.module.scss\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport { Separator } from \"@/components/Separator\";\nimport { Content } from \"@/components/Content\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport locales from \"../../locales/*.locale.json\";\nimport * as Aria from \"react-aria-components\";\n\nexport interface MessageSeparatorProps\n extends PropsWithChildren, PropsWithClassName {}\n\n/** @flr-generate all */\nexport const MessageSeparator: FC<MessageSeparatorProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.messageSeparator, className);\n\n const formatter = useLocalizedStringFormatter(locales, \"MessageThread\");\n\n return (\n <li className={rootClassName}>\n <Separator className={styles.separator} />\n <Aria.VisuallyHidden>\n {formatter.format(\"separator.label\")}\n </Aria.VisuallyHidden>\n <Content className={styles.content}>{children}</Content>\n </li>\n );\n};\nexport default MessageSeparator;\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MessageSeparator.mjs","names":["styles","locales"],"sources":["../../../../../../../../../src/components/MessageThread/components/MessageSeparator/MessageSeparator.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./MessageSeparator.module.scss\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport { Separator } from \"@/components/Separator\";\nimport { Content } from \"@/components/Content\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport locales from \"../../locales/*.locale.json\";\nimport * as Aria from \"react-aria-components\";\n\nexport interface MessageSeparatorProps\n extends PropsWithChildren, PropsWithClassName {}\n\n/** @flr-generate all */\nexport const MessageSeparator: FC<MessageSeparatorProps> = (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.messageSeparator, className);\n\n const formatter = useLocalizedStringFormatter(locales, \"MessageThread\");\n\n return (\n <li className={rootClassName}>\n <Separator className={styles.separator} />\n <Aria.VisuallyHidden>\n {formatter.format(\"separator.label\")}\n </Aria.VisuallyHidden>\n <Content className={styles.content}>{children}</Content>\n </li>\n );\n};\nexport default MessageSeparator;\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,oBAA+C,UAAU;CACpE,MAAM,EAAE,UAAU,cAAc;CAEhC,MAAM,gBAAgB,KAAKA,gCAAO,kBAAkB,SAAS;CAE7D,MAAM,YAAY,4BAA4BC,kBAAS,eAAe;CAEtE,OACE,qBAAC,MAAD;EAAI,WAAW;EAAf,UAAA;GACE,oBAAC,WAAD,EAAW,WAAWD,gCAAO,UAAY,CAAA;GACzC,oBAAC,KAAK,gBAAN,EAAA,UACG,UAAU,OAAO,iBAAiB,EAChB,CAAA;GACrB,oBAAC,SAAD;IAAS,WAAWA,gCAAO;IAAU;GAAkB,CAAA;EACrD;;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","names":[],"sources":["../../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, Suspense, useId } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay, type OverlayProps } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport DivView from \"@/views/DivView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport { ConfirmUnsavedChangesModal } from \"@/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal\";\nimport Wrap from \"@/components/Wrap\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { useVirtualKeyboardVisible } from \"@/lib/hooks/dom/useVirtualKeyboardVisible\";\nimport locales from \"./locales/*.locale.json\";\n\ntype SupportedOverlayProps = Pick<\n OverlayProps,\n \"isOpen\" | \"isDefaultOpen\" | \"onOpen\" | \"onClose\" | \"onOpenChange\"\n>;\n\nexport interface ModalProps\n extends\n PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName,\n SupportedOverlayProps {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the close button should be visible */\n showCloseButton?: boolean;\n /**\n * Whether closing the modal must be confirmed – use it to protect unsaved\n * changes. `false` does not switch off the confirmation of a dirty `Form`\n * inside the modal; set `confirmModalCloseOnUnsavedChanges={false}` on the\n * `Form` for that.\n */\n confirmOnClose?: boolean;\n}\n\nexport const Modal = flowComponent(\"Modal\", (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n showCloseButton,\n ...overlayProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Modal\");\n\n // On mobile the header/footer are docked (sticky) while at rest, but flow\n // normally while the on-screen keyboard is open so the content gets the full\n // available space (see Modal.module.scss). #2423\n const keyboardVisible = useVirtualKeyboardVisible();\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n keyboardVisible && styles.keyboardVisible,\n className,\n );\n\n const generatedId = useId();\n\n const header = (children: ReactNode) => (\n <>\n <DivView className={styles.headerTitle}>{children}</DivView>\n <ClearPropsContext>\n <ClearPropsContextView>\n <Action closeModal={{ bypassConfirmation: true }}>\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n aria-label={stringFormatter.format(\"close\")}\n className={clsx(\n styles.closeButton,\n showCloseButton === true\n ? styles.alwaysVisible\n : showCloseButton === false\n ? styles.alwaysHidden\n : undefined,\n )}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </ClearPropsContextView>\n </ClearPropsContext>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: {\n Header: { Heading: { level: nestedHeadingLevel } },\n Heading: { level: nestedHeadingLevel },\n hideSeparator: true,\n },\n Header: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, backgroundColor: \"neutral\" },\n wrapWith: <ClearPropsContext />,\n },\n Heading: {\n className: styles.header,\n level: 2,\n children: dynamic((props) => header(props.children)),\n id: generatedId,\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n Action: {\n closeModal: dynamic((props) => {\n if (props.closeModal === undefined) {\n return;\n }\n if (props.closeModal === true) {\n return { bypassConfirmation: true };\n }\n return {\n bypassConfirmation: true,\n ...props.closeModal,\n };\n }),\n closeOverlay: dynamic((props) => {\n const { closeOverlay } = props;\n if (closeOverlay === undefined || closeOverlay === false) {\n return closeOverlay;\n }\n // `true` keeps its \"the nearest overlay\" meaning by leaving `overlay`\n // unset – the options object means the same thing.\n if (closeOverlay === true) {\n return { bypassConfirmation: true };\n }\n if (\n closeOverlay instanceof OverlayController ||\n typeof closeOverlay === \"string\"\n ) {\n return {\n bypassConfirmation: true,\n overlay: closeOverlay,\n };\n }\n return {\n bypassConfirmation: true,\n ...closeOverlay,\n };\n }),\n },\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n aria-labelledby={generatedId}\n {...overlayProps}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n <ConfirmUnsavedChangesModal />\n </Overlay>\n );\n});\n\nexport default Modal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,OAAO,KACP,WACA,YACA,UACA,KACA,WACA,uBAAuB,SACvB,iBACA,GAAG,iBACD;CAEJ,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Modal.mjs","names":["locales","styles","_Fragment"],"sources":["../../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, Suspense, useId } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay, type OverlayProps } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport DivView from \"@/views/DivView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport { ConfirmUnsavedChangesModal } from \"@/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal\";\nimport Wrap from \"@/components/Wrap\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { useVirtualKeyboardVisible } from \"@/lib/hooks/dom/useVirtualKeyboardVisible\";\nimport locales from \"./locales/*.locale.json\";\n\ntype SupportedOverlayProps = Pick<\n OverlayProps,\n \"isOpen\" | \"isDefaultOpen\" | \"onOpen\" | \"onClose\" | \"onOpenChange\"\n>;\n\nexport interface ModalProps\n extends\n PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName,\n SupportedOverlayProps {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the close button should be visible */\n showCloseButton?: boolean;\n /**\n * Whether closing the modal must be confirmed – use it to protect unsaved\n * changes. `false` does not switch off the confirmation of a dirty `Form`\n * inside the modal; set `confirmModalCloseOnUnsavedChanges={false}` on the\n * `Form` for that.\n */\n confirmOnClose?: boolean;\n}\n\nexport const Modal = flowComponent(\"Modal\", (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n showCloseButton,\n ...overlayProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Modal\");\n\n // On mobile the header/footer are docked (sticky) while at rest, but flow\n // normally while the on-screen keyboard is open so the content gets the full\n // available space (see Modal.module.scss). #2423\n const keyboardVisible = useVirtualKeyboardVisible();\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n keyboardVisible && styles.keyboardVisible,\n className,\n );\n\n const generatedId = useId();\n\n const header = (children: ReactNode) => (\n <>\n <DivView className={styles.headerTitle}>{children}</DivView>\n <ClearPropsContext>\n <ClearPropsContextView>\n <Action closeModal={{ bypassConfirmation: true }}>\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n aria-label={stringFormatter.format(\"close\")}\n className={clsx(\n styles.closeButton,\n showCloseButton === true\n ? styles.alwaysVisible\n : showCloseButton === false\n ? styles.alwaysHidden\n : undefined,\n )}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </ClearPropsContextView>\n </ClearPropsContext>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: {\n Header: { Heading: { level: nestedHeadingLevel } },\n Heading: { level: nestedHeadingLevel },\n hideSeparator: true,\n },\n Header: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, backgroundColor: \"neutral\" },\n wrapWith: <ClearPropsContext />,\n },\n Heading: {\n className: styles.header,\n level: 2,\n children: dynamic((props) => header(props.children)),\n id: generatedId,\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n Action: {\n closeModal: dynamic((props) => {\n if (props.closeModal === undefined) {\n return;\n }\n if (props.closeModal === true) {\n return { bypassConfirmation: true };\n }\n return {\n bypassConfirmation: true,\n ...props.closeModal,\n };\n }),\n closeOverlay: dynamic((props) => {\n const { closeOverlay } = props;\n if (closeOverlay === undefined || closeOverlay === false) {\n return closeOverlay;\n }\n // `true` keeps its \"the nearest overlay\" meaning by leaving `overlay`\n // unset – the options object means the same thing.\n if (closeOverlay === true) {\n return { bypassConfirmation: true };\n }\n if (\n closeOverlay instanceof OverlayController ||\n typeof closeOverlay === \"string\"\n ) {\n return {\n bypassConfirmation: true,\n overlay: closeOverlay,\n };\n }\n return {\n bypassConfirmation: true,\n ...closeOverlay,\n };\n }),\n },\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n aria-labelledby={generatedId}\n {...overlayProps}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n <ConfirmUnsavedChangesModal />\n </Overlay>\n );\n});\n\nexport default Modal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkEA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,OAAO,KACP,WACA,YACA,UACA,KACA,WACA,uBAAuB,SACvB,iBACA,GAAG,iBACD;CAEJ,MAAM,kBAAkB,4BAA4BA,kBAAS,OAAO;CAKpE,MAAM,kBAAkB,0BAA0B;CAElD,MAAM,gBAAgB,KACpB,YAAYC,qBAAO,YAAYA,qBAAO,OACtCA,qBAAO,QAAQ,SACf,yBAAyB,UAAUA,qBAAO,SAC1C,mBAAmBA,qBAAO,iBAC1B,SACF;CAEA,MAAM,cAAc,MAAM;CAE1B,MAAM,UAAU,aACd,qBAAAC,YAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EAAS,WAAWD,qBAAO;EAAc;CAAkB,CAAA,GAC3D,oBAAC,mBAAD,EAAA,UACE,oBAAC,uBAAD,EAAA,UACE,oBAAC,QAAD;EAAQ,YAAY,EAAE,oBAAoB,KAAK;EAC7C,UAAA,oBAAC,YAAD;GACE,SAAQ;GACR,OAAM;GACN,cAAY,gBAAgB,OAAO,OAAO;GAC1C,WAAW,KACTA,qBAAO,aACP,oBAAoB,OAChBA,qBAAO,gBACP,oBAAoB,QAClBA,qBAAO,eACP,KAAA,CACR;GAEA,UAAA,oBAAC,WAAD,CAAY,CAAA;EACF,CAAA;CACN,CAAA,EACa,CAAA,EACN,CAAA,CACnB,EAAA,CAAA;CAGJ,MAAM,qBAAqB;CAE3B,MAAM,qBAAmC;EACvC,SAAS,EAAE,OAAO,mBAAmB;EACrC,SAAS;GACP,QAAQ,EAAE,SAAS,EAAE,OAAO,mBAAmB,EAAE;GACjD,SAAS,EAAE,OAAO,mBAAmB;GACrC,eAAe;EACjB;EACA,QAAQ,EAAE,SAAS,EAAE,OAAO,mBAAmB,EAAE;CACnD;CAEA,MAAM,eAA6B;EACjC,SAAS;GACP,GAAG;GACH,WAAWA,qBAAO;EACpB;EACA,cAAc;GACZ,GAAG;GACH,GAAG,CAAC,GAAG,CAAC;GACR,GAAG,CAAC,CAAC;GACL,WAAWA,qBAAO;GAClB,WAAW;IAAE,WAAWA,qBAAO;IAAW,iBAAiB;GAAU;GACrE,UAAU,oBAAC,mBAAD,CAAoB,CAAA;EAChC;EACA,SAAS;GACP,WAAWA,qBAAO;GAClB,OAAO;GACP,UAAU,SAAS,UAAU,OAAO,MAAM,QAAQ,CAAC;GACnD,IAAI;EACN;EACA,aAAa;GACX,WAAWA,qBAAO;GAClB,SAAS;GACT,QAAQ;IACN,YAAY,SAAS,UAAU;KAC7B,IAAI,MAAM,eAAe,KAAA,GACvB;KAEF,IAAI,MAAM,eAAe,MACvB,OAAO,EAAE,oBAAoB,KAAK;KAEpC,OAAO;MACL,oBAAoB;MACpB,GAAG,MAAM;KACX;IACF,CAAC;IACD,cAAc,SAAS,UAAU;KAC/B,MAAM,EAAE,iBAAiB;KACzB,IAAI,iBAAiB,KAAA,KAAa,iBAAiB,OACjD,OAAO;KAIT,IAAI,iBAAiB,MACnB,OAAO,EAAE,oBAAoB,KAAK;KAEpC,IACE,wBAAwB,qBACxB,OAAO,iBAAiB,UAExB,OAAO;MACL,oBAAoB;MACpB,SAAS;KACX;KAEF,OAAO;MACL,oBAAoB;MACpB,GAAG;KACL;IACF,CAAC;GACH;EACF;CACF;CAEA,OACE,qBAAC,SAAD;EACE,WAAW;EACC;EACP;EACL,mBAAiB;EACjB,GAAI;EALN,UAAA,CAOE,oBAAC,sBAAD;GAAsB,OAAO;GAC3B,UAAA,oBAAC,MAAD;IAAM,IAAI;IACR,UAAA,oBAAC,UAAD;KAAU,UAAU,oBAAC,2BAAD,CAA4B,CAAA;KAC7C;IACO,CAAA;GACN,CAAA;EACc,CAAA,GACtB,oBAAC,4BAAD,CAA6B,CAAA,CACtB;;AAEb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmUnsavedChangesModal.mjs","names":[],"sources":["../../../../../../../../../src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.tsx"],"sourcesContent":["import ContentView from \"@/views/ContentView\";\nimport HeadingView from \"@/views/HeadingView\";\nimport type { FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport Modal from \"@/components/Modal/Modal\";\nimport TextView from \"@/views/TextView\";\nimport ActionGroupView from \"@/views/ActionGroupView\";\nimport Action from \"@/components/Action\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { useModalController } from \"@/lib/controller\";\n\n/**\n * Rendered by every `Modal` and only becomes active once something requires the\n * close to be confirmed – the `confirmOnClose` prop or a dirty `Form`.\n */\nexport const ConfirmUnsavedChangesModal: FC = () => {\n const stringFormatter = useLocalizedStringFormatter(locales, \"Modal\");\n const modalController = useModalController();\n const confirmOnCloseEnabled = modalController.useConfirmOnCloseEnabled();\n const closeConfirmationController =\n modalController.useConfirmationController();\n\n if (confirmOnCloseEnabled && closeConfirmationController) {\n const { controller, confirm, cancel } = closeConfirmationController;\n\n return (\n <Modal controller={controller}>\n <HeadingView>\n {stringFormatter.format(\"unsavedChangesConfirmationModal.heading\")}\n </HeadingView>\n <ContentView>\n <TextView>\n {stringFormatter.format(\"unsavedChangesConfirmationModal.text\")}\n </TextView>\n </ContentView>\n <ActionGroupView>\n <Action closeModal>\n <Action onAction={confirm}>\n <ButtonView color=\"danger\">\n {stringFormatter.format(\n \"unsavedChangesConfirmationModal.close\",\n )}\n </ButtonView>\n </Action>\n <Action onAction={cancel}>\n <ButtonView color=\"secondary\" variant=\"soft\">\n {stringFormatter.format(\n \"unsavedChangesConfirmationModal.keepOpen\",\n )}\n </ButtonView>\n </Action>\n </Action>\n </ActionGroupView>\n </Modal>\n );\n }\n};\n\nexport default ConfirmUnsavedChangesModal;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAa,mCAAuC;CAClD,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ConfirmUnsavedChangesModal.mjs","names":["locales"],"sources":["../../../../../../../../../src/components/Modal/components/ConfirmUnsavedChangesModal/ConfirmUnsavedChangesModal.tsx"],"sourcesContent":["import ContentView from \"@/views/ContentView\";\nimport HeadingView from \"@/views/HeadingView\";\nimport type { FC } from \"react\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport Modal from \"@/components/Modal/Modal\";\nimport TextView from \"@/views/TextView\";\nimport ActionGroupView from \"@/views/ActionGroupView\";\nimport Action from \"@/components/Action\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { useModalController } from \"@/lib/controller\";\n\n/**\n * Rendered by every `Modal` and only becomes active once something requires the\n * close to be confirmed – the `confirmOnClose` prop or a dirty `Form`.\n */\nexport const ConfirmUnsavedChangesModal: FC = () => {\n const stringFormatter = useLocalizedStringFormatter(locales, \"Modal\");\n const modalController = useModalController();\n const confirmOnCloseEnabled = modalController.useConfirmOnCloseEnabled();\n const closeConfirmationController =\n modalController.useConfirmationController();\n\n if (confirmOnCloseEnabled && closeConfirmationController) {\n const { controller, confirm, cancel } = closeConfirmationController;\n\n return (\n <Modal controller={controller}>\n <HeadingView>\n {stringFormatter.format(\"unsavedChangesConfirmationModal.heading\")}\n </HeadingView>\n <ContentView>\n <TextView>\n {stringFormatter.format(\"unsavedChangesConfirmationModal.text\")}\n </TextView>\n </ContentView>\n <ActionGroupView>\n <Action closeModal>\n <Action onAction={confirm}>\n <ButtonView color=\"danger\">\n {stringFormatter.format(\n \"unsavedChangesConfirmationModal.close\",\n )}\n </ButtonView>\n </Action>\n <Action onAction={cancel}>\n <ButtonView color=\"secondary\" variant=\"soft\">\n {stringFormatter.format(\n \"unsavedChangesConfirmationModal.keepOpen\",\n )}\n </ButtonView>\n </Action>\n </Action>\n </ActionGroupView>\n </Modal>\n );\n }\n};\n\nexport default ConfirmUnsavedChangesModal;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAa,mCAAuC;CAClD,MAAM,kBAAkB,4BAA4BA,kBAAS,OAAO;CACpE,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,wBAAwB,gBAAgB,yBAAyB;CACvE,MAAM,8BACJ,gBAAgB,0BAA0B;CAE5C,IAAI,yBAAyB,6BAA6B;EACxD,MAAM,EAAE,YAAY,SAAS,WAAW;EAExC,OACE,qBAAC,OAAD;GAAmB;GAAnB,UAAA;IACE,oBAAC,aAAD,EAAA,UACG,gBAAgB,OAAO,yCAAyC,EACtD,CAAA;IACb,oBAAC,aAAD,EAAA,UACE,oBAAC,UAAD,EAAA,UACG,gBAAgB,OAAO,sCAAsC,EACtD,CAAA,EACC,CAAA;IACb,oBAAC,iBAAD,EAAA,UACE,qBAAC,QAAD;KAAQ,YAAA;KAAR,UAAA,CACE,oBAAC,QAAD;MAAQ,UAAU;MAChB,UAAA,oBAAC,YAAD;OAAY,OAAM;OACf,UAAA,gBAAgB,OACf,uCACF;MACU,CAAA;KACN,CAAA,GACR,oBAAC,QAAD;MAAQ,UAAU;MAChB,UAAA,oBAAC,YAAD;OAAY,OAAM;OAAY,SAAQ;OACnC,UAAA,gBAAgB,OACf,0CACF;MACU,CAAA;KACN,CAAA,CACF;IACO,CAAA,EAAA,CAAA;GACZ;;CAEX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.mjs","names":[],"sources":["../../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren, ReactNode } from \"react\";\nimport { Children } from \"react\";\nimport styles from \"./Navigation.module.scss\";\nimport clsx from \"clsx\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\nimport { containsTextChild } from \"@/lib/react/remote\";\n\nexport interface NavigationProps\n extends\n PropsWithChildren<ComponentProps<\"nav\">>,\n PropsWithClassName,\n FlowComponentProps<HTMLElement> {}\n\n/**\n * A bare text node is an anonymous flex item that no rule can reach, so give\n * the label an element the item can truncate.\n */\nconst wrapTextInLabel = (children: ReactNode): ReactNode =>\n Children.map(children, (child) =>\n containsTextChild(child) ? <span>{child}</span> : child,\n );\n\n/** @flr-generate all */\nexport const Navigation = flowComponent(\"Navigation\", (props) => {\n const { className, children, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.navigation, className);\n\n const linkPropsContext: ComponentPropsContext<\"Link\"> = {\n wrapWith: <li />,\n className: styles.item,\n unstyled: true,\n children: dynamic((linkProps) => wrapTextInLabel(linkProps.children)),\n Icon: {\n className: styles.icon,\n size: \"m\",\n },\n Badge: { className: styles.badge },\n AlertBadge: { className: styles.badge },\n CounterBadge: { className: styles.badge },\n };\n\n return (\n <PropsContextProvider\n props={{\n Link: {\n ...linkPropsContext,\n tunnel: {\n id: \"links\",\n component: \"Navigation\",\n },\n },\n NavigationGroup: {\n Link: linkPropsContext,\n },\n }}\n >\n <nav className={rootClassName} role=\"navigation\" {...rest} ref={ref}>\n <LinkListTunnelExit id=\"links\" component=\"Navigation\" />\n {children}\n </nav>\n </PropsContextProvider>\n );\n});\n\nexport default Navigation;\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,IAAM,mBAAmB,aACvB,SAAS,IAAI,WAAW,UACtB,kBAAkB,KAAK,IAAI,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,IAAI,KACpD;;AAGF,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,WAAW,UAAU,KAAK,GAAG,SAAS;CAE9C,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Navigation.mjs","names":["styles"],"sources":["../../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren, ReactNode } from \"react\";\nimport { Children } from \"react\";\nimport styles from \"./Navigation.module.scss\";\nimport clsx from \"clsx\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\nimport { containsTextChild } from \"@/lib/react/remote\";\n\nexport interface NavigationProps\n extends\n PropsWithChildren<ComponentProps<\"nav\">>,\n PropsWithClassName,\n FlowComponentProps<HTMLElement> {}\n\n/**\n * A bare text node is an anonymous flex item that no rule can reach, so give\n * the label an element the item can truncate.\n */\nconst wrapTextInLabel = (children: ReactNode): ReactNode =>\n Children.map(children, (child) =>\n containsTextChild(child) ? <span>{child}</span> : child,\n );\n\n/** @flr-generate all */\nexport const Navigation = flowComponent(\"Navigation\", (props) => {\n const { className, children, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.navigation, className);\n\n const linkPropsContext: ComponentPropsContext<\"Link\"> = {\n wrapWith: <li />,\n className: styles.item,\n unstyled: true,\n children: dynamic((linkProps) => wrapTextInLabel(linkProps.children)),\n Icon: {\n className: styles.icon,\n size: \"m\",\n },\n Badge: { className: styles.badge },\n AlertBadge: { className: styles.badge },\n CounterBadge: { className: styles.badge },\n };\n\n return (\n <PropsContextProvider\n props={{\n Link: {\n ...linkPropsContext,\n tunnel: {\n id: \"links\",\n component: \"Navigation\",\n },\n },\n NavigationGroup: {\n Link: linkPropsContext,\n },\n }}\n >\n <nav className={rootClassName} role=\"navigation\" {...rest} ref={ref}>\n <LinkListTunnelExit id=\"links\" component=\"Navigation\" />\n {children}\n </nav>\n </PropsContextProvider>\n );\n});\n\nexport default Navigation;\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,IAAM,mBAAmB,aACvB,SAAS,IAAI,WAAW,UACtB,kBAAkB,KAAK,IAAI,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,IAAI,KACpD;;AAGF,IAAa,aAAa,cAAc,eAAe,UAAU;CAC/D,MAAM,EAAE,WAAW,UAAU,KAAK,GAAG,SAAS;CAE9C,MAAM,gBAAgB,KAAKA,0BAAO,YAAY,SAAS;CAEvD,MAAM,mBAAkD;EACtD,UAAU,oBAAC,MAAD,CAAK,CAAA;EACf,WAAWA,0BAAO;EAClB,UAAU;EACV,UAAU,SAAS,cAAc,gBAAgB,UAAU,QAAQ,CAAC;EACpE,MAAM;GACJ,WAAWA,0BAAO;GAClB,MAAM;EACR;EACA,OAAO,EAAE,WAAWA,0BAAO,MAAM;EACjC,YAAY,EAAE,WAAWA,0BAAO,MAAM;EACtC,cAAc,EAAE,WAAWA,0BAAO,MAAM;CAC1C;CAEA,OACE,oBAAC,sBAAD;EACE,OAAO;GACL,MAAM;IACJ,GAAG;IACH,QAAQ;KACN,IAAI;KACJ,WAAW;IACb;GACF;GACA,iBAAiB,EACf,MAAM,iBACR;EACF;EAEA,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAe,MAAK;GAAa,GAAI;GAAW;GAAhE,UAAA,CACE,oBAAC,oBAAD;IAAoB,IAAG;IAAQ,WAAU;GAAc,CAAA,GACtD,QACE;;CACe,CAAA;AAE1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListTunnelExit.mjs","names":[],"sources":["../../../../../../../../../src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.tsx"],"sourcesContent":["import { Children } from \"react\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport styles from \"../../Navigation.module.scss\";\n\nexport const LinkListTunnelExit: typeof UiComponentTunnelExit = (props) => {\n return (\n <UiComponentTunnelExit\n {...props}\n children={(children) => {\n if (Children.count(children) >= 1) {\n return <ul className={styles.linkList}>{children}</ul>;\n }\n\n return null;\n }}\n />\n );\n};\n"],"mappings":";;;;;;;AAIA,IAAa,sBAAoD,UAAU;CACzE,OACE,oBAAC,uBAAD;EACE,GAAI;EACJ,WAAW,aAAa;GACtB,IAAI,SAAS,MAAM,QAAQ,KAAK,GAC9B,OAAO,oBAAC,MAAD;IAAI,
|
|
1
|
+
{"version":3,"file":"LinkListTunnelExit.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit.tsx"],"sourcesContent":["import { Children } from \"react\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport styles from \"../../Navigation.module.scss\";\n\nexport const LinkListTunnelExit: typeof UiComponentTunnelExit = (props) => {\n return (\n <UiComponentTunnelExit\n {...props}\n children={(children) => {\n if (Children.count(children) >= 1) {\n return <ul className={styles.linkList}>{children}</ul>;\n }\n\n return null;\n }}\n />\n );\n};\n"],"mappings":";;;;;;;AAIA,IAAa,sBAAoD,UAAU;CACzE,OACE,oBAAC,uBAAD;EACE,GAAI;EACJ,WAAW,aAAa;GACtB,IAAI,SAAS,MAAM,QAAQ,KAAK,GAC9B,OAAO,oBAAC,MAAD;IAAI,WAAWA,0BAAO;IAAW;GAAa,CAAA;GAGvD,OAAO;EACT;CACD,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationGroup.mjs","names":[],"sources":["../../../../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"sourcesContent":["import { type ComponentProps, type PropsWithChildren } from \"react\";\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./NavigationGroup.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Accordion } from \"@/components/Accordion\";\nimport { Content } from \"@/components/Content\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\n\nexport interface NavigationGroupProps\n extends\n PropsWithChildren<ComponentProps<\"section\">>,\n FlowComponentProps<HTMLElement> {\n collapsable?: boolean;\n /**\n * Whether a `collapsable` group is initially expanded.\n *\n * @default true\n */\n defaultExpanded?: boolean;\n}\n\n/** @flr-generate all */\nexport const NavigationGroup = flowComponent(\"NavigationGroup\", (props) => {\n const {\n children,\n className,\n collapsable,\n defaultExpanded = true,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.navigationGroup,\n collapsable && styles.collapsable,\n className,\n );\n\n const generatedId = useId();\n\n const propsContext: PropsContext = {\n Label: {\n id: ariaLabel ? undefined : generatedId,\n className: styles.label,\n },\n Link: {\n tunnel: {\n id: \"groupLinks\",\n component: \"NavigationGroup\",\n },\n },\n };\n\n const collapsableUi = (\n <Accordion defaultExpanded={defaultExpanded} className={rootClassName}>\n {children}\n <Content>\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </Content>\n </Accordion>\n );\n\n const defaultUi = (\n <section\n aria-labelledby={ariaLabel ? undefined : generatedId}\n aria-label={ariaLabel}\n className={rootClassName}\n {...rest}\n >\n {children}\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </section>\n );\n\n return (\n <PropsContextProvider props={propsContext} dependencies={[generatedId]}>\n {collapsable ? collapsableUi : defaultUi}\n </PropsContextProvider>\n );\n});\n\nexport default NavigationGroup;\n"],"mappings":";;;;;;;;;;;;;AA2BA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CACzE,MAAM,EACJ,UACA,WACA,aACA,kBAAkB,MAClB,cAAc,WACd,GAAG,SACD;CAEJ,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NavigationGroup.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"sourcesContent":["import { type ComponentProps, type PropsWithChildren } from \"react\";\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./NavigationGroup.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Accordion } from \"@/components/Accordion\";\nimport { Content } from \"@/components/Content\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\n\nexport interface NavigationGroupProps\n extends\n PropsWithChildren<ComponentProps<\"section\">>,\n FlowComponentProps<HTMLElement> {\n collapsable?: boolean;\n /**\n * Whether a `collapsable` group is initially expanded.\n *\n * @default true\n */\n defaultExpanded?: boolean;\n}\n\n/** @flr-generate all */\nexport const NavigationGroup = flowComponent(\"NavigationGroup\", (props) => {\n const {\n children,\n className,\n collapsable,\n defaultExpanded = true,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.navigationGroup,\n collapsable && styles.collapsable,\n className,\n );\n\n const generatedId = useId();\n\n const propsContext: PropsContext = {\n Label: {\n id: ariaLabel ? undefined : generatedId,\n className: styles.label,\n },\n Link: {\n tunnel: {\n id: \"groupLinks\",\n component: \"NavigationGroup\",\n },\n },\n };\n\n const collapsableUi = (\n <Accordion defaultExpanded={defaultExpanded} className={rootClassName}>\n {children}\n <Content>\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </Content>\n </Accordion>\n );\n\n const defaultUi = (\n <section\n aria-labelledby={ariaLabel ? undefined : generatedId}\n aria-label={ariaLabel}\n className={rootClassName}\n {...rest}\n >\n {children}\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </section>\n );\n\n return (\n <PropsContextProvider props={propsContext} dependencies={[generatedId]}>\n {collapsable ? collapsableUi : defaultUi}\n </PropsContextProvider>\n );\n});\n\nexport default NavigationGroup;\n"],"mappings":";;;;;;;;;;;;;AA2BA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CACzE,MAAM,EACJ,UACA,WACA,aACA,kBAAkB,MAClB,cAAc,WACd,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpBA,+BAAO,iBACP,eAAeA,+BAAO,aACtB,SACF;CAEA,MAAM,cAAc,MAAM;CAE1B,MAAM,eAA6B;EACjC,OAAO;GACL,IAAI,YAAY,KAAA,IAAY;GAC5B,WAAWA,+BAAO;EACpB;EACA,MAAM,EACJ,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;CACF;CAEA,MAAM,gBACJ,qBAAC,WAAD;EAA4B;EAAiB,WAAW;EAAxD,UAAA,CACG,UACD,oBAAC,SAAD,EAAA,UACE,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,EAC1D,CAAA,CACA;;CAGb,MAAM,YACJ,qBAAC,WAAD;EACE,mBAAiB,YAAY,KAAA,IAAY;EACzC,cAAY;EACZ,WAAW;EACX,GAAI;EAJN,UAAA,CAMG,UACD,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,CAC1D;;CAGX,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAAc,cAAc,CAAC,WAAW;EAClE,UAAA,cAAc,gBAAgB;CACX,CAAA;AAE1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.mjs","names":[],"sources":["../../../../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { Link } from \"@/components/Link\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport styles from \"./Notification.module.scss\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\n\nexport interface NotificationProps\n extends PropsWithChildren<ComponentProps<\"div\">>, PropsWithStatus {\n /** A link that is triggered when clicking the notification. */\n href?: string;\n /** Whether the notification should disappear automatically after some time. */\n autoClose?: boolean;\n /** Handler that is called when the notification is clicked. */\n onClick?: () => void;\n /**\n * Handler that is called when the close button of the notification is\n * clicked.\n */\n onClose?: () => void;\n}\n\n/** @flr-generate all */\nexport const Notification: FC<NotificationProps> = (props) => {\n const {\n children,\n className,\n status = \"info\",\n role = \"alert\",\n href,\n onClick,\n onClose,\n autoClose: ignoredAutoClose,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.notification,\n styles[status],\n (onClick || onClose || href) && styles.hasLink,\n className,\n );\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 4,\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Text: {\n className: styles.text,\n },\n };\n\n const closeButton = onClose && (\n <Button\n size=\"s\"\n className={styles.close}\n variant=\"plain\"\n color=\"secondary\"\n onPress={onClose}\n aria-label={stringFormatter.format(\"notification.close\")}\n >\n <IconClose />\n </Button>\n );\n\n return (\n <div\n {...rest}\n className={rootClassName}\n role={role}\n // See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useInteractOutside.ts#L126C31-L126C58\n data-react-aria-top-layer\n >\n <Link unstyled href={href} className={styles.link} onPress={onClick}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Link>\n {closeButton}\n </div>\n );\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,IAAa,gBAAuC,UAAU;CAC5D,MAAM,EACJ,UACA,WACA,SAAS,QACT,OAAO,SACP,MACA,SACA,SACA,WAAW,kBACX,GAAG,SACD;CAEJ,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Notification.mjs","names":["styles","locales","_Fragment"],"sources":["../../../../../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport { Link } from \"@/components/Link\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport styles from \"./Notification.module.scss\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\n\nexport interface NotificationProps\n extends PropsWithChildren<ComponentProps<\"div\">>, PropsWithStatus {\n /** A link that is triggered when clicking the notification. */\n href?: string;\n /** Whether the notification should disappear automatically after some time. */\n autoClose?: boolean;\n /** Handler that is called when the notification is clicked. */\n onClick?: () => void;\n /**\n * Handler that is called when the close button of the notification is\n * clicked.\n */\n onClose?: () => void;\n}\n\n/** @flr-generate all */\nexport const Notification: FC<NotificationProps> = (props) => {\n const {\n children,\n className,\n status = \"info\",\n role = \"alert\",\n href,\n onClick,\n onClose,\n autoClose: ignoredAutoClose,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.notification,\n styles[status],\n (onClick || onClose || href) && styles.hasLink,\n className,\n );\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 4,\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Text: {\n className: styles.text,\n },\n };\n\n const closeButton = onClose && (\n <Button\n size=\"s\"\n className={styles.close}\n variant=\"plain\"\n color=\"secondary\"\n onPress={onClose}\n aria-label={stringFormatter.format(\"notification.close\")}\n >\n <IconClose />\n </Button>\n );\n\n return (\n <div\n {...rest}\n className={rootClassName}\n role={role}\n // See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useInteractOutside.ts#L126C31-L126C58\n data-react-aria-top-layer\n >\n <Link unstyled href={href} className={styles.link} onPress={onClick}>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Link>\n {closeButton}\n </div>\n );\n};\n\nexport default Notification;\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,IAAa,gBAAuC,UAAU;CAC5D,MAAM,EACJ,UACA,WACA,SAAS,QACT,OAAO,SACP,MACA,SACA,SACA,WAAW,kBACX,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpBA,4BAAO,cACPA,4BAAO,UACN,WAAW,WAAW,SAASA,4BAAO,SACvC,SACF;CAEA,MAAM,kBAAkB,4BAA4BC,gBAAO;CAE3D,MAAM,eAA6B;EACjC,SAAS;GACP,WAAWD,4BAAO;GAClB,OAAO;GACP,UAAU,SAAS,UACjB,qBAAAE,UAAA,EAAA,UAAA,CACE,oBAAC,WAAD;IAAmB;IAAQ,WAAWF,4BAAO;GAAO,CAAA,GACnD,MAAM,QACP,EAAA,CAAA,CACH;EACH;EACA,MAAM,EACJ,WAAWA,4BAAO,KACpB;CACF;CAEA,MAAM,cAAc,WAClB,oBAAC,QAAD;EACE,MAAK;EACL,WAAWA,4BAAO;EAClB,SAAQ;EACR,OAAM;EACN,SAAS;EACT,cAAY,gBAAgB,OAAO,oBAAoB;EAEvD,UAAA,oBAAC,WAAD,CAAY,CAAA;CACN,CAAA;CAGV,OACE,qBAAC,OAAD;EACE,GAAI;EACJ,WAAW;EACL;EAEN,6BAAA;EALF,UAAA,CAOE,oBAAC,MAAD;GAAM,UAAA;GAAe;GAAM,WAAWA,4BAAO;GAAM,SAAS;GAC1D,UAAA,oBAAC,sBAAD;IAAsB,OAAO;IAC1B;GACmB,CAAA;EAClB,CAAA,GACL,WACE;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationContainer.mjs","names":[],"sources":["../../../../../../../../src/components/NotificationProvider/NotificationContainer/NotificationContainer.tsx"],"sourcesContent":["import type { ComponentProps, FC } from \"react\";\nimport { Suspense } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport clsx from \"clsx\";\nimport styles from \"./NotificationContainer.module.scss\";\nimport ControlledNotification from \"@/components/NotificationProvider/ControlledNotification\";\nimport {\n AnimatePresence,\n domAnimation,\n LazyMotion,\n m,\n MotionConfig,\n} from \"framer-motion\";\nimport { useIsSSR } from \"react-aria\";\nimport { useNotificationController } from \"@/components/NotificationProvider/NotificationProvider\";\n\nexport type NotificationsContainerProps = ComponentProps<\"div\">;\n\nexport const NotificationContainer: FC<NotificationsContainerProps> = (\n props,\n) => {\n const { className, ...rest } = props;\n\n const controller = useNotificationController();\n const notifications = controller.useNotifications();\n const isSsr = useIsSSR();\n\n const rootClassName = clsx(styles.notificationContainer, className);\n\n const content = (\n <MotionConfig reducedMotion=\"user\">\n <LazyMotion features={domAnimation}>\n <div className={rootClassName} {...rest} data-react-aria-top-layer>\n <AnimatePresence>\n {notifications.map((n) => (\n <m.div\n className={styles.notification}\n key={n.meta.id}\n initial={{ opacity: 0, x: 200 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 200, height: 0, paddingBottom: 0 }}\n transition={{\n bounce: 0,\n }}\n >\n <Suspense>\n <ControlledNotification\n notification={n}\n controller={controller}\n />\n </Suspense>\n </m.div>\n ))}\n </AnimatePresence>\n </div>\n </LazyMotion>\n </MotionConfig>\n );\n\n return isSsr ? null : ReactDOM.createPortal(content, document.body);\n};\n\nexport default NotificationContainer;\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAa,yBACX,UACG;CACH,MAAM,EAAE,WAAW,GAAG,SAAS;CAE/B,MAAM,aAAa,0BAA0B;CAC7C,MAAM,gBAAgB,WAAW,iBAAiB;CAClD,MAAM,QAAQ,SAAS;CAEvB,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NotificationContainer.mjs","names":["styles"],"sources":["../../../../../../../../src/components/NotificationProvider/NotificationContainer/NotificationContainer.tsx"],"sourcesContent":["import type { ComponentProps, FC } from \"react\";\nimport { Suspense } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport clsx from \"clsx\";\nimport styles from \"./NotificationContainer.module.scss\";\nimport ControlledNotification from \"@/components/NotificationProvider/ControlledNotification\";\nimport {\n AnimatePresence,\n domAnimation,\n LazyMotion,\n m,\n MotionConfig,\n} from \"framer-motion\";\nimport { useIsSSR } from \"react-aria\";\nimport { useNotificationController } from \"@/components/NotificationProvider/NotificationProvider\";\n\nexport type NotificationsContainerProps = ComponentProps<\"div\">;\n\nexport const NotificationContainer: FC<NotificationsContainerProps> = (\n props,\n) => {\n const { className, ...rest } = props;\n\n const controller = useNotificationController();\n const notifications = controller.useNotifications();\n const isSsr = useIsSSR();\n\n const rootClassName = clsx(styles.notificationContainer, className);\n\n const content = (\n <MotionConfig reducedMotion=\"user\">\n <LazyMotion features={domAnimation}>\n <div className={rootClassName} {...rest} data-react-aria-top-layer>\n <AnimatePresence>\n {notifications.map((n) => (\n <m.div\n className={styles.notification}\n key={n.meta.id}\n initial={{ opacity: 0, x: 200 }}\n animate={{ opacity: 1, x: 0 }}\n exit={{ opacity: 0, x: 200, height: 0, paddingBottom: 0 }}\n transition={{\n bounce: 0,\n }}\n >\n <Suspense>\n <ControlledNotification\n notification={n}\n controller={controller}\n />\n </Suspense>\n </m.div>\n ))}\n </AnimatePresence>\n </div>\n </LazyMotion>\n </MotionConfig>\n );\n\n return isSsr ? null : ReactDOM.createPortal(content, document.body);\n};\n\nexport default NotificationContainer;\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAa,yBACX,UACG;CACH,MAAM,EAAE,WAAW,GAAG,SAAS;CAE/B,MAAM,aAAa,0BAA0B;CAC7C,MAAM,gBAAgB,WAAW,iBAAiB;CAClD,MAAM,QAAQ,SAAS;CAEvB,MAAM,gBAAgB,KAAKA,qCAAO,uBAAuB,SAAS;CAElE,MAAM,UACJ,oBAAC,cAAD;EAAc,eAAc;EAC1B,UAAA,oBAAC,YAAD;GAAY,UAAU;GACpB,UAAA,oBAAC,OAAD;IAAK,WAAW;IAAe,GAAI;IAAM,6BAAA;IACvC,UAAA,oBAAC,iBAAD,EAAA,UACG,cAAc,KAAK,MAClB,oBAAC,EAAE,KAAH;KACE,WAAWA,qCAAO;KAElB,SAAS;MAAE,SAAS;MAAG,GAAG;KAAI;KAC9B,SAAS;MAAE,SAAS;MAAG,GAAG;KAAE;KAC5B,MAAM;MAAE,SAAS;MAAG,GAAG;MAAK,QAAQ;MAAG,eAAe;KAAE;KACxD,YAAY,EACV,QAAQ,EACV;KAEA,UAAA,oBAAC,UAAD,EAAA,UACE,oBAAC,wBAAD;MACE,cAAc;MACF;KACb,CAAA,EACO,CAAA;IACL,GAdA,EAAE,KAAK,EAcP,CACR,EACc,CAAA;GACd,CAAA;EACK,CAAA;CACA,CAAA;CAGhB,OAAO,QAAQ,OAAO,SAAS,aAAa,SAAS,SAAS,IAAI;AACpE"}
|
|
@@ -19,12 +19,13 @@ import * as Aria from "react-aria-components";
|
|
|
19
19
|
/** @flr-generate all */
|
|
20
20
|
var NumberField = flowComponent("NumberField", (props) => {
|
|
21
21
|
const { children, className, isWheelDisabled = true, ref, ...rest } = useControlledHostValueProps(props, NaN);
|
|
22
|
-
const { FieldErrorView, FieldErrorCaptureContext,
|
|
22
|
+
const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext } = useFieldComponent(props, "NumberField");
|
|
23
23
|
const rootClassName = clsx(FormField_module_default.formField, className);
|
|
24
24
|
return /* @__PURE__ */ jsxs(Aria.NumberField, {
|
|
25
25
|
...rest,
|
|
26
26
|
isWheelDisabled,
|
|
27
|
-
|
|
27
|
+
"aria-describedby": controlProps["aria-describedby"],
|
|
28
|
+
className: clsx(rootClassName, wrapperProps.className),
|
|
28
29
|
children: [/* @__PURE__ */ jsxs(PropsContextProvider, {
|
|
29
30
|
props: fieldPropsContext,
|
|
30
31
|
children: [/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children }), /* @__PURE__ */ jsx(FieldErrorView, {})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.mjs","names":[],"sources":["../../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface NumberFieldProps\n extends\n PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n // `NaN` is what react-aria's number field state uses for \"no number\"\n const {\n children,\n className,\n isWheelDisabled = true,\n ref,\n ...rest\n } = useControlledHostValueProps(props, NaN);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n
|
|
1
|
+
{"version":3,"file":"NumberField.mjs","names":["formFieldStyles","styles"],"sources":["../../../../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport styles from \"./NumberField.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport {\n IconChevronDown,\n IconChevronUp,\n IconMinus,\n IconPlus,\n} from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\n\nexport interface NumberFieldProps\n extends\n PropsWithChildren<Omit<Aria.NumberFieldProps, \"children\">>,\n FlowComponentProps<HTMLInputElement> {}\n\n/** @flr-generate all */\nexport const NumberField = flowComponent(\"NumberField\", (props) => {\n // `NaN` is what react-aria's number field state uses for \"no number\"\n const {\n children,\n className,\n isWheelDisabled = true,\n ref,\n ...rest\n } = useControlledHostValueProps(props, NaN);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n wrapperProps,\n controlProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"NumberField\");\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n return (\n <Aria.NumberField\n {...rest}\n isWheelDisabled={isWheelDisabled}\n aria-describedby={controlProps[\"aria-describedby\"]}\n className={clsx(rootClassName, wrapperProps.className)}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n <Aria.Group className={styles.group}>\n <Button\n ariaSlot=\"decrement\"\n className={styles.decrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronDown />\n <IconMinus className={styles.coarsePointerIcon} />\n </Button>\n <Aria.Input className={styles.input} ref={ref} />\n <Button\n ariaSlot=\"increment\"\n className={styles.incrementButton}\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n >\n <IconChevronUp />\n <IconPlus className={styles.coarsePointerIcon} />\n </Button>\n </Aria.Group>\n </Aria.NumberField>\n );\n});\n\nexport default NumberField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAa,cAAc,cAAc,gBAAgB,UAAU;CAEjE,MAAM,EACJ,UACA,WACA,kBAAkB,MAClB,KACA,GAAG,SACD,4BAA4B,OAAO,GAAG;CAE1C,MAAM,EACJ,gBACA,0BACA,cACA,cACA,sBACE,kBAAkB,OAAO,aAAa;CAE1C,MAAM,gBAAgB,KAAKA,yBAAgB,WAAW,SAAS;CAE/D,OACE,qBAAC,KAAK,aAAN;EACE,GAAI;EACa;EACjB,oBAAkB,aAAa;EAC/B,WAAW,KAAK,eAAe,aAAa,SAAS;EAJvD,UAAA,CAME,qBAAC,sBAAD;GAAsB,OAAO;GAA7B,UAAA,CACE,oBAAC,0BAAD,EAA2B,SAAmC,CAAA,GAC9D,oBAAC,gBAAD,CAAiB,CAAA,CACG;EACtB,CAAA,GAAA,qBAAC,KAAK,OAAN;GAAY,WAAWC,2BAAO;GAA9B,UAAA;IACE,qBAAC,QAAD;KACE,UAAS;KACT,WAAWA,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,iBAAD,CAAkB,CAAA,GAClB,oBAAC,WAAD,EAAW,WAAWA,2BAAO,kBAAoB,CAAA,CAC3C;;IACR,oBAAC,KAAK,OAAN;KAAY,WAAWA,2BAAO;KAAY;IAAM,CAAA;IAChD,qBAAC,QAAD;KACE,UAAS;KACT,WAAWA,2BAAO;KAClB,MAAK;KACL,SAAQ;KACR,OAAM;KALR,UAAA,CAOE,oBAAC,eAAD,CAAgB,CAAA,GAChB,oBAAC,UAAD,EAAU,WAAWA,2BAAO,kBAAoB,CAAA,CAC1C;;GACE;EACI,CAAA,CAAA;;AAEtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.mjs","names":[],"sources":["../../../../../../../src/components/Option/Option.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport { Children, useEffect, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Option.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { extractTextFromChildren } from \"@/lib/react/remote\";\nimport { IconCheck } from \"@/components/Icon/components/icons\";\n\nexport interface OptionProps\n extends\n Omit<Aria.ListBoxItemProps, \"children\" | \"value\" | \"id\">,\n PropsWithChildren,\n FlowComponentProps {\n /**\n * The value this option contributes to the field's selection, and the key\n * `defaultValue` / `value` of the surrounding field target.\n *\n * Defaults to `textValue`, which itself defaults to the text among the\n * option's children — element children such as a `Badge` do not contribute,\n * so `<Option>Millennium Falcon <Badge>Latest</Badge></Option>` is\n * `\"Millennium Falcon\"`. Pass it explicitly when the value must not follow\n * the display text, or when the children carry no text at all.\n */\n value?: string | number;\n}\n\n/**\n * The key an option contributes to its collection: an explicit `value`, else\n * the `textValue`, else the text among the children. Shared with the props\n * context that routes options through a field's tunnel, so both derive the same\n * identity for one option.\n */\nexport const getOptionValue = (\n props: Pick<OptionProps, \"value\" | \"textValue\" | \"children\">,\n): string | number | undefined =>\n props.value ?? props.textValue ?? extractTextFromChildren(props.children);\n\n/** @flr-generate all */\nexport const Option = flowComponent(\"Option\", (props) => {\n const {\n className,\n children,\n textValue = extractTextFromChildren(children),\n // Derived through `getOptionValue` below; destructured only to keep it out\n // of the props spread onto the react-aria item.\n value: valueIgnored,\n ref,\n ...rest\n } = props;\n\n const value = getOptionValue(props);\n\n useWarnMissingValue(value === undefined);\n\n const rootClassName = clsx(styles.option, className);\n const hasChildren = Children.count(children) >= 1;\n\n return (\n <Aria.ListBoxItem\n className={rootClassName}\n ref={ref}\n id={value}\n {...rest}\n textValue={textValue}\n >\n <span className={styles.content}>\n {hasChildren ? children : textValue}\n </span>\n <IconCheck aria-hidden className={styles.checkMark} />\n </Aria.ListBoxItem>\n );\n});\n\n/*\n * Without an `id`, react-aria gives the item a key off a render-order counter\n * (`react-aria-1`). That key is what the field reports as its selected value\n * and what `defaultValue` has to match, so an option without a `value` silently\n * submits a meaningless string and cannot be preselected — and the key shifts\n * when unrelated markup around it changes. react-aria warns about the missing\n * `textValue` in this situation but says nothing about the key, which is the\n * expensive half (#3028).\n *\n * Warn in an effect rather than during render, so a double render in StrictMode\n * does not log twice; the ref keeps it to once per option.\n */\nconst useWarnMissingValue = (isMissing: boolean): void => {\n const hasWarned = useRef(false);\n\n useEffect(() => {\n if (!isMissing || hasWarned.current) {\n return;\n }\n\n hasWarned.current = true;\n console.error(\n \"An <Option> has no 'value' and none could be inferred from its children, so it falls back to a generated, render-order-dependent key. Pass a 'value' to give the option a stable key.\",\n );\n }, [isMissing]);\n};\n\nexport default Option;\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAa,kBACX,UAEA,MAAM,SAAS,MAAM,aAAa,wBAAwB,MAAM,QAAQ;;AAG1E,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EACJ,WACA,UACA,YAAY,wBAAwB,QAAQ,GAG5C,OAAO,cACP,KACA,GAAG,SACD;CAEJ,MAAM,QAAQ,eAAe,KAAK;CAElC,oBAAoB,UAAU,KAAA,CAAS;CAEvC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Option.mjs","names":["styles"],"sources":["../../../../../../../src/components/Option/Option.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport { Children, useEffect, useRef } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Option.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { extractTextFromChildren } from \"@/lib/react/remote\";\nimport { IconCheck } from \"@/components/Icon/components/icons\";\n\nexport interface OptionProps\n extends\n Omit<Aria.ListBoxItemProps, \"children\" | \"value\" | \"id\">,\n PropsWithChildren,\n FlowComponentProps {\n /**\n * The value this option contributes to the field's selection, and the key\n * `defaultValue` / `value` of the surrounding field target.\n *\n * Defaults to `textValue`, which itself defaults to the text among the\n * option's children — element children such as a `Badge` do not contribute,\n * so `<Option>Millennium Falcon <Badge>Latest</Badge></Option>` is\n * `\"Millennium Falcon\"`. Pass it explicitly when the value must not follow\n * the display text, or when the children carry no text at all.\n */\n value?: string | number;\n}\n\n/**\n * The key an option contributes to its collection: an explicit `value`, else\n * the `textValue`, else the text among the children. Shared with the props\n * context that routes options through a field's tunnel, so both derive the same\n * identity for one option.\n */\nexport const getOptionValue = (\n props: Pick<OptionProps, \"value\" | \"textValue\" | \"children\">,\n): string | number | undefined =>\n props.value ?? props.textValue ?? extractTextFromChildren(props.children);\n\n/** @flr-generate all */\nexport const Option = flowComponent(\"Option\", (props) => {\n const {\n className,\n children,\n textValue = extractTextFromChildren(children),\n // Derived through `getOptionValue` below; destructured only to keep it out\n // of the props spread onto the react-aria item.\n value: valueIgnored,\n ref,\n ...rest\n } = props;\n\n const value = getOptionValue(props);\n\n useWarnMissingValue(value === undefined);\n\n const rootClassName = clsx(styles.option, className);\n const hasChildren = Children.count(children) >= 1;\n\n return (\n <Aria.ListBoxItem\n className={rootClassName}\n ref={ref}\n id={value}\n {...rest}\n textValue={textValue}\n >\n <span className={styles.content}>\n {hasChildren ? children : textValue}\n </span>\n <IconCheck aria-hidden className={styles.checkMark} />\n </Aria.ListBoxItem>\n );\n});\n\n/*\n * Without an `id`, react-aria gives the item a key off a render-order counter\n * (`react-aria-1`). That key is what the field reports as its selected value\n * and what `defaultValue` has to match, so an option without a `value` silently\n * submits a meaningless string and cannot be preselected — and the key shifts\n * when unrelated markup around it changes. react-aria warns about the missing\n * `textValue` in this situation but says nothing about the key, which is the\n * expensive half (#3028).\n *\n * Warn in an effect rather than during render, so a double render in StrictMode\n * does not log twice; the ref keeps it to once per option.\n */\nconst useWarnMissingValue = (isMissing: boolean): void => {\n const hasWarned = useRef(false);\n\n useEffect(() => {\n if (!isMissing || hasWarned.current) {\n return;\n }\n\n hasWarned.current = true;\n console.error(\n \"An <Option> has no 'value' and none could be inferred from its children, so it falls back to a generated, render-order-dependent key. Pass a 'value' to give the option a stable key.\",\n );\n }, [isMissing]);\n};\n\nexport default Option;\n"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAa,kBACX,UAEA,MAAM,SAAS,MAAM,aAAa,wBAAwB,MAAM,QAAQ;;AAG1E,IAAa,SAAS,cAAc,WAAW,UAAU;CACvD,MAAM,EACJ,WACA,UACA,YAAY,wBAAwB,QAAQ,GAG5C,OAAO,cACP,KACA,GAAG,SACD;CAEJ,MAAM,QAAQ,eAAe,KAAK;CAElC,oBAAoB,UAAU,KAAA,CAAS;CAEvC,MAAM,gBAAgB,KAAKA,sBAAO,QAAQ,SAAS;CACnD,MAAM,cAAc,SAAS,MAAM,QAAQ,KAAK;CAEhD,OACE,qBAAC,KAAK,aAAN;EACE,WAAW;EACN;EACL,IAAI;EACJ,GAAI;EACO;EALb,UAAA,CAOE,oBAAC,QAAD;GAAM,WAAWA,sBAAO;GACrB,UAAA,cAAc,WAAW;EACtB,CAAA,GACN,oBAAC,WAAD;GAAW,eAAA;GAAY,WAAWA,sBAAO;EAAY,CAAA,CACrC;;AAEtB,CAAC;AAcD,IAAM,uBAAuB,cAA6B;CACxD,MAAM,YAAY,OAAO,KAAK;CAE9B,gBAAgB;EACd,IAAI,CAAC,aAAa,UAAU,SAC1B;EAGF,UAAU,UAAU;EACpB,QAAQ,MACN,uLACF;CACF,GAAG,CAAC,SAAS,CAAC;AAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Options.mjs","names":[],"sources":["../../../../../../../src/components/Options/Options.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport clsx from \"clsx\";\nimport styles from \"./Options.module.scss\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { OptionProps } from \"@/components/Option\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface OptionsProps\n extends\n Pick<Aria.ListBoxProps<OptionProps>, \"renderEmptyState\" | \"onAction\">,\n PopoverProps {\n controller: OverlayController;\n}\n\nexport const Options: FC<OptionsProps> = flowComponent(\"Options\", (props) => {\n const {\n className,\n children,\n controller,\n renderEmptyState,\n onAction,\n ...restPopoverProps\n } = props;\n\n const rootClassName = clsx(styles.options, className);\n\n return (\n <Popover\n className={styles.popover}\n controller={controller}\n maxHeight={324}\n {...restPopoverProps}\n >\n <Aria.ListBox\n onAction={onAction}\n className={rootClassName}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </Aria.ListBox>\n </Popover>\n );\n});\n\nexport default Options;\n"],"mappings":";;;;;;;;;;AAgBA,IAAa,UAA4B,cAAc,YAAY,UAAU;CAC3E,MAAM,EACJ,WACA,UACA,YACA,kBACA,UACA,GAAG,qBACD;CAEJ,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Options.mjs","names":["styles"],"sources":["../../../../../../../src/components/Options/Options.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport { Popover, type PopoverProps } from \"@/components/Popover/Popover\";\nimport clsx from \"clsx\";\nimport styles from \"./Options.module.scss\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport type { OptionProps } from \"@/components/Option\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface OptionsProps\n extends\n Pick<Aria.ListBoxProps<OptionProps>, \"renderEmptyState\" | \"onAction\">,\n PopoverProps {\n controller: OverlayController;\n}\n\nexport const Options: FC<OptionsProps> = flowComponent(\"Options\", (props) => {\n const {\n className,\n children,\n controller,\n renderEmptyState,\n onAction,\n ...restPopoverProps\n } = props;\n\n const rootClassName = clsx(styles.options, className);\n\n return (\n <Popover\n className={styles.popover}\n controller={controller}\n maxHeight={324}\n {...restPopoverProps}\n >\n <Aria.ListBox\n onAction={onAction}\n className={rootClassName}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </Aria.ListBox>\n </Popover>\n );\n});\n\nexport default Options;\n"],"mappings":";;;;;;;;;;AAgBA,IAAa,UAA4B,cAAc,YAAY,UAAU;CAC3E,MAAM,EACJ,WACA,UACA,YACA,kBACA,UACA,GAAG,qBACD;CAEJ,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,SAAD;EACE,WAAWA,uBAAO;EACN;EACZ,WAAW;EACX,GAAI;EAEJ,UAAA,oBAAC,KAAK,SAAN;GACY;GACV,WAAW;GACO;GAEjB;EACW,CAAA;CACP,CAAA;AAEb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.mjs","names":[],"sources":["../../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@/lib/controller/overlay/OverlayController\";\nimport type * as Aria from \"react-aria-components\";\n\nexport interface OverlayProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n /** Whether the overlay is open. Use it to control the overlay state. */\n isOpen?: boolean;\n /**\n * Whether the overlay is open initially. Use it for an uncontrolled overlay.\n *\n * @default false\n */\n isDefaultOpen?: boolean;\n /** Called when the overlay is opened. */\n onOpen?: OverlayOpenHandler;\n /** Called when the overlay is closed. */\n onClose?: OverlayCloseHandler;\n /** Called with the new open state whenever the overlay is opened or closed. */\n onOpenChange?: OverlayOpenStateHandler;\n /** Whether closing the overlay must be confirmed. */\n confirmOnClose?: boolean;\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n isDefaultOpen,\n isOpen: isOpenFromProps,\n ref,\n \"aria-labelledby\": ariaLabelledBy,\n ...controllerOptions\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n isDefaultOpen,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n controller.useUpdateOptions(controllerOptions);\n\n const isOpen = isOpenFromProps ?? controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <OverlayContentView\n onOpenChange={controller.setOpen}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n aria-labelledby={ariaLabelledBy}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {children}\n </OverlayContextProvider>\n </OverlayContentView>\n );\n};\n\nexport default Overlay;\n"],"mappings":";;;;;;;;;AA6CA,IAAa,WAA6B,UAAU;CAClD,MAAM,EACJ,YAAY,qBACZ,UACA,gBAAgB,MAChB,WACA,cAAc,SACd,eACA,QAAQ,iBACR,KACA,mBAAmB,gBACnB,GAAG,sBACD;CAEJ,MAAM,wBAAwB,qBAAqB,aAAa;EAC9D,4BAA4B;EAC5B;CACF,CAAC;CAED,MAAM,aAAa,uBAAuB;CAC1C,WAAW,iBAAiB,iBAAiB;CAE7C,MAAM,SAAS,mBAAmB,WAAW,UAAU;CAEvD,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Overlay.mjs","names":["styles"],"sources":["../../../../../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref } from \"react\";\nimport styles from \"./Overlay.module.scss\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport OverlayContextProvider from \"@/lib/controller/overlay/OverlayContextProvider\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport OverlayContentView from \"@/views/OverlayContentView\";\nimport type {\n OverlayCloseHandler,\n OverlayOpenHandler,\n OverlayOpenStateHandler,\n} from \"@/lib/controller/overlay/OverlayController\";\nimport type * as Aria from \"react-aria-components\";\n\nexport interface OverlayProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n /** The controller to control the overlay state. */\n controller?: OverlayController;\n /** Whether the overlay can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the overlay is a modal or a light box. */\n overlayType?: \"Modal\" | \"LightBox\";\n /** Whether the overlay is open. Use it to control the overlay state. */\n isOpen?: boolean;\n /**\n * Whether the overlay is open initially. Use it for an uncontrolled overlay.\n *\n * @default false\n */\n isDefaultOpen?: boolean;\n /** Called when the overlay is opened. */\n onOpen?: OverlayOpenHandler;\n /** Called when the overlay is closed. */\n onClose?: OverlayCloseHandler;\n /** Called with the new open state whenever the overlay is opened or closed. */\n onOpenChange?: OverlayOpenStateHandler;\n /** Whether closing the overlay must be confirmed. */\n confirmOnClose?: boolean;\n}\n\nexport const Overlay: FC<OverlayProps> = (props) => {\n const {\n controller: controllerFromProps,\n children,\n isDismissable = true,\n className,\n overlayType = \"Modal\",\n isDefaultOpen,\n isOpen: isOpenFromProps,\n ref,\n \"aria-labelledby\": ariaLabelledBy,\n ...controllerOptions\n } = props;\n\n const controllerFromContext = useOverlayController(overlayType, {\n reuseControllerFromContext: true,\n isDefaultOpen,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n controller.useUpdateOptions(controllerOptions);\n\n const isOpen = isOpenFromProps ?? controller.useIsOpen();\n\n const rootClassName = clsx(styles.overlay, className);\n\n return (\n <OverlayContentView\n onOpenChange={controller.setOpen}\n isOpen={isOpen}\n ref={ref}\n isDismissable={isDismissable}\n className={rootClassName}\n aria-labelledby={ariaLabelledBy}\n >\n <OverlayContextProvider type=\"Modal\" controller={controller}>\n {children}\n </OverlayContextProvider>\n </OverlayContentView>\n );\n};\n\nexport default Overlay;\n"],"mappings":";;;;;;;;;AA6CA,IAAa,WAA6B,UAAU;CAClD,MAAM,EACJ,YAAY,qBACZ,UACA,gBAAgB,MAChB,WACA,cAAc,SACd,eACA,QAAQ,iBACR,KACA,mBAAmB,gBACnB,GAAG,sBACD;CAEJ,MAAM,wBAAwB,qBAAqB,aAAa;EAC9D,4BAA4B;EAC5B;CACF,CAAC;CAED,MAAM,aAAa,uBAAuB;CAC1C,WAAW,iBAAiB,iBAAiB;CAE7C,MAAM,SAAS,mBAAmB,WAAW,UAAU;CAEvD,MAAM,gBAAgB,KAAKA,uBAAO,SAAS,SAAS;CAEpD,OACE,oBAAC,oBAAD;EACE,cAAc,WAAW;EACjB;EACH;EACU;EACf,WAAW;EACX,mBAAiB;EAEjB,UAAA,oBAAC,wBAAD;GAAwB,MAAK;GAAoB;GAC9C;EACqB,CAAA;CACN,CAAA;AAExB"}
|
|
@@ -17,9 +17,14 @@ var overlayContainerAttribute = "data-flow-overlays";
|
|
|
17
17
|
* blurs a focused field inside it (#3268). The same heuristic also spares
|
|
18
18
|
* custom elements and shadow hosts the page itself appends, which then render
|
|
19
19
|
* above open overlays.
|
|
20
|
+
*
|
|
21
|
+
* Hidden nodes don't count either: react-aria appends a `display: none`
|
|
22
|
+
* description node whenever a DatePicker's value changes, and moving the
|
|
23
|
+
* container for it on every keystroke resets the segment being typed into.
|
|
20
24
|
*/
|
|
25
|
+
var isHiddenNode = (node) => node instanceof HTMLElement && (node.hidden === true || node.style.display === "none");
|
|
21
26
|
var isCoveredByPageContent = (container) => {
|
|
22
|
-
for (let node = container.nextElementSibling; node; node = node.nextElementSibling) if (!isBrowserExtensionNode(node)) return true;
|
|
27
|
+
for (let node = container.nextElementSibling; node; node = node.nextElementSibling) if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) return true;
|
|
23
28
|
return false;
|
|
24
29
|
};
|
|
25
30
|
/**
|
package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayContent.mjs","names":[],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n */\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n {children}\n </Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </DivView>\n </Aria.ModalOverlay>\n </UNSAFE_PortalProvider>\n );\n};\n\nexport default OverlayContent;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"OverlayContent.mjs","names":["styles"],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n *\n * Hidden nodes don't count either: react-aria appends a `display: none`\n * description node whenever a DatePicker's value changes, and moving the\n * container for it on every keystroke resets the segment being typed into.\n */\nconst isHiddenNode = (node: Element): boolean =>\n node instanceof HTMLElement &&\n (node.hidden === true || node.style.display === \"none\");\n\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n {children}\n </Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </DivView>\n </Aria.ModalOverlay>\n </UNSAFE_PortalProvider>\n );\n};\n\nexport default OverlayContent;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,4BAA4B;;;;;;;;;;;;AAalC,IAAM,gBAAgB,SACpB,gBAAgB,gBACf,KAAK,WAAW,QAAQ,KAAK,MAAM,YAAY;AAElD,IAAM,0BAA0B,cAAoC;CAClE,KACE,IAAI,OAAO,UAAU,oBACrB,MACA,OAAO,KAAK,oBAEZ,IAAI,CAAC,uBAAuB,IAAI,KAAK,CAAC,aAAa,IAAI,GACrD,OAAO;CAGX,OAAO;AACT;;;;;;;;;AAUA,IAAM,aAAa,cAAiC;CAClD,MAAM,OAAO,SAAS;CACtB,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,MAAM,KAAK,UAAU,iBAA8B,GAAG,CAAC,CAAC,CACtE,QAAQ,YAAY,QAAQ,cAAc,KAAK,QAAQ,eAAe,CAAC,CAAC,CACxE,KACE,YAAY;EAAC;EAAS,QAAQ;EAAW,QAAQ;CAAU,CAC9D;CAEF,IAAI,OAAO,KAAK,eAAe,YAC7B,KAAK,WAAW,WAAW,IAAI;MAE/B,KAAK,OAAO,SAAS;CAGvB,KAAK,MAAM,CAAC,SAAS,WAAW,eAAe,UAAU;EACvD,QAAQ,YAAY;EACpB,QAAQ,aAAa;CACvB;CACA,IACE,mBAAmB,eACnB,UAAU,SAAS,OAAO,KAC1B,SAAS,kBAAkB,SAE3B,QAAQ,MAAM,EAAE,eAAe,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;AAoBA,IAAM,4BAAgD;CACpD,IAAI,OAAO,aAAa,aACtB,OAAO;CAGT,MAAM,oBAAoB,SAAS,cACjC,WAAW,0BAA0B,EACvC;CAEA,IAAI,mBAAmB;EACrB,IAAI,uBAAuB,iBAAiB,GAC1C,UAAU,iBAAiB;EAE7B,OAAO;CACT;CAEA,MAAM,YAAY,SAAS,cAAc,KAAK;CAC9C,UAAU,aAAa,2BAA2B,EAAE;CACpD,SAAS,KAAK,OAAO,SAAS;CAE9B,OAAO;AACT;;AAcA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,WACA,mBAAmB,gBACnB,GAAG,cACD;CAEJ,MAAM,mBAAmB,oBAAoB;CAE7C,oCAAoC,UAAU,UAAU,KAAK;CAE7D,MAAM,iBAAiB;EACrB,OACE,oBAAC,SAAD;GAAS,WAAWA,uBAAO;GACzB,UAAA,oBAAC,yBAAD,EAAyB,GAAI,UAAY,CAAA;EAClC,CAAA;CAEb;CAEA,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,uBAAD;EAAuB,cAAc;EACnC,UAAA,oBAAC,KAAK,cAAN;GAAmB,GAAI;GAAsB;GAI3C,UAAA,oBAAC,SAAD;IAAS,WAAWA,uBAAO;IACzB,UAAA,oBAAC,KAAK,OAAN,EAAA,UACE,oBAAC,UAAD;KAAU,UAAU,oBAAC,UAAD,CAAW,CAAA;KAC7B,UAAA,oBAAC,KAAK,QAAN;MAAa,mBAAiB;MAC3B;KACU,CAAA;IACL,CAAA,EACA,CAAA;GACL,CAAA;EACQ,CAAA;CACE,CAAA;AAE3B"}
|
package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
|
5
5
|
import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
|
|
6
6
|
import { useLocalizedStringFormatter } from "../TranslationProvider/useLocalizedStringFormatter.mjs";
|
|
7
7
|
import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
|
|
8
|
-
import { useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
|
|
8
|
+
import { joinIds, useFieldComponent } from "../../lib/hooks/useFieldComponent.mjs";
|
|
9
9
|
import { useControlledHostValueProps } from "../../lib/remote/useControlledHostValueProps.mjs";
|
|
10
10
|
import { FieldDescription } from "../FieldDescription/FieldDescription.mjs";
|
|
11
11
|
import { FieldError } from "../FieldError/FieldError.mjs";
|
|
@@ -23,7 +23,7 @@ import { PasswordGenerateButton } from "./components/PasswordGenerateButton/Pass
|
|
|
23
23
|
import { usePolicyValidationResult } from "./lib/usePolicyValidationResult.mjs";
|
|
24
24
|
import { useAriaAnnouncePasswordVisibility, useAriaAnnounceValidationState } from "./lib/ariaAnnounce.mjs";
|
|
25
25
|
import clsx from "clsx";
|
|
26
|
-
import { useMemo, useRef, useState } from "react";
|
|
26
|
+
import { useCallback, useId, useMemo, useRef, useState } from "react";
|
|
27
27
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
28
28
|
import * as Aria from "react-aria-components";
|
|
29
29
|
//#region src/components/PasswordCreationField/PasswordCreationField.tsx
|
|
@@ -44,7 +44,7 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
|
|
|
44
44
|
};
|
|
45
45
|
const [policyValidationResult, setPolicyValidationResult] = useState(initialPolicyValidationState);
|
|
46
46
|
const loadingRef = useRef(null);
|
|
47
|
-
usePolicyValidationResult(validationPolicy, value ?? "", () => {
|
|
47
|
+
const { rememberValidationResult } = usePolicyValidationResult(validationPolicy, value ?? "", () => {
|
|
48
48
|
if (isEmptyValue) return;
|
|
49
49
|
loadingRef.current = setTimeout(() => {
|
|
50
50
|
setPolicyValidationResult((r) => ({
|
|
@@ -77,10 +77,23 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
|
|
|
77
77
|
const isValidFromValidationResult = !isEmptyValue && stateFromValidationResult?.isValid;
|
|
78
78
|
const isInvalidFromValidationResult = !isEmptyValue && stateFromValidationResult?.isValid === false;
|
|
79
79
|
const isInvalid = invalidFromProps || isInvalidFromValidationResult;
|
|
80
|
-
const { FieldErrorView, FieldErrorCaptureContext,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
const { FieldErrorView, FieldErrorCaptureContext, wrapperProps, controlProps, fieldPropsContext, renderedFieldErrorId } = useFieldComponent(props, "PasswordCreationField");
|
|
81
|
+
/**
|
|
82
|
+
* The result for a valid password appears after the asynchronous policy
|
|
83
|
+
* validation. react-aria resolves its description slot only when the
|
|
84
|
+
* field's validity changes, so a result that appears while the field stays
|
|
85
|
+
* valid (a generated password) was never linked. It gets its own id
|
|
86
|
+
* instead, referenced only while it is rendered.
|
|
87
|
+
*
|
|
88
|
+
* A shown error replaces it: the FormField styles hide descriptions next to
|
|
89
|
+
* an error, and a hidden description would still be announced.
|
|
90
|
+
*/
|
|
91
|
+
const resultDescriptionId = useId();
|
|
92
|
+
const [isResultDescriptionRendered, setIsResultDescriptionRendered] = useState(false);
|
|
93
|
+
const resultDescriptionRef = useCallback((element) => {
|
|
94
|
+
setIsResultDescriptionRendered(!!element);
|
|
95
|
+
}, []);
|
|
96
|
+
const describedBy = joinIds(isResultDescriptionRendered && resultDescriptionId, controlProps["aria-describedby"]);
|
|
84
97
|
useAriaAnnounceValidationState(latestValidationErrorText, !isEmptyValue && policyValidationResult.isValid !== "indeterminate");
|
|
85
98
|
useAriaAnnouncePasswordVisibility(isPasswordRevealed);
|
|
86
99
|
const setOptimisticPolicyValidationResult = (state = {}) => {
|
|
@@ -92,14 +105,16 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
|
|
|
92
105
|
};
|
|
93
106
|
const onPasswordGenerateHandler = async () => {
|
|
94
107
|
const generatedPassword = await generatePassword(validationPolicy);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
/**
|
|
109
|
+
* The generator returns only passwords the policy accepts, so the rating
|
|
110
|
+
* is set with the password instead of after the typing debounce. It is
|
|
111
|
+
* the policy's own result: a guessed one (full strength) was overturned
|
|
112
|
+
* by the real rating, e.g. to "meets the minimum requirements". Cached,
|
|
113
|
+
* so the debounced validation of this password does not rate it again.
|
|
114
|
+
*/
|
|
115
|
+
const generatedPasswordResult = await validationPolicy.validate(generatedPassword);
|
|
116
|
+
rememberValidationResult(generatedPassword, generatedPasswordResult);
|
|
117
|
+
setPolicyValidationResult(generatedPasswordResult);
|
|
103
118
|
setIsPasswordRevealed(true);
|
|
104
119
|
onChange(generatedPassword);
|
|
105
120
|
};
|
|
@@ -155,12 +170,12 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
|
|
|
155
170
|
};
|
|
156
171
|
return /* @__PURE__ */ jsxs(Aria.TextField, {
|
|
157
172
|
...rest,
|
|
158
|
-
|
|
173
|
+
"aria-describedby": describedBy,
|
|
159
174
|
value,
|
|
160
175
|
type: isPasswordRevealed ? "text" : "password",
|
|
161
176
|
onChange,
|
|
162
177
|
onPaste: onPasswordPasteHandler,
|
|
163
|
-
className: clsx(className,
|
|
178
|
+
className: clsx(className, wrapperProps.className),
|
|
164
179
|
isDisabled,
|
|
165
180
|
isInvalid,
|
|
166
181
|
isRequired,
|
|
@@ -199,11 +214,19 @@ var PasswordCreationField = flowComponent("PasswordCreationField", (props) => {
|
|
|
199
214
|
isEmptyValue,
|
|
200
215
|
isLoading: policyValidationResult.isValid === "indeterminate",
|
|
201
216
|
policyValidationResult,
|
|
202
|
-
validationResultState: stateFromValidationResult
|
|
217
|
+
validationResultState: stateFromValidationResult,
|
|
218
|
+
isInvalid: invalidFromProps
|
|
203
219
|
}, value)
|
|
204
220
|
]
|
|
205
221
|
}),
|
|
206
|
-
isValidFromValidationResult && /* @__PURE__ */ jsx(
|
|
222
|
+
isValidFromValidationResult && !renderedFieldErrorId && /* @__PURE__ */ jsx(Aria.TextContext.Provider, {
|
|
223
|
+
value: null,
|
|
224
|
+
children: /* @__PURE__ */ jsx(FieldDescription, {
|
|
225
|
+
id: resultDescriptionId,
|
|
226
|
+
ref: resultDescriptionRef,
|
|
227
|
+
children: latestValidationErrorText
|
|
228
|
+
})
|
|
229
|
+
})
|
|
207
230
|
]
|
|
208
231
|
})] }), /* @__PURE__ */ jsx(FieldErrorView, {})]
|
|
209
232
|
});
|