@flamingo-stack/openframe-frontend-core 0.0.825 → 0.0.826
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-O4IQCJAX.cjs} +5 -5
- package/dist/{chunk-QOAA7ZHB.cjs → chunk-2HQNXX2K.cjs} +2 -2
- package/dist/{chunk-2U7GXE3T.cjs → chunk-2TQJSB62.cjs} +2157 -811
- package/dist/{chunk-NONMZ5WJ.cjs → chunk-2VLPXUQK.cjs} +14 -83
- package/dist/{chunk-7DJWIVQC.cjs → chunk-37OYBX7W.cjs} +36 -36
- package/dist/{chunk-OBQ5WUNG.cjs → chunk-3B6ZE4EZ.cjs} +29 -29
- package/dist/{chunk-AO6YVNAH.cjs → chunk-5AQKXEMI.cjs} +979 -1357
- package/dist/{chunk-25HBH4J6.cjs → chunk-5BM7X4GA.cjs} +2 -2
- package/dist/{chunk-47SHKOCY.cjs → chunk-63T2KKDZ.cjs} +86 -86
- package/dist/{chunk-MHR4C465.cjs → chunk-6G4WRMEM.cjs} +3 -3
- package/dist/{chunk-AUBR3FGY.cjs → chunk-74GWFGH2.cjs} +28 -28
- package/dist/{chunk-467T3LCG.cjs → chunk-7PZQ7SHB.cjs} +49 -32
- package/dist/{chunk-6LVJKPR3.cjs → chunk-AJM4YZTW.cjs} +8 -8
- 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-2IWAHBCC.cjs → chunk-DRSFR5AC.cjs} +159 -159
- package/dist/{chunk-IJCSQFLD.cjs → chunk-DU6AF77X.cjs} +83 -121
- package/dist/{chunk-NL34HKLS.cjs → chunk-EJNDTSKY.cjs} +91 -91
- package/dist/{chunk-SBFBNOKU.cjs → chunk-ENMPSEEQ.cjs} +4 -4
- package/dist/{chunk-ZECG6GU5.cjs → chunk-F2J5WN6U.cjs} +2 -2
- package/dist/{chunk-BOS7OIC4.cjs → chunk-GRHF5SWL.cjs} +5 -2
- package/dist/{chunk-Z7BLMJEI.cjs → chunk-GZAPOCKS.cjs} +54 -54
- package/dist/{chunk-5S2GW6YG.cjs → chunk-HJAPXKWK.cjs} +17 -17
- package/dist/{chunk-P25RVNGX.cjs → chunk-HQ4FKHOO.cjs} +249 -108
- package/dist/{chunk-ZRDVFADQ.cjs → chunk-IBD2FPSX.cjs} +75 -9
- package/dist/{chunk-T266OITJ.cjs → chunk-IKWQW3YJ.cjs} +45 -45
- package/dist/{chunk-B7NSH7IK.cjs → chunk-IWQ2LJGW.cjs} +5 -5
- package/dist/{chunk-MALCUN2G.cjs → chunk-JDR72QFU.cjs} +12 -14
- package/dist/{chunk-EHANO6UE.cjs → chunk-K34TTZAE.cjs} +9 -129
- package/dist/{chunk-QDDBOCG3.cjs → chunk-KPGKTEEB.cjs} +2 -2
- package/dist/{chunk-4IY5FKYL.cjs → chunk-MDEOCOIE.cjs} +23 -23
- package/dist/chunk-OEP5KAT6.cjs +56 -0
- package/dist/chunk-OT6P57ZS.cjs +94 -0
- package/dist/{chunk-QQT23JJ7.cjs → chunk-PBHP3FHO.cjs} +4 -4
- package/dist/{chunk-IMMTH3F3.cjs → chunk-PJY3SYCS.cjs} +29 -27
- package/dist/{chunk-N7IDLF2G.cjs → chunk-PWAKRRRO.cjs} +1283 -268
- package/dist/{chunk-UEULXVW2.cjs → chunk-QS6AKUUL.cjs} +22 -22
- package/dist/{chunk-BN7QENV7.cjs → chunk-QYJZDEG7.cjs} +6 -6
- package/dist/{chunk-NPNZAAOB.cjs → chunk-S6UJEW4G.cjs} +2 -2
- package/dist/{chunk-XJMLZ63Y.cjs → chunk-TJG2BJ5J.cjs} +4 -4
- package/dist/{chunk-QOOMUGF2.cjs → chunk-TYJ73DHW.cjs} +15 -15
- package/dist/{chunk-A34UNP5V.cjs → chunk-W4VEDSAX.cjs} +80 -11
- package/dist/{chunk-DNZCSPMU.cjs → chunk-WGMU45NV.cjs} +20 -20
- package/dist/{chunk-APTFXX2C.cjs → chunk-XDHQC4XH.cjs} +46 -46
- package/dist/{cloud-tenants-M4VFFN33.cjs → cloud-tenants-F67KQ5GC.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/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-SJORCARH.cjs} +109 -107
- package/dist/dots-loader-icon-5JXWD6FB.cjs +7 -0
- package/dist/{embeddable-chat-NBJMXEXB.cjs → embeddable-chat-7Z4CEZJL.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-QXILUVEM.cjs} +109 -107
- package/dist/{logs-2LV7DTSL.cjs → logs-E3KQQQD6.cjs} +118 -115
- package/dist/mingo-logo-icon-WGPBSDTF.cjs +7 -0
- package/dist/{policies-HSDYIQBX.cjs → policies-IOYQY6TF.cjs} +112 -110
- package/dist/{remote-session-BQMTIQTU.cjs → remote-session-QGFG5WAL.cjs} +99 -97
- package/dist/{scripts-UI6V7ANQ.cjs → scripts-E5TWWUNP.cjs} +115 -113
- package/dist/{software-update-WMLY7VHH.cjs → software-update-QZGYG4TD.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/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
|
@@ -33,7 +33,12 @@ export interface ActionsMenuItem {
|
|
|
33
33
|
icon?: React.ReactNode;
|
|
34
34
|
onClick?: () => void;
|
|
35
35
|
disabled?: boolean;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* `checkbox`: one of many options, a box, the menu stays open. `radio`: one
|
|
38
|
+
* option of a set (a choice, not a toggle) — a check on the chosen one, the
|
|
39
|
+
* menu closes on a pick.
|
|
40
|
+
*/
|
|
41
|
+
type?: 'item' | 'checkbox' | 'radio' | 'submenu' | 'separator';
|
|
37
42
|
checked?: boolean;
|
|
38
43
|
/**
|
|
39
44
|
* Keep the dropdown open after this item is clicked instead of closing it
|
|
@@ -81,6 +86,11 @@ interface MenuItemProps {
|
|
|
81
86
|
onItemClick?: (item: ActionsMenuItem) => void;
|
|
82
87
|
}
|
|
83
88
|
|
|
89
|
+
// A row's glyphs, the leading one and the trailing action's: 16px, 24px from md (the menu
|
|
90
|
+
// follows the window), whatever size the caller drew them at. The slot alone sized the box,
|
|
91
|
+
// so an `h-6 w-6` glyph squeezed to 16x24 below md and a `size={24}` one overflowed it.
|
|
92
|
+
const ROW_GLYPH_CLASSES = '[&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6';
|
|
93
|
+
|
|
84
94
|
const ROW_CLASSES =
|
|
85
95
|
'flex flex-1 min-w-0 items-center gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-s)] cursor-pointer transition-colors bg-ods-bg outline-none';
|
|
86
96
|
const WRAPPER_CLASSES = 'relative flex items-stretch border-b border-ods-border last:border-b-0';
|
|
@@ -114,7 +124,7 @@ const SecondaryAction: React.FC<{ action: ActionsMenuItemIconAction }> = ({ acti
|
|
|
114
124
|
openInNewTab={action.openInNewTab}
|
|
115
125
|
aria-label={action['aria-label']}
|
|
116
126
|
disabled={action.disabled}
|
|
117
|
-
className={cn(action.openInNewTab && 'max-md:hidden')}
|
|
127
|
+
className={cn(ROW_GLYPH_CLASSES, action.openInNewTab && 'max-md:hidden')}
|
|
118
128
|
onClick={handleClick}
|
|
119
129
|
>
|
|
120
130
|
{action.icon}
|
|
@@ -193,6 +203,7 @@ const MenuItem: React.FC<MenuItemProps> = ({ item, onItemClick }) => {
|
|
|
193
203
|
<div
|
|
194
204
|
className={cn(
|
|
195
205
|
'flex h-4 w-4 flex-shrink-0 items-center justify-center md:h-6 md:w-6',
|
|
206
|
+
ROW_GLYPH_CLASSES,
|
|
196
207
|
item.danger && 'text-ods-error',
|
|
197
208
|
item.disabled && 'opacity-50',
|
|
198
209
|
)}
|
|
@@ -210,6 +221,10 @@ const MenuItem: React.FC<MenuItemProps> = ({ item, onItemClick }) => {
|
|
|
210
221
|
{item.label}
|
|
211
222
|
</span>
|
|
212
223
|
|
|
224
|
+
{item.type === 'radio' && item.checked && (
|
|
225
|
+
<Check className="h-4 w-4 shrink-0 text-ods-accent md:h-6 md:w-6" strokeWidth={3} aria-hidden="true" />
|
|
226
|
+
)}
|
|
227
|
+
|
|
213
228
|
{item.type === 'checkbox' && (
|
|
214
229
|
<div
|
|
215
230
|
className={cn(
|
|
@@ -276,7 +291,8 @@ const MenuItem: React.FC<MenuItemProps> = ({ item, onItemClick }) => {
|
|
|
276
291
|
return (
|
|
277
292
|
<div className={WRAPPER_CLASSES}>
|
|
278
293
|
<div
|
|
279
|
-
role=
|
|
294
|
+
role={item.type === 'radio' ? 'menuitemradio' : 'menuitem'}
|
|
295
|
+
aria-checked={item.type === 'radio' ? !!item.checked : undefined}
|
|
280
296
|
tabIndex={item.disabled ? -1 : 0}
|
|
281
297
|
aria-disabled={item.disabled}
|
|
282
298
|
className={itemClasses}
|
|
@@ -75,6 +75,18 @@ export interface FadePreviewProps {
|
|
|
75
75
|
children: React.ReactNode;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The preview fade every fading surface shares: the content itself goes from opaque to
|
|
80
|
+
* fully transparent towards the bottom of its box, from `from` (a CSS length or
|
|
81
|
+
* percentage) down, so whatever lies behind it shows through - no colour of its own.
|
|
82
|
+
* `FadePreview` fades from `30%`; the layout's floating composer dock fades the page
|
|
83
|
+
* under it over the dock's height.
|
|
84
|
+
*/
|
|
85
|
+
export function previewFadeMask(from: string): Pick<React.CSSProperties, 'maskImage' | 'WebkitMaskImage'> {
|
|
86
|
+
const mask = `linear-gradient(to bottom, black ${from}, transparent 100%)`;
|
|
87
|
+
return { maskImage: mask, WebkitMaskImage: mask };
|
|
88
|
+
}
|
|
89
|
+
|
|
78
90
|
/** The content's box in fill mode, per breakpoint (spelled out: Tailwind only emits classes it can read). */
|
|
79
91
|
const FILL_CLASSES: Record<string, string> = {
|
|
80
92
|
true: 'absolute inset-0',
|
|
@@ -243,12 +255,7 @@ export function FadePreview({
|
|
|
243
255
|
...(!fixed
|
|
244
256
|
? { maxHeight: expanded && openHeight != null ? `${openHeight}px` : cssLength(collapsedHeight) }
|
|
245
257
|
: {}),
|
|
246
|
-
...(!expanded && needsFade
|
|
247
|
-
? {
|
|
248
|
-
maskImage: 'linear-gradient(to bottom, black 30%, transparent 100%)',
|
|
249
|
-
WebkitMaskImage: 'linear-gradient(to bottom, black 30%, transparent 100%)',
|
|
250
|
-
}
|
|
251
|
-
: {}),
|
|
258
|
+
...(!expanded && needsFade ? previewFadeMask('30%') : {}),
|
|
252
259
|
}}
|
|
253
260
|
>
|
|
254
261
|
{children}
|
|
@@ -139,6 +139,7 @@ export * from './dropdown-button';
|
|
|
139
139
|
export * from './more-actions-menu';
|
|
140
140
|
export * from './organization-card';
|
|
141
141
|
export * from './page-actions';
|
|
142
|
+
export * from './mobile-action-bar';
|
|
142
143
|
export * from './service-card';
|
|
143
144
|
export * from './slider';
|
|
144
145
|
export * from './avatar-stack';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { type RefObject, useEffect, useSyncExternalStore } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The height of the window-pinned action bar a page draws on a phone or a tablet
|
|
7
|
+
* (`PageActions`, below `md`), for chrome that must stay clear of it — e.g. a host's
|
|
8
|
+
* floating chat button. 0 while there is none, and from `md` up, where the bar is
|
|
9
|
+
* hidden. A module store rather than a context: the bar is drawn inside the page and
|
|
10
|
+
* read by the layout around it.
|
|
11
|
+
*/
|
|
12
|
+
const heights = new Map<Element, number>();
|
|
13
|
+
const listeners = new Set<() => void>();
|
|
14
|
+
let tallest = 0;
|
|
15
|
+
/** How many surfaces drawn over the page (a chat sheet) cover the bar now. */
|
|
16
|
+
let covers = 0;
|
|
17
|
+
|
|
18
|
+
function notify() {
|
|
19
|
+
for (const listener of listeners) listener();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function publish() {
|
|
23
|
+
const next = Math.max(0, ...heights.values());
|
|
24
|
+
if (next === tallest) return;
|
|
25
|
+
tallest = next;
|
|
26
|
+
notify();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function subscribe(listener: () => void) {
|
|
30
|
+
listeners.add(listener);
|
|
31
|
+
return () => {
|
|
32
|
+
listeners.delete(listener);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Reports the bar under `ref` while it is mounted; a hidden bar measures 0. */
|
|
37
|
+
export function useReportMobileActionBar(ref: RefObject<HTMLElement | null>): void {
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const element = ref.current;
|
|
40
|
+
if (!element || typeof ResizeObserver === 'undefined') return undefined;
|
|
41
|
+
const observer = new ResizeObserver(() => {
|
|
42
|
+
heights.set(element, element.getBoundingClientRect().height);
|
|
43
|
+
publish();
|
|
44
|
+
});
|
|
45
|
+
observer.observe(element);
|
|
46
|
+
return () => {
|
|
47
|
+
observer.disconnect();
|
|
48
|
+
heights.delete(element);
|
|
49
|
+
publish();
|
|
50
|
+
};
|
|
51
|
+
}, [ref]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* While `active`, the page's action bar steps aside for a surface drawn over the page
|
|
56
|
+
* (a chat sheet over it): the bar is the page's, and would otherwise split that surface
|
|
57
|
+
* from the composer under it. It keeps its room, so the page under the scrim stays put.
|
|
58
|
+
*/
|
|
59
|
+
export function useCoverMobileActionBar(active: boolean): void {
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!active) return undefined;
|
|
62
|
+
covers += 1;
|
|
63
|
+
notify();
|
|
64
|
+
return () => {
|
|
65
|
+
covers -= 1;
|
|
66
|
+
notify();
|
|
67
|
+
};
|
|
68
|
+
}, [active]);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Whether a surface over the page covers the action bar now. */
|
|
72
|
+
export function useMobileActionBarCovered(): boolean {
|
|
73
|
+
return useSyncExternalStore(
|
|
74
|
+
subscribe,
|
|
75
|
+
() => covers > 0,
|
|
76
|
+
() => false,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The window-pinned action bar's height, 0 while no page draws one. */
|
|
81
|
+
export function useMobileActionBarHeight(): number {
|
|
82
|
+
return useSyncExternalStore(
|
|
83
|
+
subscribe,
|
|
84
|
+
() => tallest,
|
|
85
|
+
() => 0,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
// Leading-icon glyph scale: 16px on mobile, 24px on md+.
|
|
7
|
+
// Leading-icon glyph scale: 16px on mobile, 24px on md+. The slot is that box
|
|
8
|
+
// itself, not the glyph's: a glyph still on its way (an agent's mark reads its
|
|
9
|
+
// icon from the server) or drawn a frame late leaves the slot its height, so the
|
|
10
|
+
// title or label beside it does not jump when it lands. Color is intentionally
|
|
8
11
|
// omitted so the glyph inherits the current text color.
|
|
9
12
|
export const noDataIconClasses =
|
|
10
|
-
'inline-flex shrink-0 items-center justify-center [&_svg]:h-4 [&_svg]:w-4 content-md:[&_svg]:h-6 content-md:[&_svg]:w-6';
|
|
13
|
+
'inline-flex size-4 shrink-0 items-center justify-center content-md:size-6 [&_svg]:h-4 [&_svg]:w-4 content-md:[&_svg]:h-6 content-md:[&_svg]:w-6';
|
|
11
14
|
|
|
12
15
|
// Surface for the info-block group container: a transparent, bordered panel with
|
|
13
16
|
// rounded corners. `overflow-hidden` keeps only the outer blocks round — inner
|
|
@@ -4,10 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import { cn } from '../../utils/cn';
|
|
5
5
|
import { Chevron02DownIcon } from '../icons-v2-generated';
|
|
6
6
|
import { InteractiveSkeleton } from '../loading/unified-skeleton';
|
|
7
|
+
import { useComposerDockHeight } from '../navigation/app-layout-context';
|
|
7
8
|
import { ActionsMenuDropdown, type ActionsMenuGroup, type ActionsMenuItem } from './actions-menu';
|
|
8
9
|
import type { ButtonProps, SplitButtonIconAction } from './button';
|
|
9
10
|
import { Button, SplitButton } from './button';
|
|
10
11
|
import { InertWhileLoading, useLoadingScope } from './loading-scope';
|
|
12
|
+
import { useMobileActionBarCovered, useReportMobileActionBar } from './mobile-action-bar';
|
|
11
13
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';
|
|
12
14
|
|
|
13
15
|
export type PageActionButton = {
|
|
@@ -178,9 +180,9 @@ function renderRawActionButton(action: PageActionButton, opts: RenderOptions = {
|
|
|
178
180
|
onClick={action.onClick}
|
|
179
181
|
disabled={action.disabled}
|
|
180
182
|
mainDisabled={action.mainDisabled}
|
|
181
|
-
leftIcon={action.icon}
|
|
183
|
+
leftIcon={actionGlyph(action.icon)}
|
|
182
184
|
fullWidth={opts.fullWidth}
|
|
183
|
-
iconAction={action.iconAction}
|
|
185
|
+
iconAction={{ ...action.iconAction, icon: actionGlyph(action.iconAction.icon) }}
|
|
184
186
|
>
|
|
185
187
|
{action.label}
|
|
186
188
|
</SplitButton>
|
|
@@ -197,7 +199,7 @@ function renderRawActionButton(action: PageActionButton, opts: RenderOptions = {
|
|
|
197
199
|
variant="outline"
|
|
198
200
|
disabled={action.disabled}
|
|
199
201
|
loading={action.loading}
|
|
200
|
-
leftIcon={action.icon}
|
|
202
|
+
leftIcon={actionGlyph(action.icon)}
|
|
201
203
|
splitIcon={<Chevron02DownIcon className="h-4 w-4" />}
|
|
202
204
|
className={opts.fullWidth ? 'flex-1' : undefined}
|
|
203
205
|
>
|
|
@@ -211,10 +213,12 @@ function renderRawActionButton(action: PageActionButton, opts: RenderOptions = {
|
|
|
211
213
|
// Icon-only button (no label, or explicitly icon-only on desktop).
|
|
212
214
|
const isIconOnly = opts.iconOnly || !action.label || action.iconOnlyOnDesktop;
|
|
213
215
|
if (isIconOnly) {
|
|
214
|
-
const iconNode =
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
const iconNode = actionGlyph(
|
|
217
|
+
action.iconOnlyOnDesktop ? (
|
|
218
|
+
<span className="inline-flex [&_svg]:!text-ods-text-primary">{action.icon}</span>
|
|
219
|
+
) : (
|
|
220
|
+
action.icon
|
|
221
|
+
),
|
|
218
222
|
);
|
|
219
223
|
return (
|
|
220
224
|
<Button
|
|
@@ -242,7 +246,7 @@ function renderRawActionButton(action: PageActionButton, opts: RenderOptions = {
|
|
|
242
246
|
onClick={action.onClick}
|
|
243
247
|
disabled={action.disabled}
|
|
244
248
|
loading={action.loading}
|
|
245
|
-
leftIcon={action.icon}
|
|
249
|
+
leftIcon={actionGlyph(action.icon)}
|
|
246
250
|
className={opts.fullWidth ? 'flex-1' : undefined}
|
|
247
251
|
>
|
|
248
252
|
{action.label}
|
|
@@ -273,6 +277,18 @@ export interface PageActionsProps {
|
|
|
273
277
|
|
|
274
278
|
const ACTIONS_GAP = 'gap-[var(--spacing-system-xs)]';
|
|
275
279
|
|
|
280
|
+
/**
|
|
281
|
+
* An action's glyph: 16px, 24px from the content area's md, whatever size the caller drew it at
|
|
282
|
+
* (`<Icon className="h-6 w-6" />`, `size={24}`) and over `Button`'s flat 20px. `&&` doubles the
|
|
283
|
+
* class (specificity 0,2,1) to win over `Button`'s own `[&_svg]` rule (0,1,1) without leaning on
|
|
284
|
+
* stylesheet order. The "…" menu sizes its rows' glyphs on the same steps (`ActionsMenu`).
|
|
285
|
+
*/
|
|
286
|
+
const ACTION_GLYPH_CLASSES = 'inline-flex [&&_svg]:h-4 [&&_svg]:w-4 content-md:[&&_svg]:h-6 content-md:[&&_svg]:w-6';
|
|
287
|
+
|
|
288
|
+
function actionGlyph(icon: React.ReactNode): React.ReactNode {
|
|
289
|
+
return icon ? <span className={ACTION_GLYPH_CLASSES}>{icon}</span> : icon;
|
|
290
|
+
}
|
|
291
|
+
|
|
276
292
|
/**
|
|
277
293
|
* While the page reads the record that decides which actions exist (`loading`), the actions the caller passed are
|
|
278
294
|
* drawn for real and inert: a labelled or icon button is static copy, so its box and its label are the loaded ones,
|
|
@@ -513,19 +529,30 @@ function CompactPrimaryActions({ actions, loading: loadingProp }: { actions: Pag
|
|
|
513
529
|
|
|
514
530
|
function MobileBottomActions({ actions, loading: loadingProp }: { actions: PageActionButton[]; loading?: boolean }) {
|
|
515
531
|
const loading = useLoadingScope() || loadingProp;
|
|
532
|
+
// Over the composer dock where the layout has one.
|
|
533
|
+
const dockHeight = useComposerDockHeight();
|
|
534
|
+
// Its height, for the chrome that stays clear of it (`useMobileActionBarHeight`).
|
|
535
|
+
const barRef = React.useRef<HTMLDivElement>(null);
|
|
536
|
+
useReportMobileActionBar(barRef);
|
|
537
|
+
// Out of sight under a surface over the page (a chat sheet), keeping its room.
|
|
538
|
+
const covered = useMobileActionBarCovered();
|
|
516
539
|
// The placeholder for an action set nobody knows yet: only when the caller says so (`loading`), never because a
|
|
517
540
|
// loading scope is on (a page that knows its actions draws them, an empty set included).
|
|
518
541
|
const unknownSet = !!loadingProp;
|
|
519
542
|
return (
|
|
520
543
|
<div
|
|
544
|
+
ref={barRef}
|
|
545
|
+
data-testid="mobile-action-bar"
|
|
546
|
+
style={dockHeight > 0 ? { bottom: dockHeight } : undefined}
|
|
521
547
|
className={cn(
|
|
522
548
|
'fixed bottom-0 left-0 right-0 z-50 md:hidden',
|
|
523
549
|
'border-t border-ods-border bg-ods-card',
|
|
550
|
+
covered && 'invisible',
|
|
524
551
|
// `lf` (24px at every breakpoint), NOT `l` — this bar is `md:hidden`, so the
|
|
525
552
|
// only value it ever uses is the MOBILE one, and `l` is 16px there. The
|
|
526
|
-
// fixed variant is what keeps the 24px the bar has always had.
|
|
527
|
-
'
|
|
528
|
-
|
|
553
|
+
// fixed variant is what keeps the 24px the bar has always had. The gap
|
|
554
|
+
// between its buttons IS `l`, the design's 16px there (not the header's `xs`).
|
|
555
|
+
'flex items-start gap-[var(--spacing-system-l)] p-[var(--spacing-system-lf)]',
|
|
529
556
|
)}
|
|
530
557
|
>
|
|
531
558
|
{actions.map((action, idx) => (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { type KeyboardEvent, type PointerEvent, type RefObject, useEffect, useRef } from 'react';
|
|
3
|
+
import { type KeyboardEvent, type PointerEvent, type ReactNode, type RefObject, useEffect, useRef } from 'react';
|
|
4
4
|
|
|
5
5
|
import { cn } from '../../utils/cn';
|
|
6
6
|
|
|
@@ -43,6 +43,10 @@ export interface PanelResizeHandleProps {
|
|
|
43
43
|
* `AppLayoutDrawer`. They differ in track width and grip colour only. */
|
|
44
44
|
variant: 'overlay' | 'inLayout';
|
|
45
45
|
ariaLabel?: string;
|
|
46
|
+
/** Where and how big the hit area is, over the side's default track (merged last). */
|
|
47
|
+
className?: string;
|
|
48
|
+
/** What the handle draws in place of the default grip bar. */
|
|
49
|
+
grip?: ReactNode;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
export function PanelResizeHandle({
|
|
@@ -55,6 +59,8 @@ export function PanelResizeHandle({
|
|
|
55
59
|
panelRef,
|
|
56
60
|
variant,
|
|
57
61
|
ariaLabel,
|
|
62
|
+
className,
|
|
63
|
+
grip,
|
|
58
64
|
}: PanelResizeHandleProps) {
|
|
59
65
|
const isHorizontal = HORIZONTAL_SIDES.has(side);
|
|
60
66
|
const startRef = useRef<{ x: number; y: number; size: number } | null>(null);
|
|
@@ -173,12 +179,15 @@ export function PanelResizeHandle({
|
|
|
173
179
|
'outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0',
|
|
174
180
|
trackPosition,
|
|
175
181
|
cursorClass,
|
|
182
|
+
className,
|
|
176
183
|
)}
|
|
177
184
|
>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
{grip ?? (
|
|
186
|
+
<div
|
|
187
|
+
aria-hidden
|
|
188
|
+
className={cn('rounded-full', variant === 'inLayout' ? 'bg-ods-border' : 'bg-ods-bg-surface', gripClass)}
|
|
189
|
+
/>
|
|
190
|
+
)}
|
|
182
191
|
</div>
|
|
183
192
|
);
|
|
184
193
|
}
|
|
@@ -119,11 +119,14 @@ const SquareAvatar = memo(
|
|
|
119
119
|
<Image
|
|
120
120
|
className={cn(
|
|
121
121
|
'absolute max-w-none',
|
|
122
|
+
// Important: the picture's size and fit are the avatar's, whatever slot it is drawn in. A field's
|
|
123
|
+
// start adornment sizes every image under it as an icon (`[&_img]:size-4 object-contain`), a
|
|
124
|
+
// descendant rule that outranks a plain class and shrank a photo to a corner of its frame.
|
|
122
125
|
fit === 'contain'
|
|
123
126
|
? // A LOGO or crest must fit whole; cover would slice its edges.
|
|
124
|
-
cn('inset-0 h-full w-full object-contain', padded && 'p-1')
|
|
127
|
+
cn('inset-0 !h-full !w-full !object-contain', padded && 'p-1')
|
|
125
128
|
: // A portrait fills the frame; the 1px overscan hides edge seams.
|
|
126
|
-
'-inset-px h-[calc(100%+2px)] w-[calc(100%+2px)] object-cover',
|
|
129
|
+
'-inset-px !h-[calc(100%+2px)] !w-[calc(100%+2px)] !object-cover',
|
|
127
130
|
)}
|
|
128
131
|
// Images are draggable by default, and a draggable child WINS over a
|
|
129
132
|
// draggable ancestor: an avatar inside a drag-and-drop card lets the
|
|
@@ -10,8 +10,10 @@ export type ContentBreakpoint = 'mobile' | 'tablet' | 'desktop';
|
|
|
10
10
|
export const CONTENT_BREAKPOINTS = { md: LAYOUT_STEPS.md.content, lg: LAYOUT_STEPS.lg.content } as const;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Width of the enclosing content area (`AppLayout` with a side panel
|
|
14
|
-
* it), or `null` outside one.
|
|
13
|
+
* Width of the enclosing content area (`AppLayout` with a side panel or a composer
|
|
14
|
+
* dock provides it), or `null` outside one. `AppLayout` moves it only when the area
|
|
15
|
+
* crosses a breakpoint, so it is a width in the area's current step, not a live
|
|
16
|
+
* measurement: read it through the hooks below.
|
|
15
17
|
*/
|
|
16
18
|
export const ContentAreaWidthContext = createContext<number | null>(null);
|
|
17
19
|
|
|
@@ -47,6 +47,74 @@
|
|
|
47
47
|
animation: pulse-cursor 1.5s ease-in-out infinite;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
/* DotsLoaderIcon (icons-v2/loaders/dots-loader.svg): its circles carry
|
|
51
|
+
`ods-dots-loader-dot`, which SVGO's prefixIds renames to the class below.
|
|
52
|
+
Each dot shrinks to r .2 and back (3 → .2 → 3), staggered by .15s.
|
|
53
|
+
|
|
54
|
+
WebKit cost of ONE loader on screen, idle (WebKit 26, 2026-10-21; a Mingo
|
|
55
|
+
chat-history row shows one for as long as a reply streams), CPU per 8 s:
|
|
56
|
+
SMIL `r` animation 1.55 s · this transform alone 1.2 s · with the icon on a
|
|
57
|
+
layer of its own 0.2 s · no loader 0.06 s. WebKit composites no SVG child, so
|
|
58
|
+
each frame repainted whatever layer held the icon (the whole sidebar); on its
|
|
59
|
+
own layer a frame repaints the 24px icon. */
|
|
60
|
+
svg:has(> .dots-loader_svg__ods-dots-loader-dot) {
|
|
61
|
+
will-change: transform;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes ods-dots-loader {
|
|
65
|
+
0%,
|
|
66
|
+
100% {
|
|
67
|
+
transform: scale(1);
|
|
68
|
+
}
|
|
69
|
+
50% {
|
|
70
|
+
transform: scale(0.0667);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dots-loader_svg__ods-dots-loader-dot {
|
|
75
|
+
transform-box: fill-box;
|
|
76
|
+
transform-origin: center;
|
|
77
|
+
animation: ods-dots-loader 0.75s linear infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dots-loader_svg__ods-dots-loader-dot:nth-of-type(2) {
|
|
81
|
+
animation-delay: 0.15s;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dots-loader_svg__ods-dots-loader-dot:nth-of-type(3) {
|
|
85
|
+
animation-delay: 0.3s;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* The same loader as HTML boxes, where one stays on screen for long (a Mingo chat
|
|
89
|
+
row while a reply streams): WebKit runs an HTML box's transform animation off
|
|
90
|
+
the main thread, an SVG child's on it. Same 24px box, 6px dots centred at 4, 12
|
|
91
|
+
and 20px, same keyframes and stagger. */
|
|
92
|
+
.ods-dots-loader {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
width: 24px;
|
|
95
|
+
height: 24px;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: space-between;
|
|
99
|
+
padding-inline: 1px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ods-dots-loader > span {
|
|
103
|
+
width: 6px;
|
|
104
|
+
height: 6px;
|
|
105
|
+
border-radius: 9999px;
|
|
106
|
+
background-color: currentColor;
|
|
107
|
+
animation: ods-dots-loader 0.75s linear infinite;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ods-dots-loader > span:nth-child(2) {
|
|
111
|
+
animation-delay: 0.15s;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ods-dots-loader > span:nth-child(3) {
|
|
115
|
+
animation-delay: 0.3s;
|
|
116
|
+
}
|
|
117
|
+
|
|
50
118
|
/* Quick action hint animation - Very slow breathing glow */
|
|
51
119
|
@keyframes hint-pulse-ring {
|
|
52
120
|
0% {
|
package/src/types/navigation.ts
CHANGED
|
@@ -168,8 +168,132 @@ export interface NavigationSidebarConfig {
|
|
|
168
168
|
onNavigate?: (path: string) => void;
|
|
169
169
|
onToggleMinimized?: () => void;
|
|
170
170
|
className?: string;
|
|
171
|
+
/**
|
|
172
|
+
* How the entries are drawn. `'flat'` (the default) is the original sidebar:
|
|
173
|
+
* every entry a 56px row, `children` ignored. `'grouped'` draws entries that
|
|
174
|
+
* carry `children` as groups — the parent row, and while the group is open a
|
|
175
|
+
* bordered card holding the parent and its children (one level only) — with
|
|
176
|
+
* 44px rows and a label-only active pill. Only one group is open at a time:
|
|
177
|
+
* the one holding the active entry. The mobile burger menu follows the same
|
|
178
|
+
* switch.
|
|
179
|
+
*/
|
|
180
|
+
variant?: 'flat' | 'grouped';
|
|
181
|
+
/**
|
|
182
|
+
* The current location, pathname plus query string (`/monitoring?tab=policies`).
|
|
183
|
+
* Lets the sidebar resolve the active entry itself — through `match`, or an
|
|
184
|
+
* entry's own `path` — for entries that do not set `isActive`. Without it only
|
|
185
|
+
* `isActive` marks an entry, as before.
|
|
186
|
+
*/
|
|
187
|
+
currentPath?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Host content right below the navigation tree (the chat history), in the
|
|
190
|
+
* flow at its full height: the sidebar body scrolls the tree and the section
|
|
191
|
+
* as one, so the section must not scroll on its own.
|
|
192
|
+
* A node is hidden in the collapsed rail (it stays mounted); a function is
|
|
193
|
+
* called with the sidebar's own `minimized` state and decides for itself.
|
|
194
|
+
* Rendered in the mobile burger menu too, with `minimized: false`.
|
|
195
|
+
*/
|
|
196
|
+
sectionSlot?: NavigationSidebarSlot;
|
|
197
|
+
/**
|
|
198
|
+
* The expanded sidebar's width in px (grouped variant; default 224). Applied
|
|
199
|
+
* to the desktop sidebar, the tablet overlay and its push slot, and written to
|
|
200
|
+
* `NAVIGATION_SIDEBAR_WIDTH_VAR` while expanded — so a host's pre-paint seed
|
|
201
|
+
* must write the same number (`'<expandedWidth>px'`, or `'56px'` when the
|
|
202
|
+
* stored preference is minimized). The 56px rail does not change. A width at
|
|
203
|
+
* or below 140px is raised to 141px: the rows switch to their expanded layout
|
|
204
|
+
* at 140px. The flat variant ignores it; the mobile burger menu keeps its own
|
|
205
|
+
* width.
|
|
206
|
+
*/
|
|
207
|
+
expandedWidth?: number;
|
|
208
|
+
/**
|
|
209
|
+
* Host content pinned above the "Hide Menu" toggle (the account row). A node
|
|
210
|
+
* renders as-is in both widths; a function receives `minimized` and adapts
|
|
211
|
+
* (e.g. `AccountPopover`'s `collapsed`). Rendered at the bottom of the mobile
|
|
212
|
+
* burger menu too, with `minimized: false`.
|
|
213
|
+
*/
|
|
214
|
+
footerSlot?: NavigationSidebarSlot;
|
|
215
|
+
/**
|
|
216
|
+
* Controlled desktop collapse. When set, it replaces the persisted preference
|
|
217
|
+
* (`localStorage`): the host owns the value and seeds
|
|
218
|
+
* `NAVIGATION_SIDEBAR_WIDTH_VAR` to match it before first paint. The tablet
|
|
219
|
+
* overlay stays the sidebar's own transient state, but a CHANGE of this value
|
|
220
|
+
* opens (`false`) or closes (`true`) it too, so a host can reveal the sidebar
|
|
221
|
+
* from anywhere (⌘K) on every width. Omitted: uncontrolled, as before.
|
|
222
|
+
*/
|
|
223
|
+
collapsed?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Called with the next desktop collapse state when the user toggles it on
|
|
226
|
+
* desktop (not for the tablet overlay). Pair with `collapsed`.
|
|
227
|
+
*/
|
|
228
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
229
|
+
/**
|
|
230
|
+
* A reveal command: every CHANGE of this number (not its first value) shows
|
|
231
|
+
* the expanded sidebar at the current width — on tablet it opens the overlay
|
|
232
|
+
* (even when `collapsed` is already `false`, where a change of `collapsed`
|
|
233
|
+
* cannot), on desktop it expands a collapsed sidebar through
|
|
234
|
+
* `onCollapsedChange(false)` (controlled) or the stored preference
|
|
235
|
+
* (uncontrolled). Below md it does nothing: there the sidebar is the burger
|
|
236
|
+
* menu (`AppLayout` `mobileMenuOpen`). E.g. ⌘K bumps it before focusing the
|
|
237
|
+
* chat search in `sectionSlot`.
|
|
238
|
+
*/
|
|
239
|
+
revealSignal?: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** What a slot render function is told about the place it is drawn in. */
|
|
243
|
+
export interface NavigationSidebarSlotState {
|
|
244
|
+
minimized: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* `true` in the mobile burger menu. The menu stays mounted at every width
|
|
247
|
+
* (hidden from md up), so content that must exist once — a popover over state
|
|
248
|
+
* its sidebar copy shares — renders only where this is `false`.
|
|
249
|
+
*/
|
|
250
|
+
inDrawer: boolean;
|
|
171
251
|
}
|
|
172
252
|
|
|
253
|
+
/**
|
|
254
|
+
* A sidebar slot: a node, or a render function of the sidebar's own state (the
|
|
255
|
+
* host cannot derive `minimized` — it comes from a persisted preference, the
|
|
256
|
+
* tablet breakpoint and any open overlay).
|
|
257
|
+
*/
|
|
258
|
+
export type NavigationSidebarSlot = React.ReactNode | ((state: NavigationSidebarSlotState) => React.ReactNode);
|
|
259
|
+
|
|
260
|
+
/** The location a `NavigationSidebarItem.match` function is asked about. */
|
|
261
|
+
export interface NavigationSidebarLocation {
|
|
262
|
+
/** Without its trailing slash (`/` stays `/`). */
|
|
263
|
+
pathname: string;
|
|
264
|
+
searchParams: URLSearchParams;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* One declarative match rule. `path` is a segment-aware prefix: `/scripts`
|
|
269
|
+
* matches `/scripts` and `/scripts/details`, never `/scriptsx`.
|
|
270
|
+
*/
|
|
271
|
+
export interface NavigationSidebarMatchRule {
|
|
272
|
+
path: string;
|
|
273
|
+
/** Only the pathname itself, not the pages below it. */
|
|
274
|
+
exact?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Required query values: a string must be equal, `null` must be absent, an
|
|
277
|
+
* array accepts any of its values (`{ tab: ['queries', null] }` = the queries
|
|
278
|
+
* tab, or no tab at all).
|
|
279
|
+
*/
|
|
280
|
+
query?: Record<string, string | null | ReadonlyArray<string | null>>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* When an entry is the current page. A string is a rule written as a URL —
|
|
285
|
+
* `'/monitoring?tab=policies'` = the `/monitoring` prefix with `tab=policies`.
|
|
286
|
+
* Several rules match if any does. When several entries match, the most
|
|
287
|
+
* specific rule wins (more path segments, then more query constraints), so
|
|
288
|
+
* `/scripts` and `/scripts/schedules` need no `exclude`. A function is the host
|
|
289
|
+
* deciding outright and outranks every rule.
|
|
290
|
+
*/
|
|
291
|
+
export type NavigationSidebarMatch =
|
|
292
|
+
| string
|
|
293
|
+
| NavigationSidebarMatchRule
|
|
294
|
+
| ReadonlyArray<string | NavigationSidebarMatchRule>
|
|
295
|
+
| ((location: NavigationSidebarLocation) => boolean);
|
|
296
|
+
|
|
173
297
|
/**
|
|
174
298
|
* Navigation sidebar item interface
|
|
175
299
|
*/
|
|
@@ -187,8 +311,24 @@ export interface NavigationSidebarItem {
|
|
|
187
311
|
* themselves, and the accessible name becomes "Devices (Beta)".
|
|
188
312
|
*/
|
|
189
313
|
badge?: string;
|
|
314
|
+
/**
|
|
315
|
+
* The host's own answer to "is this the current page". When set (`true` or
|
|
316
|
+
* `false`) it wins over `match`; leave it out to let `match` / `path` decide
|
|
317
|
+
* against `NavigationSidebarConfig.currentPath`.
|
|
318
|
+
*/
|
|
190
319
|
isActive?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* When this entry is the current page, checked against
|
|
322
|
+
* `NavigationSidebarConfig.currentPath` for entries without `isActive`.
|
|
323
|
+
* Omitted: the entry's own `path` (its query included) is the rule.
|
|
324
|
+
*/
|
|
325
|
+
match?: NavigationSidebarMatch;
|
|
191
326
|
onClick?: () => void;
|
|
327
|
+
/**
|
|
328
|
+
* The group's entries (grouped variant only; one level). The flat variant
|
|
329
|
+
* ignores them. A parent's click only opens and folds the group, so a parent
|
|
330
|
+
* needs no `path`.
|
|
331
|
+
*/
|
|
192
332
|
children?: NavigationSidebarItem[];
|
|
193
333
|
section?: 'primary' | 'secondary'; // To separate top and bottom sections
|
|
194
334
|
}
|