@lar-works/design-system 0.0.0-stage → 0.1.1
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/README.md +24 -2
- package/dist/actions/Button.d.ts +25 -0
- package/dist/actions/Button.js +55 -0
- package/dist/actions/Button.js.map +1 -0
- package/dist/actions/ButtonLink.d.ts +21 -0
- package/dist/actions/ButtonLink.js +40 -0
- package/dist/actions/ButtonLink.js.map +1 -0
- package/dist/actions/IconButton.d.ts +14 -0
- package/dist/actions/IconButton.js +29 -0
- package/dist/actions/IconButton.js.map +1 -0
- package/dist/actions/ThemeSwitch.d.ts +7 -0
- package/dist/actions/ThemeSwitch.js +42 -0
- package/dist/actions/ThemeSwitch.js.map +1 -0
- package/dist/actions/index.d.ts +5 -0
- package/dist/collections/CollectionSectionHeader.d.ts +5 -0
- package/dist/collections/CollectionSectionHeader.js +18 -0
- package/dist/collections/CollectionSectionHeader.js.map +1 -0
- package/dist/collections/CollectionState.d.ts +37 -0
- package/dist/collections/CollectionState.js +69 -0
- package/dist/collections/CollectionState.js.map +1 -0
- package/dist/collections/CollectionTokens.d.ts +16 -0
- package/dist/collections/CollectionTokens.js +19 -0
- package/dist/collections/CollectionTokens.js.map +1 -0
- package/dist/collections/CollectionViewport.js +36 -0
- package/dist/collections/CollectionViewport.js.map +1 -0
- package/dist/collections/DataRow.d.ts +23 -0
- package/dist/collections/DataRow.js +57 -0
- package/dist/collections/DataRow.js.map +1 -0
- package/dist/collections/ResultList.d.ts +29 -0
- package/dist/collections/ResultList.js +128 -0
- package/dist/collections/ResultList.js.map +1 -0
- package/dist/collections/ScrollRow.d.ts +23 -0
- package/dist/collections/ScrollRow.js +59 -0
- package/dist/collections/ScrollRow.js.map +1 -0
- package/dist/collections/VirtualGrid.d.ts +14 -0
- package/dist/collections/VirtualGrid.js +71 -0
- package/dist/collections/VirtualGrid.js.map +1 -0
- package/dist/collections/VirtualList.d.ts +34 -0
- package/dist/collections/VirtualList.js +128 -0
- package/dist/collections/VirtualList.js.map +1 -0
- package/dist/collections/index.d.ts +10 -0
- package/dist/collections/useCollectionMotion.d.ts +3 -0
- package/dist/collections/useCollectionMotion.js +34 -0
- package/dist/collections/useCollectionMotion.js.map +1 -0
- package/dist/collections/useScrollRow.d.ts +17 -0
- package/dist/collections/useScrollRow.js +63 -0
- package/dist/collections/useScrollRow.js.map +1 -0
- package/dist/display/ActivityCard.d.ts +17 -0
- package/dist/display/ActivityCard.js +58 -0
- package/dist/display/ActivityCard.js.map +1 -0
- package/dist/display/Artwork.d.ts +25 -0
- package/dist/display/Artwork.js +97 -0
- package/dist/display/Artwork.js.map +1 -0
- package/dist/display/Avatar.d.ts +5 -0
- package/dist/display/Avatar.js +13 -0
- package/dist/display/Avatar.js.map +1 -0
- package/dist/display/Badge.d.ts +10 -0
- package/dist/display/Badge.js +28 -0
- package/dist/display/Badge.js.map +1 -0
- package/dist/display/BadgeList.d.ts +11 -0
- package/dist/display/BadgeList.js +20 -0
- package/dist/display/BadgeList.js.map +1 -0
- package/dist/display/BrandMark.d.ts +21 -0
- package/dist/display/BrandMark.js +60 -0
- package/dist/display/BrandMark.js.map +1 -0
- package/dist/display/ChangeList.d.ts +16 -0
- package/dist/display/ChangeList.js +56 -0
- package/dist/display/ChangeList.js.map +1 -0
- package/dist/display/CheckList.d.ts +10 -0
- package/dist/display/CheckList.js +25 -0
- package/dist/display/CheckList.js.map +1 -0
- package/dist/display/CodeBlock.d.ts +6 -0
- package/dist/display/CodeBlock.js +12 -0
- package/dist/display/CodeBlock.js.map +1 -0
- package/dist/display/CopyButton.d.ts +9 -0
- package/dist/display/CopyButton.js +59 -0
- package/dist/display/CopyButton.js.map +1 -0
- package/dist/display/DataTable.d.ts +35 -0
- package/dist/display/DataTable.js +53 -0
- package/dist/display/DataTable.js.map +1 -0
- package/dist/display/DetailHero.d.ts +39 -0
- package/dist/display/DetailHero.js +146 -0
- package/dist/display/DetailHero.js.map +1 -0
- package/dist/display/DetailList.d.ts +15 -0
- package/dist/display/DetailList.js +53 -0
- package/dist/display/DetailList.js.map +1 -0
- package/dist/display/DeviceCard.d.ts +18 -0
- package/dist/display/DeviceCard.js +48 -0
- package/dist/display/DeviceCard.js.map +1 -0
- package/dist/display/Identity.d.ts +14 -0
- package/dist/display/Identity.js +54 -0
- package/dist/display/Identity.js.map +1 -0
- package/dist/display/ImageCard.d.ts +22 -0
- package/dist/display/ImageCard.js +63 -0
- package/dist/display/ImageCard.js.map +1 -0
- package/dist/display/ImagePicker.d.ts +30 -0
- package/dist/display/ImagePicker.js +108 -0
- package/dist/display/ImagePicker.js.map +1 -0
- package/dist/display/InfoBox.d.ts +15 -0
- package/dist/display/InfoBox.js +41 -0
- package/dist/display/InfoBox.js.map +1 -0
- package/dist/display/InsetPanel.d.ts +13 -0
- package/dist/display/InsetPanel.js +26 -0
- package/dist/display/InsetPanel.js.map +1 -0
- package/dist/display/ItemAction.d.ts +10 -0
- package/dist/display/ItemAction.js +35 -0
- package/dist/display/ItemAction.js.map +1 -0
- package/dist/display/Kbd.d.ts +6 -0
- package/dist/display/Kbd.js +12 -0
- package/dist/display/Kbd.js.map +1 -0
- package/dist/display/KindIcon.d.ts +8 -0
- package/dist/display/KindIcon.js +15 -0
- package/dist/display/KindIcon.js.map +1 -0
- package/dist/display/NoticeCard.d.ts +24 -0
- package/dist/display/NoticeCard.js +59 -0
- package/dist/display/NoticeCard.js.map +1 -0
- package/dist/display/PairingList.d.ts +19 -0
- package/dist/display/PairingList.js +53 -0
- package/dist/display/PairingList.js.map +1 -0
- package/dist/display/PathList.d.ts +9 -0
- package/dist/display/PathList.js +21 -0
- package/dist/display/PathList.js.map +1 -0
- package/dist/display/PeoplePreview.d.ts +16 -0
- package/dist/display/PeoplePreview.js +41 -0
- package/dist/display/PeoplePreview.js.map +1 -0
- package/dist/display/PropertySheet.d.ts +56 -0
- package/dist/display/PropertySheet.js +150 -0
- package/dist/display/PropertySheet.js.map +1 -0
- package/dist/display/QrCode.d.ts +6 -0
- package/dist/display/QrCode.js +47 -0
- package/dist/display/QrCode.js.map +1 -0
- package/dist/display/RadioChoice.d.ts +9 -0
- package/dist/display/RadioChoice.js +28 -0
- package/dist/display/RadioChoice.js.map +1 -0
- package/dist/display/RatingLink.d.ts +10 -0
- package/dist/display/RatingLink.js +80 -0
- package/dist/display/RatingLink.js.map +1 -0
- package/dist/display/ResourceCard.d.ts +20 -0
- package/dist/display/ResourceCard.js +200 -0
- package/dist/display/ResourceCard.js.map +1 -0
- package/dist/display/RowList.d.ts +28 -0
- package/dist/display/RowList.js +76 -0
- package/dist/display/RowList.js.map +1 -0
- package/dist/display/StackedMeter.d.ts +28 -0
- package/dist/display/StackedMeter.js +48 -0
- package/dist/display/StackedMeter.js.map +1 -0
- package/dist/display/StatTile.d.ts +13 -0
- package/dist/display/StatTile.js +35 -0
- package/dist/display/StatTile.js.map +1 -0
- package/dist/display/StepList.d.ts +5 -0
- package/dist/display/StepList.js +12 -0
- package/dist/display/StepList.js.map +1 -0
- package/dist/display/TextPreview.d.ts +14 -0
- package/dist/display/TextPreview.js +46 -0
- package/dist/display/TextPreview.js.map +1 -0
- package/dist/display/TimeSeriesChart.d.ts +19 -0
- package/dist/display/TimeSeriesChart.js +163 -0
- package/dist/display/TimeSeriesChart.js.map +1 -0
- package/dist/display/ToneTile.js +12 -0
- package/dist/display/ToneTile.js.map +1 -0
- package/dist/display/index.d.ts +38 -0
- package/dist/feedback/Alert.d.ts +15 -0
- package/dist/feedback/Alert.js +19 -0
- package/dist/feedback/Alert.js.map +1 -0
- package/dist/feedback/AsyncState.d.ts +16 -0
- package/dist/feedback/AsyncState.js +29 -0
- package/dist/feedback/AsyncState.js.map +1 -0
- package/dist/feedback/ErrorNotification.d.ts +8 -0
- package/dist/feedback/ErrorNotification.js +20 -0
- package/dist/feedback/ErrorNotification.js.map +1 -0
- package/dist/feedback/Notifications.d.ts +2 -0
- package/dist/feedback/Notifications.js +9 -0
- package/dist/feedback/Notifications.js.map +1 -0
- package/dist/feedback/ProgressStatusRow.d.ts +23 -0
- package/dist/feedback/ProgressStatusRow.js +74 -0
- package/dist/feedback/ProgressStatusRow.js.map +1 -0
- package/dist/feedback/SkeletonLoader.d.ts +19 -0
- package/dist/feedback/SkeletonLoader.js +59 -0
- package/dist/feedback/SkeletonLoader.js.map +1 -0
- package/dist/feedback/StatusIndicator.d.ts +9 -0
- package/dist/feedback/StatusIndicator.js +28 -0
- package/dist/feedback/StatusIndicator.js.map +1 -0
- package/dist/feedback/StatusPopoverContent.d.ts +13 -0
- package/dist/feedback/StatusPopoverContent.js +50 -0
- package/dist/feedback/StatusPopoverContent.js.map +1 -0
- package/dist/feedback/StatusRow.d.ts +16 -0
- package/dist/feedback/StatusRow.js +60 -0
- package/dist/feedback/StatusRow.js.map +1 -0
- package/dist/feedback/index.d.ts +11 -0
- package/dist/feedback/index.js +11 -0
- package/dist/forms/Checkbox.d.ts +10 -0
- package/dist/forms/Checkbox.js +48 -0
- package/dist/forms/Checkbox.js.map +1 -0
- package/dist/forms/Field.d.ts +5 -0
- package/dist/forms/Field.js +15 -0
- package/dist/forms/Field.js.map +1 -0
- package/dist/forms/FormControlStyles.js +14 -0
- package/dist/forms/FormControlStyles.js.map +1 -0
- package/dist/forms/FormSection.d.ts +48 -0
- package/dist/forms/FormSection.js +142 -0
- package/dist/forms/FormSection.js.map +1 -0
- package/dist/forms/InlineFields.d.ts +13 -0
- package/dist/forms/InlineFields.js +24 -0
- package/dist/forms/InlineFields.js.map +1 -0
- package/dist/forms/Input.d.ts +5 -0
- package/dist/forms/Input.js +18 -0
- package/dist/forms/Input.js.map +1 -0
- package/dist/forms/OptionSelect.d.ts +21 -0
- package/dist/forms/OptionSelect.js +28 -0
- package/dist/forms/OptionSelect.js.map +1 -0
- package/dist/forms/RadioGroup.d.ts +5 -0
- package/dist/forms/RadioGroup.js +35 -0
- package/dist/forms/RadioGroup.js.map +1 -0
- package/dist/forms/Select.d.ts +6 -0
- package/dist/forms/Select.js +36 -0
- package/dist/forms/Select.js.map +1 -0
- package/dist/forms/Switch.d.ts +4 -0
- package/dist/forms/Switch.js +16 -0
- package/dist/forms/Switch.js.map +1 -0
- package/dist/forms/TagInput.d.ts +19 -0
- package/dist/forms/TagInput.js +60 -0
- package/dist/forms/TagInput.js.map +1 -0
- package/dist/forms/Textarea.d.ts +4 -0
- package/dist/forms/Textarea.js +15 -0
- package/dist/forms/Textarea.js.map +1 -0
- package/dist/forms/index.d.ts +12 -0
- package/dist/foundations/DesignSystemProvider.d.ts +64 -0
- package/dist/foundations/DesignSystemProvider.js +66 -0
- package/dist/foundations/DesignSystemProvider.js.map +1 -0
- package/dist/foundations/KeyboardFocus.d.ts +9 -0
- package/dist/foundations/KeyboardFocus.js +10 -0
- package/dist/foundations/KeyboardFocus.js.map +1 -0
- package/dist/foundations/KeyboardShortcut.d.ts +5 -0
- package/dist/foundations/KeyboardShortcut.js +10 -0
- package/dist/foundations/KeyboardShortcut.js.map +1 -0
- package/dist/foundations/Theme.d.ts +14 -0
- package/dist/foundations/Theme.js +54 -0
- package/dist/foundations/Theme.js.map +1 -0
- package/dist/foundations/index.d.ts +5 -0
- package/dist/icons/BrandIcons.d.ts +3 -0
- package/dist/icons/BrandIcons.js +14 -0
- package/dist/icons/BrandIcons.js.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons.d.ts +4 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.js +125 -0
- package/dist/layout/AppShell.d.ts +11 -0
- package/dist/layout/AppShell.js +46 -0
- package/dist/layout/AppShell.js.map +1 -0
- package/dist/layout/AuthLayout.d.ts +11 -0
- package/dist/layout/AuthLayout.js +48 -0
- package/dist/layout/AuthLayout.js.map +1 -0
- package/dist/layout/ContentContainer.d.ts +9 -0
- package/dist/layout/ContentContainer.js +15 -0
- package/dist/layout/ContentContainer.js.map +1 -0
- package/dist/layout/Flow.d.ts +26 -0
- package/dist/layout/Flow.js +65 -0
- package/dist/layout/Flow.js.map +1 -0
- package/dist/layout/PageLayout.d.ts +12 -0
- package/dist/layout/PageLayout.js +31 -0
- package/dist/layout/PageLayout.js.map +1 -0
- package/dist/layout/PageSection.d.ts +43 -0
- package/dist/layout/PageSection.js +63 -0
- package/dist/layout/PageSection.js.map +1 -0
- package/dist/layout/ScrollArea.d.ts +4 -0
- package/dist/layout/ScrollArea.js +11 -0
- package/dist/layout/ScrollArea.js.map +1 -0
- package/dist/layout/Section.d.ts +12 -0
- package/dist/layout/Section.js +36 -0
- package/dist/layout/Section.js.map +1 -0
- package/dist/layout/Site.d.ts +41 -0
- package/dist/layout/Site.js +157 -0
- package/dist/layout/Site.js.map +1 -0
- package/dist/layout/TitleBar.d.ts +28 -0
- package/dist/layout/TitleBar.js +83 -0
- package/dist/layout/TitleBar.js.map +1 -0
- package/dist/layout/WorkspaceActionsHeader.d.ts +8 -0
- package/dist/layout/WorkspaceActionsHeader.js +18 -0
- package/dist/layout/WorkspaceActionsHeader.js.map +1 -0
- package/dist/layout/index.d.ts +19 -0
- package/dist/layout/index.js +19 -0
- package/dist/layout/sidebar/SidebarNavigationItem.d.ts +10 -0
- package/dist/layout/sidebar/SidebarNavigationItem.js +36 -0
- package/dist/layout/sidebar/SidebarNavigationItem.js.map +1 -0
- package/dist/layout/sidebar/SidebarPane.d.ts +13 -0
- package/dist/layout/sidebar/SidebarPane.js +30 -0
- package/dist/layout/sidebar/SidebarPane.js.map +1 -0
- package/dist/layout/toolbar/CommandPaletteTrigger.d.ts +11 -0
- package/dist/layout/toolbar/CommandPaletteTrigger.js +46 -0
- package/dist/layout/toolbar/CommandPaletteTrigger.js.map +1 -0
- package/dist/layout/toolbar/ToolbarStatusGroup.d.ts +5 -0
- package/dist/layout/toolbar/ToolbarStatusGroup.js +14 -0
- package/dist/layout/toolbar/ToolbarStatusGroup.js.map +1 -0
- package/dist/layout/toolbar/ToolbarStatusItem.d.ts +9 -0
- package/dist/layout/toolbar/ToolbarStatusItem.js +18 -0
- package/dist/layout/toolbar/ToolbarStatusItem.js.map +1 -0
- package/dist/navigation/ArtworkTabs.d.ts +18 -0
- package/dist/navigation/ArtworkTabs.js +72 -0
- package/dist/navigation/ArtworkTabs.js.map +1 -0
- package/dist/navigation/Breadcrumbs.d.ts +13 -0
- package/dist/navigation/Breadcrumbs.js +32 -0
- package/dist/navigation/Breadcrumbs.js.map +1 -0
- package/dist/navigation/CollectionBrowseSelector.d.ts +22 -0
- package/dist/navigation/CollectionBrowseSelector.js +70 -0
- package/dist/navigation/CollectionBrowseSelector.js.map +1 -0
- package/dist/navigation/CollectionViewToggle.d.ts +12 -0
- package/dist/navigation/CollectionViewToggle.js +36 -0
- package/dist/navigation/CollectionViewToggle.js.map +1 -0
- package/dist/navigation/DrilldownBrowseSelector.d.ts +31 -0
- package/dist/navigation/DrilldownBrowseSelector.js +174 -0
- package/dist/navigation/DrilldownBrowseSelector.js.map +1 -0
- package/dist/navigation/FolderSelector.d.ts +24 -0
- package/dist/navigation/FolderSelector.js +142 -0
- package/dist/navigation/FolderSelector.js.map +1 -0
- package/dist/navigation/TabKeys.js +13 -0
- package/dist/navigation/TabKeys.js.map +1 -0
- package/dist/navigation/ViewTabs.d.ts +19 -0
- package/dist/navigation/ViewTabs.js +48 -0
- package/dist/navigation/ViewTabs.js.map +1 -0
- package/dist/navigation/index.d.ts +8 -0
- package/dist/overlays/ActionModal.d.ts +21 -0
- package/dist/overlays/ActionModal.js +48 -0
- package/dist/overlays/ActionModal.js.map +1 -0
- package/dist/overlays/CommandPalette.d.ts +43 -0
- package/dist/overlays/CommandPalette.js +163 -0
- package/dist/overlays/CommandPalette.js.map +1 -0
- package/dist/overlays/Drawer.d.ts +19 -0
- package/dist/overlays/Drawer.js +83 -0
- package/dist/overlays/Drawer.js.map +1 -0
- package/dist/overlays/DropdownMenu.d.ts +47 -0
- package/dist/overlays/DropdownMenu.js +58 -0
- package/dist/overlays/DropdownMenu.js.map +1 -0
- package/dist/overlays/ImageViewer.d.ts +21 -0
- package/dist/overlays/ImageViewer.js +82 -0
- package/dist/overlays/ImageViewer.js.map +1 -0
- package/dist/overlays/Modal.d.ts +36 -0
- package/dist/overlays/Modal.js +149 -0
- package/dist/overlays/Modal.js.map +1 -0
- package/dist/overlays/Popover.d.ts +19 -0
- package/dist/overlays/Popover.js +26 -0
- package/dist/overlays/Popover.js.map +1 -0
- package/dist/overlays/Tooltip.d.ts +12 -0
- package/dist/overlays/Tooltip.js +54 -0
- package/dist/overlays/Tooltip.js.map +1 -0
- package/dist/overlays/index.d.ts +9 -0
- package/dist/overlays/useModalAutoFocus.js +84 -0
- package/dist/overlays/useModalAutoFocus.js.map +1 -0
- package/dist/overlays/useScrollFade.js +43 -0
- package/dist/overlays/useScrollFade.js.map +1 -0
- package/dist/showcase/CallToAction.d.ts +11 -0
- package/dist/showcase/CallToAction.js +54 -0
- package/dist/showcase/CallToAction.js.map +1 -0
- package/dist/showcase/Cards.d.ts +34 -0
- package/dist/showcase/Cards.js +122 -0
- package/dist/showcase/Cards.js.map +1 -0
- package/dist/showcase/Devices.d.ts +72 -0
- package/dist/showcase/Devices.js +249 -0
- package/dist/showcase/Devices.js.map +1 -0
- package/dist/showcase/FeatureRow.d.ts +30 -0
- package/dist/showcase/FeatureRow.js +91 -0
- package/dist/showcase/FeatureRow.js.map +1 -0
- package/dist/showcase/Hero.d.ts +15 -0
- package/dist/showcase/Hero.js +73 -0
- package/dist/showcase/Hero.js.map +1 -0
- package/dist/showcase/PhotoSearchConcept.d.ts +14 -0
- package/dist/showcase/PhotoSearchConcept.js +43 -0
- package/dist/showcase/PhotoSearchConcept.js.map +1 -0
- package/dist/showcase/Platforms.d.ts +15 -0
- package/dist/showcase/Platforms.js +48 -0
- package/dist/showcase/Platforms.js.map +1 -0
- package/dist/showcase/ProductBand.d.ts +38 -0
- package/dist/showcase/ProductBand.js +120 -0
- package/dist/showcase/ProductBand.js.map +1 -0
- package/dist/showcase/Roadmap.d.ts +21 -0
- package/dist/showcase/Roadmap.js +111 -0
- package/dist/showcase/Roadmap.js.map +1 -0
- package/dist/showcase/RouteDiagram.d.ts +14 -0
- package/dist/showcase/RouteDiagram.js +57 -0
- package/dist/showcase/RouteDiagram.js.map +1 -0
- package/dist/showcase/ServerUnit.d.ts +50 -0
- package/dist/showcase/ServerUnit.js +175 -0
- package/dist/showcase/ServerUnit.js.map +1 -0
- package/dist/showcase/Stage.d.ts +46 -0
- package/dist/showcase/Stage.js +106 -0
- package/dist/showcase/Stage.js.map +1 -0
- package/dist/showcase/Status.d.ts +30 -0
- package/dist/showcase/Status.js +84 -0
- package/dist/showcase/Status.js.map +1 -0
- package/dist/showcase/StepFlow.d.ts +13 -0
- package/dist/showcase/StepFlow.js +47 -0
- package/dist/showcase/StepFlow.js.map +1 -0
- package/dist/showcase/index.d.ts +15 -0
- package/dist/testing.d.ts +5 -0
- package/dist/testing.js +43 -0
- package/dist/testing.js.map +1 -0
- package/dist/typography/Link.d.ts +21 -0
- package/dist/typography/Link.js +60 -0
- package/dist/typography/Link.js.map +1 -0
- package/dist/typography/Typography.d.ts +53 -0
- package/dist/typography/Typography.js +67 -0
- package/dist/typography/Typography.js.map +1 -0
- package/dist/typography/index.d.ts +4 -0
- package/dist/typography/index.js +4 -0
- package/package.json +80 -3
- package/src/actions/Button.tsx +68 -0
- package/src/actions/ButtonLink.tsx +75 -0
- package/src/actions/IconButton.tsx +55 -0
- package/src/actions/ThemeSwitch.tsx +46 -0
- package/src/actions/index.ts +4 -0
- package/src/collections/CollectionSectionHeader.tsx +13 -0
- package/src/collections/CollectionState.tsx +76 -0
- package/src/collections/CollectionTokens.ts +12 -0
- package/src/collections/CollectionViewport.ts +40 -0
- package/src/collections/DataRow.tsx +79 -0
- package/src/collections/ResultList.tsx +164 -0
- package/src/collections/ScrollRow.tsx +90 -0
- package/src/collections/VirtualGrid.tsx +92 -0
- package/src/collections/VirtualList.tsx +224 -0
- package/src/collections/index.ts +10 -0
- package/src/collections/useCollectionMotion.ts +42 -0
- package/src/collections/useScrollRow.ts +64 -0
- package/src/display/ActivityCard.tsx +76 -0
- package/src/display/Artwork.tsx +140 -0
- package/src/display/Avatar.tsx +7 -0
- package/src/display/Badge.tsx +33 -0
- package/src/display/BadgeList.tsx +25 -0
- package/src/display/BrandMark.tsx +72 -0
- package/src/display/ChangeList.tsx +41 -0
- package/src/display/CheckList.tsx +27 -0
- package/src/display/CodeBlock.tsx +12 -0
- package/src/display/CopyButton.tsx +77 -0
- package/src/display/DataTable.tsx +80 -0
- package/src/display/DetailHero.tsx +191 -0
- package/src/display/DetailList.tsx +74 -0
- package/src/display/DeviceCard.tsx +49 -0
- package/src/display/Identity.tsx +56 -0
- package/src/display/ImageCard.tsx +102 -0
- package/src/display/ImagePicker.tsx +149 -0
- package/src/display/InfoBox.tsx +48 -0
- package/src/display/InsetPanel.tsx +37 -0
- package/src/display/ItemAction.tsx +53 -0
- package/src/display/Kbd.tsx +6 -0
- package/src/display/KindIcon.tsx +15 -0
- package/src/display/NoticeCard.tsx +77 -0
- package/src/display/PairingList.tsx +55 -0
- package/src/display/PathList.tsx +16 -0
- package/src/display/PeoplePreview.tsx +66 -0
- package/src/display/PropertySheet.tsx +180 -0
- package/src/display/QrCode.tsx +47 -0
- package/src/display/RadioChoice.tsx +34 -0
- package/src/display/RatingLink.tsx +76 -0
- package/src/display/ResourceCard.tsx +201 -0
- package/src/display/RowList.tsx +110 -0
- package/src/display/StackedMeter.tsx +72 -0
- package/src/display/StatTile.tsx +39 -0
- package/src/display/StepList.tsx +10 -0
- package/src/display/TextPreview.tsx +66 -0
- package/src/display/TimeSeriesChart.tsx +191 -0
- package/src/display/ToneTile.ts +10 -0
- package/src/display/index.ts +37 -0
- package/src/feedback/Alert.tsx +35 -0
- package/src/feedback/AsyncState.tsx +56 -0
- package/src/feedback/ErrorNotification.ts +24 -0
- package/src/feedback/Notifications.tsx +5 -0
- package/src/feedback/ProgressStatusRow.tsx +104 -0
- package/src/feedback/SkeletonLoader.tsx +88 -0
- package/src/feedback/StatusIndicator.tsx +28 -0
- package/src/feedback/StatusPopoverContent.tsx +54 -0
- package/src/feedback/StatusRow.tsx +70 -0
- package/src/feedback/index.ts +15 -0
- package/src/forms/Checkbox.tsx +61 -0
- package/src/forms/Field.tsx +17 -0
- package/src/forms/FormControlStyles.ts +9 -0
- package/src/forms/FormSection.tsx +175 -0
- package/src/forms/InlineFields.tsx +22 -0
- package/src/forms/Input.tsx +22 -0
- package/src/forms/OptionSelect.tsx +49 -0
- package/src/forms/RadioGroup.tsx +48 -0
- package/src/forms/Select.tsx +46 -0
- package/src/forms/Switch.tsx +10 -0
- package/src/forms/TagInput.tsx +76 -0
- package/src/forms/Textarea.tsx +14 -0
- package/src/forms/index.ts +11 -0
- package/src/foundations/DesignSystemProvider.tsx +79 -0
- package/src/foundations/KeyboardFocus.ts +6 -0
- package/src/foundations/KeyboardShortcut.ts +12 -0
- package/src/foundations/Theme.ts +71 -0
- package/src/foundations/index.ts +10 -0
- package/src/foundations/theme.css +425 -0
- package/src/icons/BrandIcons.tsx +8 -0
- package/src/icons/index.ts +4 -0
- package/src/icons.ts +1 -0
- package/src/index.ts +13 -0
- package/src/layout/AppShell.tsx +63 -0
- package/src/layout/AuthLayout.tsx +40 -0
- package/src/layout/ContentContainer.tsx +16 -0
- package/src/layout/Flow.tsx +56 -0
- package/src/layout/PageLayout.tsx +35 -0
- package/src/layout/PageSection.tsx +103 -0
- package/src/layout/ScrollArea.tsx +7 -0
- package/src/layout/Section.tsx +36 -0
- package/src/layout/Site.tsx +205 -0
- package/src/layout/TitleBar.tsx +97 -0
- package/src/layout/WorkspaceActionsHeader.tsx +17 -0
- package/src/layout/index.ts +18 -0
- package/src/layout/sidebar/SidebarNavigationItem.tsx +45 -0
- package/src/layout/sidebar/SidebarPane.tsx +37 -0
- package/src/layout/toolbar/CommandPaletteTrigger.tsx +53 -0
- package/src/layout/toolbar/ToolbarStatusGroup.tsx +9 -0
- package/src/layout/toolbar/ToolbarStatusItem.tsx +18 -0
- package/src/navigation/ArtworkTabs.tsx +107 -0
- package/src/navigation/Breadcrumbs.tsx +31 -0
- package/src/navigation/CollectionBrowseSelector.tsx +90 -0
- package/src/navigation/CollectionViewToggle.tsx +52 -0
- package/src/navigation/DrilldownBrowseSelector.tsx +229 -0
- package/src/navigation/FolderSelector.tsx +172 -0
- package/src/navigation/TabKeys.ts +21 -0
- package/src/navigation/ViewTabs.tsx +85 -0
- package/src/navigation/index.ts +15 -0
- package/src/overlays/ActionModal.tsx +81 -0
- package/src/overlays/CommandPalette.tsx +199 -0
- package/src/overlays/Drawer.tsx +107 -0
- package/src/overlays/DropdownMenu.tsx +122 -0
- package/src/overlays/ImageViewer.tsx +96 -0
- package/src/overlays/Modal.tsx +234 -0
- package/src/overlays/Popover.tsx +40 -0
- package/src/overlays/Tooltip.tsx +56 -0
- package/src/overlays/index.ts +8 -0
- package/src/overlays/useModalAutoFocus.ts +119 -0
- package/src/overlays/useScrollFade.ts +49 -0
- package/src/showcase/CallToAction.tsx +46 -0
- package/src/showcase/Cards.tsx +133 -0
- package/src/showcase/Devices.tsx +259 -0
- package/src/showcase/FeatureRow.tsx +107 -0
- package/src/showcase/Hero.tsx +70 -0
- package/src/showcase/PhotoSearchConcept.tsx +50 -0
- package/src/showcase/Platforms.tsx +49 -0
- package/src/showcase/ProductBand.tsx +148 -0
- package/src/showcase/Roadmap.tsx +115 -0
- package/src/showcase/RouteDiagram.tsx +56 -0
- package/src/showcase/ServerUnit.tsx +191 -0
- package/src/showcase/Stage.tsx +160 -0
- package/src/showcase/Status.tsx +107 -0
- package/src/showcase/StepFlow.tsx +48 -0
- package/src/showcase/devices.css +441 -0
- package/src/showcase/index.ts +34 -0
- package/src/showcase/server-unit.css +258 -0
- package/src/showcase/stage.css +175 -0
- package/src/styles.css +5 -0
- package/src/testing.ts +34 -0
- package/src/typography/Link.tsx +105 -0
- package/src/typography/Typography.tsx +113 -0
- package/src/typography/index.ts +3 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Flex, Grid, SimpleGrid, Stack } from "@ninna-ui/layout";
|
|
3
|
+
// src/layout/Flow.tsx
|
|
4
|
+
const spacing = {
|
|
5
|
+
none: "0",
|
|
6
|
+
tight: "1",
|
|
7
|
+
related: "2",
|
|
8
|
+
group: "3",
|
|
9
|
+
section: "4",
|
|
10
|
+
page: "6"
|
|
11
|
+
};
|
|
12
|
+
function Stack$1({ space = "group", ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Stack, {
|
|
14
|
+
...props,
|
|
15
|
+
gap: spacing[space]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function Inline({ space = "related", wrap, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Flex, {
|
|
20
|
+
...props,
|
|
21
|
+
gap: spacing[space],
|
|
22
|
+
wrap: wrap ? "wrap" : "nowrap"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function Grid$1({ variant = "content", ...props }) {
|
|
26
|
+
if (variant === "posters") return /* @__PURE__ */ jsx(SimpleGrid, {
|
|
27
|
+
...props,
|
|
28
|
+
gap: "4",
|
|
29
|
+
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(6.5rem, 100%), 1fr))" }
|
|
30
|
+
});
|
|
31
|
+
if (variant === "details") return /* @__PURE__ */ jsx(Grid, {
|
|
32
|
+
...props,
|
|
33
|
+
gap: "6",
|
|
34
|
+
columns: {
|
|
35
|
+
base: 1,
|
|
36
|
+
md: 2
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
if (variant === "pairs") return /* @__PURE__ */ jsx(Grid, {
|
|
40
|
+
...props,
|
|
41
|
+
gap: "3",
|
|
42
|
+
columns: {
|
|
43
|
+
base: 1,
|
|
44
|
+
lg: 2
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
if (variant === "overview") return /* @__PURE__ */ jsx(Grid, {
|
|
48
|
+
...props,
|
|
49
|
+
gap: "3",
|
|
50
|
+
columns: {
|
|
51
|
+
base: 1,
|
|
52
|
+
md: 2,
|
|
53
|
+
lg: 3,
|
|
54
|
+
"2xl": 4
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return /* @__PURE__ */ jsx(SimpleGrid, {
|
|
58
|
+
...props,
|
|
59
|
+
gap: "3",
|
|
60
|
+
minChildWidth: variant === "metrics" ? "min(11rem, 100%)" : "min(16rem, 100%)"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export { Grid$1 as Grid, Inline, Stack$1 as Stack };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=Flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flow.js","names":["Stack","NinnaStack","NinnaFlex","Grid","NinnaGrid","NinnaResponsiveGrid"],"sources":["../../src/layout/Flow.tsx"],"sourcesContent":["import {\n Flex as NinnaFlex,\n type FlexProps,\n Grid as NinnaResponsiveGrid,\n SimpleGrid as NinnaGrid,\n Stack as NinnaStack,\n type StackProps as NinnaStackProps,\n} from '@ninna-ui/layout';\nimport type { ComponentProps, ElementType } from 'react';\n\nconst spacing = { none: '0', tight: '1', related: '2', group: '3', section: '4', page: '6' } as const;\n\nexport type FlowSpace = keyof typeof spacing;\n\nexport type StackProps<C extends ElementType = 'div'> = Omit<NinnaStackProps<C>, 'gap' | 'direction'> & {\n space?: FlowSpace;\n};\n\nexport function Stack<C extends ElementType = 'div'>({ space = 'group', ...props }: StackProps<C>) {\n return <NinnaStack {...(props as NinnaStackProps<C>)} gap={spacing[space]} />;\n}\n\ntype InlineProps<C extends ElementType> = Omit<FlexProps<C>, 'gap' | 'direction' | 'wrap'> & {\n space?: FlowSpace;\n wrap?: boolean;\n};\n\nexport function Inline<C extends ElementType = 'div'>({ space = 'related', wrap, ...props }: InlineProps<C>) {\n return <NinnaFlex {...(props as FlexProps<C>)} gap={spacing[space]} wrap={wrap ? 'wrap' : 'nowrap'} />;\n}\n\ntype GridProps = Omit<ComponentProps<typeof NinnaGrid>, 'gap' | 'minChildWidth' | 'columns'> & {\n variant?: 'metrics' | 'content' | 'overview' | 'details' | 'pairs' | 'posters';\n};\n\nexport function Grid({ variant = 'content', ...props }: GridProps) {\n if (variant === 'posters')\n return (\n <NinnaGrid\n {...props}\n gap=\"4\"\n style={{ gridTemplateColumns: 'repeat(auto-fill, minmax(min(6.5rem, 100%), 1fr))' }}\n />\n );\n\n if (variant === 'details') return <NinnaResponsiveGrid {...props} gap=\"6\" columns={{ base: 1, md: 2 }} />;\n\n if (variant === 'pairs') return <NinnaResponsiveGrid {...props} gap=\"3\" columns={{ base: 1, lg: 2 }} />;\n\n if (variant === 'overview')\n return <NinnaResponsiveGrid {...props} gap=\"3\" columns={{ base: 1, md: 2, lg: 3, '2xl': 4 }} />;\n\n return (\n <NinnaGrid {...props} gap=\"3\" minChildWidth={variant === 'metrics' ? 'min(11rem, 100%)' : 'min(16rem, 100%)'} />\n );\n}\n"],"mappings":";;;AAUA,MAAM,UAAU;CAAE,MAAM;CAAK,OAAO;CAAK,SAAS;CAAK,OAAO;CAAK,SAAS;CAAK,MAAM;AAAI;AAQ3F,SAAgBA,QAAqC,EAAE,QAAQ,SAAS,GAAG,SAAwB;CAC/F,OAAO,oBAACC,OAAD;EAAY,GAAK;EAA8B,KAAK,QAAQ;CAAS,CAAA;AAChF;AAOA,SAAgB,OAAsC,EAAE,QAAQ,WAAW,MAAM,GAAG,SAAyB;CACzG,OAAO,oBAACC,MAAD;EAAW,GAAK;EAAwB,KAAK,QAAQ;EAAQ,MAAM,OAAO,SAAS;CAAW,CAAA;AACzG;AAMA,SAAgBC,OAAK,EAAE,UAAU,WAAW,GAAG,SAAoB;CAC/D,IAAI,YAAY,WACZ,OACI,oBAACC,YAAD;EACI,GAAI;EACJ,KAAI;EACJ,OAAO,EAAE,qBAAqB,oDAAoD;CACrF,CAAA;CAGT,IAAI,YAAY,WAAW,OAAO,oBAACC,MAAD;EAAqB,GAAI;EAAO,KAAI;EAAI,SAAS;GAAE,MAAM;GAAG,IAAI;EAAE;CAAI,CAAA;CAExG,IAAI,YAAY,SAAS,OAAO,oBAACA,MAAD;EAAqB,GAAI;EAAO,KAAI;EAAI,SAAS;GAAE,MAAM;GAAG,IAAI;EAAE;CAAI,CAAA;CAEtG,IAAI,YAAY,YACZ,OAAO,oBAACA,MAAD;EAAqB,GAAI;EAAO,KAAI;EAAI,SAAS;GAAE,MAAM;GAAG,IAAI;GAAG,IAAI;GAAG,OAAO;EAAE;CAAI,CAAA;CAElG,OACI,oBAACD,YAAD;EAAW,GAAI;EAAO,KAAI;EAAI,eAAe,YAAY,YAAY,qBAAqB;CAAqB,CAAA;AAEvH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface PageLayoutProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
variant?: 'default' | 'detail';
|
|
9
|
+
}
|
|
10
|
+
export declare function PageLayout({ children, header, title, description, label, variant }: PageLayoutProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=PageLayout.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Heading, Text } from "../typography/Typography.js";
|
|
2
|
+
import { ContentContainer } from "./ContentContainer.js";
|
|
3
|
+
import { Stack } from "./Flow.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/layout/PageLayout.tsx
|
|
6
|
+
function PageLayout({ children, header, title, description, label, variant = "default" }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("main", {
|
|
8
|
+
"aria-label": label,
|
|
9
|
+
className: "flex min-w-0 flex-1 flex-col [--lar-page-gutter:--spacing(4)]",
|
|
10
|
+
children: [header, /* @__PURE__ */ jsx(ContentContainer, {
|
|
11
|
+
className: "pt-(--lar-page-gutter) pb-10 md:pb-12",
|
|
12
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
13
|
+
space: variant === "detail" ? "page" : "section",
|
|
14
|
+
children: [title ? /* @__PURE__ */ jsxs(Stack, {
|
|
15
|
+
space: "related",
|
|
16
|
+
children: [/* @__PURE__ */ jsx(Heading, {
|
|
17
|
+
as: "h1",
|
|
18
|
+
variant: "page",
|
|
19
|
+
children: title
|
|
20
|
+
}), description ? /* @__PURE__ */ jsx(Text, {
|
|
21
|
+
tone: "muted",
|
|
22
|
+
children: description
|
|
23
|
+
}) : null]
|
|
24
|
+
}) : null, children]
|
|
25
|
+
})
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { PageLayout };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=PageLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../src/layout/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Heading, Text } from '../typography/Typography';\nimport { ContentContainer } from './ContentContainer';\nimport { Stack } from './Flow';\n\ninterface PageLayoutProps {\n label?: string;\n children?: ReactNode;\n header?: ReactNode;\n title?: string;\n description?: ReactNode;\n variant?: 'default' | 'detail';\n}\n\nexport function PageLayout({ children, header, title, description, label, variant = 'default' }: PageLayoutProps) {\n return (\n <main aria-label={label} className=\"flex min-w-0 flex-1 flex-col [--lar-page-gutter:--spacing(4)]\">\n {header}\n <ContentContainer className=\"pt-(--lar-page-gutter) pb-10 md:pb-12\">\n <Stack space={variant === 'detail' ? 'page' : 'section'}>\n {title ? (\n <Stack space=\"related\">\n <Heading as=\"h1\" variant=\"page\">\n {title}\n </Heading>\n {description ? <Text tone=\"muted\">{description}</Text> : null}\n </Stack>\n ) : null}\n {children}\n </Stack>\n </ContentContainer>\n </main>\n );\n}\n"],"mappings":";;;;;AAeA,SAAgB,WAAW,EAAE,UAAU,QAAQ,OAAO,aAAa,OAAO,UAAU,aAA8B;CAC9G,OACI,qBAAC,QAAD;EAAM,cAAY;EAAO,WAAU;EAAnC,UAAA,CACK,QACD,oBAAC,kBAAD;GAAkB,WAAU;GACxB,UAAA,qBAAC,OAAD;IAAO,OAAO,YAAY,WAAW,SAAS;IAA9C,UAAA,CACK,QACG,qBAAC,OAAD;KAAO,OAAM;KAAb,UAAA,CACI,oBAAC,SAAD;MAAS,IAAG;MAAK,SAAQ;MACpB,UAAA;KACI,CAAA,GACR,cAAc,oBAAC,MAAD;MAAM,MAAK;MAAS,UAAA;KAAkB,CAAA,IAAI,IACtD;IACP,CAAA,IAAA,MACH,QACE;;EACO,CAAA,CAChB;;AAEd"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
declare const widths: {
|
|
3
|
+
readonly narrow: 'max-w-[880px]';
|
|
4
|
+
readonly default: 'max-w-[1200px]';
|
|
5
|
+
};
|
|
6
|
+
declare const spacing: {
|
|
7
|
+
readonly hero: 'pt-16 pb-20 sm:pt-24 sm:pb-28';
|
|
8
|
+
readonly default: 'py-12 sm:py-20';
|
|
9
|
+
readonly tight: 'py-12 sm:py-20';
|
|
10
|
+
/** The last band before the footer, which follows a full section. */
|
|
11
|
+
readonly closing: 'pt-0 pb-14 sm:pb-20';
|
|
12
|
+
};
|
|
13
|
+
interface PageSectionProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
id?: string;
|
|
16
|
+
width?: keyof typeof widths;
|
|
17
|
+
space?: keyof typeof spacing;
|
|
18
|
+
/** A raised band separates a section from the ones around it. */
|
|
19
|
+
tone?: 'plain' | 'raised';
|
|
20
|
+
/** Names the section for assistive technology when it has no SectionHeading. */
|
|
21
|
+
label?: string;
|
|
22
|
+
background?: ReactNode;
|
|
23
|
+
/** The section's SectionHeading, set above the content with room to breathe. */
|
|
24
|
+
heading?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/** One band of a marketing page, centred in the page column. */
|
|
27
|
+
export declare function PageSection({ children, id, width, space, tone, label, background, heading }: PageSectionProps): import("react").JSX.Element;
|
|
28
|
+
interface SectionHeadingProps {
|
|
29
|
+
eyebrow?: string;
|
|
30
|
+
title: ReactNode;
|
|
31
|
+
lead?: ReactNode;
|
|
32
|
+
align?: 'center' | 'start';
|
|
33
|
+
level?: 'h1' | 'h2';
|
|
34
|
+
size?: 'display' | 'headline';
|
|
35
|
+
}
|
|
36
|
+
/** The eyebrow, title and lead that open a section. */
|
|
37
|
+
export declare function SectionHeading({ eyebrow, title, lead, align, level, size }: SectionHeadingProps): import("react").JSX.Element;
|
|
38
|
+
/** A short label above a title, in the brand navy. */
|
|
39
|
+
export declare function Eyebrow({ children }: {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=PageSection.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Heading, Text } from "../typography/Typography.js";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/layout/PageSection.tsx
|
|
5
|
+
const widths = {
|
|
6
|
+
narrow: "max-w-[880px]",
|
|
7
|
+
default: "max-w-[1200px]"
|
|
8
|
+
};
|
|
9
|
+
const spacing = {
|
|
10
|
+
hero: "pt-16 pb-20 sm:pt-24 sm:pb-28",
|
|
11
|
+
default: "py-12 sm:py-20",
|
|
12
|
+
tight: "py-12 sm:py-20",
|
|
13
|
+
/** The last band before the footer, which follows a full section. */
|
|
14
|
+
closing: "pt-0 pb-14 sm:pb-20"
|
|
15
|
+
};
|
|
16
|
+
/** One band of a marketing page, centred in the page column. */
|
|
17
|
+
function PageSection({ children, id, width = "default", space = "default", tone = "plain", label, background, heading }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
19
|
+
id,
|
|
20
|
+
"aria-label": label,
|
|
21
|
+
className: `relative isolate scroll-mt-16 ${tone === "raised" ? "border-base-300/80 bg-base-100/70 dark:bg-base-100/50 border-y" : ""}`,
|
|
22
|
+
children: [background, /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: `mx-auto w-full px-5 sm:px-8 ${widths[width]} ${spacing[space]}`,
|
|
24
|
+
children: [heading ? /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "lar-reveal mb-8 sm:mb-16",
|
|
26
|
+
children: heading
|
|
27
|
+
}) : null, children]
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** The eyebrow, title and lead that open a section. */
|
|
32
|
+
function SectionHeading({ eyebrow, title, lead, align = "center", level = "h2", size = "headline" }) {
|
|
33
|
+
const id = useId();
|
|
34
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
35
|
+
"aria-labelledby": id,
|
|
36
|
+
className: `flex flex-col gap-4 ${align === "center" ? "mx-auto max-w-[760px] items-center text-center" : "max-w-[640px]"}`,
|
|
37
|
+
children: [
|
|
38
|
+
eyebrow ? /* @__PURE__ */ jsx(Eyebrow, { children: eyebrow }) : null,
|
|
39
|
+
/* @__PURE__ */ jsx(Heading, {
|
|
40
|
+
id,
|
|
41
|
+
as: level,
|
|
42
|
+
variant: size,
|
|
43
|
+
children: title
|
|
44
|
+
}),
|
|
45
|
+
lead ? /* @__PURE__ */ jsx(Text, {
|
|
46
|
+
variant: "lead",
|
|
47
|
+
tone: "muted",
|
|
48
|
+
className: align === "center" ? "max-w-[620px]" : "",
|
|
49
|
+
children: lead
|
|
50
|
+
}) : null
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** A short label above a title, in the brand navy. */
|
|
55
|
+
function Eyebrow({ children }) {
|
|
56
|
+
return /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: "text-primary text-[13px] font-semibold tracking-[-0.005em] dark:text-[color-mix(in_srgb,var(--color-primary)_50%,white)]",
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export { Eyebrow, PageSection, SectionHeading };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=PageSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSection.js","names":[],"sources":["../../src/layout/PageSection.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { Heading, Text } from '../typography/Typography';\n\nconst widths = {\n narrow: 'max-w-[880px]',\n default: 'max-w-[1200px]',\n} as const;\n\nconst spacing = {\n hero: 'pt-16 pb-20 sm:pt-24 sm:pb-28',\n default: 'py-12 sm:py-20',\n tight: 'py-12 sm:py-20',\n /** The last band before the footer, which follows a full section. */\n closing: 'pt-0 pb-14 sm:pb-20',\n} as const;\n\ninterface PageSectionProps {\n children: ReactNode;\n id?: string;\n width?: keyof typeof widths;\n space?: keyof typeof spacing;\n /** A raised band separates a section from the ones around it. */\n tone?: 'plain' | 'raised';\n /** Names the section for assistive technology when it has no SectionHeading. */\n label?: string;\n background?: ReactNode;\n /** The section's SectionHeading, set above the content with room to breathe. */\n heading?: ReactNode;\n}\n\n/** One band of a marketing page, centred in the page column. */\nexport function PageSection({\n children,\n id,\n width = 'default',\n space = 'default',\n tone = 'plain',\n label,\n background,\n heading,\n}: PageSectionProps) {\n return (\n <section\n id={id}\n aria-label={label}\n className={`relative isolate scroll-mt-16 ${tone === 'raised' ? 'border-base-300/80 bg-base-100/70 dark:bg-base-100/50 border-y' : ''}`}\n >\n {background}\n <div className={`mx-auto w-full px-5 sm:px-8 ${widths[width]} ${spacing[space]}`}>\n {heading ? <div className=\"lar-reveal mb-8 sm:mb-16\">{heading}</div> : null}\n {children}\n </div>\n </section>\n );\n}\n\ninterface SectionHeadingProps {\n eyebrow?: string;\n title: ReactNode;\n lead?: ReactNode;\n align?: 'center' | 'start';\n level?: 'h1' | 'h2';\n size?: 'display' | 'headline';\n}\n\n/** The eyebrow, title and lead that open a section. */\nexport function SectionHeading({\n eyebrow,\n title,\n lead,\n align = 'center',\n level = 'h2',\n size = 'headline',\n}: SectionHeadingProps) {\n const id = useId();\n\n return (\n <header\n aria-labelledby={id}\n className={`flex flex-col gap-4 ${align === 'center' ? 'mx-auto max-w-[760px] items-center text-center' : 'max-w-[640px]'}`}\n >\n {eyebrow ? <Eyebrow>{eyebrow}</Eyebrow> : null}\n <Heading id={id} as={level} variant={size}>\n {title}\n </Heading>\n {lead ? (\n <Text variant=\"lead\" tone=\"muted\" className={align === 'center' ? 'max-w-[620px]' : ''}>\n {lead}\n </Text>\n ) : null}\n </header>\n );\n}\n\n/** A short label above a title, in the brand navy. */\nexport function Eyebrow({ children }: { children: ReactNode }) {\n return (\n <span className=\"text-primary text-[13px] font-semibold tracking-[-0.005em] dark:text-[color-mix(in_srgb,var(--color-primary)_50%,white)]\">\n {children}\n </span>\n );\n}\n"],"mappings":";;;;AAIA,MAAM,SAAS;CACX,QAAQ;CACR,SAAS;AACb;AAEA,MAAM,UAAU;CACZ,MAAM;CACN,SAAS;CACT,OAAO;;CAEP,SAAS;AACb;;AAiBA,SAAgB,YAAY,EACxB,UACA,IACA,QAAQ,WACR,QAAQ,WACR,OAAO,SACP,OACA,YACA,WACiB;CACjB,OACI,qBAAC,WAAD;EACQ;EACJ,cAAY;EACZ,WAAW,iCAAiC,SAAS,WAAW,mEAAmE;EAHvI,UAAA,CAKK,YACD,qBAAC,OAAD;GAAK,WAAW,+BAA+B,OAAO,OAAO,GAAG,QAAQ;GAAxE,UAAA,CACK,UAAU,oBAAC,OAAD;IAAK,WAAU;IAA4B,UAAA;GAAa,CAAA,IAAI,MACtE,QACA;EACA,CAAA,CAAA;;AAEjB;;AAYA,SAAgB,eAAe,EAC3B,SACA,OACA,MACA,QAAQ,UACR,QAAQ,MACR,OAAO,cACa;CACpB,MAAM,KAAK,MAAM;CAEjB,OACI,qBAAC,UAAD;EACI,mBAAiB;EACjB,WAAW,uBAAuB,UAAU,WAAW,mDAAmD;EAF9G,UAAA;GAIK,UAAU,oBAAC,SAAD,EAAA,UAAU,QAAiB,CAAA,IAAI;GAC1C,oBAAC,SAAD;IAAa;IAAI,IAAI;IAAO,SAAS;IAChC,UAAA;GACI,CAAA;GACR,OACG,oBAAC,MAAD;IAAM,SAAQ;IAAO,MAAK;IAAQ,WAAW,UAAU,WAAW,kBAAkB;IAC/E,UAAA;GACC,CAAA,IACN;EACA;;AAEhB;;AAGA,SAAgB,QAAQ,EAAE,YAAqC;CAC3D,OACI,oBAAC,QAAD;EAAM,WAAU;EACX;CACC,CAAA;AAEd"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
export type ScrollAreaProps = Omit<ComponentPropsWithoutRef<'div'>, 'className' | 'style'>;
|
|
3
|
+
export declare function ScrollArea(props: ScrollAreaProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ScrollArea.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
// src/layout/ScrollArea.tsx
|
|
3
|
+
function ScrollArea(props) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
...props,
|
|
6
|
+
className: "max-h-64 min-h-0 overflow-y-auto overscroll-contain pr-1"
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export { ScrollArea };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=ScrollArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollArea.js","names":[],"sources":["../../src/layout/ScrollArea.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\nexport type ScrollAreaProps = Omit<ComponentPropsWithoutRef<'div'>, 'className' | 'style'>;\n\nexport function ScrollArea(props: ScrollAreaProps) {\n return <div {...props} className=\"max-h-64 min-h-0 overflow-y-auto overscroll-contain pr-1\" />;\n}\n"],"mappings":";;AAIA,SAAgB,WAAW,OAAwB;CAC/C,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAO,WAAU;CAA4D,CAAA;AACjG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface SectionProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
count?: ReactNode;
|
|
6
|
+
actions?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
level?: 'h2' | 'h3' | 'h4';
|
|
9
|
+
}
|
|
10
|
+
export declare function Section({ title, description, count, actions, children, level }: SectionProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Badge } from "../display/Badge.js";
|
|
2
|
+
import { Heading, Text } from "../typography/Typography.js";
|
|
3
|
+
import { Inline, Stack } from "./Flow.js";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/layout/Section.tsx
|
|
7
|
+
function Section({ title, description, count, actions, children, level = "h2" }) {
|
|
8
|
+
const id = useId();
|
|
9
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
10
|
+
as: "section",
|
|
11
|
+
space: "section",
|
|
12
|
+
"aria-labelledby": id,
|
|
13
|
+
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
14
|
+
space: "tight",
|
|
15
|
+
children: [/* @__PURE__ */ jsxs(Inline, {
|
|
16
|
+
justify: "between",
|
|
17
|
+
align: "center",
|
|
18
|
+
children: [/* @__PURE__ */ jsxs(Inline, {
|
|
19
|
+
align: "center",
|
|
20
|
+
children: [/* @__PURE__ */ jsx(Heading, {
|
|
21
|
+
id,
|
|
22
|
+
as: level,
|
|
23
|
+
variant: level === "h2" ? "section" : "subsection",
|
|
24
|
+
children: title
|
|
25
|
+
}), count != null ? /* @__PURE__ */ jsx(Badge, { children: count }) : null]
|
|
26
|
+
}), actions]
|
|
27
|
+
}), description ? /* @__PURE__ */ jsx(Text, {
|
|
28
|
+
tone: "muted",
|
|
29
|
+
children: description
|
|
30
|
+
}) : null]
|
|
31
|
+
}), children]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export { Section };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.js","names":[],"sources":["../../src/layout/Section.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { Badge } from '../display/Badge';\nimport { Heading, Text } from '../typography/Typography';\nimport { Inline, Stack } from './Flow';\n\ninterface SectionProps {\n title: string;\n description?: ReactNode;\n count?: ReactNode;\n actions?: ReactNode;\n children: ReactNode;\n level?: 'h2' | 'h3' | 'h4';\n}\n\nexport function Section({ title, description, count, actions, children, level = 'h2' }: SectionProps) {\n const id = useId();\n\n return (\n <Stack as=\"section\" space=\"section\" aria-labelledby={id}>\n <Stack space=\"tight\">\n <Inline justify=\"between\" align=\"center\">\n <Inline align=\"center\">\n <Heading id={id} as={level} variant={level === 'h2' ? 'section' : 'subsection'}>\n {title}\n </Heading>\n {count != null ? <Badge>{count}</Badge> : null}\n </Inline>\n {actions}\n </Inline>\n {description ? <Text tone=\"muted\">{description}</Text> : null}\n </Stack>\n {children}\n </Stack>\n );\n}\n"],"mappings":";;;;;;AAeA,SAAgB,QAAQ,EAAE,OAAO,aAAa,OAAO,SAAS,UAAU,QAAQ,QAAsB;CAClG,MAAM,KAAK,MAAM;CAEjB,OACI,qBAAC,OAAD;EAAO,IAAG;EAAU,OAAM;EAAU,mBAAiB;EAArD,UAAA,CACI,qBAAC,OAAD;GAAO,OAAM;GAAb,UAAA,CACI,qBAAC,QAAD;IAAQ,SAAQ;IAAU,OAAM;IAAhC,UAAA,CACI,qBAAC,QAAD;KAAQ,OAAM;KAAd,UAAA,CACI,oBAAC,SAAD;MAAa;MAAI,IAAI;MAAO,SAAS,UAAU,OAAO,YAAY;MAC7D,UAAA;KACI,CAAA,GACR,SAAS,OAAO,oBAAC,OAAD,EAAA,UAAQ,MAAa,CAAA,IAAI,IACtC;IACP,CAAA,GAAA,OACG;GACP,CAAA,GAAA,cAAc,oBAAC,MAAD;IAAM,MAAK;IAAS,UAAA;GAAkB,CAAA,IAAI,IACtD;EACN,CAAA,GAAA,QACE;;AAEf"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface SiteLink {
|
|
3
|
+
label: string;
|
|
4
|
+
href: string;
|
|
5
|
+
current?: boolean;
|
|
6
|
+
external?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface SiteShellProps {
|
|
9
|
+
skipLabel: string;
|
|
10
|
+
header: ReactNode;
|
|
11
|
+
footer: ReactNode;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/** The website frame: a glass header that stays on top while the document scrolls under it, then the footer. */
|
|
15
|
+
export declare function SiteShell({ skipLabel, header, footer, children }: SiteShellProps): import("react").JSX.Element;
|
|
16
|
+
interface SiteHeaderProps {
|
|
17
|
+
brand: ReactNode;
|
|
18
|
+
links: readonly SiteLink[];
|
|
19
|
+
actions: ReactNode;
|
|
20
|
+
/** Secondary controls, such as the theme switch: in the bar on wide screens and in the menu on narrow ones. */
|
|
21
|
+
utilities?: ReactNode;
|
|
22
|
+
menuLabel: string;
|
|
23
|
+
closeMenuLabel: string;
|
|
24
|
+
navigationLabel: string;
|
|
25
|
+
onNavigate: (href: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function SiteHeader({ brand, links, actions, utilities, menuLabel, closeMenuLabel, navigationLabel, onNavigate }: SiteHeaderProps): import("react").JSX.Element;
|
|
28
|
+
interface SiteFooterProps {
|
|
29
|
+
brand: ReactNode;
|
|
30
|
+
tagline: string;
|
|
31
|
+
columns: readonly {
|
|
32
|
+
title: string;
|
|
33
|
+
links: readonly SiteLink[];
|
|
34
|
+
}[];
|
|
35
|
+
legal: string;
|
|
36
|
+
note: ReactNode;
|
|
37
|
+
onNavigate: (href: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare function SiteFooter({ brand, tagline, columns, legal, note, onNavigate }: SiteFooterProps): import("react").JSX.Element;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=Site.d.ts.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { tabbable } from "../foundations/KeyboardFocus.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { MenuIcon, XIcon } from "lucide-react";
|
|
5
|
+
// src/layout/Site.tsx
|
|
6
|
+
/** The website frame: a glass header that stays on top while the document scrolls under it, then the footer. */
|
|
7
|
+
function SiteShell({ skipLabel, header, footer, children }) {
|
|
8
|
+
const scrolled = useScrolled();
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: "flex min-h-dvh min-w-0 flex-col overflow-x-clip pr-[env(safe-area-inset-right)] pl-[env(safe-area-inset-left)]",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx("a", {
|
|
13
|
+
href: "#content",
|
|
14
|
+
className: "bg-base-100 sr-only z-[60] rounded-md px-3 py-2 text-sm font-medium focus:not-sr-only focus:fixed focus:top-3 focus:left-3",
|
|
15
|
+
children: skipLabel
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsx("div", {
|
|
18
|
+
"data-scrolled": scrolled || void 0,
|
|
19
|
+
className: "glass-bar data-scrolled:border-base-300 sticky top-0 z-50 shrink-0 border-b border-transparent pt-[env(safe-area-inset-top)] transition-[border-color] duration-300",
|
|
20
|
+
children: header
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("main", {
|
|
23
|
+
id: "content",
|
|
24
|
+
className: "flex-1",
|
|
25
|
+
children
|
|
26
|
+
}),
|
|
27
|
+
footer
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function SiteHeader({ brand, links, actions, utilities, menuLabel, closeMenuLabel, navigationLabel, onNavigate }) {
|
|
32
|
+
const [open, setOpen] = useState(false);
|
|
33
|
+
function follow(href) {
|
|
34
|
+
setOpen(false);
|
|
35
|
+
onNavigate(href);
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
38
|
+
className: "mx-auto flex h-14 w-full max-w-[1200px] items-center gap-6 px-5 sm:px-8",
|
|
39
|
+
children: [
|
|
40
|
+
brand,
|
|
41
|
+
/* @__PURE__ */ jsx("nav", {
|
|
42
|
+
"aria-label": navigationLabel,
|
|
43
|
+
className: "hidden items-center gap-1 md:flex",
|
|
44
|
+
children: links.map((link) => /* @__PURE__ */ jsx(NavLink, {
|
|
45
|
+
link,
|
|
46
|
+
onNavigate: follow
|
|
47
|
+
}, link.href))
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "ml-auto flex items-center gap-2 max-sm:[&>a]:hidden",
|
|
51
|
+
children: [utilities ? /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: "hidden md:contents",
|
|
53
|
+
children: utilities
|
|
54
|
+
}) : null, actions]
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx("button", {
|
|
57
|
+
...tabbable,
|
|
58
|
+
type: "button",
|
|
59
|
+
"aria-expanded": open,
|
|
60
|
+
"aria-controls": "site-menu",
|
|
61
|
+
"aria-label": open ? closeMenuLabel : menuLabel,
|
|
62
|
+
onClick: () => setOpen((value) => !value),
|
|
63
|
+
className: "text-base-800 hover:bg-base-200 -mr-2 inline-flex size-9 items-center justify-center rounded-md transition-colors md:hidden [&_svg]:size-5",
|
|
64
|
+
children: open ? /* @__PURE__ */ jsx(XIcon, {}) : /* @__PURE__ */ jsx(MenuIcon, {})
|
|
65
|
+
}),
|
|
66
|
+
open ? /* @__PURE__ */ jsxs("nav", {
|
|
67
|
+
id: "site-menu",
|
|
68
|
+
"aria-label": navigationLabel,
|
|
69
|
+
className: "glass-menu absolute inset-x-3 top-[calc(100%+0.5rem)] flex flex-col gap-1 rounded-2xl p-2 md:hidden",
|
|
70
|
+
children: [links.map((link) => /* @__PURE__ */ jsx(NavLink, {
|
|
71
|
+
link,
|
|
72
|
+
onNavigate: follow,
|
|
73
|
+
large: true
|
|
74
|
+
}, link.href)), utilities ? /* @__PURE__ */ jsx("div", {
|
|
75
|
+
className: "border-base-300 mt-1 border-t px-3 pt-3 pb-1",
|
|
76
|
+
children: utilities
|
|
77
|
+
}) : null]
|
|
78
|
+
}) : null
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function NavLink({ link, onNavigate, large }) {
|
|
83
|
+
return /* @__PURE__ */ jsx("a", {
|
|
84
|
+
...tabbable,
|
|
85
|
+
href: link.href,
|
|
86
|
+
"aria-current": link.current ? "page" : void 0,
|
|
87
|
+
...link.external ? {
|
|
88
|
+
target: "_blank",
|
|
89
|
+
rel: "noreferrer"
|
|
90
|
+
} : {},
|
|
91
|
+
onClick: (event) => {
|
|
92
|
+
if (link.external || event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0) return;
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
onNavigate(link.href);
|
|
95
|
+
},
|
|
96
|
+
className: `text-base-700 hover:text-base-content aria-[current=page]:text-base-content focus-visible:outline-primary rounded-md font-medium transition-colors focus-visible:outline-2 ${large ? "hover:bg-base-200 px-3 py-2.5 text-base" : "px-2.5 py-1.5 text-sm"}`,
|
|
97
|
+
children: link.label
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function SiteFooter({ brand, tagline, columns, legal, note, onNavigate }) {
|
|
101
|
+
return /* @__PURE__ */ jsxs("footer", {
|
|
102
|
+
className: "border-base-300 bg-base-50 border-t",
|
|
103
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
104
|
+
className: "mx-auto grid w-full max-w-[1200px] grid-cols-2 gap-x-6 gap-y-10 px-5 pt-14 pb-10 sm:px-8 md:grid-cols-[1.4fr_repeat(4,1fr)]",
|
|
105
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
106
|
+
className: "col-span-2 flex flex-col gap-3 md:col-span-1",
|
|
107
|
+
children: [brand, /* @__PURE__ */ jsx("p", {
|
|
108
|
+
className: "text-base-700 max-w-64 text-sm leading-6",
|
|
109
|
+
children: tagline
|
|
110
|
+
})]
|
|
111
|
+
}), columns.map((column) => /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: "flex flex-col gap-3",
|
|
113
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
114
|
+
className: "text-base-800 text-xs font-semibold tracking-[0.06em] uppercase",
|
|
115
|
+
children: column.title
|
|
116
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
117
|
+
className: "flex flex-col gap-2",
|
|
118
|
+
children: column.links.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
|
|
119
|
+
...tabbable,
|
|
120
|
+
href: link.href,
|
|
121
|
+
...link.external ? {
|
|
122
|
+
target: "_blank",
|
|
123
|
+
rel: "noreferrer"
|
|
124
|
+
} : {},
|
|
125
|
+
onClick: (event) => {
|
|
126
|
+
if (link.external || !link.href.startsWith("/")) return;
|
|
127
|
+
if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0) return;
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
onNavigate(link.href);
|
|
130
|
+
},
|
|
131
|
+
className: "text-base-700 hover:text-base-content text-sm transition-colors",
|
|
132
|
+
children: link.label
|
|
133
|
+
}) }, link.href))
|
|
134
|
+
})]
|
|
135
|
+
}, column.title))]
|
|
136
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
137
|
+
className: "mx-auto w-full max-w-[1200px] px-5 sm:px-8",
|
|
138
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
139
|
+
className: "border-base-300/70 text-base-700 flex flex-col gap-2 border-t py-6 text-xs sm:flex-row sm:items-center sm:justify-between",
|
|
140
|
+
children: [/* @__PURE__ */ jsx("span", { children: legal }), /* @__PURE__ */ jsx("span", { children: note })]
|
|
141
|
+
})
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function useScrolled() {
|
|
146
|
+
const [scrolled, setScrolled] = useState(false);
|
|
147
|
+
useEffect(() => {
|
|
148
|
+
const update = () => setScrolled(window.scrollY > 4);
|
|
149
|
+
update();
|
|
150
|
+
window.addEventListener("scroll", update, { passive: true });
|
|
151
|
+
return () => window.removeEventListener("scroll", update);
|
|
152
|
+
}, []);
|
|
153
|
+
return scrolled;
|
|
154
|
+
}
|
|
155
|
+
export { SiteFooter, SiteHeader, SiteShell };
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=Site.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Site.js","names":[],"sources":["../../src/layout/Site.tsx"],"sourcesContent":["import { MenuIcon, XIcon } from 'lucide-react';\nimport { type ReactNode, useEffect, useState } from 'react';\n\nimport { tabbable } from '../foundations/KeyboardFocus';\n\nexport interface SiteLink {\n label: string;\n href: string;\n current?: boolean;\n external?: boolean;\n}\n\ninterface SiteShellProps {\n skipLabel: string;\n header: ReactNode;\n footer: ReactNode;\n children: ReactNode;\n}\n\n/** The website frame: a glass header that stays on top while the document scrolls under it, then the footer. */\nexport function SiteShell({ skipLabel, header, footer, children }: SiteShellProps) {\n const scrolled = useScrolled();\n\n return (\n <div className=\"flex min-h-dvh min-w-0 flex-col overflow-x-clip pr-[env(safe-area-inset-right)] pl-[env(safe-area-inset-left)]\">\n <a\n href=\"#content\"\n className=\"bg-base-100 sr-only z-[60] rounded-md px-3 py-2 text-sm font-medium focus:not-sr-only focus:fixed focus:top-3 focus:left-3\"\n >\n {skipLabel}\n </a>\n <div\n data-scrolled={scrolled || undefined}\n className=\"glass-bar data-scrolled:border-base-300 sticky top-0 z-50 shrink-0 border-b border-transparent pt-[env(safe-area-inset-top)] transition-[border-color] duration-300\"\n >\n {header}\n </div>\n <main id=\"content\" className=\"flex-1\">\n {children}\n </main>\n {footer}\n </div>\n );\n}\n\ninterface SiteHeaderProps {\n brand: ReactNode;\n links: readonly SiteLink[];\n actions: ReactNode;\n /** Secondary controls, such as the theme switch: in the bar on wide screens and in the menu on narrow ones. */\n utilities?: ReactNode;\n menuLabel: string;\n closeMenuLabel: string;\n navigationLabel: string;\n onNavigate: (href: string) => void;\n}\n\nexport function SiteHeader({\n brand,\n links,\n actions,\n utilities,\n menuLabel,\n closeMenuLabel,\n navigationLabel,\n onNavigate,\n}: SiteHeaderProps) {\n const [open, setOpen] = useState(false);\n\n function follow(href: string) {\n setOpen(false);\n onNavigate(href);\n }\n\n return (\n <header className=\"mx-auto flex h-14 w-full max-w-[1200px] items-center gap-6 px-5 sm:px-8\">\n {brand}\n <nav aria-label={navigationLabel} className=\"hidden items-center gap-1 md:flex\">\n {links.map((link) => (\n <NavLink key={link.href} link={link} onNavigate={follow} />\n ))}\n </nav>\n <div className=\"ml-auto flex items-center gap-2 max-sm:[&>a]:hidden\">\n {utilities ? <div className=\"hidden md:contents\">{utilities}</div> : null}\n {actions}\n </div>\n <button\n {...tabbable}\n type=\"button\"\n aria-expanded={open}\n aria-controls=\"site-menu\"\n aria-label={open ? closeMenuLabel : menuLabel}\n onClick={() => setOpen((value) => !value)}\n className=\"text-base-800 hover:bg-base-200 -mr-2 inline-flex size-9 items-center justify-center rounded-md transition-colors md:hidden [&_svg]:size-5\"\n >\n {open ? <XIcon /> : <MenuIcon />}\n </button>\n {open ? (\n <nav\n id=\"site-menu\"\n aria-label={navigationLabel}\n className=\"glass-menu absolute inset-x-3 top-[calc(100%+0.5rem)] flex flex-col gap-1 rounded-2xl p-2 md:hidden\"\n >\n {links.map((link) => (\n <NavLink key={link.href} link={link} onNavigate={follow} large />\n ))}\n {utilities ? <div className=\"border-base-300 mt-1 border-t px-3 pt-3 pb-1\">{utilities}</div> : null}\n </nav>\n ) : null}\n </header>\n );\n}\n\nfunction NavLink({ link, onNavigate, large }: { link: SiteLink; onNavigate: (href: string) => void; large?: boolean }) {\n return (\n <a\n {...tabbable}\n href={link.href}\n aria-current={link.current ? 'page' : undefined}\n {...(link.external ? { target: '_blank', rel: 'noreferrer' } : {})}\n onClick={(event) => {\n if (link.external || event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0) return;\n\n event.preventDefault();\n onNavigate(link.href);\n }}\n className={`text-base-700 hover:text-base-content aria-[current=page]:text-base-content focus-visible:outline-primary rounded-md font-medium transition-colors focus-visible:outline-2 ${large ? 'hover:bg-base-200 px-3 py-2.5 text-base' : 'px-2.5 py-1.5 text-sm'}`}\n >\n {link.label}\n </a>\n );\n}\n\ninterface SiteFooterProps {\n brand: ReactNode;\n tagline: string;\n columns: readonly { title: string; links: readonly SiteLink[] }[];\n legal: string;\n note: ReactNode;\n onNavigate: (href: string) => void;\n}\n\nexport function SiteFooter({ brand, tagline, columns, legal, note, onNavigate }: SiteFooterProps) {\n return (\n <footer className=\"border-base-300 bg-base-50 border-t\">\n <div className=\"mx-auto grid w-full max-w-[1200px] grid-cols-2 gap-x-6 gap-y-10 px-5 pt-14 pb-10 sm:px-8 md:grid-cols-[1.4fr_repeat(4,1fr)]\">\n <div className=\"col-span-2 flex flex-col gap-3 md:col-span-1\">\n {brand}\n <p className=\"text-base-700 max-w-64 text-sm leading-6\">{tagline}</p>\n </div>\n {columns.map((column) => (\n <div key={column.title} className=\"flex flex-col gap-3\">\n <h2 className=\"text-base-800 text-xs font-semibold tracking-[0.06em] uppercase\">\n {column.title}\n </h2>\n <ul className=\"flex flex-col gap-2\">\n {column.links.map((link) => (\n <li key={link.href}>\n <a\n {...tabbable}\n href={link.href}\n {...(link.external ? { target: '_blank', rel: 'noreferrer' } : {})}\n onClick={(event) => {\n if (link.external || !link.href.startsWith('/')) return;\n\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)\n return;\n\n event.preventDefault();\n onNavigate(link.href);\n }}\n className=\"text-base-700 hover:text-base-content text-sm transition-colors\"\n >\n {link.label}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n <div className=\"mx-auto w-full max-w-[1200px] px-5 sm:px-8\">\n <div className=\"border-base-300/70 text-base-700 flex flex-col gap-2 border-t py-6 text-xs sm:flex-row sm:items-center sm:justify-between\">\n <span>{legal}</span>\n <span>{note}</span>\n </div>\n </div>\n </footer>\n );\n}\n\nfunction useScrolled() {\n const [scrolled, setScrolled] = useState(false);\n\n useEffect(() => {\n const update = () => setScrolled(window.scrollY > 4);\n\n update();\n window.addEventListener('scroll', update, { passive: true });\n\n return () => window.removeEventListener('scroll', update);\n }, []);\n\n return scrolled;\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,UAAU,EAAE,WAAW,QAAQ,QAAQ,YAA4B;CAC/E,MAAM,WAAW,YAAY;CAE7B,OACI,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACI,oBAAC,KAAD;IACI,MAAK;IACL,WAAU;IAET,UAAA;GACF,CAAA;GACH,oBAAC,OAAD;IACI,iBAAe,YAAY,KAAA;IAC3B,WAAU;IAET,UAAA;GACA,CAAA;GACL,oBAAC,QAAD;IAAM,IAAG;IAAU,WAAU;IACxB;GACC,CAAA;GACL;EACA;;AAEb;AAcA,SAAgB,WAAW,EACvB,OACA,OACA,SACA,WACA,WACA,gBACA,iBACA,cACgB;CAChB,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CAEtC,SAAS,OAAO,MAAc;EAC1B,QAAQ,KAAK;EACb,WAAW,IAAI;CACnB;CAEA,OACI,qBAAC,UAAD;EAAQ,WAAU;EAAlB,UAAA;GACK;GACD,oBAAC,OAAD;IAAK,cAAY;IAAiB,WAAU;IACvC,UAAA,MAAM,KAAK,SACR,oBAAC,SAAD;KAA+B;KAAM,YAAY;IAAS,GAA5C,KAAK,IAAuC,CAC7D;GACA,CAAA;GACL,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACK,YAAY,oBAAC,OAAD;KAAK,WAAU;KAAsB,UAAA;IAAe,CAAA,IAAI,MACpE,OACA;;GACL,oBAAC,UAAD;IACI,GAAI;IACJ,MAAK;IACL,iBAAe;IACf,iBAAc;IACd,cAAY,OAAO,iBAAiB;IACpC,eAAe,SAAS,UAAU,CAAC,KAAK;IACxC,WAAU;IAET,UAAA,OAAO,oBAAC,OAAD,CAAQ,CAAA,IAAI,oBAAC,UAAD,CAAW,CAAA;GAC3B,CAAA;GACP,OACG,qBAAC,OAAD;IACI,IAAG;IACH,cAAY;IACZ,WAAU;IAHd,UAAA,CAKK,MAAM,KAAK,SACR,oBAAC,SAAD;KAA+B;KAAM,YAAY;KAAQ,OAAA;IAAO,GAAlD,KAAK,IAA6C,CACnE,GACA,YAAY,oBAAC,OAAD;KAAK,WAAU;KAAgD,UAAA;IAAe,CAAA,IAAI,IAC9F;GACL,CAAA,IAAA;EACA;;AAEhB;AAEA,SAAS,QAAQ,EAAE,MAAM,YAAY,SAAkF;CACnH,OACI,oBAAC,KAAD;EACI,GAAI;EACJ,MAAM,KAAK;EACX,gBAAc,KAAK,UAAU,SAAS,KAAA;EACtC,GAAK,KAAK,WAAW;GAAE,QAAQ;GAAU,KAAK;EAAa,IAAI,CAAC;EAChE,UAAU,UAAU;GAChB,IAAI,KAAK,YAAY,MAAM,WAAW,MAAM,WAAW,MAAM,YAAY,MAAM,WAAW,GAAG;GAE7F,MAAM,eAAe;GACrB,WAAW,KAAK,IAAI;EACxB;EACA,WAAW,8KAA8K,QAAQ,4CAA4C;EAE5O,UAAA,KAAK;CACP,CAAA;AAEX;AAWA,SAAgB,WAAW,EAAE,OAAO,SAAS,SAAS,OAAO,MAAM,cAA+B;CAC9F,OACI,qBAAC,UAAD;EAAQ,WAAU;EAAlB,UAAA,CACI,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACI,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACK,OACD,oBAAC,KAAD;KAAG,WAAU;KAA4C,UAAA;IAAW,CAAA,CACnE;GACJ,CAAA,GAAA,QAAQ,KAAK,WACV,qBAAC,OAAD;IAAwB,WAAU;IAAlC,UAAA,CACI,oBAAC,MAAD;KAAI,WAAU;KACT,UAAA,OAAO;IACR,CAAA,GACJ,oBAAC,MAAD;KAAI,WAAU;KACT,UAAA,OAAO,MAAM,KAAK,SACf,oBAAC,MAAD,EAAA,UACI,oBAAC,KAAD;MACI,GAAI;MACJ,MAAM,KAAK;MACX,GAAK,KAAK,WAAW;OAAE,QAAQ;OAAU,KAAK;MAAa,IAAI,CAAC;MAChE,UAAU,UAAU;OAChB,IAAI,KAAK,YAAY,CAAC,KAAK,KAAK,WAAW,GAAG,GAAG;OAEjD,IAAI,MAAM,WAAW,MAAM,WAAW,MAAM,YAAY,MAAM,WAAW,GACrE;OAEJ,MAAM,eAAe;OACrB,WAAW,KAAK,IAAI;MACxB;MACA,WAAU;MAET,UAAA,KAAK;KACP,CAAA,EACH,GAlBK,KAAK,IAkBV,CACP;IACD,CAAA,CACH;GA3BK,GAAA,OAAO,KA2BZ,CACR,CACA;EACL,CAAA,GAAA,oBAAC,OAAD;GAAK,WAAU;GACX,UAAA,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACI,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,GACnB,oBAAC,QAAD,EAAA,UAAO,KAAW,CAAA,CACjB;;EACJ,CAAA,CACD;;AAEhB;AAEA,SAAS,cAAc;CACnB,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAE9C,gBAAgB;EACZ,MAAM,eAAe,YAAY,OAAO,UAAU,CAAC;EAEnD,OAAO;EACP,OAAO,iBAAiB,UAAU,QAAQ,EAAE,SAAS,KAAK,CAAC;EAE3D,aAAa,OAAO,oBAAoB,UAAU,MAAM;CAC5D,GAAG,CAAC,CAAC;CAEL,OAAO;AACX"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface TitleBarProps {
|
|
3
|
+
actions?: ReactNode;
|
|
4
|
+
/** The brand, a link home, before a divider and the title. */
|
|
5
|
+
brand: ReactNode;
|
|
6
|
+
search?: ReactNode;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/** T3 Code's 52px title bar: the brand and where you are on the left, tools on the right. Its own width,
|
|
10
|
+
* not the window's, decides when search folds to an icon; narrow screens close the gaps so the title keeps
|
|
11
|
+
* the room left. */
|
|
12
|
+
export declare function TitleBar({ actions, brand, search, title }: TitleBarProps): import("react").JSX.Element;
|
|
13
|
+
export interface TitleBarTrailItem {
|
|
14
|
+
key: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
label: string;
|
|
17
|
+
/** Makes the step a button, such as one switching to its siblings; `selectLabel` says where it leads. */
|
|
18
|
+
onSelect?: () => void;
|
|
19
|
+
selectLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
/** The title bar's location, T3's "project / thread": each step muted and chevron-separated, the current one
|
|
22
|
+
* in the foreground. Steps that switch somewhere are buttons with a chevron. Narrow screens show only the
|
|
23
|
+
* current step. */
|
|
24
|
+
export declare function TitleBarTrail({ items }: {
|
|
25
|
+
items: readonly TitleBarTrailItem[];
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=TitleBar.d.ts.map
|