@plumile/ui 0.1.132 → 0.1.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -15
- package/lib/esm/admin/organisms/admin_sidebar/AdminSidebar.js +4 -4
- package/lib/esm/admin/organisms/admin_sidebar/adminSidebar.css.js +2 -0
- package/lib/esm/admin/templates/admin_shell_layout/AdminShellLayout.js +2 -2
- package/lib/esm/admin/templates/admin_shell_layout/AdminShellLayout.js.map +1 -1
- package/lib/esm/admin/theme/adminSurface.css.js +0 -2
- package/lib/esm/atomic/atoms/badge/Badge.js.map +1 -1
- package/lib/esm/atomic/atoms/error_message/ErrorMessage.js +9 -8
- package/lib/esm/atomic/atoms/error_message/ErrorMessage.js.map +1 -1
- package/lib/esm/atomic/molecules/card/Card.js +17 -19
- package/lib/esm/atomic/molecules/card/Card.js.map +1 -1
- package/lib/esm/atomic/molecules/empty-state/EmptyState.css.js +80 -2
- package/lib/esm/atomic/molecules/empty-state/EmptyState.css.js.map +1 -1
- package/lib/esm/atomic/molecules/empty-state/EmptyState.js +50 -28
- package/lib/esm/atomic/molecules/empty-state/EmptyState.js.map +1 -1
- package/lib/esm/atomic/molecules/form_error/FormError.js +29 -19
- package/lib/esm/atomic/molecules/form_error/FormError.js.map +1 -1
- package/lib/esm/atomic/molecules/form_error/formError.css.js +1 -1
- package/lib/esm/atomic/molecules/form_error/formError.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownFootnoteReference.css.js +1 -0
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTable.css.js +0 -1
- package/lib/esm/atomic/molecules/tabs/Tabs.js +82 -28
- package/lib/esm/atomic/molecules/tabs/Tabs.js.map +1 -1
- package/lib/esm/atomic/molecules/tabs/tabs.css.js +50 -8
- package/lib/esm/atomic/molecules/tabs/tabs.css.js.map +1 -1
- package/lib/esm/atomic/organisms/sidebar/NavigationSidebar.js +48 -48
- package/lib/esm/atomic/organisms/sidebar/NavigationSidebar.js.map +1 -1
- package/lib/esm/backoffice/atoms/status_badge/StatusBadge.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_audit_metadata_panel/BackofficeAuditMetadataPanel.js +38 -0
- package/lib/esm/backoffice/molecules/backoffice_audit_metadata_panel/BackofficeAuditMetadataPanel.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_field/BackofficeDetailField.js +35 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_field/BackofficeDetailField.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_field/backofficeDetailField.css.js +16 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_field/backofficeDetailField.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_flag_tag/BackofficeDetailFlagTag.js +25 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_flag_tag/BackofficeDetailFlagTag.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_flag_tag/backofficeDetailFlagTag.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_flag_tag/backofficeDetailFlagTag.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js +37 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_section/backofficeDetailSection.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_section/backofficeDetailSection.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_tagged_value/BackofficeDetailTaggedValue.js +19 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_tagged_value/BackofficeDetailTaggedValue.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_tagged_value/backofficeDetailTaggedValue.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_detail_tagged_value/backofficeDetailTaggedValue.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js +15 -32
- package/lib/esm/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_enum_label/BackofficeEnumLabel.js +11 -0
- package/lib/esm/backoffice/molecules/backoffice_enum_label/BackofficeEnumLabel.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_form_section/BackofficeFormSection.js +17 -18
- package/lib/esm/backoffice/molecules/backoffice_form_section/BackofficeFormSection.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.helpers.js +12 -0
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.helpers.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.js +15 -20
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js +23 -16
- package/lib/esm/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_key_value_list/backofficeKeyValueList.css.js +2 -2
- package/lib/esm/backoffice/molecules/backoffice_key_value_list/backofficeKeyValueList.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.helpers.js +11 -0
- package/lib/esm/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.helpers.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js +55 -0
- package/lib/esm/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_list_footer/backofficeListFooter.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_list_footer/backofficeListFooter.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.helpers.js +15 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.helpers.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js +63 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/backofficePayloadViewer.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_payload_viewer/backofficePayloadViewer.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_picker/BackofficePicker.js +76 -0
- package/lib/esm/backoffice/molecules/backoffice_picker/BackofficePicker.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_picker/backofficePicker.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_picker/backofficePicker.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_reference_value/BackofficeReferenceValue.js +23 -0
- package/lib/esm/backoffice/molecules/backoffice_reference_value/BackofficeReferenceValue.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_reference_value/backofficeReferenceValue.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_reference_value/backofficeReferenceValue.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js +18 -0
- package/lib/esm/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_status_group/BackofficeStatusGroup.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_status_group/BackofficeStatusGroup.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_status_meta_badge/BackofficeStatusMetaBadge.js +28 -0
- package/lib/esm/backoffice/molecules/backoffice_status_meta_badge/BackofficeStatusMetaBadge.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_status_meta_badge/backofficeStatusMetaBadge.css.js +8 -0
- package/lib/esm/backoffice/molecules/backoffice_status_meta_badge/backofficeStatusMetaBadge.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js +60 -0
- package/lib/esm/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.js.map +1 -0
- package/lib/esm/backoffice/molecules/backoffice_toolbar/backofficeToolbar.css.js +14 -0
- package/lib/esm/backoffice/molecules/backoffice_toolbar/backofficeToolbar.css.js.map +1 -0
- package/lib/esm/backoffice/molecules/bulk_actions_bar/bulkActionsBar.css.js +1 -1
- package/lib/esm/backoffice/molecules/bulk_actions_bar/bulkActionsBar.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/confirm_dialog/ConfirmDialog.js +3 -3
- package/lib/esm/backoffice/molecules/confirm_dialog/ConfirmDialog.js.map +1 -1
- package/lib/esm/backoffice/molecules/global_search_input/GlobalSearchInput.js +4 -4
- package/lib/esm/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.js +1 -1
- package/lib/esm/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_nav_item/SidebarNavItem.js +68 -68
- package/lib/esm/backoffice/molecules/sidebar_nav_item/SidebarNavItem.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.js +2 -2
- package/lib/esm/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_nav_section/SidebarNavSection.js +96 -96
- package/lib/esm/backoffice/molecules/sidebar_nav_section/SidebarNavSection.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_nav_section/sidebarNavSection.css.js +2 -2
- package/lib/esm/backoffice/molecules/sidebar_nav_section/sidebarNavSection.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.js +52 -52
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/sidebarProfileMenu.css.js +6 -6
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/sidebarProfileMenu.css.js.map +1 -1
- package/lib/esm/backoffice/organisms/audit_timeline/AuditTimeline.js +69 -34
- package/lib/esm/backoffice/organisms/audit_timeline/AuditTimeline.js.map +1 -1
- package/lib/esm/backoffice/organisms/audit_timeline/auditTimeline.css.js +22 -2
- package/lib/esm/backoffice/organisms/audit_timeline/auditTimeline.css.js.map +1 -1
- package/lib/esm/backoffice/organisms/backoffice_data_table/BackofficeDataTable.js +4 -4
- package/lib/esm/backoffice/organisms/backoffice_data_table/BackofficeDataTable.js.map +1 -1
- package/lib/esm/backoffice/templates/detail_page_template/DetailPageTemplate.js +70 -40
- package/lib/esm/backoffice/templates/detail_page_template/DetailPageTemplate.js.map +1 -1
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js +66 -3
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js.map +1 -1
- package/lib/esm/components/dashboard/activity_card/ActivityCard.js +4 -4
- package/lib/esm/components/dashboard/dashboard_metric_group/DashboardMetricGroup.css.js +9 -0
- package/lib/esm/components/dashboard/dashboard_metric_group/DashboardMetricGroup.css.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_metric_group/DashboardMetricGroup.js +30 -0
- package/lib/esm/components/dashboard/dashboard_metric_group/DashboardMetricGroup.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_panel/DashboardPanel.css.js +8 -0
- package/lib/esm/components/dashboard/dashboard_panel/DashboardPanel.css.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_panel/DashboardPanel.js +16 -0
- package/lib/esm/components/dashboard/dashboard_panel/DashboardPanel.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_quick_actions/DashboardQuickActions.css.js +8 -0
- package/lib/esm/components/dashboard/dashboard_quick_actions/DashboardQuickActions.css.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_quick_actions/DashboardQuickActions.js +27 -0
- package/lib/esm/components/dashboard/dashboard_quick_actions/DashboardQuickActions.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_status_list/DashboardStatusList.css.js +8 -0
- package/lib/esm/components/dashboard/dashboard_status_list/DashboardStatusList.css.js.map +1 -0
- package/lib/esm/components/dashboard/dashboard_status_list/DashboardStatusList.js +28 -0
- package/lib/esm/components/dashboard/dashboard_status_list/DashboardStatusList.js.map +1 -0
- package/lib/esm/components/dashboard/metric_card/MetricCard.css.js +30 -2
- package/lib/esm/components/dashboard/metric_card/MetricCard.css.js.map +1 -1
- package/lib/esm/components/dashboard/metric_card/MetricCard.js +40 -26
- package/lib/esm/components/dashboard/metric_card/MetricCard.js.map +1 -1
- package/lib/esm/components/dashboard/metric_tile_group/MetricTileGroup.css.js +23 -2
- package/lib/esm/components/dashboard/metric_tile_group/MetricTileGroup.css.js.map +1 -1
- package/lib/esm/components/dashboard/metric_tile_group/MetricTileGroup.js +16 -4
- package/lib/esm/components/dashboard/metric_tile_group/MetricTileGroup.js.map +1 -1
- package/lib/esm/components/dashboard/status_summary_panel/StatusSummaryPanel.js +4 -4
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.css.js +14 -2
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.css.js.map +1 -1
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.js +46 -25
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.js.map +1 -1
- package/lib/esm/components/data-table/DataTable.css.js +19 -19
- package/lib/esm/components/data-table/DataTable.css.js.map +1 -1
- package/lib/esm/components/data-table/DataTable.js +142 -76
- package/lib/esm/components/data-table/DataTable.js.map +1 -1
- package/lib/esm/components/data-table/ResponsiveRecordList.js.map +1 -1
- package/lib/esm/components/data-table/VirtualizedConnectionTable.css.js +2 -2
- package/lib/esm/components/data-table/VirtualizedConnectionTable.css.js.map +1 -1
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js +177 -170
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js.map +1 -1
- package/lib/esm/components/feedback/InlineBanner.js +49 -0
- package/lib/esm/components/feedback/InlineBanner.js.map +1 -0
- package/lib/esm/components/feedback/OperationFeedback.css.js +2 -2
- package/lib/esm/components/feedback/OperationFeedback.css.js.map +1 -1
- package/lib/esm/components/feedback/OperationFeedback.js +20 -24
- package/lib/esm/components/feedback/OperationFeedback.js.map +1 -1
- package/lib/esm/components/feedback/inlineBanner.css.js +19 -0
- package/lib/esm/components/feedback/inlineBanner.css.js.map +1 -0
- package/lib/esm/components/infinite/InfiniteScrollTrigger.js +31 -23
- package/lib/esm/components/infinite/InfiniteScrollTrigger.js.map +1 -1
- package/lib/esm/components/layout/ActionPanel.css.js +2 -2
- package/lib/esm/components/layout/ActionPanel.css.js.map +1 -1
- package/lib/esm/components/layout/ActionPanel.js +29 -35
- package/lib/esm/components/layout/ActionPanel.js.map +1 -1
- package/lib/esm/components/layout/PageShell.css.js +2 -20
- package/lib/esm/components/layout/PageShell.css.js.map +1 -1
- package/lib/esm/components/layout/PageShell.js +155 -279
- package/lib/esm/components/layout/PageShell.js.map +1 -1
- package/lib/esm/components/layout/ResizableSplitView.css.js +8 -0
- package/lib/esm/components/layout/ResizableSplitView.css.js.map +1 -0
- package/lib/esm/components/layout/ResizableSplitView.js +176 -0
- package/lib/esm/components/layout/ResizableSplitView.js.map +1 -0
- package/lib/esm/components/layout/Surface.css.js +41 -0
- package/lib/esm/components/layout/Surface.css.js.map +1 -0
- package/lib/esm/components/layout/Surface.js +61 -0
- package/lib/esm/components/layout/Surface.js.map +1 -0
- package/lib/esm/components/layout/toolbar/Toolbar.css.js +64 -0
- package/lib/esm/components/layout/toolbar/Toolbar.css.js.map +1 -0
- package/lib/esm/components/layout/toolbar/Toolbar.js +36 -0
- package/lib/esm/components/layout/toolbar/Toolbar.js.map +1 -0
- package/lib/esm/components/navigation/sidebar/SidebarNavigation.js +89 -0
- package/lib/esm/components/navigation/sidebar/SidebarNavigation.js.map +1 -0
- package/lib/esm/components/navigation/sidebar/SidebarNavigationItem.js +2 -0
- package/lib/esm/components/navigation/sidebar/SidebarNavigationSection.js +2 -0
- package/lib/esm/components/navigation/sidebar/SidebarProfileMenu.js +2 -0
- package/lib/esm/components/navigation/sidebar/sidebarNavigation.css.js +48 -0
- package/lib/esm/components/navigation/sidebar/sidebarNavigation.css.js.map +1 -0
- package/lib/esm/components/subscriptions/RefetchNeededBanner.js +16 -23
- package/lib/esm/components/subscriptions/RefetchNeededBanner.js.map +1 -1
- package/lib/esm/i18n/locales/en/ui.js +16 -5
- package/lib/esm/i18n/locales/en/ui.js.map +1 -1
- package/lib/esm/i18n/locales/fr/ui.js +16 -5
- package/lib/esm/i18n/locales/fr/ui.js.map +1 -1
- package/lib/esm/index.js +237 -233
- package/lib/esm/internal/data-table/virtualization.js +1 -1
- package/lib/esm/internal/data-table/virtualization.js.map +1 -1
- package/lib/esm/internal/infinite/infiniteLoad.js +23 -0
- package/lib/esm/internal/infinite/infiniteLoad.js.map +1 -0
- package/lib/esm/node_modules/dompurify/dist/purify.es.js +290 -246
- package/lib/esm/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/lib/esm/node_modules/katex/dist/katex.js +1561 -1599
- package/lib/esm/node_modules/katex/dist/katex.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/esm/theme/backofficeTheme.css.js +100 -0
- package/lib/esm/theme/backofficeTheme.css.js.map +1 -1
- package/lib/esm/theme/publicTheme.css.js +100 -0
- package/lib/esm/theme/publicTheme.css.js.map +1 -1
- package/lib/esm/theme/theme.css.js +200 -0
- package/lib/esm/theme/themeContract.css.js +359 -309
- package/lib/esm/theme/themeContract.css.js.map +1 -1
- package/lib/types/admin/templates/admin_shell_layout/AdminShellLayout.d.ts +4 -4
- package/lib/types/admin/templates/admin_shell_layout/AdminShellLayout.d.ts.map +1 -1
- package/lib/types/atomic/atoms/badge/Badge.d.ts +3 -3
- package/lib/types/atomic/atoms/badge/Badge.d.ts.map +1 -1
- package/lib/types/atomic/atoms/error_message/ErrorMessage.d.ts +1 -1
- package/lib/types/atomic/atoms/error_message/ErrorMessage.d.ts.map +1 -1
- package/lib/types/atomic/molecules/card/Card.d.ts.map +1 -1
- package/lib/types/atomic/molecules/empty-state/EmptyState.css.d.ts +56 -5
- package/lib/types/atomic/molecules/empty-state/EmptyState.css.d.ts.map +1 -1
- package/lib/types/atomic/molecules/empty-state/EmptyState.d.ts +14 -4
- package/lib/types/atomic/molecules/empty-state/EmptyState.d.ts.map +1 -1
- package/lib/types/atomic/molecules/form_error/FormError.d.ts +5 -2
- package/lib/types/atomic/molecules/form_error/FormError.d.ts.map +1 -1
- package/lib/types/atomic/molecules/form_error/formError.css.d.ts.map +1 -1
- package/lib/types/atomic/molecules/tabs/Tabs.d.ts +16 -7
- package/lib/types/atomic/molecules/tabs/Tabs.d.ts.map +1 -1
- package/lib/types/atomic/molecules/tabs/tabs.css.d.ts +21 -2
- package/lib/types/atomic/molecules/tabs/tabs.css.d.ts.map +1 -1
- package/lib/types/backoffice/atoms/status_badge/StatusBadge.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_audit_metadata_panel/BackofficeAuditMetadataPanel.d.ts +21 -0
- package/lib/types/backoffice/molecules/backoffice_audit_metadata_panel/BackofficeAuditMetadataPanel.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_field/BackofficeDetailField.d.ts +17 -0
- package/lib/types/backoffice/molecules/backoffice_detail_field/BackofficeDetailField.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_field/backofficeDetailField.css.d.ts +14 -0
- package/lib/types/backoffice/molecules/backoffice_detail_field/backofficeDetailField.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_flag_tag/BackofficeDetailFlagTag.d.ts +11 -0
- package/lib/types/backoffice/molecules/backoffice_detail_flag_tag/BackofficeDetailFlagTag.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_flag_tag/backofficeDetailFlagTag.css.d.ts +4 -0
- package/lib/types/backoffice/molecules/backoffice_detail_flag_tag/backofficeDetailFlagTag.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.d.ts +12 -0
- package/lib/types/backoffice/molecules/backoffice_detail_section/BackofficeDetailSection.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_section/backofficeDetailSection.css.d.ts +6 -0
- package/lib/types/backoffice/molecules/backoffice_detail_section/backofficeDetailSection.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_tagged_value/BackofficeDetailTaggedValue.d.ts +13 -0
- package/lib/types/backoffice/molecules/backoffice_detail_tagged_value/BackofficeDetailTaggedValue.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_detail_tagged_value/backofficeDetailTaggedValue.css.d.ts +3 -0
- package/lib/types/backoffice/molecules/backoffice_detail_tagged_value/backofficeDetailTaggedValue.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_enum_label/BackofficeEnumLabel.d.ts +9 -0
- package/lib/types/backoffice/molecules/backoffice_enum_label/BackofficeEnumLabel.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_form_section/BackofficeFormSection.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.d.ts +0 -3
- package/lib/types/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.helpers.d.ts +5 -0
- package/lib/types/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.helpers.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.d.ts +8 -2
- package/lib/types/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_key_value_list/backofficeKeyValueList.css.d.ts +3 -0
- package/lib/types/backoffice/molecules/backoffice_key_value_list/backofficeKeyValueList.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.d.ts +23 -0
- package/lib/types/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.helpers.d.ts +25 -0
- package/lib/types/backoffice/molecules/backoffice_list_footer/BackofficeListFooter.helpers.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/{backoffice_infinite_list_status/backofficeInfiniteListStatus.css.d.ts → backoffice_list_footer/backofficeListFooter.css.d.ts} +3 -2
- package/lib/types/backoffice/molecules/backoffice_list_footer/backofficeListFooter.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.d.ts +26 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.helpers.d.ts +7 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/BackofficePayloadViewer.helpers.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/backofficePayloadViewer.css.d.ts +6 -0
- package/lib/types/backoffice/molecules/backoffice_payload_viewer/backofficePayloadViewer.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_picker/BackofficePicker.d.ts +35 -0
- package/lib/types/backoffice/molecules/backoffice_picker/BackofficePicker.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_picker/backofficePicker.css.d.ts +9 -0
- package/lib/types/backoffice/molecules/backoffice_picker/backofficePicker.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_reference_value/BackofficeReferenceValue.d.ts +10 -0
- package/lib/types/backoffice/molecules/backoffice_reference_value/BackofficeReferenceValue.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_reference_value/backofficeReferenceValue.css.d.ts +3 -0
- package/lib/types/backoffice/molecules/backoffice_reference_value/backofficeReferenceValue.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.d.ts +15 -0
- package/lib/types/backoffice/molecules/backoffice_scope_stack/BackofficeScopeStack.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_status_group/BackofficeStatusGroup.d.ts +8 -0
- package/lib/types/backoffice/molecules/backoffice_status_group/BackofficeStatusGroup.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_status_meta_badge/BackofficeStatusMetaBadge.d.ts +14 -0
- package/lib/types/backoffice/molecules/backoffice_status_meta_badge/BackofficeStatusMetaBadge.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_status_meta_badge/backofficeStatusMetaBadge.css.d.ts +2 -0
- package/lib/types/backoffice/molecules/backoffice_status_meta_badge/backofficeStatusMetaBadge.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.d.ts +22 -0
- package/lib/types/backoffice/molecules/backoffice_toolbar/BackofficeToolbar.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/backoffice_toolbar/backofficeToolbar.css.d.ts +18 -0
- package/lib/types/backoffice/molecules/backoffice_toolbar/backofficeToolbar.css.d.ts.map +1 -0
- package/lib/types/backoffice/molecules/bulk_actions_bar/bulkActionsBar.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_nav_item/SidebarNavItem.d.ts +2 -1
- package/lib/types/backoffice/molecules/sidebar_nav_item/SidebarNavItem.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.d.ts +1 -0
- package/lib/types/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_nav_section/SidebarNavSection.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_nav_section/sidebarNavSection.css.d.ts +2 -0
- package/lib/types/backoffice/molecules/sidebar_nav_section/sidebarNavSection.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/sidebar_profile_menu/sidebarProfileMenu.css.d.ts +8 -0
- package/lib/types/backoffice/molecules/sidebar_profile_menu/sidebarProfileMenu.css.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/audit_timeline/AuditTimeline.d.ts +20 -2
- package/lib/types/backoffice/organisms/audit_timeline/AuditTimeline.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/audit_timeline/auditTimeline.css.d.ts +32 -2
- package/lib/types/backoffice/organisms/audit_timeline/auditTimeline.css.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/backoffice_data_table/BackofficeDataTable.d.ts +2 -2
- package/lib/types/backoffice/organisms/backoffice_data_table/BackofficeDataTable.d.ts.map +1 -1
- package/lib/types/backoffice/templates/detail_page_template/DetailPageTemplate.d.ts +12 -1
- package/lib/types/backoffice/templates/detail_page_template/DetailPageTemplate.d.ts.map +1 -1
- package/lib/types/backoffice/templates/detail_page_template/detailPageTemplate.css.d.ts +25 -4
- package/lib/types/backoffice/templates/detail_page_template/detailPageTemplate.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/dashboard_metric_group/DashboardMetricGroup.css.d.ts +4 -0
- package/lib/types/components/dashboard/dashboard_metric_group/DashboardMetricGroup.css.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_metric_group/DashboardMetricGroup.d.ts +19 -0
- package/lib/types/components/dashboard/dashboard_metric_group/DashboardMetricGroup.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_panel/DashboardPanel.css.d.ts +2 -0
- package/lib/types/components/dashboard/dashboard_panel/DashboardPanel.css.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_panel/DashboardPanel.d.ts +11 -0
- package/lib/types/components/dashboard/dashboard_panel/DashboardPanel.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_quick_actions/DashboardQuickActions.css.d.ts +5 -0
- package/lib/types/components/dashboard/dashboard_quick_actions/DashboardQuickActions.css.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_quick_actions/DashboardQuickActions.d.ts +14 -0
- package/lib/types/components/dashboard/dashboard_quick_actions/DashboardQuickActions.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_status_list/DashboardStatusList.css.d.ts +6 -0
- package/lib/types/components/dashboard/dashboard_status_list/DashboardStatusList.css.d.ts.map +1 -0
- package/lib/types/components/dashboard/dashboard_status_list/DashboardStatusList.d.ts +14 -0
- package/lib/types/components/dashboard/dashboard_status_list/DashboardStatusList.d.ts.map +1 -0
- package/lib/types/components/dashboard/metric_card/MetricCard.css.d.ts +38 -1
- package/lib/types/components/dashboard/metric_card/MetricCard.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/metric_card/MetricCard.d.ts +7 -1
- package/lib/types/components/dashboard/metric_card/MetricCard.d.ts.map +1 -1
- package/lib/types/components/dashboard/metric_tile_group/MetricTileGroup.css.d.ts +17 -1
- package/lib/types/components/dashboard/metric_tile_group/MetricTileGroup.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/metric_tile_group/MetricTileGroup.d.ts +4 -1
- package/lib/types/components/dashboard/metric_tile_group/MetricTileGroup.d.ts.map +1 -1
- package/lib/types/components/dashboard/timeline_event_row/TimelineEventRow.css.d.ts +31 -2
- package/lib/types/components/dashboard/timeline_event_row/TimelineEventRow.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/timeline_event_row/TimelineEventRow.d.ts +8 -3
- package/lib/types/components/dashboard/timeline_event_row/TimelineEventRow.d.ts.map +1 -1
- package/lib/types/components/data-table/DataTable.css.d.ts +1 -0
- package/lib/types/components/data-table/DataTable.css.d.ts.map +1 -1
- package/lib/types/components/data-table/DataTable.d.ts +54 -3
- package/lib/types/components/data-table/DataTable.d.ts.map +1 -1
- package/lib/types/components/data-table/ResponsiveRecordList.d.ts +1 -4
- package/lib/types/components/data-table/ResponsiveRecordList.d.ts.map +1 -1
- package/lib/types/components/data-table/VirtualizedConnectionTable.css.d.ts +0 -1
- package/lib/types/components/data-table/VirtualizedConnectionTable.css.d.ts.map +1 -1
- package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts +11 -5
- package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts.map +1 -1
- package/lib/types/{backoffice/molecules/inline_banner → components/feedback}/InlineBanner.d.ts +4 -2
- package/lib/types/components/feedback/InlineBanner.d.ts.map +1 -0
- package/lib/types/components/feedback/OperationFeedback.css.d.ts +0 -1
- package/lib/types/components/feedback/OperationFeedback.css.d.ts.map +1 -1
- package/lib/types/components/feedback/OperationFeedback.d.ts.map +1 -1
- package/lib/types/components/feedback/inlineBanner.css.d.ts.map +1 -0
- package/lib/types/components/infinite/InfiniteScrollTrigger.d.ts.map +1 -1
- package/lib/types/components/layout/ActionPanel.css.d.ts +1 -0
- package/lib/types/components/layout/ActionPanel.css.d.ts.map +1 -1
- package/lib/types/components/layout/ActionPanel.d.ts.map +1 -1
- package/lib/types/components/layout/PageShell.css.d.ts +1 -14
- package/lib/types/components/layout/PageShell.css.d.ts.map +1 -1
- package/lib/types/components/layout/PageShell.d.ts +1 -3
- package/lib/types/components/layout/PageShell.d.ts.map +1 -1
- package/lib/types/components/layout/ResizableSplitView.css.d.ts +8 -0
- package/lib/types/components/layout/ResizableSplitView.css.d.ts.map +1 -0
- package/lib/types/components/layout/ResizableSplitView.d.ts +27 -0
- package/lib/types/components/layout/ResizableSplitView.d.ts.map +1 -0
- package/lib/types/components/layout/Surface.css.d.ts +31 -0
- package/lib/types/components/layout/Surface.css.d.ts.map +1 -0
- package/lib/types/components/layout/Surface.d.ts +30 -0
- package/lib/types/components/layout/Surface.d.ts.map +1 -0
- package/lib/types/components/layout/toolbar/Toolbar.css.d.ts +40 -0
- package/lib/types/components/layout/toolbar/Toolbar.css.d.ts.map +1 -0
- package/lib/types/components/layout/toolbar/Toolbar.d.ts +35 -0
- package/lib/types/components/layout/toolbar/Toolbar.d.ts.map +1 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigation.d.ts +57 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigation.d.ts.map +1 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigationItem.d.ts +2 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigationItem.d.ts.map +1 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigationSection.d.ts +2 -0
- package/lib/types/components/navigation/sidebar/SidebarNavigationSection.d.ts.map +1 -0
- package/lib/types/components/navigation/sidebar/SidebarProfileMenu.d.ts +2 -0
- package/lib/types/components/navigation/sidebar/SidebarProfileMenu.d.ts.map +1 -0
- package/lib/types/components/navigation/sidebar/sidebarNavigation.css.d.ts +19 -0
- package/lib/types/components/navigation/sidebar/sidebarNavigation.css.d.ts.map +1 -0
- package/lib/types/components/subscriptions/RefetchNeededBanner.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +32 -14
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/index.d.ts +33 -33
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/internal/data-table/virtualization.d.ts +2 -2
- package/lib/types/internal/data-table/virtualization.d.ts.map +1 -1
- package/lib/types/internal/infinite/infiniteLoad.d.ts +27 -0
- package/lib/types/internal/infinite/infiniteLoad.d.ts.map +1 -0
- package/lib/types/theme/backofficeTheme.css.d.ts +100 -0
- package/lib/types/theme/backofficeTheme.css.d.ts.map +1 -1
- package/lib/types/theme/publicTheme.css.d.ts +100 -0
- package/lib/types/theme/publicTheme.css.d.ts.map +1 -1
- package/lib/types/theme/sprinkles.css.d.ts +2 -2
- package/lib/types/theme/themeContract.css.d.ts +50 -0
- package/lib/types/theme/themeContract.css.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/i18n/locales/en/ui.json +16 -7
- package/src/i18n/locales/fr/ui.json +16 -7
- package/lib/esm/atomic/molecules/card/Card.css.js +0 -8
- package/lib/esm/atomic/molecules/card/Card.css.js.map +0 -1
- package/lib/esm/atomic/molecules/form/FormErrorBanner.css.js +0 -8
- package/lib/esm/atomic/molecules/form/FormErrorBanner.css.js.map +0 -1
- package/lib/esm/atomic/molecules/form/FormErrorBanner.js +0 -17
- package/lib/esm/atomic/molecules/form/FormErrorBanner.js.map +0 -1
- package/lib/esm/atomic/templates/detail-page/DetailPage.js +0 -49
- package/lib/esm/atomic/templates/detail-page/DetailPage.js.map +0 -1
- package/lib/esm/atomic/templates/detail-page/detailPage.css.js +0 -8
- package/lib/esm/atomic/templates/detail-page/detailPage.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js +0 -33
- package/lib/esm/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_empty_state/backofficeEmptyState.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_empty_state/backofficeEmptyState.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_filters_bar/BackofficeFiltersBar.js +0 -36
- package/lib/esm/backoffice/molecules/backoffice_filters_bar/BackofficeFiltersBar.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_filters_bar/backofficeFiltersBar.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_filters_bar/backofficeFiltersBar.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/BackofficeInfiniteListStatus.js +0 -37
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/BackofficeInfiniteListStatus.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/backofficeInfiniteListStatus.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/backofficeInfiniteListStatus.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_load_more/BackofficeLoadMore.js +0 -35
- package/lib/esm/backoffice/molecules/backoffice_load_more/BackofficeLoadMore.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js +0 -41
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js +0 -8
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_tabs/BackofficeTabs.js +0 -46
- package/lib/esm/backoffice/molecules/backoffice_tabs/BackofficeTabs.js.map +0 -1
- package/lib/esm/backoffice/molecules/backoffice_tabs/backofficeTabs.css.js +0 -17
- package/lib/esm/backoffice/molecules/backoffice_tabs/backofficeTabs.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/inline_banner/InlineBanner.js +0 -46
- package/lib/esm/backoffice/molecules/inline_banner/InlineBanner.js.map +0 -1
- package/lib/esm/backoffice/molecules/inline_banner/inlineBanner.css.js +0 -19
- package/lib/esm/backoffice/molecules/inline_banner/inlineBanner.css.js.map +0 -1
- package/lib/esm/backoffice/molecules/table_toolbar/TableToolbar.js +0 -41
- package/lib/esm/backoffice/molecules/table_toolbar/TableToolbar.js.map +0 -1
- package/lib/esm/backoffice/molecules/table_toolbar/tableToolbar.css.js +0 -8
- package/lib/esm/backoffice/molecules/table_toolbar/tableToolbar.css.js.map +0 -1
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.js +0 -26
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.js.map +0 -1
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/backofficeVirtualizedConnectionTable.css.js +0 -8
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/backofficeVirtualizedConnectionTable.css.js.map +0 -1
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/helpers.js +0 -18
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/helpers.js.map +0 -1
- package/lib/esm/components/dashboard/section_nav/SectionNav.css.js +0 -8
- package/lib/esm/components/dashboard/section_nav/SectionNav.css.js.map +0 -1
- package/lib/esm/components/dashboard/section_nav/SectionNav.js +0 -25
- package/lib/esm/components/dashboard/section_nav/SectionNav.js.map +0 -1
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.css.js +0 -8
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.css.js.map +0 -1
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.js +0 -24
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.js.map +0 -1
- package/lib/esm/components/layout/AppShell.js +0 -19
- package/lib/esm/components/layout/AppShell.js.map +0 -1
- package/lib/esm/components/layout/SidebarPageLayout.js +0 -16
- package/lib/esm/components/layout/SidebarPageLayout.js.map +0 -1
- package/lib/esm/components/layout/SplitViewLayout.css.js +0 -8
- package/lib/esm/components/layout/SplitViewLayout.css.js.map +0 -1
- package/lib/esm/components/layout/SplitViewLayout.js +0 -18
- package/lib/esm/components/layout/SplitViewLayout.js.map +0 -1
- package/lib/esm/components/layout/TabsContentLayout.css.js +0 -8
- package/lib/esm/components/layout/TabsContentLayout.css.js.map +0 -1
- package/lib/esm/components/layout/TabsContentLayout.js +0 -31
- package/lib/esm/components/layout/TabsContentLayout.js.map +0 -1
- package/lib/esm/components/layout/ToolbarRow.css.js +0 -8
- package/lib/esm/components/layout/ToolbarRow.css.js.map +0 -1
- package/lib/esm/components/layout/ToolbarRow.js +0 -12
- package/lib/esm/components/layout/ToolbarRow.js.map +0 -1
- package/lib/esm/components/subscriptions/RefetchNeededBanner.css.js +0 -8
- package/lib/esm/components/subscriptions/RefetchNeededBanner.css.js.map +0 -1
- package/lib/types/atomic/molecules/card/Card.css.d.ts +0 -5
- package/lib/types/atomic/molecules/card/Card.css.d.ts.map +0 -1
- package/lib/types/atomic/molecules/form/FormErrorBanner.css.d.ts +0 -2
- package/lib/types/atomic/molecules/form/FormErrorBanner.css.d.ts.map +0 -1
- package/lib/types/atomic/molecules/form/FormErrorBanner.d.ts +0 -7
- package/lib/types/atomic/molecules/form/FormErrorBanner.d.ts.map +0 -1
- package/lib/types/atomic/templates/detail-page/DetailPage.d.ts +0 -19
- package/lib/types/atomic/templates/detail-page/DetailPage.d.ts.map +0 -1
- package/lib/types/atomic/templates/detail-page/detailPage.css.d.ts +0 -9
- package/lib/types/atomic/templates/detail-page/detailPage.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.d.ts +0 -10
- package/lib/types/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.d.ts +0 -7
- package/lib/types/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_empty_state/backofficeEmptyState.css.d.ts +0 -6
- package/lib/types/backoffice/molecules/backoffice_empty_state/backofficeEmptyState.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_filters_bar/BackofficeFiltersBar.d.ts +0 -13
- package/lib/types/backoffice/molecules/backoffice_filters_bar/BackofficeFiltersBar.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_filters_bar/backofficeFiltersBar.css.d.ts +0 -6
- package/lib/types/backoffice/molecules/backoffice_filters_bar/backofficeFiltersBar.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.d.ts +0 -5
- package/lib/types/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_infinite_list_status/BackofficeInfiniteListStatus.d.ts +0 -16
- package/lib/types/backoffice/molecules/backoffice_infinite_list_status/BackofficeInfiniteListStatus.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_infinite_list_status/backofficeInfiniteListStatus.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_load_more/BackofficeLoadMore.d.ts +0 -13
- package/lib/types/backoffice/molecules/backoffice_load_more/BackofficeLoadMore.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.d.ts +0 -5
- package/lib/types/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.d.ts +0 -16
- package/lib/types/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.d.ts +0 -10
- package/lib/types/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_tabs/BackofficeTabs.d.ts +0 -19
- package/lib/types/backoffice/molecules/backoffice_tabs/BackofficeTabs.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/backoffice_tabs/backofficeTabs.css.d.ts +0 -15
- package/lib/types/backoffice/molecules/backoffice_tabs/backofficeTabs.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/inline_banner/InlineBanner.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/inline_banner/inlineBanner.css.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/table_toolbar/TableToolbar.d.ts +0 -13
- package/lib/types/backoffice/molecules/table_toolbar/TableToolbar.d.ts.map +0 -1
- package/lib/types/backoffice/molecules/table_toolbar/tableToolbar.css.d.ts +0 -6
- package/lib/types/backoffice/molecules/table_toolbar/tableToolbar.css.d.ts.map +0 -1
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.d.ts +0 -31
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.d.ts.map +0 -1
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/backofficeVirtualizedConnectionTable.css.d.ts +0 -5
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/backofficeVirtualizedConnectionTable.css.d.ts.map +0 -1
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/helpers.d.ts +0 -5
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/helpers.d.ts.map +0 -1
- package/lib/types/components/dashboard/section_nav/SectionNav.css.d.ts +0 -4
- package/lib/types/components/dashboard/section_nav/SectionNav.css.d.ts.map +0 -1
- package/lib/types/components/dashboard/section_nav/SectionNav.d.ts +0 -15
- package/lib/types/components/dashboard/section_nav/SectionNav.d.ts.map +0 -1
- package/lib/types/components/dashboard/segmented_nav/SegmentedNav.css.d.ts +0 -4
- package/lib/types/components/dashboard/segmented_nav/SegmentedNav.css.d.ts.map +0 -1
- package/lib/types/components/dashboard/segmented_nav/SegmentedNav.d.ts +0 -15
- package/lib/types/components/dashboard/segmented_nav/SegmentedNav.d.ts.map +0 -1
- package/lib/types/components/layout/AppShell.d.ts +0 -17
- package/lib/types/components/layout/AppShell.d.ts.map +0 -1
- package/lib/types/components/layout/SidebarPageLayout.d.ts +0 -15
- package/lib/types/components/layout/SidebarPageLayout.d.ts.map +0 -1
- package/lib/types/components/layout/SplitViewLayout.css.d.ts +0 -3
- package/lib/types/components/layout/SplitViewLayout.css.d.ts.map +0 -1
- package/lib/types/components/layout/SplitViewLayout.d.ts +0 -11
- package/lib/types/components/layout/SplitViewLayout.d.ts.map +0 -1
- package/lib/types/components/layout/TabsContentLayout.css.d.ts +0 -6
- package/lib/types/components/layout/TabsContentLayout.css.d.ts.map +0 -1
- package/lib/types/components/layout/TabsContentLayout.d.ts +0 -9
- package/lib/types/components/layout/TabsContentLayout.d.ts.map +0 -1
- package/lib/types/components/layout/ToolbarRow.css.d.ts +0 -2
- package/lib/types/components/layout/ToolbarRow.css.d.ts.map +0 -1
- package/lib/types/components/layout/ToolbarRow.d.ts +0 -8
- package/lib/types/components/layout/ToolbarRow.d.ts.map +0 -1
- package/lib/types/components/subscriptions/RefetchNeededBanner.css.d.ts +0 -5
- package/lib/types/components/subscriptions/RefetchNeededBanner.css.d.ts.map +0 -1
- /package/lib/types/{backoffice/molecules/inline_banner → components/feedback}/inlineBanner.css.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/atomic/molecules/form_error/formError.css.ts
|
|
4
|
-
var e = "jc43j0 txvbqbey txvbqb2g9 txvbqb19cn txvbqbdr8 txvbqb9j txvbqbfcn txvbqbn97 txvbqbuyj txvbqb1979", t = "jc43j1
|
|
4
|
+
var e = "jc43j0 txvbqbey txvbqb2g9 txvbqb19cn txvbqbdr8 txvbqbff6 txvbqbf91 txvbqb9j txvbqbfcn txvbqbn97 txvbqbuyj txvbqb1979", t = "jc43j1 txvbqbf7y", n = "jc43j2 txvbqbf7l txvbqbt9i";
|
|
5
5
|
//#endregion
|
|
6
6
|
export { e as formError, t as icon, n as message };
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formError.css.js","names":[],"sources":["../../../../../src/atomic/molecules/form_error/formError.css.ts"],"sourcesContent":["import { sprinkles } from '../../../theme/sprinkles.css.js';\n\nexport const formError = sprinkles({\n alignItems: 'center',\n borderRadius: 'md',\n color: 'error',\n display: 'flex',\n fontSize: 'sm',\n fontWeight: 'medium',\n marginBottom: 6,\n padding: 4,\n backgroundColor: 'error-10',\n});\n\nexport const icon = sprinkles({\n
|
|
1
|
+
{"version":3,"file":"formError.css.js","names":[],"sources":["../../../../../src/atomic/molecules/form_error/formError.css.ts"],"sourcesContent":["import { sprinkles } from '../../../theme/sprinkles.css.js';\n\nexport const formError = sprinkles({\n alignItems: 'center',\n borderRadius: 'md',\n color: 'error',\n display: 'flex',\n gap: 2,\n flexWrap: 'wrap',\n fontSize: 'sm',\n fontWeight: 'medium',\n marginBottom: 6,\n padding: 4,\n backgroundColor: 'error-10',\n});\n\nexport const icon = sprinkles({\n flexShrink: 0,\n});\n\nexport const message = sprinkles({\n flexGrow: 'default',\n minWidth: 0,\n});\n"],"mappings":""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
3
|
//#region src/atomic/molecules/markdown/components/MarkdownTable.css.ts
|
|
5
4
|
var e = "tr18yy0 txvbqb196b txvbqb17h txvbqb2gm txvbqb2et txvbqb1uy txvbqbn8h txvbqbusr txvbqbuvn", t = "tr18yy2 tr18yy1 txvbqbbl8 txvbqbana txvbqbtqh txvbqb17w0";
|
|
6
5
|
//#endregion
|
|
@@ -1,35 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { cx as e } from "../../../theme/tools.js";
|
|
2
|
+
import { panel as t, panels as n, tabRecipe as r, tabsBar as i, tabsInner as a, tabsRecipe as o, wrapper as s } from "./tabs.css.js";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import u from "@plumile/router/routing/Link.js";
|
|
5
|
+
import d from "@plumile/router/routing/useLocation.js";
|
|
5
6
|
//#region src/atomic/molecules/tabs/Tabs.tsx
|
|
6
|
-
var
|
|
7
|
-
let {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
var f = u, p = (e, t, n, r = !1) => t == null ? typeof e.isActive == "boolean" ? e.isActive : r ? !1 : e.to != null && n != null ? n === e.to : !1 : e.id === t, m = (u) => {
|
|
8
|
+
let { activeId: m, ariaLabel: h, children: g, className: _, items: v, layout: y = "nav", onChange: b, panelClassName: x, variant: S = "line" } = u, { pathname: C } = d();
|
|
9
|
+
if (v.length === 0) return null;
|
|
10
|
+
let w = v.some((e) => e.to != null), T = b != null && !w, E = v.some((e) => typeof e.isActive == "boolean"), D = o({ variant: S });
|
|
11
|
+
y === "nav" && (D = e(D, _));
|
|
12
|
+
let O = v.map((e) => {
|
|
13
|
+
let { disabled: t, id: n, label: i, to: a } = e, o = p(e, m, C, E), s = "default";
|
|
14
|
+
t ? s = "disabled" : o && (s = "active");
|
|
15
|
+
let l = r({
|
|
16
|
+
state: s,
|
|
17
|
+
variant: S
|
|
18
|
+
}), u;
|
|
19
|
+
t && (u = !0);
|
|
20
|
+
let d;
|
|
21
|
+
if (o && a != null && (d = "page"), a != null) {
|
|
22
|
+
let e;
|
|
23
|
+
return t && (e = -1), /* @__PURE__ */ c(f, {
|
|
20
24
|
exact: !0,
|
|
21
|
-
"aria-current":
|
|
25
|
+
"aria-current": d,
|
|
22
26
|
"aria-disabled": u,
|
|
23
|
-
className:
|
|
24
|
-
to:
|
|
25
|
-
tabIndex:
|
|
26
|
-
onClick:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
className: l,
|
|
28
|
+
to: a,
|
|
29
|
+
tabIndex: e,
|
|
30
|
+
onClick: (e) => {
|
|
31
|
+
t && e.preventDefault();
|
|
32
|
+
},
|
|
33
|
+
children: i
|
|
34
|
+
}, n);
|
|
35
|
+
}
|
|
36
|
+
if (b != null) return /* @__PURE__ */ c("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
role: "tab",
|
|
39
|
+
"aria-selected": o,
|
|
40
|
+
"aria-disabled": u,
|
|
41
|
+
className: l,
|
|
42
|
+
disabled: t,
|
|
43
|
+
onClick: () => {
|
|
44
|
+
t || b(n);
|
|
45
|
+
},
|
|
46
|
+
children: i
|
|
47
|
+
}, n);
|
|
48
|
+
let h;
|
|
49
|
+
return o && (h = "page"), /* @__PURE__ */ c("span", {
|
|
50
|
+
"aria-current": h,
|
|
51
|
+
"aria-disabled": u,
|
|
52
|
+
className: l,
|
|
53
|
+
children: i
|
|
54
|
+
}, n);
|
|
55
|
+
}), k = T ? /* @__PURE__ */ c("div", {
|
|
56
|
+
className: D,
|
|
57
|
+
role: "tablist",
|
|
58
|
+
"aria-label": h,
|
|
59
|
+
children: O
|
|
60
|
+
}) : w ? /* @__PURE__ */ c("nav", {
|
|
61
|
+
"aria-label": h,
|
|
62
|
+
className: D,
|
|
63
|
+
children: O
|
|
64
|
+
}) : /* @__PURE__ */ c("div", {
|
|
65
|
+
className: D,
|
|
66
|
+
children: O
|
|
30
67
|
});
|
|
31
|
-
|
|
68
|
+
return y === "content" ? /* @__PURE__ */ l("div", {
|
|
69
|
+
className: e(s, _),
|
|
70
|
+
children: [/* @__PURE__ */ c("div", {
|
|
71
|
+
className: i,
|
|
72
|
+
children: /* @__PURE__ */ c("div", {
|
|
73
|
+
className: a,
|
|
74
|
+
children: k
|
|
75
|
+
})
|
|
76
|
+
}), /* @__PURE__ */ c("div", {
|
|
77
|
+
className: n,
|
|
78
|
+
children: /* @__PURE__ */ c("section", {
|
|
79
|
+
role: "tabpanel",
|
|
80
|
+
className: e(t, x),
|
|
81
|
+
children: g
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
}) : k;
|
|
85
|
+
}, h = { resolveItemIsActive: p };
|
|
32
86
|
//#endregion
|
|
33
|
-
export {
|
|
87
|
+
export { m as Tabs, h as __test };
|
|
34
88
|
|
|
35
89
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":[],"sources":["../../../../../src/atomic/molecules/tabs/Tabs.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ComponentPropsWithoutRef,\n type JSX,\n type MouseEvent,\n type ReactNode,\n} from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport useLocation from '@plumile/router/routing/useLocation.js';\n\nimport * as styles from './tabs.css.js';\n\nexport type TabsSelectEvent = MouseEvent<HTMLButtonElement | HTMLAnchorElement>;\n\ntype LinkComponentProps = ComponentPropsWithoutRef<typeof Link>;\ntype RouterLinkProps = LinkComponentProps &\n AnchorHTMLAttributes<HTMLAnchorElement>;\nconst RouterLink = Link as unknown as (props: RouterLinkProps) => JSX.Element;\n\
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":[],"sources":["../../../../../src/atomic/molecules/tabs/Tabs.tsx"],"sourcesContent":["import {\n type AnchorHTMLAttributes,\n type ComponentPropsWithoutRef,\n type HTMLAttributes,\n type JSX,\n type MouseEvent,\n type ReactNode,\n} from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport useLocation from '@plumile/router/routing/useLocation.js';\n\nimport * as styles from './tabs.css.js';\nimport { cx } from '../../../theme/tools.js';\n\nexport type TabsSelectEvent = MouseEvent<HTMLButtonElement | HTMLAnchorElement>;\n\ntype LinkComponentProps = ComponentPropsWithoutRef<typeof Link>;\ntype RouterLinkProps = LinkComponentProps &\n AnchorHTMLAttributes<HTMLAnchorElement>;\nconst RouterLink = Link as unknown as (props: RouterLinkProps) => JSX.Element;\n\nexport type TabItem = {\n id: string;\n label: ReactNode;\n to?: LinkComponentProps['to'];\n disabled?: boolean;\n isActive?: boolean;\n};\n\nexport type TabsVariant = 'line' | 'pill' | 'underline' | 'page';\n\nexport type TabsProps = {\n items: readonly TabItem[];\n activeId?: string;\n onChange?: (id: string) => void;\n ariaLabel?: string;\n children?: ReactNode;\n className?: string;\n layout?: 'nav' | 'content';\n panelClassName?: string;\n variant?: TabsVariant;\n};\n\nconst resolveItemIsActive = (\n item: TabItem,\n activeId: string | undefined,\n pathname: string | undefined,\n hasExplicitActiveItem = false,\n): boolean => {\n if (activeId != null) {\n return item.id === activeId;\n }\n\n if (typeof item.isActive === 'boolean') {\n return item.isActive;\n }\n\n if (hasExplicitActiveItem) {\n return false;\n }\n\n if (item.to != null && pathname != null) {\n return pathname === item.to;\n }\n\n return false;\n};\n\nexport const Tabs = (props: TabsProps): JSX.Element | null => {\n const {\n activeId,\n ariaLabel,\n children,\n className,\n items,\n layout = 'nav',\n onChange,\n panelClassName,\n variant = 'line',\n } = props;\n const { pathname } = useLocation();\n\n if (items.length === 0) {\n return null;\n }\n\n const hasNavigationItems = items.some((item) => {\n return item.to != null;\n });\n const isControlled = onChange != null && !hasNavigationItems;\n const hasExplicitActiveItem = items.some((item) => {\n return typeof item.isActive === 'boolean';\n });\n let rootClassName = styles.tabsRecipe({ variant });\n if (layout === 'nav') {\n rootClassName = cx(rootClassName, className);\n }\n\n const content = items.map((item) => {\n const { disabled, id, label, to } = item;\n const isActive = resolveItemIsActive(\n item,\n activeId,\n pathname,\n hasExplicitActiveItem,\n );\n\n type TabState = NonNullable<\n Parameters<typeof styles.tabRecipe>[0]\n >['state'];\n let tabState: TabState = 'default';\n if (disabled) {\n tabState = 'disabled';\n } else if (isActive) {\n tabState = 'active';\n }\n\n const tabClassName = styles.tabRecipe({ state: tabState, variant });\n let ariaDisabled: true | undefined;\n if (disabled) {\n ariaDisabled = true;\n }\n let ariaCurrent: 'page' | undefined;\n if (isActive && to != null) {\n ariaCurrent = 'page';\n }\n\n if (to != null) {\n let tabIndex: number | undefined;\n if (disabled) {\n tabIndex = -1;\n }\n\n const handleLinkClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n }\n };\n\n return (\n <RouterLink\n key={id}\n exact\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n className={tabClassName}\n to={to}\n tabIndex={tabIndex}\n onClick={handleLinkClick}\n >\n {label}\n </RouterLink>\n );\n }\n\n if (onChange != null) {\n return (\n <button\n key={id}\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n aria-disabled={ariaDisabled}\n className={tabClassName}\n disabled={disabled}\n onClick={() => {\n if (!disabled) {\n onChange(id);\n }\n }}\n >\n {label}\n </button>\n );\n }\n\n let staticAriaCurrent: 'page' | undefined;\n if (isActive) {\n staticAriaCurrent = 'page';\n }\n\n return (\n <span\n key={id}\n aria-current={staticAriaCurrent}\n aria-disabled={ariaDisabled}\n className={tabClassName}\n >\n {label}\n </span>\n );\n });\n\n const renderRoot = (): JSX.Element => {\n if (isControlled) {\n return (\n <div className={rootClassName} role=\"tablist\" aria-label={ariaLabel}>\n {content}\n </div>\n );\n }\n\n if (hasNavigationItems) {\n return (\n <nav aria-label={ariaLabel} className={rootClassName}>\n {content}\n </nav>\n );\n }\n\n return <div className={rootClassName}>{content}</div>;\n };\n\n const nav = renderRoot();\n\n if (layout !== 'content') {\n return nav;\n }\n\n const wrapperProps: HTMLAttributes<HTMLDivElement> = {\n className: cx(styles.wrapper, className),\n };\n\n return (\n <div {...wrapperProps}>\n <div className={styles.tabsBar}>\n <div className={styles.tabsInner}>{nav}</div>\n </div>\n <div className={styles.panels}>\n <section role=\"tabpanel\" className={cx(styles.panel, panelClassName)}>\n {children}\n </section>\n </div>\n </div>\n );\n};\n\nexport const __test = {\n resolveItemIsActive,\n} as const;\n"],"mappings":";;;;;;AAmBA,IAAM,IAAa,GAwBb,KACJ,GACA,GACA,GACA,IAAwB,OAEpB,KAAY,OAIZ,OAAO,EAAK,YAAa,YACpB,EAAK,WAGV,IACK,KAGL,EAAK,MAAM,QAAQ,KAAY,OAC1B,MAAa,EAAK,KAGpB,KAfE,EAAK,OAAO,GAkBV,KAAQ,MAAyC;CAC5D,IAAM,EACJ,aACA,cACA,aACA,cACA,UACA,YAAS,OACT,aACA,mBACA,aAAU,WACR,GACE,EAAE,gBAAa,GAAa;CAElC,IAAI,EAAM,WAAW,GACnB,OAAO;CAGT,IAAM,IAAqB,EAAM,MAAM,MAC9B,EAAK,MAAM,KAClB,EACI,IAAe,KAAY,QAAQ,CAAC,GACpC,IAAwB,EAAM,MAAM,MACjC,OAAO,EAAK,YAAa,UAChC,EACE,IAAgB,EAAkB,EAAE,YAAS,CAAC;CAClD,AAAI,MAAW,UACb,IAAgB,EAAG,GAAe,EAAU;CAG9C,IAAM,IAAU,EAAM,KAAK,MAAS;EAClC,IAAM,EAAE,aAAU,OAAI,UAAO,UAAO,GAC9B,IAAW,EACf,GACA,GACA,GACA,EACD,EAKG,IAAqB;EACzB,AAAI,IACF,IAAW,aACF,MACT,IAAW;EAGb,IAAM,IAAe,EAAiB;GAAE,OAAO;GAAU;GAAS,CAAC,EAC/D;EACJ,AAAI,MACF,IAAe;EAEjB,IAAI;EAKJ,IAJI,KAAY,KAAM,SACpB,IAAc,SAGZ,KAAM,MAAM;GACd,IAAI;GAWJ,OAVI,MACF,IAAW,KAUX,kBAAC,GAAD;IAEE,OAAA;IACA,gBAAc;IACd,iBAAe;IACf,WAAW;IACP;IACM;IACV,UAfqB,MAAyC;KAChE,AAAI,KACF,EAAM,gBAAgB;;cAerB;IACU,EAVN,EAUM;;EAIjB,IAAI,KAAY,MACd,OACE,kBAAC,UAAD;GAEE,MAAK;GACL,MAAK;GACL,iBAAe;GACf,iBAAe;GACf,WAAW;GACD;GACV,eAAe;IACb,AAAK,KACH,EAAS,EAAG;;aAIf;GACM,EAdF,EAcE;EAIb,IAAI;EAKJ,OAJI,MACF,IAAoB,SAIpB,kBAAC,QAAD;GAEE,gBAAc;GACd,iBAAe;GACf,WAAW;aAEV;GACI,EANA,EAMA;GAET,EAsBI,IAnBA,IAEA,kBAAC,OAAD;EAAK,WAAW;EAAe,MAAK;EAAU,cAAY;YACvD;EACG,CAAA,GAIN,IAEA,kBAAC,OAAD;EAAK,cAAY;EAAW,WAAW;YACpC;EACG,CAAA,GAIH,kBAAC,OAAD;EAAK,WAAW;YAAgB;EAAc,CAAA;CAavD,OARI,MAAW,YASb,kBAAC,OAAD;EAJA,WAAW,EAAG,GAAgB,EAAU;YAIxC,CACE,kBAAC,OAAD;GAAK,WAAW;aACd,kBAAC,OAAD;IAAK,WAAW;cAAmB;IAAU,CAAA;GACzC,CAAA,EACN,kBAAC,OAAD;GAAK,WAAW;aACd,kBAAC,WAAD;IAAS,MAAK;IAAW,WAAW,EAAG,GAAc,EAAe;IACjE;IACO,CAAA;GACN,CAAA,CACF;MAjBC;GAqBE,IAAS,EACpB,wBACD"}
|
|
@@ -2,17 +2,59 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
4
|
//#region src/atomic/molecules/tabs/tabs.css.ts
|
|
5
|
-
var t = "_11tf63d0 txvbqbdr8
|
|
6
|
-
defaultClassName: "
|
|
7
|
-
variantClassNames: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
var t = "_11tf63d0 txvbqbdr8 txvbqbf6i txvbqbffw txvbqb17w0", n = "_11tf63d1 txvbqb17w0 txvbqbdr8 txvbqbjtp", r = "_11tf63d2 txvbqb17w0 txvbqbdr8 txvbqbjtp", i = "_11tf63d3 txvbqb17w0", a = "_11tf63d4 txvbqb17w0", o = e({
|
|
6
|
+
defaultClassName: "_11tf63da _11tf63d5 txvbqbdr8 txvbqbey txvbqbs65",
|
|
7
|
+
variantClassNames: { variant: {
|
|
8
|
+
line: "_11tf63db _11tf63d6 txvbqbf91 txvbqbff6 txvbqbjtp",
|
|
9
|
+
pill: "_11tf63dc _11tf63d7 txvbqbdsb txvbqbf8o txvbqbfet txvbqbuvn txvbqbuxg txvbqb2is txvbqb196f txvbqb1uy txvbqb2et txvbqb17u",
|
|
10
|
+
underline: "_11tf63dd _11tf63d8 txvbqbyoi txvbqbzm3 txvbqb11ed txvbqbwqg txvbqb17w0 txvbqbf8o txvbqbff6 txvbqbuvn txvbqb1g5 txvbqb2et txvbqb8oi txvbqb577 txvbqb196b",
|
|
11
|
+
page: "_11tf63de _11tf63d9 txvbqb17w0 txvbqbf91 txvbqbff6"
|
|
11
12
|
} },
|
|
12
|
-
defaultVariants: {
|
|
13
|
+
defaultVariants: { variant: "line" },
|
|
13
14
|
compoundVariants: []
|
|
15
|
+
}), s = e({
|
|
16
|
+
defaultClassName: "_11tf63dx _11tf63dp",
|
|
17
|
+
variantClassNames: {
|
|
18
|
+
variant: {
|
|
19
|
+
line: "_11tf63dy _11tf63dg _11tf63df txvbqbyov txvbqbzmg txvbqb10jb txvbqbvve txvbqbdsb txvbqbey txvbqbf7y txvbqbfet txvbqbacg txvbqba6o txvbqb9j txvbqb19cb txvbqb7h txvbqb76 txvbqb7t txvbqb8af txvbqb4hx txvbqb2et txvbqbfcn txvbqb3f txvbqbunc txvbqb11js txvbqb1933 txvbqbv",
|
|
20
|
+
pill: "_11tf63dz _11tf63dj _11tf63dh txvbqbyoi txvbqbzm3 txvbqb11ed txvbqbwqg txvbqbdsb txvbqbf7y txvbqbey txvbqb1uy txvbqb2et txvbqb1933 txvbqb19cb txvbqbv txvbqbfcn txvbqb2is txvbqb9j txvbqbik txvbqb3f _11tf63di txvbqb1bs9 txvbqb1aeh",
|
|
21
|
+
underline: "_11tf63d10 _11tf63dm _11tf63dk txvbqbyoi txvbqbzm3 txvbqb10jb txvbqbvve txvbqbdsb txvbqbf7y txvbqbey txvbqb2et txvbqb1933 txvbqb19cb txvbqbv txvbqbfcn txvbqb2f6 txvbqb1g5 txvbqb8oi txvbqbik txvbqb9j txvbqb3f _11tf63dl txvbqb1bs9 txvbqb1aeh",
|
|
22
|
+
page: "_11tf63d11 _11tf63do _11tf63dn txvbqbey txvbqb196f txvbqb1g5 txvbqb2et txvbqbik txvbqb2gm txvbqb19cb txvbqbv txvbqbdsb txvbqbf7y txvbqb9j txvbqbfcn txvbqbxo1 txvbqbxqx txvbqb3f txvbqb7g txvbqb76 txvbqb7t"
|
|
23
|
+
},
|
|
24
|
+
state: {
|
|
25
|
+
default: "_11tf63d12",
|
|
26
|
+
active: "_11tf63d13 _11tf63dq txvbqb19bj txvbqb512 txvbqbfd0",
|
|
27
|
+
disabled: "_11tf63d14 _11tf63dr txvbqb19cd txvbqb2o txvbqbr"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "line",
|
|
32
|
+
state: "default"
|
|
33
|
+
},
|
|
34
|
+
compoundVariants: [
|
|
35
|
+
[{
|
|
36
|
+
variant: "line",
|
|
37
|
+
state: "default"
|
|
38
|
+
}, "_11tf63ds"],
|
|
39
|
+
[{
|
|
40
|
+
variant: "pill",
|
|
41
|
+
state: "active"
|
|
42
|
+
}, "_11tf63dt txvbqb1963 txvbqb11p txvbqb19bj txvbqbcol"],
|
|
43
|
+
[{
|
|
44
|
+
variant: "underline",
|
|
45
|
+
state: "active"
|
|
46
|
+
}, "_11tf63du txvbqb19bj txvbqb512"],
|
|
47
|
+
[{
|
|
48
|
+
variant: "page",
|
|
49
|
+
state: "active"
|
|
50
|
+
}, "_11tf63dv txvbqb1959 txvbqb198p txvbqbcj6"],
|
|
51
|
+
[{
|
|
52
|
+
variant: "page",
|
|
53
|
+
state: "default"
|
|
54
|
+
}, "_11tf63dw txvbqb19cb"]
|
|
55
|
+
]
|
|
14
56
|
});
|
|
15
57
|
//#endregion
|
|
16
|
-
export {
|
|
58
|
+
export { a as panel, i as panels, s as tabRecipe, n as tabsBar, r as tabsInner, o as tabsRecipe, t as wrapper };
|
|
17
59
|
|
|
18
60
|
//# sourceMappingURL=tabs.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.css.js","names":[],"sources":["../../../../../src/atomic/molecules/tabs/tabs.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe, type RecipeVariants } from '@vanilla-extract/recipes';\n\nimport { sprinkles } from '../../../theme/sprinkles.css.js';\nimport { vars } from '../../../theme/themeContract.css.js';\n\nexport const
|
|
1
|
+
{"version":3,"file":"tabs.css.js","names":[],"sources":["../../../../../src/atomic/molecules/tabs/tabs.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe, type RecipeVariants } from '@vanilla-extract/recipes';\n\nimport { sprinkles, stateSprinkles } from '../../../theme/sprinkles.css.js';\nimport { vars } from '../../../theme/themeContract.css.js';\n\nexport const wrapper = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n width: 'full',\n});\n\nexport const tabsBar = sprinkles({\n width: 'full',\n display: 'flex',\n justifyContent: 'center',\n});\n\nexport const tabsInner = sprinkles({\n width: 'full',\n display: 'flex',\n justifyContent: 'center',\n});\n\nexport const panels = sprinkles({\n width: 'full',\n});\n\nexport const panel = sprinkles({\n width: 'full',\n});\n\nexport const tabsRecipe = recipe({\n base: sprinkles({\n display: 'flex',\n alignItems: 'center',\n maxWidth: 'full',\n }),\n variants: {\n variant: {\n line: sprinkles({\n flexWrap: 'wrap',\n gap: 2,\n justifyContent: 'center',\n }),\n pill: sprinkles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n gap: 1,\n overflowX: 'auto',\n padding: 1,\n borderRadius: 'full',\n backgroundColor: 'surfaceMuted',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n }),\n underline: sprinkles({\n width: 'full',\n flexWrap: 'nowrap',\n gap: 2,\n overflowX: 'auto',\n paddingX: 3,\n paddingY: 1.5,\n borderWidth: 0,\n borderStyle: 'solid',\n borderBottomWidth: 'default',\n borderBottomColor: 'borderSubtle',\n backgroundColor: 'surface',\n }),\n page: sprinkles({\n width: 'full',\n flexWrap: 'wrap',\n gap: 2,\n }),\n },\n },\n defaultVariants: {\n variant: 'line',\n },\n});\n\nconst lineTabBase = style([\n sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n flexShrink: 0,\n gap: 1,\n borderTopLeftRadius: 'md',\n borderTopRightRadius: 'md',\n paddingX: 4,\n paddingY: 2,\n fontSize: 'sm',\n color: 'textSecondary',\n transitionProperty: 'colors',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n borderBottomWidth: 2,\n borderBottomColor: 'transparent',\n borderStyle: 'solid',\n fontWeight: 'medium',\n textDecoration: 'none',\n outline: 'none',\n position: 'relative',\n backgroundColor: 'transparent',\n cursor: 'pointer',\n }),\n {\n marginBottom: '-1px',\n selectors: {\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n color: vars.colors.primary,\n borderBottomColor: vars.colors.primary,\n },\n },\n },\n]);\n\nconst pillTabBase = style([\n sprinkles({\n display: 'inline-flex',\n flexShrink: 0,\n alignItems: 'center',\n borderWidth: 'default',\n borderStyle: 'solid',\n backgroundColor: 'transparent',\n color: 'textSecondary',\n cursor: 'pointer',\n fontWeight: 'medium',\n paddingX: 3,\n paddingY: 1.5,\n borderRadius: 'full',\n fontSize: 'sm',\n borderColor: 'transparent',\n textDecoration: 'none',\n }),\n stateSprinkles({\n color: {\n hover: 'text',\n },\n backgroundColor: {\n hover: 'surface',\n },\n }),\n {\n ':focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: 2,\n },\n },\n]);\n\nconst underlineTabBase = style([\n sprinkles({\n display: 'inline-flex',\n flexShrink: 0,\n alignItems: 'center',\n borderStyle: 'solid',\n backgroundColor: 'transparent',\n color: 'textSecondary',\n cursor: 'pointer',\n fontWeight: 'medium',\n paddingX: 3,\n paddingY: 2,\n borderRadius: 'none',\n borderWidth: 0,\n borderBottomWidth: 'default',\n borderColor: 'transparent',\n fontSize: 'sm',\n textDecoration: 'none',\n }),\n stateSprinkles({\n color: {\n hover: 'text',\n },\n backgroundColor: {\n hover: 'surface',\n },\n }),\n {\n ':focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: 2,\n },\n },\n]);\n\nconst pageTabBase = style([\n sprinkles({\n alignItems: 'center',\n backgroundColor: 'surfaceMuted',\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: 'transparent',\n borderRadius: 'lg',\n color: 'textSecondary',\n cursor: 'pointer',\n display: 'inline-flex',\n flexShrink: 0,\n fontSize: 'sm',\n fontWeight: 'medium',\n paddingBlock: 1.5,\n paddingInline: 3,\n textDecoration: 'none',\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n selectors: {\n '&:hover': {\n color: vars.colors.text,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: 2,\n },\n },\n },\n]);\n\nexport const tabRecipe = recipe({\n base: style({\n appearance: 'none',\n font: 'inherit',\n }),\n variants: {\n variant: {\n line: lineTabBase,\n pill: pillTabBase,\n underline: underlineTabBase,\n page: pageTabBase,\n },\n state: {\n default: {},\n active: sprinkles({\n color: 'primary',\n borderBottomColor: 'primary',\n fontWeight: 'semibold',\n }),\n disabled: sprinkles({\n color: 'textMuted',\n pointerEvents: 'none',\n cursor: 'not-allowed',\n }),\n },\n },\n compoundVariants: [\n {\n variants: {\n variant: 'line',\n state: 'default',\n },\n style: style({\n selectors: {\n '&:hover': {\n color: vars.colors.primary,\n borderBottomColor: vars.colors.primaryLight,\n },\n },\n }),\n },\n {\n variants: {\n variant: 'pill',\n state: 'active',\n },\n style: sprinkles({\n backgroundColor: 'primaryLight',\n borderColor: 'primary',\n color: 'primary',\n boxShadow: 'primaryLightRing',\n }),\n },\n {\n variants: {\n variant: 'underline',\n state: 'active',\n },\n style: sprinkles({\n color: 'primary',\n borderBottomColor: 'primary',\n }),\n },\n {\n variants: {\n variant: 'page',\n state: 'active',\n },\n style: sprinkles({\n backgroundColor: 'blue-500',\n color: 'white',\n boxShadow: 'sm',\n }),\n },\n {\n variants: {\n variant: 'page',\n state: 'default',\n },\n style: sprinkles({\n color: 'textSecondary',\n }),\n },\n ],\n defaultVariants: {\n variant: 'line',\n state: 'default',\n },\n});\n\nexport type TabRecipeVariants = RecipeVariants<typeof tabRecipe>;\nexport type TabsRecipeVariants = RecipeVariants<typeof tabsRecipe>;\n"],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cx as e } from "../../../theme/tools.js";
|
|
2
2
|
import { useUiTranslation as t } from "../../../i18n/useUiTranslation.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ChevronLeftIcon as n, ChevronRightIcon as r } from "./icons.js";
|
|
4
|
+
import { childIcon as i, childLabel as a, childLinkRecipe as o, collapseButton as s, collapseButtonLabel as c, collapseButtonStateRecipe as l, collapsibleContent as u, collapsibleItem as d, collapsibleSection as f, collapsibleStateRecipe as p, iconBaseLayer as m, iconHiddenOnHover as h, iconVisibleOnHover as g, iconWrapper as _, itemWrapper as v, label as y, navButton as b, navGapRecipe as x, navLinkRecipe as ee, navWithTrailingAction as S, trailingActionButton as C, trailingActionIconHidden as w, trailingActionIconVisible as T, trailingActionIconWrapper as te, trailingIconWrapper as E } from "./navigationSidebar.css.js";
|
|
5
|
+
import { SidebarContainer as D } from "./SidebarContainer.js";
|
|
6
6
|
import { useCallback as O, useMemo as k, useState as A } from "react";
|
|
7
7
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
8
8
|
import P from "@plumile/router/routing/Link.js";
|
|
@@ -13,14 +13,14 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
13
13
|
return n && (i = "expanded"), /* @__PURE__ */ M("div", {
|
|
14
14
|
id: t,
|
|
15
15
|
"aria-hidden": !n,
|
|
16
|
-
className: e(
|
|
16
|
+
className: e(f, p({ state: i })),
|
|
17
17
|
children: /* @__PURE__ */ M("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: u,
|
|
19
19
|
children: r
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
|
-
}, L = ({ items:
|
|
23
|
-
let { t: z } = t(), [B, V] = A(!1), [H, U] = A({}), W =
|
|
22
|
+
}, L = ({ items: u, headerSlot: f, isCollapsed: p, onCollapsedChange: L, showCollapseToggle: R = !0 }) => {
|
|
23
|
+
let { t: z } = t(), [B, V] = A(!1), [H, U] = A({}), W = p != null, G = p ?? B, { pathname: K } = F(), q = (e, t) => t === !0 ? K === e : K === e ? !0 : K.startsWith(`${e}/`), J = O((e, t) => {
|
|
24
24
|
U((n) => ({
|
|
25
25
|
...n,
|
|
26
26
|
[e]: t
|
|
@@ -33,22 +33,22 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
33
33
|
W,
|
|
34
34
|
L
|
|
35
35
|
]), X;
|
|
36
|
-
G || (X =
|
|
36
|
+
G || (X = f ?? void 0);
|
|
37
37
|
let Z = k(() => {
|
|
38
38
|
if (!R) return null;
|
|
39
|
-
let t =
|
|
40
|
-
G && (t =
|
|
39
|
+
let t = n, i = z("navigation.sidebar.actions.collapseAriaLabel");
|
|
40
|
+
G && (t = r, i = z("navigation.sidebar.actions.expandAriaLabel"));
|
|
41
41
|
let a = "expanded";
|
|
42
42
|
G && (a = "collapsed");
|
|
43
43
|
let o = null;
|
|
44
44
|
return G || (o = /* @__PURE__ */ M("span", {
|
|
45
|
-
className:
|
|
45
|
+
className: c,
|
|
46
46
|
children: z("navigation.sidebar.actions.collapse")
|
|
47
47
|
})), /* @__PURE__ */ N("button", {
|
|
48
48
|
type: "button",
|
|
49
49
|
onClick: Y,
|
|
50
|
-
className: e(
|
|
51
|
-
"aria-label":
|
|
50
|
+
className: e(s, l({ state: a })),
|
|
51
|
+
"aria-label": i,
|
|
52
52
|
children: [/* @__PURE__ */ M(t, { size: 20 }), o]
|
|
53
53
|
});
|
|
54
54
|
}, [
|
|
@@ -57,51 +57,51 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
57
57
|
R,
|
|
58
58
|
z
|
|
59
59
|
]);
|
|
60
|
-
return /* @__PURE__ */ M(
|
|
60
|
+
return /* @__PURE__ */ M(D, {
|
|
61
61
|
headerSlot: X,
|
|
62
62
|
footerSlot: Z,
|
|
63
63
|
isCollapsed: G,
|
|
64
64
|
showDefaultHeaderAction: !1,
|
|
65
|
-
children:
|
|
66
|
-
let n = t.childItems ?? null, r = n != null && n.length > 0,
|
|
67
|
-
u && (l = `navigation-sidebar-${t.key}-children`), r && n.some((e) => q(e.to)) && (
|
|
68
|
-
let
|
|
69
|
-
!G && t.trailingAction != null && (
|
|
70
|
-
let p =
|
|
65
|
+
children: u.map((t) => {
|
|
66
|
+
let n = t.childItems ?? null, r = n != null && n.length > 0, s = H[t.key] ?? t.defaultExpanded ?? !1, c = !s, l, u = !G && r;
|
|
67
|
+
u && (l = `navigation-sidebar-${t.key}-children`), r && n.some((e) => q(e.to)) && (s = !0);
|
|
68
|
+
let f = null;
|
|
69
|
+
!G && t.trailingAction != null && (f = t.trailingAction);
|
|
70
|
+
let p = f != null, D = t.hoverIcon !== void 0 && t.hoverIcon !== null, O = t.trailingIcon !== void 0 && t.trailingIcon !== null, k = t.trailingHoverIcon !== void 0 && t.trailingHoverIcon !== null, A = !G && !p && (O || k), F;
|
|
71
71
|
G && (F = t.label);
|
|
72
72
|
let L = "expanded";
|
|
73
73
|
G && (L = "collapsed");
|
|
74
|
-
let R =
|
|
75
|
-
p && (z =
|
|
74
|
+
let R = x({ state: L }), z;
|
|
75
|
+
p && (z = S);
|
|
76
76
|
let B = null;
|
|
77
77
|
G || (B = /* @__PURE__ */ M("span", {
|
|
78
|
-
className:
|
|
78
|
+
className: y,
|
|
79
79
|
children: t.label
|
|
80
80
|
}));
|
|
81
81
|
let V = null;
|
|
82
|
-
|
|
83
|
-
className:
|
|
82
|
+
D && (V = /* @__PURE__ */ M("span", {
|
|
83
|
+
className: g,
|
|
84
84
|
children: t.hoverIcon
|
|
85
85
|
}));
|
|
86
86
|
let U = /* @__PURE__ */ N("span", {
|
|
87
|
-
className:
|
|
87
|
+
className: _,
|
|
88
88
|
children: [/* @__PURE__ */ M("span", {
|
|
89
|
-
className: e(
|
|
89
|
+
className: e(m, { [h]: D }),
|
|
90
90
|
children: t.icon
|
|
91
91
|
}), V]
|
|
92
92
|
}), W = null;
|
|
93
93
|
if (A) {
|
|
94
94
|
let n = null;
|
|
95
95
|
O && (n = /* @__PURE__ */ M("span", {
|
|
96
|
-
className: e(
|
|
96
|
+
className: e(m, { [h]: k }),
|
|
97
97
|
children: t.trailingIcon
|
|
98
98
|
}));
|
|
99
99
|
let r = null;
|
|
100
100
|
k && (r = /* @__PURE__ */ M("span", {
|
|
101
|
-
className:
|
|
101
|
+
className: g,
|
|
102
102
|
children: t.trailingHoverIcon
|
|
103
103
|
})), W = /* @__PURE__ */ N("span", {
|
|
104
|
-
className:
|
|
104
|
+
className: E,
|
|
105
105
|
children: [n, r]
|
|
106
106
|
});
|
|
107
107
|
}
|
|
@@ -112,16 +112,16 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
112
112
|
] }), Y = () => {
|
|
113
113
|
!r || G || J(t.key, c);
|
|
114
114
|
}, X;
|
|
115
|
-
if (r) X = e(
|
|
115
|
+
if (r) X = e(b, R, z);
|
|
116
116
|
else {
|
|
117
117
|
let n = "default";
|
|
118
|
-
q(t.to, t.exact) && (n = "active"), X = e(
|
|
118
|
+
q(t.to, t.exact) && (n = "active"), X = e(ee({ state: n }), R, z);
|
|
119
119
|
}
|
|
120
120
|
let Z;
|
|
121
121
|
Z = r ? /* @__PURE__ */ M("button", {
|
|
122
122
|
type: "button",
|
|
123
123
|
className: X,
|
|
124
|
-
"aria-expanded":
|
|
124
|
+
"aria-expanded": s,
|
|
125
125
|
"aria-controls": l,
|
|
126
126
|
"aria-label": F,
|
|
127
127
|
onClick: Y,
|
|
@@ -134,23 +134,23 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
134
134
|
children: K
|
|
135
135
|
});
|
|
136
136
|
let Q = null;
|
|
137
|
-
if (
|
|
137
|
+
if (f != null) {
|
|
138
138
|
let e = (e) => {
|
|
139
|
-
e.preventDefault(), e.stopPropagation(),
|
|
140
|
-
}, t =
|
|
139
|
+
e.preventDefault(), e.stopPropagation(), f.onClick();
|
|
140
|
+
}, t = f.hoverIcon, n = t != null, r = null;
|
|
141
141
|
n && (r = /* @__PURE__ */ M("span", {
|
|
142
|
-
className:
|
|
142
|
+
className: T,
|
|
143
143
|
children: t
|
|
144
144
|
})), Q = /* @__PURE__ */ M("button", {
|
|
145
145
|
type: "button",
|
|
146
|
-
"aria-label":
|
|
146
|
+
"aria-label": f.label,
|
|
147
147
|
onClick: e,
|
|
148
|
-
className:
|
|
148
|
+
className: C,
|
|
149
149
|
children: /* @__PURE__ */ N("span", {
|
|
150
|
-
className:
|
|
150
|
+
className: te,
|
|
151
151
|
children: [/* @__PURE__ */ M("span", {
|
|
152
|
-
className:
|
|
153
|
-
children:
|
|
152
|
+
className: w,
|
|
153
|
+
children: f.icon
|
|
154
154
|
}), r]
|
|
155
155
|
})
|
|
156
156
|
});
|
|
@@ -158,29 +158,29 @@ var I = ({ id: t, isExpanded: n, children: r }) => {
|
|
|
158
158
|
let $ = null;
|
|
159
159
|
return u && l != null && ($ = /* @__PURE__ */ M(I, {
|
|
160
160
|
id: l,
|
|
161
|
-
isExpanded:
|
|
161
|
+
isExpanded: s,
|
|
162
162
|
children: n.map((e) => {
|
|
163
163
|
let t = null;
|
|
164
164
|
e.icon != null && (t = /* @__PURE__ */ M("span", {
|
|
165
|
-
className:
|
|
165
|
+
className: i,
|
|
166
166
|
children: e.icon
|
|
167
167
|
}));
|
|
168
168
|
let n = "default";
|
|
169
169
|
return q(e.to) && (n = "active"), /* @__PURE__ */ M("div", {
|
|
170
|
-
className:
|
|
170
|
+
className: d,
|
|
171
171
|
children: /* @__PURE__ */ N(P, {
|
|
172
172
|
to: e.to,
|
|
173
|
-
className:
|
|
173
|
+
className: o({ state: n }),
|
|
174
174
|
"aria-label": e.label,
|
|
175
175
|
children: [t, /* @__PURE__ */ M("span", {
|
|
176
|
-
className:
|
|
176
|
+
className: a,
|
|
177
177
|
children: e.label
|
|
178
178
|
})]
|
|
179
179
|
})
|
|
180
180
|
}, e.key);
|
|
181
181
|
})
|
|
182
182
|
})), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("div", {
|
|
183
|
-
className:
|
|
183
|
+
className: v,
|
|
184
184
|
children: [Z, Q]
|
|
185
185
|
}), $] }, t.key);
|
|
186
186
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSidebar.js","names":[],"sources":["../../../../../src/atomic/organisms/sidebar/NavigationSidebar.tsx"],"sourcesContent":["import {\n type JSX,\n type MouseEvent,\n type ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport useLocation from '@plumile/router/routing/useLocation.js';\nimport type { RecipeVariants } from '@vanilla-extract/recipes';\n\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\nimport { cx } from '../../../theme/tools.js';\nimport { ChevronLeftIcon, ChevronRightIcon } from './icons.js';\nimport * as styles from './navigationSidebar.css.js';\nimport { SidebarContainer } from './SidebarContainer.js';\n\ntype SidebarItemTrailingAction = {\n icon: ReactNode;\n hoverIcon?: ReactNode;\n label: string;\n onClick: () => void;\n};\n\ntype SidebarItem = {\n key: string;\n to: string;\n label: string;\n icon: ReactNode;\n exact?: boolean;\n hoverIcon?: ReactNode;\n trailingIcon?: ReactNode;\n trailingHoverIcon?: ReactNode;\n trailingAction?: SidebarItemTrailingAction;\n childItems?: SidebarChildItem[];\n defaultExpanded?: boolean;\n};\n\ntype SidebarChildItem = {\n key: string;\n to: string;\n label: string;\n icon?: ReactNode;\n};\n\ntype NavigationSidebarProps = {\n items: SidebarItem[];\n headerSlot?: ReactNode;\n isCollapsed?: boolean;\n onCollapsedChange?: (nextCollapsed: boolean) => void;\n showCollapseToggle?: boolean;\n};\n\nconst CollapsibleSection = ({\n id,\n isExpanded,\n children,\n}: {\n id: string;\n isExpanded: boolean;\n children: ReactNode;\n}): JSX.Element => {\n let collapsibleStateKey: NonNullable<\n NonNullable<RecipeVariants<typeof styles.collapsibleStateRecipe>>['state']\n > = 'collapsed';\n if (isExpanded) {\n collapsibleStateKey = 'expanded';\n }\n\n return (\n <div\n id={id}\n aria-hidden={!isExpanded}\n className={cx(\n styles.collapsibleSection,\n styles.collapsibleStateRecipe({ state: collapsibleStateKey }),\n )}\n >\n <div className={styles.collapsibleContent}>{children}</div>\n </div>\n );\n};\n\nconst NavigationSidebar = ({\n items,\n headerSlot,\n isCollapsed: isCollapsedProp,\n onCollapsedChange,\n showCollapseToggle = true,\n}: NavigationSidebarProps): JSX.Element => {\n const { t } = useUiTranslation();\n const [internalCollapsed, setInternalCollapsed] = useState(false);\n const [expandedState, setExpandedState] = useState<Record<string, boolean>>(\n {},\n );\n const isControlled = isCollapsedProp != null;\n const isCollapsed = isCollapsedProp ?? internalCollapsed;\n const { pathname } = useLocation();\n\n const isPathActive = (target: string, exact?: boolean): boolean => {\n if (exact === true) {\n return pathname === target;\n }\n if (pathname === target) {\n return true;\n }\n return pathname.startsWith(`${target}/`);\n };\n\n const handleToggle = useCallback((key: string, nextState: boolean) => {\n setExpandedState((prev) => {\n return {\n ...prev,\n [key]: nextState,\n };\n });\n }, []);\n\n const handleCollapseToggle = useCallback(() => {\n const nextState = !isCollapsed;\n if (!isControlled) {\n setInternalCollapsed(nextState);\n }\n onCollapsedChange?.(nextState);\n }, [isCollapsed, isControlled, onCollapsedChange]);\n\n let headerContent: ReactNode | undefined;\n if (!isCollapsed) {\n headerContent = headerSlot ?? undefined;\n }\n\n const collapseButton = useMemo(() => {\n if (!showCollapseToggle) {\n return null;\n }\n\n let CollapseIcon = ChevronLeftIcon;\n let buttonLabel = t('navigation.sidebar.actions.collapseAriaLabel');\n if (isCollapsed) {\n CollapseIcon = ChevronRightIcon;\n buttonLabel = t('navigation.sidebar.actions.expandAriaLabel');\n }\n\n let collapseState: NonNullable<\n NonNullable<\n RecipeVariants<typeof styles.collapseButtonStateRecipe>\n >['state']\n > = 'expanded';\n if (isCollapsed) {\n collapseState = 'collapsed';\n }\n\n let collapseLabel: JSX.Element | null = null;\n if (!isCollapsed) {\n collapseLabel = (\n <span className={styles.collapseButtonLabel}>\n {t('navigation.sidebar.actions.collapse')}\n </span>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleCollapseToggle}\n className={cx(\n styles.collapseButton,\n styles.collapseButtonStateRecipe({ state: collapseState }),\n )}\n aria-label={buttonLabel}\n >\n <CollapseIcon size={20} />\n {collapseLabel}\n </button>\n );\n }, [handleCollapseToggle, isCollapsed, showCollapseToggle, t]);\n\n return (\n <SidebarContainer\n headerSlot={headerContent}\n footerSlot={collapseButton}\n isCollapsed={isCollapsed}\n showDefaultHeaderAction={false}\n >\n {items.map((item) => {\n const childItems = item.childItems ?? null;\n const hasChildren = childItems != null && childItems.length > 0;\n const storedExpanded = expandedState[item.key];\n let isExpanded = storedExpanded ?? item.defaultExpanded ?? false;\n const nextExpanded = !isExpanded;\n let childSectionId: string | undefined;\n const shouldRenderChildren = !isCollapsed && hasChildren;\n if (shouldRenderChildren) {\n childSectionId = `navigation-sidebar-${item.key}-children`;\n }\n\n if (hasChildren) {\n const hasActiveChild = childItems.some((child) => {\n return isPathActive(child.to);\n });\n\n if (hasActiveChild) {\n isExpanded = true;\n }\n }\n\n let trailingAction: SidebarItemTrailingAction | null = null;\n if (!isCollapsed && item.trailingAction != null) {\n trailingAction = item.trailingAction;\n }\n const showTrailingAction = trailingAction != null;\n const hasHoverIcon =\n item.hoverIcon !== undefined && item.hoverIcon !== null;\n const hasTrailingIcon =\n item.trailingIcon !== undefined && item.trailingIcon !== null;\n const hasTrailingHoverIcon =\n item.trailingHoverIcon !== undefined &&\n item.trailingHoverIcon !== null;\n const showTrailing =\n !isCollapsed &&\n !showTrailingAction &&\n (hasTrailingIcon || hasTrailingHoverIcon);\n\n let itemAriaLabel: string | undefined;\n if (isCollapsed) {\n itemAriaLabel = item.label;\n }\n\n let gapState: NonNullable<\n NonNullable<RecipeVariants<typeof styles.navGapRecipe>>['state']\n > = 'expanded';\n if (isCollapsed) {\n gapState = 'collapsed';\n }\n const gapClassName = styles.navGapRecipe({ state: gapState });\n\n let paddingClassName: string | undefined;\n if (showTrailingAction) {\n paddingClassName = styles.navWithTrailingAction;\n }\n\n let labelNode: JSX.Element | null = null;\n if (!isCollapsed) {\n labelNode = <span className={styles.label}>{item.label}</span>;\n }\n\n let hoverLayer: JSX.Element | null = null;\n if (hasHoverIcon) {\n hoverLayer = (\n <span className={styles.iconVisibleOnHover}>{item.hoverIcon}</span>\n );\n }\n\n const leadingIcon = (\n <span className={styles.iconWrapper}>\n <span\n className={cx(styles.iconBaseLayer, {\n [styles.iconHiddenOnHover]: hasHoverIcon,\n })}\n >\n {item.icon}\n </span>\n {hoverLayer}\n </span>\n );\n\n let trailingIcons: JSX.Element | null = null;\n if (showTrailing) {\n let trailingBaseLayer: JSX.Element | null = null;\n if (hasTrailingIcon) {\n trailingBaseLayer = (\n <span\n className={cx(styles.iconBaseLayer, {\n [styles.iconHiddenOnHover]: hasTrailingHoverIcon,\n })}\n >\n {item.trailingIcon}\n </span>\n );\n }\n\n let trailingHoverLayer: JSX.Element | null = null;\n if (hasTrailingHoverIcon) {\n trailingHoverLayer = (\n <span className={styles.iconVisibleOnHover}>\n {item.trailingHoverIcon}\n </span>\n );\n }\n\n trailingIcons = (\n <span className={styles.trailingIconWrapper}>\n {trailingBaseLayer}\n {trailingHoverLayer}\n </span>\n );\n }\n\n const commonContent = (\n <>\n {leadingIcon}\n {labelNode}\n {trailingIcons}\n </>\n );\n\n const handleClick = (): void => {\n if (!hasChildren || isCollapsed) {\n return;\n }\n handleToggle(item.key, nextExpanded);\n };\n\n let interactiveClassName: string;\n if (hasChildren) {\n interactiveClassName = cx(\n styles.navButton,\n gapClassName,\n paddingClassName,\n );\n } else {\n let navState: NonNullable<\n NonNullable<RecipeVariants<typeof styles.navLinkRecipe>>['state']\n > = 'default';\n if (isPathActive(item.to, item.exact)) {\n navState = 'active';\n }\n interactiveClassName = cx(\n styles.navLinkRecipe({ state: navState }),\n gapClassName,\n paddingClassName,\n );\n }\n\n let itemNode: JSX.Element;\n if (hasChildren) {\n itemNode = (\n <button\n type=\"button\"\n className={interactiveClassName}\n aria-expanded={isExpanded}\n aria-controls={childSectionId}\n aria-label={itemAriaLabel}\n onClick={handleClick}\n >\n {commonContent}\n </button>\n );\n } else {\n itemNode = (\n <Link\n to={item.to}\n className={interactiveClassName}\n exact={item.exact}\n aria-label={itemAriaLabel}\n >\n {commonContent}\n </Link>\n );\n }\n\n let trailingActionNode: JSX.Element | null = null;\n if (trailingAction != null) {\n const handleTrailingClick = (\n event: MouseEvent<HTMLButtonElement>,\n ): void => {\n event.preventDefault();\n event.stopPropagation();\n trailingAction.onClick();\n };\n\n const trailingHoverIcon = trailingAction.hoverIcon;\n const showTrailingHoverIcon =\n trailingHoverIcon !== undefined && trailingHoverIcon !== null;\n let trailingHoverContent: JSX.Element | null = null;\n if (showTrailingHoverIcon) {\n trailingHoverContent = (\n <span className={styles.trailingActionIconVisible}>\n {trailingHoverIcon}\n </span>\n );\n }\n\n trailingActionNode = (\n <button\n type=\"button\"\n aria-label={trailingAction.label}\n onClick={handleTrailingClick}\n className={styles.trailingActionButton}\n >\n <span className={styles.trailingActionIconWrapper}>\n <span className={styles.trailingActionIconHidden}>\n {trailingAction.icon}\n </span>\n {trailingHoverContent}\n </span>\n </button>\n );\n }\n\n let childList: JSX.Element | null = null;\n if (shouldRenderChildren && childSectionId != null) {\n childList = (\n <CollapsibleSection id={childSectionId} isExpanded={isExpanded}>\n {childItems.map((child) => {\n let leading: JSX.Element | null = null;\n if (child.icon != null) {\n leading = (\n <span className={styles.childIcon}>{child.icon}</span>\n );\n }\n\n let childState: NonNullable<\n NonNullable<\n RecipeVariants<typeof styles.childLinkRecipe>\n >['state']\n > = 'default';\n if (isPathActive(child.to)) {\n childState = 'active';\n }\n\n return (\n <div key={child.key} className={styles.collapsibleItem}>\n <Link\n to={child.to}\n className={styles.childLinkRecipe({ state: childState })}\n aria-label={child.label}\n >\n {leading}\n <span className={styles.childLabel}>{child.label}</span>\n </Link>\n </div>\n );\n })}\n </CollapsibleSection>\n );\n }\n\n return (\n <div key={item.key}>\n <div className={styles.itemWrapper}>\n {itemNode}\n {trailingActionNode}\n </div>\n {childList}\n </div>\n );\n })}\n </SidebarContainer>\n );\n};\n\nexport { NavigationSidebar };\nexport type {\n NavigationSidebarProps,\n SidebarChildItem,\n SidebarItem,\n SidebarItemTrailingAction,\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"NavigationSidebar.js","names":[],"sources":["../../../../../src/atomic/organisms/sidebar/NavigationSidebar.tsx"],"sourcesContent":["import {\n type JSX,\n type MouseEvent,\n type ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport useLocation from '@plumile/router/routing/useLocation.js';\nimport type { RecipeVariants } from '@vanilla-extract/recipes';\n\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\nimport { cx } from '../../../theme/tools.js';\nimport { ChevronLeftIcon, ChevronRightIcon } from './icons.js';\nimport * as styles from './navigationSidebar.css.js';\nimport { SidebarContainer } from './SidebarContainer.js';\n\ntype SidebarItemTrailingAction = {\n icon: ReactNode;\n hoverIcon?: ReactNode;\n label: string;\n onClick: () => void;\n};\n\ntype SidebarItem = {\n key: string;\n to: string;\n label: string;\n icon: ReactNode;\n exact?: boolean;\n hoverIcon?: ReactNode;\n trailingIcon?: ReactNode;\n trailingHoverIcon?: ReactNode;\n trailingAction?: SidebarItemTrailingAction;\n childItems?: SidebarChildItem[];\n defaultExpanded?: boolean;\n};\n\ntype SidebarChildItem = {\n key: string;\n to: string;\n label: string;\n icon?: ReactNode;\n};\n\ntype NavigationSidebarProps = {\n items: SidebarItem[];\n headerSlot?: ReactNode;\n isCollapsed?: boolean;\n onCollapsedChange?: (nextCollapsed: boolean) => void;\n showCollapseToggle?: boolean;\n};\n\nconst CollapsibleSection = ({\n id,\n isExpanded,\n children,\n}: {\n id: string;\n isExpanded: boolean;\n children: ReactNode;\n}): JSX.Element => {\n let collapsibleStateKey: NonNullable<\n NonNullable<RecipeVariants<typeof styles.collapsibleStateRecipe>>['state']\n > = 'collapsed';\n if (isExpanded) {\n collapsibleStateKey = 'expanded';\n }\n\n return (\n <div\n id={id}\n aria-hidden={!isExpanded}\n className={cx(\n styles.collapsibleSection,\n styles.collapsibleStateRecipe({ state: collapsibleStateKey }),\n )}\n >\n <div className={styles.collapsibleContent}>{children}</div>\n </div>\n );\n};\n\nconst NavigationSidebar = ({\n items,\n headerSlot,\n isCollapsed: isCollapsedProp,\n onCollapsedChange,\n showCollapseToggle = true,\n}: NavigationSidebarProps): JSX.Element => {\n const { t } = useUiTranslation();\n const [internalCollapsed, setInternalCollapsed] = useState(false);\n const [expandedState, setExpandedState] = useState<Record<string, boolean>>(\n {},\n );\n const isControlled = isCollapsedProp != null;\n const isCollapsed = isCollapsedProp ?? internalCollapsed;\n const { pathname } = useLocation();\n\n const isPathActive = (target: string, exact?: boolean): boolean => {\n if (exact === true) {\n return pathname === target;\n }\n if (pathname === target) {\n return true;\n }\n return pathname.startsWith(`${target}/`);\n };\n\n const handleToggle = useCallback((key: string, nextState: boolean) => {\n setExpandedState((prev) => {\n return {\n ...prev,\n [key]: nextState,\n };\n });\n }, []);\n\n const handleCollapseToggle = useCallback(() => {\n const nextState = !isCollapsed;\n if (!isControlled) {\n setInternalCollapsed(nextState);\n }\n onCollapsedChange?.(nextState);\n }, [isCollapsed, isControlled, onCollapsedChange]);\n\n let headerContent: ReactNode | undefined;\n if (!isCollapsed) {\n headerContent = headerSlot ?? undefined;\n }\n\n const collapseButton = useMemo(() => {\n if (!showCollapseToggle) {\n return null;\n }\n\n let CollapseIcon = ChevronLeftIcon;\n let buttonLabel = t('navigation.sidebar.actions.collapseAriaLabel');\n if (isCollapsed) {\n CollapseIcon = ChevronRightIcon;\n buttonLabel = t('navigation.sidebar.actions.expandAriaLabel');\n }\n\n let collapseState: NonNullable<\n NonNullable<\n RecipeVariants<typeof styles.collapseButtonStateRecipe>\n >['state']\n > = 'expanded';\n if (isCollapsed) {\n collapseState = 'collapsed';\n }\n\n let collapseLabel: JSX.Element | null = null;\n if (!isCollapsed) {\n collapseLabel = (\n <span className={styles.collapseButtonLabel}>\n {t('navigation.sidebar.actions.collapse')}\n </span>\n );\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleCollapseToggle}\n className={cx(\n styles.collapseButton,\n styles.collapseButtonStateRecipe({ state: collapseState }),\n )}\n aria-label={buttonLabel}\n >\n <CollapseIcon size={20} />\n {collapseLabel}\n </button>\n );\n }, [handleCollapseToggle, isCollapsed, showCollapseToggle, t]);\n\n return (\n <SidebarContainer\n headerSlot={headerContent}\n footerSlot={collapseButton}\n isCollapsed={isCollapsed}\n showDefaultHeaderAction={false}\n >\n {items.map((item) => {\n const childItems = item.childItems ?? null;\n const hasChildren = childItems != null && childItems.length > 0;\n const storedExpanded = expandedState[item.key];\n let isExpanded = storedExpanded ?? item.defaultExpanded ?? false;\n const nextExpanded = !isExpanded;\n let childSectionId: string | undefined;\n const shouldRenderChildren = !isCollapsed && hasChildren;\n if (shouldRenderChildren) {\n childSectionId = `navigation-sidebar-${item.key}-children`;\n }\n\n if (hasChildren) {\n const hasActiveChild = childItems.some((child) => {\n return isPathActive(child.to);\n });\n\n if (hasActiveChild) {\n isExpanded = true;\n }\n }\n\n let trailingAction: SidebarItemTrailingAction | null = null;\n if (!isCollapsed && item.trailingAction != null) {\n trailingAction = item.trailingAction;\n }\n const showTrailingAction = trailingAction != null;\n const hasHoverIcon =\n item.hoverIcon !== undefined && item.hoverIcon !== null;\n const hasTrailingIcon =\n item.trailingIcon !== undefined && item.trailingIcon !== null;\n const hasTrailingHoverIcon =\n item.trailingHoverIcon !== undefined &&\n item.trailingHoverIcon !== null;\n const showTrailing =\n !isCollapsed &&\n !showTrailingAction &&\n (hasTrailingIcon || hasTrailingHoverIcon);\n\n let itemAriaLabel: string | undefined;\n if (isCollapsed) {\n itemAriaLabel = item.label;\n }\n\n let gapState: NonNullable<\n NonNullable<RecipeVariants<typeof styles.navGapRecipe>>['state']\n > = 'expanded';\n if (isCollapsed) {\n gapState = 'collapsed';\n }\n const gapClassName = styles.navGapRecipe({ state: gapState });\n\n let paddingClassName: string | undefined;\n if (showTrailingAction) {\n paddingClassName = styles.navWithTrailingAction;\n }\n\n let labelNode: JSX.Element | null = null;\n if (!isCollapsed) {\n labelNode = <span className={styles.label}>{item.label}</span>;\n }\n\n let hoverLayer: JSX.Element | null = null;\n if (hasHoverIcon) {\n hoverLayer = (\n <span className={styles.iconVisibleOnHover}>{item.hoverIcon}</span>\n );\n }\n\n const leadingIcon = (\n <span className={styles.iconWrapper}>\n <span\n className={cx(styles.iconBaseLayer, {\n [styles.iconHiddenOnHover]: hasHoverIcon,\n })}\n >\n {item.icon}\n </span>\n {hoverLayer}\n </span>\n );\n\n let trailingIcons: JSX.Element | null = null;\n if (showTrailing) {\n let trailingBaseLayer: JSX.Element | null = null;\n if (hasTrailingIcon) {\n trailingBaseLayer = (\n <span\n className={cx(styles.iconBaseLayer, {\n [styles.iconHiddenOnHover]: hasTrailingHoverIcon,\n })}\n >\n {item.trailingIcon}\n </span>\n );\n }\n\n let trailingHoverLayer: JSX.Element | null = null;\n if (hasTrailingHoverIcon) {\n trailingHoverLayer = (\n <span className={styles.iconVisibleOnHover}>\n {item.trailingHoverIcon}\n </span>\n );\n }\n\n trailingIcons = (\n <span className={styles.trailingIconWrapper}>\n {trailingBaseLayer}\n {trailingHoverLayer}\n </span>\n );\n }\n\n const commonContent = (\n <>\n {leadingIcon}\n {labelNode}\n {trailingIcons}\n </>\n );\n\n const handleClick = (): void => {\n if (!hasChildren || isCollapsed) {\n return;\n }\n handleToggle(item.key, nextExpanded);\n };\n\n let interactiveClassName: string;\n if (hasChildren) {\n interactiveClassName = cx(\n styles.navButton,\n gapClassName,\n paddingClassName,\n );\n } else {\n let navState: NonNullable<\n NonNullable<RecipeVariants<typeof styles.navLinkRecipe>>['state']\n > = 'default';\n if (isPathActive(item.to, item.exact)) {\n navState = 'active';\n }\n interactiveClassName = cx(\n styles.navLinkRecipe({ state: navState }),\n gapClassName,\n paddingClassName,\n );\n }\n\n let itemNode: JSX.Element;\n if (hasChildren) {\n itemNode = (\n <button\n type=\"button\"\n className={interactiveClassName}\n aria-expanded={isExpanded}\n aria-controls={childSectionId}\n aria-label={itemAriaLabel}\n onClick={handleClick}\n >\n {commonContent}\n </button>\n );\n } else {\n itemNode = (\n <Link\n to={item.to}\n className={interactiveClassName}\n exact={item.exact}\n aria-label={itemAriaLabel}\n >\n {commonContent}\n </Link>\n );\n }\n\n let trailingActionNode: JSX.Element | null = null;\n if (trailingAction != null) {\n const handleTrailingClick = (\n event: MouseEvent<HTMLButtonElement>,\n ): void => {\n event.preventDefault();\n event.stopPropagation();\n trailingAction.onClick();\n };\n\n const trailingHoverIcon = trailingAction.hoverIcon;\n const showTrailingHoverIcon =\n trailingHoverIcon !== undefined && trailingHoverIcon !== null;\n let trailingHoverContent: JSX.Element | null = null;\n if (showTrailingHoverIcon) {\n trailingHoverContent = (\n <span className={styles.trailingActionIconVisible}>\n {trailingHoverIcon}\n </span>\n );\n }\n\n trailingActionNode = (\n <button\n type=\"button\"\n aria-label={trailingAction.label}\n onClick={handleTrailingClick}\n className={styles.trailingActionButton}\n >\n <span className={styles.trailingActionIconWrapper}>\n <span className={styles.trailingActionIconHidden}>\n {trailingAction.icon}\n </span>\n {trailingHoverContent}\n </span>\n </button>\n );\n }\n\n let childList: JSX.Element | null = null;\n if (shouldRenderChildren && childSectionId != null) {\n childList = (\n <CollapsibleSection id={childSectionId} isExpanded={isExpanded}>\n {childItems.map((child) => {\n let leading: JSX.Element | null = null;\n if (child.icon != null) {\n leading = (\n <span className={styles.childIcon}>{child.icon}</span>\n );\n }\n\n let childState: NonNullable<\n NonNullable<\n RecipeVariants<typeof styles.childLinkRecipe>\n >['state']\n > = 'default';\n if (isPathActive(child.to)) {\n childState = 'active';\n }\n\n return (\n <div key={child.key} className={styles.collapsibleItem}>\n <Link\n to={child.to}\n className={styles.childLinkRecipe({ state: childState })}\n aria-label={child.label}\n >\n {leading}\n <span className={styles.childLabel}>{child.label}</span>\n </Link>\n </div>\n );\n })}\n </CollapsibleSection>\n );\n }\n\n return (\n <div key={item.key}>\n <div className={styles.itemWrapper}>\n {itemNode}\n {trailingActionNode}\n </div>\n {childList}\n </div>\n );\n })}\n </SidebarContainer>\n );\n};\n\nexport { NavigationSidebar };\nexport type {\n NavigationSidebarProps,\n SidebarChildItem,\n SidebarItem,\n SidebarItemTrailingAction,\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../../../src/backoffice/atoms/status_badge/StatusBadge.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\n\nimport { Badge } from '../../../atomic/atoms/badge/Badge.js';\n\nimport * as styles from './statusBadge.css.js';\n\nexport type StatusTone =\n | 'active'\n | 'disabled'\n | 'pending'\n | 'error'\n | 'warning'\n | 'info';\n\nexport type StatusBadgeProps = {\n tone: StatusTone;\n children: ReactNode;\n showDot?: boolean;\n className?: string;\n loading?: boolean;\n};\n\
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../../../src/backoffice/atoms/status_badge/StatusBadge.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\n\nimport { Badge, type BadgeTone } from '../../../atomic/atoms/badge/Badge.js';\n\nimport * as styles from './statusBadge.css.js';\n\nexport type StatusTone =\n | 'active'\n | 'disabled'\n | 'pending'\n | 'error'\n | 'warning'\n | 'info';\n\nexport type StatusBadgeProps = {\n tone: StatusTone;\n children: ReactNode;\n showDot?: boolean;\n className?: string;\n loading?: boolean;\n};\n\nconst toneMap: Record<StatusTone, BadgeTone> = {\n active: 'success',\n disabled: 'neutral',\n pending: 'info',\n error: 'danger',\n warning: 'warning',\n info: 'info',\n};\n\nexport const StatusBadge = ({\n tone,\n children,\n showDot = false,\n className,\n loading,\n}: StatusBadgeProps): JSX.Element => {\n const badgeTone = toneMap[tone];\n\n let dotNode: JSX.Element | null = null;\n if (showDot) {\n dotNode = <span className={styles.dot} aria-hidden=\"true\" />;\n }\n\n return (\n <Badge tone={badgeTone} className={className} loading={loading}>\n <span className={styles.content}>\n {dotNode}\n {children}\n </span>\n </Badge>\n );\n};\n\nexport default StatusBadge;\n"],"mappings":";;;;AAsBA,IAAM,IAAyC;CAC7C,QAAQ;CACR,UAAU;CACV,SAAS;CACT,OAAO;CACP,SAAS;CACT,MAAM;CACP,EAEY,KAAe,EAC1B,SACA,aACA,aAAU,IACV,cACA,iBACmC;CACnC,IAAM,IAAY,EAAQ,IAEtB,IAA8B;CAKlC,OAJI,MACF,IAAU,kBAAC,QAAD;EAAM,WAAW;EAAY,eAAY;EAAS,CAAA,GAI5D,kBAAC,GAAD;EAAO,MAAM;EAAsB;EAAoB;YACrD,kBAAC,QAAD;GAAM,WAAW;aAAjB,CACG,GACA,EACI;;EACD,CAAA"}
|