@plumile/ui 0.1.117 → 0.1.122
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 +14 -0
- package/lib/esm/admin/organisms/admin_sidebar/AdminSidebar.js +3 -2
- package/lib/esm/admin/organisms/admin_sidebar/AdminSidebar.js.map +1 -1
- package/lib/esm/admin/organisms/admin_sidebar/adminSidebar.css.js +3 -2
- package/lib/esm/admin/organisms/admin_topbar/adminTopbar.css.js +1 -1
- package/lib/esm/admin/theme/adminDensity.css.js.map +1 -1
- package/lib/esm/admin/theme/adminSurface.css.js.map +1 -1
- package/lib/esm/atomic/atoms/badge/badge.css.js +7 -7
- package/lib/esm/atomic/atoms/badge/badge.css.js.map +1 -1
- package/lib/esm/atomic/atoms/button/button.css.js +38 -38
- package/lib/esm/atomic/atoms/button/button.css.js.map +1 -1
- package/lib/esm/atomic/atoms/checkbox/checkbox.css.js +8 -8
- package/lib/esm/atomic/atoms/checkbox/checkbox.css.js.map +1 -1
- package/lib/esm/atomic/atoms/error_message/errorMessage.css.js +1 -1
- package/lib/esm/atomic/atoms/input/input.css.js +9 -9
- package/lib/esm/atomic/atoms/input/input.css.js.map +1 -1
- package/lib/esm/atomic/atoms/label/label.css.js +7 -7
- package/lib/esm/atomic/atoms/modal/Modal.js +1 -1
- package/lib/esm/atomic/atoms/modal/modal.css.js +1 -1
- package/lib/esm/atomic/atoms/modal/modal.css.js.map +1 -1
- package/lib/esm/atomic/atoms/overlay/overlay.css.js +1 -1
- package/lib/esm/atomic/atoms/textarea/textarea.css.js +8 -8
- package/lib/esm/atomic/atoms/textarea/textarea.css.js.map +1 -1
- package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.js +1 -1
- package/lib/esm/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.js +1 -1
- package/lib/esm/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.js.map +1 -1
- package/lib/esm/atomic/molecules/card/Card.css.js +1 -1
- package/lib/esm/atomic/molecules/checkbox_field/checkboxField.css.js +1 -1
- package/lib/esm/atomic/molecules/checkbox_field/checkboxField.css.js.map +1 -1
- package/lib/esm/atomic/molecules/dropdown/dropdown.css.js +1 -1
- package/lib/esm/atomic/molecules/empty-state/EmptyState.css.js +1 -1
- package/lib/esm/atomic/molecules/form/FormErrorBanner.css.js +1 -1
- package/lib/esm/atomic/molecules/form/formStyles.css.js +1 -1
- package/lib/esm/atomic/molecules/form_error/formError.css.js +1 -1
- package/lib/esm/atomic/molecules/form_field/formField.css.js +1 -1
- package/lib/esm/atomic/molecules/highlight/HighlightCode.css.js +1 -1
- package/lib/esm/atomic/molecules/highlight/highlightStyles.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/LazyMarkdownRenderer.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownBlockquote.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownCodeCopyButton.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownCodeCopyButton.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownDelete.css.js +1 -2
- package/lib/esm/atomic/molecules/markdown/components/MarkdownDelete.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownEmphasis.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownFootnoteDefinition.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownFootnoteReference.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownFootnoteReference.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownFootnotesSection.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownHeading.css.js +7 -7
- package/lib/esm/atomic/molecules/markdown/components/MarkdownHeading.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownHtmlFallback.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownImage.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownInlineCode.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownInlineCode.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownList.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownList.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownListItem.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownListItem.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownMark.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownMark.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownMermaidBlock.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownParagraph.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownParagraph.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownStrong.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownStrong.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownSubscript.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownSubscript.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownSuperscript.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownSuperscript.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTable.css.js +2 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTable.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCaption.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableHead.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableHeaderCell.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTaskListItem.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTaskListItem.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownText.css.js +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownText.css.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownThematicBreak.css.js +1 -1
- package/lib/esm/atomic/molecules/tabs/tabs.css.js +4 -4
- package/lib/esm/atomic/molecules/toast/toast.css.js +2 -2
- package/lib/esm/atomic/molecules/toast/toast.css.js.map +1 -1
- package/lib/esm/atomic/organisms/login_form/loginForm.css.js +1 -1
- package/lib/esm/atomic/organisms/sidebar/SidebarContainer.js +2 -2
- package/lib/esm/atomic/organisms/sidebar/navigationSidebar.css.js +13 -13
- package/lib/esm/atomic/organisms/sidebar/sidebar.css.js +2 -2
- package/lib/esm/atomic/templates/auth_layout/authLayout.css.js +1 -1
- package/lib/esm/atomic/templates/detail-page/DetailPage.js +4 -4
- package/lib/esm/atomic/templates/detail-page/detailPage.css.js +1 -1
- package/lib/esm/atomic/templates/page-container/PageContainer.js +3 -3
- package/lib/esm/atomic/templates/page-container/pageContainer.css.js +1 -1
- package/lib/esm/backoffice/atoms/backoffice_id_badge/backofficeIdBadge.css.js +1 -1
- package/lib/esm/backoffice/atoms/copyable_text/copyableText.css.js +1 -1
- package/lib/esm/backoffice/atoms/environment_badge/environmentBadge.css.js +1 -1
- package/lib/esm/backoffice/atoms/shortcut_hint/shortcutHint.css.js +1 -1
- package/lib/esm/backoffice/atoms/skeleton/skeleton.css.js +5 -5
- package/lib/esm/backoffice/atoms/skeleton/skeleton.css.js.map +1 -1
- package/lib/esm/backoffice/atoms/spinner/spinner.css.js +1 -1
- package/lib/esm/backoffice/atoms/spinner/spinner.css.js.map +1 -1
- package/lib/esm/backoffice/atoms/status_badge/statusBadge.css.js +1 -1
- package/lib/esm/backoffice/atoms/tag/tag.css.js +7 -7
- package/lib/esm/backoffice/atoms/tag/tag.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_empty_state/backofficeEmptyState.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_filter_drawer/BackofficeFilterDrawer.js +7 -7
- package/lib/esm/backoffice/molecules/backoffice_filter_drawer/backofficeFilterDrawer.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_filter_drawer/backofficeFilterDrawer.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_filter_field/backofficeFilterField.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_filters_bar/backofficeFiltersBar.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_form_section/BackofficeFormSection.js +3 -3
- package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/BackofficeInfiniteListStatus.js +2 -2
- package/lib/esm/backoffice/molecules/backoffice_infinite_list_status/backofficeInfiniteListStatus.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_json_viewer/backofficeJsonViewer.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_key_value_list/backofficeKeyValueList.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js +4 -4
- package/lib/esm/backoffice/molecules/backoffice_page_header/backofficePageHeader.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js +4 -4
- package/lib/esm/backoffice/molecules/backoffice_relations_menu/backofficeRelationsMenu.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_relations_menu/backofficeRelationsMenu.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_table_skeleton/backofficeTableSkeleton.css.js +4 -4
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js +8 -8
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js +1 -1
- package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/backoffice_tabs/backofficeTabs.css.js +8 -8
- package/lib/esm/backoffice/molecules/backoffice_tabs/backofficeTabs.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/bulk_actions_bar/bulkActionsBar.css.js +1 -1
- package/lib/esm/backoffice/molecules/confirm_dialog/confirmDialog.css.js +1 -1
- package/lib/esm/backoffice/molecules/filter_chip_row/filterChipRow.css.js +1 -1
- package/lib/esm/backoffice/molecules/filter_chip_row/filterChipRow.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/global_search_input/globalSearchInput.css.js +1 -1
- package/lib/esm/backoffice/molecules/global_search_input/globalSearchInput.css.js.map +1 -1
- package/lib/esm/backoffice/molecules/inline_banner/inlineBanner.css.js +6 -6
- package/lib/esm/backoffice/molecules/inline_banner/inlineBanner.css.js.map +1 -1
- 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 +90 -94
- 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 +159 -62
- 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 +4 -4
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.js.map +1 -1
- package/lib/esm/backoffice/molecules/sidebar_profile_menu/sidebarProfileMenu.css.js +5 -5
- package/lib/esm/backoffice/molecules/table_toolbar/tableToolbar.css.js +1 -1
- package/lib/esm/backoffice/organisms/audit_timeline/auditTimeline.css.js +1 -1
- package/lib/esm/backoffice/organisms/backoffice_data_table/backofficeDataTable.css.js +1 -1
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/backofficeVirtualizedConnectionTable.css.js +1 -1
- package/lib/esm/backoffice/organisms/entity_header/entityHeader.css.js +1 -1
- package/lib/esm/backoffice/templates/detail_page_template/DetailPageTemplate.js +2 -2
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js +2 -2
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js.map +1 -1
- package/lib/esm/backoffice/templates/list_page_template/ListPageTemplate.js +1 -1
- package/lib/esm/backoffice/templates/list_page_template/ListPageTemplate.js.map +1 -1
- package/lib/esm/backoffice/templates/list_page_template/listPageTemplate.css.js +10 -10
- package/lib/esm/backoffice/templates/list_page_template/listPageTemplate.css.js.map +1 -1
- package/lib/esm/components/agent/AgentMarkdownCard.css.js +1 -1
- package/lib/esm/components/charts/metricHistoryChart.css.js +1 -1
- package/lib/esm/components/charts/timeSeriesLineChart.css.js +1 -1
- package/lib/esm/components/dashboard/activity_card/ActivityCard.css.js +1 -1
- package/lib/esm/components/dashboard/activity_card/ActivityCard.js +2 -2
- package/lib/esm/components/dashboard/activity_feed/ActivityFeed.css.js +1 -1
- package/lib/esm/components/dashboard/dashboard_grid/DashboardGrid.css.js +21 -21
- package/lib/esm/components/dashboard/dashboard_grid/DashboardGrid.css.js.map +1 -1
- package/lib/esm/components/dashboard/metadata_strip/MetadataStrip.css.js +1 -1
- package/lib/esm/components/dashboard/metric_card/MetricCard.css.js +1 -1
- package/lib/esm/components/dashboard/metric_card/MetricCard.js +2 -2
- package/lib/esm/components/dashboard/metric_tile_group/MetricTileGroup.css.js +1 -1
- package/lib/esm/components/dashboard/page_hero/PageHero.css.js +1 -1
- package/lib/esm/components/dashboard/page_hero/PageHero.js +3 -3
- package/lib/esm/components/dashboard/section_nav/SectionNav.css.js +1 -1
- package/lib/esm/components/dashboard/section_nav/SectionNav.css.js.map +1 -1
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.css.js +1 -1
- package/lib/esm/components/dashboard/segmented_nav/SegmentedNav.css.js.map +1 -1
- package/lib/esm/components/dashboard/selectable_card/SelectableCard.css.js +1 -1
- package/lib/esm/components/dashboard/selectable_card/SelectableCard.css.js.map +1 -1
- package/lib/esm/components/dashboard/selectable_card/SelectableCard.js +2 -2
- package/lib/esm/components/dashboard/status_summary_panel/StatusSummaryPanel.css.js +1 -1
- package/lib/esm/components/dashboard/status_summary_panel/StatusSummaryPanel.js +1 -1
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.css.js +1 -1
- package/lib/esm/components/dashboard/timeline_event_row/TimelineEventRow.js +2 -2
- package/lib/esm/components/data-table/DataTable.css.js +28 -28
- package/lib/esm/components/data-table/DataTable.css.js.map +1 -1
- package/lib/esm/components/data-table/ResponsiveRecordList.css.js +6 -6
- package/lib/esm/components/data-table/TableCell.css.js +2 -2
- package/lib/esm/components/data-table/VirtualizedConnectionTable.css.js +1 -1
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js +1 -1
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js.map +1 -1
- package/lib/esm/components/feedback/OperationFeedback.css.js +1 -1
- package/lib/esm/components/feedback/OperationFeedback.js +1 -1
- package/lib/esm/components/infinite/InfiniteScrollTrigger.js +1 -1
- package/lib/esm/components/infinite/infiniteScrollTrigger.css.js +1 -1
- package/lib/esm/components/layout/ActionPanel.css.js +1 -1
- package/lib/esm/components/layout/ActionPanel.js +3 -3
- package/lib/esm/components/layout/ActionPanel.js.map +1 -1
- package/lib/esm/components/layout/AppHeader.css.js +1 -1
- package/lib/esm/components/layout/AppHeader.js +4 -4
- package/lib/esm/components/layout/ContentLayout.css.js +1 -1
- package/lib/esm/components/layout/ContentLayout.js +2 -2
- package/lib/esm/components/layout/DetailSummaryHeader.css.js +1 -1
- package/lib/esm/components/layout/DetailSummaryHeader.js +3 -3
- package/lib/esm/components/layout/PageShell.css.js +4 -4
- package/lib/esm/components/layout/PageShell.js +5 -5
- package/lib/esm/components/layout/PageShell.js.map +1 -1
- package/lib/esm/components/layout/SettingsLayout.css.js +1 -1
- package/lib/esm/components/layout/SplitViewLayout.css.js +1 -1
- package/lib/esm/components/layout/TabsContentLayout.css.js +1 -1
- package/lib/esm/components/layout/ToolbarRow.css.js +1 -1
- package/lib/esm/components/media/imagePreviewModal.css.js +5 -5
- package/lib/esm/components/responsive/ResponsiveCollectionRenderer.css.js +1 -1
- package/lib/esm/components/responsive/ResponsiveCollectionRenderer.css.js.map +1 -1
- package/lib/esm/components/routing/routeFallback.css.js +1 -1
- package/lib/esm/components/routing/routeFallback.css.js.map +1 -1
- package/lib/esm/components/routing/routePendingBar.css.js +1 -1
- package/lib/esm/components/routing/routePendingBar.css.js.map +1 -1
- package/lib/esm/components/select/SimpleSelect.css.js +14 -14
- package/lib/esm/components/select/SimpleSelect.css.js.map +1 -1
- package/lib/esm/components/subscriptions/RefetchNeededBanner.css.js +1 -1
- package/lib/esm/components/tile/InfoTile.css.js +1 -1
- package/lib/esm/components/tile/InfoTile.css.js.map +1 -1
- package/lib/esm/components/tile/InfoTile.js +3 -3
- package/lib/esm/i18n/locales/en/ui.js +12 -6
- package/lib/esm/i18n/locales/en/ui.js.map +1 -1
- package/lib/esm/i18n/locales/fr/ui.js +12 -6
- package/lib/esm/i18n/locales/fr/ui.js.map +1 -1
- package/lib/esm/index.js +257 -255
- package/lib/esm/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +46 -0
- package/lib/esm/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
- package/lib/esm/node_modules/@dnd-kit/core/dist/core.esm.js +1966 -0
- package/lib/esm/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
- package/lib/esm/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +348 -0
- package/lib/esm/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
- package/lib/esm/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +157 -0
- package/lib/esm/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
- package/lib/esm/shared/backofficeTableDensity.css.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/esm/theme/accessibility.css.js +1 -1
- package/lib/esm/theme/accessibility.css.js.map +1 -1
- package/lib/esm/theme/index.js +12 -10
- package/lib/esm/theme/sprinkles.css.js +73323 -51658
- package/lib/esm/theme/sprinkles.css.js.map +1 -1
- package/lib/esm/theme/styleRecipes.css.js +19 -0
- package/lib/esm/theme/styleRecipes.css.js.map +1 -0
- package/lib/esm/theme/theme-dark.css.js.map +1 -1
- package/lib/esm/theme/theme-light.css.js +23 -2
- package/lib/esm/theme/theme-light.css.js.map +1 -1
- package/lib/esm/theme/theme.css.js +23 -2
- package/lib/esm/theme/themeContract.js +23 -2
- package/lib/esm/theme/themeContract.js.map +1 -1
- package/lib/types/admin/organisms/admin_sidebar/AdminSidebar.d.ts +2 -1
- package/lib/types/admin/organisms/admin_sidebar/AdminSidebar.d.ts.map +1 -1
- package/lib/types/atomic/atoms/button/button.css.d.ts.map +1 -1
- package/lib/types/atomic/atoms/checkbox/checkbox.css.d.ts.map +1 -1
- package/lib/types/atomic/atoms/input/input.css.d.ts.map +1 -1
- package/lib/types/atomic/atoms/modal/modal.css.d.ts.map +1 -1
- package/lib/types/atomic/atoms/textarea/textarea.css.d.ts.map +1 -1
- package/lib/types/atomic/molecules/markdown/components/MarkdownCodeCopyButton.css.d.ts.map +1 -1
- package/lib/types/atomic/molecules/toast/toast.css.d.ts.map +1 -1
- package/lib/types/backoffice/atoms/tag/tag.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_filter_drawer/backofficeFilterDrawer.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_load_more/backofficeLoadMore.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_relations_menu/backofficeRelationsMenu.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/backoffice_tabs/backofficeTabs.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/filter_chip_row/filterChipRow.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/global_search_input/globalSearchInput.css.d.ts.map +1 -1
- package/lib/types/backoffice/molecules/inline_banner/inlineBanner.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 +4 -7
- 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 +6 -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 +6 -0
- package/lib/types/backoffice/molecules/sidebar_nav_section/sidebarNavSection.css.d.ts.map +1 -1
- package/lib/types/backoffice/templates/detail_page_template/detailPageTemplate.css.d.ts.map +1 -1
- package/lib/types/backoffice/templates/list_page_template/listPageTemplate.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/dashboard_grid/DashboardGrid.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/section_nav/SectionNav.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/segmented_nav/SegmentedNav.css.d.ts.map +1 -1
- package/lib/types/components/dashboard/selectable_card/SelectableCard.css.d.ts.map +1 -1
- package/lib/types/components/select/SimpleSelect.css.d.ts.map +1 -1
- package/lib/types/components/tile/InfoTile.css.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +8 -0
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/shared/backofficeTableDensity.css.d.ts.map +1 -1
- package/lib/types/theme/index.d.ts +2 -0
- package/lib/types/theme/index.d.ts.map +1 -1
- package/lib/types/theme/sprinkles.css.d.ts +684 -60
- package/lib/types/theme/sprinkles.css.d.ts.map +1 -1
- package/lib/types/theme/styleRecipes.css.d.ts +29 -0
- package/lib/types/theme/styleRecipes.css.d.ts.map +1 -0
- package/lib/types/theme/theme-dark.css.d.ts.map +1 -1
- package/lib/types/theme/theme-light.css.d.ts +21 -0
- package/lib/types/theme/theme-light.css.d.ts.map +1 -1
- package/lib/types/theme/themeContract.d.ts +21 -0
- package/lib/types/theme/themeContract.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/i18n/locales/en/ui.json +4 -0
- package/src/i18n/locales/fr/ui.json +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inlineBanner.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/inline_banner/inlineBanner.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 {
|
|
1
|
+
{"version":3,"file":"inlineBanner.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/inline_banner/inlineBanner.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 { ghostIconButton } from '../../../theme/styleRecipes.css.js';\n\nexport const container = sprinkles({\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n flexWrap: 'wrap',\n gap: 3,\n paddingX: 4,\n paddingY: 3,\n borderRadius: 'md',\n fontSize: 'sm',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'border',\n});\n\nconst toneInfo = sprinkles({\n backgroundColor: 'brandLightGray',\n color: 'text',\n});\nconst toneSuccess = sprinkles({\n backgroundColor: 'green-50',\n color: 'green-800',\n});\nconst toneWarning = sprinkles({\n backgroundColor: 'amber-50',\n color: 'amber-900',\n});\nconst toneDanger = sprinkles({\n backgroundColor: 'red-50',\n color: 'red-800',\n});\n\nexport const toneRecipe = recipe({\n variants: {\n tone: {\n info: toneInfo,\n success: toneSuccess,\n warning: toneWarning,\n danger: toneDanger,\n },\n },\n defaultVariants: {\n tone: 'info',\n },\n});\n\nexport type ToneRecipeVariants = RecipeVariants<typeof toneRecipe>;\n\nexport const content = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n flex: 1,\n minWidth: 0,\n});\n\nexport const title = sprinkles({\n fontWeight: 'semibold',\n});\n\nexport const description = sprinkles({});\n\nexport const actions = sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n gap: 2,\n flexWrap: 'wrap',\n flexShrink: 0,\n});\n\nexport const closeButton = style([\n ghostIconButton,\n sprinkles({\n width: 8,\n height: 8,\n color: 'inherit',\n }),\n]);\n"],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.ts
|
|
4
|
-
var e = "
|
|
4
|
+
var e = "_1x7c0k51 qbwcuej qbwcueh txvbqbdsb txvbqbey txvbqbjtp txvbqb1g5 txvbqb2e3 txvbqb2g9 txvbqb1933 txvbqb19cb txvbqbv txvbqbux3 txvbqb7h txvbqb76 txvbqb7t qbwcuei txvbqb1aey txvbqb1bsa qbwcue4 txvbqb1c2w txvbqb1c9c qbwcue0 txvbqb1cb0 txvbqb1cws _1x7c0k50 txvbqbyoi txvbqbzm3 txvbqb10jb txvbqbvve txvbqbff6 txvbqb9j", t = "_1x7c0k52 txvbqbyo5 txvbqbzlq txvbqbjtp", n = "_1x7c0k53 txvbqbdsb txvbqbey txvbqbjtp txvbqb17hx txvbqbhnc", r = "_1x7c0k54 txvbqbdxd", i = "_1x7c0k55 txvbqbdq5";
|
|
5
5
|
//#endregion
|
|
6
6
|
export { e as button, t as buttonCollapsed, n as icon, r as label, i as labelCollapsed };
|
|
7
7
|
|
package/lib/esm/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebarCollapseToggle.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\
|
|
1
|
+
{"version":3,"file":"sidebarCollapseToggle.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_collapse_toggle/sidebarCollapseToggle.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles } from '../../../theme/sprinkles.css.js';\nimport { ghostIconButton } from '../../../theme/styleRecipes.css.js';\n\nexport const button = style([\n ghostIconButton,\n sprinkles({\n gap: 2,\n paddingX: 3,\n paddingY: 2,\n fontSize: 'sm',\n }),\n]);\n\nexport const buttonCollapsed = sprinkles({\n justifyContent: 'center',\n paddingX: 2,\n});\n\nexport const icon = sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 6,\n});\n\nexport const label = sprinkles({ flex: 1 });\n\nexport const labelCollapsed = sprinkles({\n display: 'none',\n});\n"],"mappings":""}
|
|
@@ -1,123 +1,119 @@
|
|
|
1
1
|
import { cx as e } from "../../../theme/tools.js";
|
|
2
|
-
import { actionSlot as t, actions as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import
|
|
2
|
+
import { actionSlot as t, actions as ee, actionsVisible as te, badge as ne, badgeCollapsed as n, dragHandle as r, icon as i, iconNested as a, item as o, itemActive as s, itemCollapsed as re, itemDisabled as ie, itemDragging as ae, itemNested as oe, label as se, labelCollapsed as ce, link as c } from "./sidebarNavItem.css.js";
|
|
3
|
+
import { useCallback as le, useEffect as ue, useRef as l, useState as u } from "react";
|
|
4
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
|
+
import m from "@plumile/router/routing/Link.js";
|
|
6
6
|
//#region src/backoffice/molecules/sidebar_nav_item/SidebarNavItem.tsx
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
className: e(i, { [
|
|
19
|
-
children:
|
|
7
|
+
var h = m, g = ({ label: m, href: g, icon: _, badge: v, isActive: y = !1, disabled: b = !1, onClick: de, collapsed: x = !1, nested: S = !1, ariaLabel: fe, className: C, actionSlot: w, dragHandleSlot: T, dragHandleLabel: E, dragHandleProps: D, isDragging: O = !1 }) => {
|
|
8
|
+
let k = l(null), A = l(null), [j, M] = u(!1), [N, P] = u(!1), F = [o];
|
|
9
|
+
x && F.push(re), S && !x && F.push(oe), y && F.push(s), b && F.push(ie), O && F.push(ae), C != null && F.push(C);
|
|
10
|
+
let I = e(...F), L = fe;
|
|
11
|
+
L == null && typeof m == "string" && (L = m);
|
|
12
|
+
let R, z;
|
|
13
|
+
x && (R = L, z = L);
|
|
14
|
+
let B;
|
|
15
|
+
y && (B = "page");
|
|
16
|
+
let V = null;
|
|
17
|
+
_ != null && (V = /* @__PURE__ */ f("span", {
|
|
18
|
+
className: e(i, { [a]: S && !x }),
|
|
19
|
+
children: _
|
|
20
20
|
}));
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
21
|
+
let H = null;
|
|
22
|
+
x && (H = ce);
|
|
23
|
+
let pe = e(se, H), U = null;
|
|
24
|
+
if (v != null) {
|
|
25
25
|
let t = null;
|
|
26
|
-
|
|
27
|
-
className: e(
|
|
28
|
-
children:
|
|
26
|
+
x && (t = n), U = /* @__PURE__ */ f("span", {
|
|
27
|
+
className: e(ne, t),
|
|
28
|
+
children: v
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
className:
|
|
35
|
-
children:
|
|
31
|
+
let W = /* @__PURE__ */ p(d, { children: [
|
|
32
|
+
V,
|
|
33
|
+
/* @__PURE__ */ f("span", {
|
|
34
|
+
className: pe,
|
|
35
|
+
children: m
|
|
36
36
|
}),
|
|
37
|
-
|
|
38
|
-
] }),
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
37
|
+
U
|
|
38
|
+
] }), G = () => {
|
|
39
|
+
de?.();
|
|
40
|
+
}, K = !x && !b && !O && (w != null || T != null), q = le(() => {
|
|
41
|
+
A.current != null && (clearTimeout(A.current), A.current = null);
|
|
42
42
|
}, []);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), [
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
ue(() => (K || (M(!1), P(!1), q()), () => {
|
|
44
|
+
q();
|
|
45
|
+
}), [q, K]);
|
|
46
|
+
let me = () => {
|
|
47
|
+
K && (q(), A.current = setTimeout(() => {
|
|
48
|
+
M(!0);
|
|
49
49
|
}, 150));
|
|
50
|
+
}, he = () => {
|
|
51
|
+
q(), M(!1);
|
|
50
52
|
}, ge = () => {
|
|
51
|
-
|
|
52
|
-
}, _e = () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (!q) {
|
|
56
|
-
F(!1);
|
|
53
|
+
K && P(!0);
|
|
54
|
+
}, _e = (e) => {
|
|
55
|
+
if (!K) {
|
|
56
|
+
P(!1);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
let t = e.relatedTarget;
|
|
60
|
-
t != null &&
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
className:
|
|
60
|
+
t != null && k.current?.contains(t) || P(!1);
|
|
61
|
+
}, J;
|
|
62
|
+
J = b ? /* @__PURE__ */ f("span", {
|
|
63
|
+
className: c,
|
|
64
64
|
"aria-disabled": "true",
|
|
65
|
-
"aria-label":
|
|
66
|
-
title:
|
|
67
|
-
children:
|
|
68
|
-
}) :
|
|
65
|
+
"aria-label": R,
|
|
66
|
+
title: z,
|
|
67
|
+
children: W
|
|
68
|
+
}) : g == null ? /* @__PURE__ */ f("button", {
|
|
69
69
|
type: "button",
|
|
70
|
-
className:
|
|
71
|
-
onClick:
|
|
72
|
-
"aria-current":
|
|
73
|
-
"aria-label":
|
|
74
|
-
title:
|
|
75
|
-
children:
|
|
76
|
-
}) : /* @__PURE__ */
|
|
77
|
-
to:
|
|
78
|
-
className:
|
|
79
|
-
"aria-current":
|
|
80
|
-
"aria-label":
|
|
81
|
-
title:
|
|
82
|
-
onClick:
|
|
83
|
-
children:
|
|
70
|
+
className: c,
|
|
71
|
+
onClick: G,
|
|
72
|
+
"aria-current": B,
|
|
73
|
+
"aria-label": R,
|
|
74
|
+
title: z,
|
|
75
|
+
children: W
|
|
76
|
+
}) : /* @__PURE__ */ f(h, {
|
|
77
|
+
to: g,
|
|
78
|
+
className: c,
|
|
79
|
+
"aria-current": B,
|
|
80
|
+
"aria-label": R,
|
|
81
|
+
title: z,
|
|
82
|
+
onClick: G,
|
|
83
|
+
children: W
|
|
84
84
|
});
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
|
|
85
|
+
let Y = K && (j || N), X;
|
|
86
|
+
Y && (X = te);
|
|
87
|
+
let ve = e(ee, X), Z = null;
|
|
88
|
+
T != null && !x && (Z = /* @__PURE__ */ f("button", {
|
|
89
|
+
...D,
|
|
89
90
|
type: "button",
|
|
90
|
-
className:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"aria-label": O,
|
|
95
|
-
title: O,
|
|
96
|
-
children: D
|
|
91
|
+
className: e(r, D?.className),
|
|
92
|
+
"aria-label": E,
|
|
93
|
+
title: E,
|
|
94
|
+
children: T
|
|
97
95
|
}));
|
|
98
96
|
let Q = null;
|
|
99
|
-
|
|
97
|
+
w != null && !x && (Q = /* @__PURE__ */ f("span", {
|
|
100
98
|
className: t,
|
|
101
|
-
children:
|
|
99
|
+
children: w
|
|
102
100
|
}));
|
|
103
101
|
let $ = null;
|
|
104
|
-
return
|
|
105
|
-
className:
|
|
102
|
+
return K && ($ = /* @__PURE__ */ p("span", {
|
|
103
|
+
className: ve,
|
|
106
104
|
children: [Z, Q]
|
|
107
|
-
})), /* @__PURE__ */
|
|
108
|
-
className:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
onBlurCapture: ve,
|
|
115
|
-
ref: A,
|
|
105
|
+
})), /* @__PURE__ */ p("div", {
|
|
106
|
+
className: I,
|
|
107
|
+
onMouseEnter: me,
|
|
108
|
+
onMouseLeave: he,
|
|
109
|
+
onFocusCapture: ge,
|
|
110
|
+
onBlurCapture: _e,
|
|
111
|
+
ref: k,
|
|
116
112
|
role: "listitem",
|
|
117
|
-
children: [
|
|
113
|
+
children: [J, $]
|
|
118
114
|
});
|
|
119
115
|
};
|
|
120
116
|
//#endregion
|
|
121
|
-
export {
|
|
117
|
+
export { g as SidebarNavItem, g as default };
|
|
122
118
|
|
|
123
119
|
//# sourceMappingURL=SidebarNavItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarNavItem.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_nav_item/SidebarNavItem.tsx"],"sourcesContent":["import Link from '@plumile/router/routing/Link.js';\nimport {\n type AnchorHTMLAttributes,\n type ComponentPropsWithoutRef,\n type DragEvent,\n type FocusEvent,\n type JSX,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport * as styles from './sidebarNavItem.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype RouterLinkProps = ComponentPropsWithoutRef<typeof Link> &\n AnchorHTMLAttributes<HTMLAnchorElement>;\nconst RouterLink = Link as unknown as (props: RouterLinkProps) => JSX.Element;\n\nexport type SidebarNavItemProps = {\n label: ReactNode;\n href?: string;\n icon?: ReactNode;\n badge?: ReactNode;\n isActive?: boolean;\n disabled?: boolean;\n onClick?: () => void;\n onDragStart?: (event: DragEvent) => void;\n onDragOver?: (event: DragEvent) => void;\n onDrop?: (event: DragEvent) => void;\n onDragEnd?: (event: DragEvent) => void;\n collapsed?: boolean;\n nested?: boolean;\n ariaLabel?: string;\n className?: string;\n actionSlot?: ReactNode;\n dragHandleSlot?: ReactNode;\n dragHandleLabel?: string;\n draggable?: boolean;\n};\n\nexport const SidebarNavItem = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n disabled = false,\n onClick,\n onDragStart,\n onDragOver,\n onDrop,\n onDragEnd,\n collapsed = false,\n nested = false,\n ariaLabel,\n className,\n actionSlot,\n dragHandleSlot,\n dragHandleLabel,\n draggable = false,\n}: SidebarNavItemProps): JSX.Element => {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isHoverIntent, setIsHoverIntent] = useState(false);\n const [isFocusWithin, setIsFocusWithin] = useState(false);\n\n const itemClassNames: (string | null | undefined)[] = [styles.item];\n if (collapsed) {\n itemClassNames.push(styles.itemCollapsed);\n }\n if (nested && !collapsed) {\n itemClassNames.push(styles.itemNested);\n }\n if (isActive) {\n itemClassNames.push(styles.itemActive);\n }\n if (disabled) {\n itemClassNames.push(styles.itemDisabled);\n }\n if (className != null) {\n itemClassNames.push(className);\n }\n const itemClassName = cx(...itemClassNames);\n\n let resolvedAriaLabel: string | undefined = ariaLabel;\n if (resolvedAriaLabel == null && typeof label === 'string') {\n resolvedAriaLabel = label;\n }\n\n let collapsedAriaLabel: string | undefined;\n let collapsedTitle: string | undefined;\n if (collapsed) {\n collapsedAriaLabel = resolvedAriaLabel;\n collapsedTitle = resolvedAriaLabel;\n }\n\n let ariaCurrent: 'page' | undefined;\n if (isActive) {\n ariaCurrent = 'page';\n }\n\n let iconNode: JSX.Element | null = null;\n if (icon != null) {\n iconNode = (\n <span\n className={cx(styles.icon, {\n [styles.iconNested]: nested && !collapsed,\n })}\n >\n {icon}\n </span>\n );\n }\n\n let labelExtraClass: string | null = null;\n if (collapsed) {\n labelExtraClass = styles.labelCollapsed;\n }\n const labelClassName = cx(styles.label, labelExtraClass);\n\n let badgeNode: JSX.Element | null = null;\n if (badge != null) {\n let badgeExtraClass: string | null = null;\n if (collapsed) {\n badgeExtraClass = styles.badgeCollapsed;\n }\n badgeNode = (\n <span className={cx(styles.badge, badgeExtraClass)}>{badge}</span>\n );\n }\n\n const content = (\n <>\n {iconNode}\n <span className={labelClassName}>{label}</span>\n {badgeNode}\n </>\n );\n\n const handleClick = (): void => {\n if (onClick != null) {\n onClick();\n }\n };\n\n const shouldRenderActions =\n !collapsed && !disabled && (actionSlot != null || dragHandleSlot != null);\n\n const clearHoverTimeout = useCallback((): void => {\n if (hoverTimeoutRef.current != null) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n }, []);\n\n useEffect(() => {\n if (!shouldRenderActions) {\n setIsHoverIntent(false);\n setIsFocusWithin(false);\n clearHoverTimeout();\n }\n\n return () => {\n clearHoverTimeout();\n };\n }, [clearHoverTimeout, shouldRenderActions]);\n\n const handleMouseEnter = (): void => {\n if (!shouldRenderActions) {\n return;\n }\n clearHoverTimeout();\n hoverTimeoutRef.current = setTimeout(() => {\n setIsHoverIntent(true);\n }, 150);\n };\n\n const handleMouseLeave = (): void => {\n clearHoverTimeout();\n setIsHoverIntent(false);\n };\n\n const handleFocusCapture = (): void => {\n if (!shouldRenderActions) {\n return;\n }\n setIsFocusWithin(true);\n };\n\n const handleBlurCapture = (event: FocusEvent<HTMLDivElement>): void => {\n if (!shouldRenderActions) {\n setIsFocusWithin(false);\n return;\n }\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget != null && itemRef.current?.contains(nextTarget)) {\n return;\n }\n setIsFocusWithin(false);\n };\n\n let mainNode: JSX.Element;\n if (disabled) {\n mainNode = (\n <span\n className={styles.link}\n aria-disabled=\"true\"\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n >\n {content}\n </span>\n );\n } else if (href != null) {\n mainNode = (\n <RouterLink\n to={href}\n className={styles.link}\n aria-current={ariaCurrent}\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n onClick={handleClick}\n >\n {content}\n </RouterLink>\n );\n } else {\n mainNode = (\n <button\n type=\"button\"\n className={styles.link}\n onClick={handleClick}\n aria-current={ariaCurrent}\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n >\n {content}\n </button>\n );\n }\n\n const isActionsVisible =\n shouldRenderActions && (isHoverIntent || isFocusWithin);\n let actionsVisibilityClass: string | undefined;\n if (isActionsVisible) {\n actionsVisibilityClass = styles.actionsVisible;\n }\n const actionsClassName = cx(styles.actions, actionsVisibilityClass);\n\n let dragHandleNode: JSX.Element | null = null;\n if (dragHandleSlot != null && !collapsed) {\n dragHandleNode = (\n <button\n type=\"button\"\n className={styles.dragHandle}\n draggable={draggable}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\n aria-label={dragHandleLabel}\n title={dragHandleLabel}\n >\n {dragHandleSlot}\n </button>\n );\n }\n\n let actionNode: JSX.Element | null = null;\n if (actionSlot != null && !collapsed) {\n actionNode = <span className={styles.actionSlot}>{actionSlot}</span>;\n }\n\n let actionsNode: JSX.Element | null = null;\n if (shouldRenderActions) {\n actionsNode = (\n <span className={actionsClassName}>\n {dragHandleNode}\n {actionNode}\n </span>\n );\n }\n\n return (\n <div\n className={itemClassName}\n onDragOver={onDragOver}\n onDrop={onDrop}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n ref={itemRef}\n role=\"listitem\"\n >\n {mainNode}\n {actionsNode}\n </div>\n );\n};\n\nexport default SidebarNavItem;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"SidebarNavItem.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_nav_item/SidebarNavItem.tsx"],"sourcesContent":["import Link from '@plumile/router/routing/Link.js';\nimport {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ComponentPropsWithoutRef,\n type FocusEvent,\n type JSX,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport * as styles from './sidebarNavItem.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype RouterLinkProps = ComponentPropsWithoutRef<typeof Link> &\n AnchorHTMLAttributes<HTMLAnchorElement>;\nconst RouterLink = Link as unknown as (props: RouterLinkProps) => JSX.Element;\n\nexport type SidebarNavItemProps = {\n label: ReactNode;\n href?: string;\n icon?: ReactNode;\n badge?: ReactNode;\n isActive?: boolean;\n disabled?: boolean;\n onClick?: () => void;\n collapsed?: boolean;\n nested?: boolean;\n ariaLabel?: string;\n className?: string;\n actionSlot?: ReactNode;\n dragHandleSlot?: ReactNode;\n dragHandleLabel?: string;\n dragHandleProps?: ButtonHTMLAttributes<HTMLButtonElement>;\n isDragging?: boolean;\n};\n\nexport const SidebarNavItem = ({\n label,\n href,\n icon,\n badge,\n isActive = false,\n disabled = false,\n onClick,\n collapsed = false,\n nested = false,\n ariaLabel,\n className,\n actionSlot,\n dragHandleSlot,\n dragHandleLabel,\n dragHandleProps,\n isDragging = false,\n}: SidebarNavItemProps): JSX.Element => {\n const itemRef = useRef<HTMLDivElement | null>(null);\n const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isHoverIntent, setIsHoverIntent] = useState(false);\n const [isFocusWithin, setIsFocusWithin] = useState(false);\n\n const itemClassNames: (string | null | undefined)[] = [styles.item];\n if (collapsed) {\n itemClassNames.push(styles.itemCollapsed);\n }\n if (nested && !collapsed) {\n itemClassNames.push(styles.itemNested);\n }\n if (isActive) {\n itemClassNames.push(styles.itemActive);\n }\n if (disabled) {\n itemClassNames.push(styles.itemDisabled);\n }\n if (isDragging) {\n itemClassNames.push(styles.itemDragging);\n }\n if (className != null) {\n itemClassNames.push(className);\n }\n const itemClassName = cx(...itemClassNames);\n\n let resolvedAriaLabel: string | undefined = ariaLabel;\n if (resolvedAriaLabel == null && typeof label === 'string') {\n resolvedAriaLabel = label;\n }\n\n let collapsedAriaLabel: string | undefined;\n let collapsedTitle: string | undefined;\n if (collapsed) {\n collapsedAriaLabel = resolvedAriaLabel;\n collapsedTitle = resolvedAriaLabel;\n }\n\n let ariaCurrent: 'page' | undefined;\n if (isActive) {\n ariaCurrent = 'page';\n }\n\n let iconNode: JSX.Element | null = null;\n if (icon != null) {\n iconNode = (\n <span\n className={cx(styles.icon, {\n [styles.iconNested]: nested && !collapsed,\n })}\n >\n {icon}\n </span>\n );\n }\n\n let labelExtraClass: string | null = null;\n if (collapsed) {\n labelExtraClass = styles.labelCollapsed;\n }\n const labelClassName = cx(styles.label, labelExtraClass);\n\n let badgeNode: JSX.Element | null = null;\n if (badge != null) {\n let badgeExtraClass: string | null = null;\n if (collapsed) {\n badgeExtraClass = styles.badgeCollapsed;\n }\n badgeNode = (\n <span className={cx(styles.badge, badgeExtraClass)}>{badge}</span>\n );\n }\n\n const content = (\n <>\n {iconNode}\n <span className={labelClassName}>{label}</span>\n {badgeNode}\n </>\n );\n\n const handleClick = (): void => {\n if (onClick != null) {\n onClick();\n }\n };\n\n const shouldRenderActions =\n !collapsed &&\n !disabled &&\n !isDragging &&\n (actionSlot != null || dragHandleSlot != null);\n\n const clearHoverTimeout = useCallback((): void => {\n if (hoverTimeoutRef.current != null) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n }, []);\n\n useEffect(() => {\n if (!shouldRenderActions) {\n setIsHoverIntent(false);\n setIsFocusWithin(false);\n clearHoverTimeout();\n }\n\n return () => {\n clearHoverTimeout();\n };\n }, [clearHoverTimeout, shouldRenderActions]);\n\n const handleMouseEnter = (): void => {\n if (!shouldRenderActions) {\n return;\n }\n clearHoverTimeout();\n hoverTimeoutRef.current = setTimeout(() => {\n setIsHoverIntent(true);\n }, 150);\n };\n\n const handleMouseLeave = (): void => {\n clearHoverTimeout();\n setIsHoverIntent(false);\n };\n\n const handleFocusCapture = (): void => {\n if (!shouldRenderActions) {\n return;\n }\n setIsFocusWithin(true);\n };\n\n const handleBlurCapture = (event: FocusEvent<HTMLDivElement>): void => {\n if (!shouldRenderActions) {\n setIsFocusWithin(false);\n return;\n }\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget != null && itemRef.current?.contains(nextTarget)) {\n return;\n }\n setIsFocusWithin(false);\n };\n\n let mainNode: JSX.Element;\n if (disabled) {\n mainNode = (\n <span\n className={styles.link}\n aria-disabled=\"true\"\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n >\n {content}\n </span>\n );\n } else if (href != null) {\n mainNode = (\n <RouterLink\n to={href}\n className={styles.link}\n aria-current={ariaCurrent}\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n onClick={handleClick}\n >\n {content}\n </RouterLink>\n );\n } else {\n mainNode = (\n <button\n type=\"button\"\n className={styles.link}\n onClick={handleClick}\n aria-current={ariaCurrent}\n aria-label={collapsedAriaLabel}\n title={collapsedTitle}\n >\n {content}\n </button>\n );\n }\n\n const isActionsVisible =\n shouldRenderActions && (isHoverIntent || isFocusWithin);\n let actionsVisibilityClass: string | undefined;\n if (isActionsVisible) {\n actionsVisibilityClass = styles.actionsVisible;\n }\n const actionsClassName = cx(styles.actions, actionsVisibilityClass);\n\n let dragHandleNode: JSX.Element | null = null;\n if (dragHandleSlot != null && !collapsed) {\n dragHandleNode = (\n <button\n {...dragHandleProps}\n type=\"button\"\n className={cx(styles.dragHandle, dragHandleProps?.className)}\n aria-label={dragHandleLabel}\n title={dragHandleLabel}\n >\n {dragHandleSlot}\n </button>\n );\n }\n\n let actionNode: JSX.Element | null = null;\n if (actionSlot != null && !collapsed) {\n actionNode = <span className={styles.actionSlot}>{actionSlot}</span>;\n }\n\n let actionsNode: JSX.Element | null = null;\n if (shouldRenderActions) {\n actionsNode = (\n <span className={actionsClassName}>\n {dragHandleNode}\n {actionNode}\n </span>\n );\n }\n\n return (\n <div\n className={itemClassName}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n ref={itemRef}\n role=\"listitem\"\n >\n {mainNode}\n {actionsNode}\n </div>\n );\n};\n\nexport default SidebarNavItem;\n"],"mappings":";;;;;;AAmBA,IAAM,IAAa,GAqBN,KAAkB,EAC7B,OAAA,GACA,SACA,MAAA,GACA,OAAA,GACA,cAAW,IACX,cAAW,IACX,aACA,eAAY,IACZ,YAAS,IACT,eACA,cACA,YAAA,GACA,mBACA,oBACA,oBACA,gBAAa,SACyB;CACtC,IAAM,IAAU,EAA8B,KAAK,EAC7C,IAAkB,EAA6C,KAAK,EACpE,CAAC,GAAe,KAAoB,EAAS,GAAM,EACnD,CAAC,GAAe,KAAoB,EAAS,GAAM,EAEnD,IAAgD,CAAC,EAAY;CAgBnE,AAfI,KACF,EAAe,KAAK,GAAqB,EAEvC,KAAU,CAAC,KACb,EAAe,KAAK,GAAkB,EAEpC,KACF,EAAe,KAAK,EAAkB,EAEpC,KACF,EAAe,KAAK,GAAoB,EAEtC,KACF,EAAe,KAAK,GAAoB,EAEtC,KAAa,QACf,EAAe,KAAK,EAAU;CAEhC,IAAM,IAAgB,EAAG,GAAG,EAAe,EAEvC,IAAwC;CAC5C,AAAI,KAAqB,QAAQ,OAAO,KAAU,aAChD,IAAoB;CAGtB,IAAI,GACA;CACJ,AAAI,MACF,IAAqB,GACrB,IAAiB;CAGnB,IAAI;CACJ,AAAI,MACF,IAAc;CAGhB,IAAI,IAA+B;CACnC,AAAI,KAAQ,SACV,IACE,kBAAC,QAAD;EACE,WAAW,EAAG,GAAa,GACxB,IAAoB,KAAU,CAAC,GACjC,CAAC;YAED;EACI,CAAA;CAIX,IAAI,IAAiC;CACrC,AAAI,MACF,IAAkB;CAEpB,IAAM,KAAiB,EAAG,IAAc,EAAgB,EAEpD,IAAgC;CACpC,IAAI,KAAS,MAAM;EACjB,IAAI,IAAiC;EAIrC,AAHI,MACF,IAAkB,IAEpB,IACE,kBAAC,QAAD;GAAM,WAAW,EAAG,IAAc,EAAgB;aAAG;GAAa,CAAA;;CAItE,IAAM,IACJ,kBAAA,GAAA,EAAA,UAAA;EACG;EACD,kBAAC,QAAD;GAAM,WAAW;aAAiB;GAAa,CAAA;EAC9C;EACA,EAAA,CAAA,EAGC,UAA0B;EAC9B,AAAI,MACO;IAIP,IACJ,CAAC,KACD,CAAC,KACD,CAAC,MACA,KAAc,QAAQ,KAAkB,OAErC,IAAoB,SAAwB;EAChD,AAAI,EAAgB,WAAW,SAC7B,aAAa,EAAgB,QAAQ,EACrC,EAAgB,UAAU;IAE3B,EAAE,CAAC;CAEN,UACO,MACH,EAAiB,GAAM,EACvB,EAAiB,GAAM,EACvB,GAAmB,SAGR;EACX,GAAmB;KAEpB,CAAC,GAAmB,EAAoB,CAAC;CAE5C,IAAM,WAA+B;EAC9B,MAGL,GAAmB,EACnB,EAAgB,UAAU,iBAAiB;GACzC,EAAiB,GAAK;KACrB,IAAI;IAGH,WAA+B;EAEnC,AADA,GAAmB,EACnB,EAAiB,GAAM;IAGnB,WAAiC;EAChC,KAGL,EAAiB,GAAK;IAGlB,MAAqB,MAA4C;EACrE,IAAI,CAAC,GAAqB;GACxB,EAAiB,GAAM;GACvB;;EAEF,IAAM,IAAa,EAAM;EACrB,KAAc,QAAQ,EAAQ,SAAS,SAAS,EAAW,IAG/D,EAAiB,GAAM;IAGrB;CACJ,AAYE,IAZE,IAEA,kBAAC,QAAD;EACE,WAAW;EACX,iBAAc;EACd,cAAY;EACZ,OAAO;YAEN;EACI,CAAA,GAEA,KAAQ,OAef,kBAAC,UAAD;EACE,MAAK;EACL,WAAW;EACX,SAAS;EACT,gBAAc;EACd,cAAY;EACZ,OAAO;YAEN;EACM,CAAA,GAtBT,kBAAC,GAAD;EACE,IAAI;EACJ,WAAW;EACX,gBAAc;EACd,cAAY;EACZ,OAAO;EACP,SAAS;YAER;EACU,CAAA;CAiBjB,IAAM,IACJ,MAAwB,KAAiB,IACvC;CACJ,AAAI,MACF,IAAyB;CAE3B,IAAM,KAAmB,EAAG,IAAgB,EAAuB,EAE/D,IAAqC;CACzC,AAAI,KAAkB,QAAQ,CAAC,MAC7B,IACE,kBAAC,UAAD;EACE,GAAI;EACJ,MAAK;EACL,WAAW,EAAG,GAAmB,GAAiB,UAAU;EAC5D,cAAY;EACZ,OAAO;YAEN;EACM,CAAA;CAIb,IAAI,IAAiC;CACrC,AAAI,KAAc,QAAQ,CAAC,MACzB,IAAa,kBAAC,QAAD;EAAM,WAAW;YAAoB;EAAkB,CAAA;CAGtE,IAAI,IAAkC;CAUtC,OATI,MACF,IACE,kBAAC,QAAD;EAAM,WAAW;YAAjB,CACG,GACA,EACI;MAKT,kBAAC,OAAD;EACE,WAAW;EACX,cAAc;EACd,cAAc;EACd,gBAAgB;EAChB,eAAe;EACf,KAAK;EACL,MAAK;YAPP,CASG,GACA,EACG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
//#region src/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.ts
|
|
4
|
-
var e = "_1nm2b9q0
|
|
4
|
+
var e = "_1nm2b9q0 txvbqbdsb txvbqbey txvbqbfet txvbqb7m txvbqb76 txvbqb7t txvbqbf7y txvbqb19dv txvbqb17f1 txvbqb2o", t = "_1nm2b9q1 txvbqb19ep txvbqb17fe txvbqb2p", n = "_1nm2b9q4 _1nm2b9q2 txvbqbyoi txvbqbzm3 txvbqb11ed txvbqbwqg txvbqbdr8 txvbqbey txvbqbff6 txvbqb2gm txvbqb9j txvbqb7g txvbqb76 txvbqb7t txvbqbv txvbqb19cb _1nm2b9q3 txvbqb1aex txvbqb1bs9", r = "_1nm2b9q5 txvbqbyo5 txvbqbzlq txvbqbjtp", i = "_1nm2b9q6 txvbqbyo5 txvbqbzlq txvbqb11ed txvbqbwqg txvbqb2g9", a = "_1nm2b9q7 txvbqbfd0 txvbqb1963 txvbqb19c9 txvbqbcol", o = "_1nm2b9q9 _1nm2b9q8 txvbqb19cd txvbqbr", s = "_1nm2b9qa txvbqb19eb txvbqbj", c = "_1nm2b9qb txvbqbdr8 txvbqbey txvbqbff6 txvbqbdxd txvbqbt9i txvbqb3f txvbqb1933 txvbqb1g5 txvbqb2e3 txvbqbux3 txvbqb16ex txvbqb198h txvbqb1p", l = "_1nm2b9qc txvbqbdsb txvbqbey", u = "_1nm2b9qf _1nm2b9qd txvbqbdsb txvbqbey txvbqbjtp txvbqb17hx txvbqbhnc txvbqb2g9 txvbqb1g5 txvbqb2e3 txvbqbux3 txvbqb1933 txvbqb19cb txvbqbi _1nm2b9qe txvbqb1aex txvbqb1bs9", d = "_1nm2b9qg txvbqbdsb txvbqbey txvbqbjtp txvbqb17hx txvbqbhnc txvbqbf7y txvbqb198h", f = "_1nm2b9qh txvbqb17hk txvbqbhmz", p = "_1nm2b9qi txvbqbdxd txvbqbt9i", m = "_1nm2b9qj txvbqbdq5", h = "_1nm2b9qk txvbqbdsb txvbqbey txvbqbjtp txvbqbf7y", g = "_1nm2b9ql txvbqbdq5";
|
|
5
5
|
//#endregion
|
|
6
|
-
export {
|
|
6
|
+
export { l as actionSlot, e as actions, t as actionsVisible, h as badge, g as badgeCollapsed, u as dragHandle, d as icon, f as iconNested, n as item, a as itemActive, r as itemCollapsed, o as itemDisabled, s as itemDragging, i as itemNested, p as label, m as labelCollapsed, c as link };
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=sidebarNavItem.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebarNavItem.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\
|
|
1
|
+
{"version":3,"file":"sidebarNavItem.css.js","names":[],"sources":["../../../../../src/backoffice/molecules/sidebar_nav_item/sidebarNavItem.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles, stateSprinkles } from '../../../theme/sprinkles.css.js';\nimport { vars } from '../../../theme/themeContract.js';\n\nconst inlineFlex = 'inline-flex';\n\nexport const actions = sprinkles({\n display: inlineFlex,\n alignItems: 'center',\n gap: 1,\n transitionProperty: 'opacity',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n flexShrink: 0,\n opacity: 0,\n visibility: 'hidden',\n pointerEvents: 'none',\n});\n\nexport const actionsVisible = sprinkles({\n opacity: 100,\n visibility: 'visible',\n pointerEvents: 'auto',\n});\n\nexport const item = style([\n sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n paddingY: 1.5,\n paddingX: 3,\n borderRadius: 'lg',\n fontSize: 'sm',\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n cursor: 'pointer',\n color: 'textSecondary',\n }),\n stateSprinkles({\n backgroundColor: {\n hover: 'surfaceMuted',\n },\n color: {\n hover: 'text',\n },\n }),\n {\n selectors: {\n '&:has(:focus-visible)': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const itemCollapsed = sprinkles({\n justifyContent: 'center',\n paddingX: 2,\n});\n\nexport const itemNested = sprinkles({\n paddingX: 2,\n paddingY: 1.5,\n borderRadius: 'md',\n});\n\nexport const itemActive = sprinkles({\n fontWeight: 'semibold',\n backgroundColor: 'primaryLight',\n color: 'text',\n boxShadow: 'primaryLightRing',\n});\n\nexport const itemDisabled = style([\n sprinkles({\n color: 'textMuted',\n cursor: 'not-allowed',\n }),\n {\n selectors: {\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n]);\n\nexport const itemDragging = sprinkles({\n opacity: 50,\n cursor: 'grabbing',\n});\n\nexport const link = sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n flex: 1,\n minWidth: 0,\n textDecoration: 'none',\n backgroundColor: 'transparent',\n borderWidth: 0,\n borderStyle: 'none',\n padding: 0,\n textAlign: 'left',\n color: 'inherit',\n font: 'inherit',\n});\n\nexport const actionSlot = sprinkles({\n display: inlineFlex,\n alignItems: 'center',\n});\n\nexport const dragHandle = style([\n sprinkles({\n display: inlineFlex,\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 6,\n borderRadius: 'md',\n borderWidth: 0,\n borderStyle: 'none',\n padding: 0,\n backgroundColor: 'transparent',\n color: 'textSecondary',\n cursor: 'grab',\n }),\n stateSprinkles({\n backgroundColor: {\n hover: 'surfaceMuted',\n },\n color: {\n hover: 'text',\n },\n }),\n {\n selectors: {\n '&:active': {\n cursor: 'grabbing',\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const icon = sprinkles({\n display: inlineFlex,\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 6,\n flexShrink: 0,\n color: 'inherit',\n});\n\nexport const iconNested = sprinkles({\n width: 5,\n height: 5,\n});\n\nexport const label = sprinkles({\n flex: 1,\n minWidth: 0,\n});\n\nexport const labelCollapsed = sprinkles({\n display: 'none',\n});\n\nexport const badge = sprinkles({\n display: inlineFlex,\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n});\n\nexport const badgeCollapsed = sprinkles({\n display: 'none',\n});\n"],"mappings":""}
|
|
@@ -1,91 +1,188 @@
|
|
|
1
1
|
import { cx as e } from "../../../theme/tools.js";
|
|
2
2
|
import { ChevronDownSvg as t } from "../../../icons/ChevronDownSvg.js";
|
|
3
3
|
import { SidebarNavItem as n } from "../sidebar_nav_item/SidebarNavItem.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { CSS as r } from "../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
|
|
5
|
+
import { DndContext as i, DragOverlay as a, KeyboardSensor as o, PointerSensor as s, TouchSensor as c, closestCenter as ee, useSensor as l, useSensors as u } from "../../../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
6
|
+
import { SortableContext as d, sortableKeyboardCoordinates as f, useSortable as p, verticalListSortingStrategy as m } from "../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
7
|
+
import { header as h, headerButton as g, headerButtonSidebarCollapsed as _, headerSidebarCollapsed as te, items as v, itemsNested as y, section as ne, sortableItem as b, sortableItemDragging as x, title as re, titleContent as S, titleIcon as ie, titleSidebarCollapsed as ae, toggleIcon as oe, toggleIconCollapsed as se } from "./sidebarNavSection.css.js";
|
|
8
|
+
import { useCallback as C, useId as w, useMemo as T, useState as E } from "react";
|
|
9
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
10
|
+
import { useTranslation as ce } from "react-i18next";
|
|
7
11
|
//#region src/backoffice/molecules/sidebar_nav_section/SidebarNavSection.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
var le = ({ item: t, isNested: i, sidebarCollapsed: a, dragHandleLabel: o, insertionPlacement: s }) => {
|
|
13
|
+
let { id: c, data: ee, ...l } = t, { attributes: u, listeners: d, setNodeRef: f, transform: m, transition: h, isDragging: g } = p({
|
|
14
|
+
id: c,
|
|
15
|
+
disabled: a
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ O("div", {
|
|
18
|
+
ref: f,
|
|
19
|
+
style: {
|
|
20
|
+
transform: r.Transform.toString(m),
|
|
21
|
+
transition: h
|
|
22
|
+
},
|
|
23
|
+
className: e(b, { [x]: g }),
|
|
24
|
+
children: [
|
|
25
|
+
s === "before" && /* @__PURE__ */ D("span", {
|
|
26
|
+
className: "_1rp5mg6k _1rp5mg6j txvbqbqv7 txvbqbo2g txvbqbdqi txvbqb2is txvbqb1961",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ D(n, {
|
|
30
|
+
...l,
|
|
31
|
+
collapsed: a,
|
|
32
|
+
nested: i,
|
|
33
|
+
dragHandleLabel: l.dragHandleLabel ?? o,
|
|
34
|
+
dragHandleProps: {
|
|
35
|
+
...u,
|
|
36
|
+
...d
|
|
37
|
+
},
|
|
38
|
+
isDragging: g
|
|
39
|
+
}),
|
|
40
|
+
s === "after" && /* @__PURE__ */ D("span", {
|
|
41
|
+
className: "_1rp5mg6k _1rp5mg6j txvbqbqv7 txvbqbo2g txvbqbdqi txvbqb2is txvbqb1961",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}, k = ({ title: r, icon: p, items: b, collapsible: x = !1, isCollapsed: k, defaultCollapsed: ue = !1, onCollapsedChange: A, collapsed: j = !1, reorder: M, className: de }) => {
|
|
47
|
+
let [fe, pe] = E(ue), N = w(), P = w(), { t: F } = ce("ui", { useSuspense: !1 }), [I, L] = E(null), [R, z] = E(null), B = k ?? fe, V = x, me = C(() => {
|
|
48
|
+
if (!V) return;
|
|
49
|
+
let e = !B;
|
|
50
|
+
k ?? pe(e), A?.(e);
|
|
13
51
|
}, [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]),
|
|
19
|
-
typeof
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
className:
|
|
52
|
+
V,
|
|
53
|
+
B,
|
|
54
|
+
k,
|
|
55
|
+
A
|
|
56
|
+
]), H;
|
|
57
|
+
typeof r == "string" && (H = r);
|
|
58
|
+
let U = e(re, { [ae]: j }), he = e(oe, { [se]: B }), W;
|
|
59
|
+
j && (W = H);
|
|
60
|
+
let G = null;
|
|
61
|
+
p != null && (G = /* @__PURE__ */ D("span", {
|
|
62
|
+
className: ie,
|
|
25
63
|
"aria-hidden": "true",
|
|
26
|
-
children:
|
|
64
|
+
children: p
|
|
27
65
|
}));
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
66
|
+
let ge = M?.enabled === !0 && b.length > 1, K = T(() => b.map((e) => e.id), [b]), _e = u(l(s, { activationConstraint: { distance: 4 } }), l(c, { activationConstraint: {
|
|
67
|
+
delay: 180,
|
|
68
|
+
tolerance: 5
|
|
69
|
+
} }), l(o, { coordinateGetter: f })), q = C(() => {
|
|
70
|
+
L(null), z(null);
|
|
71
|
+
}, []), ve = C((e) => {
|
|
72
|
+
L(e.active.id), z(e.active.id);
|
|
73
|
+
}, []), ye = C((e) => {
|
|
74
|
+
let t = b.find((t) => t.id === String(e.active.id)) ?? null, n = null;
|
|
75
|
+
e.over != null && (n = b.find((t) => t.id === String(e.over?.id)) ?? null);
|
|
76
|
+
let r = t?.data?.id ?? String(e.active.id), i = null;
|
|
77
|
+
n != null && (i = n.data?.id ?? String(e.over?.id)), q(), !(i == null || r === i) && M?.onReorder(r, i);
|
|
78
|
+
}, [
|
|
79
|
+
b,
|
|
80
|
+
M,
|
|
81
|
+
q
|
|
82
|
+
]), J = T(() => I == null ? null : b.find((e) => e.id === String(I)) ?? null, [I, b]), Y = null, X = "before";
|
|
83
|
+
if (I != null && R != null && I !== R) {
|
|
84
|
+
let e = K.indexOf(String(I)), t = K.indexOf(String(R));
|
|
85
|
+
e !== -1 && t !== -1 && (Y = String(R), e < t && (X = "after"));
|
|
86
|
+
}
|
|
87
|
+
let be = F("navigation.sidebar.reorder.handle"), xe = F("navigation.sidebar.reorder.instructions"), Z = null;
|
|
88
|
+
r != null && (Z = V ? /* @__PURE__ */ O("button", {
|
|
89
|
+
id: P,
|
|
31
90
|
type: "button",
|
|
32
|
-
className: e(
|
|
33
|
-
onClick:
|
|
34
|
-
"aria-expanded": !
|
|
35
|
-
"aria-controls":
|
|
36
|
-
"aria-label":
|
|
37
|
-
title:
|
|
38
|
-
children: [/* @__PURE__ */
|
|
39
|
-
className:
|
|
40
|
-
children: [
|
|
41
|
-
className:
|
|
42
|
-
children:
|
|
91
|
+
className: e(g, { [_]: j }),
|
|
92
|
+
onClick: me,
|
|
93
|
+
"aria-expanded": !B,
|
|
94
|
+
"aria-controls": N,
|
|
95
|
+
"aria-label": W,
|
|
96
|
+
title: W,
|
|
97
|
+
children: [/* @__PURE__ */ O("span", {
|
|
98
|
+
className: S,
|
|
99
|
+
children: [G, /* @__PURE__ */ D("span", {
|
|
100
|
+
className: U,
|
|
101
|
+
children: r
|
|
43
102
|
})]
|
|
44
|
-
}), !
|
|
45
|
-
className:
|
|
103
|
+
}), !j && /* @__PURE__ */ D("span", {
|
|
104
|
+
className: he,
|
|
46
105
|
"aria-hidden": "true",
|
|
47
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ D(t, {
|
|
48
107
|
width: 18,
|
|
49
108
|
height: 18
|
|
50
109
|
})
|
|
51
110
|
})]
|
|
52
|
-
}) : /* @__PURE__ */
|
|
53
|
-
className: e(
|
|
54
|
-
title:
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
id:
|
|
58
|
-
children: [
|
|
59
|
-
className:
|
|
60
|
-
children:
|
|
111
|
+
}) : /* @__PURE__ */ D("div", {
|
|
112
|
+
className: e(h, { [te]: j }),
|
|
113
|
+
title: W,
|
|
114
|
+
children: /* @__PURE__ */ O("div", {
|
|
115
|
+
className: S,
|
|
116
|
+
id: P,
|
|
117
|
+
children: [G, /* @__PURE__ */ D("span", {
|
|
118
|
+
className: U,
|
|
119
|
+
children: r
|
|
61
120
|
})]
|
|
62
121
|
})
|
|
63
122
|
}));
|
|
64
|
-
let
|
|
65
|
-
if (!
|
|
66
|
-
let t =
|
|
67
|
-
|
|
68
|
-
className: e(
|
|
69
|
-
id:
|
|
123
|
+
let Q = null;
|
|
124
|
+
if (!B) {
|
|
125
|
+
let t = r != null && !j;
|
|
126
|
+
Q = /* @__PURE__ */ D("div", {
|
|
127
|
+
className: e(v, { [y]: t }),
|
|
128
|
+
id: N,
|
|
70
129
|
role: "list",
|
|
71
|
-
children:
|
|
130
|
+
children: b.map((e) => {
|
|
72
131
|
let { id: r, data: i, ...a } = e;
|
|
73
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ D(n, {
|
|
74
133
|
...a,
|
|
75
|
-
collapsed:
|
|
134
|
+
collapsed: j,
|
|
76
135
|
nested: t
|
|
77
136
|
}, r);
|
|
78
137
|
})
|
|
79
|
-
})
|
|
138
|
+
}), ge && !j && (Q = /* @__PURE__ */ O(i, {
|
|
139
|
+
accessibility: { screenReaderInstructions: { draggable: xe } },
|
|
140
|
+
collisionDetection: ee,
|
|
141
|
+
sensors: _e,
|
|
142
|
+
onDragStart: ve,
|
|
143
|
+
onDragOver: (e) => {
|
|
144
|
+
z(e.over?.id ?? null);
|
|
145
|
+
},
|
|
146
|
+
onDragCancel: q,
|
|
147
|
+
onDragEnd: ye,
|
|
148
|
+
children: [/* @__PURE__ */ D(d, {
|
|
149
|
+
items: K,
|
|
150
|
+
strategy: m,
|
|
151
|
+
children: /* @__PURE__ */ D("div", {
|
|
152
|
+
className: e(v, { [y]: t }),
|
|
153
|
+
id: N,
|
|
154
|
+
role: "list",
|
|
155
|
+
children: b.map((e) => {
|
|
156
|
+
let n;
|
|
157
|
+
return e.id === Y && (n = X), /* @__PURE__ */ D(le, {
|
|
158
|
+
item: e,
|
|
159
|
+
isNested: t,
|
|
160
|
+
sidebarCollapsed: j,
|
|
161
|
+
dragHandleLabel: be,
|
|
162
|
+
insertionPlacement: n
|
|
163
|
+
}, e.id);
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
}), /* @__PURE__ */ D(a, { children: J != null && /* @__PURE__ */ O("div", {
|
|
167
|
+
className: "_1rp5mg6m _1rp5mg6l txvbqbyoi txvbqbzm3 txvbqb11ed txvbqbwqg txvbqbdr8 txvbqbey txvbqbff6 txvbqb2gm txvbqb9j txvbqbfd0 txvbqb196b txvbqb19c9 txvbqb1uy txvbqb17h txvbqbck9",
|
|
168
|
+
children: [J.icon != null && /* @__PURE__ */ D("span", {
|
|
169
|
+
className: "_1rp5mg6n txvbqbdsb txvbqbey txvbqbjtp txvbqb17hx txvbqbhnc txvbqbf7y",
|
|
170
|
+
children: J.icon
|
|
171
|
+
}), /* @__PURE__ */ D("span", {
|
|
172
|
+
className: "_1rp5mg6p _1rp5mg6o txvbqbt9i",
|
|
173
|
+
children: J.label
|
|
174
|
+
})]
|
|
175
|
+
}) })]
|
|
176
|
+
}));
|
|
80
177
|
}
|
|
81
|
-
let
|
|
82
|
-
return
|
|
83
|
-
className: e(
|
|
84
|
-
"aria-labelledby":
|
|
85
|
-
children: [
|
|
178
|
+
let $;
|
|
179
|
+
return r != null && ($ = P), /* @__PURE__ */ O("section", {
|
|
180
|
+
className: e(ne, de),
|
|
181
|
+
"aria-labelledby": $,
|
|
182
|
+
children: [Z, Q]
|
|
86
183
|
});
|
|
87
184
|
};
|
|
88
185
|
//#endregion
|
|
89
|
-
export {
|
|
186
|
+
export { k as SidebarNavSection, k as default };
|
|
90
187
|
|
|
91
188
|
//# sourceMappingURL=SidebarNavSection.js.map
|