@alepha/ui 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountConnections.js +1 -1
- package/dist/account/AccountConnectionsView.js +4 -4
- package/dist/account/AccountDeleteDialog.d.ts.map +1 -1
- package/dist/account/AccountDeleteDialog.js +5 -4
- package/dist/account/AccountDeleteDialog.js.map +1 -1
- package/dist/account/AccountDialog.js +4 -4
- package/dist/account/AccountDisplay.js +4 -4
- package/dist/account/AccountKeys.js +1 -1
- package/dist/account/AccountKeysView.js +5 -5
- package/dist/account/AccountMfaDialog.js +4 -4
- package/dist/account/AccountPasskeyProofDialog.js +2 -2
- package/dist/account/AccountPasskeyRow.js +3 -3
- package/dist/account/AccountPasskeys.js +4 -4
- package/dist/account/AccountPasswordDialog.js +4 -4
- package/dist/account/AccountPasswordDialog.js.map +1 -1
- package/dist/account/AccountPasswordGuard.js +2 -2
- package/dist/account/AccountProfile.js +1 -1
- package/dist/account/AccountProfileView.d.ts.map +1 -1
- package/dist/account/AccountProfileView.js +8 -7
- package/dist/account/AccountProfileView.js.map +1 -1
- package/dist/account/AccountRecoveryCodes.js +2 -2
- package/dist/account/AccountRecoveryCodesDialog.js +1 -1
- package/dist/account/AccountSecurity.js +1 -1
- package/dist/account/AccountSecurityView.js +5 -5
- package/dist/account/AccountSessions.js +1 -1
- package/dist/account/AccountSessionsView.js +4 -4
- package/dist/account/ApiKeyCreateDialog.js +7 -6
- package/dist/account/ApiKeyCreateDialog.js.map +1 -1
- package/dist/account/ApiKeyScopeMatrix.js +2 -2
- package/dist/account/ApiKeyStatusBadge.js +1 -1
- package/dist/admin/$pageAdmin.js +1 -1
- package/dist/admin/AdminAi.d.ts +12 -0
- package/dist/admin/AdminAi.d.ts.map +1 -0
- package/dist/admin/AdminAi.js +173 -0
- package/dist/admin/AdminAi.js.map +1 -0
- package/dist/admin/AdminAiDailyChart.d.ts +16 -0
- package/dist/admin/AdminAiDailyChart.d.ts.map +1 -0
- package/dist/admin/AdminAiDailyChart.js +87 -0
- package/dist/admin/AdminAiDailyChart.js.map +1 -0
- package/dist/admin/AdminAiUsageTable.d.ts +33 -0
- package/dist/admin/AdminAiUsageTable.d.ts.map +1 -0
- package/dist/admin/AdminAiUsageTable.js +77 -0
- package/dist/admin/AdminAiUsageTable.js.map +1 -0
- package/dist/admin/AdminAnalytics.js +3 -3
- package/dist/admin/AdminAudits.js +7 -7
- package/dist/admin/AdminBrand.js +2 -2
- package/dist/admin/AdminConnectedTile.js +1 -1
- package/dist/admin/AdminDashboard.js +3 -3
- package/dist/admin/AdminFailedAuditsTile.js +3 -3
- package/dist/admin/AdminFiles.d.ts.map +1 -1
- package/dist/admin/AdminFiles.js +8 -8
- package/dist/admin/AdminFiles.js.map +1 -1
- package/dist/admin/AdminFilesUsage.js +2 -2
- package/dist/admin/AdminFilesUsageCard.js +2 -2
- package/dist/admin/AdminJobDetail.js +7 -7
- package/dist/admin/AdminJobDetailAside.js +3 -3
- package/dist/admin/AdminJobDetailExecutions.js +6 -6
- package/dist/admin/AdminJobExecutionLogs.js +1 -1
- package/dist/admin/AdminJobExecutionSheet.js +5 -5
- package/dist/admin/AdminJobExecutionSteps.js +1 -1
- package/dist/admin/AdminJobs.js +7 -7
- package/dist/admin/AdminJobsTypeIcon.js +1 -1
- package/dist/admin/AdminKeys.js +6 -6
- package/dist/admin/AdminKeysTokenDialog.js +4 -4
- package/dist/admin/AdminLayout.js +5 -5
- package/dist/admin/AdminNotifications.js +6 -6
- package/dist/admin/AdminNotificationsDetail.js +2 -2
- package/dist/admin/AdminNotificationsDetailTabs.js +3 -3
- package/dist/admin/AdminNotificationsPreviewBody.js +1 -1
- package/dist/admin/AdminNotificationsPreviewTab.js +1 -1
- package/dist/admin/AdminParameters.d.ts.map +1 -1
- package/dist/admin/AdminParameters.js +10 -8
- package/dist/admin/AdminParameters.js.map +1 -1
- package/dist/admin/AdminParametersEditorForm.d.ts +5 -0
- package/dist/admin/AdminParametersEditorForm.d.ts.map +1 -1
- package/dist/admin/AdminParametersEditorForm.js +8 -6
- package/dist/admin/AdminParametersEditorForm.js.map +1 -1
- package/dist/admin/AdminParametersEditorPane.d.ts +5 -0
- package/dist/admin/AdminParametersEditorPane.d.ts.map +1 -1
- package/dist/admin/AdminParametersEditorPane.js +7 -6
- package/dist/admin/AdminParametersEditorPane.js.map +1 -1
- package/dist/admin/AdminParametersHistoryPane.js +5 -5
- package/dist/admin/AdminParametersTreeFooterActions.js +3 -3
- package/dist/admin/AdminParametersTreeNodeView.js +5 -5
- package/dist/admin/AdminParametersTreeNodeView.js.map +1 -1
- package/dist/admin/AdminParametersTreePane.js +4 -4
- package/dist/admin/AdminPayments.js +4 -4
- package/dist/admin/AdminRouter.d.ts +12 -5
- package/dist/admin/AdminRouter.d.ts.map +1 -1
- package/dist/admin/AdminRouter.js +39 -10
- package/dist/admin/AdminRouter.js.map +1 -1
- package/dist/admin/AdminRouterOptions.js +1 -1
- package/dist/admin/AdminSessions.js +6 -6
- package/dist/admin/AdminStatTile.js +6 -6
- package/dist/admin/AdminStatTile.js.map +1 -1
- package/dist/admin/AdminStatTileDeltaChip.js +1 -1
- package/dist/admin/AdminUserAvatarControl.js +5 -5
- package/dist/admin/AdminUserCell.js +3 -3
- package/dist/admin/AdminUserDetail.js +10 -10
- package/dist/admin/AdminUserDetailAuditsTab.js +3 -3
- package/dist/admin/AdminUserDetailIdentityAside.js +4 -4
- package/dist/admin/AdminUserDetailOverviewTab.js +3 -3
- package/dist/admin/AdminUserDetailPasskeys.js +3 -3
- package/dist/admin/AdminUserDetailPasswordDialog.js +4 -4
- package/dist/admin/AdminUserDetailSecurityTab.js +4 -4
- package/dist/admin/AdminUserDetailSessionsTab.js +3 -3
- package/dist/admin/AdminUsers.js +10 -10
- package/dist/admin/AdminUsers.js.map +1 -1
- package/dist/admin/AdminUsersCreateDialog.js +5 -5
- package/dist/admin/AdminUsersRolesPicker.js +2 -2
- package/dist/admin/AdminUsersStatusBadge.js +1 -1
- package/dist/admin/AdminUsersTile.js +2 -2
- package/dist/admin/AdminWebhookDeliveries.js +6 -6
- package/dist/admin/AdminWebhookDeliveryDialog.js +5 -5
- package/dist/admin/AdminWebhookDetail.js +6 -6
- package/dist/admin/AdminWebhookDetailAside.js +3 -3
- package/dist/admin/AdminWebhookDetailOverview.js +6 -6
- package/dist/admin/AdminWebhooks.js +7 -7
- package/dist/admin/AdminWebhooksCreateDialog.js +6 -6
- package/dist/admin/AdminWebhooksSecretDialog.js +4 -4
- package/dist/admin/AdminWebhooksStatusBadge.js +3 -3
- package/dist/admin/ParameterDiffDialog.js +3 -3
- package/dist/admin/ParameterHistoryItem.js +5 -5
- package/dist/admin/ParameterJsonDialog.js +4 -4
- package/dist/admin/ParameterSaveDialog.js +5 -5
- package/dist/admin/adminAiMoney.d.ts +10 -0
- package/dist/admin/adminAiMoney.d.ts.map +1 -0
- package/dist/admin/adminAiMoney.js +21 -0
- package/dist/admin/adminAiMoney.js.map +1 -0
- package/dist/admin/adminParametersTree.d.ts +23 -2
- package/dist/admin/adminParametersTree.d.ts.map +1 -1
- package/dist/admin/adminParametersTree.js +36 -3
- package/dist/admin/adminParametersTree.js.map +1 -1
- package/dist/admin/analytics/AdvancedSection.js +3 -3
- package/dist/admin/analytics/AnalyticsChartBars.js +1 -1
- package/dist/admin/analytics/AnalyticsChartDonut.js +1 -1
- package/dist/admin/analytics/AnalyticsChartHeader.js +1 -1
- package/dist/admin/analytics/CoarsenedBadge.js +1 -1
- package/dist/admin/analytics/CompareNote.js +1 -1
- package/dist/admin/analytics/DatasetSelect.js +4 -4
- package/dist/admin/analytics/FilterEditor.js +3 -3
- package/dist/admin/analytics/FilterValuePicker.js +3 -3
- package/dist/admin/analytics/GroupByChips.js +1 -1
- package/dist/admin/analytics/MeasureChips.js +1 -1
- package/dist/admin/analytics/QueryPanel.js +1 -1
- package/dist/admin/analytics/RangeControl.js +3 -3
- package/dist/admin/analytics/RequestDialog.js +2 -2
- package/dist/admin/analytics/ResultsPane.js +3 -3
- package/dist/admin/analytics/ResultsTable.d.ts.map +1 -1
- package/dist/admin/analytics/ResultsTable.js +3 -3
- package/dist/admin/analytics/ResultsTable.js.map +1 -1
- package/dist/admin/analytics/RunFooter.js +2 -2
- package/dist/admin/analytics/SamplingBadge.js +1 -1
- package/dist/admin/analytics/ToggleChip.js +1 -1
- package/dist/admin/analytics/TotalsCards.js +1 -1
- package/dist/admin/analytics/TruncationBanner.js +2 -2
- package/dist/admin/analytics/analyticsModel.d.ts +3 -1
- package/dist/admin/analytics/analyticsModel.d.ts.map +1 -1
- package/dist/admin/analytics/analyticsModel.js +13 -5
- package/dist/admin/analytics/analyticsModel.js.map +1 -1
- package/dist/admin/analytics/analyticsTypes.d.ts +1 -1
- package/dist/admin/analytics/analyticsTypes.d.ts.map +1 -1
- package/dist/admin/analytics/chartModel.d.ts.map +1 -1
- package/dist/admin/analytics/chartModel.js +2 -2
- package/dist/admin/analytics/chartModel.js.map +1 -1
- package/dist/admin/analytics/useAnalyticsQuery.js +2 -2
- package/dist/admin/analytics/useFilterValues.js +1 -1
- package/dist/admin/useAdminDetailTrail.js +2 -2
- package/dist/admin/useConfirmedAction.js +2 -2
- package/dist/ai/AiChat.d.ts +31 -2
- package/dist/ai/AiChat.d.ts.map +1 -1
- package/dist/ai/AiChat.js +82 -22
- package/dist/ai/AiChat.js.map +1 -1
- package/dist/ai/AiChatComposer.d.ts +9 -0
- package/dist/ai/AiChatComposer.d.ts.map +1 -1
- package/dist/ai/AiChatComposer.js +9 -4
- package/dist/ai/AiChatComposer.js.map +1 -1
- package/dist/ai/AiChatConfirmCard.d.ts +2 -2
- package/dist/ai/AiChatConfirmCard.d.ts.map +1 -1
- package/dist/ai/AiChatConfirmCard.js +15 -5
- package/dist/ai/AiChatConfirmCard.js.map +1 -1
- package/dist/ai/AiChatDock.js +3 -3
- package/dist/ai/AiChatEmpty.d.ts +5 -0
- package/dist/ai/AiChatEmpty.d.ts.map +1 -1
- package/dist/ai/AiChatEmpty.js +26 -30
- package/dist/ai/AiChatEmpty.js.map +1 -1
- package/dist/ai/AiChatFloat.d.ts +31 -2
- package/dist/ai/AiChatFloat.d.ts.map +1 -1
- package/dist/ai/AiChatFloat.js +42 -6
- package/dist/ai/AiChatFloat.js.map +1 -1
- package/dist/ai/AiChatHeaderButton.d.ts +14 -0
- package/dist/ai/AiChatHeaderButton.d.ts.map +1 -0
- package/dist/ai/AiChatHeaderButton.js +21 -0
- package/dist/ai/AiChatHeaderButton.js.map +1 -0
- package/dist/ai/AiChatHistory.d.ts.map +1 -1
- package/dist/ai/AiChatHistory.js +8 -6
- package/dist/ai/AiChatHistory.js.map +1 -1
- package/dist/ai/AiChatLauncher.d.ts +5 -0
- package/dist/ai/AiChatLauncher.d.ts.map +1 -1
- package/dist/ai/AiChatLauncher.js +3 -3
- package/dist/ai/AiChatLauncher.js.map +1 -1
- package/dist/ai/AiChatMessage.d.ts +6 -0
- package/dist/ai/AiChatMessage.d.ts.map +1 -1
- package/dist/ai/AiChatMessage.js +4 -4
- package/dist/ai/AiChatMessage.js.map +1 -1
- package/dist/ai/AiChatPanel.d.ts +46 -5
- package/dist/ai/AiChatPanel.d.ts.map +1 -1
- package/dist/ai/AiChatPanel.js +30 -30
- package/dist/ai/AiChatPanel.js.map +1 -1
- package/dist/ai/AiChatToolTrace.d.ts +13 -0
- package/dist/ai/AiChatToolTrace.d.ts.map +1 -1
- package/dist/ai/AiChatToolTrace.js +75 -48
- package/dist/ai/AiChatToolTrace.js.map +1 -1
- package/dist/ai/aiChatMotion.d.ts +24 -0
- package/dist/ai/aiChatMotion.d.ts.map +1 -0
- package/dist/ai/aiChatMotion.js +67 -0
- package/dist/ai/aiChatMotion.js.map +1 -0
- package/dist/ai/index.d.ts +2 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +3 -1
- package/dist/ai/useAiChat.d.ts +11 -0
- package/dist/ai/useAiChat.d.ts.map +1 -1
- package/dist/ai/useAiChat.js +6 -4
- package/dist/ai/useAiChat.js.map +1 -1
- package/dist/ai/useAiChatFloatDrag.d.ts +23 -0
- package/dist/ai/useAiChatFloatDrag.d.ts.map +1 -0
- package/dist/ai/useAiChatFloatDrag.js +87 -0
- package/dist/ai/useAiChatFloatDrag.js.map +1 -0
- package/dist/ai/useAiContext.js +2 -2
- package/dist/auth/AuthLogin.d.ts.map +1 -1
- package/dist/auth/AuthLogin.js +18 -10
- package/dist/auth/AuthLogin.js.map +1 -1
- package/dist/auth/AuthLoginSlots.d.ts +53 -0
- package/dist/auth/AuthLoginSlots.d.ts.map +1 -0
- package/dist/auth/AuthLoginSlots.js +39 -0
- package/dist/auth/AuthLoginSlots.js.map +1 -0
- package/dist/auth/AuthMfaStep.js +7 -7
- package/dist/auth/AuthPasskeyAutofill.js +1 -1
- package/dist/auth/AuthRegister.js +9 -9
- package/dist/auth/AuthRegisterFormPhase.js +4 -4
- package/dist/auth/AuthRegisterPasswordRules.js +2 -2
- package/dist/auth/AuthResetPassword.js +10 -10
- package/dist/auth/AuthRouter.js +2 -2
- package/dist/auth/AuthVerifyEmail.js +2 -2
- package/dist/auth/AuthVerifyEmailStateful.js +3 -3
- package/dist/auth/AuthVerifyEmailView.js +4 -4
- package/dist/auth/TurnstileWidget.js +1 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -1
- package/dist/auth/usePasskey.js +1 -1
- package/dist/calendar/Calendar.js +4 -4
- package/dist/chart/Chart.js +2 -2
- package/dist/command/Command.js +4 -4
- package/dist/core/Alert.js +2 -2
- package/dist/core/AlertDialog.js +2 -2
- package/dist/core/Avatar.js +2 -2
- package/dist/core/Badge.js +2 -2
- package/dist/core/BrandIcon.js +1 -1
- package/dist/core/Breadcrumb.js +3 -3
- package/dist/core/Button.js +6 -6
- package/dist/core/Button.js.map +1 -1
- package/dist/core/ButtonGroup.js +2 -2
- package/dist/core/Card.js +1 -1
- package/dist/core/Checkbox.js +2 -2
- package/dist/core/Collapsible.js +2 -2
- package/dist/core/Combobox.d.ts.map +1 -1
- package/dist/core/Combobox.js +4 -4
- package/dist/core/Combobox.js.map +1 -1
- package/dist/core/ContextMenu.js +2 -2
- package/dist/core/Dialog.d.ts.map +1 -1
- package/dist/core/Dialog.js +4 -4
- package/dist/core/Dialog.js.map +1 -1
- package/dist/core/DirectionProvider.js +1 -1
- package/dist/core/Drawer.js +3 -3
- package/dist/core/DropdownMenu.js +2 -2
- package/dist/core/Empty.js +1 -1
- package/dist/core/HoverCard.js +1 -1
- package/dist/core/Input.js +2 -2
- package/dist/core/InputGroup.js +2 -2
- package/dist/core/Label.js +1 -1
- package/dist/core/Menubar.js +4 -4
- package/dist/core/PageOutline.d.ts +9 -1
- package/dist/core/PageOutline.d.ts.map +1 -1
- package/dist/core/PageOutline.js +25 -6
- package/dist/core/PageOutline.js.map +1 -1
- package/dist/core/Pagination.js +2 -2
- package/dist/core/PaneRail.js +1 -1
- package/dist/core/Popover.js +2 -2
- package/dist/core/Progress.js +1 -1
- package/dist/core/Segmented.d.ts +11 -1
- package/dist/core/Segmented.d.ts.map +1 -1
- package/dist/core/Segmented.js +8 -5
- package/dist/core/Segmented.js.map +1 -1
- package/dist/core/Separator.js +1 -1
- package/dist/core/Sheet.js +3 -3
- package/dist/core/Sidebar.js +7 -7
- package/dist/core/Slider.js +3 -3
- package/dist/core/Spinner.js +1 -1
- package/dist/core/Stepper.js +1 -1
- package/dist/core/Switch.js +1 -1
- package/dist/core/Table.js +1 -1
- package/dist/core/Textarea.js +1 -1
- package/dist/core/TimeAgo.d.ts +9 -1
- package/dist/core/TimeAgo.d.ts.map +1 -1
- package/dist/core/TimeAgo.js +15 -3
- package/dist/core/TimeAgo.js.map +1 -1
- package/dist/core/Toaster.js +2 -2
- package/dist/core/Tooltip.js +1 -1
- package/dist/core/UserAvatar.js +3 -3
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -2
- package/dist/core/useDialog.js +5 -5
- package/dist/core/useUndoable.js +1 -1
- package/dist/form/AutoForm.js +6 -6
- package/dist/form/AutoFormBottomBar.js +4 -4
- package/dist/form/AutoFormErrorPopover.js +4 -4
- package/dist/form/AutoFormGroupBlock.js +3 -3
- package/dist/form/AutoFormGroupGridField.js +2 -2
- package/dist/form/Control.d.ts +4 -0
- package/dist/form/Control.d.ts.map +1 -1
- package/dist/form/Control.js +9 -8
- package/dist/form/Control.js.map +1 -1
- package/dist/form/ControlArray.js +7 -7
- package/dist/form/ControlDate.js +6 -6
- package/dist/form/ControlDatePopover.js +4 -4
- package/dist/form/ControlDateRange.js +5 -5
- package/dist/form/ControlMonthPopover.js +4 -4
- package/dist/form/ControlNumber.js +3 -3
- package/dist/form/ControlObject.js +7 -7
- package/dist/form/ControlPassword.js +3 -3
- package/dist/form/ControlSelect.d.ts +12 -0
- package/dist/form/ControlSelect.d.ts.map +1 -1
- package/dist/form/ControlSelect.js +13 -7
- package/dist/form/ControlSelect.js.map +1 -1
- package/dist/form/ControlSelectCombobox.js +4 -4
- package/dist/form/ControlUpload.d.ts.map +1 -1
- package/dist/form/ControlUpload.js +11 -10
- package/dist/form/ControlUpload.js.map +1 -1
- package/dist/form/ControlUploadItemThumb.js +1 -1
- package/dist/form/FormField.js +2 -2
- package/dist/form/FormFieldDescriptionTip.js +1 -1
- package/dist/form/fieldTrigger.js +3 -3
- package/dist/form/iconHint.js +1 -1
- package/dist/form/useFieldErrorText.js +1 -1
- package/dist/i18n/en/uiEn.d.ts.map +1 -1
- package/dist/i18n/en/uiEn.js +31 -2
- package/dist/i18n/en/uiEn.js.map +1 -1
- package/dist/i18n/fr/uiFr.d.ts.map +1 -1
- package/dist/i18n/fr/uiFr.js +31 -2
- package/dist/i18n/fr/uiFr.js.map +1 -1
- package/dist/markdown/MarkdownView.d.ts +9 -0
- package/dist/markdown/MarkdownView.d.ts.map +1 -1
- package/dist/markdown/MarkdownView.js +13 -7
- package/dist/markdown/MarkdownView.js.map +1 -1
- package/dist/markdown/diagram/DiagramLabel.js +1 -1
- package/dist/markdown/diagram/FlowchartDiagram.js +2 -2
- package/dist/markdown/diagram/FlowchartDiagramCluster.js +2 -2
- package/dist/markdown/diagram/FlowchartDiagramEdge.js +1 -1
- package/dist/markdown/diagram/FlowchartDiagramNode.js +1 -1
- package/dist/markdown/diagram/MermaidFence.js +2 -2
- package/dist/markdown/diagram/SequenceDiagram.js +2 -2
- package/dist/markdown/diagram/SequenceDiagramFragment.js +2 -2
- package/dist/markdown/diagram/SequenceDiagramMessage.js +1 -1
- package/dist/markdown/diagram/SequenceDiagramNote.js +1 -1
- package/dist/markdown/diagram/SequenceDiagramParticipant.js +2 -2
- package/dist/markdown/diagram/SequenceDiagramParticipantActor.js +2 -2
- package/dist/markdown/diagram/layoutFlowchart.js +1 -1
- package/dist/markdown/highlightLines.js +1 -1
- package/dist/organizations/MyOrganizationInvitations.d.ts.map +1 -1
- package/dist/organizations/MyOrganizationInvitations.js +13 -5
- package/dist/organizations/MyOrganizationInvitations.js.map +1 -1
- package/dist/organizations/MyOrganizations.d.ts.map +1 -1
- package/dist/organizations/MyOrganizations.js +15 -5
- package/dist/organizations/MyOrganizations.js.map +1 -1
- package/dist/organizations/OrganizationInviteDialog.js +6 -6
- package/dist/organizations/OrganizationInviteDialog.js.map +1 -1
- package/dist/organizations/OrganizationMemberRankPicker.js +5 -5
- package/dist/organizations/OrganizationMembers.d.ts.map +1 -1
- package/dist/organizations/OrganizationMembers.js +12 -6
- package/dist/organizations/OrganizationMembers.js.map +1 -1
- package/dist/organizations/OrganizationPendingInvitations.d.ts.map +1 -1
- package/dist/organizations/OrganizationPendingInvitations.js +9 -4
- package/dist/organizations/OrganizationPendingInvitations.js.map +1 -1
- package/dist/organizations/OrganizationRankColumnHeader.js +2 -2
- package/dist/organizations/OrganizationRanks.d.ts.map +1 -1
- package/dist/organizations/OrganizationRanks.js +7 -5
- package/dist/organizations/OrganizationRanks.js.map +1 -1
- package/dist/organizations/OrganizationTransferOwnershipDialog.js +5 -5
- package/dist/organizations/OrganizationTransferOwnershipDialog.js.map +1 -1
- package/dist/organizations/useInviteOrganizationMember.js +1 -1
- package/dist/organizations/useRevokeOrganizationInvitation.js +2 -2
- package/dist/otp/InputOTP.js +2 -2
- package/dist/resizable/Resizable.js +1 -1
- package/dist/settings/$settingsDialog.js +1 -1
- package/dist/settings/$settingsSection.js +1 -1
- package/dist/settings/SettingsDangerSection.js +1 -1
- package/dist/settings/SettingsDialog.js +6 -6
- package/dist/settings/SettingsDialogHost.js +3 -3
- package/dist/settings/SettingsDialogs.js +2 -2
- package/dist/settings/useSettingsDialog.js +2 -2
- package/dist/shell/ActionErrorToaster.js +2 -2
- package/dist/shell/AppActions.js +1 -1
- package/dist/shell/AppShell.js +4 -4
- package/dist/shell/AppShellNavCollapse.js +1 -1
- package/dist/shell/AppShellNavDropdownItems.js +5 -5
- package/dist/shell/AppShellNavDropdownItems.js.map +1 -1
- package/dist/shell/AppShellSidebarNavItem.js +7 -7
- package/dist/shell/AppShellSidebarNavItem.js.map +1 -1
- package/dist/shell/AppShellStatefulSidebarTrigger.js +4 -4
- package/dist/shell/ButtonDark.js +3 -3
- package/dist/shell/ButtonInbox.js +5 -5
- package/dist/shell/ButtonLanguage.js +4 -4
- package/dist/shell/ButtonSettings.js +5 -5
- package/dist/shell/ButtonSettingsColorModeMenu.js +2 -2
- package/dist/shell/ButtonSettingsLanguageMenu.js +3 -3
- package/dist/shell/ButtonSettingsThemeMenu.js +4 -4
- package/dist/shell/ButtonSettingsVisionMenuItem.js +2 -2
- package/dist/shell/ButtonTheme.js +5 -5
- package/dist/shell/ButtonUser.js +1 -1
- package/dist/shell/ButtonUserAccountMenuItem.js +3 -3
- package/dist/shell/ButtonUserAdminMenuItem.js +4 -4
- package/dist/shell/ButtonUserAdminMenuItem.js.map +1 -1
- package/dist/shell/ButtonUserContent.js +5 -5
- package/dist/shell/ButtonUserDefaultMenu.js +2 -2
- package/dist/shell/ButtonUserLogoutMenuItem.js +2 -2
- package/dist/shell/ButtonVision.js +3 -3
- package/dist/shell/DetailAside.js +4 -4
- package/dist/shell/DetailLayout.d.ts +3 -1
- package/dist/shell/DetailLayout.d.ts.map +1 -1
- package/dist/shell/DetailLayout.js +29 -17
- package/dist/shell/DetailLayout.js.map +1 -1
- package/dist/shell/DetailLayoutTabMenu.d.ts +19 -0
- package/dist/shell/DetailLayoutTabMenu.d.ts.map +1 -0
- package/dist/shell/DetailLayoutTabMenu.js +65 -0
- package/dist/shell/DetailLayoutTabMenu.js.map +1 -0
- package/dist/shell/NavShell.js +2 -2
- package/dist/shell/PlateFolderTabs.js +1 -1
- package/dist/shell/PlateTabBar.js +1 -1
- package/dist/shell/SidebarBackHeader.js +3 -3
- package/dist/shell/SidebarBackHeader.js.map +1 -1
- package/dist/shell/SidebarNavAutoClose.js +1 -1
- package/dist/shell/Spotlight.js +3 -3
- package/dist/shell/useDetailTab.js +1 -1
- package/dist/shell/useNavBreadcrumbs.js +3 -3
- package/dist/shell/useNavCrumbs.js +1 -1
- package/dist/shell/useNavEntries.js +3 -3
- package/dist/shell/useNavTree.js +1 -1
- package/dist/sortable/index.js +1 -1
- package/dist/sortable/useSortableList.js +1 -1
- package/dist/styles.css +43 -0
- package/dist/swagger/SwaggerAccessBadge.js +1 -1
- package/dist/swagger/SwaggerAlephaMeta.js +1 -1
- package/dist/swagger/SwaggerCredentials.js +3 -3
- package/dist/swagger/SwaggerExplorer.js +5 -5
- package/dist/swagger/SwaggerNav.js +2 -2
- package/dist/swagger/SwaggerOperationView.js +2 -2
- package/dist/swagger/SwaggerResponseView.js +2 -2
- package/dist/swagger/SwaggerResponses.js +1 -1
- package/dist/swagger/SwaggerSchemaView.js +1 -1
- package/dist/swagger/SwaggerTryIt.js +2 -2
- package/dist/swagger/SwaggerTryItForm.js +3 -3
- package/dist/swagger/useSwaggerAccess.js +2 -2
- package/dist/table/DataTable.d.ts.map +1 -1
- package/dist/table/DataTable.js +44 -9
- package/dist/table/DataTable.js.map +1 -1
- package/dist/table/DataTableBody.d.ts +10 -0
- package/dist/table/DataTableBody.d.ts.map +1 -1
- package/dist/table/DataTableBody.js +32 -10
- package/dist/table/DataTableBody.js.map +1 -1
- package/dist/table/DataTableBulkBar.d.ts.map +1 -1
- package/dist/table/DataTableBulkBar.js +5 -4
- package/dist/table/DataTableBulkBar.js.map +1 -1
- package/dist/table/DataTableBulkMenu.js +2 -2
- package/dist/table/DataTableColumnPicker.js +3 -3
- package/dist/table/DataTableCompactPager.js +2 -2
- package/dist/table/DataTableFilterAdd.js +2 -2
- package/dist/table/DataTableFilterBar.js +2 -2
- package/dist/table/DataTableFilterControl.js +2 -2
- package/dist/table/DataTableFilterDialog.js +3 -3
- package/dist/table/DataTableFilterMenu.js +2 -2
- package/dist/table/DataTableFooter.d.ts +5 -1
- package/dist/table/DataTableFooter.d.ts.map +1 -1
- package/dist/table/DataTableFooter.js +27 -23
- package/dist/table/DataTableFooter.js.map +1 -1
- package/dist/table/DataTableGroupRow.js +1 -1
- package/dist/table/DataTableHeaderFilter.js +3 -3
- package/dist/table/DataTableHeaderPopup.js +3 -3
- package/dist/table/DataTableHeaderPopupChevron.js +1 -1
- package/dist/table/DataTableHeaderPopupFilter.js +1 -1
- package/dist/table/DataTableHeaderPopupList.js +1 -1
- package/dist/table/DataTableHeaderPopupRange.js +3 -3
- package/dist/table/DataTableHeaderRow.js +3 -3
- package/dist/table/DataTableHelpButton.js +2 -2
- package/dist/table/DataTableKeyHints.d.ts +11 -0
- package/dist/table/DataTableKeyHints.d.ts.map +1 -0
- package/dist/table/DataTableKeyHints.js +23 -0
- package/dist/table/DataTableKeyHints.js.map +1 -0
- package/dist/table/DataTablePresetRail.js +4 -4
- package/dist/table/DataTableRowActionPrimary.d.ts +20 -0
- package/dist/table/DataTableRowActionPrimary.d.ts.map +1 -0
- package/dist/table/DataTableRowActionPrimary.js +42 -0
- package/dist/table/DataTableRowActionPrimary.js.map +1 -0
- package/dist/table/DataTableRowActionsInline.d.ts +3 -2
- package/dist/table/DataTableRowActionsInline.d.ts.map +1 -1
- package/dist/table/DataTableRowActionsInline.js +33 -22
- package/dist/table/DataTableRowActionsInline.js.map +1 -1
- package/dist/table/DataTableRowActionsMenu.js +2 -2
- package/dist/table/DataTableSortMenuButton.d.ts +15 -0
- package/dist/table/DataTableSortMenuButton.d.ts.map +1 -0
- package/dist/table/DataTableSortMenuButton.js +62 -0
- package/dist/table/DataTableSortMenuButton.js.map +1 -0
- package/dist/table/DataTableSummaryPanel.js +2 -2
- package/dist/table/DataTableToolbar.d.ts +4 -0
- package/dist/table/DataTableToolbar.d.ts.map +1 -1
- package/dist/table/DataTableToolbar.js +8 -2
- package/dist/table/DataTableToolbar.js.map +1 -1
- package/dist/table/PermissionMatrixGroupRows.js +1 -1
- package/dist/table/dataTableBaseProps.d.ts +77 -1
- package/dist/table/dataTableBaseProps.d.ts.map +1 -1
- package/dist/table/dataTableFilterFields.js +1 -1
- package/dist/table/dataTablePriority.d.ts +16 -0
- package/dist/table/dataTablePriority.d.ts.map +1 -0
- package/dist/table/dataTablePriority.js +31 -0
- package/dist/table/dataTablePriority.js.map +1 -0
- package/dist/table/dataTableTypes.d.ts +135 -0
- package/dist/table/dataTableTypes.d.ts.map +1 -1
- package/dist/table/index.d.ts +2 -1
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +2 -1
- package/dist/table/useDataTableColumns.js +1 -1
- package/dist/table/useDataTableData.d.ts +1 -0
- package/dist/table/useDataTableData.d.ts.map +1 -1
- package/dist/table/useDataTableData.js +7 -6
- package/dist/table/useDataTableData.js.map +1 -1
- package/dist/table/useDataTableFilterForm.js +3 -3
- package/dist/table/useDataTableFilterModel.d.ts +1 -0
- package/dist/table/useDataTableFilterModel.d.ts.map +1 -1
- package/dist/table/useDataTableFilterModel.js +4 -4
- package/dist/table/useDataTableFilterVisibility.js +1 -1
- package/dist/table/useDataTableKeyboard.d.ts +58 -0
- package/dist/table/useDataTableKeyboard.d.ts.map +1 -0
- package/dist/table/useDataTableKeyboard.js +157 -0
- package/dist/table/useDataTableKeyboard.js.map +1 -0
- package/dist/table/useDataTableRefresh.js +1 -1
- package/dist/table/useDataTableSummary.js +1 -1
- package/dist/table/useDataTableWake.js +1 -1
- package/dist/table/useElementWidth.d.ts +10 -0
- package/dist/table/useElementWidth.d.ts.map +1 -0
- package/dist/table/useElementWidth.js +29 -0
- package/dist/table/useElementWidth.js.map +1 -0
- package/dist/tree/TreeView.js +1 -1
- package/dist/tree/TreeViewRow.d.ts.map +1 -1
- package/dist/tree/TreeViewRow.js +3 -3
- package/dist/tree/TreeViewRow.js.map +1 -1
- package/docs/packages-alepha-ui-ai.md +1 -0
- package/package.json +10 -10
- package/src/account/AccountDeleteDialog.tsx +2 -1
- package/src/account/AccountPasswordDialog.tsx +1 -1
- package/src/account/AccountProfileView.tsx +2 -1
- package/src/account/ApiKeyCreateDialog.tsx +1 -1
- package/src/account/__tests__/AccountProfile.browser.spec.tsx +21 -5
- package/src/admin/AdminAi.tsx +231 -0
- package/src/admin/AdminAiDailyChart.tsx +93 -0
- package/src/admin/AdminAiUsageTable.tsx +115 -0
- package/src/admin/AdminFiles.tsx +4 -6
- package/src/admin/AdminParameters.tsx +13 -2
- package/src/admin/AdminParametersEditorForm.tsx +9 -4
- package/src/admin/AdminParametersEditorPane.tsx +6 -0
- package/src/admin/AdminParametersTreeNodeView.tsx +1 -1
- package/src/admin/AdminRouter.tsx +31 -5
- package/src/admin/__tests__/AdminAiDailyChart.browser.spec.tsx +57 -0
- package/src/admin/__tests__/AdminRouter.spec.ts +5 -2
- package/src/admin/adminAiMoney.ts +20 -0
- package/src/admin/adminParametersTree.spec.ts +132 -0
- package/src/admin/adminParametersTree.ts +54 -2
- package/src/admin/analytics/ResultsTable.tsx +3 -1
- package/src/admin/analytics/analyticsModel.spec.ts +61 -2
- package/src/admin/analytics/analyticsModel.ts +29 -14
- package/src/admin/analytics/analyticsTypes.ts +1 -1
- package/src/admin/analytics/chartModel.ts +6 -2
- package/src/ai/AiChat.tsx +152 -28
- package/src/ai/AiChatComposer.tsx +26 -2
- package/src/ai/AiChatConfirmCard.tsx +15 -4
- package/src/ai/AiChatEmpty.tsx +24 -11
- package/src/ai/AiChatFloat.tsx +93 -3
- package/src/ai/AiChatHeaderButton.tsx +36 -0
- package/src/ai/AiChatHistory.tsx +22 -12
- package/src/ai/AiChatLauncher.tsx +6 -1
- package/src/ai/AiChatMessage.tsx +17 -2
- package/src/ai/AiChatPanel.tsx +93 -38
- package/src/ai/AiChatToolTrace.tsx +46 -0
- package/src/ai/__tests__/AiChat.browser.spec.tsx +501 -2
- package/src/ai/aiChatMotion.ts +86 -0
- package/src/ai/index.ts +2 -0
- package/src/ai/useAiChat.ts +13 -0
- package/src/ai/useAiChatFloatDrag.ts +131 -0
- package/src/auth/AuthLogin.tsx +26 -1
- package/src/auth/AuthLoginSlots.ts +55 -0
- package/src/auth/__tests__/AuthLoginSlots.browser.spec.tsx +93 -0
- package/src/auth/index.ts +1 -0
- package/src/core/Combobox.tsx +3 -1
- package/src/core/Dialog.tsx +9 -2
- package/src/core/PageOutline.tsx +28 -4
- package/src/core/Segmented.tsx +27 -5
- package/src/core/TimeAgo.browser.spec.tsx +49 -4
- package/src/core/TimeAgo.tsx +16 -4
- package/src/core/__tests__/CoreA11y.browser.spec.tsx +1 -10
- package/src/core/__tests__/PageOutline.browser.spec.tsx +20 -0
- package/src/core/__tests__/Segmented.browser.spec.tsx +59 -1
- package/src/core/__tests__/Textarea.browser.spec.tsx +1 -0
- package/src/core/__tests__/primitiveSlots.spec.ts +0 -1
- package/src/core/index.ts +0 -11
- package/src/form/Control.tsx +5 -0
- package/src/form/ControlSelect.tsx +31 -3
- package/src/form/ControlUpload.tsx +11 -16
- package/src/form/__tests__/ControlChoices.browser.spec.tsx +42 -0
- package/src/form/__tests__/ControlSelectLongLabelDialog.browser.spec.tsx +105 -0
- package/src/form/__tests__/ControlUpload.browser.spec.tsx +24 -0
- package/src/i18n/en/uiEn.ts +33 -2
- package/src/i18n/fr/uiFr.ts +33 -2
- package/src/markdown/MarkdownView.tsx +21 -5
- package/src/markdown/__tests__/MarkdownViewLink.browser.spec.tsx +33 -0
- package/src/organizations/MyOrganizationInvitations.tsx +11 -2
- package/src/organizations/MyOrganizations.tsx +24 -3
- package/src/organizations/OrganizationInviteDialog.tsx +1 -1
- package/src/organizations/OrganizationMembers.tsx +10 -1
- package/src/organizations/OrganizationPendingInvitations.tsx +6 -0
- package/src/organizations/OrganizationRanks.tsx +2 -0
- package/src/organizations/OrganizationTransferOwnershipDialog.tsx +1 -1
- package/src/organizations/__tests__/MyOrganizations.browser.spec.tsx +2 -1
- package/src/shell/DetailLayout.tsx +27 -5
- package/src/shell/DetailLayoutTabMenu.tsx +89 -0
- package/src/shell/__tests__/DetailLayout.browser.spec.tsx +36 -1
- package/src/styles.css +43 -0
- package/src/table/DataTable.tsx +65 -2
- package/src/table/DataTableBody.tsx +48 -6
- package/src/table/DataTableBulkBar.tsx +3 -6
- package/src/table/DataTableFooter.tsx +6 -1
- package/src/table/DataTableKeyHints.tsx +40 -0
- package/src/table/DataTableRowActionPrimary.tsx +52 -0
- package/src/table/DataTableRowActionsInline.tsx +16 -2
- package/src/table/DataTableSortMenuButton.tsx +105 -0
- package/src/table/DataTableToolbar.tsx +9 -0
- package/src/table/__tests__/DataTableColumnPriority.browser.spec.tsx +147 -0
- package/src/table/__tests__/DataTableDenseHeader.browser.spec.tsx +92 -0
- package/src/table/__tests__/DataTableKeyboard.browser.spec.tsx +216 -0
- package/src/table/__tests__/DataTableRowActionPrimary.browser.spec.tsx +126 -0
- package/src/table/__tests__/DataTableSortMenu.browser.spec.tsx +126 -0
- package/src/table/__tests__/DataTableStaticLoading.browser.spec.tsx +80 -0
- package/src/table/dataTableBaseProps.ts +78 -0
- package/src/table/dataTablePriority.ts +34 -0
- package/src/table/dataTableTypes.ts +139 -0
- package/src/table/index.ts +5 -0
- package/src/table/useDataTableData.ts +5 -1
- package/src/table/useDataTableKeyboard.ts +231 -0
- package/src/table/useElementWidth.ts +35 -0
- package/src/tree/TreeViewRow.tsx +4 -12
- package/src/tree/__tests__/TreeView.browser.spec.tsx +27 -12
- package/dist/core/Tabs.d.ts +0 -15
- package/dist/core/Tabs.d.ts.map +0 -1
- package/dist/core/Tabs.js +0 -50
- package/dist/core/Tabs.js.map +0 -1
- package/src/core/Tabs.tsx +0 -86
- package/src/core/__tests__/Tabs.browser.spec.tsx +0 -23
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowLeft } from "lucide-react";
|
|
1
4
|
import { Button } from "../core/Button.js";
|
|
2
5
|
import { Segmented } from "../core/Segmented.js";
|
|
3
6
|
import { Skeleton } from "../core/Skeleton.js";
|
|
4
|
-
import {
|
|
5
|
-
import "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { DetailLayoutTabMenu } from "./DetailLayoutTabMenu.js";
|
|
7
8
|
// src/shell/DetailLayout.tsx
|
|
8
9
|
/**
|
|
9
10
|
* The shell every detail page shares: a full-height identity aside, and a
|
|
@@ -25,7 +26,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
25
26
|
*
|
|
26
27
|
* The aside is hidden below `md`. A phone gets the tabs full width rather than
|
|
27
28
|
* a 288px column and a sliver of content; the same facts are reachable from
|
|
28
|
-
* the tab bodies.
|
|
29
|
+
* the tab bodies. Below `md` the tab strip is also replaced by a menu button
|
|
30
|
+
* naming the open tab (`DetailLayoutTabMenu`), and the toolbar wraps the
|
|
31
|
+
* actions onto a second line when the two do not fit on one.
|
|
29
32
|
*
|
|
30
33
|
* ```tsx
|
|
31
34
|
* const [tab, setTab] = useDetailTab<"overview" | "stock">("overview");
|
|
@@ -83,19 +86,28 @@ const DetailLayout = (props) => {
|
|
|
83
86
|
}), /* @__PURE__ */ jsxs("div", {
|
|
84
87
|
className: "flex min-h-0 min-w-0 flex-1 flex-col",
|
|
85
88
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
86
|
-
className: "bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4",
|
|
87
|
-
children: [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
className: "bg-background flex min-h-14 shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2 md:h-14 md:flex-nowrap md:py-0",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx("div", {
|
|
92
|
+
className: "min-w-0 overflow-x-auto py-1 max-md:hidden",
|
|
93
|
+
children: /* @__PURE__ */ jsx(Segmented, {
|
|
94
|
+
size: "lg",
|
|
95
|
+
options,
|
|
96
|
+
value: props.tab,
|
|
97
|
+
onChange: props.onTabChange
|
|
98
|
+
})
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ jsx(DetailLayoutTabMenu, {
|
|
101
|
+
className: "md:hidden",
|
|
102
|
+
tabs: props.tabs,
|
|
103
|
+
tab: props.tab,
|
|
104
|
+
onTabChange: props.onTabChange
|
|
105
|
+
}),
|
|
106
|
+
props.actions ? /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: "ms-auto flex shrink-0 items-center gap-2 max-md:max-w-full max-md:flex-wrap max-md:justify-end",
|
|
108
|
+
children: props.actions
|
|
109
|
+
}) : null
|
|
110
|
+
]
|
|
99
111
|
}), props.children]
|
|
100
112
|
})]
|
|
101
113
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailLayout.js","names":[],"sources":["../../src/shell/DetailLayout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Segmented } from \"../core/Segmented.tsx\";\nimport { Skeleton } from \"../core/Skeleton.tsx\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state: see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data: every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load:\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific (it imports a\n * button, a segmented control and a skeleton), so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given: the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children`: they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outlined\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4 rtl:-scale-x-100\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-e p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n {/* ⚠️ `min-w-0 overflow-x-auto` around the tab strip, and `shrink-0`\n on the actions. Without them the row is a non-wrapping flex line\n whose items refuse to shrink below their `whitespace-nowrap`\n min-content width, while the ancestor two levels up is\n `overflow-hidden` (deliberately, see the comment above it) and\n this row is `overflow-x: visible`. Everything past the right edge\n was therefore CLIPPED, with no scrollbar and no way to reach it.\n\n Measured on the epic view at 411x845: the row was 409 wide with a\n 648 scrollWidth, and `Folios`, `Edit` and `Begin the Epic` - the\n page's primary action - were all off-screen and unclickable. 768px\n was worse, not better, because the 288px aside returns at `md`.\n\n The two classes split the row's shortfall deliberately. The tab\n strip is a bounded list this component owns, so it takes the\n scrolling; the actions are caller JSX this component cannot size\n (as the comment above already says), so they keep their full width\n and stay clickable. A tab strip that scrolls is a known phone\n pattern; a primary action hidden behind a scroll is not.\n\n No `no-scrollbar` here (the utility `styles.css` defines): the\n thin scrollbar is left showing, as the affordance saying there\n is more to the right.\n\n `py-1` is not spacing: `overflow-x: auto` makes the computed\n `overflow-y` `auto` too, and without 4px of slack the segment's\n 3px focus ring is clipped top and bottom. The row is\n `items-center` in a fixed 56px bar, so it costs no height. */}\n <div className=\"min-w-0 overflow-x-auto py-1\">\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n </div>\n {props.actions ? (\n <div className=\"ms-auto flex shrink-0 items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAW,SAAS,MAAM,SAAS;GAAnD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,0BAA2B,CAAA,GAC/C,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAwCE,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,WAAD;MACE,MAAK;MACI;MACT,OAAO,MAAM;MACb,UAAU,MAAM;KACjB,CAAA;IACE,CAAA,GACJ,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
|
|
1
|
+
{"version":3,"file":"DetailLayout.js","names":[],"sources":["../../src/shell/DetailLayout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Segmented } from \"../core/Segmented.tsx\";\nimport { Skeleton } from \"../core/Skeleton.tsx\";\nimport { DetailLayoutTabMenu } from \"./DetailLayoutTabMenu.tsx\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state: see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data: every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load:\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific (it imports a\n * button, a segmented control and a skeleton), so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given: the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies. Below `md` the tab strip is also replaced by a menu button\n * naming the open tab (`DetailLayoutTabMenu`), and the toolbar wraps the\n * actions onto a second line when the two do not fit on one.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children`: they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outlined\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4 rtl:-scale-x-100\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-e p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n {/* Below `md` the bar may wrap (`min-h-14`, `flex-wrap`, `py-2`): the\n tab menu and the actions share one line when they fit, and the\n actions drop to a second one when they do not. From `md` up the\n classes resolve to the single 56px line this always was. */}\n <div className=\"bg-background flex min-h-14 shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2 md:h-14 md:flex-nowrap md:py-0\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n {/* ⚠️ `min-w-0 overflow-x-auto` around the tab strip, and `shrink-0`\n on the actions. Without them the row is a non-wrapping flex line\n whose items refuse to shrink below their `whitespace-nowrap`\n min-content width, while the ancestor two levels up is\n `overflow-hidden` (deliberately, see the comment above it) and\n this row is `overflow-x: visible`. Everything past the right edge\n was therefore CLIPPED, with no scrollbar and no way to reach it.\n\n Measured on the epic view at 411x845: the row was 409 wide with a\n 648 scrollWidth, and `Folios`, `Edit` and `Begin the Epic` - the\n page's primary action - were all off-screen and unclickable. 768px\n was worse, not better, because the 288px aside returns at `md`.\n\n The two classes split the row's shortfall deliberately. The tab\n strip is a bounded list this component owns, so it takes the\n scrolling; the actions are caller JSX this component cannot size\n (as the comment above already says), so they keep their full width\n and stay clickable. A tab strip that scrolls is a known phone\n pattern; a primary action hidden behind a scroll is not.\n\n No `no-scrollbar` here (the utility `styles.css` defines): the\n thin scrollbar is left showing, as the affordance saying there\n is more to the right.\n\n `py-1` is not spacing: `overflow-x: auto` makes the computed\n `overflow-y` `auto` too, and without 4px of slack the segment's\n 3px focus ring is clipped top and bottom. The row is\n `items-center` in a fixed 56px bar, so it costs no height.\n\n ⚠️ Below `md` the strip is not rendered at all (#Q4550): at 393px\n an epic's actions left it 220px, which showed `Over` of\n `Overview` and put four tabs behind a scroll iOS draws no\n scrollbar for. The phone gets `DetailLayoutTabMenu` instead,\n which names the open tab and lists every one at full width. */}\n <div className=\"min-w-0 overflow-x-auto py-1 max-md:hidden\">\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n </div>\n <DetailLayoutTabMenu\n className=\"md:hidden\"\n tabs={props.tabs}\n tab={props.tab}\n onTabChange={props.onTabChange}\n />\n {/* `max-md:max-w-full max-md:flex-wrap`: on a phone the actions\n may be wider than the screen on their own, and then wrap\n inside their line rather than run past its edge. */}\n {props.actions ? (\n <div className=\"ms-auto flex shrink-0 items-center gap-2 max-md:max-w-full max-md:flex-wrap max-md:justify-end\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAW,SAAS,MAAM,SAAS;GAAnD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,0BAA2B,CAAA,GAC/C,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CAKE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KA8CE,oBAAC,OAAD;MAAK,WAAU;MACb,UAAA,oBAAC,WAAD;OACE,MAAK;OACI;OACT,OAAO,MAAM;OACb,UAAU,MAAM;MACjB,CAAA;KACE,CAAA;KACL,oBAAC,qBAAD;MACE,WAAU;MACV,MAAM,MAAM;MACZ,KAAK,MAAM;MACX,aAAa,MAAM;KACpB,CAAA;KAIA,MAAM,UACL,oBAAC,OAAD;MAAK,WAAU;MACZ,UAAA,MAAM;KACJ,CAAA,IACH;IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { DetailTab } from "./DetailLayout.tsx";
|
|
3
|
+
export interface DetailLayoutTabMenuProps {
|
|
4
|
+
tabs: DetailTab[];
|
|
5
|
+
tab: string;
|
|
6
|
+
onTabChange: (value: string) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The tab selector of a {@link DetailLayout} on a phone: one button naming
|
|
11
|
+
* the open tab, and a menu listing every tab.
|
|
12
|
+
*
|
|
13
|
+
* Below `md` the segmented strip does not fit beside the actions. An epic
|
|
14
|
+
* page at 393px left it 220px, so it showed `Over` of `Overview` and hid
|
|
15
|
+
* four tabs behind a scroll iOS draws no scrollbar for. A menu holds any
|
|
16
|
+
* number of tabs at full width, whatever the caller puts in `actions`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DetailLayoutTabMenu: (props: DetailLayoutTabMenuProps) => React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=DetailLayoutTabMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailLayoutTabMenu.d.ts","sourceRoot":"","sources":["../../src/shell/DetailLayoutTabMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,sBAuDlE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { Button } from "../core/Button.js";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "../core/DropdownMenu.js";
|
|
6
|
+
import { cn } from "../core/utils.js";
|
|
7
|
+
// src/shell/DetailLayoutTabMenu.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The tab selector of a {@link DetailLayout} on a phone: one button naming
|
|
10
|
+
* the open tab, and a menu listing every tab.
|
|
11
|
+
*
|
|
12
|
+
* Below `md` the segmented strip does not fit beside the actions. An epic
|
|
13
|
+
* page at 393px left it 220px, so it showed `Over` of `Overview` and hid
|
|
14
|
+
* four tabs behind a scroll iOS draws no scrollbar for. A menu holds any
|
|
15
|
+
* number of tabs at full width, whatever the caller puts in `actions`.
|
|
16
|
+
*/
|
|
17
|
+
const DetailLayoutTabMenu = (props) => {
|
|
18
|
+
const current = props.tabs.find((entry) => entry.value === props.tab) ?? props.tabs[0];
|
|
19
|
+
const CurrentIcon = current?.icon;
|
|
20
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
21
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
22
|
+
variant: "outlined",
|
|
23
|
+
size: "lg",
|
|
24
|
+
"data-slot": "detail-tab-menu",
|
|
25
|
+
className: cn("max-w-full min-w-0 justify-start", props.className)
|
|
26
|
+
}),
|
|
27
|
+
children: [
|
|
28
|
+
CurrentIcon ? /* @__PURE__ */ jsx(CurrentIcon, { className: "size-4" }) : null,
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "min-w-0 truncate",
|
|
31
|
+
children: current?.label
|
|
32
|
+
}),
|
|
33
|
+
current?.count !== void 0 && current.count !== null ? /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: "text-muted-foreground tabular-nums",
|
|
35
|
+
children: current.count
|
|
36
|
+
}) : null,
|
|
37
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "text-muted-foreground size-4" })
|
|
38
|
+
]
|
|
39
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
40
|
+
align: "start",
|
|
41
|
+
children: /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
42
|
+
value: props.tab,
|
|
43
|
+
onValueChange: (value) => props.onTabChange(value),
|
|
44
|
+
children: props.tabs.map((entry) => {
|
|
45
|
+
const Icon = entry.icon;
|
|
46
|
+
return /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
47
|
+
value: entry.value,
|
|
48
|
+
closeOnClick: true,
|
|
49
|
+
className: "py-1.5",
|
|
50
|
+
children: [
|
|
51
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { className: "size-4" }) : null,
|
|
52
|
+
entry.label,
|
|
53
|
+
entry.count !== void 0 && entry.count !== null ? /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "text-muted-foreground tabular-nums",
|
|
55
|
+
children: entry.count
|
|
56
|
+
}) : null
|
|
57
|
+
]
|
|
58
|
+
}, entry.value);
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})] });
|
|
62
|
+
};
|
|
63
|
+
export { DetailLayoutTabMenu };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=DetailLayoutTabMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailLayoutTabMenu.js","names":[],"sources":["../../src/shell/DetailLayoutTabMenu.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { ChevronDown } from \"lucide-react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuTrigger,\n} from \"../core/DropdownMenu.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport type { DetailTab } from \"./DetailLayout.tsx\";\n\nexport interface DetailLayoutTabMenuProps {\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n className?: string;\n}\n\n/**\n * The tab selector of a {@link DetailLayout} on a phone: one button naming\n * the open tab, and a menu listing every tab.\n *\n * Below `md` the segmented strip does not fit beside the actions. An epic\n * page at 393px left it 220px, so it showed `Over` of `Overview` and hid\n * four tabs behind a scroll iOS draws no scrollbar for. A menu holds any\n * number of tabs at full width, whatever the caller puts in `actions`.\n */\nexport const DetailLayoutTabMenu = (props: DetailLayoutTabMenuProps) => {\n const current =\n props.tabs.find((entry) => entry.value === props.tab) ?? props.tabs[0];\n const CurrentIcon = current?.icon;\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"outlined\"\n size=\"lg\"\n data-slot=\"detail-tab-menu\"\n className={cn(\"max-w-full min-w-0 justify-start\", props.className)}\n />\n }\n >\n {CurrentIcon ? <CurrentIcon className=\"size-4\" /> : null}\n <span className=\"min-w-0 truncate\">{current?.label}</span>\n {current?.count !== undefined && current.count !== null ? (\n <span className=\"text-muted-foreground tabular-nums\">\n {current.count}\n </span>\n ) : null}\n <ChevronDown className=\"text-muted-foreground size-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuRadioGroup\n value={props.tab}\n onValueChange={(value: string) => props.onTabChange(value)}\n >\n {props.tabs.map((entry) => {\n const Icon = entry.icon;\n return (\n // A single choice, so picking one closes the menu.\n <DropdownMenuRadioItem\n key={entry.value}\n value={entry.value}\n closeOnClick\n className=\"py-1.5\"\n >\n {Icon ? <Icon className=\"size-4\" /> : null}\n {entry.label}\n {entry.count !== undefined && entry.count !== null ? (\n <span className=\"text-muted-foreground tabular-nums\">\n {entry.count}\n </span>\n ) : null}\n </DropdownMenuRadioItem>\n );\n })}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiCA,MAAa,uBAAuB,UAAoC;CACtE,MAAM,UACJ,MAAM,KAAK,MAAM,UAAU,MAAM,UAAU,MAAM,GAAG,KAAK,MAAM,KAAK;CACtE,MAAM,cAAc,SAAS;CAE7B,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,qBAAC,qBAAD;EACE,QACE,oBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,aAAU;GACV,WAAW,GAAG,oCAAoC,MAAM,SAAS;EAClE,CAAA;EAPL,UAAA;GAUG,cAAc,oBAAC,aAAD,EAAa,WAAU,SAAU,CAAA,IAAI;GACpD,oBAAC,QAAD;IAAM,WAAU;IAAoB,UAAA,SAAS;GAAY,CAAA;GACxD,SAAS,UAAU,KAAA,KAAa,QAAQ,UAAU,OACjD,oBAAC,QAAD;IAAM,WAAU;IACb,UAAA,QAAQ;GACL,CAAA,IACJ;GACJ,oBAAC,aAAD,EAAa,WAAU,+BAAgC,CAAA;EACpC;CACrB,CAAA,GAAA,oBAAC,qBAAD;EAAqB,OAAM;EACzB,UAAA,oBAAC,wBAAD;GACE,OAAO,MAAM;GACb,gBAAgB,UAAkB,MAAM,YAAY,KAAK;GAExD,UAAA,MAAM,KAAK,KAAK,UAAU;IACzB,MAAM,OAAO,MAAM;IACnB,OAEE,qBAAC,uBAAD;KAEE,OAAO,MAAM;KACb,cAAA;KACA,WAAU;KAJZ,UAAA;MAMG,OAAO,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,IAAI;MACrC,MAAM;MACN,MAAM,UAAU,KAAA,KAAa,MAAM,UAAU,OAC5C,oBAAC,QAAD;OAAM,WAAU;OACb,UAAA,MAAM;MACH,CAAA,IACJ;KACiB;IAZhB,GAAA,MAAM,KAYU;GAE3B,CAAC;EACqB,CAAA;CACL,CAAA,CACT,EAAA,CAAA;AAElB"}
|
package/dist/shell/NavShell.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { useRouterState } from "alepha/react/router";
|
|
2
|
+
import { useMemo } from "react";
|
|
1
3
|
import { AppShell } from "./AppShell.js";
|
|
2
4
|
import { isActivePath } from "./navTreeUtil.js";
|
|
3
5
|
import { useNavBreadcrumbs } from "./useNavBreadcrumbs.js";
|
|
4
6
|
import { useNavTree } from "./useNavTree.js";
|
|
5
|
-
import { useMemo } from "react";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { useRouterState } from "alepha/react/router";
|
|
8
8
|
// src/shell/NavShell.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Data-driven {@link AppShell}: the sidebar nav and breadcrumb trail are
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Link } from "alepha/react/router";
|
|
1
2
|
import { inlineArrowKey } from "../core/inlineArrowKey.js";
|
|
2
3
|
import { cn } from "../core/utils.js";
|
|
3
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Link } from "alepha/react/router";
|
|
5
5
|
// src/shell/PlateFolderTabs.tsx
|
|
6
6
|
/**
|
|
7
7
|
* `PlateLayout`'s folder tabs, its default look: drawn like a browser's tabs,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Link } from "alepha/react/router";
|
|
1
2
|
import { cn } from "../core/utils.js";
|
|
2
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Link } from "alepha/react/router";
|
|
4
4
|
// src/shell/PlateTabBar.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ArrowLeft } from "lucide-react";
|
|
2
1
|
import "react";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Link
|
|
3
|
+
import { Link } from "alepha/react/router";
|
|
4
|
+
import { ArrowLeft } from "lucide-react";
|
|
5
5
|
// src/shell/SidebarBackHeader.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A root shell's sidebar header with a way out: a back arrow to the
|
|
@@ -18,7 +18,7 @@ import { Link as Link$1 } from "alepha/react/router";
|
|
|
18
18
|
const SidebarBackHeader = (props) => {
|
|
19
19
|
return /* @__PURE__ */ jsxs("div", {
|
|
20
20
|
className: "flex min-w-0 items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0",
|
|
21
|
-
children: [props.href && /* @__PURE__ */ jsx(Link
|
|
21
|
+
children: [props.href && /* @__PURE__ */ jsx(Link, {
|
|
22
22
|
href: props.href,
|
|
23
23
|
"aria-label": props.label,
|
|
24
24
|
className: "text-muted-foreground hover:bg-hover hover:text-foreground flex size-7 shrink-0 items-center justify-center rounded-md transition-colors",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarBackHeader.js","names":[
|
|
1
|
+
{"version":3,"file":"SidebarBackHeader.js","names":[],"sources":["../../src/shell/SidebarBackHeader.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Link } from \"alepha/react/router\";\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\n\nexport interface SidebarBackHeaderProps {\n /**\n * Where the arrow leads: the application's home, out of a root shell such\n * as `/admin` that is not drawn inside the application's own\n * chrome. Absent, there is no arrow, for an application with nowhere to\n * go back to.\n */\n href?: string;\n /**\n * Names the arrow for assistive technology, since it shows only an icon.\n */\n label: string;\n /**\n * What the header says beside the arrow: an icon and a title, or a whole\n * identity block. Hidden when the sidebar folds to its icon rail, where\n * the arrow alone stays.\n */\n children: ReactNode;\n}\n\n/**\n * A root shell's sidebar header with a way out: a back arrow to the\n * application's home, then what the area is.\n *\n * A root shell such as `/admin` owns the viewport, so the application's\n * sidebar and its links are gone while it is open, and the only other way\n * back is an item inside the account menu. The arrow is a real `Link`, so home can also\n * be opened in a new tab.\n *\n * Collapsed to the icon rail, the words go and the arrow stays: it is the\n * one part of the header a reader still needs there.\n */\nexport const SidebarBackHeader = (props: SidebarBackHeaderProps) => {\n return (\n <div className=\"flex min-w-0 items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0\">\n {props.href && (\n <Link\n href={props.href}\n aria-label={props.label}\n className=\"text-muted-foreground hover:bg-hover hover:text-foreground flex size-7 shrink-0 items-center justify-center rounded-md transition-colors\"\n >\n <ArrowLeft className=\"size-4 rtl:-scale-x-100\" />\n </Link>\n )}\n <div className=\"flex min-w-0 items-center gap-2 group-data-[collapsible=icon]:hidden\">\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,MAAa,qBAAqB,UAAkC;CAClE,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MAAM,QACL,oBAAC,MAAD;GACE,MAAM,MAAM;GACZ,cAAY,MAAM;GAClB,WAAU;GAEV,UAAA,oBAAC,WAAD,EAAW,WAAU,0BAA2B,CAAA;EAC5C,CAAA,GAER,oBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,MAAM;EACJ,CAAA,CACF;;AAET"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useSidebar } from "../core/Sidebar.js";
|
|
2
1
|
import "react";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSidebar } from "../core/Sidebar.js";
|
|
4
4
|
// src/shell/SidebarNavAutoClose.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Closes the mobile nav sheet when a link inside it is followed.
|
package/dist/shell/Spotlight.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { useI18n } from "alepha/react/i18n";
|
|
2
|
+
import { useRouter } from "alepha/react/router";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
1
4
|
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command/Command.js";
|
|
2
5
|
import { spotlightSearchText } from "./spotlightSearchText.js";
|
|
3
6
|
import { useNavEntries } from "./useNavEntries.js";
|
|
4
|
-
import { useI18n } from "alepha/react/i18n";
|
|
5
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { useRouter } from "alepha/react/router";
|
|
8
8
|
// src/shell/Spotlight.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Command palette over the navigation tree. Opens on ⌘K / Ctrl+K (or via
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
2
1
|
import { z } from "alepha";
|
|
3
2
|
import { useQueryParams } from "alepha/react/router";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
4
|
// src/shell/useDetailTab.tsx
|
|
5
5
|
/**
|
|
6
6
|
* `.tsx` despite holding no JSX, like `useConfirmedAction.tsx`: both were named
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { navCrumbsAtom } from "./navCrumbsAtom.js";
|
|
2
|
-
import { navLabel } from "./navTreeUtil.js";
|
|
3
1
|
import { useStore } from "alepha/react";
|
|
4
2
|
import { useI18n } from "alepha/react/i18n";
|
|
5
|
-
import { useMemo } from "react";
|
|
6
3
|
import { useRouterState } from "alepha/react/router";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { navCrumbsAtom } from "./navCrumbsAtom.js";
|
|
6
|
+
import { navLabel } from "./navTreeUtil.js";
|
|
7
7
|
// src/shell/useNavBreadcrumbs.ts
|
|
8
8
|
/**
|
|
9
9
|
* Derive the breadcrumb trail from the active route layers. Each rendered
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { navCrumbsAtom } from "./navCrumbsAtom.js";
|
|
2
1
|
import { useStore } from "alepha/react";
|
|
3
2
|
import { useEffect } from "react";
|
|
3
|
+
import { navCrumbsAtom } from "./navCrumbsAtom.js";
|
|
4
4
|
// src/shell/useNavCrumbs.ts
|
|
5
5
|
/**
|
|
6
6
|
* Replace a detail page's breadcrumb with crumbs of its own.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAuth } from "alepha/react/auth";
|
|
2
2
|
import { useI18n } from "alepha/react/i18n";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
3
|
import { useRouter, useRouterState } from "alepha/react/router";
|
|
5
|
-
import {
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { hasNavPermission, isActivePath, isDescendantOf, keepDeepestActive, navGroupLabel, navLabel } from "./navTreeUtil.js";
|
|
6
6
|
// src/shell/useNavEntries.ts
|
|
7
7
|
/**
|
|
8
8
|
* Flat, filtered, sorted list of nav entries for the subtree under `root`.
|
package/dist/shell/useNavTree.js
CHANGED
package/dist/sortable/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useId, useState } from "react";
|
|
2
1
|
import { PointerSensor, TouchSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
2
|
+
import { useId, useState } from "react";
|
|
3
3
|
// src/sortable/useSortableList.ts
|
|
4
4
|
/**
|
|
5
5
|
* A vertical list reordered by dragging or from the keyboard, on `@dnd-kit`
|
package/dist/styles.css
CHANGED
|
@@ -1036,3 +1036,46 @@ html[data-sidebar="collapsed"]
|
|
|
1036
1036
|
:is([data-slot="sidebar-gap"], [data-slot="sidebar-container"]) {
|
|
1037
1037
|
width: calc(var(--sidebar-width-icon) + 1rem + 2px);
|
|
1038
1038
|
}
|
|
1039
|
+
|
|
1040
|
+
/* ────────────────────────────────────────────────────────────────────────
|
|
1041
|
+
* TreeView rows.
|
|
1042
|
+
*
|
|
1043
|
+
* Here rather than as utilities on each row: a tree prerendered with a few
|
|
1044
|
+
* hundred rows repeated the same 700 characters of classes on every one of
|
|
1045
|
+
* them, on every page. The row keeps only what varies (dragging, the drop
|
|
1046
|
+
* block, the press) as classes, and the state the attributes already say
|
|
1047
|
+
* (`data-selected`, `aria-level`) is styled from them.
|
|
1048
|
+
*
|
|
1049
|
+
* In `@layer components` so any utility a consumer adds still wins. Selected
|
|
1050
|
+
* comes before hover, so a hovered selected row takes the hover tint, as it
|
|
1051
|
+
* did with the utilities.
|
|
1052
|
+
* ──────────────────────────────────────────────────────────────────────── */
|
|
1053
|
+
@layer components {
|
|
1054
|
+
[data-slot="tree-view-row"] {
|
|
1055
|
+
/* `group/tree-row` is NAMED in the markup, not here: Tailwind reads a
|
|
1056
|
+
group's name from the class attribute. */
|
|
1057
|
+
@apply relative flex cursor-default items-center gap-1 py-1 pe-2 text-sm outline-none select-none;
|
|
1058
|
+
/* Named properties, never a blanket transition: the row is a drag source
|
|
1059
|
+
that animates `opacity` and carries the drop markers. */
|
|
1060
|
+
@apply transition-[background-color,transform] duration-150;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
[data-slot="tree-view-row"][data-selected] {
|
|
1064
|
+
@apply bg-hover font-medium;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
[data-slot="tree-view-row"]:hover {
|
|
1068
|
+
@apply bg-hover-weak;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
[data-slot="tree-view-row"]:focus-visible {
|
|
1072
|
+
@apply bg-muted/60;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/* Indent guides: one hairline per ancestor level, a repeating gradient
|
|
1076
|
+
clipped to the indent area by the row's inline `background-size`. */
|
|
1077
|
+
[data-slot="tree-view-row"]:not([aria-level="1"]) {
|
|
1078
|
+
@apply [background-image:repeating-linear-gradient(to_right,var(--border)_0_1px,transparent_1px_var(--tree-guide-step))] [background-position:var(--tree-guide-origin)_0];
|
|
1079
|
+
@apply rtl:[background-image:repeating-linear-gradient(to_left,var(--border)_0_1px,transparent_1px_var(--tree-guide-step))] rtl:[background-position:right_var(--tree-guide-origin)_top_0];
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Badge } from "../core/Badge.js";
|
|
2
1
|
import { useI18n } from "alepha/react/i18n";
|
|
3
2
|
import { Lock, LockOpen, ShieldCheck, ShieldX } from "lucide-react";
|
|
3
|
+
import { Badge } from "../core/Badge.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
// src/swagger/SwaggerAccessBadge.tsx
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Badge } from "../core/Badge.js";
|
|
2
1
|
import { useI18n } from "alepha/react/i18n";
|
|
3
2
|
import { Clock, KeyRound, Layers, ShieldCheck, TriangleAlert } from "lucide-react";
|
|
3
|
+
import { Badge } from "../core/Badge.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
// src/swagger/SwaggerAlephaMeta.tsx
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Control } from "../form/Control.js";
|
|
2
|
-
import { useI18n } from "alepha/react/i18n";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
1
|
import { z } from "alepha";
|
|
5
2
|
import { useForm } from "alepha/react/form";
|
|
3
|
+
import { useI18n } from "alepha/react/i18n";
|
|
4
|
+
import { Control } from "../form/Control.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
// src/swagger/SwaggerCredentials.tsx
|
|
7
7
|
const credentialFieldSchema = z.object({ token: z.string().optional() });
|
|
8
8
|
/**
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { AlephaError } from "alepha";
|
|
2
|
+
import { useQuery } from "alepha/react";
|
|
3
|
+
import { useI18n } from "alepha/react/i18n";
|
|
4
|
+
import { ChevronRight, FileJson, KeyRound } from "lucide-react";
|
|
5
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
1
6
|
import { Alert, AlertDescription, AlertTitle } from "../core/Alert.js";
|
|
2
7
|
import { Badge } from "../core/Badge.js";
|
|
3
8
|
import { Skeleton } from "../core/Skeleton.js";
|
|
@@ -8,12 +13,7 @@ import { SwaggerNav } from "./SwaggerNav.js";
|
|
|
8
13
|
import { SwaggerOperationView } from "./SwaggerOperationView.js";
|
|
9
14
|
import { SwaggerTryIt } from "./SwaggerTryIt.js";
|
|
10
15
|
import { useSwaggerAccess } from "./useSwaggerAccess.js";
|
|
11
|
-
import { useQuery } from "alepha/react";
|
|
12
|
-
import { useI18n } from "alepha/react/i18n";
|
|
13
|
-
import { ChevronRight, FileJson, KeyRound } from "lucide-react";
|
|
14
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
15
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
import { AlephaError } from "alepha";
|
|
17
17
|
// src/swagger/SwaggerExplorer.tsx
|
|
18
18
|
/**
|
|
19
19
|
* The API explorer: the operations of an OpenAPI document by tag on the
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useI18n } from "alepha/react/i18n";
|
|
2
|
+
import { Lock, Search } from "lucide-react";
|
|
1
3
|
import { InputGroup, InputGroupAddon, InputGroupInput } from "../core/InputGroup.js";
|
|
2
4
|
import { cn } from "../core/utils.js";
|
|
3
5
|
import { SwaggerMethodBadge } from "./SwaggerMethodBadge.js";
|
|
4
|
-
import { useI18n } from "alepha/react/i18n";
|
|
5
|
-
import { Lock, Search } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
// src/swagger/SwaggerNav.tsx
|
|
8
8
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { useI18n } from "alepha/react/i18n";
|
|
2
|
+
import { Lock } from "lucide-react";
|
|
1
3
|
import { Badge } from "../core/Badge.js";
|
|
2
4
|
import { SwaggerAlephaMeta } from "./SwaggerAlephaMeta.js";
|
|
3
5
|
import { SwaggerMethodBadge } from "./SwaggerMethodBadge.js";
|
|
@@ -5,8 +7,6 @@ import { SwaggerParameters } from "./SwaggerParameters.js";
|
|
|
5
7
|
import { SwaggerResponses } from "./SwaggerResponses.js";
|
|
6
8
|
import { SwaggerSchemaView } from "./SwaggerSchemaView.js";
|
|
7
9
|
import { SwaggerSection } from "./SwaggerSection.js";
|
|
8
|
-
import { useI18n } from "alepha/react/i18n";
|
|
9
|
-
import { Lock } from "lucide-react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
// src/swagger/SwaggerOperationView.tsx
|
|
12
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Badge } from "../core/Badge.js";
|
|
2
|
-
import { Spinner } from "../core/Spinner.js";
|
|
3
1
|
import { useI18n } from "alepha/react/i18n";
|
|
4
2
|
import { ChevronRight } from "lucide-react";
|
|
3
|
+
import { Badge } from "../core/Badge.js";
|
|
4
|
+
import { Spinner } from "../core/Spinner.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
// src/swagger/SwaggerResponseView.tsx
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ChevronRight } from "lucide-react";
|
|
1
2
|
import { Badge } from "../core/Badge.js";
|
|
2
3
|
import { SwaggerSchemaView } from "./SwaggerSchemaView.js";
|
|
3
|
-
import { ChevronRight } from "lucide-react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
// src/swagger/SwaggerResponses.tsx
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useI18n } from "alepha/react/i18n";
|
|
1
2
|
import { cn } from "../core/utils.js";
|
|
2
3
|
import { SwaggerSchemaViewField } from "./SwaggerSchemaViewField.js";
|
|
3
|
-
import { useI18n } from "alepha/react/i18n";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
// src/swagger/SwaggerSchemaView.tsx
|
|
6
6
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useI18n } from "alepha/react/i18n";
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
1
3
|
import { Segmented } from "../core/Segmented.js";
|
|
2
4
|
import { SwaggerRequestBuilder } from "./SwaggerRequestBuilder.js";
|
|
3
5
|
import { SwaggerResponseView } from "./SwaggerResponseView.js";
|
|
4
6
|
import { SwaggerTryItForm } from "./SwaggerTryItForm.js";
|
|
5
|
-
import { useI18n } from "alepha/react/i18n";
|
|
6
|
-
import { useMemo, useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
// src/swagger/SwaggerTryIt.tsx
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DateTimeProvider } from "alepha/datetime";
|
|
2
2
|
import { useInject } from "alepha/react";
|
|
3
|
+
import { useForm } from "alepha/react/form";
|
|
3
4
|
import { useI18n } from "alepha/react/i18n";
|
|
4
5
|
import { useEffect, useRef } from "react";
|
|
6
|
+
import { AutoForm } from "../form/AutoForm.js";
|
|
5
7
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { useForm } from "alepha/react/form";
|
|
7
|
-
import { DateTimeProvider } from "alepha/datetime";
|
|
8
8
|
// src/swagger/SwaggerTryItForm.tsx
|
|
9
9
|
/**
|
|
10
10
|
* The request form of one operation in one body mode, and the send.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAlepha, useStore } from "alepha/react";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { LinkProvider } from "alepha/server/links";
|
|
4
2
|
import { currentUserAtom } from "alepha/security";
|
|
3
|
+
import { LinkProvider } from "alepha/server/links";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
5
|
// src/swagger/useSwaggerAccess.ts
|
|
6
6
|
/**
|
|
7
7
|
* Answers {@link SwaggerAccess} for each operation, against the current user.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/table/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/table/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAyBlE,OAAO,KAAK,EAEV,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EAKhB,MAAM,qBAAqB,CAAC;AAc7B,MAAM,MAAM,cAAc,CACxB,CAAC,EACD,CAAC,SAAS,qBAAqB,GAAG,uBAAuB,IACvD,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,GACpB,CAAC,EACD,KAAK,CAAC,CAAC,SAAS,qBAAqB,GAAG,uBAAuB,SAExD,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,sBA65B5B,CAAC"}
|