@abyss-project/commons-front-core 20.5.1 → 21.0.1
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/CHANGELOG.md +39 -0
- package/README.md +18 -0
- package/catalog/pages/CookieConsent.tsx +1 -1
- package/catalog/pages/MobileShell.tsx +75 -39
- package/catalog/pages/Tabs.tsx +24 -0
- package/catalog/specs/cookie-consent-modal.spec.ts +1 -1
- package/catalog/specs/mobile-shell.spec.ts +28 -0
- package/dist/{CookieConsentSettings-BGIHx7eH.js → CookieConsentSettings-BzeQZ5tD.js} +223 -224
- package/dist/{Surface-B74cXq1M.js → Surface-t4XKtudZ.js} +319 -714
- package/dist/Tabs-DXgqVX6V.js +5276 -0
- package/dist/components/ScanStatus/InfectedDownloadWarningModal.d.ts +14 -45
- package/dist/components/business/AbyssProjectLinkField/AbyssProjectLinkField.d.ts +48 -0
- package/dist/components/business/CookieConsent/containing-block.d.ts +1 -1
- package/dist/components/business/Deliveries/ScheduledTaskPanel.d.ts +7 -2
- package/dist/components/business/Deliveries/deliveries.logic.d.ts +31 -0
- package/dist/components/business/Deliveries/deliveries.types.d.ts +24 -0
- package/dist/components/business/Deliveries/use-missed-run-count.hook.d.ts +8 -0
- package/dist/components/business/Deliveries/use-missed-runs.hook.d.ts +13 -0
- package/dist/components/business/Deliveries/use-previous-page-edge.hook.d.ts +22 -0
- package/dist/components/business/PendingInvitations/PendingInvitations.d.ts +28 -0
- package/dist/components/business/index.d.ts +2 -0
- package/dist/components/editors/PdfEditor/PdfEditor.d.ts +2 -2
- package/dist/components/editors/PdfEditor/pdf-colors.d.ts +2 -2
- package/dist/components/editors/PdfEditor/toolbar/PdfToolbar.d.ts +3 -3
- package/dist/components/inputs/date-localization.d.ts +3 -3
- package/dist/components/layers/Modal/Modal.d.ts +1 -1
- package/dist/components/meaning/Avatar/Avatar.d.ts +2 -0
- package/dist/components/mobile/ActionBar/ActionBar.d.ts +2 -1
- package/dist/components/mobile/BottomSheet/BottomSheet.d.ts +8 -2
- package/dist/components/mobile/MobileShell/MobileShell.d.ts +2 -1
- package/dist/components/mobile/MobileShell/MobileShellActionBar.d.ts +7 -0
- package/dist/components/mobile/MobileShell/MobileShellPageFrame.d.ts +13 -0
- package/dist/components/mobile/index.d.ts +1 -0
- package/dist/components/mobile/mobile-layout.d.ts +8 -0
- package/dist/components/mobile/test-support/mobile-test-harness.d.ts +5 -0
- package/dist/components/structure/AppShell/AppShell.d.ts +2 -2
- package/dist/components/structure/test-support/structure-test-harness.d.ts +1 -3
- package/dist/cookie-consent.js +2 -2
- package/dist/demo/DemoBanner/DemoBanner.d.ts +1 -1
- package/dist/{editors-s-GER37R.js → editors-Dt29L0Ux.js} +4074 -4063
- package/dist/editors.js +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +52 -454
- package/dist/hooks/use-scroll-overflow-cue.hook.d.ts +8 -2
- package/dist/{index-DoWxAfPn.js → index-3hRPEDk5.js} +4 -4
- package/dist/{index-DctO0l5q.js → index-BHKOZzg1.js} +1 -1
- package/dist/{index-NX_Kd4oz.js → index-BYWSBoej.js} +3 -3
- package/dist/{index-genxamHw.js → index-BYWcX6y7.js} +2 -2
- package/dist/{index-Dka20zad.js → index-BaS25rA-.js} +2 -2
- package/dist/{index-BZgkwoZ5.js → index-BczDLUpv.js} +2 -2
- package/dist/{index-BxlF9T05.js → index-Bh0e5MGQ.js} +2 -2
- package/dist/{index-CO6rjqWZ.js → index-C3iToWR_.js} +4 -4
- package/dist/{index-B635dFQ2.js → index-CNem7pV2.js} +2 -2
- package/dist/{index-B_fqzhtm.js → index-Cs5brR68.js} +3 -3
- package/dist/{index-D9IW7UEw.js → index-D0E9e2bc.js} +2 -2
- package/dist/{index-CXEf_Hel.js → index-D2yo-g20.js} +4 -4
- package/dist/{index-1n03jgsr.js → index-DGizXlGr.js} +3 -3
- package/dist/{index-CE-4v9ue.js → index-DLZ2_Fhk.js} +3 -3
- package/dist/{index-CVN6HOlq.js → index-DbBqHu3d.js} +2 -2
- package/dist/{index-B-oGxRVH.js → index-Deq0UIQ5.js} +2 -2
- package/dist/{index-8L4OftHM.js → index-Dg0a5ekJ.js} +2 -2
- package/dist/{index-yqn8Hbay.js → index-DvcQvaXv.js} +2 -2
- package/dist/{index-YkgGwyfx.js → index-ETHoxvZf.js} +2 -2
- package/dist/{index-D4kZ3Yip.js → index-na4ea52T.js} +2 -2
- package/dist/{index-Bn9RgQrP.js → index-vX7Ua1iM.js} +2 -2
- package/dist/index.js +47045 -19954
- package/dist/theme/design-media.d.ts +4 -4
- package/dist/theme/design-theme.d.ts +1 -5
- package/dist/theme/index.d.ts +0 -1
- package/dist/translations/en.d.ts +18 -219
- package/dist/translations/fr.d.ts +18 -219
- package/dist/utils/file.utils.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/notification-target.utils.d.ts +49 -0
- package/package.json +8 -22
- package/test-results/catalog/.last-run.json +4 -0
- package/vite.config.ts +6 -8
- package/dist/Tabs-nH2IBqqa.js +0 -1991
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/design-theme-DtU1zQos.js +0 -27703
- package/dist/index-C27b790L.js +0 -3304
- package/dist/legacy/components/Avatars/OrganizationAvatar/OrganizationAvatar.component.d.ts +0 -24
- package/dist/legacy/components/Avatars/OrganizationAvatar/index.d.ts +0 -2
- package/dist/legacy/components/Avatars/ProjectAvatar/ProjectAvatar.component.d.ts +0 -29
- package/dist/legacy/components/Avatars/ProjectAvatar/index.d.ts +0 -2
- package/dist/legacy/components/Avatars/UserAvatar/UserAvatar.component.d.ts +0 -25
- package/dist/legacy/components/Avatars/UserAvatar/constant.d.ts +0 -8
- package/dist/legacy/components/Avatars/UserAvatar/index.d.ts +0 -3
- package/dist/legacy/components/Avatars/UserAvatarList/UserAvatarList.component.d.ts +0 -18
- package/dist/legacy/components/Avatars/UserAvatarList/index.d.ts +0 -2
- package/dist/legacy/components/Avatars/index.d.ts +0 -4
- package/dist/legacy/components/Banking/AccountTransactions/AccountTransactionsRow.component.d.ts +0 -30
- package/dist/legacy/components/Banking/AccountTransactions/index.d.ts +0 -2
- package/dist/legacy/components/Banking/Inputs/SelectAccountTransactionCategory/SelectAccountTransactionCategory.component.d.ts +0 -12
- package/dist/legacy/components/Banking/Inputs/SelectAccountTransactionCategory/index.d.ts +0 -1
- package/dist/legacy/components/Banking/Inputs/index.d.ts +0 -1
- package/dist/legacy/components/Banking/index.d.ts +0 -1
- package/dist/legacy/components/Cards/InternalProjectCard/InternalProjectCard.component.d.ts +0 -36
- package/dist/legacy/components/Cards/InternalProjectCard/index.d.ts +0 -2
- package/dist/legacy/components/Cards/ProjectCard/ProjectCard.component.d.ts +0 -28
- package/dist/legacy/components/Cards/ProjectCard/index.d.ts +0 -2
- package/dist/legacy/components/Cards/index.d.ts +0 -2
- package/dist/legacy/components/Charts/AbyssBarChart/AbyssBarChart.component.d.ts +0 -21
- package/dist/legacy/components/Charts/AbyssBarChart/index.d.ts +0 -1
- package/dist/legacy/components/Charts/AbyssCashFlowChart/AbyssCashFlowChart.component.d.ts +0 -14
- package/dist/legacy/components/Charts/AbyssCashFlowChart/index.d.ts +0 -1
- package/dist/legacy/components/Charts/AbyssLineChart/AbyssLineChart.component.d.ts +0 -33
- package/dist/legacy/components/Charts/AbyssLineChart/index.d.ts +0 -1
- package/dist/legacy/components/Charts/AbyssPieChart/AbyssPieChart.component.d.ts +0 -18
- package/dist/legacy/components/Charts/AbyssPieChart/index.d.ts +0 -1
- package/dist/legacy/components/Charts/index.d.ts +0 -4
- package/dist/legacy/components/Charts/useNivoTheme.d.ts +0 -65
- package/dist/legacy/components/Chips/ApplicationSentinelTypeChip/ApplicationSentinelTypeChip.component.d.ts +0 -7
- package/dist/legacy/components/Chips/ApplicationSentinelTypeChip/index.d.ts +0 -1
- package/dist/legacy/components/Chips/LogTypeChip/LogTypeChip.component.d.ts +0 -7
- package/dist/legacy/components/Chips/LogTypeChip/index.d.ts +0 -1
- package/dist/legacy/components/Chips/ProjectStatusChip/ProjectStatusChip.component.d.ts +0 -7
- package/dist/legacy/components/Chips/ProjectStatusChip/index.d.ts +0 -1
- package/dist/legacy/components/Chips/WebhookResponseCodeChip/WebhookResponseCodeChip.component.d.ts +0 -6
- package/dist/legacy/components/Chips/WebhookResponseCodeChip/index.d.ts +0 -1
- package/dist/legacy/components/Chips/index.d.ts +0 -4
- package/dist/legacy/components/CommandPalette/AbyssCommandPalette.d.ts +0 -12
- package/dist/legacy/components/CommandPalette/index.d.ts +0 -3
- package/dist/legacy/components/CommandPalette/types.d.ts +0 -104
- package/dist/legacy/components/CommandPalette/useCommandPaletteHotkey.d.ts +0 -10
- package/dist/legacy/components/CompanySearchAutocomplete/CompanySearchAutocomplete.d.ts +0 -13
- package/dist/legacy/components/CompanySearchAutocomplete/CompanySearchAutocomplete.error.spec.d.ts +0 -1
- package/dist/legacy/components/CompanySearchAutocomplete/index.d.ts +0 -2
- package/dist/legacy/components/Data/AbyssTable/AbyssTable.component.d.ts +0 -70
- package/dist/legacy/components/Data/AbyssTable/AbyssTable.component.spec.d.ts +0 -1
- package/dist/legacy/components/Data/AbyssTable/AbyssTableCards.component.d.ts +0 -25
- package/dist/legacy/components/Data/AbyssTable/abyss-table.logic.d.ts +0 -147
- package/dist/legacy/components/Data/AbyssTable/abyss-table.logic.spec.d.ts +0 -1
- package/dist/legacy/components/Data/AbyssTable/index.d.ts +0 -2
- package/dist/legacy/components/Data/index.d.ts +0 -1
- package/dist/legacy/components/InfoBox/InfoBox.component.d.ts +0 -6
- package/dist/legacy/components/InfoBox/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/AbyssDatePicker/AbyssDatePicker.component.d.ts +0 -4
- package/dist/legacy/components/Inputs/AbyssDatePicker/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/AbyssDateTimePicker/AbyssDateTimePicker.component.d.ts +0 -4
- package/dist/legacy/components/Inputs/AbyssDateTimePicker/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/AbyssNumberField/AbyssNumberField.component.d.ts +0 -35
- package/dist/legacy/components/Inputs/AbyssNumberField/format.d.ts +0 -35
- package/dist/legacy/components/Inputs/AbyssNumberField/format.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/AbyssNumberField/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/AbyssScopeSwitcher/AbyssScopeSwitcher.component.d.ts +0 -21
- package/dist/legacy/components/Inputs/AbyssScopeSwitcher/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/AbyssScopeSwitcher/scope-option.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/AbyssSelectOrganization/AbyssSelectOrganization.component.d.ts +0 -18
- package/dist/legacy/components/Inputs/AbyssSelectOrganization/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/AbyssSelectProject/AbyssSelectProject.component.d.ts +0 -18
- package/dist/legacy/components/Inputs/AbyssSelectProject/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/CloudImport/CloudImport.component.d.ts +0 -17
- package/dist/legacy/components/Inputs/CloudImport/CloudImport.component.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/CloudImport/CloudImportFile.component.d.ts +0 -14
- package/dist/legacy/components/Inputs/CloudImport/CloudImportFile.component.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/CloudImport/CloudImportFolder.component.d.ts +0 -18
- package/dist/legacy/components/Inputs/CloudImport/index.d.ts +0 -3
- package/dist/legacy/components/Inputs/ColorPalette/ColorPalette.component.d.ts +0 -23
- package/dist/legacy/components/Inputs/ColorPalette/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/ColorPicker/ColorPicker.component.d.ts +0 -19
- package/dist/legacy/components/Inputs/ColorPicker/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/ContextSelector/ContextSelector.component.d.ts +0 -68
- package/dist/legacy/components/Inputs/ContextSelector/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/DatePeriodPicker/DatePeriodPicker.component.d.ts +0 -60
- package/dist/legacy/components/Inputs/DatePeriodPicker/DatePeriodPicker.granularity.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DatePeriodPicker/DatePeriodPicker.segmented.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DatePeriodPicker/date-period-i18n.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DatePeriodPicker/date-period-picker.logic.d.ts +0 -69
- package/dist/legacy/components/Inputs/DatePeriodPicker/date-period-picker.logic.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DatePeriodPicker/date-period-presets.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DatePeriodPicker/date-period-presets.util.d.ts +0 -15
- package/dist/legacy/components/Inputs/DatePeriodPicker/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/DropZone/DropZone.component.d.ts +0 -27
- package/dist/legacy/components/Inputs/DropZone/DropZone.component.spec.d.ts +0 -1
- package/dist/legacy/components/Inputs/DropZone/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/LanguageFlagLabel/LanguageFlagLabel.component.d.ts +0 -22
- package/dist/legacy/components/Inputs/LanguageFlagLabel/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/LanguageFlagLabel/language-flags.d.ts +0 -12
- package/dist/legacy/components/Inputs/PasswordInput/PasswordInput.component.d.ts +0 -41
- package/dist/legacy/components/Inputs/PasswordInput/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/ProjectCategoryBadge/ProjectCategoryBadge.component.d.ts +0 -8
- package/dist/legacy/components/Inputs/ProjectCategoryBadge/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/ProjectLinkSelector/ProjectLinkSelector.component.d.ts +0 -39
- package/dist/legacy/components/Inputs/ProjectLinkSelector/index.d.ts +0 -2
- package/dist/legacy/components/Inputs/ProjectTagChip/ProjectTagChip.component.d.ts +0 -9
- package/dist/legacy/components/Inputs/ProjectTagChip/index.d.ts +0 -1
- package/dist/legacy/components/Inputs/index.d.ts +0 -17
- package/dist/legacy/components/Invitations/AbyssPendingInvitations.component.d.ts +0 -18
- package/dist/legacy/components/Invitations/index.d.ts +0 -2
- package/dist/legacy/components/Layouts/AbyssBillingPlan/AbyssBillingPlan.component.d.ts +0 -11
- package/dist/legacy/components/Layouts/AbyssBillingPlan/AbyssBillingPlan.component.spec.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssBillingPlan/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssDashboardLayout/AbyssDashboardLayout.component.d.ts +0 -13
- package/dist/legacy/components/Layouts/AbyssDashboardLayout/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.component.d.ts +0 -32
- package/dist/legacy/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.logic.spec.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssFamilyBanner/index.d.ts +0 -2
- package/dist/legacy/components/Layouts/AbyssHeader/AbyssHeader.component.d.ts +0 -14
- package/dist/legacy/components/Layouts/AbyssHeader/AbyssHeader.component.spec.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssHeader/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssLayoutProvider/AbyssLayoutProvider.component.d.ts +0 -25
- package/dist/legacy/components/Layouts/AbyssLayoutProvider/abyss-layout.store.d.ts +0 -27
- package/dist/legacy/components/Layouts/AbyssLayoutProvider/index.d.ts +0 -3
- package/dist/legacy/components/Layouts/AbyssLoadingScreen/AbyssLoadingScreen.component.d.ts +0 -3
- package/dist/legacy/components/Layouts/AbyssLoadingScreen/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssSearchBar/AbyssSearchBar.component.d.ts +0 -8
- package/dist/legacy/components/Layouts/AbyssSearchBar/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssSidebar/AbyssSidebar.component.d.ts +0 -35
- package/dist/legacy/components/Layouts/AbyssSidebar/AbyssSidebarItem.component.d.ts +0 -9
- package/dist/legacy/components/Layouts/AbyssSidebar/index.d.ts +0 -3
- package/dist/legacy/components/Layouts/AbyssThemeToggle/AbyssThemeToggle.component.d.ts +0 -8
- package/dist/legacy/components/Layouts/AbyssThemeToggle/AbyssThemeToggle.component.spec.d.ts +0 -1
- package/dist/legacy/components/Layouts/AbyssThemeToggle/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/DashboardLayout/DashboardLayout.layout.d.ts +0 -19
- package/dist/legacy/components/Layouts/DashboardLayout/DashboardLayoutHeader.layout.d.ts +0 -11
- package/dist/legacy/components/Layouts/DashboardLayout/index.d.ts +0 -2
- package/dist/legacy/components/Layouts/LoadingLayout/LoadingLayout.layout.d.ts +0 -7
- package/dist/legacy/components/Layouts/LoadingLayout/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/MainLayout/MainLayout.layout.d.ts +0 -9
- package/dist/legacy/components/Layouts/MainLayout/index.d.ts +0 -1
- package/dist/legacy/components/Layouts/index.d.ts +0 -12
- package/dist/legacy/components/Modals/AbyssModal/AbyssModal.component.d.ts +0 -18
- package/dist/legacy/components/Modals/AbyssModal/index.d.ts +0 -1
- package/dist/legacy/components/Modals/ConfirmModal/ConfirmModal.d.ts +0 -22
- package/dist/legacy/components/Modals/ConfirmModal/index.d.ts +0 -2
- package/dist/legacy/components/Modals/ImportFromCloudModal/ImportFromCloudModal.component.d.ts +0 -15
- package/dist/legacy/components/Modals/ImportFromCloudModal/index.d.ts +0 -1
- package/dist/legacy/components/Modals/QRCodeModal/QRCodeModal.component.d.ts +0 -12
- package/dist/legacy/components/Modals/QRCodeModal/index.d.ts +0 -1
- package/dist/legacy/components/Modals/UserSettingsModal/UserSettings.compat.d.ts +0 -12
- package/dist/legacy/components/Modals/UserSettingsModal/UserSettingsModal.component.d.ts +0 -38
- package/dist/legacy/components/Modals/UserSettingsModal/index.d.ts +0 -2
- package/dist/legacy/components/Modals/UserSettingsModal/user-settings-modal.family.spec.d.ts +0 -1
- package/dist/legacy/components/Modals/UserSettingsModal/user-settings-modal.links.spec.d.ts +0 -1
- package/dist/legacy/components/Modals/index.d.ts +0 -6
- package/dist/legacy/components/QuotaGauge/AbyssQuotaGauge.component.d.ts +0 -53
- package/dist/legacy/components/QuotaGauge/bubble-placement.d.ts +0 -47
- package/dist/legacy/components/QuotaGauge/bubble-placement.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaGauge/gauge-highlight.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaGauge/gauge-i18n-coverage.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaGauge/gauge-segments.d.ts +0 -80
- package/dist/legacy/components/QuotaGauge/gauge-segments.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaGauge/index.d.ts +0 -6
- package/dist/legacy/components/QuotaOffer/AbyssQuotaOffer.component.d.ts +0 -83
- package/dist/legacy/components/QuotaOffer/AbyssQuotaOffer.component.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaOffer/index.d.ts +0 -4
- package/dist/legacy/components/QuotaOffer/quota-phrase-coverage.spec.d.ts +0 -1
- package/dist/legacy/components/QuotaReached/QuotaReachedDialog.component.d.ts +0 -15
- package/dist/legacy/components/QuotaReached/index.d.ts +0 -3
- package/dist/legacy/components/QuotaReached/quota-service-meta.d.ts +0 -31
- package/dist/legacy/components/Spotlight/InternalProjectCard/InternalProjectCard.component.d.ts +0 -15
- package/dist/legacy/components/Spotlight/InternalProjectCard/index.d.ts +0 -1
- package/dist/legacy/components/Spotlight/ProjectCard/ProjectCard.component.d.ts +0 -20
- package/dist/legacy/components/Spotlight/ProjectCard/index.d.ts +0 -1
- package/dist/legacy/components/Spotlight/ProjectCategoryBadge/ProjectCategoryBadge.component.d.ts +0 -7
- package/dist/legacy/components/Spotlight/ProjectCategoryBadge/index.d.ts +0 -1
- package/dist/legacy/components/Spotlight/ProjectLinkSelector/ProjectLinkSelector.component.d.ts +0 -10
- package/dist/legacy/components/Spotlight/ProjectLinkSelector/ProjectLinkSelector.component.spec.d.ts +0 -1
- package/dist/legacy/components/Spotlight/ProjectLinkSelector/index.d.ts +0 -2
- package/dist/legacy/components/Spotlight/ProjectTagChip/ProjectTagChip.component.d.ts +0 -9
- package/dist/legacy/components/Spotlight/ProjectTagChip/index.d.ts +0 -1
- package/dist/legacy/components/Spotlight/index.d.ts +0 -5
- package/dist/legacy/components/Utils/AbyssBackground/AbyssBackground.component.d.ts +0 -12
- package/dist/legacy/components/Utils/AbyssDrawer/AbyssDrawer.component.d.ts +0 -39
- package/dist/legacy/components/Utils/AbyssDrawer/index.d.ts +0 -2
- package/dist/legacy/components/Utils/AbyssErrorPage/AbyssErrorBoundary.component.d.ts +0 -10
- package/dist/legacy/components/Utils/AbyssErrorPage/AbyssErrorBoundary.component.spec.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssErrorPage/AbyssErrorPage.component.d.ts +0 -11
- package/dist/legacy/components/Utils/AbyssErrorPage/index.d.ts +0 -3
- package/dist/legacy/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.d.ts +0 -6
- package/dist/legacy/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.spec.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssFamilyMenuSection/index.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssHeaderTitle/AbyssHeaderTitle.component.d.ts +0 -11
- package/dist/legacy/components/Utils/AbyssHeaderTitle/index.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssLayoutMenu/AbyssLayoutMenu.component.d.ts +0 -43
- package/dist/legacy/components/Utils/AbyssLayoutMenu/AbyssLayoutMenu.component.spec.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssLayoutMenu/AbyssMenuItem.component.d.ts +0 -15
- package/dist/legacy/components/Utils/AbyssLayoutMenu/index.d.ts +0 -3
- package/dist/legacy/components/Utils/AbyssLayoutNotifications/AbyssLayoutNotifications.component.d.ts +0 -36
- package/dist/legacy/components/Utils/AbyssLayoutNotifications/AbyssLayoutNotifications.component.spec.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssLayoutNotifications/AbyssNotifications.component.d.ts +0 -30
- package/dist/legacy/components/Utils/AbyssLayoutNotifications/AbyssNotifications.component.spec.d.ts +0 -1
- package/dist/legacy/components/Utils/AbyssLayoutNotifications/index.d.ts +0 -4
- package/dist/legacy/components/Utils/ImportButton/ImportButton.component.d.ts +0 -19
- package/dist/legacy/components/Utils/ImportButton/index.d.ts +0 -2
- package/dist/legacy/components/Utils/WaterParticles/WaterParticles.component.d.ts +0 -14
- package/dist/legacy/components/Utils/WaterParticles/index.d.ts +0 -1
- package/dist/legacy/components/Utils/index.d.ts +0 -10
- package/dist/legacy/components/aria-labels-i18n.spec.d.ts +0 -1
- package/dist/legacy/components/commons-labels-i18n.spec.d.ts +0 -1
- package/dist/legacy/components/index.d.ts +0 -18
- package/dist/legacy/components/theme-mode-colors.spec.d.ts +0 -1
- package/dist/legacy/fonts.css +0 -7
- package/dist/legacy/hooks/confirm-modal/confirm-modal.context.d.ts +0 -10
- package/dist/legacy/hooks/confirm-modal/index.d.ts +0 -1
- package/dist/legacy/hooks/index.d.ts +0 -1
- package/dist/legacy/index.d.ts +0 -4
- package/dist/legacy/legacy-editors-removed.spec.d.ts +0 -1
- package/dist/legacy/legacy-support-removed.spec.d.ts +0 -1
- package/dist/legacy/legacy-under-new-theme.spec.d.ts +0 -1
- package/dist/legacy/theme/augmentation.d.ts +0 -84
- package/dist/legacy/theme/components/buttons.d.ts +0 -35
- package/dist/legacy/theme/components/data-display.d.ts +0 -4
- package/dist/legacy/theme/components/index.d.ts +0 -2
- package/dist/legacy/theme/components/inputs.d.ts +0 -4
- package/dist/legacy/theme/components/inputs.spec.d.ts +0 -1
- package/dist/legacy/theme/components/navigation.d.ts +0 -4
- package/dist/legacy/theme/components/surfaces.d.ts +0 -4
- package/dist/legacy/theme/core-breakpoints-under-legacy-theme.spec.d.ts +0 -1
- package/dist/legacy/theme/create-theme.d.ts +0 -9
- package/dist/legacy/theme/create-theme.spec.d.ts +0 -1
- package/dist/legacy/theme/disabled-contrast.spec.d.ts +0 -1
- package/dist/legacy/theme/index.d.ts +0 -23
- package/dist/legacy/theme/legacy-tokens.d.ts +0 -3
- package/dist/legacy/theme/new-components-under-legacy-theme.spec.d.ts +0 -1
- package/dist/legacy/theme/palettes/common.d.ts +0 -74
- package/dist/legacy/theme/palettes/dark.d.ts +0 -67
- package/dist/legacy/theme/palettes/light.d.ts +0 -67
- package/dist/legacy/theme/tokens/animations.d.ts +0 -33
- package/dist/legacy/theme/tokens/borders.d.ts +0 -14
- package/dist/legacy/theme/tokens/colors.d.ts +0 -129
- package/dist/legacy/theme/tokens/shadows.d.ts +0 -53
- package/dist/legacy/theme/tokens/transitions.d.ts +0 -25
- package/dist/legacy/theme/tokens/typography.d.ts +0 -99
- package/dist/legacy/utils/billing-colors.utils.d.ts +0 -7
- package/dist/legacy/utils/color.utils.d.ts +0 -11
- package/dist/legacy/utils/file.utils.d.ts +0 -2
- package/dist/legacy/utils/index.d.ts +0 -3
- package/dist/legacy.d.ts +0 -2
- package/dist/legacy.js +0 -16282
- package/dist/theme/DesignCssVariables.d.ts +0 -12
- package/dist/theme/DesignCssVariables.spec.d.ts +0 -1
- package/dist/utils/share-notification.utils.d.ts +0 -10
- /package/dist/{legacy/components/Cards/project-card-date.spec.d.ts → components/business/AbyssProjectLinkField/AbyssProjectLinkField.spec.d.ts} +0 -0
- /package/dist/{legacy/components/Charts/AbyssCashFlowChart/AbyssCashFlowChart.component.spec.d.ts → components/business/PendingInvitations/PendingInvitations.spec.d.ts} +0 -0
- /package/dist/{legacy/components/Charts/AbyssLineChart/AbyssLineChart.component.spec.d.ts → components/mobile/MobileShell/MobileShellActionBar.spec.d.ts} +0 -0
- /package/dist/{legacy/components/CompanySearchAutocomplete/CompanySearchAutocomplete.date.spec.d.ts → utils/notification-target.utils.spec.d.ts} +0 -0
package/dist/Tabs-nH2IBqqa.js
DELETED
|
@@ -1,1991 +0,0 @@
|
|
|
1
|
-
import { jsxs as C, jsx as i, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { useId as N, cloneElement as mn, useState as F, useMemo as ge, useRef as X, useCallback as Q, useEffect as V, createContext as ze, useContext as Ae, useLayoutEffect as Le } from "react";
|
|
3
|
-
import le from "@mui/material/FormControl";
|
|
4
|
-
import se from "@mui/material/FormHelperText";
|
|
5
|
-
import $e from "@mui/material/InputLabel";
|
|
6
|
-
import Ce from "@mui/material/MenuItem";
|
|
7
|
-
import hn from "@mui/material/Select";
|
|
8
|
-
import { styled as l, useTheme as bn, getContrastRatio as ke } from "@mui/material/styles";
|
|
9
|
-
import { visuallyHidden as fe } from "@mui/utils";
|
|
10
|
-
import { useIntl as P } from "react-intl";
|
|
11
|
-
import { a as A, p as o, h as D, d as Z, D as K, g as yn, t as De, s as de, i as oe, j as te, c as Pe, e as He, k as vn, B as wn } from "./Surface-B74cXq1M.js";
|
|
12
|
-
import { i as xn, b as Cn, r as kn, u as Sn, A as In, E as Fn } from "./index-C27b790L.js";
|
|
13
|
-
import Y from "@mui/material/Button";
|
|
14
|
-
import { byteSizeIEC as Wn } from "@abyss-project/main";
|
|
15
|
-
import Mn from "@mui/icons-material/FileUploadOutlined";
|
|
16
|
-
import On, { autocompleteClasses as Se } from "@mui/material/Autocomplete";
|
|
17
|
-
import Ie from "@mui/material/CircularProgress";
|
|
18
|
-
import ae from "@mui/material/IconButton";
|
|
19
|
-
import me from "@mui/material/OutlinedInput";
|
|
20
|
-
import Fe from "@mui/material/Tooltip";
|
|
21
|
-
import We from "@mui/icons-material/CloudOutlined";
|
|
22
|
-
import Tn from "@mui/icons-material/CloudOffOutlined";
|
|
23
|
-
import Rn from "@mui/icons-material/FileDownloadOutlined";
|
|
24
|
-
import Ne from "@mui/icons-material/FolderOpenOutlined";
|
|
25
|
-
import En from "@mui/icons-material/OpenInNewRounded";
|
|
26
|
-
import zn from "@mui/icons-material/RefreshRounded";
|
|
27
|
-
import An from "@mui/icons-material/CheckCircleOutline";
|
|
28
|
-
import _e from "@mui/icons-material/Close";
|
|
29
|
-
import Ln from "@mui/icons-material/ErrorOutline";
|
|
30
|
-
import $n from "@mui/icons-material/InfoOutlined";
|
|
31
|
-
import Dn from "@mui/icons-material/WarningAmber";
|
|
32
|
-
import Pn from "@mui/material/Checkbox";
|
|
33
|
-
import Hn from "@mui/icons-material/DescriptionOutlined";
|
|
34
|
-
import Nn from "@mui/icons-material/FolderOutlined";
|
|
35
|
-
import _n from "@mui/icons-material/ChevronRightRounded";
|
|
36
|
-
import Bn from "@mui/material/Alert";
|
|
37
|
-
import Vn from "@mui/material/TextField";
|
|
38
|
-
import jn from "@mui/material/Popover";
|
|
39
|
-
import Gn, { formLabelClasses as qn } from "@mui/material/FormLabel";
|
|
40
|
-
import Un from "@mui/material/InputAdornment";
|
|
41
|
-
import { isMuiElement as Kn } from "@mui/material/utils";
|
|
42
|
-
import Be from "@mui/material/ButtonBase";
|
|
43
|
-
import { Link as Xn } from "react-router-dom";
|
|
44
|
-
const Yn = l(Gn)(({ theme: e }) => ({
|
|
45
|
-
display: "block",
|
|
46
|
-
maxWidth: "100%",
|
|
47
|
-
marginBottom: o(e.design.space[2]),
|
|
48
|
-
fontSize: o(e.design.typeScale.small),
|
|
49
|
-
fontWeight: A.medium,
|
|
50
|
-
lineHeight: e.typography.caption.lineHeight,
|
|
51
|
-
color: e.design.tokens["text.secondary"],
|
|
52
|
-
"&.Mui-focused": { color: e.design.tokens["text.secondary"] },
|
|
53
|
-
"&.Mui-error": { color: e.design.tokens["status.danger"] },
|
|
54
|
-
"&.Mui-disabled": { color: e.design.tokens["text.muted"] }
|
|
55
|
-
}));
|
|
56
|
-
function Ve({
|
|
57
|
-
label: e,
|
|
58
|
-
help: t,
|
|
59
|
-
error: n,
|
|
60
|
-
required: r = !1,
|
|
61
|
-
children: a
|
|
62
|
-
}) {
|
|
63
|
-
const u = N(), s = a.props.id ?? u, d = `${s}-label`, g = t !== void 0 ? `${s}-help` : void 0, h = n != null && n !== !1 && n !== "", b = h && n !== !0, m = b ? `${s}-error` : void 0, f = [a.props["aria-describedby"], g, m].filter((c) => c !== void 0 && c !== "").join(" ") || void 0, w = mn(a, {
|
|
64
|
-
id: s,
|
|
65
|
-
"aria-describedby": f,
|
|
66
|
-
...Kn(a, ["Select"]) && { labelId: d }
|
|
67
|
-
});
|
|
68
|
-
return /* @__PURE__ */ C(le, { fullWidth: !0, error: h, required: r, children: [
|
|
69
|
-
/* @__PURE__ */ i(Yn, { id: d, htmlFor: s, children: e }),
|
|
70
|
-
w,
|
|
71
|
-
t !== void 0 && /* @__PURE__ */ i(se, { id: g, error: !1, children: t }),
|
|
72
|
-
b && /* @__PURE__ */ i(se, { id: m, children: n })
|
|
73
|
-
] });
|
|
74
|
-
}
|
|
75
|
-
var je = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Danger = "danger", e))(je || {});
|
|
76
|
-
const Ge = {
|
|
77
|
-
info: { solid: "status.info", soft: "status.info.soft" },
|
|
78
|
-
success: {
|
|
79
|
-
solid: "status.success",
|
|
80
|
-
soft: "status.success.soft"
|
|
81
|
-
},
|
|
82
|
-
warning: {
|
|
83
|
-
solid: "status.warning",
|
|
84
|
-
soft: "status.warning.soft"
|
|
85
|
-
},
|
|
86
|
-
danger: {
|
|
87
|
-
solid: "status.danger",
|
|
88
|
-
soft: "status.danger.soft"
|
|
89
|
-
}
|
|
90
|
-
}, Qn = {
|
|
91
|
-
info: $n,
|
|
92
|
-
success: An,
|
|
93
|
-
warning: Dn,
|
|
94
|
-
danger: Ln
|
|
95
|
-
}, Zn = l("div", {
|
|
96
|
-
shouldForwardProp: (e) => e !== "severity"
|
|
97
|
-
})(({ theme: e, severity: t }) => {
|
|
98
|
-
const { tokens: n, space: r, radii: a, fonts: u, typeScale: s } = e.design, { solid: d, soft: g } = Ge[t];
|
|
99
|
-
return {
|
|
100
|
-
display: "flex",
|
|
101
|
-
alignItems: "flex-start",
|
|
102
|
-
gap: o(r[3]),
|
|
103
|
-
minWidth: 0,
|
|
104
|
-
boxSizing: "border-box",
|
|
105
|
-
padding: `${o(r[3])} ${o(r[3])} ${o(r[3])} ${o(r[4])}`,
|
|
106
|
-
backgroundColor: n[g],
|
|
107
|
-
border: D(n[d]),
|
|
108
|
-
borderRadius: o(a.md),
|
|
109
|
-
color: n["text.primary"],
|
|
110
|
-
fontFamily: u.sans,
|
|
111
|
-
fontSize: o(s.body)
|
|
112
|
-
};
|
|
113
|
-
}), Jn = l("span", {
|
|
114
|
-
shouldForwardProp: (e) => e !== "severity"
|
|
115
|
-
})(({ theme: e, severity: t }) => {
|
|
116
|
-
const { tokens: n, space: r } = e.design;
|
|
117
|
-
return {
|
|
118
|
-
display: "inline-flex",
|
|
119
|
-
flex: "none",
|
|
120
|
-
// Centered on the first line of text.
|
|
121
|
-
paddingTop: o(r[1] / 2),
|
|
122
|
-
color: n[Ge[t].solid],
|
|
123
|
-
"& svg": {
|
|
124
|
-
width: o(r[4] + r[1]),
|
|
125
|
-
height: o(r[4] + r[1])
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}), et = l("div")(({ theme: e }) => ({
|
|
129
|
-
display: "flex",
|
|
130
|
-
flex: "1 1 auto",
|
|
131
|
-
flexWrap: "wrap",
|
|
132
|
-
alignItems: "center",
|
|
133
|
-
columnGap: o(e.design.space[4]),
|
|
134
|
-
rowGap: o(e.design.space[2]),
|
|
135
|
-
minWidth: 0,
|
|
136
|
-
[Z.down(K.Tablet)]: {
|
|
137
|
-
flexDirection: "column",
|
|
138
|
-
alignItems: "flex-start"
|
|
139
|
-
}
|
|
140
|
-
})), nt = l("div")(({ theme: e }) => ({
|
|
141
|
-
display: "flex",
|
|
142
|
-
flexDirection: "column",
|
|
143
|
-
gap: o(e.design.space[1]),
|
|
144
|
-
flex: "1 1 auto",
|
|
145
|
-
minWidth: 0,
|
|
146
|
-
// In the column layout of a narrow screen, `alignItems: flex-start` sizes the text to its content.
|
|
147
|
-
maxWidth: "100%",
|
|
148
|
-
paddingTop: o(e.design.space[1] / 2),
|
|
149
|
-
lineHeight: e.typography.body2.lineHeight,
|
|
150
|
-
overflowWrap: "anywhere"
|
|
151
|
-
})), tt = l("div")({
|
|
152
|
-
minWidth: 0,
|
|
153
|
-
"& pre": {
|
|
154
|
-
maxWidth: "100%",
|
|
155
|
-
overflowX: "auto"
|
|
156
|
-
}
|
|
157
|
-
}), ot = l("strong")({
|
|
158
|
-
display: "block",
|
|
159
|
-
fontWeight: A.semibold
|
|
160
|
-
}), rt = l("div")({
|
|
161
|
-
display: "flex",
|
|
162
|
-
flex: "none",
|
|
163
|
-
alignItems: "center"
|
|
164
|
-
}), it = l(ae)(({ theme: e }) => yn(e));
|
|
165
|
-
function st({
|
|
166
|
-
severity: e,
|
|
167
|
-
title: t,
|
|
168
|
-
children: n,
|
|
169
|
-
action: r,
|
|
170
|
-
onClose: a,
|
|
171
|
-
icon: u
|
|
172
|
-
}) {
|
|
173
|
-
const s = P(), d = N(), g = Qn[e];
|
|
174
|
-
return /* @__PURE__ */ C(
|
|
175
|
-
Zn,
|
|
176
|
-
{
|
|
177
|
-
severity: e,
|
|
178
|
-
role: e === "danger" ? "alert" : "status",
|
|
179
|
-
"aria-labelledby": t !== void 0 ? d : void 0,
|
|
180
|
-
"data-severity": e,
|
|
181
|
-
children: [
|
|
182
|
-
/* @__PURE__ */ i(Jn, { severity: e, "aria-hidden": !0, children: u ?? /* @__PURE__ */ i(g, {}) }),
|
|
183
|
-
/* @__PURE__ */ C(et, { children: [
|
|
184
|
-
/* @__PURE__ */ C(nt, { children: [
|
|
185
|
-
t !== void 0 && /* @__PURE__ */ i(ot, { id: d, children: t }),
|
|
186
|
-
/* @__PURE__ */ i(tt, { children: n })
|
|
187
|
-
] }),
|
|
188
|
-
r !== void 0 && /* @__PURE__ */ i(rt, { children: r })
|
|
189
|
-
] }),
|
|
190
|
-
a !== void 0 && /* @__PURE__ */ i(
|
|
191
|
-
it,
|
|
192
|
-
{
|
|
193
|
-
size: "small",
|
|
194
|
-
"aria-label": s.formatMessage({ id: "ds.states.callout.close" }),
|
|
195
|
-
onClick: a,
|
|
196
|
-
children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 })
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
const U = (e) => e.id ?? e.name, qe = (e, t, n) => (t === void 0 || e.sizeOctet <= t) && xn(e, n), Ue = (e, t, n) => [
|
|
204
|
-
...(e.childFile ?? []).filter(
|
|
205
|
-
(r) => qe(r, t, n)
|
|
206
|
-
),
|
|
207
|
-
...(e.childFolder ?? []).flatMap(
|
|
208
|
-
(r) => Ue(r, t, n)
|
|
209
|
-
)
|
|
210
|
-
], ue = l("div", {
|
|
211
|
-
shouldForwardProp: (e) => e !== "selected"
|
|
212
|
-
})(({ theme: e, selected: t }) => {
|
|
213
|
-
const { tokens: n, space: r, radii: a, densityValues: u, density: s, typeScale: d } = e.design;
|
|
214
|
-
return {
|
|
215
|
-
display: "flex",
|
|
216
|
-
alignItems: "center",
|
|
217
|
-
gap: o(r[1]),
|
|
218
|
-
minHeight: o(u[s].control),
|
|
219
|
-
borderRadius: o(a.md),
|
|
220
|
-
backgroundColor: t ? de(n.accent) : "transparent",
|
|
221
|
-
fontSize: o(d.body),
|
|
222
|
-
color: n["text.primary"],
|
|
223
|
-
...De(e)
|
|
224
|
-
};
|
|
225
|
-
}), Ke = (e) => {
|
|
226
|
-
const { tokens: t, space: n, radii: r, fonts: a } = e.design;
|
|
227
|
-
return {
|
|
228
|
-
flex: "1 1 auto",
|
|
229
|
-
minWidth: 0,
|
|
230
|
-
display: "flex",
|
|
231
|
-
alignItems: "center",
|
|
232
|
-
gap: o(n[2]),
|
|
233
|
-
alignSelf: "stretch",
|
|
234
|
-
margin: 0,
|
|
235
|
-
padding: `0 ${o(n[2])}`,
|
|
236
|
-
border: "none",
|
|
237
|
-
borderRadius: o(r.md),
|
|
238
|
-
background: "none",
|
|
239
|
-
color: "inherit",
|
|
240
|
-
font: "inherit",
|
|
241
|
-
fontFamily: a.sans,
|
|
242
|
-
textAlign: "left",
|
|
243
|
-
cursor: "pointer",
|
|
244
|
-
transition: oe(e, ["background-color"]),
|
|
245
|
-
"&:hover": { backgroundColor: t["bg.hover"] },
|
|
246
|
-
"&:focus-visible": te(e)
|
|
247
|
-
};
|
|
248
|
-
}, Xe = l("button")(({ theme: e }) => Ke(e)), at = l("label")(({ theme: e }) => Ke(e)), Ye = l("span", {
|
|
249
|
-
shouldForwardProp: (e) => e !== "strong"
|
|
250
|
-
})(({ strong: e }) => ({
|
|
251
|
-
flex: "1 1 auto",
|
|
252
|
-
minWidth: 0,
|
|
253
|
-
overflow: "hidden",
|
|
254
|
-
textOverflow: "ellipsis",
|
|
255
|
-
whiteSpace: "nowrap",
|
|
256
|
-
fontWeight: e ? A.medium : A.regular
|
|
257
|
-
})), Qe = l("span")(({ theme: e }) => {
|
|
258
|
-
const { tokens: t, space: n, radii: r } = e.design;
|
|
259
|
-
return {
|
|
260
|
-
display: "inline-flex",
|
|
261
|
-
flex: "none",
|
|
262
|
-
alignItems: "center",
|
|
263
|
-
justifyContent: "center",
|
|
264
|
-
width: o(n[5]),
|
|
265
|
-
height: o(n[5]),
|
|
266
|
-
overflow: "hidden",
|
|
267
|
-
borderRadius: o(r.sm),
|
|
268
|
-
color: t["text.muted"],
|
|
269
|
-
"& svg": { width: o(n[5]), height: o(n[5]) },
|
|
270
|
-
"& img": { width: "100%", height: "100%", objectFit: "cover" }
|
|
271
|
-
};
|
|
272
|
-
}), lt = l(_n, {
|
|
273
|
-
shouldForwardProp: (e) => e !== "open"
|
|
274
|
-
})(({ theme: e, open: t }) => ({
|
|
275
|
-
flex: "none",
|
|
276
|
-
width: o(e.design.space[4]),
|
|
277
|
-
height: o(e.design.space[4]),
|
|
278
|
-
color: e.design.tokens["text.muted"],
|
|
279
|
-
transform: t ? "rotate(90deg)" : "none",
|
|
280
|
-
transition: oe(e, ["transform"])
|
|
281
|
-
})), Ze = l(Pn)(({ theme: e }) => ({
|
|
282
|
-
[Z.down(K.Tablet)]: {
|
|
283
|
-
padding: o(
|
|
284
|
-
(e.design.densityValues.touchTarget - e.design.space[5]) / 2
|
|
285
|
-
)
|
|
286
|
-
}
|
|
287
|
-
})), dt = l("ul")(({ theme: e }) => ({
|
|
288
|
-
margin: 0,
|
|
289
|
-
padding: 0,
|
|
290
|
-
listStyle: "none",
|
|
291
|
-
borderLeft: D(e.design.tokens["border.subtle"]),
|
|
292
|
-
marginLeft: o(e.design.space[3])
|
|
293
|
-
})), Me = l("li")({ listStyle: "none" });
|
|
294
|
-
function Je({
|
|
295
|
-
folders: e,
|
|
296
|
-
files: t,
|
|
297
|
-
context: n
|
|
298
|
-
}) {
|
|
299
|
-
return /* @__PURE__ */ C(J, { children: [
|
|
300
|
-
e.map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(pt, { folder: r, context: n }) }, r.id ?? r.name)),
|
|
301
|
-
t.filter((r) => qe(r, n.maxSize, n.accept)).map((r) => /* @__PURE__ */ i(Me, { children: /* @__PURE__ */ i(ut, { file: r, context: n }) }, U(r)))
|
|
302
|
-
] });
|
|
303
|
-
}
|
|
304
|
-
function ct({
|
|
305
|
-
file: e,
|
|
306
|
-
getFileThumbnailUrl: t
|
|
307
|
-
}) {
|
|
308
|
-
const [n, r] = F(!1), a = e.thumbnailPublicAccessId !== null && !e.isEncrypt && !n ? t(e.thumbnailPublicAccessId) : null;
|
|
309
|
-
return /* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: a !== null ? /* @__PURE__ */ i(
|
|
310
|
-
"img",
|
|
311
|
-
{
|
|
312
|
-
src: a,
|
|
313
|
-
alt: "",
|
|
314
|
-
draggable: !1,
|
|
315
|
-
onError: () => r(!0)
|
|
316
|
-
}
|
|
317
|
-
) : /* @__PURE__ */ i(Hn, {}) });
|
|
318
|
-
}
|
|
319
|
-
function ut({
|
|
320
|
-
file: e,
|
|
321
|
-
context: t
|
|
322
|
-
}) {
|
|
323
|
-
const n = N(), r = t.selectedIds.has(U(e)), a = () => r ? t.unselect([e]) : t.select([e]), u = /* @__PURE__ */ C(J, { children: [
|
|
324
|
-
/* @__PURE__ */ i(
|
|
325
|
-
ct,
|
|
326
|
-
{
|
|
327
|
-
file: e,
|
|
328
|
-
getFileThumbnailUrl: t.getFileThumbnailUrl
|
|
329
|
-
}
|
|
330
|
-
),
|
|
331
|
-
/* @__PURE__ */ i(Ye, { strong: r, title: e.name, children: e.name })
|
|
332
|
-
] });
|
|
333
|
-
return t.multiple ? /* @__PURE__ */ C(ue, { selected: r, children: [
|
|
334
|
-
/* @__PURE__ */ i(
|
|
335
|
-
Ze,
|
|
336
|
-
{
|
|
337
|
-
id: n,
|
|
338
|
-
size: "small",
|
|
339
|
-
checked: r,
|
|
340
|
-
onChange: a
|
|
341
|
-
}
|
|
342
|
-
),
|
|
343
|
-
/* @__PURE__ */ i(at, { htmlFor: n, children: u })
|
|
344
|
-
] }) : /* @__PURE__ */ i(ue, { selected: r, children: /* @__PURE__ */ i(Xe, { type: "button", "aria-pressed": r, onClick: a, children: u }) });
|
|
345
|
-
}
|
|
346
|
-
function pt({
|
|
347
|
-
folder: e,
|
|
348
|
-
context: t
|
|
349
|
-
}) {
|
|
350
|
-
const n = P(), r = N(), [a, u] = F(!1), s = Ue(e, t.maxSize, t.accept), d = s.filter(
|
|
351
|
-
(h) => t.selectedIds.has(U(h))
|
|
352
|
-
).length, g = s.length > 0 && d === s.length;
|
|
353
|
-
return /* @__PURE__ */ C(J, { children: [
|
|
354
|
-
/* @__PURE__ */ C(ue, { selected: g, children: [
|
|
355
|
-
t.multiple && /* @__PURE__ */ i(
|
|
356
|
-
Ze,
|
|
357
|
-
{
|
|
358
|
-
size: "small",
|
|
359
|
-
checked: g,
|
|
360
|
-
indeterminate: d > 0 && !g,
|
|
361
|
-
disabled: s.length === 0,
|
|
362
|
-
onChange: () => g ? t.unselect(s) : t.select(s),
|
|
363
|
-
inputProps: {
|
|
364
|
-
"aria-label": n.formatMessage(
|
|
365
|
-
{ id: "ds.business.cloud-import.select-folder" },
|
|
366
|
-
{ name: e.name }
|
|
367
|
-
)
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
),
|
|
371
|
-
/* @__PURE__ */ C(
|
|
372
|
-
Xe,
|
|
373
|
-
{
|
|
374
|
-
type: "button",
|
|
375
|
-
"aria-expanded": a,
|
|
376
|
-
"aria-controls": a ? r : void 0,
|
|
377
|
-
onClick: () => u(!a),
|
|
378
|
-
children: [
|
|
379
|
-
/* @__PURE__ */ i(lt, { open: a, "aria-hidden": !0 }),
|
|
380
|
-
/* @__PURE__ */ i(Qe, { "aria-hidden": !0, children: a ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(Nn, {}) }),
|
|
381
|
-
/* @__PURE__ */ i(Ye, { strong: g, title: e.name, children: e.name })
|
|
382
|
-
]
|
|
383
|
-
}
|
|
384
|
-
)
|
|
385
|
-
] }),
|
|
386
|
-
a && /* @__PURE__ */ i(dt, { id: r, children: /* @__PURE__ */ i(
|
|
387
|
-
Je,
|
|
388
|
-
{
|
|
389
|
-
folders: e.childFolder ?? [],
|
|
390
|
-
files: e.childFile ?? [],
|
|
391
|
-
context: t
|
|
392
|
-
}
|
|
393
|
-
) })
|
|
394
|
-
] });
|
|
395
|
-
}
|
|
396
|
-
const Oe = "shared", Te = {
|
|
397
|
-
"org-common": 0,
|
|
398
|
-
"perso-in-org": 1,
|
|
399
|
-
project: 2,
|
|
400
|
-
personal: 3
|
|
401
|
-
}, gt = l("div")(({ theme: e }) => ({
|
|
402
|
-
display: "flex",
|
|
403
|
-
flexDirection: "column",
|
|
404
|
-
gap: o(e.design.space[3]),
|
|
405
|
-
minWidth: 0
|
|
406
|
-
})), ft = l("div")(({ theme: e }) => ({
|
|
407
|
-
display: "flex",
|
|
408
|
-
alignItems: "flex-end",
|
|
409
|
-
gap: o(e.design.space[2]),
|
|
410
|
-
minWidth: 0,
|
|
411
|
-
// The Space field takes the room the two icon buttons leave.
|
|
412
|
-
[`& > .${Se.root}`]: { flex: "1 1 auto", minWidth: 0 },
|
|
413
|
-
[`& > :not(.${Se.root})`]: { flex: "none" }
|
|
414
|
-
})), mt = l("p")(({ theme: e }) => ({
|
|
415
|
-
margin: 0,
|
|
416
|
-
fontSize: o(e.design.typeScale.small),
|
|
417
|
-
color: e.design.tokens["text.muted"]
|
|
418
|
-
})), ht = l("ul")(({ theme: e }) => {
|
|
419
|
-
const { tokens: t, space: n, radii: r } = e.design;
|
|
420
|
-
return {
|
|
421
|
-
margin: 0,
|
|
422
|
-
padding: o(n[1]),
|
|
423
|
-
listStyle: "none",
|
|
424
|
-
minHeight: o(n[10] * 3),
|
|
425
|
-
border: D(t["border.subtle"]),
|
|
426
|
-
borderRadius: o(r.md)
|
|
427
|
-
};
|
|
428
|
-
}), ne = l("div")(({ theme: e }) => {
|
|
429
|
-
const { tokens: t, space: n, typeScale: r } = e.design;
|
|
430
|
-
return {
|
|
431
|
-
display: "flex",
|
|
432
|
-
flexDirection: "column",
|
|
433
|
-
alignItems: "center",
|
|
434
|
-
justifyContent: "center",
|
|
435
|
-
gap: o(n[3]),
|
|
436
|
-
minHeight: o(n[10] * 3),
|
|
437
|
-
padding: o(n[5]),
|
|
438
|
-
textAlign: "center",
|
|
439
|
-
fontSize: o(r.body),
|
|
440
|
-
color: t["text.secondary"],
|
|
441
|
-
"& > svg": {
|
|
442
|
-
width: o(n[7]),
|
|
443
|
-
height: o(n[7]),
|
|
444
|
-
color: t["text.muted"]
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
}), bt = l("span")(({ theme: e }) => {
|
|
448
|
-
const { tokens: t, space: n, radii: r } = e.design;
|
|
449
|
-
return {
|
|
450
|
-
display: "inline-flex",
|
|
451
|
-
alignItems: "center",
|
|
452
|
-
justifyContent: "center",
|
|
453
|
-
width: o(n[9] + n[2]),
|
|
454
|
-
height: o(n[9] + n[2]),
|
|
455
|
-
borderRadius: o(r.lg),
|
|
456
|
-
backgroundColor: de(t["status.warning"]),
|
|
457
|
-
color: t["status.warning"],
|
|
458
|
-
"& svg": { width: o(n[6]), height: o(n[6]) }
|
|
459
|
-
};
|
|
460
|
-
}), yt = l("p")(({ theme: e }) => ({
|
|
461
|
-
margin: 0,
|
|
462
|
-
fontWeight: A.semibold,
|
|
463
|
-
color: e.design.tokens["text.primary"]
|
|
464
|
-
})), vt = l("p")({ margin: 0 }), wt = l("div")(({ theme: e }) => ({
|
|
465
|
-
display: "flex",
|
|
466
|
-
flexWrap: "wrap",
|
|
467
|
-
alignItems: "center",
|
|
468
|
-
justifyContent: "space-between",
|
|
469
|
-
gap: o(e.design.space[3])
|
|
470
|
-
})), xt = l("span")(({ theme: e }) => ({
|
|
471
|
-
fontSize: o(e.design.typeScale.body),
|
|
472
|
-
color: e.design.tokens["text.secondary"]
|
|
473
|
-
})), Ct = l("li")(({ theme: e }) => ({
|
|
474
|
-
display: "flex",
|
|
475
|
-
alignItems: "center",
|
|
476
|
-
gap: o(e.design.space[2]),
|
|
477
|
-
...De(e)
|
|
478
|
-
})), kt = l("span")({
|
|
479
|
-
display: "flex",
|
|
480
|
-
flexDirection: "column",
|
|
481
|
-
minWidth: 0
|
|
482
|
-
}), St = l("span")({
|
|
483
|
-
overflow: "hidden",
|
|
484
|
-
textOverflow: "ellipsis",
|
|
485
|
-
whiteSpace: "nowrap"
|
|
486
|
-
}), It = l("span")(({ theme: e }) => ({
|
|
487
|
-
fontSize: o(e.design.typeScale.caption),
|
|
488
|
-
color: e.design.tokens["text.muted"],
|
|
489
|
-
// A narrow screen wraps it: the scope and the organization tell same-named Spaces apart.
|
|
490
|
-
overflowWrap: "anywhere"
|
|
491
|
-
})), en = l("span")(({ theme: e }) => {
|
|
492
|
-
const { tokens: t, space: n, radii: r } = e.design;
|
|
493
|
-
return {
|
|
494
|
-
display: "inline-flex",
|
|
495
|
-
flex: "none",
|
|
496
|
-
alignItems: "center",
|
|
497
|
-
justifyContent: "center",
|
|
498
|
-
minWidth: o(n[5]),
|
|
499
|
-
height: o(n[5]),
|
|
500
|
-
borderRadius: o(r.sm),
|
|
501
|
-
color: t["accent.text"],
|
|
502
|
-
"& > svg": { width: o(n[4]), height: o(n[4]) }
|
|
503
|
-
};
|
|
504
|
-
}), Ft = l(en)(({ theme: e }) => ({
|
|
505
|
-
marginRight: o(e.design.space[2])
|
|
506
|
-
})), Wt = l("li")({ listStyle: "none" }), Mt = l("div")(({ theme: e }) => {
|
|
507
|
-
const { space: t, tokens: n, typeScale: r } = e.design;
|
|
508
|
-
return {
|
|
509
|
-
padding: `${o(t[2])} ${o(t[3])} ${o(t[1])}`,
|
|
510
|
-
fontSize: o(r.caption),
|
|
511
|
-
fontWeight: A.semibold,
|
|
512
|
-
letterSpacing: "0.05em",
|
|
513
|
-
textTransform: "uppercase",
|
|
514
|
-
color: n["text.muted"]
|
|
515
|
-
};
|
|
516
|
-
}), Ot = l("ul")({ margin: 0, padding: 0 });
|
|
517
|
-
function Tt({
|
|
518
|
-
cloudPicker: e,
|
|
519
|
-
onImport: t,
|
|
520
|
-
multiple: n = !1,
|
|
521
|
-
maxSize: r,
|
|
522
|
-
accept: a
|
|
523
|
-
}) {
|
|
524
|
-
const {
|
|
525
|
-
abyssCloudUrl: u,
|
|
526
|
-
getFileThumbnailUrl: s,
|
|
527
|
-
getSpaceDisplay: d,
|
|
528
|
-
clouds: g,
|
|
529
|
-
cloudShares: h,
|
|
530
|
-
isLoading: b,
|
|
531
|
-
hasError: m,
|
|
532
|
-
refresh: f,
|
|
533
|
-
onCreateCloud: w,
|
|
534
|
-
fetchCloudRepository: c
|
|
535
|
-
} = e, p = P(), [y, v] = F(null), [W, M] = F(null), [O, S] = F(
|
|
536
|
-
"loading"
|
|
537
|
-
/* Loading */
|
|
538
|
-
), [T, z] = F([]), [R, ee] = F(!1), [re, _] = F(!1), j = ge(() => {
|
|
539
|
-
const x = [], I = /* @__PURE__ */ new Map(), k = p.formatMessage({
|
|
540
|
-
id: "ds.business.cloud-import.section-organization"
|
|
541
|
-
});
|
|
542
|
-
for (const E of g ?? []) {
|
|
543
|
-
if (!E.organizationId) {
|
|
544
|
-
x.push(E);
|
|
545
|
-
continue;
|
|
546
|
-
}
|
|
547
|
-
const $ = d == null ? void 0 : d(E), B = I.get(E.organizationId) ?? {
|
|
548
|
-
name: ($ == null ? void 0 : $.organizationName) ?? k,
|
|
549
|
-
items: []
|
|
550
|
-
};
|
|
551
|
-
B.items.push(E), I.set(E.organizationId, B);
|
|
552
|
-
}
|
|
553
|
-
if (d)
|
|
554
|
-
for (const E of I.values())
|
|
555
|
-
E.items.sort(($, B) => {
|
|
556
|
-
const L = Te[d($).scope ?? "personal"], xe = Te[d(B).scope ?? "personal"];
|
|
557
|
-
return L !== xe ? L - xe : d($).label.localeCompare(d(B).label);
|
|
558
|
-
});
|
|
559
|
-
const H = (E, $) => (B) => {
|
|
560
|
-
const L = d == null ? void 0 : d(B);
|
|
561
|
-
return {
|
|
562
|
-
space: B,
|
|
563
|
-
sectionKey: E,
|
|
564
|
-
sectionLabel: $,
|
|
565
|
-
label: (L == null ? void 0 : L.label) ?? kn(B, p),
|
|
566
|
-
subtitle: L == null ? void 0 : L.subtitle,
|
|
567
|
-
avatar: L == null ? void 0 : L.avatar
|
|
568
|
-
};
|
|
569
|
-
};
|
|
570
|
-
return [
|
|
571
|
-
...x.map(
|
|
572
|
-
H(
|
|
573
|
-
"personal",
|
|
574
|
-
p.formatMessage({
|
|
575
|
-
id: "ds.business.cloud-import.section-personal"
|
|
576
|
-
})
|
|
577
|
-
)
|
|
578
|
-
),
|
|
579
|
-
...[...I].flatMap(
|
|
580
|
-
([E, $]) => $.items.map(H(`org:${E}`, $.name))
|
|
581
|
-
),
|
|
582
|
-
...(h ?? []).map(
|
|
583
|
-
H(
|
|
584
|
-
Oe,
|
|
585
|
-
p.formatMessage({ id: "ds.business.cloud-import.section-shared" })
|
|
586
|
-
)
|
|
587
|
-
)
|
|
588
|
-
];
|
|
589
|
-
}, [g, h, d, p]), G = j.find((x) => x.space.id === (y == null ? void 0 : y.id)) ?? null, ce = X(0), he = X(c);
|
|
590
|
-
he.current = c;
|
|
591
|
-
const ie = Q(async (x) => {
|
|
592
|
-
const I = ++ce.current;
|
|
593
|
-
S(
|
|
594
|
-
"loading"
|
|
595
|
-
/* Loading */
|
|
596
|
-
), z([]);
|
|
597
|
-
try {
|
|
598
|
-
if (x.id === void 0)
|
|
599
|
-
throw new Error("A Space without an id has no tree");
|
|
600
|
-
const k = await he.current(x.id);
|
|
601
|
-
I === ce.current && (M(k), S(
|
|
602
|
-
"ready"
|
|
603
|
-
/* Ready */
|
|
604
|
-
));
|
|
605
|
-
} catch {
|
|
606
|
-
I === ce.current && S(
|
|
607
|
-
"failed"
|
|
608
|
-
/* Failed */
|
|
609
|
-
);
|
|
610
|
-
}
|
|
611
|
-
}, []), dn = X(f);
|
|
612
|
-
V(() => {
|
|
613
|
-
dn.current();
|
|
614
|
-
}, []), V(() => {
|
|
615
|
-
if (y && j.some((k) => k.space.id === y.id))
|
|
616
|
-
return;
|
|
617
|
-
const x = j.map((k) => k.space), I = x.find(
|
|
618
|
-
(k) => !!k.userId && !k.organizationId && !k.projectId
|
|
619
|
-
);
|
|
620
|
-
v(I ?? x[0] ?? null);
|
|
621
|
-
}, [j, y]), V(() => {
|
|
622
|
-
y && ie(y);
|
|
623
|
-
}, [y, ie]);
|
|
624
|
-
const cn = async () => {
|
|
625
|
-
if (_(!1), !await f()) {
|
|
626
|
-
_(!0);
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
y && await ie(y);
|
|
630
|
-
}, un = async () => {
|
|
631
|
-
ee(!0);
|
|
632
|
-
try {
|
|
633
|
-
await w();
|
|
634
|
-
} finally {
|
|
635
|
-
ee(!1);
|
|
636
|
-
}
|
|
637
|
-
}, pn = {
|
|
638
|
-
multiple: n,
|
|
639
|
-
maxSize: r,
|
|
640
|
-
accept: a,
|
|
641
|
-
selectedIds: new Set(T.map(U)),
|
|
642
|
-
getFileThumbnailUrl: s,
|
|
643
|
-
select: (x) => z((I) => {
|
|
644
|
-
if (!n)
|
|
645
|
-
return x.slice(0, 1);
|
|
646
|
-
const k = new Set(I.map(U));
|
|
647
|
-
return [
|
|
648
|
-
...I,
|
|
649
|
-
...x.filter((H) => !k.has(U(H)))
|
|
650
|
-
];
|
|
651
|
-
}),
|
|
652
|
-
unselect: (x) => {
|
|
653
|
-
const I = new Set(x.map(U));
|
|
654
|
-
z(
|
|
655
|
-
(k) => k.filter((H) => !I.has(U(H)))
|
|
656
|
-
);
|
|
657
|
-
}
|
|
658
|
-
}, gn = g !== null && h !== null, be = /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
659
|
-
Ie,
|
|
660
|
-
{
|
|
661
|
-
size: 32,
|
|
662
|
-
"aria-label": p.formatMessage({
|
|
663
|
-
id: "ds.business.cloud-import.loading"
|
|
664
|
-
})
|
|
665
|
-
}
|
|
666
|
-
) });
|
|
667
|
-
if (!gn && (b || !m))
|
|
668
|
-
return be;
|
|
669
|
-
if (j.length === 0)
|
|
670
|
-
return /* @__PURE__ */ C(ne, { children: [
|
|
671
|
-
/* @__PURE__ */ i(bt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Tn, {}) }),
|
|
672
|
-
/* @__PURE__ */ i(yt, { children: p.formatMessage({
|
|
673
|
-
id: "ds.business.cloud-import.create-error.title"
|
|
674
|
-
}) }),
|
|
675
|
-
/* @__PURE__ */ i(vt, { children: p.formatMessage({
|
|
676
|
-
id: "ds.business.cloud-import.create-error.description"
|
|
677
|
-
}) }),
|
|
678
|
-
/* @__PURE__ */ i(
|
|
679
|
-
Y,
|
|
680
|
-
{
|
|
681
|
-
variant: "contained",
|
|
682
|
-
startIcon: /* @__PURE__ */ i(We, { "aria-hidden": !0 }),
|
|
683
|
-
loading: R || b,
|
|
684
|
-
onClick: () => void un(),
|
|
685
|
-
children: p.formatMessage({
|
|
686
|
-
id: "ds.business.cloud-import.create-error.create-button"
|
|
687
|
-
})
|
|
688
|
-
}
|
|
689
|
-
)
|
|
690
|
-
] });
|
|
691
|
-
if (G === null)
|
|
692
|
-
return be;
|
|
693
|
-
const fn = Cn(
|
|
694
|
-
u,
|
|
695
|
-
G.space,
|
|
696
|
-
G.sectionKey === Oe
|
|
697
|
-
), ye = p.formatMessage({
|
|
698
|
-
id: "ds.business.cloud-import.refresh"
|
|
699
|
-
}), ve = p.formatMessage({
|
|
700
|
-
id: "ds.business.cloud-import.open-in-cloud"
|
|
701
|
-
}), we = (x) => x.avatar ?? /* @__PURE__ */ i(We, {});
|
|
702
|
-
return /* @__PURE__ */ C(gt, { children: [
|
|
703
|
-
re && /* @__PURE__ */ i(
|
|
704
|
-
st,
|
|
705
|
-
{
|
|
706
|
-
severity: je.Danger,
|
|
707
|
-
onClose: () => _(!1),
|
|
708
|
-
children: p.formatMessage({ id: "ds.business.cloud-import.refresh-error" })
|
|
709
|
-
}
|
|
710
|
-
),
|
|
711
|
-
/* @__PURE__ */ C(ft, { children: [
|
|
712
|
-
/* @__PURE__ */ i(
|
|
713
|
-
On,
|
|
714
|
-
{
|
|
715
|
-
fullWidth: !0,
|
|
716
|
-
disableClearable: !0,
|
|
717
|
-
options: j,
|
|
718
|
-
value: G,
|
|
719
|
-
groupBy: (x) => x.sectionLabel,
|
|
720
|
-
getOptionLabel: (x) => x.label,
|
|
721
|
-
isOptionEqualToValue: (x, I) => x.space.id === I.space.id,
|
|
722
|
-
onChange: (x, I) => v(I.space),
|
|
723
|
-
filterOptions: (x, { inputValue: I }) => {
|
|
724
|
-
const k = I.trim().toLowerCase();
|
|
725
|
-
return k === "" || k === G.label.toLowerCase() ? x : x.filter(
|
|
726
|
-
(H) => [H.label, H.subtitle ?? ""].some(
|
|
727
|
-
(E) => E.toLowerCase().includes(k)
|
|
728
|
-
)
|
|
729
|
-
);
|
|
730
|
-
},
|
|
731
|
-
renderGroup: (x) => /* @__PURE__ */ C(Wt, { children: [
|
|
732
|
-
/* @__PURE__ */ i(Mt, { children: x.group }),
|
|
733
|
-
/* @__PURE__ */ i(Ot, { children: x.children })
|
|
734
|
-
] }, x.key),
|
|
735
|
-
renderOption: ({ key: x, ...I }, k) => /* @__PURE__ */ C(Ct, { ...I, children: [
|
|
736
|
-
/* @__PURE__ */ i(en, { "aria-hidden": !0, children: we(k) }),
|
|
737
|
-
/* @__PURE__ */ C(kt, { children: [
|
|
738
|
-
/* @__PURE__ */ i(St, { children: k.label }),
|
|
739
|
-
k.subtitle !== void 0 && /* @__PURE__ */ i(It, { children: k.subtitle })
|
|
740
|
-
] })
|
|
741
|
-
] }, x),
|
|
742
|
-
renderInput: (x) => /* @__PURE__ */ i(
|
|
743
|
-
Ve,
|
|
744
|
-
{
|
|
745
|
-
label: p.formatMessage({
|
|
746
|
-
id: "ds.business.cloud-import.space-label"
|
|
747
|
-
}),
|
|
748
|
-
children: /* @__PURE__ */ i(
|
|
749
|
-
me,
|
|
750
|
-
{
|
|
751
|
-
...x.InputProps,
|
|
752
|
-
id: x.id,
|
|
753
|
-
fullWidth: !0,
|
|
754
|
-
inputProps: x.inputProps,
|
|
755
|
-
startAdornment: /* @__PURE__ */ i(Ft, { "aria-hidden": !0, children: we(G) })
|
|
756
|
-
}
|
|
757
|
-
)
|
|
758
|
-
}
|
|
759
|
-
)
|
|
760
|
-
}
|
|
761
|
-
),
|
|
762
|
-
/* @__PURE__ */ i(Fe, { title: ye, children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
763
|
-
ae,
|
|
764
|
-
{
|
|
765
|
-
"aria-label": ye,
|
|
766
|
-
disabled: O === "loading" || b,
|
|
767
|
-
onClick: () => void cn(),
|
|
768
|
-
children: /* @__PURE__ */ i(zn, { "aria-hidden": !0 })
|
|
769
|
-
}
|
|
770
|
-
) }) }),
|
|
771
|
-
/* @__PURE__ */ i(Fe, { title: ve, children: /* @__PURE__ */ i(
|
|
772
|
-
ae,
|
|
773
|
-
{
|
|
774
|
-
component: "a",
|
|
775
|
-
href: fn,
|
|
776
|
-
target: "_blank",
|
|
777
|
-
rel: "noreferrer",
|
|
778
|
-
"aria-label": ve,
|
|
779
|
-
children: /* @__PURE__ */ i(En, { "aria-hidden": !0 })
|
|
780
|
-
}
|
|
781
|
-
) })
|
|
782
|
-
] }),
|
|
783
|
-
/* @__PURE__ */ i(mt, { children: p.formatMessage({ id: "ds.business.cloud-import.filtered-hint" }) }),
|
|
784
|
-
O === "loading" && /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(
|
|
785
|
-
Ie,
|
|
786
|
-
{
|
|
787
|
-
size: 24,
|
|
788
|
-
"aria-label": p.formatMessage({
|
|
789
|
-
id: "ds.business.cloud-import.tree-loading"
|
|
790
|
-
})
|
|
791
|
-
}
|
|
792
|
-
) }),
|
|
793
|
-
O === "failed" && /* @__PURE__ */ C(ne, { role: "alert", children: [
|
|
794
|
-
p.formatMessage({ id: "ds.business.cloud-import.tree-error" }),
|
|
795
|
-
/* @__PURE__ */ i(
|
|
796
|
-
Y,
|
|
797
|
-
{
|
|
798
|
-
variant: "outlined",
|
|
799
|
-
onClick: () => void ie(G.space),
|
|
800
|
-
children: p.formatMessage({ id: "ds.business.cloud-import.retry" })
|
|
801
|
-
}
|
|
802
|
-
)
|
|
803
|
-
] }),
|
|
804
|
-
O === "ready" && W !== null && (W.folders.length === 0 && W.files.length === 0 ? /* @__PURE__ */ C(ne, { children: [
|
|
805
|
-
/* @__PURE__ */ i(Ne, { "aria-hidden": !0 }),
|
|
806
|
-
p.formatMessage({ id: "ds.business.cloud-import.empty-space" })
|
|
807
|
-
] }) : /* @__PURE__ */ i(
|
|
808
|
-
ht,
|
|
809
|
-
{
|
|
810
|
-
"aria-label": p.formatMessage({
|
|
811
|
-
id: "ds.business.cloud-import.tree-label"
|
|
812
|
-
}),
|
|
813
|
-
children: /* @__PURE__ */ i(
|
|
814
|
-
Je,
|
|
815
|
-
{
|
|
816
|
-
folders: W.folders,
|
|
817
|
-
files: W.files,
|
|
818
|
-
context: pn
|
|
819
|
-
}
|
|
820
|
-
)
|
|
821
|
-
}
|
|
822
|
-
)),
|
|
823
|
-
/* @__PURE__ */ C(wt, { children: [
|
|
824
|
-
/* @__PURE__ */ i(xt, { role: "status", children: p.formatMessage(
|
|
825
|
-
{ id: "ds.business.cloud-import.selected" },
|
|
826
|
-
{ count: T.length }
|
|
827
|
-
) }),
|
|
828
|
-
/* @__PURE__ */ i(
|
|
829
|
-
Y,
|
|
830
|
-
{
|
|
831
|
-
variant: "contained",
|
|
832
|
-
startIcon: /* @__PURE__ */ i(Rn, { "aria-hidden": !0 }),
|
|
833
|
-
disabled: T.length === 0,
|
|
834
|
-
onClick: () => t(G.space, T),
|
|
835
|
-
children: p.formatMessage({ id: "ds.business.cloud-import.import" })
|
|
836
|
-
}
|
|
837
|
-
)
|
|
838
|
-
] })
|
|
839
|
-
] });
|
|
840
|
-
}
|
|
841
|
-
function Rt({
|
|
842
|
-
open: e,
|
|
843
|
-
onClose: t,
|
|
844
|
-
onImport: n,
|
|
845
|
-
cloudPicker: r,
|
|
846
|
-
multiple: a,
|
|
847
|
-
maxSize: u,
|
|
848
|
-
accept: s
|
|
849
|
-
}) {
|
|
850
|
-
const d = P();
|
|
851
|
-
return /* @__PURE__ */ i(
|
|
852
|
-
Pe,
|
|
853
|
-
{
|
|
854
|
-
open: e,
|
|
855
|
-
onClose: t,
|
|
856
|
-
size: He.Medium,
|
|
857
|
-
title: d.formatMessage({ id: "ds.business.cloud-import.title" }),
|
|
858
|
-
children: e && /* @__PURE__ */ i(
|
|
859
|
-
Tt,
|
|
860
|
-
{
|
|
861
|
-
cloudPicker: r,
|
|
862
|
-
multiple: a,
|
|
863
|
-
maxSize: u,
|
|
864
|
-
accept: s,
|
|
865
|
-
onImport: (g, h) => {
|
|
866
|
-
n(g, h), t();
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
)
|
|
870
|
-
}
|
|
871
|
-
);
|
|
872
|
-
}
|
|
873
|
-
var nn = /* @__PURE__ */ ((e) => (e.Medium = "medium", e.Compact = "compact", e))(nn || {});
|
|
874
|
-
const Et = ze(
|
|
875
|
-
"medium"
|
|
876
|
-
/* Medium */
|
|
877
|
-
), zt = l(le)(({ theme: e }) => ({
|
|
878
|
-
// Three times the largest spacing step: room for a label and the arrow.
|
|
879
|
-
minWidth: o(e.design.space[10] * 3),
|
|
880
|
-
maxWidth: "100%"
|
|
881
|
-
})), At = l($e)(({ theme: e }) => ({
|
|
882
|
-
position: "relative",
|
|
883
|
-
transform: "none",
|
|
884
|
-
maxWidth: "100%",
|
|
885
|
-
pointerEvents: "auto",
|
|
886
|
-
marginBottom: o(e.design.space[2]),
|
|
887
|
-
fontSize: o(e.design.typeScale.small),
|
|
888
|
-
fontWeight: A.medium,
|
|
889
|
-
lineHeight: e.typography.caption.lineHeight,
|
|
890
|
-
color: e.design.tokens["text.secondary"],
|
|
891
|
-
"&.Mui-focused": { color: e.design.tokens["text.secondary"] },
|
|
892
|
-
"&.Mui-error": { color: e.design.tokens["status.danger"] },
|
|
893
|
-
"&.Mui-disabled": { color: e.design.tokens["text.muted"] }
|
|
894
|
-
})), Lt = l("span")(({ theme: e }) => ({
|
|
895
|
-
display: "flex",
|
|
896
|
-
alignItems: "center",
|
|
897
|
-
gap: o(e.design.space[2]),
|
|
898
|
-
minWidth: 0
|
|
899
|
-
})), $t = l("i", {
|
|
900
|
-
shouldForwardProp: (e) => e !== "token"
|
|
901
|
-
})(({ theme: e, token: t }) => ({
|
|
902
|
-
flex: "none",
|
|
903
|
-
width: o(e.design.space[2]),
|
|
904
|
-
height: o(e.design.space[2]),
|
|
905
|
-
borderRadius: o(e.design.radii.sm / 2),
|
|
906
|
-
backgroundColor: e.design.tokens[t]
|
|
907
|
-
})), Dt = l("span")({
|
|
908
|
-
display: "flex",
|
|
909
|
-
flexDirection: "column",
|
|
910
|
-
minWidth: 0
|
|
911
|
-
}), Pt = l("span")(({ theme: e }) => ({
|
|
912
|
-
fontSize: o(e.design.typeScale.caption),
|
|
913
|
-
color: e.design.tokens["text.muted"],
|
|
914
|
-
whiteSpace: "normal"
|
|
915
|
-
})), pe = l("span")({
|
|
916
|
-
overflow: "hidden",
|
|
917
|
-
textOverflow: "ellipsis",
|
|
918
|
-
whiteSpace: "nowrap"
|
|
919
|
-
}), Ht = l(pe)(({ theme: e }) => ({
|
|
920
|
-
color: e.design.tokens["text.muted"]
|
|
921
|
-
}));
|
|
922
|
-
function xr({
|
|
923
|
-
label: e,
|
|
924
|
-
options: t,
|
|
925
|
-
value: n,
|
|
926
|
-
onChange: r,
|
|
927
|
-
multiple: a = !1,
|
|
928
|
-
disabled: u,
|
|
929
|
-
error: s,
|
|
930
|
-
size: d
|
|
931
|
-
}) {
|
|
932
|
-
const g = P(), h = Ae(Et), b = (d ?? h) === nn.Compact, m = b ? zt : le, f = N(), w = `${f}-label`, c = `${f}-helper`, p = new Map(t.map((v) => [v.value, v]));
|
|
933
|
-
return /* @__PURE__ */ C(m, { fullWidth: !b, disabled: u, error: !!s, children: [
|
|
934
|
-
/* @__PURE__ */ i(
|
|
935
|
-
At,
|
|
936
|
-
{
|
|
937
|
-
id: w,
|
|
938
|
-
shrink: !0,
|
|
939
|
-
style: b ? fe : void 0,
|
|
940
|
-
children: e
|
|
941
|
-
}
|
|
942
|
-
),
|
|
943
|
-
/* @__PURE__ */ C(
|
|
944
|
-
hn,
|
|
945
|
-
{
|
|
946
|
-
labelId: w,
|
|
947
|
-
multiple: a,
|
|
948
|
-
value: n,
|
|
949
|
-
displayEmpty: !0,
|
|
950
|
-
renderValue: (v) => {
|
|
951
|
-
const W = Array.isArray(v) ? v : [v];
|
|
952
|
-
return b && W.length === 0 ? /* @__PURE__ */ i(Ht, { "aria-hidden": !0, children: e }) : /* @__PURE__ */ i(pe, { children: W.map((M) => {
|
|
953
|
-
var O;
|
|
954
|
-
return ((O = p.get(M)) == null ? void 0 : O.label) ?? M;
|
|
955
|
-
}).join(", ") });
|
|
956
|
-
},
|
|
957
|
-
"aria-describedby": s ? c : void 0,
|
|
958
|
-
onChange: (v) => r(v.target.value),
|
|
959
|
-
children: [
|
|
960
|
-
t.length === 0 && /* @__PURE__ */ i(Ce, { disabled: !0, value: "", children: g.formatMessage({ id: "ds.inputs.rich-select.empty" }) }),
|
|
961
|
-
t.map((v) => /* @__PURE__ */ i(Ce, { value: v.value, children: /* @__PURE__ */ C(Lt, { children: [
|
|
962
|
-
v.tone && /* @__PURE__ */ i($t, { token: v.tone }),
|
|
963
|
-
v.icon,
|
|
964
|
-
/* @__PURE__ */ C(Dt, { children: [
|
|
965
|
-
/* @__PURE__ */ i(pe, { children: v.label }),
|
|
966
|
-
v.description && /* @__PURE__ */ i(Pt, { children: v.description })
|
|
967
|
-
] })
|
|
968
|
-
] }) }, v.value))
|
|
969
|
-
]
|
|
970
|
-
}
|
|
971
|
-
),
|
|
972
|
-
s && /* @__PURE__ */ i(se, { id: c, children: s })
|
|
973
|
-
] });
|
|
974
|
-
}
|
|
975
|
-
const Nt = l("div")(({ theme: e }) => ({
|
|
976
|
-
display: "flex",
|
|
977
|
-
flexDirection: "column",
|
|
978
|
-
gap: o(e.design.space[2]),
|
|
979
|
-
minWidth: 0
|
|
980
|
-
})), _t = l("span")(({ theme: e }) => ({
|
|
981
|
-
fontSize: o(e.design.typeScale.small),
|
|
982
|
-
fontWeight: A.medium,
|
|
983
|
-
color: e.design.tokens["text.secondary"]
|
|
984
|
-
})), Bt = l("div", {
|
|
985
|
-
shouldForwardProp: (e) => e !== "active"
|
|
986
|
-
})(({ theme: e, active: t }) => {
|
|
987
|
-
const { tokens: n, space: r, radii: a } = e.design;
|
|
988
|
-
return {
|
|
989
|
-
display: "flex",
|
|
990
|
-
flexDirection: "column",
|
|
991
|
-
alignItems: "center",
|
|
992
|
-
justifyContent: "center",
|
|
993
|
-
gap: o(r[3]),
|
|
994
|
-
minHeight: o(r[10] * 3),
|
|
995
|
-
padding: `${o(r[6])} ${o(r[4])}`,
|
|
996
|
-
boxSizing: "border-box",
|
|
997
|
-
border: `1px dashed ${t ? n.accent : n["border.control"]}`,
|
|
998
|
-
borderRadius: o(a.md),
|
|
999
|
-
backgroundColor: t ? de(n.accent) : n["bg.raised"],
|
|
1000
|
-
color: n["text.secondary"],
|
|
1001
|
-
textAlign: "center",
|
|
1002
|
-
cursor: "pointer",
|
|
1003
|
-
transition: oe(e, ["border-color", "background-color"]),
|
|
1004
|
-
"&:hover": { borderColor: n.accent }
|
|
1005
|
-
};
|
|
1006
|
-
}), Vt = l("span")(({ theme: e }) => {
|
|
1007
|
-
const { tokens: t, space: n } = e.design;
|
|
1008
|
-
return {
|
|
1009
|
-
display: "inline-flex",
|
|
1010
|
-
alignItems: "center",
|
|
1011
|
-
justifyContent: "center",
|
|
1012
|
-
width: o(n[9]),
|
|
1013
|
-
height: o(n[9]),
|
|
1014
|
-
borderRadius: "50%",
|
|
1015
|
-
backgroundColor: de(t.accent),
|
|
1016
|
-
color: t["accent.text"],
|
|
1017
|
-
"& svg": { width: o(n[5]), height: o(n[5]) }
|
|
1018
|
-
};
|
|
1019
|
-
}), jt = l("span")(({ theme: e }) => ({
|
|
1020
|
-
fontSize: o(e.design.typeScale.body),
|
|
1021
|
-
[Z.down(K.Tablet)]: { display: "none" }
|
|
1022
|
-
})), Gt = l("div")(({ theme: e }) => ({
|
|
1023
|
-
display: "flex",
|
|
1024
|
-
flexWrap: "wrap",
|
|
1025
|
-
alignItems: "center",
|
|
1026
|
-
justifyContent: "space-between",
|
|
1027
|
-
gap: o(e.design.space[2])
|
|
1028
|
-
})), qt = l("span")(({ theme: e }) => ({
|
|
1029
|
-
fontSize: o(e.design.typeScale.small),
|
|
1030
|
-
color: e.design.tokens["text.muted"]
|
|
1031
|
-
})), Ut = l("p")(({ theme: e }) => ({
|
|
1032
|
-
margin: 0,
|
|
1033
|
-
fontSize: o(e.design.typeScale.small),
|
|
1034
|
-
color: e.design.tokens["status.danger"]
|
|
1035
|
-
})), Kt = l("img")(({ theme: e }) => ({
|
|
1036
|
-
width: o(e.design.space[4]),
|
|
1037
|
-
height: o(e.design.space[4])
|
|
1038
|
-
})), Xt = (e) => {
|
|
1039
|
-
const { value: t, unit: n } = Wn(e);
|
|
1040
|
-
return `${t} ${n}`;
|
|
1041
|
-
};
|
|
1042
|
-
function Cr({
|
|
1043
|
-
onDrop: e,
|
|
1044
|
-
multiple: t = !0,
|
|
1045
|
-
accept: n,
|
|
1046
|
-
maxSize: r,
|
|
1047
|
-
caption: a,
|
|
1048
|
-
title: u,
|
|
1049
|
-
cloudImport: s,
|
|
1050
|
-
children: d
|
|
1051
|
-
}) {
|
|
1052
|
-
const g = P(), h = N(), b = N(), [m, f] = F(null), [w, c] = F(!1), p = r === void 0 ? null : Xt(r), y = a ?? (p === null ? null : g.formatMessage(
|
|
1053
|
-
{ id: "ds.inputs.drop-zone.max-size" },
|
|
1054
|
-
{ size: p, multiple: String(t) }
|
|
1055
|
-
)), v = (z, R) => {
|
|
1056
|
-
const ee = r === void 0 ? [] : z.filter((_) => _.size > r), re = z.filter((_) => !ee.includes(_));
|
|
1057
|
-
R.some(
|
|
1058
|
-
(_) => _.errors.some((j) => j.code === Fn.TooManyFiles)
|
|
1059
|
-
) ? f(
|
|
1060
|
-
"too-many"
|
|
1061
|
-
/* TooMany */
|
|
1062
|
-
) : R.length > 0 ? f(
|
|
1063
|
-
"rejected-type"
|
|
1064
|
-
/* Rejected */
|
|
1065
|
-
) : ee.length > 0 ? f(
|
|
1066
|
-
z.length === 1 ? "too-big" : "some-too-big"
|
|
1067
|
-
/* SomeTooBig */
|
|
1068
|
-
) : f(null), re.length > 0 && e(re);
|
|
1069
|
-
}, { getRootProps: W, getInputProps: M, isDragActive: O, open: S } = Sn({
|
|
1070
|
-
onDrop: v,
|
|
1071
|
-
multiple: t,
|
|
1072
|
-
accept: n,
|
|
1073
|
-
// The zone itself is not a control: the button inside is, for the keyboard and screen readers.
|
|
1074
|
-
noClick: !0,
|
|
1075
|
-
noKeyboard: !0
|
|
1076
|
-
}), T = g.formatMessage(
|
|
1077
|
-
{ id: "ds.inputs.drop-zone.browse" },
|
|
1078
|
-
{ multiple: String(t) }
|
|
1079
|
-
);
|
|
1080
|
-
return /* @__PURE__ */ C(
|
|
1081
|
-
Nt,
|
|
1082
|
-
{
|
|
1083
|
-
role: "group",
|
|
1084
|
-
"aria-labelledby": u !== void 0 ? h : void 0,
|
|
1085
|
-
"aria-describedby": y !== null ? b : void 0,
|
|
1086
|
-
children: [
|
|
1087
|
-
u !== void 0 && /* @__PURE__ */ i(_t, { id: h, children: u }),
|
|
1088
|
-
/* @__PURE__ */ C(Bt, { ...W({ onClick: S }), active: O, children: [
|
|
1089
|
-
/* @__PURE__ */ i("input", { ...M({ "aria-hidden": !0 }) }),
|
|
1090
|
-
d ?? /* @__PURE__ */ C(J, { children: [
|
|
1091
|
-
/* @__PURE__ */ i(Vt, { "aria-hidden": !0, children: /* @__PURE__ */ i(Mn, {}) }),
|
|
1092
|
-
/* @__PURE__ */ i(jt, { children: g.formatMessage(
|
|
1093
|
-
{
|
|
1094
|
-
id: O ? "ds.inputs.drop-zone.release" : "ds.inputs.drop-zone.prompt"
|
|
1095
|
-
},
|
|
1096
|
-
{ multiple: String(t) }
|
|
1097
|
-
) })
|
|
1098
|
-
] }),
|
|
1099
|
-
/* @__PURE__ */ i(
|
|
1100
|
-
Y,
|
|
1101
|
-
{
|
|
1102
|
-
variant: "outlined",
|
|
1103
|
-
onClick: (z) => {
|
|
1104
|
-
z.stopPropagation(), S();
|
|
1105
|
-
},
|
|
1106
|
-
children: T
|
|
1107
|
-
}
|
|
1108
|
-
)
|
|
1109
|
-
] }),
|
|
1110
|
-
(s !== void 0 || y !== null) && /* @__PURE__ */ C(Gt, { children: [
|
|
1111
|
-
s !== void 0 && /* @__PURE__ */ i(
|
|
1112
|
-
Y,
|
|
1113
|
-
{
|
|
1114
|
-
variant: "text",
|
|
1115
|
-
startIcon: /* @__PURE__ */ i(Kt, { src: In, alt: "" }),
|
|
1116
|
-
onClick: () => c(!0),
|
|
1117
|
-
children: g.formatMessage({ id: "ds.inputs.drop-zone.cloud" })
|
|
1118
|
-
}
|
|
1119
|
-
),
|
|
1120
|
-
y !== null && /* @__PURE__ */ i(qt, { id: b, children: y })
|
|
1121
|
-
] }),
|
|
1122
|
-
m !== null && /* @__PURE__ */ i(Ut, { role: "alert", children: g.formatMessage(
|
|
1123
|
-
{ id: `ds.inputs.drop-zone.${m}` },
|
|
1124
|
-
{ size: p ?? "" }
|
|
1125
|
-
) }),
|
|
1126
|
-
s !== void 0 && /* @__PURE__ */ i(
|
|
1127
|
-
Rt,
|
|
1128
|
-
{
|
|
1129
|
-
open: w,
|
|
1130
|
-
onClose: () => c(!1),
|
|
1131
|
-
onImport: s.onImport,
|
|
1132
|
-
cloudPicker: s,
|
|
1133
|
-
multiple: t,
|
|
1134
|
-
maxSize: r,
|
|
1135
|
-
accept: n === void 0 ? void 0 : Object.entries(n).flatMap(([z, R]) => [
|
|
1136
|
-
z,
|
|
1137
|
-
...R
|
|
1138
|
-
])
|
|
1139
|
-
}
|
|
1140
|
-
)
|
|
1141
|
-
]
|
|
1142
|
-
}
|
|
1143
|
-
);
|
|
1144
|
-
}
|
|
1145
|
-
const Yt = 1, Qt = (e, t) => t === "vertical" ? e.scrollHeight - e.clientHeight - e.scrollTop : e.scrollWidth - e.clientWidth - e.scrollLeft, Zt = (e, t, n) => {
|
|
1146
|
-
const [r, a] = F(!1), u = Q(() => {
|
|
1147
|
-
const s = e.current;
|
|
1148
|
-
s !== null && a(Qt(s, t) > Yt);
|
|
1149
|
-
}, [e, t]);
|
|
1150
|
-
return Le(u, [u, n]), V(() => {
|
|
1151
|
-
const s = e.current;
|
|
1152
|
-
if (s === null)
|
|
1153
|
-
return;
|
|
1154
|
-
s.addEventListener("scroll", u, { passive: !0 });
|
|
1155
|
-
const d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
1156
|
-
return d !== null && (d.observe(s), Array.from(s.children).forEach((g) => d.observe(g))), () => {
|
|
1157
|
-
s.removeEventListener("scroll", u), d == null || d.disconnect();
|
|
1158
|
-
};
|
|
1159
|
-
}, [e, u, n]), r;
|
|
1160
|
-
};
|
|
1161
|
-
var Jt = /* @__PURE__ */ ((e) => (e.Default = "default", e.Danger = "danger", e.Warning = "warning", e))(Jt || {});
|
|
1162
|
-
const eo = l("form")(({ theme: e }) => ({
|
|
1163
|
-
display: "flex",
|
|
1164
|
-
flexDirection: "column",
|
|
1165
|
-
gap: o(e.design.space[4]),
|
|
1166
|
-
color: e.design.tokens["text.secondary"],
|
|
1167
|
-
overflowWrap: "anywhere"
|
|
1168
|
-
})), no = (e, t) => {
|
|
1169
|
-
const { paper: n } = e.design.tokens, r = e.design.tokens["paper.on"];
|
|
1170
|
-
return ke(t, n) >= ke(t, r) ? n : r;
|
|
1171
|
-
}, to = {
|
|
1172
|
-
default: "primary",
|
|
1173
|
-
danger: "error",
|
|
1174
|
-
warning: "warning"
|
|
1175
|
-
};
|
|
1176
|
-
function oo({
|
|
1177
|
-
open: e,
|
|
1178
|
-
title: t,
|
|
1179
|
-
body: n,
|
|
1180
|
-
confirmLabel: r,
|
|
1181
|
-
tone: a = "default",
|
|
1182
|
-
confirmationText: u,
|
|
1183
|
-
onConfirm: s,
|
|
1184
|
-
onCancel: d
|
|
1185
|
-
}) {
|
|
1186
|
-
const g = P(), h = bn(), b = N(), [m, f] = F(""), [w, c] = F(!1), [p, y] = F(!1), [v, W] = F(e);
|
|
1187
|
-
e !== v && (W(e), e && (f(""), y(!1)));
|
|
1188
|
-
const M = !w && (u === void 0 || m === u), O = a !== "default", S = () => {
|
|
1189
|
-
w || d();
|
|
1190
|
-
}, T = () => {
|
|
1191
|
-
if (!M)
|
|
1192
|
-
return;
|
|
1193
|
-
y(!1);
|
|
1194
|
-
let R;
|
|
1195
|
-
try {
|
|
1196
|
-
R = s();
|
|
1197
|
-
} catch {
|
|
1198
|
-
y(!0);
|
|
1199
|
-
return;
|
|
1200
|
-
}
|
|
1201
|
-
R instanceof Promise && (c(!0), R.then(
|
|
1202
|
-
() => c(!1),
|
|
1203
|
-
() => {
|
|
1204
|
-
c(!1), y(!0);
|
|
1205
|
-
}
|
|
1206
|
-
));
|
|
1207
|
-
}, z = (R) => {
|
|
1208
|
-
R.preventDefault(), T();
|
|
1209
|
-
};
|
|
1210
|
-
return /* @__PURE__ */ i(
|
|
1211
|
-
Pe,
|
|
1212
|
-
{
|
|
1213
|
-
open: e,
|
|
1214
|
-
onClose: S,
|
|
1215
|
-
size: He.Small,
|
|
1216
|
-
title: t,
|
|
1217
|
-
actions: /* @__PURE__ */ C(J, { children: [
|
|
1218
|
-
/* @__PURE__ */ i(
|
|
1219
|
-
Y,
|
|
1220
|
-
{
|
|
1221
|
-
variant: "outlined",
|
|
1222
|
-
disabled: w,
|
|
1223
|
-
autoFocus: u === void 0 && O,
|
|
1224
|
-
onClick: S,
|
|
1225
|
-
children: g.formatMessage({ id: "ds.layers.confirm-dialog.cancel" })
|
|
1226
|
-
}
|
|
1227
|
-
),
|
|
1228
|
-
/* @__PURE__ */ i(
|
|
1229
|
-
Y,
|
|
1230
|
-
{
|
|
1231
|
-
type: "submit",
|
|
1232
|
-
form: b,
|
|
1233
|
-
variant: "contained",
|
|
1234
|
-
color: to[a],
|
|
1235
|
-
disabled: !M,
|
|
1236
|
-
loading: w,
|
|
1237
|
-
autoFocus: u === void 0 && !O,
|
|
1238
|
-
sx: a === "warning" ? {
|
|
1239
|
-
"&:not(.Mui-disabled)": {
|
|
1240
|
-
color: no(
|
|
1241
|
-
h,
|
|
1242
|
-
h.design.tokens["status.warning"]
|
|
1243
|
-
)
|
|
1244
|
-
}
|
|
1245
|
-
} : void 0,
|
|
1246
|
-
children: r
|
|
1247
|
-
}
|
|
1248
|
-
)
|
|
1249
|
-
] }),
|
|
1250
|
-
children: /* @__PURE__ */ C(eo, { id: b, onSubmit: z, noValidate: !0, children: [
|
|
1251
|
-
/* @__PURE__ */ i("div", { children: n }),
|
|
1252
|
-
u !== void 0 && /* @__PURE__ */ i(
|
|
1253
|
-
Vn,
|
|
1254
|
-
{
|
|
1255
|
-
label: g.formatMessage(
|
|
1256
|
-
{ id: "ds.layers.confirm-dialog.type-to-confirm" },
|
|
1257
|
-
{ text: u }
|
|
1258
|
-
),
|
|
1259
|
-
value: m,
|
|
1260
|
-
onChange: (R) => f(R.target.value),
|
|
1261
|
-
disabled: w,
|
|
1262
|
-
autoFocus: !0,
|
|
1263
|
-
autoComplete: "off",
|
|
1264
|
-
fullWidth: !0
|
|
1265
|
-
}
|
|
1266
|
-
),
|
|
1267
|
-
p && /* @__PURE__ */ i(Bn, { severity: "error", children: g.formatMessage({ id: "ds.layers.confirm-dialog.failed" }) })
|
|
1268
|
-
] })
|
|
1269
|
-
}
|
|
1270
|
-
);
|
|
1271
|
-
}
|
|
1272
|
-
const tn = ze(null);
|
|
1273
|
-
function kr({ children: e }) {
|
|
1274
|
-
const [t, n] = F([]), [r, a] = F(null), u = X(0), s = X([]);
|
|
1275
|
-
s.current = t;
|
|
1276
|
-
const d = t.length > 0 ? t[0] : null;
|
|
1277
|
-
d !== null && d !== r && a(d), V(
|
|
1278
|
-
() => () => {
|
|
1279
|
-
s.current.forEach((m) => m.resolve(!1));
|
|
1280
|
-
},
|
|
1281
|
-
[]
|
|
1282
|
-
);
|
|
1283
|
-
const g = Q(
|
|
1284
|
-
(m) => new Promise((f) => {
|
|
1285
|
-
u.current += 1;
|
|
1286
|
-
const w = { id: u.current, options: m, resolve: f };
|
|
1287
|
-
n((c) => [...c, w]);
|
|
1288
|
-
}),
|
|
1289
|
-
[]
|
|
1290
|
-
), h = (m) => {
|
|
1291
|
-
d !== null && (d.resolve(m), n((f) => f.filter((w) => w !== d)));
|
|
1292
|
-
}, b = ge(() => ({ confirm: g }), [g]);
|
|
1293
|
-
return /* @__PURE__ */ C(tn.Provider, { value: b, children: [
|
|
1294
|
-
e,
|
|
1295
|
-
r !== null && // A new key per request: each one starts from an empty confirmation field.
|
|
1296
|
-
/* @__PURE__ */ i(
|
|
1297
|
-
oo,
|
|
1298
|
-
{
|
|
1299
|
-
open: d === r,
|
|
1300
|
-
...r.options,
|
|
1301
|
-
onConfirm: () => h(!0),
|
|
1302
|
-
onCancel: () => h(!1)
|
|
1303
|
-
},
|
|
1304
|
-
r.id
|
|
1305
|
-
)
|
|
1306
|
-
] });
|
|
1307
|
-
}
|
|
1308
|
-
function Sr() {
|
|
1309
|
-
const e = Ae(tn);
|
|
1310
|
-
if (e === null)
|
|
1311
|
-
throw new Error(
|
|
1312
|
-
"useConfirmDialog must be called inside a ConfirmDialogProvider"
|
|
1313
|
-
);
|
|
1314
|
-
return e;
|
|
1315
|
-
}
|
|
1316
|
-
var ro = /* @__PURE__ */ ((e) => (e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))(ro || {});
|
|
1317
|
-
const io = 320, so = l("div")(({ theme: e }) => {
|
|
1318
|
-
const { tokens: t, space: n } = e.design;
|
|
1319
|
-
return {
|
|
1320
|
-
flex: "none",
|
|
1321
|
-
display: "flex",
|
|
1322
|
-
alignItems: "center",
|
|
1323
|
-
justifyContent: "space-between",
|
|
1324
|
-
gap: o(n[3]),
|
|
1325
|
-
padding: `${o(n[2])} ${o(n[2])} ${o(n[2])} ${o(n[4])}`,
|
|
1326
|
-
borderBottom: D(t["border.subtle"])
|
|
1327
|
-
};
|
|
1328
|
-
}), ao = l("h2")(({ theme: e }) => ({
|
|
1329
|
-
margin: 0,
|
|
1330
|
-
minWidth: 0,
|
|
1331
|
-
color: e.design.tokens["text.primary"],
|
|
1332
|
-
fontSize: o(e.design.typeScale.body),
|
|
1333
|
-
fontWeight: A.semibold,
|
|
1334
|
-
overflowWrap: "anywhere"
|
|
1335
|
-
})), on = l("div")(({ theme: e }) => ({
|
|
1336
|
-
display: "flex",
|
|
1337
|
-
flexDirection: "column",
|
|
1338
|
-
gap: o(e.design.space[3]),
|
|
1339
|
-
fontSize: o(e.design.typeScale.body)
|
|
1340
|
-
})), lo = l(on)(({ theme: e }) => ({
|
|
1341
|
-
padding: o(e.design.space[4])
|
|
1342
|
-
}));
|
|
1343
|
-
function Ir({
|
|
1344
|
-
anchorEl: e,
|
|
1345
|
-
open: t,
|
|
1346
|
-
onClose: n,
|
|
1347
|
-
title: r,
|
|
1348
|
-
placement: a = "bottom-start",
|
|
1349
|
-
width: u = io,
|
|
1350
|
-
children: s
|
|
1351
|
-
}) {
|
|
1352
|
-
const d = P(), g = N(), h = vn() === K.Mobile, b = d.formatMessage({
|
|
1353
|
-
id: "ds.layers.anchored-panel.close"
|
|
1354
|
-
}), m = t && e !== null;
|
|
1355
|
-
if (h)
|
|
1356
|
-
return /* @__PURE__ */ i(
|
|
1357
|
-
wn,
|
|
1358
|
-
{
|
|
1359
|
-
open: m,
|
|
1360
|
-
onClose: n,
|
|
1361
|
-
title: r,
|
|
1362
|
-
closeLabel: b,
|
|
1363
|
-
children: /* @__PURE__ */ i(on, { children: s })
|
|
1364
|
-
}
|
|
1365
|
-
);
|
|
1366
|
-
const f = a === "bottom-end" ? "right" : "left";
|
|
1367
|
-
return /* @__PURE__ */ C(
|
|
1368
|
-
jn,
|
|
1369
|
-
{
|
|
1370
|
-
anchorEl: e,
|
|
1371
|
-
open: m,
|
|
1372
|
-
onClose: () => n(),
|
|
1373
|
-
anchorOrigin: { vertical: "bottom", horizontal: f },
|
|
1374
|
-
transformOrigin: { vertical: "top", horizontal: f },
|
|
1375
|
-
slotProps: {
|
|
1376
|
-
paper: {
|
|
1377
|
-
role: "dialog",
|
|
1378
|
-
"aria-modal": !0,
|
|
1379
|
-
"aria-labelledby": g,
|
|
1380
|
-
sx: (w) => ({
|
|
1381
|
-
width: o(u),
|
|
1382
|
-
maxWidth: `calc(100vw - ${o(w.design.space[4] * 2)})`,
|
|
1383
|
-
marginTop: o(w.design.space[1]),
|
|
1384
|
-
color: w.design.tokens["text.primary"],
|
|
1385
|
-
fontFamily: w.design.fonts.sans
|
|
1386
|
-
})
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
children: [
|
|
1390
|
-
/* @__PURE__ */ C(so, { children: [
|
|
1391
|
-
/* @__PURE__ */ i(ao, { id: g, children: r }),
|
|
1392
|
-
/* @__PURE__ */ i(ae, { "aria-label": b, onClick: n, children: /* @__PURE__ */ i(_e, { "aria-hidden": !0 }) })
|
|
1393
|
-
] }),
|
|
1394
|
-
/* @__PURE__ */ i(lo, { children: s })
|
|
1395
|
-
]
|
|
1396
|
-
}
|
|
1397
|
-
);
|
|
1398
|
-
}
|
|
1399
|
-
const co = [32, 160, 8239, 8201].map(
|
|
1400
|
-
(e) => String.fromCharCode(e)
|
|
1401
|
-
), uo = (e) => {
|
|
1402
|
-
var n, r;
|
|
1403
|
-
const t = new Intl.NumberFormat(e).formatToParts(11111.1);
|
|
1404
|
-
return {
|
|
1405
|
-
group: ((n = t.find((a) => a.type === "group")) == null ? void 0 : n.value) ?? " ",
|
|
1406
|
-
decimal: ((r = t.find((a) => a.type === "decimal")) == null ? void 0 : r.value) ?? "."
|
|
1407
|
-
};
|
|
1408
|
-
}, Re = (e, t) => {
|
|
1409
|
-
const r = [t.group, ...co].reduce(
|
|
1410
|
-
(u, s) => u.split(s).join(""),
|
|
1411
|
-
e.trim()
|
|
1412
|
-
).replace(",", ".");
|
|
1413
|
-
if (r === "" || !/^-?\d*\.?\d+$|^-?\d+\.$/.test(r))
|
|
1414
|
-
return null;
|
|
1415
|
-
const a = Number.parseFloat(r);
|
|
1416
|
-
return Number.isFinite(a) ? a : null;
|
|
1417
|
-
}, po = l("div", {
|
|
1418
|
-
shouldForwardProp: (e) => e !== "labelHidden"
|
|
1419
|
-
})(({ labelHidden: e }) => ({
|
|
1420
|
-
...e && { [`& .${qn.root}`]: fe }
|
|
1421
|
-
}));
|
|
1422
|
-
function Fr({
|
|
1423
|
-
label: e,
|
|
1424
|
-
value: t,
|
|
1425
|
-
onChange: n,
|
|
1426
|
-
decimals: r = 0,
|
|
1427
|
-
min: a = 0,
|
|
1428
|
-
max: u,
|
|
1429
|
-
hideLabel: s = !1,
|
|
1430
|
-
ariaLabel: d,
|
|
1431
|
-
help: g,
|
|
1432
|
-
error: h,
|
|
1433
|
-
testId: b,
|
|
1434
|
-
disabled: m,
|
|
1435
|
-
adornment: f
|
|
1436
|
-
}) {
|
|
1437
|
-
const w = P(), c = ge(
|
|
1438
|
-
() => uo(w.locale),
|
|
1439
|
-
[w.locale]
|
|
1440
|
-
), p = Q(
|
|
1441
|
-
(S) => S === null ? "" : w.formatNumber(S, {
|
|
1442
|
-
minimumFractionDigits: r,
|
|
1443
|
-
maximumFractionDigits: r
|
|
1444
|
-
}),
|
|
1445
|
-
[w, r]
|
|
1446
|
-
), [y, v] = F(!1), [W, M] = F(() => p(t));
|
|
1447
|
-
return V(() => {
|
|
1448
|
-
y || M(p(t));
|
|
1449
|
-
}, [t, y, p]), /* @__PURE__ */ i(po, { labelHidden: s, children: /* @__PURE__ */ i(Ve, { label: e, help: g, error: h, children: /* @__PURE__ */ i(
|
|
1450
|
-
me,
|
|
1451
|
-
{
|
|
1452
|
-
disabled: m,
|
|
1453
|
-
value: W,
|
|
1454
|
-
inputProps: {
|
|
1455
|
-
inputMode: "decimal",
|
|
1456
|
-
"aria-label": d,
|
|
1457
|
-
"data-testid": b
|
|
1458
|
-
},
|
|
1459
|
-
onFocus: () => {
|
|
1460
|
-
v(!0), t !== null && M(String(t).replace(".", c.decimal));
|
|
1461
|
-
},
|
|
1462
|
-
onChange: (S) => {
|
|
1463
|
-
M(S.target.value);
|
|
1464
|
-
const T = Re(S.target.value, c);
|
|
1465
|
-
T !== null ? n(T) : S.target.value === "" && n(null);
|
|
1466
|
-
},
|
|
1467
|
-
onBlur: () => {
|
|
1468
|
-
v(!1);
|
|
1469
|
-
let S = Re(W, c);
|
|
1470
|
-
if (S !== null) {
|
|
1471
|
-
const T = Math.max(S, a);
|
|
1472
|
-
S = Number.parseFloat(
|
|
1473
|
-
(u === void 0 ? T : Math.min(T, u)).toFixed(
|
|
1474
|
-
r
|
|
1475
|
-
)
|
|
1476
|
-
);
|
|
1477
|
-
}
|
|
1478
|
-
n(S), M(p(S));
|
|
1479
|
-
},
|
|
1480
|
-
endAdornment: f ? /* @__PURE__ */ i(Un, { position: "end", children: f }) : void 0
|
|
1481
|
-
}
|
|
1482
|
-
) }) });
|
|
1483
|
-
}
|
|
1484
|
-
const Wr = { l: 0.72, c: 0.12 }, Mr = [
|
|
1485
|
-
266,
|
|
1486
|
-
296,
|
|
1487
|
-
326,
|
|
1488
|
-
356,
|
|
1489
|
-
26,
|
|
1490
|
-
56,
|
|
1491
|
-
86,
|
|
1492
|
-
116,
|
|
1493
|
-
146,
|
|
1494
|
-
176,
|
|
1495
|
-
206,
|
|
1496
|
-
236
|
|
1497
|
-
], rn = [
|
|
1498
|
-
"#81a2f0",
|
|
1499
|
-
"#ab94e7",
|
|
1500
|
-
"#cb89cd",
|
|
1501
|
-
"#e084a7",
|
|
1502
|
-
"#e6867d",
|
|
1503
|
-
"#de9056",
|
|
1504
|
-
"#c69f41",
|
|
1505
|
-
"#a1ae50",
|
|
1506
|
-
"#70b976",
|
|
1507
|
-
"#37bda2",
|
|
1508
|
-
"#18b9c9",
|
|
1509
|
-
"#4eb0e5"
|
|
1510
|
-
], Or = "#767676", Tr = rn[6], Rr = "#111a2f", Er = "#5674be", go = /^#?([0-9a-f]{6})$/i, q = (e) => {
|
|
1511
|
-
const t = go.exec(e.trim());
|
|
1512
|
-
return t ? `#${t[1].toLowerCase()}` : null;
|
|
1513
|
-
}, fo = l("div")(({ theme: e }) => ({
|
|
1514
|
-
display: "flex",
|
|
1515
|
-
alignItems: "center",
|
|
1516
|
-
gap: o(e.design.space[3])
|
|
1517
|
-
})), mo = l("span")(({ theme: e }) => ({
|
|
1518
|
-
flex: "none",
|
|
1519
|
-
width: o(e.design.densityValues[e.design.density].control),
|
|
1520
|
-
height: o(e.design.densityValues[e.design.density].control),
|
|
1521
|
-
borderRadius: o(e.design.radii.md),
|
|
1522
|
-
border: D(e.design.tokens["border.control"])
|
|
1523
|
-
})), ho = l("div")(({ theme: e }) => ({
|
|
1524
|
-
display: "flex",
|
|
1525
|
-
flexWrap: "wrap",
|
|
1526
|
-
gap: o(e.design.space[2]),
|
|
1527
|
-
marginTop: o(e.design.space[2])
|
|
1528
|
-
})), bo = l(Be)(({ theme: e }) => {
|
|
1529
|
-
const { densityValues: t, density: n, space: r } = e.design, a = t[n].control - r[2];
|
|
1530
|
-
return {
|
|
1531
|
-
width: o(a),
|
|
1532
|
-
height: o(a),
|
|
1533
|
-
borderRadius: o(e.design.radii.sm),
|
|
1534
|
-
border: D(e.design.tokens["border.control"]),
|
|
1535
|
-
// The chosen swatch carries the ring of the design system (`focus.ring` is the accent).
|
|
1536
|
-
'&[aria-pressed="true"]': te(e),
|
|
1537
|
-
"&.Mui-focusVisible": te(e),
|
|
1538
|
-
[Z.down(K.Tablet)]: {
|
|
1539
|
-
width: o(e.design.densityValues.touchTarget),
|
|
1540
|
-
height: o(e.design.densityValues.touchTarget)
|
|
1541
|
-
}
|
|
1542
|
-
};
|
|
1543
|
-
});
|
|
1544
|
-
function zr({
|
|
1545
|
-
label: e,
|
|
1546
|
-
value: t,
|
|
1547
|
-
onChange: n,
|
|
1548
|
-
swatches: r = rn
|
|
1549
|
-
}) {
|
|
1550
|
-
const a = P(), u = N(), [s, d] = F(t), g = s !== "" && q(s) === null;
|
|
1551
|
-
V(() => {
|
|
1552
|
-
d(
|
|
1553
|
-
(m) => q(m) === q(t) ? m : t
|
|
1554
|
-
);
|
|
1555
|
-
}, [t]);
|
|
1556
|
-
const h = (m) => {
|
|
1557
|
-
d(m);
|
|
1558
|
-
const f = q(m);
|
|
1559
|
-
f !== null && f !== q(t) && n(f);
|
|
1560
|
-
}, b = q(t);
|
|
1561
|
-
return /* @__PURE__ */ C(le, { fullWidth: !0, error: g, children: [
|
|
1562
|
-
/* @__PURE__ */ i($e, { htmlFor: `${u}-hex`, children: e }),
|
|
1563
|
-
/* @__PURE__ */ C(fo, { children: [
|
|
1564
|
-
/* @__PURE__ */ i(
|
|
1565
|
-
mo,
|
|
1566
|
-
{
|
|
1567
|
-
"aria-hidden": "true",
|
|
1568
|
-
style: { backgroundColor: b ?? void 0 }
|
|
1569
|
-
}
|
|
1570
|
-
),
|
|
1571
|
-
/* @__PURE__ */ i(
|
|
1572
|
-
me,
|
|
1573
|
-
{
|
|
1574
|
-
id: `${u}-hex`,
|
|
1575
|
-
fullWidth: !0,
|
|
1576
|
-
value: s,
|
|
1577
|
-
error: g,
|
|
1578
|
-
inputProps: {
|
|
1579
|
-
"aria-describedby": g ? `${u}-error` : void 0,
|
|
1580
|
-
spellCheck: !1,
|
|
1581
|
-
autoComplete: "off"
|
|
1582
|
-
},
|
|
1583
|
-
onChange: (m) => h(m.target.value)
|
|
1584
|
-
}
|
|
1585
|
-
)
|
|
1586
|
-
] }),
|
|
1587
|
-
g && /* @__PURE__ */ i(se, { id: `${u}-error`, children: a.formatMessage({ id: "ds.inputs.color.invalid" }) }),
|
|
1588
|
-
/* @__PURE__ */ i(
|
|
1589
|
-
ho,
|
|
1590
|
-
{
|
|
1591
|
-
role: "group",
|
|
1592
|
-
"aria-label": a.formatMessage({ id: "ds.inputs.color.swatches" }),
|
|
1593
|
-
children: r.map((m) => /* @__PURE__ */ i(
|
|
1594
|
-
bo,
|
|
1595
|
-
{
|
|
1596
|
-
"aria-pressed": q(m) === b,
|
|
1597
|
-
"aria-label": m,
|
|
1598
|
-
style: { backgroundColor: m },
|
|
1599
|
-
onClick: () => n(q(m) ?? m)
|
|
1600
|
-
},
|
|
1601
|
-
m
|
|
1602
|
-
))
|
|
1603
|
-
}
|
|
1604
|
-
)
|
|
1605
|
-
] });
|
|
1606
|
-
}
|
|
1607
|
-
const yo = 6, vo = l("div", {
|
|
1608
|
-
shouldForwardProp: (e) => e !== "edges" && e !== "wrapped"
|
|
1609
|
-
})(({ theme: e, edges: t, wrapped: n }) => {
|
|
1610
|
-
const { tokens: r, radii: a, space: u } = e.design, s = o(u[1] * yo), d = r["text.primary"], g = t.start ? `transparent, ${d} ${s}` : d, h = t.end ? `${d} calc(100% - ${s}), transparent` : d, b = {
|
|
1611
|
-
flexWrap: "wrap",
|
|
1612
|
-
rowGap: o(u[1]),
|
|
1613
|
-
columnGap: o(u[1]),
|
|
1614
|
-
overflowX: "visible",
|
|
1615
|
-
maskImage: "none",
|
|
1616
|
-
border: "none",
|
|
1617
|
-
backgroundColor: "transparent"
|
|
1618
|
-
};
|
|
1619
|
-
return {
|
|
1620
|
-
maskImage: t.start || t.end ? `linear-gradient(to right, ${g}, ${h})` : "none",
|
|
1621
|
-
display: "inline-flex",
|
|
1622
|
-
maxWidth: "100%",
|
|
1623
|
-
minWidth: 0,
|
|
1624
|
-
border: D(r["border.subtle"]),
|
|
1625
|
-
borderRadius: o(a.md),
|
|
1626
|
-
overflowX: "auto",
|
|
1627
|
-
overflowY: "hidden",
|
|
1628
|
-
backgroundColor: r["bg.surface"],
|
|
1629
|
-
// Below 768 px each segment keeps a 44 px target: the band wraps onto more rows rather than
|
|
1630
|
-
// hiding segments behind a sideways scroll. A rule between neighbours would then start the
|
|
1631
|
-
// second row with a stray line and leave the rows unsplit: the band loses its border and each
|
|
1632
|
-
// segment draws its own, apart by a gap in both directions.
|
|
1633
|
-
[Z.down(K.Tablet)]: b,
|
|
1634
|
-
...n && b
|
|
1635
|
-
};
|
|
1636
|
-
}), wo = l(Be, {
|
|
1637
|
-
shouldForwardProp: (e) => e !== "wrapped"
|
|
1638
|
-
})(({ theme: e, wrapped: t }) => {
|
|
1639
|
-
const { tokens: n, space: r, typeScale: a, fonts: u, densityValues: s, radii: d } = e.design, g = {
|
|
1640
|
-
minWidth: o(s.touchTarget),
|
|
1641
|
-
minHeight: o(s.touchTarget),
|
|
1642
|
-
border: D(n["border.subtle"]),
|
|
1643
|
-
borderRadius: o(d.md),
|
|
1644
|
-
backgroundColor: n["bg.surface"],
|
|
1645
|
-
'&[aria-checked="true"]': { backgroundColor: n["bg.raised"] }
|
|
1646
|
-
};
|
|
1647
|
-
return {
|
|
1648
|
-
flex: "none",
|
|
1649
|
-
gap: o(r[2]),
|
|
1650
|
-
minHeight: o(s[e.design.density].control),
|
|
1651
|
-
paddingLeft: o(r[3]),
|
|
1652
|
-
paddingRight: o(r[3]),
|
|
1653
|
-
fontFamily: u.sans,
|
|
1654
|
-
fontSize: o(a.body),
|
|
1655
|
-
whiteSpace: "nowrap",
|
|
1656
|
-
color: n["text.secondary"],
|
|
1657
|
-
transition: oe(e, ["background-color", "color"]),
|
|
1658
|
-
"& + &": { borderLeft: D(n["border.subtle"]) },
|
|
1659
|
-
'&[aria-checked="true"]': {
|
|
1660
|
-
backgroundColor: n["bg.raised"],
|
|
1661
|
-
color: n["text.primary"],
|
|
1662
|
-
fontWeight: A.medium
|
|
1663
|
-
},
|
|
1664
|
-
"&:hover": { backgroundColor: n["bg.hover"] },
|
|
1665
|
-
"&.Mui-focusVisible": { ...te(e), outlineOffset: "-2px" },
|
|
1666
|
-
// A short label (« 1 h », « 7 j ») would leave a segment narrower than a finger. Each segment
|
|
1667
|
-
// is its own bordered tile once the band wraps.
|
|
1668
|
-
[Z.down(K.Tablet)]: g,
|
|
1669
|
-
...t && g
|
|
1670
|
-
};
|
|
1671
|
-
}), xo = l("span")(({ theme: e }) => ({
|
|
1672
|
-
display: "inline-flex",
|
|
1673
|
-
flex: "none",
|
|
1674
|
-
"& svg": {
|
|
1675
|
-
width: o(e.design.space[4]),
|
|
1676
|
-
height: o(e.design.space[4])
|
|
1677
|
-
}
|
|
1678
|
-
})), Co = l("span")(fe), ko = l("span")(({ theme: e }) => ({
|
|
1679
|
-
fontFamily: e.design.fonts.mono,
|
|
1680
|
-
fontSize: o(e.design.typeScale.caption),
|
|
1681
|
-
color: e.design.tokens["text.muted"]
|
|
1682
|
-
}));
|
|
1683
|
-
function Ar({
|
|
1684
|
-
options: e,
|
|
1685
|
-
value: t,
|
|
1686
|
-
onChange: n,
|
|
1687
|
-
ariaLabel: r,
|
|
1688
|
-
testId: a,
|
|
1689
|
-
wrap: u = !1
|
|
1690
|
-
}) {
|
|
1691
|
-
const s = X(null), [d, g] = F({ start: !1, end: !1 }), h = Q(() => {
|
|
1692
|
-
const f = s.current;
|
|
1693
|
-
if (!f)
|
|
1694
|
-
return;
|
|
1695
|
-
const w = f.scrollLeft > 0, c = f.scrollLeft + f.clientWidth < f.scrollWidth - 1;
|
|
1696
|
-
g(
|
|
1697
|
-
(p) => p.start === w && p.end === c ? p : { start: w, end: c }
|
|
1698
|
-
);
|
|
1699
|
-
}, []);
|
|
1700
|
-
V(() => (h(), window.addEventListener("resize", h), () => window.removeEventListener("resize", h)), [h, e]);
|
|
1701
|
-
const b = (f) => {
|
|
1702
|
-
var p, y;
|
|
1703
|
-
const w = e.findIndex((v) => v.value === t);
|
|
1704
|
-
let c;
|
|
1705
|
-
switch (f.key) {
|
|
1706
|
-
case "ArrowRight":
|
|
1707
|
-
case "ArrowDown":
|
|
1708
|
-
c = (w + 1) % e.length;
|
|
1709
|
-
break;
|
|
1710
|
-
case "ArrowLeft":
|
|
1711
|
-
case "ArrowUp":
|
|
1712
|
-
c = (w - 1 + e.length) % e.length;
|
|
1713
|
-
break;
|
|
1714
|
-
case "Home":
|
|
1715
|
-
c = 0;
|
|
1716
|
-
break;
|
|
1717
|
-
case "End":
|
|
1718
|
-
c = e.length - 1;
|
|
1719
|
-
break;
|
|
1720
|
-
default:
|
|
1721
|
-
return;
|
|
1722
|
-
}
|
|
1723
|
-
f.preventDefault(), n(e[c].value), (y = (p = s.current) == null ? void 0 : p.querySelectorAll('[role="radio"]')[c]) == null || y.focus();
|
|
1724
|
-
}, m = Math.max(
|
|
1725
|
-
e.findIndex((f) => f.value === t),
|
|
1726
|
-
0
|
|
1727
|
-
);
|
|
1728
|
-
return /* @__PURE__ */ i(
|
|
1729
|
-
vo,
|
|
1730
|
-
{
|
|
1731
|
-
ref: s,
|
|
1732
|
-
role: "radiogroup",
|
|
1733
|
-
"aria-label": r,
|
|
1734
|
-
"data-testid": a,
|
|
1735
|
-
edges: d,
|
|
1736
|
-
wrapped: u,
|
|
1737
|
-
onKeyDown: b,
|
|
1738
|
-
onScroll: h,
|
|
1739
|
-
children: e.map((f, w) => {
|
|
1740
|
-
const c = f.value === t;
|
|
1741
|
-
return /* @__PURE__ */ C(
|
|
1742
|
-
wo,
|
|
1743
|
-
{
|
|
1744
|
-
wrapped: u,
|
|
1745
|
-
role: "radio",
|
|
1746
|
-
"aria-checked": c,
|
|
1747
|
-
"aria-label": f.ariaLabel,
|
|
1748
|
-
lang: f.lang,
|
|
1749
|
-
"data-testid": f.testId,
|
|
1750
|
-
tabIndex: w === m ? 0 : -1,
|
|
1751
|
-
onClick: () => n(f.value),
|
|
1752
|
-
children: [
|
|
1753
|
-
f.icon !== void 0 && /* @__PURE__ */ i(xo, { "aria-hidden": !0, children: f.icon }),
|
|
1754
|
-
f.icon !== void 0 && f.iconOnly ? /* @__PURE__ */ i(Co, { children: f.label }) : f.label,
|
|
1755
|
-
f.count !== void 0 && /* @__PURE__ */ i(ko, { children: f.count })
|
|
1756
|
-
]
|
|
1757
|
-
},
|
|
1758
|
-
f.value
|
|
1759
|
-
);
|
|
1760
|
-
})
|
|
1761
|
-
}
|
|
1762
|
-
);
|
|
1763
|
-
}
|
|
1764
|
-
var So = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e))(So || {});
|
|
1765
|
-
const Io = 2, Fo = /* @__PURE__ */ new Set(["Enter", " "]), Wo = l("div", {
|
|
1766
|
-
shouldForwardProp: (e) => e !== "variant"
|
|
1767
|
-
})(({ theme: e, variant: t }) => ({
|
|
1768
|
-
minWidth: 0,
|
|
1769
|
-
...t === "primary" && {
|
|
1770
|
-
borderBottom: D(e.design.tokens["border.subtle"])
|
|
1771
|
-
}
|
|
1772
|
-
})), sn = 32, Mo = l("div", {
|
|
1773
|
-
shouldForwardProp: (e) => e !== "variant" && e !== "fade"
|
|
1774
|
-
})(({ theme: e, variant: t, fade: n }) => {
|
|
1775
|
-
const a = `linear-gradient(to right, ${e.design.tokens["text.primary"]} calc(100% - ${o(
|
|
1776
|
-
sn
|
|
1777
|
-
)}), transparent)`;
|
|
1778
|
-
return {
|
|
1779
|
-
position: "relative",
|
|
1780
|
-
display: "flex",
|
|
1781
|
-
gap: o(e.design.space[t === "primary" ? 1 : 2]),
|
|
1782
|
-
overflowX: "auto",
|
|
1783
|
-
overflowY: "hidden",
|
|
1784
|
-
scrollbarWidth: "none",
|
|
1785
|
-
"&::-webkit-scrollbar": { display: "none" },
|
|
1786
|
-
...n && { maskImage: a, WebkitMaskImage: a }
|
|
1787
|
-
};
|
|
1788
|
-
}), an = (e, t) => {
|
|
1789
|
-
const { tokens: n, space: r, radii: a, typeScale: u, fonts: s, densityValues: d, density: g } = e.design, h = {
|
|
1790
|
-
position: "relative",
|
|
1791
|
-
display: "inline-flex",
|
|
1792
|
-
alignItems: "center",
|
|
1793
|
-
flex: "none",
|
|
1794
|
-
gap: o(r[2]),
|
|
1795
|
-
boxSizing: "border-box",
|
|
1796
|
-
margin: 0,
|
|
1797
|
-
border: 0,
|
|
1798
|
-
backgroundColor: "transparent",
|
|
1799
|
-
cursor: "pointer",
|
|
1800
|
-
fontFamily: s.sans,
|
|
1801
|
-
whiteSpace: "nowrap",
|
|
1802
|
-
textDecoration: "none",
|
|
1803
|
-
color: n["text.secondary"],
|
|
1804
|
-
transition: oe(e, ["color", "background-color"]),
|
|
1805
|
-
"&:hover": { color: n["text.primary"] },
|
|
1806
|
-
'&[aria-selected="true"]': {
|
|
1807
|
-
color: n["text.primary"],
|
|
1808
|
-
fontWeight: A.medium
|
|
1809
|
-
},
|
|
1810
|
-
// Inside the scrolling row, an outer ring would be clipped: it is drawn inside the tab.
|
|
1811
|
-
"&:focus-visible": { ...te(e), outlineOffset: "-2px" }
|
|
1812
|
-
}, b = {
|
|
1813
|
-
[Z.down(K.Tablet)]: {
|
|
1814
|
-
minHeight: o(d.touchTarget)
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
return t === "primary" ? {
|
|
1818
|
-
...h,
|
|
1819
|
-
minHeight: o(d[g].control + r[2]),
|
|
1820
|
-
padding: `0 ${o(r[3])}`,
|
|
1821
|
-
fontSize: o(u.body),
|
|
1822
|
-
'&[aria-selected="true"]::after': {
|
|
1823
|
-
content: '""',
|
|
1824
|
-
position: "absolute",
|
|
1825
|
-
left: 0,
|
|
1826
|
-
right: 0,
|
|
1827
|
-
bottom: 0,
|
|
1828
|
-
height: o(Io),
|
|
1829
|
-
backgroundColor: n.accent
|
|
1830
|
-
},
|
|
1831
|
-
...b
|
|
1832
|
-
} : {
|
|
1833
|
-
...h,
|
|
1834
|
-
minHeight: o(d.compact.control),
|
|
1835
|
-
padding: `0 ${o(r[3])}`,
|
|
1836
|
-
borderRadius: o(a.md),
|
|
1837
|
-
fontSize: o(u.small),
|
|
1838
|
-
"&:hover": {
|
|
1839
|
-
color: n["text.primary"],
|
|
1840
|
-
backgroundColor: n["bg.hover"]
|
|
1841
|
-
},
|
|
1842
|
-
'&[aria-selected="true"]': {
|
|
1843
|
-
color: n["text.primary"],
|
|
1844
|
-
fontWeight: A.medium,
|
|
1845
|
-
backgroundColor: n["bg.raised"]
|
|
1846
|
-
},
|
|
1847
|
-
...b
|
|
1848
|
-
};
|
|
1849
|
-
}, ln = (e) => e !== "variant", Oo = l(Xn, { shouldForwardProp: ln })(({ theme: e, variant: t }) => an(e, t)), To = l("button", { shouldForwardProp: ln })(({ theme: e, variant: t }) => an(e, t)), Ro = l("span")(({ theme: e }) => {
|
|
1850
|
-
const { tokens: t, space: n, radii: r, fonts: a, typeScale: u } = e.design;
|
|
1851
|
-
return {
|
|
1852
|
-
display: "inline-flex",
|
|
1853
|
-
alignItems: "center",
|
|
1854
|
-
padding: `0 ${o(n[1])}`,
|
|
1855
|
-
borderRadius: o(r.sm),
|
|
1856
|
-
border: D(t["border.subtle"]),
|
|
1857
|
-
fontFamily: a.mono,
|
|
1858
|
-
fontSize: o(u.caption),
|
|
1859
|
-
fontWeight: A.regular,
|
|
1860
|
-
lineHeight: 1.6,
|
|
1861
|
-
color: t["text.muted"]
|
|
1862
|
-
};
|
|
1863
|
-
}), Ee = (e, t) => {
|
|
1864
|
-
const n = t.offsetLeft, r = n + t.offsetWidth + sn;
|
|
1865
|
-
n < e.scrollLeft ? e.scrollLeft = n : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
|
|
1866
|
-
};
|
|
1867
|
-
function Lr({
|
|
1868
|
-
items: e,
|
|
1869
|
-
value: t,
|
|
1870
|
-
onChange: n,
|
|
1871
|
-
variant: r,
|
|
1872
|
-
"aria-label": a
|
|
1873
|
-
}) {
|
|
1874
|
-
const u = P(), s = X(null), d = e.filter((c) => c.hidden !== !0), g = Zt(s, "horizontal", d.length), h = Q(
|
|
1875
|
-
() => {
|
|
1876
|
-
var c;
|
|
1877
|
-
return Array.from(
|
|
1878
|
-
((c = s.current) == null ? void 0 : c.querySelectorAll('[role="tab"]')) ?? []
|
|
1879
|
-
);
|
|
1880
|
-
},
|
|
1881
|
-
[]
|
|
1882
|
-
), b = Q(() => {
|
|
1883
|
-
const c = s.current, p = c == null ? void 0 : c.querySelector('[aria-selected="true"]');
|
|
1884
|
-
c && p && Ee(c, p);
|
|
1885
|
-
}, []);
|
|
1886
|
-
Le(b, [b, t]);
|
|
1887
|
-
const m = d.map((c) => c.value).join("|");
|
|
1888
|
-
V(() => {
|
|
1889
|
-
const c = s.current;
|
|
1890
|
-
if (c === null || typeof ResizeObserver > "u")
|
|
1891
|
-
return;
|
|
1892
|
-
const p = new ResizeObserver(b);
|
|
1893
|
-
return p.observe(c), Array.from(c.children).forEach((y) => p.observe(y)), () => p.disconnect();
|
|
1894
|
-
}, [b, m]);
|
|
1895
|
-
const f = (c) => {
|
|
1896
|
-
const p = h(), y = p.findIndex((W) => W === document.activeElement);
|
|
1897
|
-
if (y < 0)
|
|
1898
|
-
return;
|
|
1899
|
-
if (Fo.has(c.key)) {
|
|
1900
|
-
c.key === " " && p[y] instanceof HTMLAnchorElement && (c.preventDefault(), p[y].click());
|
|
1901
|
-
return;
|
|
1902
|
-
}
|
|
1903
|
-
let v;
|
|
1904
|
-
switch (c.key) {
|
|
1905
|
-
case "ArrowRight":
|
|
1906
|
-
v = (y + 1) % p.length;
|
|
1907
|
-
break;
|
|
1908
|
-
case "ArrowLeft":
|
|
1909
|
-
v = (y - 1 + p.length) % p.length;
|
|
1910
|
-
break;
|
|
1911
|
-
case "Home":
|
|
1912
|
-
v = 0;
|
|
1913
|
-
break;
|
|
1914
|
-
case "End":
|
|
1915
|
-
v = p.length - 1;
|
|
1916
|
-
break;
|
|
1917
|
-
default:
|
|
1918
|
-
return;
|
|
1919
|
-
}
|
|
1920
|
-
c.preventDefault(), p[v].focus(), s.current && Ee(s.current, p[v]);
|
|
1921
|
-
}, w = Math.max(
|
|
1922
|
-
d.findIndex((c) => c.value === t),
|
|
1923
|
-
0
|
|
1924
|
-
);
|
|
1925
|
-
return /* @__PURE__ */ i(Wo, { variant: r, children: /* @__PURE__ */ i(
|
|
1926
|
-
Mo,
|
|
1927
|
-
{
|
|
1928
|
-
ref: s,
|
|
1929
|
-
role: "tablist",
|
|
1930
|
-
"aria-label": a,
|
|
1931
|
-
variant: r,
|
|
1932
|
-
fade: g,
|
|
1933
|
-
"data-overflowing": g || void 0,
|
|
1934
|
-
onKeyDown: f,
|
|
1935
|
-
children: d.map((c, p) => {
|
|
1936
|
-
const y = c.value === t, v = /* @__PURE__ */ C(J, { children: [
|
|
1937
|
-
c.label,
|
|
1938
|
-
c.badge !== void 0 && /* @__PURE__ */ i(Ro, { children: typeof c.badge == "number" ? u.formatNumber(c.badge) : c.badge })
|
|
1939
|
-
] }), W = {
|
|
1940
|
-
role: "tab",
|
|
1941
|
-
"aria-selected": y,
|
|
1942
|
-
tabIndex: p === w ? 0 : -1,
|
|
1943
|
-
"data-testid": c.testId,
|
|
1944
|
-
variant: r,
|
|
1945
|
-
onClick: () => n == null ? void 0 : n(c.value)
|
|
1946
|
-
};
|
|
1947
|
-
return c.to !== void 0 ? /* @__PURE__ */ i(
|
|
1948
|
-
Oo,
|
|
1949
|
-
{
|
|
1950
|
-
to: c.to,
|
|
1951
|
-
"aria-current": y ? "page" : void 0,
|
|
1952
|
-
...W,
|
|
1953
|
-
children: v
|
|
1954
|
-
},
|
|
1955
|
-
c.value
|
|
1956
|
-
) : /* @__PURE__ */ i(To, { type: "button", ...W, children: v }, c.value);
|
|
1957
|
-
})
|
|
1958
|
-
}
|
|
1959
|
-
) });
|
|
1960
|
-
}
|
|
1961
|
-
export {
|
|
1962
|
-
Ir as A,
|
|
1963
|
-
st as C,
|
|
1964
|
-
Cr as D,
|
|
1965
|
-
Ve as F,
|
|
1966
|
-
Rt as I,
|
|
1967
|
-
Fr as N,
|
|
1968
|
-
xr as R,
|
|
1969
|
-
Ar as S,
|
|
1970
|
-
So as T,
|
|
1971
|
-
je as a,
|
|
1972
|
-
Et as b,
|
|
1973
|
-
nn as c,
|
|
1974
|
-
Sr as d,
|
|
1975
|
-
Jt as e,
|
|
1976
|
-
oo as f,
|
|
1977
|
-
Tt as g,
|
|
1978
|
-
zr as h,
|
|
1979
|
-
ro as i,
|
|
1980
|
-
kr as j,
|
|
1981
|
-
Lr as k,
|
|
1982
|
-
Wr as l,
|
|
1983
|
-
Mr as m,
|
|
1984
|
-
q as n,
|
|
1985
|
-
rn as o,
|
|
1986
|
-
Or as p,
|
|
1987
|
-
Tr as q,
|
|
1988
|
-
Rr as r,
|
|
1989
|
-
Er as s,
|
|
1990
|
-
Zt as u
|
|
1991
|
-
};
|