@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GHXSTSHIP Industries LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ghxstship/xos-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
XOS web component library: React 19 components on Radix, cmdk and TanStack, styled with the token preset.
|
|
4
|
+
|
|
5
|
+
This is `@xos/ui` from the Atlas repository at release v4.16.0, published under the `@ghxstship` scope.
|
|
6
|
+
The archive holds the package's TypeScript source as the release tag does.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
The source imports its sibling packages as `@xos/*`, so install it under its workspace name with an npm alias, at an exact version:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@xos/ui": "npm:@ghxstship/xos-ui@4.16.0",
|
|
16
|
+
"@xos/i18n": "npm:@ghxstship/xos-i18n@4.16.0",
|
|
17
|
+
"@xos/icons": "npm:@ghxstship/xos-icons@4.16.0",
|
|
18
|
+
"@xos/tokens": "npm:@ghxstship/xos-tokens@4.16.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Build
|
|
24
|
+
|
|
25
|
+
The package ships TypeScript, so the consuming build transpiles it.
|
|
26
|
+
|
|
27
|
+
- In Next.js, list both names of every installed package in `transpilePackages`, for example `"@xos/ui"` and `"@ghxstship/xos-ui"`. pnpm resolves an alias to the published name, so the alias alone is not enough.
|
|
28
|
+
- The source imports its own files with `.ts` and `.tsx` extensions, so the consumer's `tsconfig.json` sets `allowImportingTsExtensions` (with `noEmit` and bundler module resolution).
|
|
29
|
+
- Peer dependencies are exact, as in Atlas at this release: `tailwindcss` 4.3.3, `react` 19.3.0, `react-dom` 19.3.0.
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT. See `LICENSE`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ghxstship/xos-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.16.0",
|
|
4
|
+
"description": "XOS web component library: React 19 components on Radix, cmdk and TanStack, styled with the token preset.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./src/index.ts",
|
|
12
|
+
"./legal-text": "./src/LegalText/index.ts",
|
|
13
|
+
"./consent": "./src/ConsentBanner/index.ts",
|
|
14
|
+
"./consent/static": "./src/ConsentBanner/static.ts",
|
|
15
|
+
"./static": "./src/static.ts",
|
|
16
|
+
"./marketing": "./src/marketing.ts",
|
|
17
|
+
"./preferences": "./src/lib/preferences.ts",
|
|
18
|
+
"./shortcut-targets": "./src/lib/shortcut-targets.ts",
|
|
19
|
+
"./undo": "./src/lib/undo-stack.ts",
|
|
20
|
+
"./route-transition": "./src/lib/route-transition.tsx",
|
|
21
|
+
"./quick-add": "./src/Editing/quickAddCore.ts",
|
|
22
|
+
"./pwa": "./src/pwa/index.ts",
|
|
23
|
+
"./pwa/client": "./src/pwa/client.ts",
|
|
24
|
+
"./pwa/analytics": "./src/pwa/analytics.ts",
|
|
25
|
+
"./pwa/offline-key": "./src/pwa/offline-key.ts",
|
|
26
|
+
"./pwa/browser-push": "./src/pwa/browser-push.tsx",
|
|
27
|
+
"./pwa/action-outcome": "./src/pwa/action-outcome.tsx",
|
|
28
|
+
"./styles.css": "./src/styles/index.css",
|
|
29
|
+
"./marketing.css": "./src/styles/marketing.css",
|
|
30
|
+
"./tailwind.config.cjs": "./tailwind.config.cjs",
|
|
31
|
+
"./brand/*": "./src/brand/defaults/*"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@floating-ui/dom": "1.8.0",
|
|
35
|
+
"@tanstack/react-table": "9.2.6",
|
|
36
|
+
"@tanstack/react-virtual": "3.14.13",
|
|
37
|
+
"@tiptap/core": "3.31.4",
|
|
38
|
+
"@tiptap/extension-collaboration": "3.31.4",
|
|
39
|
+
"@tiptap/extension-link": "3.31.4",
|
|
40
|
+
"@tiptap/extension-list": "3.31.4",
|
|
41
|
+
"@tiptap/extension-mention": "3.31.4",
|
|
42
|
+
"@tiptap/extension-table": "3.31.4",
|
|
43
|
+
"@tiptap/pm": "3.31.4",
|
|
44
|
+
"@tiptap/react": "3.31.4",
|
|
45
|
+
"@tiptap/starter-kit": "3.31.4",
|
|
46
|
+
"@tiptap/suggestion": "3.31.4",
|
|
47
|
+
"@tiptap/y-tiptap": "3.0.9",
|
|
48
|
+
"@visx/group": "4.0.0",
|
|
49
|
+
"@visx/pattern": "4.0.0",
|
|
50
|
+
"@visx/scale": "4.0.0",
|
|
51
|
+
"@visx/shape": "4.0.0",
|
|
52
|
+
"@xos/i18n": "npm:@ghxstship/xos-i18n@4.16.0",
|
|
53
|
+
"@xos/icons": "npm:@ghxstship/xos-icons@4.16.0",
|
|
54
|
+
"@xos/tokens": "npm:@ghxstship/xos-tokens@4.16.0",
|
|
55
|
+
"chrono-node": "2.10.2",
|
|
56
|
+
"cmdk": "1.1.1",
|
|
57
|
+
"lucide-react": "1.53.0",
|
|
58
|
+
"maplibre-gl": "6.13.0",
|
|
59
|
+
"qrcode-generator": "1.4.4",
|
|
60
|
+
"radix-ui": "1.7.0",
|
|
61
|
+
"y-protocols": "1.0.7",
|
|
62
|
+
"yjs": "13.6.33"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"tailwindcss": "4.3.3",
|
|
66
|
+
"react": "19.3.0",
|
|
67
|
+
"react-dom": "19.3.0"
|
|
68
|
+
},
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "git+https://github.com/ghxstship/atlas.git",
|
|
72
|
+
"directory": "packages/ui"
|
|
73
|
+
},
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public",
|
|
76
|
+
"provenance": false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes one Storybook story per design preview (RRR-34, design handoff build step 7) into
|
|
3
|
+
* stories/generated/. Each preview in design/xos-design-system/components/<Name>/preview.html renders
|
|
4
|
+
* the reference component with representative props through `XOS.<Name>`; the story runs the same
|
|
5
|
+
* code against the production @xos/ui exports, which the contract test holds to the reference props.
|
|
6
|
+
* Previews without a script (Cover) and previews that draw with reference-only CSS (ControlStates)
|
|
7
|
+
* have hand-written stories in stories/.
|
|
8
|
+
*
|
|
9
|
+
* Usage: node scripts/generate-stories.mjs [--check]
|
|
10
|
+
* With --check, writes nothing and exits 1 when a generated story is missing, stale or extra.
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { dirname, join } from "node:path";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
import * as prettier from "prettier";
|
|
16
|
+
|
|
17
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const source = join(here, "../../../design/xos-design-system/components");
|
|
19
|
+
const target = join(here, "../stories/generated");
|
|
20
|
+
const HAND_WRITTEN = new Set(["Cover", "ControlStates"]);
|
|
21
|
+
|
|
22
|
+
function story(name, html) {
|
|
23
|
+
const card = /@dsCard(?:\s+group="([^"]+)")?(?:\s+height=(\d+))?/.exec(html);
|
|
24
|
+
const group = card?.[1] ?? "Foundations";
|
|
25
|
+
const height = Number(card?.[2] ?? 240);
|
|
26
|
+
const script = /<script>([\s\S]*?)<\/script>/.exec(html)?.[1];
|
|
27
|
+
if (!script) return null;
|
|
28
|
+
const body = script
|
|
29
|
+
.replace(/^\s*var X = window\.XOS, h = React\.createElement;\s*$/m, "")
|
|
30
|
+
.replace(/ReactDOM\.createRoot\(document\.getElementById\('root'\)\)\.render\(/, "return (");
|
|
31
|
+
return `/* Generated by scripts/generate-stories.mjs from design/xos-design-system/components/${name}/preview.html. Do not edit; run \`pnpm --filter @xos/ui generate:stories\`. */
|
|
32
|
+
import { createElement } from "react";
|
|
33
|
+
import * as X from "../../src/index.ts";
|
|
34
|
+
|
|
35
|
+
const h = createElement;
|
|
36
|
+
const React = { createElement };
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
title: ${JSON.stringify(`${group}/${name}`)},
|
|
40
|
+
parameters: { preview: { height: ${height} } },
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Preview = {
|
|
44
|
+
name: ${JSON.stringify(name)},
|
|
45
|
+
render: () => {
|
|
46
|
+
void React;
|
|
47
|
+
void X;
|
|
48
|
+
void h;
|
|
49
|
+
${body}
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const outputs = new Map();
|
|
56
|
+
for (const name of readdirSync(source).sort()) {
|
|
57
|
+
const file = join(source, name, "preview.html");
|
|
58
|
+
if (HAND_WRITTEN.has(name) || !existsSync(file)) continue;
|
|
59
|
+
const code = story(name, readFileSync(file, "utf8"));
|
|
60
|
+
if (!code) continue;
|
|
61
|
+
const path = join(target, `${name}.stories.js`);
|
|
62
|
+
const config = (await prettier.resolveConfig(path)) ?? {};
|
|
63
|
+
outputs.set(`${name}.stories.js`, await prettier.format(code, { ...config, filepath: path }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (process.argv.includes("--check")) {
|
|
67
|
+
const present = existsSync(target) ? readdirSync(target) : [];
|
|
68
|
+
const problems = [
|
|
69
|
+
...[...outputs]
|
|
70
|
+
.filter(([f, c]) => !present.includes(f) || readFileSync(join(target, f), "utf8") !== c)
|
|
71
|
+
.map(([f]) => f),
|
|
72
|
+
...present.filter((f) => !outputs.has(f)),
|
|
73
|
+
];
|
|
74
|
+
if (problems.length) {
|
|
75
|
+
console.error(
|
|
76
|
+
`stories/generated is out of date (${problems.join(", ")}). Run pnpm --filter @xos/ui generate:stories.`,
|
|
77
|
+
);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
rmSync(target, { recursive: true, force: true });
|
|
82
|
+
mkdirSync(target, { recursive: true });
|
|
83
|
+
for (const [file, code] of outputs) writeFileSync(join(target, file), code);
|
|
84
|
+
console.log(`Wrote ${outputs.size} stories to stories/generated`);
|
|
85
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# AIDisclosureBadge
|
|
2
|
+
|
|
3
|
+
AIDisclosureBadge marks a feature as AI, names the model provider and links the notice.
|
|
4
|
+
|
|
5
|
+
Place it beside every mention of an AI feature on a public page, and beside any image or text an AI system generated. The label is a word, "AI feature", never an icon alone.
|
|
6
|
+
|
|
7
|
+
The consumer provides the provider line and the link to the AI Features Notice.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
Accordion progressively discloses sections; use it for the More fields pattern past seven visible fields.
|
|
4
|
+
|
|
5
|
+
Inside a form, pass `keepMounted` so collapsed fields stay in the DOM, hidden, keep their values and submit with the form. Title the section with the "More fields" label and put every field past the seventh in it.
|
|
6
|
+
|
|
7
|
+
`MoreFields` is that section ready-made: an Accordion titled with the catalog's "More fields", kept mounted.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
AvatarProps as ReferenceAvatarProps,
|
|
4
|
+
AvatarStackProps as ReferenceAvatarStackProps,
|
|
5
|
+
} from "../types/reference";
|
|
6
|
+
import { cx } from "../lib/cx.ts";
|
|
7
|
+
import { useT } from "../lib/context.tsx";
|
|
8
|
+
import { avatarClass, initials } from "./avatar-class.ts";
|
|
9
|
+
|
|
10
|
+
export type AvatarProps = ReferenceAvatarProps;
|
|
11
|
+
export type AvatarStackProps = ReferenceAvatarStackProps;
|
|
12
|
+
|
|
13
|
+
export { avatarClass, initials };
|
|
14
|
+
|
|
15
|
+
/** Initials in a circle, named for assistive technology. */
|
|
16
|
+
export function Avatar({ name, size = "md" }: AvatarProps): ReactElement {
|
|
17
|
+
return (
|
|
18
|
+
<span
|
|
19
|
+
role="img"
|
|
20
|
+
aria-label={name}
|
|
21
|
+
title={name}
|
|
22
|
+
className={cx(
|
|
23
|
+
avatarClass,
|
|
24
|
+
size === "lg" ? "size-(--ui-avatar-lg) text-text-12" : "size-(--ui-avatar) text-text-11",
|
|
25
|
+
)}
|
|
26
|
+
>
|
|
27
|
+
{initials(name)}
|
|
28
|
+
</span>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Up to `max` avatars (3 by default) and a count of the rest. */
|
|
33
|
+
export function AvatarStack({ names, max = 3 }: AvatarStackProps): ReactElement {
|
|
34
|
+
const t = useT();
|
|
35
|
+
const shown = names.slice(0, max);
|
|
36
|
+
const extra = names.length - shown.length;
|
|
37
|
+
return (
|
|
38
|
+
<span className="inline-flex [&>*+*]:ms-(--ui-avatar-overlap)">
|
|
39
|
+
{shown.map((name) => (
|
|
40
|
+
<Avatar key={name} name={name} />
|
|
41
|
+
))}
|
|
42
|
+
{extra > 0 ? (
|
|
43
|
+
<span
|
|
44
|
+
role="img"
|
|
45
|
+
aria-label={t("avatar.more", { n: extra })}
|
|
46
|
+
className={cx(
|
|
47
|
+
avatarClass,
|
|
48
|
+
"size-(--ui-avatar) text-text-11 bg-bg-surface text-text-secondary tabular-nums",
|
|
49
|
+
)}
|
|
50
|
+
>
|
|
51
|
+
{t("avatar.overflow", { n: extra })}
|
|
52
|
+
</span>
|
|
53
|
+
) : null}
|
|
54
|
+
</span>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cx } from "../lib/cx.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The avatar's initials and classes without the component: no hooks and no context, so a server
|
|
5
|
+
* component can draw the same circle (ADR 0027).
|
|
6
|
+
*/
|
|
7
|
+
export function initials(name: string): string {
|
|
8
|
+
return name
|
|
9
|
+
.split(/\s+/)
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.slice(0, 2)
|
|
12
|
+
.map((part) => part.charAt(0).toUpperCase())
|
|
13
|
+
.join("");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const avatarClass = cx(
|
|
17
|
+
"inline-grid place-items-center flex-none rounded-full bg-bg-hover text-text-primary font-semibold",
|
|
18
|
+
"ring-(length:--stroke-width-focus) ring-bg-canvas",
|
|
19
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Board
|
|
2
|
+
|
|
3
|
+
Board groups records into columns by state or any single-choice field; dragging a card changes that field, with a keyboard path.
|
|
4
|
+
|
|
5
|
+
- A card shows its key, owner, title, an optional `meta` line in secondary text, its kind and its due date.
|
|
6
|
+
- `readOnly` hides the add buttons and disables moving cards, for viewers who cannot create or change these records.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { BrandMarkProps as ReferenceBrandMarkProps } from "../types/reference";
|
|
3
|
+
import { cx } from "../lib/cx.ts";
|
|
4
|
+
|
|
5
|
+
export type BrandMarkProps = ReferenceBrandMarkProps;
|
|
6
|
+
|
|
7
|
+
const TILE: Record<NonNullable<BrandMarkProps["size"]>, string> = {
|
|
8
|
+
sm: cx("size-icon-20 text-text-11 rounded-control"),
|
|
9
|
+
md: cx("h-control-md min-w-control-md text-text-11 rounded-control"),
|
|
10
|
+
lg: cx("h-(--space-40) min-w-(--space-40) text-heading-16 rounded-card"),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const NAME: Record<NonNullable<BrandMarkProps["size"]>, string> = {
|
|
14
|
+
sm: cx("text-text-13"),
|
|
15
|
+
md: cx("text-text-14"),
|
|
16
|
+
lg: cx("text-heading-20"),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const LOGO: Record<NonNullable<BrandMarkProps["size"]>, string> = {
|
|
20
|
+
sm: cx("h-(--icon-size-20)"),
|
|
21
|
+
md: cx("h-control-md"),
|
|
22
|
+
lg: cx("h-(--space-40)"),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function monogram(name: string, override?: string): string {
|
|
26
|
+
return (
|
|
27
|
+
override ??
|
|
28
|
+
name
|
|
29
|
+
.replace(/[^A-Za-z0-9 ]/g, "")
|
|
30
|
+
.split(/\s+/)
|
|
31
|
+
.map((w) => w.charAt(0))
|
|
32
|
+
.join("")
|
|
33
|
+
.slice(0, 2)
|
|
34
|
+
).toUpperCase();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The white-label mark (ADR 0011): the tenant's light or dark logo for the current theme, or a
|
|
39
|
+
* monogram tile in accent-default with the name until logos are set.
|
|
40
|
+
*/
|
|
41
|
+
export function BrandMark({
|
|
42
|
+
name,
|
|
43
|
+
logoLight,
|
|
44
|
+
logoDark,
|
|
45
|
+
monogram: mark,
|
|
46
|
+
size = "md",
|
|
47
|
+
iconOnly = false,
|
|
48
|
+
}: BrandMarkProps): ReactElement {
|
|
49
|
+
if (logoLight || logoDark) {
|
|
50
|
+
return (
|
|
51
|
+
<span className="inline-flex items-center gap-8">
|
|
52
|
+
{logoDark ? (
|
|
53
|
+
<img
|
|
54
|
+
src={logoDark}
|
|
55
|
+
alt={name}
|
|
56
|
+
className={cx(
|
|
57
|
+
LOGO[size],
|
|
58
|
+
"w-auto in-data-[theme=light]:hidden in-data-[theme=sunlight]:hidden",
|
|
59
|
+
)}
|
|
60
|
+
/>
|
|
61
|
+
) : null}
|
|
62
|
+
{logoLight ? (
|
|
63
|
+
<img
|
|
64
|
+
src={logoLight}
|
|
65
|
+
alt={logoDark ? "" : name}
|
|
66
|
+
className={cx(
|
|
67
|
+
LOGO[size],
|
|
68
|
+
"w-auto",
|
|
69
|
+
logoDark && "hidden in-data-[theme=light]:inline in-data-[theme=sunlight]:inline",
|
|
70
|
+
)}
|
|
71
|
+
/>
|
|
72
|
+
) : null}
|
|
73
|
+
</span>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return (
|
|
77
|
+
<span role="img" aria-label={name} className="inline-flex items-center gap-8">
|
|
78
|
+
<span
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
className={cx(
|
|
81
|
+
"inline-grid place-items-center bg-accent text-accent-text-on font-bold leading-none tracking-wide",
|
|
82
|
+
"forced-colors:forced-color-adjust-none",
|
|
83
|
+
TILE[size],
|
|
84
|
+
)}
|
|
85
|
+
>
|
|
86
|
+
{monogram(name, mark)}
|
|
87
|
+
</span>
|
|
88
|
+
{iconOnly ? null : (
|
|
89
|
+
<span aria-hidden="true" className={cx("font-semibold text-text-primary", NAME[size])}>
|
|
90
|
+
{name}
|
|
91
|
+
</span>
|
|
92
|
+
)}
|
|
93
|
+
</span>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# BrandMark
|
|
2
|
+
|
|
3
|
+
BrandMark renders the tenant's logo, switching light and dark files with the theme, or a token-driven monogram and name when no logo is set.
|
|
4
|
+
|
|
5
|
+
- Props: `name` (required, also the alt text), `logoLight`, `logoDark`, `monogram`, `size` (`sm` 20 px, `md` 28 px, `lg` 40 px), `iconOnly`.
|
|
6
|
+
- With no logo uploaded, the monogram tile uses `accent-default` and `accent-text-on`, so it follows the tenant accent automatically.
|
|
7
|
+
- The platform brand marks are not set yet; until they are, the platform also renders through this fallback.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# BrandSlot
|
|
2
|
+
|
|
3
|
+
BrandSlot marks where a tenant uploads a brand file in White Label settings, with its size and formats.
|
|
4
|
+
|
|
5
|
+
- Slots: Logo Light, Logo Dark, Favicon, App Icon (Enterprise branded builds), Splash (Enterprise branded builds).
|
|
6
|
+
- Pass the delivery size as `width` and `height` in pixels. The frame is drawn in proportion, at most 160 by 148, and the caption states the delivery size.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# BudgetGrid
|
|
2
|
+
|
|
3
|
+
BudgetGrid groups budget lines by GL account in numeric order, then by cost center and URID, with a grade toggle.
|
|
4
|
+
|
|
5
|
+
- GL posting is derived, never stored. A line carries its URID; the URID class (first segment) selects that class's one account of the requested type from the GL Accounts table passed as `accounts` (Expense by default). 5000.01.02 posts to 5500 Expense · Production because class 5000 owns 5500. A line whose class has no account groups last under Unmapped Account with a warning icon, so a gap in the chart is visible rather than silently misposted.
|
|
6
|
+
- Amount is derived as quantity times the selected grade's rate. It is never stored, and a blank input gives a blank amount.
|
|
7
|
+
- Totals follow the silence rule: any unpriced line makes its subtotal and the total Unpriced.
|
|
8
|
+
- Line types are Scope, Overhead, Contingency, Fee and Retainer. Fee and Contingency are line types, not accounts.
|
|
9
|
+
- Grades are Base, Elevated and Premium (build prompt, decision D11). Grade labels are passed as `grades` from the enumeration table, never hard-coded.
|
|
10
|
+
- The preview uses Item Catalog lines and prices verbatim. Ungraded items carry the same rate in every grade; graded touchpoint items such as Artist-Rooted Cultural Menu are unpriced in the catalog, which is why the Hospitality subtotal and the total read Unpriced.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
ButtonProps as ReferenceButtonProps,
|
|
4
|
+
IconButtonProps as ReferenceIconButtonProps,
|
|
5
|
+
} from "../types/reference";
|
|
6
|
+
import { cx } from "../lib/cx.ts";
|
|
7
|
+
import { useT } from "../lib/context.tsx";
|
|
8
|
+
import { buttonClass, iconButtonClass } from "./button-class.ts";
|
|
9
|
+
import { Icon } from "../Icon/Icon.tsx";
|
|
10
|
+
import { Keys } from "../Kbd/Kbd.tsx";
|
|
11
|
+
|
|
12
|
+
export type ButtonProps = ReferenceButtonProps;
|
|
13
|
+
export type IconButtonProps = ReferenceIconButtonProps;
|
|
14
|
+
|
|
15
|
+
export { buttonClass, iconButtonClass };
|
|
16
|
+
|
|
17
|
+
function Spinner(): ReactElement {
|
|
18
|
+
return (
|
|
19
|
+
<svg
|
|
20
|
+
className="xos-anim-spin inline-block flex-none"
|
|
21
|
+
width={14}
|
|
22
|
+
height={14}
|
|
23
|
+
viewBox="0 0 16 16"
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
>
|
|
26
|
+
<circle
|
|
27
|
+
cx={8}
|
|
28
|
+
cy={8}
|
|
29
|
+
r={6}
|
|
30
|
+
fill="none"
|
|
31
|
+
stroke="currentColor"
|
|
32
|
+
strokeWidth={1.5}
|
|
33
|
+
strokeDasharray="28 10"
|
|
34
|
+
strokeLinecap="round"
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Triggers one action. One primary per screen; `loading` sets aria-busy and blocks repeat clicks
|
|
42
|
+
* without disabling focus.
|
|
43
|
+
*/
|
|
44
|
+
export function Button({
|
|
45
|
+
variant = "secondary",
|
|
46
|
+
size = "md",
|
|
47
|
+
loading = false,
|
|
48
|
+
icon,
|
|
49
|
+
shortcut,
|
|
50
|
+
className,
|
|
51
|
+
children,
|
|
52
|
+
type = "button",
|
|
53
|
+
onClick,
|
|
54
|
+
...rest
|
|
55
|
+
}: ButtonProps): ReactElement {
|
|
56
|
+
return (
|
|
57
|
+
<button
|
|
58
|
+
type={type}
|
|
59
|
+
{...rest}
|
|
60
|
+
{...(loading ? { "aria-busy": true, "aria-disabled": true } : {})}
|
|
61
|
+
onClick={loading ? undefined : onClick}
|
|
62
|
+
className={cx(buttonClass(variant, size), className)}
|
|
63
|
+
>
|
|
64
|
+
{loading ? <Spinner /> : icon ? <Icon name={icon} size={14} /> : null}
|
|
65
|
+
{children}
|
|
66
|
+
{/* A touch screen has no keyboard to press it with, so the hint stays off there (A59-023). */}
|
|
67
|
+
{shortcut ? (
|
|
68
|
+
<span className="ms-4 inline-flex pointer-coarse:hidden">
|
|
69
|
+
<Keys keys={shortcut} />
|
|
70
|
+
</span>
|
|
71
|
+
) : null}
|
|
72
|
+
</button>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A square control with one icon and a required label, used as aria-label and the tooltip text.
|
|
78
|
+
*/
|
|
79
|
+
export function IconButton({
|
|
80
|
+
icon,
|
|
81
|
+
label,
|
|
82
|
+
shortcut,
|
|
83
|
+
variant = "ghost",
|
|
84
|
+
className,
|
|
85
|
+
type = "button",
|
|
86
|
+
...rest
|
|
87
|
+
}: IconButtonProps): ReactElement {
|
|
88
|
+
const t = useT();
|
|
89
|
+
return (
|
|
90
|
+
<button
|
|
91
|
+
type={type}
|
|
92
|
+
aria-label={label}
|
|
93
|
+
title={shortcut ? t("tooltip.withShortcut", { label, shortcut }) : label}
|
|
94
|
+
{...rest}
|
|
95
|
+
className={cx(iconButtonClass(variant), className)}
|
|
96
|
+
>
|
|
97
|
+
<Icon name={icon} />
|
|
98
|
+
</button>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
Button triggers one action; exactly one primary per screen, everything else secondary, ghost or in overflow.
|
|
4
|
+
|
|
5
|
+
- Variants: `primary` (accent fill, the one action the screen is for), `secondary` (default), `ghost` (toolbars, dialog cancel), `danger` (destructive, always paired with Undo or a confirmation for irreversible work).
|
|
6
|
+
- Sizes: `sm` 24 px, `md` 28 px (default), `lg` 32 px from `control-*` tokens, and `xl` 44 px from `target-coarse`, the call to action size on public pages.
|
|
7
|
+
- Labels are Title Case and at most three words, verb first: Create Record, Approve, Export.
|
|
8
|
+
- Pass `shortcut` to show the key in a Kbd; every action has one.
|
|
9
|
+
- `loading` sets `aria-busy` and blocks repeat clicks without a blocking spinner elsewhere.
|
|
10
|
+
- States: default, hover (`bg-hover` or brightness on primary), focus (2 px `focus-ring`), active, disabled (`opacity-disabled`), loading.
|