@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
|
@@ -1,59 +1,118 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useIsHydrated } from "../../hooks/ui/use-is-hydrated.js";
|
|
5
5
|
import { useIsomorphicLayoutEffect } from "../../hooks/ui/use-isomorphic-layout-effect.js";
|
|
6
6
|
import { useLocalStorage } from "../../hooks/ui/use-local-storage.js";
|
|
7
7
|
import { useLgUp, useMdUp } from "../../hooks/ui/use-media-query.js";
|
|
8
8
|
import { cn } from "../../utils/index.js";
|
|
9
|
+
import { NAVIGATION_SIDEBAR_ATTRIBUTE } from "./app-layout-context.js";
|
|
10
|
+
import {
|
|
11
|
+
NavigationSidebarGroupedEntries,
|
|
12
|
+
NavigationSidebarGroupedSkeleton,
|
|
13
|
+
useOpenNavigationGroup
|
|
14
|
+
} from "./navigation-sidebar-grouped.js";
|
|
9
15
|
import { NavigationSidebarHeader } from "./navigation-sidebar-header.js";
|
|
10
16
|
import { NavigationSidebarItemButton } from "./navigation-sidebar-item.js";
|
|
17
|
+
import { resolveNavigationActive } from "./navigation-sidebar-match.js";
|
|
18
|
+
import { hasNavigationSidebarSlot, renderNavigationSidebarSlot } from "./navigation-sidebar-slot.js";
|
|
11
19
|
import { NavigationSidebarToggle } from "./navigation-sidebar-toggle.js";
|
|
12
20
|
const MINIMIZED_WIDTH = 56;
|
|
13
21
|
const EXPANDED_WIDTH = 224;
|
|
22
|
+
const MIN_CUSTOM_EXPANDED_WIDTH = 141;
|
|
14
23
|
const STORAGE_KEY = "of.navigationSidebar.minimized";
|
|
15
24
|
const NAVIGATION_SIDEBAR_WIDTH_VAR = "--of-navigation-sidebar-width";
|
|
25
|
+
const EXPANDED_WIDTH_VAR = "--of-navigation-sidebar-expanded-width";
|
|
16
26
|
const SIDEBAR_CONTAINER = "@container/of-nav-sidebar";
|
|
17
|
-
const
|
|
27
|
+
const SIDEBAR_POSITION_CLASSES = [
|
|
18
28
|
// Tablet: float over the content, anchored to the layout row (`absolute`
|
|
19
29
|
// within AppLayout's `relative` row) — NOT the viewport — so an optional
|
|
20
30
|
// `topBar` above the row is not overlapped. With no topBar the row spans the
|
|
21
31
|
// full viewport, so this is visually identical to a viewport-fixed sidebar.
|
|
22
32
|
"md:absolute md:inset-y-0 md:left-0 md:z-[45]",
|
|
23
|
-
// Desktop: back in the flex flow, width from the persisted preference.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
// Desktop: back in the flex flow, width from the persisted preference.
|
|
34
|
+
"lg:relative lg:inset-auto lg:z-auto lg:h-full"
|
|
35
|
+
];
|
|
36
|
+
const SIDEBAR_GEOMETRY_CLASSES = {
|
|
37
|
+
// The fallback IS the default, so the property needs no global declaration
|
|
38
|
+
// and an unseeded consumer gets the full sidebar rather than a rail with no
|
|
39
|
+
// labels.
|
|
40
|
+
default: [...SIDEBAR_POSITION_CLASSES, "lg:w-[var(--of-navigation-sidebar-width,14rem)]"].join(" "),
|
|
41
|
+
// With a config width the fallback is that width (`EXPANDED_WIDTH_VAR`).
|
|
42
|
+
custom: [
|
|
43
|
+
...SIDEBAR_POSITION_CLASSES,
|
|
44
|
+
"lg:w-[var(--of-navigation-sidebar-width,var(--of-navigation-sidebar-expanded-width))]"
|
|
45
|
+
].join(" ")
|
|
46
|
+
};
|
|
47
|
+
const SIDEBAR_TABLET_WIDTH = {
|
|
48
|
+
rail: "md:w-14",
|
|
49
|
+
overlay: "md:w-56",
|
|
50
|
+
customOverlay: "md:w-[var(--of-navigation-sidebar-expanded-width)]"
|
|
51
|
+
};
|
|
29
52
|
const isModifiedClick = (event) => !!event && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0);
|
|
30
|
-
function NavigationSidebar({
|
|
53
|
+
function NavigationSidebar({
|
|
54
|
+
config,
|
|
55
|
+
disabled = false,
|
|
56
|
+
pushOnTablet = false,
|
|
57
|
+
animateWidth = true
|
|
58
|
+
}) {
|
|
31
59
|
const isMdUp = useMdUp() ?? false;
|
|
32
60
|
const isLgUp = useLgUp() ?? false;
|
|
33
61
|
const isTablet = isMdUp && !isLgUp;
|
|
34
|
-
const [
|
|
62
|
+
const [storedMinimized, setStoredMinimized] = useLocalStorage(STORAGE_KEY, config.minimized ?? false);
|
|
35
63
|
const [tabletMinimized, setTabletMinimized] = useState(true);
|
|
64
|
+
const isControlled = config.collapsed !== void 0;
|
|
65
|
+
const desktopMinimized = isControlled ? config.collapsed ?? false : storedMinimized;
|
|
66
|
+
const [collapsedSeen, setCollapsedSeen] = useState(config.collapsed);
|
|
67
|
+
if (collapsedSeen !== config.collapsed) {
|
|
68
|
+
setCollapsedSeen(config.collapsed);
|
|
69
|
+
if (isTablet && config.collapsed !== void 0) setTabletMinimized(config.collapsed);
|
|
70
|
+
}
|
|
71
|
+
const [revealSeen, setRevealSeen] = useState(config.revealSignal);
|
|
72
|
+
if (revealSeen !== config.revealSignal) {
|
|
73
|
+
setRevealSeen(config.revealSignal);
|
|
74
|
+
if (isTablet && config.revealSignal !== void 0) setTabletMinimized(false);
|
|
75
|
+
}
|
|
36
76
|
const [tabletFor, setTabletFor] = useState(isTablet);
|
|
37
77
|
if (tabletFor !== isTablet) {
|
|
38
78
|
setTabletFor(isTablet);
|
|
39
79
|
if (isTablet) setTabletMinimized(true);
|
|
40
80
|
}
|
|
41
81
|
const hydrated = useIsHydrated();
|
|
42
|
-
const
|
|
82
|
+
const serverMinimized = isControlled ? desktopMinimized : config.minimized ?? false;
|
|
83
|
+
const minimized = hydrated ? isTablet ? tabletMinimized : desktopMinimized : serverMinimized;
|
|
43
84
|
const [transitionsEnabled, setTransitionsEnabled] = useState(false);
|
|
85
|
+
const customExpandedWidth = config.variant === "grouped" && config.expandedWidth !== void 0 ? Math.max(config.expandedWidth, MIN_CUSTOM_EXPANDED_WIDTH) : null;
|
|
86
|
+
const expandedWidth = customExpandedWidth ?? EXPANDED_WIDTH;
|
|
87
|
+
const expandedWidthStyle = customExpandedWidth === null ? void 0 : { [EXPANDED_WIDTH_VAR]: `${customExpandedWidth}px` };
|
|
88
|
+
const [widthFor, setWidthFor] = useState(expandedWidth);
|
|
89
|
+
if (widthFor !== expandedWidth) {
|
|
90
|
+
setWidthFor(expandedWidth);
|
|
91
|
+
setTransitionsEnabled(false);
|
|
92
|
+
}
|
|
44
93
|
const isOverlayOpen = isTablet && !minimized;
|
|
45
94
|
const showLabel = !minimized;
|
|
46
95
|
const handleToggle = useCallback(() => {
|
|
47
96
|
if (isTablet) {
|
|
48
97
|
setTabletMinimized((prev) => !prev);
|
|
49
98
|
} else {
|
|
50
|
-
|
|
99
|
+
if (!isControlled) setStoredMinimized((prev) => !prev);
|
|
100
|
+
config.onCollapsedChange?.(!desktopMinimized);
|
|
51
101
|
}
|
|
52
102
|
config.onToggleMinimized?.();
|
|
53
|
-
}, [isTablet,
|
|
103
|
+
}, [isTablet, isControlled, setStoredMinimized, desktopMinimized, config]);
|
|
54
104
|
const closeOverlay = useCallback(() => {
|
|
55
105
|
setTabletMinimized(true);
|
|
56
106
|
}, []);
|
|
107
|
+
const revealHandledRef = useRef(config.revealSignal);
|
|
108
|
+
const { revealSignal, onCollapsedChange } = config;
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (revealHandledRef.current === revealSignal) return;
|
|
111
|
+
revealHandledRef.current = revealSignal;
|
|
112
|
+
if (revealSignal === void 0 || !isLgUp || !desktopMinimized) return;
|
|
113
|
+
if (!isControlled) setStoredMinimized(false);
|
|
114
|
+
onCollapsedChange?.(false);
|
|
115
|
+
}, [revealSignal, isLgUp, desktopMinimized, isControlled, setStoredMinimized, onCollapsedChange]);
|
|
57
116
|
useEffect(() => {
|
|
58
117
|
if (!isOverlayOpen) return void 0;
|
|
59
118
|
const handleKeyDown = (e) => {
|
|
@@ -63,7 +122,12 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
63
122
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
64
123
|
}, [isOverlayOpen, closeOverlay]);
|
|
65
124
|
const [pendingItemId, setPendingItemId] = useState(null);
|
|
66
|
-
const
|
|
125
|
+
const grouped = config.variant === "grouped";
|
|
126
|
+
const { activeId: committedActiveId, groupId: activeGroupId } = useMemo(
|
|
127
|
+
() => resolveNavigationActive(config.items, { currentPath: config.currentPath, includeChildren: grouped }),
|
|
128
|
+
[config.items, config.currentPath, grouped]
|
|
129
|
+
);
|
|
130
|
+
const [openGroupId, setOpenGroupId] = useOpenNavigationGroup(activeGroupId);
|
|
67
131
|
const [pendingClearedFor, setPendingClearedFor] = useState(committedActiveId);
|
|
68
132
|
if (pendingClearedFor !== committedActiveId) {
|
|
69
133
|
setPendingClearedFor(committedActiveId);
|
|
@@ -88,6 +152,10 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
88
152
|
},
|
|
89
153
|
[config, isTablet, committedActiveId]
|
|
90
154
|
);
|
|
155
|
+
const handleGroupClick = useCallback(
|
|
156
|
+
(item) => setOpenGroupId((current) => current === item.id ? null : item.id),
|
|
157
|
+
[setOpenGroupId]
|
|
158
|
+
);
|
|
91
159
|
const { primaryItems, secondaryItems } = useMemo(
|
|
92
160
|
() => ({
|
|
93
161
|
primaryItems: config.items.filter((item) => item.section !== "secondary"),
|
|
@@ -104,9 +172,18 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
104
172
|
secondary: Array.from({ length: Math.max(0, secondary) }, (_, i) => `secondary-${i}`)
|
|
105
173
|
};
|
|
106
174
|
}, [config.loading, config.loadingRows?.primary, config.loadingRows?.secondary]);
|
|
107
|
-
const
|
|
175
|
+
const widthTransition = cn(
|
|
176
|
+
"transition-[width] duration-300",
|
|
177
|
+
grouped && "[transition-timing-function:cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none"
|
|
178
|
+
);
|
|
179
|
+
const sidebarWidth = useMemo(
|
|
180
|
+
() => minimized ? `${MINIMIZED_WIDTH}px` : `${expandedWidth}px`,
|
|
181
|
+
[minimized, expandedWidth]
|
|
182
|
+
);
|
|
183
|
+
const sectionRailHidden = typeof config.sectionSlot !== "function" && "hidden @[140px]/of-nav-sidebar:flex animate-in fade-in duration-300 motion-reduce:animate-none";
|
|
184
|
+
const asideRef = useRef(null);
|
|
108
185
|
useIsomorphicLayoutEffect(() => {
|
|
109
|
-
|
|
186
|
+
asideRef.current?.style.setProperty(NAVIGATION_SIDEBAR_WIDTH_VAR, sidebarWidth);
|
|
110
187
|
}, [sidebarWidth]);
|
|
111
188
|
useIsomorphicLayoutEffect(() => {
|
|
112
189
|
if (transitionsEnabled) return void 0;
|
|
@@ -115,6 +192,40 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
115
192
|
});
|
|
116
193
|
return () => cancelAnimationFrame(id);
|
|
117
194
|
}, [transitionsEnabled]);
|
|
195
|
+
const renderEntries = (placeholders, items) => {
|
|
196
|
+
if (placeholders) {
|
|
197
|
+
return placeholders.map(
|
|
198
|
+
(key) => grouped ? /* @__PURE__ */ jsx(NavigationSidebarGroupedSkeleton, {}, key) : /* @__PURE__ */ jsx(NavigationSidebarItemButton, { loading: true, showLabel }, key)
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
if (grouped) {
|
|
202
|
+
return /* @__PURE__ */ jsx(
|
|
203
|
+
NavigationSidebarGroupedEntries,
|
|
204
|
+
{
|
|
205
|
+
items,
|
|
206
|
+
activeId: committedActiveId,
|
|
207
|
+
pendingId: pendingItemId,
|
|
208
|
+
openGroupId,
|
|
209
|
+
showLabel,
|
|
210
|
+
disabled,
|
|
211
|
+
onItemClick: handleItemClick,
|
|
212
|
+
onGroupClick: handleGroupClick
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
return items.map((item) => /* @__PURE__ */ jsx(
|
|
217
|
+
NavigationSidebarItemButton,
|
|
218
|
+
{
|
|
219
|
+
item,
|
|
220
|
+
isActive: item.id === committedActiveId,
|
|
221
|
+
isPending: item.id === pendingItemId,
|
|
222
|
+
showLabel,
|
|
223
|
+
disabled,
|
|
224
|
+
onClick: handleItemClick
|
|
225
|
+
},
|
|
226
|
+
item.id
|
|
227
|
+
));
|
|
228
|
+
};
|
|
118
229
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
119
230
|
/* @__PURE__ */ jsx(
|
|
120
231
|
"div",
|
|
@@ -134,9 +245,10 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
134
245
|
{
|
|
135
246
|
className: cn(
|
|
136
247
|
"hidden h-full flex-shrink-0 md:block lg:hidden",
|
|
137
|
-
isOverlayOpen && pushOnTablet ? "w-56" : "w-14",
|
|
138
|
-
transitionsEnabled &&
|
|
248
|
+
isOverlayOpen && pushOnTablet ? customExpandedWidth === null ? "w-56" : "w-[var(--of-navigation-sidebar-expanded-width)]" : "w-14",
|
|
249
|
+
transitionsEnabled && animateWidth && widthTransition
|
|
139
250
|
),
|
|
251
|
+
style: expandedWidthStyle,
|
|
140
252
|
"aria-hidden": "true"
|
|
141
253
|
}
|
|
142
254
|
),
|
|
@@ -147,47 +259,70 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
147
259
|
SIDEBAR_CONTAINER,
|
|
148
260
|
"hidden flex-shrink-0 flex-col md:flex",
|
|
149
261
|
"border-r border-ods-border bg-ods-card",
|
|
150
|
-
SIDEBAR_GEOMETRY_CLASSES,
|
|
262
|
+
customExpandedWidth === null ? SIDEBAR_GEOMETRY_CLASSES.default : SIDEBAR_GEOMETRY_CLASSES.custom,
|
|
151
263
|
// The one width a viewport cannot imply: an overlay the user opened on
|
|
152
264
|
// tablet. Only ever true after a click, so the first paint always gets
|
|
153
265
|
// the rail.
|
|
154
|
-
isOverlayOpen ? SIDEBAR_TABLET_WIDTH.overlay : SIDEBAR_TABLET_WIDTH.
|
|
155
|
-
transitionsEnabled &&
|
|
266
|
+
!isOverlayOpen ? SIDEBAR_TABLET_WIDTH.rail : customExpandedWidth === null ? SIDEBAR_TABLET_WIDTH.overlay : SIDEBAR_TABLET_WIDTH.customOverlay,
|
|
267
|
+
transitionsEnabled && widthTransition,
|
|
268
|
+
// Snaps where its width moves the content: the desktop rail, and the
|
|
269
|
+
// tablet overlay too when it pushes (its slot above snaps with it).
|
|
270
|
+
!animateWidth && (pushOnTablet ? "transition-none" : "lg:transition-none"),
|
|
156
271
|
config.className
|
|
157
272
|
),
|
|
273
|
+
ref: asideRef,
|
|
274
|
+
style: expandedWidthStyle,
|
|
158
275
|
"aria-label": "Main navigation sidebar",
|
|
276
|
+
...{ [NAVIGATION_SIDEBAR_ATTRIBUTE]: "" },
|
|
159
277
|
children: [
|
|
160
278
|
/* @__PURE__ */ jsx(NavigationSidebarHeader, { minimized }),
|
|
161
|
-
/* @__PURE__ */ jsxs(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
279
|
+
/* @__PURE__ */ jsxs(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
className: cn(
|
|
283
|
+
"flex flex-1 flex-col justify-between overflow-y-auto",
|
|
284
|
+
// Grouped: one inset all round the rows (8px), so the first row sits as far under the
|
|
285
|
+
// header's border as the rows sit from the sidebar's sides.
|
|
286
|
+
grouped ? "p-[var(--spacing-system-xsf)]" : "py-4"
|
|
287
|
+
),
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
290
|
+
config.topSlot?.({ minimized }),
|
|
291
|
+
/* @__PURE__ */ jsx(
|
|
292
|
+
"nav",
|
|
293
|
+
{
|
|
294
|
+
className: cn("flex flex-col", grouped && "gap-[var(--spacing-system-xxs)]"),
|
|
295
|
+
"aria-label": "Primary navigation",
|
|
296
|
+
"aria-busy": !!loadingRows,
|
|
297
|
+
children: renderEntries(loadingRows?.primary ?? null, primaryItems)
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
hasNavigationSidebarSlot(config.sectionSlot) && // A divider between the tree and the section, as under the top slot's rows.
|
|
301
|
+
/* @__PURE__ */ jsx(
|
|
302
|
+
"div",
|
|
303
|
+
{
|
|
304
|
+
className: cn(
|
|
305
|
+
"mt-[var(--spacing-system-xsf)] flex flex-col border-t border-ods-border pt-[var(--spacing-system-sf)]",
|
|
306
|
+
sectionRailHidden
|
|
307
|
+
),
|
|
308
|
+
children: renderNavigationSidebarSlot(config.sectionSlot, { minimized, inDrawer: false })
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] }),
|
|
312
|
+
(loadingRows ? loadingRows.secondary.length > 0 : secondaryItems.length > 0) && /* @__PURE__ */ jsx("nav", { className: "flex flex-col", "aria-label": "Secondary navigation", "aria-busy": !!loadingRows, children: renderEntries(loadingRows?.secondary ?? null, secondaryItems) })
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
),
|
|
316
|
+
hasNavigationSidebarSlot(config.footerSlot) && /* @__PURE__ */ jsx("div", { className: "shrink-0 overflow-hidden border-t border-ods-border px-[var(--spacing-system-xsf)] py-[var(--spacing-system-xxs)]", children: renderNavigationSidebarSlot(config.footerSlot, { minimized, inDrawer: false }) }),
|
|
317
|
+
/* @__PURE__ */ jsx(
|
|
318
|
+
NavigationSidebarToggle,
|
|
319
|
+
{
|
|
320
|
+
minimized,
|
|
321
|
+
showLabel,
|
|
322
|
+
onToggle: handleToggle,
|
|
323
|
+
compact: grouped
|
|
324
|
+
}
|
|
325
|
+
)
|
|
191
326
|
]
|
|
192
327
|
}
|
|
193
328
|
)
|
|
@@ -195,5 +330,6 @@ function NavigationSidebar({ config, disabled = false, pushOnTablet = false }) {
|
|
|
195
330
|
}
|
|
196
331
|
export {
|
|
197
332
|
NAVIGATION_SIDEBAR_WIDTH_VAR,
|
|
198
|
-
NavigationSidebar
|
|
333
|
+
NavigationSidebar,
|
|
334
|
+
isModifiedClick
|
|
199
335
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface NotificationsBellButtonProps {
|
|
2
|
+
/** Unread count to show the dot for when no `NotificationsProvider` is mounted. */
|
|
3
|
+
fallbackUnreadCount?: number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* - `cell` (default): a cell of the top bar, as `AppHeader` draws it.
|
|
7
|
+
* - `floating`: a 36px bordered square for a place with no bar around it —
|
|
8
|
+
* `AppLayout`'s `contentCorner`.
|
|
9
|
+
* - `compact`: `HeaderButton`'s compact cell (20px glyph, pressed while the
|
|
10
|
+
* drawer is open) for the navigation sidebar's foot
|
|
11
|
+
* (beside the account row, `NavigationSidebarConfig.footerSlot`).
|
|
12
|
+
*/
|
|
13
|
+
variant?: 'cell' | 'floating' | 'compact';
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The notifications bell: toggles the `NotificationDrawer` through the
|
|
18
|
+
* `NotificationsProvider` it reads, shows the shared unread dot, and turns into
|
|
19
|
+
* a close "X" while the drawer is open. Disabled with no provider above it.
|
|
20
|
+
*
|
|
21
|
+
* `AppHeader` renders it under `showNotifications`. Without a header (the
|
|
22
|
+
* `AppLayout` `desktopHeader={false}` shell), render it in `contentCorner`
|
|
23
|
+
* (`floating`) or at the sidebar's foot (`compact`); the drawer
|
|
24
|
+
* `AppLayout` mounts follows the same provider either way.
|
|
25
|
+
*/
|
|
26
|
+
export declare function NotificationsBellButton({ fallbackUnreadCount, disabled, variant, className, }: NotificationsBellButtonProps): import("react").JSX.Element;
|
|
27
|
+
export default NotificationsBellButton;
|
|
28
|
+
//# sourceMappingURL=notifications-bell-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications-bell-button.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/notifications-bell-button.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,4BAA4B;IAC3C,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,mBAAuB,EACvB,QAAgB,EAChB,OAAgB,EAChB,SAAS,GACV,EAAE,4BAA4B,+BA4B9B;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { useOptionalNotifications } from "../features/notifications/notifications-context.js";
|
|
5
|
+
import { XmarkIcon } from "../icons-v2-generated/index.js";
|
|
6
|
+
import { BellIcon } from "../icons-v2-generated/interface/bell-icon.js";
|
|
7
|
+
import { HeaderButton } from "./header-button.js";
|
|
8
|
+
function NotificationsBellButton({
|
|
9
|
+
fallbackUnreadCount = 0,
|
|
10
|
+
disabled = false,
|
|
11
|
+
variant = "cell",
|
|
12
|
+
className
|
|
13
|
+
}) {
|
|
14
|
+
const ctx = useOptionalNotifications();
|
|
15
|
+
const hasUnread = (ctx?.unreadCount ?? fallbackUnreadCount) > 0;
|
|
16
|
+
const isActive = ctx?.isOpen ?? false;
|
|
17
|
+
const onClick = ctx?.toggle;
|
|
18
|
+
const floating = variant === "floating";
|
|
19
|
+
const iconClassName = variant === "cell" ? "h-6 w-6" : "h-5 w-5";
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
HeaderButton,
|
|
22
|
+
{
|
|
23
|
+
icon: isActive ? /* @__PURE__ */ jsx(XmarkIcon, { className: iconClassName }) : /* @__PURE__ */ jsx(BellIcon, { className: iconClassName }),
|
|
24
|
+
showUnreadDot: !isActive && hasUnread,
|
|
25
|
+
"aria-label": isActive ? "Close notifications" : "Notifications",
|
|
26
|
+
onClick,
|
|
27
|
+
isActive,
|
|
28
|
+
disabled: disabled || !onClick,
|
|
29
|
+
size: variant === "compact" ? "compact" : "cell",
|
|
30
|
+
className: cn(
|
|
31
|
+
// Overrides the cell's bar-driven `h-full w-[--top-nav-cell]` box.
|
|
32
|
+
floating && "h-9 w-9 rounded-md border border-ods-border",
|
|
33
|
+
// An opaque face over the page; the cell's own active colour wins while open.
|
|
34
|
+
floating && !isActive && "bg-ods-card",
|
|
35
|
+
className
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
var notifications_bell_button_default = NotificationsBellButton;
|
|
41
|
+
export {
|
|
42
|
+
NotificationsBellButton,
|
|
43
|
+
notifications_bell_button_default as default
|
|
44
|
+
};
|
|
@@ -7,8 +7,14 @@ export interface TicketAlertsButtonProps {
|
|
|
7
7
|
* drawer also smooth-scrolls the row). */
|
|
8
8
|
href: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* - `cell` (default): a cell of the top bar.
|
|
12
|
+
* - `compact`: `HeaderButton`'s compact cell with a 20px glyph and the same count pill,
|
|
13
|
+
* for the navigation sidebar's foot, beside the account row (`footerSlot`).
|
|
14
|
+
*/
|
|
15
|
+
variant?: 'cell' | 'compact';
|
|
10
16
|
className?: string;
|
|
11
17
|
}
|
|
12
|
-
export declare function TicketAlertsButton({ href, disabled, className }: TicketAlertsButtonProps): import("react").JSX.Element | null;
|
|
18
|
+
export declare function TicketAlertsButton({ href, disabled, variant, className }: TicketAlertsButtonProps): import("react").JSX.Element | null;
|
|
13
19
|
export default TicketAlertsButton;
|
|
14
20
|
//# sourceMappingURL=ticket-alerts-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-alerts-button.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/ticket-alerts-button.tsx"],"names":[],"mappings":"AAuCA,MAAM,WAAW,uBAAuB;IACtC;;;;;+CAK2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ticket-alerts-button.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/ticket-alerts-button.tsx"],"names":[],"mappings":"AAuCA,MAAM,WAAW,uBAAuB;IACtC;;;;;+CAK2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAgB,EAAE,SAAS,EAAE,EAAE,uBAAuB,sCAiC1G;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { LifeBuoyIcon } from "../icons-v2-generated/interface/life-buoy-icon.js"
|
|
|
8
8
|
import { useOptionalTicketLive } from "../tickets/ticket-live-provider.js";
|
|
9
9
|
import { HeaderButton } from "./header-button.js";
|
|
10
10
|
import { UnreadCountBadge } from "./unread-dot.js";
|
|
11
|
-
function TicketAlertsButton({ href, disabled, className }) {
|
|
11
|
+
function TicketAlertsButton({ href, disabled, variant = "cell", className }) {
|
|
12
12
|
const live = useOptionalTicketLive();
|
|
13
13
|
const runtime = useChatRuntime();
|
|
14
14
|
if (!live || !live.authed || live.unreadTotal === 0) return null;
|
|
@@ -25,13 +25,14 @@ function TicketAlertsButton({ href, disabled, className }) {
|
|
|
25
25
|
// count pill (sidebar count-pill precedent) and by the cell only
|
|
26
26
|
// existing while updates are unread — never by tinting the glyph.
|
|
27
27
|
/* @__PURE__ */ jsxs("span", { className: "relative inline-flex", children: [
|
|
28
|
-
/* @__PURE__ */ jsx(LifeBuoyIcon, { className: "h-6 w-6" }),
|
|
28
|
+
/* @__PURE__ */ jsx(LifeBuoyIcon, { className: variant === "compact" ? "h-5 w-5" : "h-6 w-6" }),
|
|
29
29
|
/* @__PURE__ */ jsx(UnreadCountBadge, { count: live.unreadTotal })
|
|
30
30
|
] })
|
|
31
31
|
),
|
|
32
32
|
"aria-label": `Support tickets \u2014 ${live.unreadTotal} unread ${live.unreadTotal === 1 ? "update" : "updates"}`,
|
|
33
33
|
onClick: handleClick,
|
|
34
34
|
disabled,
|
|
35
|
+
size: variant,
|
|
35
36
|
className: cn(className)
|
|
36
37
|
}
|
|
37
38
|
);
|