@flamingo-stack/openframe-frontend-core 0.0.825 → 0.0.827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/export-map.json +1 -1
- package/dist/{case-study-card-IZBMHA6R.cjs → case-study-card-QMFGPABF.cjs} +5 -5
- package/dist/{chunk-QOAA7ZHB.cjs → chunk-2HQNXX2K.cjs} +2 -2
- package/dist/{chunk-NONMZ5WJ.cjs → chunk-2VLPXUQK.cjs} +14 -83
- package/dist/{chunk-OBQ5WUNG.cjs → chunk-3B6ZE4EZ.cjs} +29 -29
- package/dist/{chunk-BN7QENV7.cjs → chunk-3WKQ2GCR.cjs} +6 -6
- package/dist/{chunk-AO6YVNAH.cjs → chunk-4ZH7RPEA.cjs} +979 -1357
- package/dist/{chunk-25HBH4J6.cjs → chunk-5BM7X4GA.cjs} +2 -2
- package/dist/{chunk-UEULXVW2.cjs → chunk-6GPMVHJN.cjs} +23 -23
- package/dist/{chunk-IMMTH3F3.cjs → chunk-6SFCI6D4.cjs} +29 -27
- package/dist/{chunk-7DJWIVQC.cjs → chunk-6ZLCEIIC.cjs} +36 -36
- package/dist/{chunk-467T3LCG.cjs → chunk-7PZQ7SHB.cjs} +49 -32
- package/dist/{chunk-47SHKOCY.cjs → chunk-7VC5FVWT.cjs} +86 -86
- package/dist/{chunk-AUBR3FGY.cjs → chunk-ALRX2VIY.cjs} +28 -28
- package/dist/{chunk-XJMLZ63Y.cjs → chunk-B5H7RKFF.cjs} +4 -4
- package/dist/{chunk-2U7GXE3T.cjs → chunk-BGT6JFMP.cjs} +12636 -11302
- package/dist/{chunk-2XLPRW7V.cjs → chunk-BIG3O33P.cjs} +6 -2
- package/dist/chunk-BMQLM2NU.cjs +40 -0
- package/dist/{chunk-DVHSYPDB.cjs → chunk-DAKGX2WF.cjs} +2 -2
- package/dist/{chunk-MHR4C465.cjs → chunk-DR4P7AEU.cjs} +3 -3
- package/dist/{chunk-IJCSQFLD.cjs → chunk-DU6AF77X.cjs} +83 -121
- package/dist/{chunk-SBFBNOKU.cjs → chunk-ENMPSEEQ.cjs} +4 -4
- package/dist/{chunk-ZECG6GU5.cjs → chunk-F2J5WN6U.cjs} +2 -2
- package/dist/{chunk-2IWAHBCC.cjs → chunk-FMSAN6SR.cjs} +159 -159
- package/dist/{chunk-BOS7OIC4.cjs → chunk-GRHF5SWL.cjs} +5 -2
- package/dist/{chunk-ZRDVFADQ.cjs → chunk-IBD2FPSX.cjs} +75 -9
- package/dist/{chunk-T266OITJ.cjs → chunk-IKWQW3YJ.cjs} +45 -45
- package/dist/{chunk-APTFXX2C.cjs → chunk-K6X7VP2Y.cjs} +46 -46
- package/dist/{chunk-QDDBOCG3.cjs → chunk-KPGKTEEB.cjs} +2 -2
- package/dist/{chunk-B7NSH7IK.cjs → chunk-LKP5R3EQ.cjs} +5 -5
- package/dist/chunk-OEP5KAT6.cjs +56 -0
- package/dist/{chunk-Z7BLMJEI.cjs → chunk-OKTNRGM5.cjs} +54 -54
- package/dist/chunk-OT6P57ZS.cjs +94 -0
- package/dist/{chunk-QQT23JJ7.cjs → chunk-PBHP3FHO.cjs} +4 -4
- package/dist/{chunk-P25RVNGX.cjs → chunk-QMQWXGCH.cjs} +249 -108
- package/dist/{chunk-6LVJKPR3.cjs → chunk-RPKWEBHC.cjs} +8 -8
- package/dist/{chunk-NPNZAAOB.cjs → chunk-S6UJEW4G.cjs} +2 -2
- package/dist/{chunk-EHANO6UE.cjs → chunk-SVCTAOJR.cjs} +9 -129
- package/dist/{chunk-MALCUN2G.cjs → chunk-UULSSD56.cjs} +12 -14
- package/dist/{chunk-N7IDLF2G.cjs → chunk-UWGPYAB3.cjs} +1283 -268
- package/dist/{chunk-4IY5FKYL.cjs → chunk-VAIML6YU.cjs} +23 -23
- package/dist/{chunk-A34UNP5V.cjs → chunk-W4VEDSAX.cjs} +80 -11
- package/dist/{chunk-5S2GW6YG.cjs → chunk-XPF74L76.cjs} +17 -17
- package/dist/{chunk-DNZCSPMU.cjs → chunk-YKUL6JBI.cjs} +20 -20
- package/dist/{chunk-QOOMUGF2.cjs → chunk-YMLRDVPO.cjs} +15 -15
- package/dist/{chunk-NL34HKLS.cjs → chunk-ZT7JHN7G.cjs} +91 -91
- package/dist/{cloud-tenants-M4VFFN33.cjs → cloud-tenants-LKTWIZNS.cjs} +108 -106
- package/dist/components/case-studies/index.cjs +124 -122
- package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
- package/dist/components/chat/approval-batch-message.js +2 -2
- package/dist/components/chat/chat-archive-page.d.ts +7 -0
- package/dist/components/chat/chat-archive-page.d.ts.map +1 -1
- package/dist/components/chat/chat-archive-page.js +9 -0
- package/dist/components/chat/chat-composer.d.ts +24 -4
- package/dist/components/chat/chat-composer.d.ts.map +1 -1
- package/dist/components/chat/chat-composer.js +90 -48
- package/dist/components/chat/chat-context-memory-bar.d.ts +4 -1
- package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -1
- package/dist/components/chat/chat-context-memory-bar.js +8 -5
- package/dist/components/chat/chat-context-picker.d.ts +8 -1
- package/dist/components/chat/chat-context-picker.d.ts.map +1 -1
- package/dist/components/chat/chat-context-picker.js +32 -9
- package/dist/components/chat/chat-header-rename-field.d.ts +18 -0
- package/dist/components/chat/chat-header-rename-field.d.ts.map +1 -0
- package/dist/components/chat/chat-header-rename-field.js +49 -0
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-input.js +5 -0
- package/dist/components/chat/composer-sheet.d.ts +44 -0
- package/dist/components/chat/composer-sheet.d.ts.map +1 -0
- package/dist/components/chat/composer-sheet.js +140 -0
- package/dist/components/chat/embeddable-chat.d.ts +114 -1
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +328 -215
- package/dist/components/chat/index.cjs +118 -103
- package/dist/components/chat/index.d.ts +6 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +9 -0
- package/dist/components/chat/mingo-chat-day-groups.d.ts +18 -0
- package/dist/components/chat/mingo-chat-day-groups.d.ts.map +1 -0
- package/dist/components/chat/mingo-chat-day-groups.js +45 -0
- package/dist/components/chat/mingo-chat-header.d.ts +34 -6
- package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
- package/dist/components/chat/mingo-chat-header.js +44 -7
- package/dist/components/chat/mingo-chat-history-section.d.ts +30 -0
- package/dist/components/chat/mingo-chat-history-section.d.ts.map +1 -0
- package/dist/components/chat/mingo-chat-history-section.js +500 -0
- package/dist/components/chat/mingo-chat-history.d.ts +5 -2
- package/dist/components/chat/mingo-chat-history.d.ts.map +1 -1
- package/dist/components/chat/mingo-chat-history.js +26 -30
- package/dist/components/chat/mingo-chat-list-shared.d.ts +136 -0
- package/dist/components/chat/mingo-chat-list-shared.d.ts.map +1 -0
- package/dist/components/chat/mingo-chat-list-shared.js +76 -0
- package/dist/components/chat/mingo-chat-rail.d.ts +19 -51
- package/dist/components/chat/mingo-chat-rail.d.ts.map +1 -1
- package/dist/components/chat/mingo-chat-rail.js +23 -45
- package/dist/components/chat/mingo-edge-light.d.ts +13 -0
- package/dist/components/chat/mingo-edge-light.d.ts.map +1 -0
- package/dist/components/chat/mingo-edge-light.js +17 -0
- package/dist/components/chat/mingo-history-rail.d.ts +5 -4
- package/dist/components/chat/mingo-history-rail.d.ts.map +1 -1
- package/dist/components/chat/mingo-history-rail.js +5 -10
- package/dist/components/chat/mingo-quick-action-wall.d.ts +27 -0
- package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -0
- package/dist/components/chat/mingo-quick-action-wall.js +41 -0
- package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
- package/dist/components/chat/mingo-welcome.js +6 -20
- package/dist/components/chat/model-display.d.ts.map +1 -1
- package/dist/components/chat/model-display.js +38 -9
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.js +2 -15
- package/dist/components/chat/thinking-display.d.ts.map +1 -1
- package/dist/components/chat/thinking-display.js +2 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.js +15 -1
- package/dist/components/chat/types/component.types.d.ts +13 -1
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-day-label.d.ts +8 -0
- package/dist/components/chat/utils/chat-day-label.d.ts.map +1 -0
- package/dist/components/chat/utils/chat-day-label.js +21 -0
- package/dist/components/contact/index.cjs +109 -107
- package/dist/components/docs/index.cjs +112 -110
- package/dist/components/embeds/index.cjs +109 -107
- package/dist/components/faq/index.cjs +110 -108
- package/dist/components/features/board/board-column.d.ts +3 -1
- package/dist/components/features/board/board-column.d.ts.map +1 -1
- package/dist/components/features/board/board-column.js +6 -2
- package/dist/components/features/board/board.d.ts +6 -0
- package/dist/components/features/board/board.d.ts.map +1 -1
- package/dist/components/features/board/board.js +14 -3
- package/dist/components/features/board/touch-board.d.ts +1 -1
- package/dist/components/features/board/touch-board.d.ts.map +1 -1
- package/dist/components/features/board/touch-board.js +3 -1
- package/dist/components/features/index.cjs +108 -106
- package/dist/components/features/notifications/approval-request-notification-tile.d.ts +7 -1
- package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
- package/dist/components/features/notifications/approval-request-notification-tile.js +1 -1
- package/dist/components/features/notifications/notification-drawer.d.ts +6 -1
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-drawer.js +3 -2
- package/dist/components/features/notifications/notification-tile.d.ts +4 -1
- package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-tile.js +9 -7
- package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +18 -1
- package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
- package/dist/components/features/time-tracker/time-tracker-header-button.js +31 -7
- package/dist/components/help-center-pages/index.cjs +217 -215
- package/dist/components/icons-v2-generated/icon-loaders.d.ts.map +1 -1
- package/dist/components/icons-v2-generated/icon-loaders.js +1 -0
- package/dist/components/icons-v2-generated/icon-names.js +1 -1
- package/dist/components/icons-v2-generated/index.cjs +90 -86
- package/dist/components/icons-v2-generated/loaders/dots-loader-icon.d.ts.map +1 -1
- package/dist/components/icons-v2-generated/loaders/dots-loader-icon.js +21 -24
- package/dist/components/icons-v2-generated/logos/index.d.ts +1 -0
- package/dist/components/icons-v2-generated/logos/index.d.ts.map +1 -1
- package/dist/components/icons-v2-generated/logos/index.js +2 -0
- package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts +9 -0
- package/dist/components/icons-v2-generated/logos/mingo-logo-icon.d.ts.map +1 -0
- package/dist/components/icons-v2-generated/logos/mingo-logo-icon.js +36 -0
- package/dist/components/index.cjs +215 -182
- package/dist/components/meeting-scheduler/index.cjs +182 -180
- package/dist/components/navigation/account-popover.d.ts +62 -0
- package/dist/components/navigation/account-popover.d.ts.map +1 -0
- package/dist/components/navigation/account-popover.js +138 -0
- package/dist/components/navigation/app-header.d.ts +36 -2
- package/dist/components/navigation/app-header.d.ts.map +1 -1
- package/dist/components/navigation/app-header.js +28 -24
- package/dist/components/navigation/app-layout-context.d.ts +17 -0
- package/dist/components/navigation/app-layout-context.d.ts.map +1 -1
- package/dist/components/navigation/app-layout-context.js +9 -1
- package/dist/components/navigation/app-layout.d.ts +93 -1
- package/dist/components/navigation/app-layout.d.ts.map +1 -1
- package/dist/components/navigation/app-layout.js +149 -30
- package/dist/components/navigation/header-button.d.ts +11 -1
- package/dist/components/navigation/header-button.d.ts.map +1 -1
- package/dist/components/navigation/header-button.js +16 -5
- package/dist/components/navigation/header-mingo-button.d.ts.map +1 -1
- package/dist/components/navigation/header-mingo-button.js +6 -5
- package/dist/components/navigation/index.cjs +120 -109
- package/dist/components/navigation/index.d.ts +10 -1
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +8 -0
- package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
- package/dist/components/navigation/mingo-ai-button.js +2 -1
- package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
- package/dist/components/navigation/mobile-burger-menu.js +155 -39
- package/dist/components/navigation/navigation-sidebar-grouped.d.ts +57 -0
- package/dist/components/navigation/navigation-sidebar-grouped.d.ts.map +1 -0
- package/dist/components/navigation/navigation-sidebar-grouped.js +365 -0
- package/dist/components/navigation/navigation-sidebar-match.d.ts +37 -0
- package/dist/components/navigation/navigation-sidebar-match.d.ts.map +1 -0
- package/dist/components/navigation/navigation-sidebar-match.js +85 -0
- package/dist/components/navigation/navigation-sidebar-slot.d.ts +7 -0
- package/dist/components/navigation/navigation-sidebar-slot.d.ts.map +1 -0
- package/dist/components/navigation/navigation-sidebar-slot.js +11 -0
- package/dist/components/navigation/navigation-sidebar-toggle.d.ts +7 -1
- package/dist/components/navigation/navigation-sidebar-toggle.d.ts.map +1 -1
- package/dist/components/navigation/navigation-sidebar-toggle.js +52 -23
- package/dist/components/navigation/navigation-sidebar.d.ts +13 -1
- package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
- package/dist/components/navigation/navigation-sidebar.js +188 -52
- package/dist/components/navigation/notifications-bell-button.d.ts +28 -0
- package/dist/components/navigation/notifications-bell-button.d.ts.map +1 -0
- package/dist/components/navigation/notifications-bell-button.js +44 -0
- package/dist/components/navigation/ticket-alerts-button.d.ts +7 -1
- package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -1
- package/dist/components/navigation/ticket-alerts-button.js +3 -2
- package/dist/components/onboarding-guides/index.cjs +111 -109
- package/dist/components/product-demo/index.cjs +119 -117
- package/dist/components/related-content/index.cjs +13 -13
- package/dist/components/tickets/index.cjs +115 -113
- package/dist/components/ui/actions-menu.d.ts +6 -1
- package/dist/components/ui/actions-menu.d.ts.map +1 -1
- package/dist/components/ui/actions-menu.js +6 -2
- package/dist/components/ui/fade-preview.d.ts +8 -0
- package/dist/components/ui/fade-preview.d.ts.map +1 -1
- package/dist/components/ui/fade-preview.js +7 -5
- package/dist/components/ui/index.cjs +136 -111
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/mobile-action-bar.d.ts +14 -0
- package/dist/components/ui/mobile-action-bar.d.ts.map +1 -0
- package/dist/components/ui/mobile-action-bar.js +68 -0
- package/dist/components/ui/no-data/no-data-styles.d.ts +1 -1
- package/dist/components/ui/no-data/no-data-styles.d.ts.map +1 -1
- package/dist/components/ui/no-data/no-data-styles.js +1 -1
- package/dist/components/ui/page-actions.d.ts.map +1 -1
- package/dist/components/ui/page-actions.js +24 -8
- package/dist/components/ui/panel-resize-handle.d.ts +6 -2
- package/dist/components/ui/panel-resize-handle.d.ts.map +1 -1
- package/dist/components/ui/panel-resize-handle.js +6 -3
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.js +5 -2
- package/dist/{devices-DW5NDXMD.cjs → devices-JWG72ANF.cjs} +109 -107
- package/dist/dots-loader-icon-5JXWD6FB.cjs +7 -0
- package/dist/{embeddable-chat-NBJMXEXB.cjs → embeddable-chat-5UT6UHEO.cjs} +513 -398
- package/dist/hooks/index.cjs +15 -16
- package/dist/hooks/ui/use-content-breakpoint.d.ts +4 -2
- package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
- package/dist/{icon-loaders-OLGJZGRP.cjs → icon-loaders-SUPEKMBJ.cjs} +2 -1
- package/dist/index.cjs +154 -121
- package/dist/{knowledge-EYJG2TNW.cjs → knowledge-DQXVSHME.cjs} +109 -107
- package/dist/{logs-2LV7DTSL.cjs → logs-Z33VBTVX.cjs} +118 -115
- package/dist/mingo-logo-icon-WGPBSDTF.cjs +7 -0
- package/dist/{policies-HSDYIQBX.cjs → policies-XE4UMH6Z.cjs} +112 -110
- package/dist/{remote-session-BQMTIQTU.cjs → remote-session-QGFG5WAL.cjs} +99 -97
- package/dist/{scripts-UI6V7ANQ.cjs → scripts-MECQG5GG.cjs} +115 -113
- package/dist/{software-update-WMLY7VHH.cjs → software-update-PCSIA6BP.cjs} +112 -110
- package/dist/{tickets-board-TRXOX77R.cjs → tickets-board-KCH6ITUV.cjs} +95 -94
- package/dist/types/navigation.d.ts +131 -0
- package/dist/types/navigation.d.ts.map +1 -1
- package/dist/utils/index.cjs +65 -25
- package/package.json +1 -1
- package/src/components/chat/approval-batch-message.tsx +3 -2
- package/src/components/chat/chat-archive-page.tsx +16 -0
- package/src/components/chat/chat-composer.tsx +131 -61
- package/src/components/chat/chat-context-memory-bar.tsx +27 -17
- package/src/components/chat/chat-context-picker.tsx +45 -11
- package/src/components/chat/chat-header-rename-field.tsx +68 -0
- package/src/components/chat/chat-input.tsx +9 -1
- package/src/components/chat/composer-sheet.tsx +196 -0
- package/src/components/chat/embeddable-chat.tsx +636 -319
- package/src/components/chat/index.ts +6 -0
- package/src/components/chat/mingo-chat-day-groups.ts +62 -0
- package/src/components/chat/mingo-chat-header.tsx +99 -23
- package/src/components/chat/mingo-chat-history-section.tsx +670 -0
- package/src/components/chat/mingo-chat-history.tsx +31 -45
- package/src/components/chat/mingo-chat-list-shared.tsx +244 -0
- package/src/components/chat/mingo-chat-rail.tsx +45 -97
- package/src/components/chat/mingo-edge-light.tsx +25 -0
- package/src/components/chat/mingo-history-rail.tsx +7 -17
- package/src/components/chat/mingo-quick-action-wall.tsx +64 -0
- package/src/components/chat/mingo-welcome.tsx +5 -19
- package/src/components/chat/model-display.tsx +66 -14
- package/src/components/chat/stream/chat-stream-reducer.ts +4 -18
- package/src/components/chat/thinking-display.tsx +2 -1
- package/src/components/chat/tool-execution-display.tsx +9 -1
- package/src/components/chat/types/component.types.ts +13 -1
- package/src/components/chat/utils/chat-day-label.ts +24 -0
- package/src/components/features/board/board-column.tsx +8 -0
- package/src/components/features/board/board.tsx +16 -2
- package/src/components/features/board/touch-board.tsx +2 -0
- package/src/components/features/notifications/approval-request-notification-tile.tsx +8 -2
- package/src/components/features/notifications/notification-drawer.tsx +7 -1
- package/src/components/features/notifications/notification-tile.tsx +17 -9
- package/src/components/features/time-tracker/time-tracker-header-button.tsx +53 -6
- package/src/components/icons-v2/icon-colors.json +4 -0
- package/src/components/icons-v2-generated/icon-loaders.ts +1 -0
- package/src/components/icons-v2-generated/icon-names.ts +1 -1
- package/src/components/icons-v2-generated/loaders/dots-loader-icon.tsx +18 -27
- package/src/components/icons-v2-generated/logos/index.ts +1 -0
- package/src/components/icons-v2-generated/logos/mingo-logo-icon.tsx +35 -0
- package/src/components/navigation/account-popover.tsx +198 -0
- package/src/components/navigation/app-header.tsx +74 -33
- package/src/components/navigation/app-layout-context.ts +22 -0
- package/src/components/navigation/app-layout.tsx +290 -24
- package/src/components/navigation/header-button.tsx +27 -5
- package/src/components/navigation/header-mingo-button.tsx +6 -5
- package/src/components/navigation/index.ts +19 -0
- package/src/components/navigation/mingo-ai-button.tsx +2 -3
- package/src/components/navigation/mobile-burger-menu.tsx +219 -53
- package/src/components/navigation/navigation-sidebar-grouped.tsx +554 -0
- package/src/components/navigation/navigation-sidebar-match.ts +152 -0
- package/src/components/navigation/navigation-sidebar-slot.ts +12 -0
- package/src/components/navigation/navigation-sidebar-toggle.tsx +39 -6
- package/src/components/navigation/navigation-sidebar.tsx +278 -61
- package/src/components/navigation/notifications-bell-button.tsx +70 -0
- package/src/components/navigation/ticket-alerts-button.tsx +9 -2
- package/src/components/ui/actions-menu.tsx +19 -3
- package/src/components/ui/fade-preview.tsx +13 -6
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/mobile-action-bar.ts +87 -0
- package/src/components/ui/no-data/no-data-styles.ts +5 -2
- package/src/components/ui/page-actions.tsx +38 -11
- package/src/components/ui/panel-resize-handle.tsx +14 -5
- package/src/components/ui/square-avatar.tsx +5 -2
- package/src/hooks/ui/use-content-breakpoint.ts +4 -2
- package/src/styles/ods-interaction-states.css +68 -0
- package/src/types/navigation.ts +140 -0
- package/dist/chunk-C7GIHB3V.cjs +0 -59
- package/dist/dots-loader-icon-RBLX46X7.cjs +0 -7
- package/dist/{chunk-ZOZR3QI2.cjs → chunk-46547WQW.cjs} +0 -0
- package/dist/{video-file-player-IAMWBKEQ.cjs → video-file-player-IHO66P2Q.cjs} +1 -1
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cloneElement, isValidElement, useId, useState } from "react";
|
|
4
|
+
import Link from "../../embed-shims/next-link.js";
|
|
5
|
+
import { cn } from "../../utils/index.js";
|
|
6
|
+
import { UnifiedSkeleton } from "../loading/unified-skeleton.js";
|
|
7
|
+
import { NavigationItemBadge } from "./navigation-item-badge.js";
|
|
8
|
+
import { UnreadDot } from "./unread-dot.js";
|
|
9
|
+
function sizedIcon(icon, size) {
|
|
10
|
+
return isValidElement(icon) ? cloneElement(icon, { size, color: "currentColor" }) : icon;
|
|
11
|
+
}
|
|
12
|
+
function accessibleName(item) {
|
|
13
|
+
return item.badge ? `${item.label} (${item.badge})` : item.label;
|
|
14
|
+
}
|
|
15
|
+
function useOpenNavigationGroup(activeGroupId) {
|
|
16
|
+
const [openGroupId, setOpenGroupId] = useState(activeGroupId);
|
|
17
|
+
const [openFor, setOpenFor] = useState(activeGroupId);
|
|
18
|
+
if (openFor !== activeGroupId) {
|
|
19
|
+
setOpenFor(activeGroupId);
|
|
20
|
+
setOpenGroupId(activeGroupId);
|
|
21
|
+
}
|
|
22
|
+
return [openGroupId, setOpenGroupId];
|
|
23
|
+
}
|
|
24
|
+
const ACTIVE_PILL = "bg-ods-accent-secondary text-ods-accent";
|
|
25
|
+
const CARD_INNER_RADIUS = "rounded-[calc(var(--radius)-3px)] after:rounded-[calc(var(--radius)-3px)]";
|
|
26
|
+
const EASE = "[transition-timing-function:cubic-bezier(0.2,0,0,1)]";
|
|
27
|
+
const HOVER_LAYER = cn(
|
|
28
|
+
"after:pointer-events-none after:absolute after:inset-0 after:-z-10 after:rounded-md after:content-['']",
|
|
29
|
+
"after:bg-ods-bg-hover after:opacity-0 after:transition-opacity after:duration-200 after:ease-out",
|
|
30
|
+
"hover:after:duration-75 active:after:bg-ods-bg-active",
|
|
31
|
+
"motion-reduce:after:transition-none"
|
|
32
|
+
);
|
|
33
|
+
const FOCUS_RING = "outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-focus";
|
|
34
|
+
const ROW_CLASSES = cn(
|
|
35
|
+
"relative isolate flex h-11 w-full items-center overflow-hidden rounded-md text-left",
|
|
36
|
+
"pl-[var(--spacing-system-xsf)] pr-0 @[140px]/of-nav-sidebar:pr-[var(--spacing-system-xsf)]",
|
|
37
|
+
"transition-[padding] duration-300 motion-reduce:transition-none",
|
|
38
|
+
EASE,
|
|
39
|
+
FOCUS_RING,
|
|
40
|
+
HOVER_LAYER
|
|
41
|
+
);
|
|
42
|
+
const idleIcon = (group) => cn(
|
|
43
|
+
"text-ods-text-secondary transition-colors duration-150",
|
|
44
|
+
group === "row" ? "group-hover/nav-row:text-ods-text-primary" : "group-hover/nav-child:text-ods-text-primary"
|
|
45
|
+
);
|
|
46
|
+
const EXPANDED_ONLY = "opacity-0 transition-opacity duration-150 @[140px]/of-nav-sidebar:opacity-100 motion-reduce:transition-none";
|
|
47
|
+
function CountPill({ count, className }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: cn(
|
|
52
|
+
"flex h-6 min-w-6 shrink-0 items-center justify-center rounded-md bg-ods-accent px-[var(--spacing-system-xxs)]",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-ods-text-on-accent text-h5", children: count > 99 ? "99+" : count })
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function RowEnd({ count }) {
|
|
60
|
+
return count > 0 ? /* @__PURE__ */ jsx(CountPill, { count, className: "ml-auto" }) : null;
|
|
61
|
+
}
|
|
62
|
+
function RowLabel({ item }) {
|
|
63
|
+
const unreadCount = item.unreadCount ?? 0;
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
"span",
|
|
66
|
+
{
|
|
67
|
+
className: cn(
|
|
68
|
+
"ml-[var(--spacing-system-xsf)] flex min-w-0 flex-1 items-center gap-[var(--spacing-system-xs)] overflow-hidden",
|
|
69
|
+
EXPANDED_ONLY
|
|
70
|
+
),
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-h4", children: item.label }),
|
|
73
|
+
item.badge && /* @__PURE__ */ jsx(NavigationItemBadge, { label: item.badge, compact: true }),
|
|
74
|
+
/* @__PURE__ */ jsx(RowEnd, { count: unreadCount })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function RowIcon({ item, size, className }) {
|
|
80
|
+
return /* @__PURE__ */ jsxs(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
className: cn("relative flex shrink-0 items-center justify-center", size === 20 ? "size-5" : "size-4", className),
|
|
84
|
+
children: [
|
|
85
|
+
sizedIcon(item.icon, size),
|
|
86
|
+
(item.unreadCount ?? 0) > 0 && /* @__PURE__ */ jsx(UnreadDot, { size: "fixed", className: "@[140px]/of-nav-sidebar:hidden" })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function GroupedLeafRow({
|
|
92
|
+
item,
|
|
93
|
+
isActive,
|
|
94
|
+
isPending,
|
|
95
|
+
showLabel,
|
|
96
|
+
disabled,
|
|
97
|
+
onClick
|
|
98
|
+
}) {
|
|
99
|
+
const name = accessibleName(item);
|
|
100
|
+
const lit = isActive && !disabled;
|
|
101
|
+
const className = cn(
|
|
102
|
+
"group/nav-row",
|
|
103
|
+
ROW_CLASSES,
|
|
104
|
+
!disabled && !isActive && "text-ods-text-primary hover:after:opacity-100",
|
|
105
|
+
!disabled && !isActive && isPending && "after:opacity-100",
|
|
106
|
+
lit && ACTIVE_PILL,
|
|
107
|
+
disabled && "cursor-not-allowed text-ods-text-secondary opacity-50"
|
|
108
|
+
);
|
|
109
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(RowIcon, { item, size: 20, className: lit ? "text-ods-accent" : idleIcon("row") }),
|
|
111
|
+
/* @__PURE__ */ jsx(RowLabel, { item })
|
|
112
|
+
] });
|
|
113
|
+
const shared = {
|
|
114
|
+
className,
|
|
115
|
+
title: showLabel ? void 0 : name,
|
|
116
|
+
"aria-label": name,
|
|
117
|
+
"aria-current": isActive ? "page" : void 0
|
|
118
|
+
};
|
|
119
|
+
if (disabled || !item.path || item.onClick) {
|
|
120
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick: (event) => onClick(item, event), disabled, ...shared, children: content });
|
|
121
|
+
}
|
|
122
|
+
return /* @__PURE__ */ jsx(Link, { href: item.path, onClick: (event) => onClick(item, event), ...shared, children: content });
|
|
123
|
+
}
|
|
124
|
+
function GroupedChildRow({
|
|
125
|
+
item,
|
|
126
|
+
isActive,
|
|
127
|
+
isPending,
|
|
128
|
+
showLabel,
|
|
129
|
+
disabled,
|
|
130
|
+
onClick
|
|
131
|
+
}) {
|
|
132
|
+
const name = accessibleName(item);
|
|
133
|
+
const lit = isActive && !disabled;
|
|
134
|
+
const className = cn(
|
|
135
|
+
// The icon column flush, under the parent's icon at both widths.
|
|
136
|
+
"group/nav-child relative flex h-11 w-full items-stretch gap-[var(--spacing-system-xxs)] rounded-md text-left",
|
|
137
|
+
FOCUS_RING,
|
|
138
|
+
disabled && "cursor-not-allowed opacity-50"
|
|
139
|
+
);
|
|
140
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
141
|
+
/* @__PURE__ */ jsxs("span", { className: "flex w-5 shrink-0 flex-col items-center", "aria-hidden": "true", children: [
|
|
142
|
+
/* @__PURE__ */ jsx("span", { className: "h-2.5 w-px shrink-0 bg-ods-border" }),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
RowIcon,
|
|
145
|
+
{
|
|
146
|
+
item,
|
|
147
|
+
size: 16,
|
|
148
|
+
className: cn("my-[var(--spacing-system-xxs)]", lit ? "text-ods-accent" : idleIcon("child"))
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsx("span", { className: "h-2.5 w-px shrink-0 bg-ods-border" })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsxs(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
className: cn(
|
|
157
|
+
"relative isolate flex min-w-0 flex-1 items-center gap-[var(--spacing-system-xs)] overflow-hidden rounded-md px-[var(--spacing-system-xsf)]",
|
|
158
|
+
EXPANDED_ONLY,
|
|
159
|
+
HOVER_LAYER,
|
|
160
|
+
lit && ACTIVE_PILL,
|
|
161
|
+
!lit && (disabled ? "text-ods-text-secondary" : "text-ods-text-primary group-hover/nav-child:after:opacity-100"),
|
|
162
|
+
!lit && !disabled && isPending && "after:opacity-100"
|
|
163
|
+
),
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-h4", children: item.label }),
|
|
166
|
+
item.badge && /* @__PURE__ */ jsx(NavigationItemBadge, { label: item.badge, compact: true }),
|
|
167
|
+
/* @__PURE__ */ jsx(RowEnd, { count: item.unreadCount ?? 0 })
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
] });
|
|
172
|
+
const shared = {
|
|
173
|
+
className,
|
|
174
|
+
title: showLabel ? void 0 : name,
|
|
175
|
+
"aria-label": name,
|
|
176
|
+
"aria-current": isActive ? "page" : void 0
|
|
177
|
+
};
|
|
178
|
+
if (disabled || !item.path || item.onClick) {
|
|
179
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick: (event) => onClick(item, event), disabled, ...shared, children: content });
|
|
180
|
+
}
|
|
181
|
+
return /* @__PURE__ */ jsx(Link, { href: item.path, onClick: (event) => onClick(item, event), ...shared, children: content });
|
|
182
|
+
}
|
|
183
|
+
function GroupedGroup({
|
|
184
|
+
item,
|
|
185
|
+
isOpen,
|
|
186
|
+
activeId,
|
|
187
|
+
pendingId,
|
|
188
|
+
showLabel,
|
|
189
|
+
disabled,
|
|
190
|
+
onItemClick,
|
|
191
|
+
onGroupClick
|
|
192
|
+
}) {
|
|
193
|
+
const groupDomId = `${useId()}-group`;
|
|
194
|
+
const name = accessibleName(item);
|
|
195
|
+
const children = item.children ?? [];
|
|
196
|
+
const lit = isOpen && !disabled;
|
|
197
|
+
return /* @__PURE__ */ jsxs(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
className: cn(
|
|
201
|
+
"-m-px rounded-md border transition-[border-color,background-color] duration-300 motion-reduce:transition-none",
|
|
202
|
+
EASE,
|
|
203
|
+
isOpen ? "border-ods-border bg-ods-bg" : "border-transparent"
|
|
204
|
+
),
|
|
205
|
+
children: [
|
|
206
|
+
/* @__PURE__ */ jsxs(
|
|
207
|
+
"button",
|
|
208
|
+
{
|
|
209
|
+
type: "button",
|
|
210
|
+
onClick: () => onGroupClick(item),
|
|
211
|
+
disabled,
|
|
212
|
+
"aria-expanded": isOpen,
|
|
213
|
+
"aria-controls": groupDomId,
|
|
214
|
+
"aria-label": name,
|
|
215
|
+
title: showLabel ? void 0 : name,
|
|
216
|
+
className: cn(
|
|
217
|
+
"group/nav-row",
|
|
218
|
+
ROW_CLASSES,
|
|
219
|
+
// The open group's parent is accent with no background, whether or
|
|
220
|
+
// not one of its children is the current page.
|
|
221
|
+
!disabled && (isOpen ? "text-ods-accent" : "text-ods-text-primary"),
|
|
222
|
+
!disabled && "hover:after:opacity-100",
|
|
223
|
+
isOpen && CARD_INNER_RADIUS,
|
|
224
|
+
disabled && "cursor-not-allowed text-ods-text-secondary opacity-50"
|
|
225
|
+
),
|
|
226
|
+
children: [
|
|
227
|
+
/* @__PURE__ */ jsx(RowIcon, { item, size: 20, className: lit ? "text-ods-accent" : idleIcon("row") }),
|
|
228
|
+
/* @__PURE__ */ jsx(RowLabel, { item })
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ jsx(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
id: groupDomId,
|
|
236
|
+
role: "group",
|
|
237
|
+
"aria-label": item.label,
|
|
238
|
+
inert: !isOpen,
|
|
239
|
+
className: cn(
|
|
240
|
+
"grid transition-[grid-template-rows,visibility] duration-300 motion-reduce:transition-none",
|
|
241
|
+
EASE,
|
|
242
|
+
isOpen ? "visible grid-rows-[1fr]" : "invisible grid-rows-[0fr]"
|
|
243
|
+
),
|
|
244
|
+
children: /* @__PURE__ */ jsx("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
className: cn(
|
|
248
|
+
"flex flex-col px-[var(--spacing-system-xsf)] pb-[var(--spacing-system-xsf)]",
|
|
249
|
+
"transition-[opacity,transform] duration-300 motion-reduce:transition-none",
|
|
250
|
+
EASE,
|
|
251
|
+
isOpen ? "translate-y-0 opacity-100" : "-translate-y-1 opacity-0"
|
|
252
|
+
),
|
|
253
|
+
children: children.map((child) => /* @__PURE__ */ jsx(
|
|
254
|
+
GroupedChildRow,
|
|
255
|
+
{
|
|
256
|
+
item: child,
|
|
257
|
+
isActive: child.id === activeId,
|
|
258
|
+
isPending: child.id === pendingId,
|
|
259
|
+
showLabel,
|
|
260
|
+
disabled,
|
|
261
|
+
onClick: onItemClick
|
|
262
|
+
},
|
|
263
|
+
child.id
|
|
264
|
+
))
|
|
265
|
+
}
|
|
266
|
+
) })
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
function NavigationSidebarGroupedEntries({
|
|
274
|
+
items,
|
|
275
|
+
activeId,
|
|
276
|
+
pendingId,
|
|
277
|
+
openGroupId,
|
|
278
|
+
showLabel,
|
|
279
|
+
disabled,
|
|
280
|
+
onItemClick,
|
|
281
|
+
onGroupClick
|
|
282
|
+
}) {
|
|
283
|
+
return /* @__PURE__ */ jsx(Fragment, { children: items.map(
|
|
284
|
+
(item) => (item.children?.length ?? 0) > 0 ? /* @__PURE__ */ jsx(
|
|
285
|
+
GroupedGroup,
|
|
286
|
+
{
|
|
287
|
+
item,
|
|
288
|
+
isOpen: item.id === openGroupId,
|
|
289
|
+
activeId,
|
|
290
|
+
pendingId,
|
|
291
|
+
showLabel,
|
|
292
|
+
disabled,
|
|
293
|
+
onItemClick,
|
|
294
|
+
onGroupClick
|
|
295
|
+
},
|
|
296
|
+
item.id
|
|
297
|
+
) : /* @__PURE__ */ jsx(
|
|
298
|
+
GroupedLeafRow,
|
|
299
|
+
{
|
|
300
|
+
item,
|
|
301
|
+
isActive: item.id === activeId,
|
|
302
|
+
isPending: item.id === pendingId,
|
|
303
|
+
showLabel,
|
|
304
|
+
disabled,
|
|
305
|
+
onClick: onItemClick
|
|
306
|
+
},
|
|
307
|
+
item.id
|
|
308
|
+
)
|
|
309
|
+
) });
|
|
310
|
+
}
|
|
311
|
+
function NavigationSidebarActionRow({
|
|
312
|
+
icon,
|
|
313
|
+
label,
|
|
314
|
+
href,
|
|
315
|
+
onClick,
|
|
316
|
+
active = false,
|
|
317
|
+
count = 0,
|
|
318
|
+
variant = "default",
|
|
319
|
+
disabled = false,
|
|
320
|
+
minimized = false,
|
|
321
|
+
"aria-label": ariaLabel,
|
|
322
|
+
className
|
|
323
|
+
}) {
|
|
324
|
+
const entry = { id: "action", label, icon, unreadCount: count };
|
|
325
|
+
const lit = active && !disabled;
|
|
326
|
+
const outline = variant === "outline";
|
|
327
|
+
const name = ariaLabel ?? (count > 0 ? `${label} (${count > 99 ? "99+" : count})` : label);
|
|
328
|
+
const classes = cn(
|
|
329
|
+
"group/nav-row",
|
|
330
|
+
ROW_CLASSES,
|
|
331
|
+
outline && "border border-ods-border",
|
|
332
|
+
!disabled && !lit && "text-ods-text-primary hover:after:opacity-100",
|
|
333
|
+
lit && ACTIVE_PILL,
|
|
334
|
+
disabled && "cursor-not-allowed text-ods-text-secondary opacity-50",
|
|
335
|
+
className
|
|
336
|
+
);
|
|
337
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
338
|
+
/* @__PURE__ */ jsx(RowIcon, { item: entry, size: 20, className: lit || outline && !disabled ? "text-ods-accent" : idleIcon("row") }),
|
|
339
|
+
/* @__PURE__ */ jsx(RowLabel, { item: entry })
|
|
340
|
+
] });
|
|
341
|
+
const shared = { className: classes, title: minimized ? name : void 0, "aria-label": name };
|
|
342
|
+
if (href && !disabled) {
|
|
343
|
+
return /* @__PURE__ */ jsx(Link, { href, onClick, "aria-current": lit ? "page" : void 0, ...shared, children: content });
|
|
344
|
+
}
|
|
345
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick, disabled, ...shared, children: content });
|
|
346
|
+
}
|
|
347
|
+
function NavigationSidebarGroupedSkeleton() {
|
|
348
|
+
return /* @__PURE__ */ jsxs(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
className: "flex h-11 w-full items-center overflow-hidden pl-[var(--spacing-system-xsf)] @[140px]/of-nav-sidebar:pr-[var(--spacing-system-xsf)]",
|
|
352
|
+
"aria-hidden": "true",
|
|
353
|
+
children: [
|
|
354
|
+
/* @__PURE__ */ jsx(UnifiedSkeleton, { className: "size-5 shrink-0 rounded" }),
|
|
355
|
+
/* @__PURE__ */ jsx("div", { className: cn("ml-[var(--spacing-system-xsf)] min-w-0 flex-1", EXPANDED_ONLY), children: /* @__PURE__ */ jsx(UnifiedSkeleton, { className: "h-4 w-full rounded" }) })
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
export {
|
|
361
|
+
NavigationSidebarActionRow,
|
|
362
|
+
NavigationSidebarGroupedEntries,
|
|
363
|
+
NavigationSidebarGroupedSkeleton,
|
|
364
|
+
useOpenNavigationGroup
|
|
365
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { NavigationSidebarItem, NavigationSidebarLocation } from '../../types/navigation';
|
|
2
|
+
/** Splits `/monitoring/?tab=policies#x` into a normalized pathname and its query. */
|
|
3
|
+
export declare function parseNavigationLocation(currentPath: string): NavigationSidebarLocation;
|
|
4
|
+
/**
|
|
5
|
+
* How strongly an entry claims the current page, or `null` for "not this one".
|
|
6
|
+
* `isActive`, when the host set it, is final either way; otherwise `match` (or
|
|
7
|
+
* the entry's own `path`) is checked against the location, when there is one.
|
|
8
|
+
*/
|
|
9
|
+
export declare function scoreNavigationItem(item: NavigationSidebarItem, location: NavigationSidebarLocation | null): number | null;
|
|
10
|
+
export interface NavigationActiveState {
|
|
11
|
+
/** The ONE entry that is the current page (a child, in a grouped config), or null. */
|
|
12
|
+
activeId: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* The top-level entry with children that holds the active entry — or is it,
|
|
15
|
+
* when a parent matched itself and none of its children did. The group that
|
|
16
|
+
* is open by default.
|
|
17
|
+
*/
|
|
18
|
+
groupId: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface ResolveNavigationActiveOptions {
|
|
21
|
+
/** Pathname + query of the current page; without it only `isActive` counts. */
|
|
22
|
+
currentPath?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Look into `children` (one level) — the grouped variant. The flat variant
|
|
25
|
+
* never draws children, so it never resolves to one either: with this off the
|
|
26
|
+
* answer is `items.find(item => item.isActive)` for a config that sets
|
|
27
|
+
* `isActive`, exactly as before.
|
|
28
|
+
*/
|
|
29
|
+
includeChildren?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Exactly one active entry for the whole tree: the highest-scoring claim, the
|
|
33
|
+
* deeper one on a tie (a parent the host marked active beside its active child
|
|
34
|
+
* yields to the child), the first in document order after that.
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveNavigationActive(items: readonly NavigationSidebarItem[], { currentPath, includeChildren }?: ResolveNavigationActiveOptions): NavigationActiveState;
|
|
37
|
+
//# sourceMappingURL=navigation-sidebar-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-sidebar-match.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar-match.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EAG1B,MAAM,wBAAwB,CAAC;AAchC,qFAAqF;AACrF,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,yBAAyB,CAQtF;AAqDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,EAAE,yBAAyB,GAAG,IAAI,GACzC,MAAM,GAAG,IAAI,CAKf;AAED,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;OAIG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,8BAA8B;IAC7C,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,qBAAqB,EAAE,EACvC,EAAE,WAAW,EAAE,eAAuB,EAAE,GAAE,8BAAmC,GAC5E,qBAAqB,CAwBvB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const EXPLICIT_SCORE = Number.POSITIVE_INFINITY;
|
|
3
|
+
const FUNCTION_SCORE = Number.MAX_SAFE_INTEGER;
|
|
4
|
+
function normalizePathname(pathname) {
|
|
5
|
+
const trimmed = pathname.replace(/\/+$/, "");
|
|
6
|
+
if (trimmed === "") return "/";
|
|
7
|
+
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
8
|
+
}
|
|
9
|
+
function parseNavigationLocation(currentPath) {
|
|
10
|
+
const hashAt = currentPath.indexOf("#");
|
|
11
|
+
const withoutHash = hashAt >= 0 ? currentPath.slice(0, hashAt) : currentPath;
|
|
12
|
+
const queryAt = withoutHash.indexOf("?");
|
|
13
|
+
return {
|
|
14
|
+
pathname: normalizePathname(queryAt >= 0 ? withoutHash.slice(0, queryAt) : withoutHash),
|
|
15
|
+
searchParams: new URLSearchParams(queryAt >= 0 ? withoutHash.slice(queryAt + 1) : "")
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function toRule(rule) {
|
|
19
|
+
if (typeof rule !== "string") return rule;
|
|
20
|
+
const { pathname, searchParams } = parseNavigationLocation(rule);
|
|
21
|
+
const query = {};
|
|
22
|
+
searchParams.forEach((value, key) => {
|
|
23
|
+
query[key] = value;
|
|
24
|
+
});
|
|
25
|
+
return { path: pathname, query };
|
|
26
|
+
}
|
|
27
|
+
function segmentCount(pathname) {
|
|
28
|
+
return pathname.split("/").filter(Boolean).length;
|
|
29
|
+
}
|
|
30
|
+
function scoreRule(rule, location) {
|
|
31
|
+
const path = normalizePathname(rule.path);
|
|
32
|
+
const { pathname, searchParams } = location;
|
|
33
|
+
const pathMatches = rule.exact || path === "/" ? pathname === path : pathname === path || pathname.startsWith(`${path}/`);
|
|
34
|
+
if (!pathMatches) return null;
|
|
35
|
+
const constraints = Object.entries(rule.query ?? {});
|
|
36
|
+
for (const [key, expected] of constraints) {
|
|
37
|
+
const accepted = Array.isArray(expected) ? expected : [expected];
|
|
38
|
+
if (!accepted.includes(searchParams.get(key))) return null;
|
|
39
|
+
}
|
|
40
|
+
return segmentCount(path) * 1e3 + constraints.length * 10 + (rule.exact ? 1 : 0);
|
|
41
|
+
}
|
|
42
|
+
function scoreMatch(match, location) {
|
|
43
|
+
if (typeof match === "function") return match(location) ? FUNCTION_SCORE : null;
|
|
44
|
+
const rules = Array.isArray(match) ? match : [match];
|
|
45
|
+
let best = null;
|
|
46
|
+
for (const rule of rules) {
|
|
47
|
+
const score = scoreRule(toRule(rule), location);
|
|
48
|
+
if (score !== null && (best === null || score > best)) best = score;
|
|
49
|
+
}
|
|
50
|
+
return best;
|
|
51
|
+
}
|
|
52
|
+
function scoreNavigationItem(item, location) {
|
|
53
|
+
if (item.isActive !== void 0) return item.isActive ? EXPLICIT_SCORE : null;
|
|
54
|
+
if (!location) return null;
|
|
55
|
+
const match = item.match ?? item.path;
|
|
56
|
+
return match === void 0 ? null : scoreMatch(match, location);
|
|
57
|
+
}
|
|
58
|
+
function resolveNavigationActive(items, { currentPath, includeChildren = false } = {}) {
|
|
59
|
+
const location = currentPath === void 0 ? null : parseNavigationLocation(currentPath);
|
|
60
|
+
const candidates = [];
|
|
61
|
+
for (const item of items) {
|
|
62
|
+
candidates.push({ item, depth: 0, top: item });
|
|
63
|
+
if (includeChildren) {
|
|
64
|
+
for (const child of item.children ?? []) candidates.push({ item: child, depth: 1, top: item });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
let best = null;
|
|
68
|
+
for (const { item, depth, top } of candidates) {
|
|
69
|
+
const score = scoreNavigationItem(item, location);
|
|
70
|
+
if (score === null) continue;
|
|
71
|
+
if (!best || score > best.score || score === best.score && depth > best.depth) {
|
|
72
|
+
best = { id: item.id, score, depth, top };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (!best) return { activeId: null, groupId: null };
|
|
76
|
+
return {
|
|
77
|
+
activeId: best.id,
|
|
78
|
+
groupId: includeChildren && (best.top.children?.length ?? 0) > 0 ? best.top.id : null
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
parseNavigationLocation,
|
|
83
|
+
resolveNavigationActive,
|
|
84
|
+
scoreNavigationItem
|
|
85
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { NavigationSidebarSlot, NavigationSidebarSlotState } from '../../types/navigation';
|
|
3
|
+
/** Whether the host passed anything to draw — `false` / `null` count as nothing, like in JSX. */
|
|
4
|
+
export declare function hasNavigationSidebarSlot(slot: NavigationSidebarSlot | undefined): slot is NavigationSidebarSlot;
|
|
5
|
+
/** A slot's content for the sidebar's current state (see `NavigationSidebarSlot`). */
|
|
6
|
+
export declare function renderNavigationSidebarSlot(slot: NavigationSidebarSlot, state: NavigationSidebarSlotState): ReactNode;
|
|
7
|
+
//# sourceMappingURL=navigation-sidebar-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-sidebar-slot.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar-slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEhG,iGAAiG;AACjG,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,qBAAqB,GAAG,SAAS,GAAG,IAAI,IAAI,qBAAqB,CAE/G;AAED,sFAAsF;AACtF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,0BAA0B,GAAG,SAAS,CAErH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function hasNavigationSidebarSlot(slot) {
|
|
3
|
+
return slot !== void 0 && slot !== null && slot !== false;
|
|
4
|
+
}
|
|
5
|
+
function renderNavigationSidebarSlot(slot, state) {
|
|
6
|
+
return typeof slot === "function" ? slot(state) : slot;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
hasNavigationSidebarSlot,
|
|
10
|
+
renderNavigationSidebarSlot
|
|
11
|
+
};
|
|
@@ -2,6 +2,12 @@ export interface NavigationSidebarToggleProps {
|
|
|
2
2
|
minimized: boolean;
|
|
3
3
|
showLabel: boolean;
|
|
4
4
|
onToggle: () => void;
|
|
5
|
+
/**
|
|
6
|
+
* The grouped variant's footer: a 44px row cell inset like the tree's rows,
|
|
7
|
+
* with their hover and a 20px chevron on their icons' line, and the label
|
|
8
|
+
* beside it. Default false: the flat sidebar's 56px row with a 24px chevron.
|
|
9
|
+
*/
|
|
10
|
+
compact?: boolean;
|
|
5
11
|
}
|
|
6
|
-
export declare function NavigationSidebarToggle({ minimized, showLabel, onToggle }: NavigationSidebarToggleProps): import("react").JSX.Element;
|
|
12
|
+
export declare function NavigationSidebarToggle({ minimized, showLabel, onToggle, compact, }: NavigationSidebarToggleProps): import("react").JSX.Element;
|
|
7
13
|
//# sourceMappingURL=navigation-sidebar-toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-sidebar-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar-toggle.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation-sidebar-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar-toggle.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAe,GAChB,EAAE,4BAA4B,+BA0D9B"}
|
|
@@ -3,31 +3,60 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { cn } from "../../utils/index.js";
|
|
4
4
|
import { Chevrons03LeftIcon } from "../icons-v2-generated/index.js";
|
|
5
5
|
import { Button } from "../ui/button/index.js";
|
|
6
|
-
function NavigationSidebarToggle({
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function NavigationSidebarToggle({
|
|
7
|
+
minimized,
|
|
8
|
+
showLabel,
|
|
9
|
+
onToggle,
|
|
10
|
+
compact = false
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"div",
|
|
9
14
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
className: cn(
|
|
16
|
+
"border-t border-ods-border",
|
|
17
|
+
compact && "px-[var(--spacing-system-xsf)] py-[var(--spacing-system-xxs)]"
|
|
18
|
+
),
|
|
19
|
+
children: /* @__PURE__ */ jsxs(
|
|
20
|
+
Button,
|
|
21
|
+
{
|
|
22
|
+
variant: "row",
|
|
23
|
+
onClick: onToggle,
|
|
24
|
+
className: cn(
|
|
25
|
+
// Compact: the tree's row geometry — inset, rounded, the chevron on the
|
|
26
|
+
// rows' icon line in both widths — so the rail's cells are all one kind.
|
|
27
|
+
// Otherwise the sidebar's row height (its entries are `h-14` too).
|
|
28
|
+
compact ? "h-11 gap-0 overflow-hidden pl-[var(--spacing-system-xsf)] pr-0 transition-[padding,background-color] duration-300 [transition-timing-function:cubic-bezier(0.2,0,0,1)] @[140px]/of-nav-sidebar:pr-[var(--spacing-system-xsf)] motion-reduce:transition-none" : "h-14"
|
|
29
|
+
),
|
|
30
|
+
title: minimized ? "Hide Menu" : void 0,
|
|
31
|
+
"aria-label": "Hide Menu",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
34
|
+
Chevrons03LeftIcon,
|
|
35
|
+
{
|
|
36
|
+
className: cn(
|
|
37
|
+
"rotate-180 text-ods-text-secondary transition-transform duration-300 @[140px]/of-nav-sidebar:rotate-0",
|
|
38
|
+
compact ? "size-5" : "h-6 w-6"
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
) }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
"span",
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"flex-1 truncate text-left transition-[opacity,margin-left] duration-300 text-h4",
|
|
47
|
+
// Compact: the width, not `showLabel`, says when it is the rail — the
|
|
48
|
+
// label fades as the width crosses 140px, as the rows' labels do.
|
|
49
|
+
compact ? "ml-[var(--spacing-system-xs)] min-w-0 opacity-0 duration-150 @[140px]/of-nav-sidebar:opacity-100" : showLabel ? "ml-[var(--spacing-system-xs)] opacity-100" : "ml-0 opacity-0"
|
|
50
|
+
),
|
|
51
|
+
"aria-hidden": !showLabel,
|
|
52
|
+
children: "Hide Menu"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
29
58
|
}
|
|
30
|
-
)
|
|
59
|
+
);
|
|
31
60
|
}
|
|
32
61
|
export {
|
|
33
62
|
NavigationSidebarToggle
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
1
2
|
import type { NavigationSidebarConfig } from '../../types/navigation';
|
|
2
3
|
/**
|
|
3
4
|
* The desktop width, as a custom property on `:root`. Read by the `lg:` rule in
|
|
@@ -17,6 +18,8 @@ import type { NavigationSidebarConfig } from '../../types/navigation';
|
|
|
17
18
|
* catches up, which is the flash the seed exists to remove.
|
|
18
19
|
*/
|
|
19
20
|
export declare const NAVIGATION_SIDEBAR_WIDTH_VAR = "--of-navigation-sidebar-width";
|
|
21
|
+
/** A click the browser will resolve itself — new tab, new window, middle button. */
|
|
22
|
+
export declare const isModifiedClick: (event?: MouseEvent) => boolean;
|
|
20
23
|
export interface NavigationSidebarProps {
|
|
21
24
|
config: NavigationSidebarConfig;
|
|
22
25
|
/**
|
|
@@ -31,6 +34,15 @@ export interface NavigationSidebarProps {
|
|
|
31
34
|
* false (overlay).
|
|
32
35
|
*/
|
|
33
36
|
pushOnTablet?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Animate the width where it moves the content (the desktop rail, the tablet
|
|
39
|
+
* slot with `pushOnTablet`). Default true. `AppLayout` turns it off while the
|
|
40
|
+
* page column is a size container (a side panel or a composer dock): each frame
|
|
41
|
+
* of the transition then re-evaluated the page's `content-*` container queries,
|
|
42
|
+
* ~25 ms of layout per frame on a large page in WebKit, so there the width snaps.
|
|
43
|
+
* The tablet overlay still slides: it floats over the content.
|
|
44
|
+
*/
|
|
45
|
+
animateWidth?: boolean;
|
|
34
46
|
}
|
|
35
|
-
export declare function NavigationSidebar({ config, disabled, pushOnTablet }: NavigationSidebarProps): import("react").JSX.Element;
|
|
47
|
+
export declare function NavigationSidebar({ config, disabled, pushOnTablet, animateWidth, }: NavigationSidebarProps): import("react").JSX.Element;
|
|
36
48
|
//# sourceMappingURL=navigation-sidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"navigation-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/navigation-sidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,UAAU,EAAa,MAAM,OAAO,CAAC;AAKlE,OAAO,KAAK,EAAE,uBAAuB,EAAyB,MAAM,wBAAwB,CAAC;AAoB7F;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAuG5E,oFAAoF;AACpF,eAAO,MAAM,eAAe,GAAI,QAAQ,UAAU,KAAG,OACgD,CAAC;AAEtG,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,uBAAuB,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAgB,EAChB,YAAoB,EACpB,YAAmB,GACpB,EAAE,sBAAsB,+BAucxB"}
|