@ghxstship/xos-ui 0.0.0-stage → 4.16.0
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/LICENSE +21 -0
- package/README.md +32 -2
- package/package.json +76 -4
- package/scripts/generate-stories.mjs +85 -0
- package/src/AIDisclosureBadge/README.md +7 -0
- package/src/AccessGridMatrix/README.md +3 -0
- package/src/Accordion/README.md +7 -0
- package/src/ActivityFeedItem/README.md +3 -0
- package/src/AgencySlate/README.md +3 -0
- package/src/AppShell/README.md +5 -0
- package/src/ApplicationForm/README.md +3 -0
- package/src/AssertionRankBadge/README.md +5 -0
- package/src/AvailabilityCalendar/README.md +3 -0
- package/src/Avatar/Avatar.tsx +56 -0
- package/src/Avatar/README.md +3 -0
- package/src/Avatar/avatar-class.ts +19 -0
- package/src/AvatarStack/README.md +3 -0
- package/src/Badge/README.md +3 -0
- package/src/Banner/README.md +3 -0
- package/src/BidSheet/README.md +3 -0
- package/src/Board/README.md +6 -0
- package/src/BrandMark/BrandMark.tsx +95 -0
- package/src/BrandMark/README.md +7 -0
- package/src/BrandSlot/README.md +6 -0
- package/src/Breadcrumbs/README.md +3 -0
- package/src/BudgetGrid/README.md +10 -0
- package/src/BulkActionBar/README.md +3 -0
- package/src/Button/Button.tsx +100 -0
- package/src/Button/README.md +10 -0
- package/src/Button/button-class.ts +54 -0
- package/src/ButtonLink/README.md +7 -0
- package/src/Calendar/README.md +3 -0
- package/src/Card/README.md +3 -0
- package/src/Chart/README.md +9 -0
- package/src/Charts/Calendar.tsx +228 -0
- package/src/Charts/Chart.tsx +547 -0
- package/src/Charts/Charts.tsx +20 -0
- package/src/Charts/Charts.types.ts +40 -0
- package/src/Charts/Gallery.tsx +25 -0
- package/src/Charts/Heatmap.tsx +116 -0
- package/src/Charts/OrgChart.tsx +53 -0
- package/src/Charts/ResourceSchedule.tsx +91 -0
- package/src/Charts/Sparkline.tsx +59 -0
- package/src/Charts/Timeline.tsx +777 -0
- package/src/Charts/categories.ts +21 -0
- package/src/Charts/timeline-plan.ts +191 -0
- package/src/Checkbox/README.md +6 -0
- package/src/ChecklistRunner/README.md +3 -0
- package/src/Chips/Badge.tsx +27 -0
- package/src/Chips/Chips.shared.tsx +34 -0
- package/src/Chips/Chips.tsx +21 -0
- package/src/Chips/Chips.types.ts +35 -0
- package/src/Chips/DepartmentChip.tsx +16 -0
- package/src/Chips/PhaseChip.tsx +16 -0
- package/src/Chips/PropertyChip.tsx +15 -0
- package/src/Chips/RecordKindChip.tsx +14 -0
- package/src/Chips/StateChip.tsx +19 -0
- package/src/Chips/Tag.tsx +47 -0
- package/src/Chips/URIDChip.tsx +14 -0
- package/src/Chips/chipClass.tsx +8 -0
- package/src/Chips/codeClass.tsx +6 -0
- package/src/ClockButton/README.md +6 -0
- package/src/CodeSample/README.md +7 -0
- package/src/ColorPicker/README.md +5 -0
- package/src/Combobox/README.md +7 -0
- package/src/CommandMenu/CommandMenu.tsx +179 -0
- package/src/CommandMenu/README.md +5 -0
- package/src/ComparisonTable/README.md +9 -0
- package/src/Compass/ChecklistRunner.tsx +128 -0
- package/src/Compass/ClockButton.tsx +57 -0
- package/src/Compass/Compass.shared.tsx +58 -0
- package/src/Compass/Compass.tsx +26 -0
- package/src/Compass/Compass.types.ts +79 -0
- package/src/Compass/DaySheetView.tsx +104 -0
- package/src/Compass/ForceUpdateScreen.tsx +29 -0
- package/src/Compass/LiveActivity.tsx +60 -0
- package/src/Compass/OfflineBanner.tsx +31 -0
- package/src/Compass/PhotoCapture.tsx +69 -0
- package/src/Compass/QuickIncidentSheet.tsx +46 -0
- package/src/Compass/ScanSheet.tsx +83 -0
- package/src/Compass/ShiftCard.tsx +55 -0
- package/src/Compass/SignaturePad.tsx +71 -0
- package/src/Compass/SyncConflictSheet.tsx +60 -0
- package/src/ConsentBanner/ConsentBanner.tsx +210 -0
- package/src/ConsentBanner/ConsentBannerStatic.tsx +163 -0
- package/src/ConsentBanner/ConsentSettings.tsx +213 -0
- package/src/ConsentBanner/README.md +101 -0
- package/src/ConsentBanner/consent.ts +238 -0
- package/src/ConsentBanner/index.ts +40 -0
- package/src/ConsentBanner/static.ts +11 -0
- package/src/ConsentBanner/useConsent.ts +160 -0
- package/src/ContextMenu/README.md +3 -0
- package/src/CoordinateMatrix/README.md +6 -0
- package/src/CredentialBadge/README.md +7 -0
- package/src/CurrencyInput/README.md +7 -0
- package/src/DataTable/DataTable.tsx +1034 -0
- package/src/DataTable/DataTableResizer.tsx +72 -0
- package/src/DataTable/DataTableVirtualizer.tsx +58 -0
- package/src/DataTable/README.md +9 -0
- package/src/DatePicker/README.md +5 -0
- package/src/DateRangePicker/README.md +3 -0
- package/src/DaySheetView/README.md +3 -0
- package/src/DepartmentChip/README.md +3 -0
- package/src/DepartmentGlyph/README.md +18 -0
- package/src/Dialog/README.md +3 -0
- package/src/DiffViewer/README.md +3 -0
- package/src/Divider/README.md +3 -0
- package/src/Drawer/README.md +3 -0
- package/src/DropdownMenu/README.md +3 -0
- package/src/EPKViewer/README.md +3 -0
- package/src/Editing/ColorPicker.tsx +125 -0
- package/src/Editing/DiffViewer.tsx +49 -0
- package/src/Editing/Editing.tsx +29 -0
- package/src/Editing/Editing.types.ts +71 -0
- package/src/Editing/FilterBuilder.tsx +72 -0
- package/src/Editing/QuickAdd.tsx +102 -0
- package/src/Editing/QuickAddChips.tsx +180 -0
- package/src/Editing/contrastRatio.tsx +11 -0
- package/src/Editing/parseQuickAdd.tsx +187 -0
- package/src/Editing/quickAddCore.ts +204 -0
- package/src/Editing/timeShorthand.ts +157 -0
- package/src/Editing/useQuickAdd.ts +201 -0
- package/src/EmergencyCodeCard/README.md +10 -0
- package/src/EmptyState/README.md +5 -0
- package/src/EngagementTimeline/README.md +3 -0
- package/src/ErrorState/README.md +3 -0
- package/src/FAQ/README.md +7 -0
- package/src/FeatureGrid/README.md +7 -0
- package/src/Feedback/Banner.tsx +40 -0
- package/src/Feedback/EmptyState.tsx +32 -0
- package/src/Feedback/ErrorState.tsx +32 -0
- package/src/Feedback/Feedback.shared.tsx +38 -0
- package/src/Feedback/Feedback.tsx +18 -0
- package/src/Feedback/Feedback.types.ts +40 -0
- package/src/Feedback/InlineAlert.tsx +19 -0
- package/src/Feedback/RefusalNotice.tsx +46 -0
- package/src/Feedback/RegionBoundary.tsx +102 -0
- package/src/Feedback/Toast.tsx +31 -0
- package/src/Feedback/ToastRegion.tsx +26 -0
- package/src/Feedback/UndoToast.tsx +97 -0
- package/src/FeedbackWidget/README.md +3 -0
- package/src/Field/Field.tsx +81 -0
- package/src/FileDrop/README.md +3 -0
- package/src/FilePreviewer/README.md +3 -0
- package/src/FilterBuilder/README.md +3 -0
- package/src/ForceUpdateScreen/README.md +3 -0
- package/src/Forms/Checkbox.tsx +14 -0
- package/src/Forms/CurrencyInput.tsx +40 -0
- package/src/Forms/Forms.shared.tsx +5 -0
- package/src/Forms/Forms.tsx +20 -0
- package/src/Forms/Forms.types.ts +33 -0
- package/src/Forms/Input.tsx +28 -0
- package/src/Forms/Money.tsx +15 -0
- package/src/Forms/NumberInput.tsx +85 -0
- package/src/Forms/Radio.tsx +31 -0
- package/src/Forms/Select.tsx +54 -0
- package/src/Forms/Switch.tsx +14 -0
- package/src/Forms/Textarea.tsx +30 -0
- package/src/Gallery/README.md +5 -0
- package/src/GateLifecycleRail/README.md +7 -0
- package/src/GateReadinessPanel/README.md +8 -0
- package/src/Gateway/AgencySlate.tsx +76 -0
- package/src/Gateway/ApplicationForm.tsx +48 -0
- package/src/Gateway/AvailabilityCalendar.tsx +82 -0
- package/src/Gateway/EPKViewer.tsx +77 -0
- package/src/Gateway/EngagementTimeline.tsx +43 -0
- package/src/Gateway/Gateway.shared.tsx +5 -0
- package/src/Gateway/Gateway.tsx +30 -0
- package/src/Gateway/Gateway.types.ts +69 -0
- package/src/Gateway/OnboardingPacket.tsx +61 -0
- package/src/Gateway/OpportunityCard.tsx +73 -0
- package/src/Gateway/OpportunityFilters.tsx +64 -0
- package/src/Gateway/PaymentTracker.tsx +71 -0
- package/src/Gateway/PayoutDetailsForm.tsx +62 -0
- package/src/Gateway/ProfileEditor.tsx +45 -0
- package/src/Gateway/ProgressBar.tsx +30 -0
- package/src/Gateway/RatingDialog.tsx +83 -0
- package/src/Gateway/UpNextCard.tsx +76 -0
- package/src/Glyphs/Glyphs.tsx +66 -0
- package/src/Grids/BidSheet.tsx +63 -0
- package/src/Grids/BudgetGrid.tsx +164 -0
- package/src/Grids/Grids.shared.tsx +5 -0
- package/src/Grids/Grids.tsx +11 -0
- package/src/Grids/Grids.types.ts +38 -0
- package/src/Grids/SpreadsheetGrid.tsx +445 -0
- package/src/Grids/columnTotal.tsx +14 -0
- package/src/Grids/glForCode.tsx +11 -0
- package/src/Grids/parseCell.tsx +16 -0
- package/src/Help/FeedbackWidget.tsx +89 -0
- package/src/Help/Help.tsx +14 -0
- package/src/Help/Help.types.ts +51 -0
- package/src/Help/HelpPanel.tsx +116 -0
- package/src/Help/NotificationCenter.tsx +100 -0
- package/src/Help/OnboardingChecklist.tsx +57 -0
- package/src/Help/ShortcutEditor.tsx +81 -0
- package/src/Help/WhatsNew.tsx +33 -0
- package/src/HelpPanel/README.md +5 -0
- package/src/HoverCard/README.md +3 -0
- package/src/Icon/Icon.tsx +47 -0
- package/src/Icon/README.md +9 -0
- package/src/IconButton/README.md +6 -0
- package/src/Identity/BrandSlot.tsx +20 -0
- package/src/Identity/BrandSlotFrame.tsx +38 -0
- package/src/Identity/CredentialBadge.tsx +92 -0
- package/src/Identity/Identity.tsx +14 -0
- package/src/Identity/Identity.types.ts +25 -0
- package/src/Identity/PresenceIndicator.tsx +37 -0
- package/src/Identity/QRCode.tsx +22 -0
- package/src/Identity/WhiteLabelPreview.tsx +33 -0
- package/src/Identity/qrPath.tsx +16 -0
- package/src/Identity/tokenVariable.tsx +9 -0
- package/src/InlineAlert/README.md +3 -0
- package/src/Input/README.md +8 -0
- package/src/Kbd/Kbd.tsx +30 -0
- package/src/Kbd/README.md +6 -0
- package/src/Layout/AppShell.tsx +151 -0
- package/src/Layout/Layout.tsx +14 -0
- package/src/Layout/Layout.types.ts +43 -0
- package/src/Layout/PageHeader.tsx +22 -0
- package/src/Layout/ResizablePanel.tsx +81 -0
- package/src/Layout/ScrollRegion.tsx +107 -0
- package/src/Layout/SplitView.tsx +78 -0
- package/src/Layout/Stepper.tsx +39 -0
- package/src/LegalText/LegalText.tsx +289 -0
- package/src/LegalText/README.md +10 -0
- package/src/LegalText/index.ts +29 -0
- package/src/LegalText/legal-markdown.ts +581 -0
- package/src/Link/Link.tsx +25 -0
- package/src/Link/README.md +5 -0
- package/src/Link/link-class.ts +10 -0
- package/src/LiveActivity/README.md +3 -0
- package/src/LogoSlotWall/README.md +7 -0
- package/src/MapView/README.md +5 -0
- package/src/Marketing/AIDisclosureBadge.tsx +31 -0
- package/src/Marketing/ButtonLink.tsx +32 -0
- package/src/Marketing/CodeSample.tsx +47 -0
- package/src/Marketing/ComparisonScroll.tsx +7 -0
- package/src/Marketing/ComparisonTable.tsx +104 -0
- package/src/Marketing/FAQ.tsx +26 -0
- package/src/Marketing/FeatureGrid.tsx +65 -0
- package/src/Marketing/GateLifecycleRail.tsx +52 -0
- package/src/Marketing/LogoSlotWall.tsx +53 -0
- package/src/Marketing/Marketing.tsx +49 -0
- package/src/Marketing/Marketing.types.ts +64 -0
- package/src/Marketing/MarketingFooter.tsx +88 -0
- package/src/Marketing/MarketingHero.tsx +45 -0
- package/src/Marketing/MarketingNav.tsx +76 -0
- package/src/Marketing/MarketingPoints.tsx +16 -0
- package/src/Marketing/MarketingSection.tsx +52 -0
- package/src/Marketing/PersonaSwitcher.tsx +137 -0
- package/src/Marketing/PriceDisplay.tsx +56 -0
- package/src/Marketing/PricingTable.tsx +122 -0
- package/src/Marketing/ProofStatStrip.tsx +35 -0
- package/src/Marketing/ScreenshotFrame.tsx +56 -0
- package/src/Marketing/SurfaceTriptych.tsx +43 -0
- package/src/Marketing/Testimonial.tsx +45 -0
- package/src/Marketing/marketing-copy.ts +25 -0
- package/src/Marketing/provided.tsx +36 -0
- package/src/MarketingFooter/README.md +7 -0
- package/src/MarketingHero/README.md +7 -0
- package/src/MarketingNav/README.md +7 -0
- package/src/MarketingSection/README.md +7 -0
- package/src/Media/FilePreviewer.tsx +86 -0
- package/src/Media/MapView.tsx +200 -0
- package/src/Media/Media.tsx +11 -0
- package/src/Media/Media.types.ts +47 -0
- package/src/Media/RichTextEditor.tsx +198 -0
- package/src/Media/toLngLat.tsx +13 -0
- package/src/Menus/ContextMenu.tsx +106 -0
- package/src/Menus/DropdownMenu.tsx +51 -0
- package/src/Menus/Menus.shared.tsx +67 -0
- package/src/Menus/Menus.tsx +13 -0
- package/src/Menus/Menus.types.ts +49 -0
- package/src/Menus/OrgSwitcher.tsx +69 -0
- package/src/Menus/compactTriggerClass.tsx +7 -0
- package/src/Menus/menuClass.tsx +4 -0
- package/src/Menus/menuItemClass.tsx +7 -0
- package/src/Menus/orgSwitcherTriggerClass.tsx +7 -0
- package/src/Money/README.md +6 -0
- package/src/MultiSelect/README.md +3 -0
- package/src/Navigation/Accordion.tsx +59 -0
- package/src/Navigation/Breadcrumbs.tsx +59 -0
- package/src/Navigation/MoreFields.tsx +42 -0
- package/src/Navigation/Navigation.shared.tsx +32 -0
- package/src/Navigation/Navigation.tsx +21 -0
- package/src/Navigation/Navigation.types.ts +63 -0
- package/src/Navigation/Pagination.tsx +30 -0
- package/src/Navigation/SegmentedControl.tsx +87 -0
- package/src/Navigation/Sidebar.tsx +106 -0
- package/src/Navigation/TabBar.tsx +61 -0
- package/src/Navigation/Tabs.tsx +79 -0
- package/src/Navigation/TopNav.tsx +86 -0
- package/src/Navigation/sidebar-classes.ts +18 -0
- package/src/NotificationCenter/README.md +3 -0
- package/src/NumberInput/README.md +3 -0
- package/src/OfflineBanner/README.md +3 -0
- package/src/OnboardingChecklist/README.md +3 -0
- package/src/OnboardingPacket/README.md +3 -0
- package/src/OpportunityCard/README.md +5 -0
- package/src/OpportunityFilters/README.md +3 -0
- package/src/OrgChart/README.md +5 -0
- package/src/OrgSwitcher/README.md +3 -0
- package/src/Overlays/Dialog.tsx +54 -0
- package/src/Overlays/Drawer.tsx +62 -0
- package/src/Overlays/HoverCard.tsx +59 -0
- package/src/Overlays/Overlays.shared.tsx +12 -0
- package/src/Overlays/Overlays.tsx +20 -0
- package/src/Overlays/Overlays.types.ts +66 -0
- package/src/Overlays/Popover.tsx +70 -0
- package/src/Overlays/PropertyList.tsx +19 -0
- package/src/Overlays/ShortcutSheet.tsx +62 -0
- package/src/Overlays/SidePeek.tsx +117 -0
- package/src/Overlays/Tooltip.tsx +73 -0
- package/src/Overlays/panelClass.tsx +6 -0
- package/src/Overlays/popoverPanelClass.tsx +6 -0
- package/src/PageHeader/README.md +3 -0
- package/src/Pagination/README.md +3 -0
- package/src/PaymentTracker/README.md +3 -0
- package/src/PayoutDetailsForm/README.md +3 -0
- package/src/PersonaSwitcher/README.md +7 -0
- package/src/PhaseChip/README.md +5 -0
- package/src/PhaseGlyph/README.md +17 -0
- package/src/PhotoCapture/README.md +3 -0
- package/src/Pickers/Combobox.tsx +91 -0
- package/src/Pickers/DatePicker.tsx +60 -0
- package/src/Pickers/DateRangePicker.tsx +78 -0
- package/src/Pickers/FileDrop.tsx +84 -0
- package/src/Pickers/MultiSelect.tsx +118 -0
- package/src/Pickers/Pickers.shared.tsx +337 -0
- package/src/Pickers/Pickers.tsx +17 -0
- package/src/Pickers/Pickers.types.ts +47 -0
- package/src/Pickers/Slider.tsx +59 -0
- package/src/Pickers/TimePicker.tsx +68 -0
- package/src/Pickers/rankOptions.tsx +12 -0
- package/src/Popover/README.md +3 -0
- package/src/PresenceIndicator/README.md +3 -0
- package/src/PriceDisplay/README.md +7 -0
- package/src/PricingTable/README.md +9 -0
- package/src/ProfileEditor/README.md +3 -0
- package/src/ProgressBar/README.md +3 -0
- package/src/ProofStatStrip/README.md +7 -0
- package/src/PropertyChip/README.md +3 -0
- package/src/ProvenanceBadge/README.md +3 -0
- package/src/QRCode/README.md +6 -0
- package/src/QuickAdd/README.md +5 -0
- package/src/QuickIncidentSheet/README.md +3 -0
- package/src/Radio/README.md +3 -0
- package/src/RadioChannelTable/README.md +7 -0
- package/src/RatingDialog/README.md +3 -0
- package/src/ReconciliationTable/README.md +3 -0
- package/src/RecordKindChip/README.md +3 -0
- package/src/RecordKindGlyph/README.md +34 -0
- package/src/RecordRow/README.md +7 -0
- package/src/RefusalNotice/README.md +5 -0
- package/src/ResizablePanel/README.md +3 -0
- package/src/ResourceSchedule/README.md +6 -0
- package/src/RichTextEditor/README.md +3 -0
- package/src/RichTextEditor/extensions.ts +217 -0
- package/src/RunOfShowLive/README.md +5 -0
- package/src/ScanSheet/README.md +3 -0
- package/src/ScreenshotFrame/README.md +7 -0
- package/src/ScrollRegion/README.md +9 -0
- package/src/SegmentedControl/README.md +5 -0
- package/src/Select/README.md +5 -0
- package/src/ShiftCard/README.md +3 -0
- package/src/ShortcutEditor/README.md +3 -0
- package/src/ShortcutSheet/README.md +3 -0
- package/src/SidePeek/README.md +6 -0
- package/src/Sidebar/README.md +5 -0
- package/src/SignaturePad/README.md +3 -0
- package/src/Skeleton/README.md +3 -0
- package/src/Slider/README.md +3 -0
- package/src/SplitView/README.md +3 -0
- package/src/SpreadsheetGrid/README.md +9 -0
- package/src/StalenessIndicator/README.md +3 -0
- package/src/StatTile/README.md +6 -0
- package/src/StateChip/README.md +6 -0
- package/src/StateIcon/README.md +6 -0
- package/src/StateIcon/StateIcon.tsx +127 -0
- package/src/StatusHeatmap/README.md +15 -0
- package/src/Stepper/README.md +3 -0
- package/src/Surface/Skeleton.tsx +21 -0
- package/src/Surface/Surface.tsx +63 -0
- package/src/SurfaceTriptych/README.md +7 -0
- package/src/Switch/README.md +5 -0
- package/src/SyncConflictSheet/README.md +3 -0
- package/src/TabBar/README.md +7 -0
- package/src/Tabs/README.md +6 -0
- package/src/Tag/README.md +3 -0
- package/src/TemplateAuth/README.md +6 -0
- package/src/TemplateCollection/README.md +6 -0
- package/src/TemplateDashboard/README.md +8 -0
- package/src/TemplateDocument/README.md +5 -0
- package/src/TemplateGatewayShell/README.md +5 -0
- package/src/TemplateGridEditor/README.md +3 -0
- package/src/TemplateRecord/README.md +3 -0
- package/src/TemplateSettings/README.md +5 -0
- package/src/TemplateSplitView/README.md +3 -0
- package/src/TemplateSystem/README.md +5 -0
- package/src/TemplateWizard/README.md +3 -0
- package/src/Templates/TemplateAuth.tsx +16 -0
- package/src/Templates/TemplateCollection.tsx +35 -0
- package/src/Templates/TemplateDashboard.tsx +200 -0
- package/src/Templates/TemplateDocument.tsx +24 -0
- package/src/Templates/TemplateGatewayShell.tsx +36 -0
- package/src/Templates/TemplateGridEditor.tsx +17 -0
- package/src/Templates/TemplateRecord.tsx +31 -0
- package/src/Templates/TemplateSettings.tsx +26 -0
- package/src/Templates/TemplateSplitView.tsx +27 -0
- package/src/Templates/TemplateSystem.tsx +19 -0
- package/src/Templates/TemplateSystemLink.tsx +55 -0
- package/src/Templates/TemplateWizard.tsx +43 -0
- package/src/Templates/Templates.tsx +29 -0
- package/src/Templates/Templates.types.ts +153 -0
- package/src/Testimonial/README.md +7 -0
- package/src/Textarea/README.md +3 -0
- package/src/TimePicker/README.md +5 -0
- package/src/Timeline/README.md +6 -0
- package/src/Toast/README.md +3 -0
- package/src/Tooltip/README.md +3 -0
- package/src/TopNav/README.md +5 -0
- package/src/TreeView/README.md +3 -0
- package/src/URIDChip/README.md +5 -0
- package/src/UndoToast/README.md +3 -0
- package/src/UpNextCard/README.md +6 -0
- package/src/Views/ActivityFeedItem.tsx +52 -0
- package/src/Views/Board.tsx +229 -0
- package/src/Views/BulkActionBar.tsx +76 -0
- package/src/Views/RecordList.tsx +146 -0
- package/src/Views/RecordRow.tsx +132 -0
- package/src/Views/StatTile.tsx +88 -0
- package/src/Views/TreeView.tsx +161 -0
- package/src/Views/Views.tsx +18 -0
- package/src/Views/Views.types.ts +99 -0
- package/src/WhatsNew/README.md +3 -0
- package/src/WhiteLabelPreview/README.md +8 -0
- package/src/XOS/AccessGridMatrix.tsx +111 -0
- package/src/XOS/AssertionRankBadge.tsx +27 -0
- package/src/XOS/CoordinateMatrix.tsx +123 -0
- package/src/XOS/EmergencyCodeCard.tsx +109 -0
- package/src/XOS/GateReadinessPanel.tsx +100 -0
- package/src/XOS/ProvenanceBadge.tsx +19 -0
- package/src/XOS/RadioChannelTable.tsx +50 -0
- package/src/XOS/ReconciliationTable.tsx +64 -0
- package/src/XOS/RunOfShowLive.tsx +97 -0
- package/src/XOS/StalenessIndicator.tsx +31 -0
- package/src/XOS/StatusHeatmap.tsx +200 -0
- package/src/XOS/XOS.shared.tsx +90 -0
- package/src/XOS/XOS.tsx +29 -0
- package/src/XOS/XOS.types.ts +99 -0
- package/src/XOS/resolveStep.tsx +16 -0
- package/src/brand/defaults/README.md +13 -0
- package/src/brand/defaults/app-icon.svg +6 -0
- package/src/brand/defaults/favicon.svg +6 -0
- package/src/brand/defaults/logo-dark.svg +6 -0
- package/src/brand/defaults/logo-light.svg +6 -0
- package/src/brand/defaults/splash.svg +6 -0
- package/src/index.ts +606 -0
- package/src/lib/context.tsx +156 -0
- package/src/lib/cx.ts +4 -0
- package/src/lib/format.ts +200 -0
- package/src/lib/hooks.ts +187 -0
- package/src/lib/i18n.ts +97 -0
- package/src/lib/icons.ts +45 -0
- package/src/lib/live.ts +92 -0
- package/src/lib/preferences.ts +242 -0
- package/src/lib/route-transition.tsx +22 -0
- package/src/lib/selection.ts +92 -0
- package/src/lib/shortcut-targets.ts +125 -0
- package/src/lib/theme.ts +50 -0
- package/src/lib/undo-stack.ts +125 -0
- package/src/marketing.ts +33 -0
- package/src/pwa/action-outcome.tsx +81 -0
- package/src/pwa/analytics.ts +236 -0
- package/src/pwa/browser-push.tsx +132 -0
- package/src/pwa/client.ts +126 -0
- package/src/pwa/index.ts +40 -0
- package/src/pwa/offline-key.ts +18 -0
- package/src/pwa/service-worker.ts +229 -0
- package/src/static.ts +10 -0
- package/src/styles/base.css +208 -0
- package/src/styles/components.css +453 -0
- package/src/styles/index.css +16 -0
- package/src/styles/marketing.css +1260 -0
- package/src/styles/reference.css +5792 -0
- package/src/types/reference.d.ts +1608 -0
- package/tailwind.config.cjs +3 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { Dialog as RDialog } from "radix-ui";
|
|
3
|
+
import { cx } from "../lib/cx.ts";
|
|
4
|
+
import { useT } from "../lib/context.tsx";
|
|
5
|
+
import { useReturnFocus } from "../lib/hooks.ts";
|
|
6
|
+
import { IconButton } from "../Button/Button.tsx";
|
|
7
|
+
import { scrimClass, useOverlayOpen } from "./Overlays.shared.tsx";
|
|
8
|
+
import { type DrawerProps } from "./Overlays.types.ts";
|
|
9
|
+
import { panelClass } from "./panelClass.tsx";
|
|
10
|
+
|
|
11
|
+
/** Slides in from an edge for secondary tasks; full screen below md. */
|
|
12
|
+
export function Drawer({
|
|
13
|
+
title,
|
|
14
|
+
side = "right",
|
|
15
|
+
children,
|
|
16
|
+
footer,
|
|
17
|
+
onClose,
|
|
18
|
+
shortcutScope,
|
|
19
|
+
wide = false,
|
|
20
|
+
...control
|
|
21
|
+
}: DrawerProps): ReactElement {
|
|
22
|
+
const t = useT();
|
|
23
|
+
const [isOpen, setOpen] = useOverlayOpen(control);
|
|
24
|
+
const returnFocus = useReturnFocus(isOpen);
|
|
25
|
+
const change = (next: boolean) => {
|
|
26
|
+
setOpen(next);
|
|
27
|
+
if (!next) onClose?.();
|
|
28
|
+
};
|
|
29
|
+
return (
|
|
30
|
+
<RDialog.Root open={isOpen} onOpenChange={change}>
|
|
31
|
+
{control.trigger ? <RDialog.Trigger asChild>{control.trigger}</RDialog.Trigger> : null}
|
|
32
|
+
<RDialog.Portal>
|
|
33
|
+
<RDialog.Overlay className={scrimClass} />
|
|
34
|
+
<RDialog.Content
|
|
35
|
+
onCloseAutoFocus={returnFocus}
|
|
36
|
+
aria-describedby={undefined}
|
|
37
|
+
data-shortcut-scope={shortcutScope}
|
|
38
|
+
className={cx(
|
|
39
|
+
panelClass,
|
|
40
|
+
"xos-anim-peek fixed inset-y-0 z-dialog flex flex-col rounded-none",
|
|
41
|
+
wide ? "w-(--layout-peek-max) max-w-full" : "w-(--ui-drawer)",
|
|
42
|
+
"max-md:w-full",
|
|
43
|
+
side === "left" ? "start-0" : "end-0",
|
|
44
|
+
)}
|
|
45
|
+
>
|
|
46
|
+
<header className="flex items-center justify-between py-8 ps-20 pe-12 border-b border-border-subtle">
|
|
47
|
+
<RDialog.Title className="m-0 text-text-13 font-semibold">{title}</RDialog.Title>
|
|
48
|
+
<RDialog.Close asChild>
|
|
49
|
+
<IconButton icon="X" label={t("action.close")} shortcut={t("key.esc")} />
|
|
50
|
+
</RDialog.Close>
|
|
51
|
+
</header>
|
|
52
|
+
<div className="flex flex-1 flex-col gap-16 p-20 overflow-y-auto">{children}</div>
|
|
53
|
+
{footer ? (
|
|
54
|
+
<footer className="flex justify-end gap-8 px-20 py-12 border-t border-border-subtle">
|
|
55
|
+
{footer}
|
|
56
|
+
</footer>
|
|
57
|
+
) : null}
|
|
58
|
+
</RDialog.Content>
|
|
59
|
+
</RDialog.Portal>
|
|
60
|
+
</RDialog.Root>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { HoverCard as RHoverCard } from "radix-ui";
|
|
3
|
+
import type { HoverCardProps as ReferenceHoverCardProps } from "../types/reference";
|
|
4
|
+
import { cx } from "../lib/cx.ts";
|
|
5
|
+
import { RecordKindGlyph } from "../Glyphs/Glyphs.tsx";
|
|
6
|
+
import { PropertyChip, StateChip } from "../Chips/Chips.tsx";
|
|
7
|
+
import { type HoverCardProps } from "./Overlays.types.ts";
|
|
8
|
+
import { popoverPanelClass } from "./popoverPanelClass.tsx";
|
|
9
|
+
|
|
10
|
+
function HoverCardBody({
|
|
11
|
+
recordKey,
|
|
12
|
+
kind,
|
|
13
|
+
title,
|
|
14
|
+
state,
|
|
15
|
+
stateLabel,
|
|
16
|
+
owner,
|
|
17
|
+
next,
|
|
18
|
+
}: ReferenceHoverCardProps) {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<div className="flex items-center gap-6 text-text-secondary">
|
|
22
|
+
<RecordKindGlyph kind={kind} size={14} />
|
|
23
|
+
<span className="font-mono text-text-12">{recordKey}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<strong className="font-semibold">{title}</strong>
|
|
26
|
+
<div className="flex flex-wrap items-center gap-8">
|
|
27
|
+
<StateChip state={state} label={stateLabel} />
|
|
28
|
+
<PropertyChip icon="User" value={owner} />
|
|
29
|
+
<PropertyChip icon="Calendar" value={next} />
|
|
30
|
+
</div>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const hoverCardClass = cx(
|
|
36
|
+
popoverPanelClass,
|
|
37
|
+
"flex flex-col gap-8 p-12 w-(--ui-hovercard) z-popover",
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/** Previews a record after 400 ms on its key: title, state, owner and next date. */
|
|
41
|
+
export function HoverCard({ children, openDelay = 400, ...record }: HoverCardProps): ReactElement {
|
|
42
|
+
if (children === undefined) {
|
|
43
|
+
return (
|
|
44
|
+
<div className={hoverCardClass}>
|
|
45
|
+
<HoverCardBody {...record} />
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return (
|
|
50
|
+
<RHoverCard.Root openDelay={openDelay} closeDelay={100}>
|
|
51
|
+
<RHoverCard.Trigger asChild>{children}</RHoverCard.Trigger>
|
|
52
|
+
<RHoverCard.Portal>
|
|
53
|
+
<RHoverCard.Content sideOffset={4} collisionPadding={16} className={hoverCardClass}>
|
|
54
|
+
<HoverCardBody {...record} />
|
|
55
|
+
</RHoverCard.Content>
|
|
56
|
+
</RHoverCard.Portal>
|
|
57
|
+
</RHoverCard.Root>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cx } from "../lib/cx.ts";
|
|
2
|
+
import { useControllable } from "../lib/hooks.ts";
|
|
3
|
+
import { type OverlayControl } from "./Overlays.types.ts";
|
|
4
|
+
|
|
5
|
+
export const scrimClass = cx(
|
|
6
|
+
"xos-anim-fade fixed inset-0 z-dialog bg-scrim opacity-scrim-dark",
|
|
7
|
+
"in-data-[theme=light]:opacity-scrim-light in-data-[theme=sunlight]:opacity-scrim-light",
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
export function useOverlayOpen({ open, defaultOpen, onOpenChange, trigger }: OverlayControl) {
|
|
11
|
+
return useControllable(open, defaultOpen ?? trigger === undefined, onOpenChange);
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
type OverlayControl,
|
|
3
|
+
type DialogProps,
|
|
4
|
+
type DrawerProps,
|
|
5
|
+
type SidePeekProps,
|
|
6
|
+
type ShortcutSheetProps,
|
|
7
|
+
type PopoverProps,
|
|
8
|
+
type HoverCardProps,
|
|
9
|
+
type TooltipProps,
|
|
10
|
+
} from "./Overlays.types.ts";
|
|
11
|
+
export { panelClass } from "./panelClass.tsx";
|
|
12
|
+
export { popoverPanelClass } from "./popoverPanelClass.tsx";
|
|
13
|
+
export { Dialog } from "./Dialog.tsx";
|
|
14
|
+
export { Drawer } from "./Drawer.tsx";
|
|
15
|
+
export { PropertyList } from "./PropertyList.tsx";
|
|
16
|
+
export { SidePeek } from "./SidePeek.tsx";
|
|
17
|
+
export { ShortcutSheet } from "./ShortcutSheet.tsx";
|
|
18
|
+
export { Popover } from "./Popover.tsx";
|
|
19
|
+
export { HoverCard } from "./HoverCard.tsx";
|
|
20
|
+
export { Tooltip } from "./Tooltip.tsx";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
DialogProps as ReferenceDialogProps,
|
|
4
|
+
DrawerProps as ReferenceDrawerProps,
|
|
5
|
+
HoverCardProps as ReferenceHoverCardProps,
|
|
6
|
+
PopoverProps as ReferencePopoverProps,
|
|
7
|
+
ShortcutSheetProps as ReferenceShortcutSheetProps,
|
|
8
|
+
SidePeekProps as ReferenceSidePeekProps,
|
|
9
|
+
TooltipProps as ReferenceTooltipProps,
|
|
10
|
+
} from "../types/reference";
|
|
11
|
+
|
|
12
|
+
/** Open state shared by every overlay: controlled with `open`, or mounted open unless a `trigger` opens it. */
|
|
13
|
+
export interface OverlayControl {
|
|
14
|
+
open?: boolean;
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
/** The element that opens the overlay. Without one, the overlay renders open while mounted. */
|
|
18
|
+
trigger?: ReactElement;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type DialogProps = ReferenceDialogProps &
|
|
22
|
+
OverlayControl & {
|
|
23
|
+
/** One sentence under the title, announced with it. */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type DrawerProps = ReferenceDrawerProps &
|
|
28
|
+
OverlayControl & {
|
|
29
|
+
/**
|
|
30
|
+
* Makes the drawer a region for the shell's shortcuts of that scope (data-shortcut-scope,
|
|
31
|
+
* lib/shortcut-targets.ts), as a record's side peek is for `record`.
|
|
32
|
+
*/
|
|
33
|
+
shortcutScope?: "record" | "view";
|
|
34
|
+
/**
|
|
35
|
+
* Opens at the side peek's maximum width, within the viewport, for a body that holds two columns from lg up.
|
|
36
|
+
* A default drawer's 400 px holds one.
|
|
37
|
+
*/
|
|
38
|
+
wide?: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type SidePeekProps = ReferenceSidePeekProps &
|
|
42
|
+
OverlayControl & {
|
|
43
|
+
onOpenFull?: () => void;
|
|
44
|
+
onCopyLink?: () => void;
|
|
45
|
+
/** Opens the state menu from the state chip. */
|
|
46
|
+
onStateClick?: () => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type ShortcutSheetProps = ReferenceShortcutSheetProps & OverlayControl;
|
|
50
|
+
|
|
51
|
+
export type PopoverProps = ReferencePopoverProps &
|
|
52
|
+
Omit<OverlayControl, "defaultOpen"> & { defaultOpen?: boolean };
|
|
53
|
+
|
|
54
|
+
export type HoverCardProps = ReferenceHoverCardProps & {
|
|
55
|
+
/** The record key or link the card previews; without it the card renders on its own. */
|
|
56
|
+
children?: ReactElement;
|
|
57
|
+
openDelay?: number;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type TooltipProps = ReferenceTooltipProps & {
|
|
61
|
+
/** The control the tooltip describes; without it the bubble renders on its own. */
|
|
62
|
+
children?: ReactElement;
|
|
63
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
64
|
+
/** Hover delay in milliseconds; 500 by default. */
|
|
65
|
+
delay?: number;
|
|
66
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { Popover as RPopover } from "radix-ui";
|
|
3
|
+
import type { PopoverProps as ReferencePopoverProps } from "../types/reference";
|
|
4
|
+
import { cx } from "../lib/cx.ts";
|
|
5
|
+
import { useT } from "../lib/context.tsx";
|
|
6
|
+
import { Icon } from "../Icon/Icon.tsx";
|
|
7
|
+
import { linkClass } from "../Link/Link.tsx";
|
|
8
|
+
import { type PopoverProps } from "./Overlays.types.ts";
|
|
9
|
+
import { popoverPanelClass } from "./popoverPanelClass.tsx";
|
|
10
|
+
|
|
11
|
+
function PopoverBody({ title, children, learnMore }: ReferencePopoverProps) {
|
|
12
|
+
const t = useT();
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
{title ? <strong className="font-semibold">{title}</strong> : null}
|
|
16
|
+
<div className="text-text-secondary">{children}</div>
|
|
17
|
+
{learnMore ? (
|
|
18
|
+
<a className={linkClass} href={learnMore}>
|
|
19
|
+
{t("help.learnMore")}
|
|
20
|
+
<Icon name="ArrowUpRight" size={12} />
|
|
21
|
+
</a>
|
|
22
|
+
) : null}
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const popoverClass = cx(popoverPanelClass, "flex flex-col gap-8 p-12 w-(--ui-popover) z-popover");
|
|
28
|
+
|
|
29
|
+
/** More than one sentence of help, with a Learn more link. Esc and outside clicks close it. */
|
|
30
|
+
export function Popover({
|
|
31
|
+
title,
|
|
32
|
+
children,
|
|
33
|
+
learnMore,
|
|
34
|
+
open,
|
|
35
|
+
defaultOpen,
|
|
36
|
+
onOpenChange,
|
|
37
|
+
trigger,
|
|
38
|
+
}: PopoverProps): ReactElement {
|
|
39
|
+
const body = (
|
|
40
|
+
<PopoverBody {...(title ? { title } : {})} {...(learnMore ? { learnMore } : {})}>
|
|
41
|
+
{children}
|
|
42
|
+
</PopoverBody>
|
|
43
|
+
);
|
|
44
|
+
if (trigger === undefined) {
|
|
45
|
+
return (
|
|
46
|
+
<div role="group" aria-label={title} className={popoverClass}>
|
|
47
|
+
{body}
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return (
|
|
52
|
+
<RPopover.Root
|
|
53
|
+
{...(open === undefined ? {} : { open })}
|
|
54
|
+
{...(defaultOpen === undefined ? {} : { defaultOpen })}
|
|
55
|
+
{...(onOpenChange ? { onOpenChange } : {})}
|
|
56
|
+
>
|
|
57
|
+
<RPopover.Trigger asChild>{trigger}</RPopover.Trigger>
|
|
58
|
+
<RPopover.Portal>
|
|
59
|
+
<RPopover.Content
|
|
60
|
+
sideOffset={4}
|
|
61
|
+
collisionPadding={16}
|
|
62
|
+
aria-label={title}
|
|
63
|
+
className={popoverClass}
|
|
64
|
+
>
|
|
65
|
+
{body}
|
|
66
|
+
</RPopover.Content>
|
|
67
|
+
</RPopover.Portal>
|
|
68
|
+
</RPopover.Root>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/** Label and value pairs in the record property column. */
|
|
4
|
+
export function PropertyList({
|
|
5
|
+
items,
|
|
6
|
+
}: {
|
|
7
|
+
items: { label: string; value: ReactNode }[];
|
|
8
|
+
}): ReactElement {
|
|
9
|
+
return (
|
|
10
|
+
<dl className="grid grid-cols-[var(--ui-props-label)_1fr] max-sm:grid-cols-1 items-center gap-x-16 gap-y-8 m-0">
|
|
11
|
+
{items.map((p) => (
|
|
12
|
+
<div key={p.label} className="contents">
|
|
13
|
+
<dt className="text-text-12 text-text-secondary">{p.label}</dt>
|
|
14
|
+
<dd className="m-0">{p.value}</dd>
|
|
15
|
+
</div>
|
|
16
|
+
))}
|
|
17
|
+
</dl>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { Dialog as RDialog } from "radix-ui";
|
|
3
|
+
import { cx } from "../lib/cx.ts";
|
|
4
|
+
import { useT } from "../lib/context.tsx";
|
|
5
|
+
import { useReturnFocus } from "../lib/hooks.ts";
|
|
6
|
+
import { IconButton } from "../Button/Button.tsx";
|
|
7
|
+
import { Keys } from "../Kbd/Kbd.tsx";
|
|
8
|
+
import { scrimClass, useOverlayOpen } from "./Overlays.shared.tsx";
|
|
9
|
+
import { type ShortcutSheetProps } from "./Overlays.types.ts";
|
|
10
|
+
import { panelClass } from "./panelClass.tsx";
|
|
11
|
+
|
|
12
|
+
/** Every shortcut by group; `?` opens it (bind with useHotkey). */
|
|
13
|
+
export function ShortcutSheet({ title, groups, ...control }: ShortcutSheetProps): ReactElement {
|
|
14
|
+
const t = useT();
|
|
15
|
+
const [isOpen, setOpen] = useOverlayOpen(control);
|
|
16
|
+
const returnFocus = useReturnFocus(isOpen);
|
|
17
|
+
return (
|
|
18
|
+
<RDialog.Root open={isOpen} onOpenChange={setOpen}>
|
|
19
|
+
{control.trigger ? <RDialog.Trigger asChild>{control.trigger}</RDialog.Trigger> : null}
|
|
20
|
+
<RDialog.Portal>
|
|
21
|
+
<RDialog.Overlay className={scrimClass} />
|
|
22
|
+
<div className="pointer-events-none fixed inset-0 z-dialog grid grid-rows-1 place-items-center p-16">
|
|
23
|
+
<RDialog.Content
|
|
24
|
+
onCloseAutoFocus={returnFocus}
|
|
25
|
+
aria-describedby={undefined}
|
|
26
|
+
className={cx(
|
|
27
|
+
panelClass,
|
|
28
|
+
"xos-anim-dialog pointer-events-auto w-(--ui-sheet) max-h-full overflow-y-auto",
|
|
29
|
+
)}
|
|
30
|
+
>
|
|
31
|
+
<header className="flex items-center justify-between px-20 pt-20">
|
|
32
|
+
<RDialog.Title className="m-0 text-heading-16 font-semibold">
|
|
33
|
+
{title ?? t("shortcuts.title")}
|
|
34
|
+
</RDialog.Title>
|
|
35
|
+
<RDialog.Close asChild>
|
|
36
|
+
<IconButton icon="X" label={t("action.close")} shortcut={t("key.esc")} />
|
|
37
|
+
</RDialog.Close>
|
|
38
|
+
</header>
|
|
39
|
+
<div className="grid grid-cols-2 max-md:grid-cols-1 gap-x-32 gap-y-16 px-20 pt-8 pb-20">
|
|
40
|
+
{groups.map((g) => (
|
|
41
|
+
<section key={g.label}>
|
|
42
|
+
<h3 className="m-0 mb-6 text-text-11 font-medium text-text-secondary">
|
|
43
|
+
{g.label}
|
|
44
|
+
</h3>
|
|
45
|
+
{g.items.map((item) => (
|
|
46
|
+
<div
|
|
47
|
+
key={item.label}
|
|
48
|
+
className="flex items-center justify-between min-h-control-md"
|
|
49
|
+
>
|
|
50
|
+
<span>{item.label}</span>
|
|
51
|
+
<Keys keys={item.keys} />
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</section>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
|
+
</RDialog.Content>
|
|
58
|
+
</div>
|
|
59
|
+
</RDialog.Portal>
|
|
60
|
+
</RDialog.Root>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { useState, type CSSProperties, type KeyboardEvent, type ReactElement } from "react";
|
|
2
|
+
import { Dialog as RDialog } from "radix-ui";
|
|
3
|
+
import { cx } from "../lib/cx.ts";
|
|
4
|
+
import { useT } from "../lib/context.tsx";
|
|
5
|
+
import { useReturnFocus } from "../lib/hooks.ts";
|
|
6
|
+
import { IconButton } from "../Button/Button.tsx";
|
|
7
|
+
import { RecordKindGlyph } from "../Glyphs/Glyphs.tsx";
|
|
8
|
+
import { StateChip } from "../Chips/Chips.tsx";
|
|
9
|
+
import { useOverlayOpen } from "./Overlays.shared.tsx";
|
|
10
|
+
import { type SidePeekProps } from "./Overlays.types.ts";
|
|
11
|
+
import { PropertyList } from "./PropertyList.tsx";
|
|
12
|
+
import { panelClass } from "./panelClass.tsx";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Opens a record beside the list with the one record anatomy. Non-modal: the list stays usable, Esc
|
|
16
|
+
* closes and the width resizes from 440 to 960 px with the handle or arrow keys. The panel is a record
|
|
17
|
+
* region for the shell's record shortcuts (data-shortcut-scope, lib/shortcut-targets.ts): Open full,
|
|
18
|
+
* Copy link and a clickable state carry their shortcut ids, and so can controls in `children`.
|
|
19
|
+
*/
|
|
20
|
+
export function SidePeek({
|
|
21
|
+
recordKey,
|
|
22
|
+
kind,
|
|
23
|
+
title,
|
|
24
|
+
state,
|
|
25
|
+
stateLabel,
|
|
26
|
+
chips,
|
|
27
|
+
properties,
|
|
28
|
+
children,
|
|
29
|
+
onOpenFull,
|
|
30
|
+
onCopyLink,
|
|
31
|
+
onStateClick,
|
|
32
|
+
...control
|
|
33
|
+
}: SidePeekProps): ReactElement {
|
|
34
|
+
const t = useT();
|
|
35
|
+
const [isOpen, setOpen] = useOverlayOpen(control);
|
|
36
|
+
const returnFocus = useReturnFocus(isOpen);
|
|
37
|
+
const [width, setWidth] = useState(560);
|
|
38
|
+
const resize = (e: KeyboardEvent<HTMLDivElement>) => {
|
|
39
|
+
const step = e.key === "ArrowLeft" ? 16 : e.key === "ArrowRight" ? -16 : 0;
|
|
40
|
+
if (step !== 0) {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
setWidth((w) => Math.min(960, Math.max(440, w + step)));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return (
|
|
46
|
+
<RDialog.Root open={isOpen} onOpenChange={setOpen} modal={false}>
|
|
47
|
+
{control.trigger ? <RDialog.Trigger asChild>{control.trigger}</RDialog.Trigger> : null}
|
|
48
|
+
<RDialog.Portal>
|
|
49
|
+
<RDialog.Content
|
|
50
|
+
aria-describedby={undefined}
|
|
51
|
+
data-shortcut-scope="record"
|
|
52
|
+
onInteractOutside={(e) => e.preventDefault()}
|
|
53
|
+
onCloseAutoFocus={returnFocus}
|
|
54
|
+
className={cx(
|
|
55
|
+
panelClass,
|
|
56
|
+
"xos-anim-peek fixed inset-y-0 end-0 z-peek flex flex-col rounded-none overflow-y-auto",
|
|
57
|
+
"w-(--xos-peek-width) max-w-full max-md:w-full",
|
|
58
|
+
)}
|
|
59
|
+
style={
|
|
60
|
+
{ "--xos-peek-width": `calc(var(--layout-peek) * ${width / 560})` } as CSSProperties
|
|
61
|
+
}
|
|
62
|
+
>
|
|
63
|
+
<div
|
|
64
|
+
role="separator"
|
|
65
|
+
aria-orientation="vertical"
|
|
66
|
+
aria-label={t("panel.resize")}
|
|
67
|
+
aria-valuenow={width}
|
|
68
|
+
aria-valuemin={440}
|
|
69
|
+
aria-valuemax={960}
|
|
70
|
+
tabIndex={0}
|
|
71
|
+
onKeyDown={resize}
|
|
72
|
+
className="absolute inset-y-0 start-0 w-(--ui-handle) cursor-col-resize hover:bg-accent focus-visible:bg-accent max-md:hidden"
|
|
73
|
+
/>
|
|
74
|
+
<header className="flex items-center justify-between py-8 ps-20 pe-12 border-b border-border-subtle">
|
|
75
|
+
<span className="flex items-center gap-6 text-text-secondary">
|
|
76
|
+
<RecordKindGlyph kind={kind} size={14} />
|
|
77
|
+
<span>{kind}</span>
|
|
78
|
+
<span className="font-mono text-text-12">{recordKey}</span>
|
|
79
|
+
</span>
|
|
80
|
+
<span className="flex items-center gap-2">
|
|
81
|
+
<IconButton
|
|
82
|
+
icon="Maximize2"
|
|
83
|
+
label={t("peek.openFull")}
|
|
84
|
+
onClick={onOpenFull}
|
|
85
|
+
data-shortcut="record.open"
|
|
86
|
+
/>
|
|
87
|
+
<IconButton
|
|
88
|
+
icon="Link2"
|
|
89
|
+
label={t("action.copyLink")}
|
|
90
|
+
onClick={onCopyLink}
|
|
91
|
+
data-shortcut="record.copy-link"
|
|
92
|
+
/>
|
|
93
|
+
<RDialog.Close asChild>
|
|
94
|
+
<IconButton icon="X" label={t("action.close")} shortcut={t("key.esc")} />
|
|
95
|
+
</RDialog.Close>
|
|
96
|
+
</span>
|
|
97
|
+
</header>
|
|
98
|
+
<div className="flex flex-col gap-16 p-20">
|
|
99
|
+
<RDialog.Title className="m-0 text-heading-20 font-semibold">{title}</RDialog.Title>
|
|
100
|
+
<div className="flex flex-wrap items-center gap-8">
|
|
101
|
+
<span data-shortcut={onStateClick ? "record.state" : undefined} className="contents">
|
|
102
|
+
<StateChip
|
|
103
|
+
state={state}
|
|
104
|
+
label={stateLabel}
|
|
105
|
+
{...(onStateClick ? { onClick: onStateClick } : {})}
|
|
106
|
+
/>
|
|
107
|
+
</span>
|
|
108
|
+
{chips}
|
|
109
|
+
</div>
|
|
110
|
+
{properties ? <PropertyList items={properties} /> : null}
|
|
111
|
+
{children}
|
|
112
|
+
</div>
|
|
113
|
+
</RDialog.Content>
|
|
114
|
+
</RDialog.Portal>
|
|
115
|
+
</RDialog.Root>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useRef, useState, type ReactElement } from "react";
|
|
2
|
+
import { Tooltip as RTooltip } from "radix-ui";
|
|
3
|
+
import { cx } from "../lib/cx.ts";
|
|
4
|
+
import { useT } from "../lib/context.tsx";
|
|
5
|
+
import { Keys } from "../Kbd/Kbd.tsx";
|
|
6
|
+
import { type TooltipProps } from "./Overlays.types.ts";
|
|
7
|
+
|
|
8
|
+
const tooltipClass = cx(
|
|
9
|
+
"xos-anim-pop inline-flex items-center gap-6 px-8 py-4 rounded-control bg-bg-raised text-text-primary",
|
|
10
|
+
"text-text-12 shadow-menu z-tooltip forced-colors:border",
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A control's label and shortcut after 500 ms of hover, on focus, or on a 500 ms long press. Never
|
|
15
|
+
* holds interactive content.
|
|
16
|
+
*/
|
|
17
|
+
export function Tooltip({
|
|
18
|
+
label,
|
|
19
|
+
shortcut,
|
|
20
|
+
children,
|
|
21
|
+
side = "top",
|
|
22
|
+
delay = 500,
|
|
23
|
+
}: TooltipProps): ReactElement {
|
|
24
|
+
const t = useT();
|
|
25
|
+
const [open, setOpen] = useState(false);
|
|
26
|
+
const press = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
27
|
+
const content = (
|
|
28
|
+
<>
|
|
29
|
+
<span>{label}</span>
|
|
30
|
+
{shortcut ? <Keys keys={shortcut} /> : null}
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
if (children === undefined) {
|
|
34
|
+
return (
|
|
35
|
+
<span role="tooltip" className={tooltipClass}>
|
|
36
|
+
{content}
|
|
37
|
+
</span>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const endPress = () => {
|
|
41
|
+
if (press.current !== null) clearTimeout(press.current);
|
|
42
|
+
press.current = null;
|
|
43
|
+
};
|
|
44
|
+
return (
|
|
45
|
+
<RTooltip.Provider delayDuration={delay}>
|
|
46
|
+
<RTooltip.Root open={open} onOpenChange={setOpen}>
|
|
47
|
+
<RTooltip.Trigger
|
|
48
|
+
asChild
|
|
49
|
+
onPointerDown={(e) => {
|
|
50
|
+
if (e.pointerType !== "touch") return;
|
|
51
|
+
endPress();
|
|
52
|
+
press.current = setTimeout(() => setOpen(true), delay);
|
|
53
|
+
}}
|
|
54
|
+
onPointerUp={endPress}
|
|
55
|
+
onPointerCancel={endPress}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</RTooltip.Trigger>
|
|
59
|
+
<RTooltip.Portal>
|
|
60
|
+
<RTooltip.Content
|
|
61
|
+
side={side}
|
|
62
|
+
sideOffset={6}
|
|
63
|
+
collisionPadding={16}
|
|
64
|
+
className={tooltipClass}
|
|
65
|
+
aria-label={shortcut ? t("tooltip.withShortcut", { label, shortcut }) : label}
|
|
66
|
+
>
|
|
67
|
+
{content}
|
|
68
|
+
</RTooltip.Content>
|
|
69
|
+
</RTooltip.Portal>
|
|
70
|
+
</RTooltip.Root>
|
|
71
|
+
</RTooltip.Provider>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# PersonaSwitcher
|
|
2
|
+
|
|
3
|
+
PersonaSwitcher routes each audience to its own proof with a tab per role.
|
|
4
|
+
|
|
5
|
+
Every panel is rendered, so each audience's copy is in the document for search and answer engines; only the selected panel is shown. Left, Right, Home and End move between tabs, and the direction follows `dir`. The selected tab is kept in the URL hash (`#for-finance`), which makes each audience linkable from an ad or an email. Tabs scroll sideways below bp-sm.
|
|
6
|
+
|
|
7
|
+
The consumer provides the personas: a label, a headline, one paragraph, up to four points and one primary and one secondary call to action. Set `hash={false}` inside a sandboxed frame.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# PhaseGlyph
|
|
2
|
+
|
|
3
|
+
PhaseGlyph draws the Lucide icon assigned to each of the nine gated phases.
|
|
4
|
+
|
|
5
|
+
| Gate | Code | Phase | Lucide icon |
|
|
6
|
+
| ---- | ---- | ------- | -------------- |
|
|
7
|
+
| 1 | SCP | Scope | Crosshair |
|
|
8
|
+
| 2 | ENG | Engage | Handshake |
|
|
9
|
+
| 3 | ADV | Advance | ClipboardCheck |
|
|
10
|
+
| 4 | PRC | Procure | ShoppingCart |
|
|
11
|
+
| 5 | BLD | Build | Hammer |
|
|
12
|
+
| 6 | INS | Install | Wrench |
|
|
13
|
+
| 7 | OPR | Operate | Play |
|
|
14
|
+
| 8 | AMP | Amplify | Share2 |
|
|
15
|
+
| 9 | CLS | Close | Archive |
|
|
16
|
+
|
|
17
|
+
Exported as `XOS.glyphs.phases`.
|