@lar-works/design-system 0.0.0-stage → 0.1.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/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 +56 -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 +75 -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,191 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Button } from '../actions/Button';
|
|
4
|
+
import { SkeletonLoader } from '../feedback/SkeletonLoader';
|
|
5
|
+
import { Popover } from '../overlays/Popover';
|
|
6
|
+
import { Heading, Text } from '../typography/Typography';
|
|
7
|
+
import { Badge } from './Badge';
|
|
8
|
+
import { TextPreview } from './TextPreview';
|
|
9
|
+
|
|
10
|
+
type DetailHeroProps =
|
|
11
|
+
| { loading: true; loadingLabel: string; summary?: boolean; description?: boolean; details?: number }
|
|
12
|
+
| {
|
|
13
|
+
loading?: false;
|
|
14
|
+
actions?: ReactNode;
|
|
15
|
+
artwork: ReactNode;
|
|
16
|
+
backgroundSrc?: string;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
label: string;
|
|
19
|
+
subtitle?: ReactNode;
|
|
20
|
+
summary?: ReactNode;
|
|
21
|
+
title: string;
|
|
22
|
+
titleLevel?: 'h1' | 'h2';
|
|
23
|
+
titleLogoSrc?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function DetailHero(props: DetailHeroProps) {
|
|
27
|
+
const loading = props.loading === true;
|
|
28
|
+
const background = !props.loading && props.backgroundSrc;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<SkeletonLoader loading={loading} label={props.loading ? props.loadingLabel : ''}>
|
|
32
|
+
<section className="relative isolate min-w-0 pb-4">
|
|
33
|
+
{background ? (
|
|
34
|
+
<div
|
|
35
|
+
aria-hidden="true"
|
|
36
|
+
className="pointer-events-none absolute inset-x-0 -top-2 bottom-0 -z-10 overflow-hidden rounded-2xl [mask-image:linear-gradient(to_bottom,black_55%,transparent)]"
|
|
37
|
+
>
|
|
38
|
+
<img src={background} alt="" className="size-full object-cover opacity-35" />
|
|
39
|
+
<div className="from-base-50 via-base-50/60 to-base-50/20 absolute inset-0 bg-linear-to-t" />
|
|
40
|
+
</div>
|
|
41
|
+
) : null}
|
|
42
|
+
<div
|
|
43
|
+
className={`grid gap-6 sm:grid-cols-[10rem_minmax(0,1fr)] sm:items-center md:grid-cols-[14rem_minmax(0,1fr)] md:gap-8 ${background ? 'p-4 sm:p-5' : ''}`}
|
|
44
|
+
>
|
|
45
|
+
<div className="ring-base-900/10 w-40 self-start overflow-hidden rounded-lg shadow-md ring-1 md:w-full">
|
|
46
|
+
{props.loading ? <SkeletonLoader.Shape presentation="artwork" /> : props.artwork}
|
|
47
|
+
</div>
|
|
48
|
+
<div className="flex min-w-0 flex-col gap-5 md:gap-6">
|
|
49
|
+
<div className="min-w-0">
|
|
50
|
+
<Text
|
|
51
|
+
variant="overline"
|
|
52
|
+
tone="muted"
|
|
53
|
+
className={`mb-2 ${loading ? 'max-w-32' : ''}`}
|
|
54
|
+
loading={loading}
|
|
55
|
+
>
|
|
56
|
+
{!props.loading && props.label}
|
|
57
|
+
</Text>
|
|
58
|
+
<div className="flex min-h-8 min-w-0 flex-wrap items-center gap-5">
|
|
59
|
+
<Heading
|
|
60
|
+
as={props.loading ? 'h2' : (props.titleLevel ?? 'h2')}
|
|
61
|
+
variant="hero"
|
|
62
|
+
className={`min-w-0 wrap-break-word ${loading ? 'w-3/4 max-w-xl' : ''}`}
|
|
63
|
+
loading={loading}
|
|
64
|
+
>
|
|
65
|
+
{!props.loading &&
|
|
66
|
+
(props.titleLogoSrc ? (
|
|
67
|
+
<img
|
|
68
|
+
src={props.titleLogoSrc}
|
|
69
|
+
alt={props.title}
|
|
70
|
+
className="max-h-28 w-auto max-w-full object-contain object-left sm:max-w-sm"
|
|
71
|
+
/>
|
|
72
|
+
) : (
|
|
73
|
+
props.title
|
|
74
|
+
))}
|
|
75
|
+
</Heading>
|
|
76
|
+
{!props.loading && props.actions ? (
|
|
77
|
+
<div className="flex max-w-full shrink-0 flex-wrap items-center gap-3">
|
|
78
|
+
{props.actions}
|
|
79
|
+
</div>
|
|
80
|
+
) : null}
|
|
81
|
+
</div>
|
|
82
|
+
{props.loading || props.subtitle ? (
|
|
83
|
+
<Text
|
|
84
|
+
variant="description"
|
|
85
|
+
tone="muted"
|
|
86
|
+
className={`mt-2 wrap-break-word ${loading ? 'max-w-sm' : ''}`}
|
|
87
|
+
loading={loading}
|
|
88
|
+
>
|
|
89
|
+
{!props.loading && props.subtitle}
|
|
90
|
+
</Text>
|
|
91
|
+
) : null}
|
|
92
|
+
</div>
|
|
93
|
+
{props.summary ? (
|
|
94
|
+
<Text tone="muted" className="max-w-xl" loading={loading}>
|
|
95
|
+
{!props.loading && props.summary}
|
|
96
|
+
</Text>
|
|
97
|
+
) : null}
|
|
98
|
+
{props.loading ? (
|
|
99
|
+
<>
|
|
100
|
+
<DetailHeroDetails>
|
|
101
|
+
{Array.from({ length: props.details ?? 3 }, (_, index) => (
|
|
102
|
+
<DetailHeroDetail key={index} loading />
|
|
103
|
+
))}
|
|
104
|
+
</DetailHeroDetails>
|
|
105
|
+
{props.description ? <TextPreview loading /> : null}
|
|
106
|
+
</>
|
|
107
|
+
) : (
|
|
108
|
+
props.children
|
|
109
|
+
)}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</section>
|
|
113
|
+
</SkeletonLoader>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function DetailHeroDetails({ children }: { children: ReactNode }) {
|
|
118
|
+
return <dl className="grid grid-cols-2 gap-x-8 gap-y-4 sm:flex sm:flex-wrap">{children}</dl>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
type DetailProps = { loading: true } | { loading?: false; label: string; value: ReactNode };
|
|
122
|
+
|
|
123
|
+
export function DetailHeroDetail(props: DetailProps) {
|
|
124
|
+
return (
|
|
125
|
+
<div className={props.loading ? 'w-24' : 'max-w-full min-w-0'}>
|
|
126
|
+
<dt>
|
|
127
|
+
<Text as="span" variant="caption" tone="muted" loading={props.loading}>
|
|
128
|
+
{!props.loading && props.label}
|
|
129
|
+
</Text>
|
|
130
|
+
</dt>
|
|
131
|
+
<dd className="mt-1 min-h-6 wrap-break-word">
|
|
132
|
+
<Text as="div" variant="label" loading={props.loading}>
|
|
133
|
+
{!props.loading && props.value}
|
|
134
|
+
</Text>
|
|
135
|
+
</dd>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function DetailHeroTags({
|
|
141
|
+
label,
|
|
142
|
+
moreLabel,
|
|
143
|
+
values,
|
|
144
|
+
}: {
|
|
145
|
+
label: string;
|
|
146
|
+
moreLabel: string;
|
|
147
|
+
values: readonly string[];
|
|
148
|
+
}) {
|
|
149
|
+
if (!values.length) return null;
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<DetailHeroDetail
|
|
153
|
+
label={label}
|
|
154
|
+
value={
|
|
155
|
+
<div className="flex flex-wrap items-baseline gap-x-2 gap-y-1">
|
|
156
|
+
<span>{values[0]}</span>
|
|
157
|
+
{values.length > 1 ? (
|
|
158
|
+
<Popover>
|
|
159
|
+
<Popover.Trigger asChild>
|
|
160
|
+
{/* One line of the label's height at every width, so the row matches the others;
|
|
161
|
+
the hit area extends past it instead. */}
|
|
162
|
+
<Button
|
|
163
|
+
className="h-5 px-1.5 py-0 text-xs leading-5 before:-inset-y-3 sm:h-5"
|
|
164
|
+
aria-label={`${label}: ${moreLabel}`}
|
|
165
|
+
variant="quiet"
|
|
166
|
+
>
|
|
167
|
+
{moreLabel}
|
|
168
|
+
</Button>
|
|
169
|
+
</Popover.Trigger>
|
|
170
|
+
<Popover.Content align="start" width="sm" aria-label={label}>
|
|
171
|
+
<Text variant="label">{label}</Text>
|
|
172
|
+
<ul className="mt-3 flex flex-wrap gap-2">
|
|
173
|
+
{values.map((value) => (
|
|
174
|
+
<li key={value} className="max-w-full min-w-0">
|
|
175
|
+
<Badge
|
|
176
|
+
tone="neutral"
|
|
177
|
+
className="max-w-full wrap-break-word whitespace-normal"
|
|
178
|
+
>
|
|
179
|
+
{value}
|
|
180
|
+
</Badge>
|
|
181
|
+
</li>
|
|
182
|
+
))}
|
|
183
|
+
</ul>
|
|
184
|
+
</Popover.Content>
|
|
185
|
+
</Popover>
|
|
186
|
+
) : null}
|
|
187
|
+
</div>
|
|
188
|
+
}
|
|
189
|
+
/>
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Box } from '@ninna-ui/layout';
|
|
2
|
+
import { Code } from '@ninna-ui/primitives';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
import { Stack } from '../layout/Flow';
|
|
6
|
+
import { Text } from '../typography/Typography';
|
|
7
|
+
|
|
8
|
+
interface DetailListItem {
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
key?: string;
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface DetailListProps {
|
|
16
|
+
compact?: boolean;
|
|
17
|
+
items: readonly DetailListItem[];
|
|
18
|
+
title: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function DetailList({ compact = false, items, title }: DetailListProps) {
|
|
22
|
+
return (
|
|
23
|
+
<Box className={compact ? 'min-w-0' : 'border-base-300 mt-1 border-t px-2 pt-3 pb-1'}>
|
|
24
|
+
{!compact ? (
|
|
25
|
+
<Text as="span" variant="overline" tone="muted">
|
|
26
|
+
{title}
|
|
27
|
+
</Text>
|
|
28
|
+
) : null}
|
|
29
|
+
<Stack
|
|
30
|
+
as="dl"
|
|
31
|
+
aria-label={title}
|
|
32
|
+
space={compact ? 'none' : 'related'}
|
|
33
|
+
className={compact ? 'min-w-0' : 'mt-2'}
|
|
34
|
+
>
|
|
35
|
+
{items.map((item) => (
|
|
36
|
+
<div
|
|
37
|
+
key={item.key ?? item.label}
|
|
38
|
+
className={
|
|
39
|
+
compact
|
|
40
|
+
? 'grid min-w-0 grid-cols-[minmax(0,5rem)_minmax(0,1fr)] items-center gap-2'
|
|
41
|
+
: 'flex min-w-0 items-center justify-between gap-3'
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
<dt className={compact ? 'min-w-0' : 'shrink-0'}>
|
|
45
|
+
<Text
|
|
46
|
+
as="span"
|
|
47
|
+
className={compact ? 'block' : undefined}
|
|
48
|
+
variant="caption"
|
|
49
|
+
tone="muted"
|
|
50
|
+
truncate={compact}
|
|
51
|
+
title={item.label}
|
|
52
|
+
>
|
|
53
|
+
{item.label}
|
|
54
|
+
</Text>
|
|
55
|
+
</dt>
|
|
56
|
+
<dd className="min-w-0">
|
|
57
|
+
<div className="flex min-w-0 items-center gap-1">
|
|
58
|
+
<Code
|
|
59
|
+
title={item.value}
|
|
60
|
+
className="block max-w-full min-w-0 flex-1 truncate px-1.5 py-0.5 text-xs"
|
|
61
|
+
>
|
|
62
|
+
{item.value}
|
|
63
|
+
</Code>
|
|
64
|
+
{item.actions ? (
|
|
65
|
+
<span className="flex shrink-0 items-center">{item.actions}</span>
|
|
66
|
+
) : null}
|
|
67
|
+
</div>
|
|
68
|
+
</dd>
|
|
69
|
+
</div>
|
|
70
|
+
))}
|
|
71
|
+
</Stack>
|
|
72
|
+
</Box>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Inline, Stack } from '../layout/Flow';
|
|
4
|
+
import { Text } from '../typography/Typography';
|
|
5
|
+
|
|
6
|
+
interface DeviceCardProps {
|
|
7
|
+
/** A control in the top corner, for example a limit select. */
|
|
8
|
+
action?: ReactNode;
|
|
9
|
+
/** Beside the name, for example a status badge. */
|
|
10
|
+
badge?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
detail?: string;
|
|
13
|
+
/** Below the content, past a divider, for example the device's encoder. */
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
/** Dashed, for a device that is detected but cannot be used. */
|
|
16
|
+
unavailable?: boolean;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** One piece of hardware: its name and detail, a corner control and its content. */
|
|
21
|
+
export function DeviceCard({ action, badge, children, detail, footer, name, unavailable = false }: DeviceCardProps) {
|
|
22
|
+
return (
|
|
23
|
+
<article
|
|
24
|
+
aria-label={name}
|
|
25
|
+
className={`flex min-w-0 flex-col gap-4 rounded-lg p-4 ${
|
|
26
|
+
unavailable ? 'border-base-300 border border-dashed' : 'border-base-300 bg-base-100 border shadow-xs'
|
|
27
|
+
}`}
|
|
28
|
+
>
|
|
29
|
+
<div className="flex min-w-0 items-start justify-between gap-3">
|
|
30
|
+
<Stack space="none" className="min-w-0">
|
|
31
|
+
<Inline align="center" space="related" className="min-w-0">
|
|
32
|
+
<Text as="span" variant="label" truncate title={name}>
|
|
33
|
+
{name}
|
|
34
|
+
</Text>
|
|
35
|
+
{badge}
|
|
36
|
+
</Inline>
|
|
37
|
+
{detail ? (
|
|
38
|
+
<Text as="span" variant="caption" tone="muted">
|
|
39
|
+
{detail}
|
|
40
|
+
</Text>
|
|
41
|
+
) : null}
|
|
42
|
+
</Stack>
|
|
43
|
+
{action ? <div className="w-28 shrink-0">{action}</div> : null}
|
|
44
|
+
</div>
|
|
45
|
+
{children}
|
|
46
|
+
{footer ? <div className="border-base-300 border-t pt-3">{footer}</div> : null}
|
|
47
|
+
</article>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Stack } from '../layout/Flow';
|
|
4
|
+
import { Heading, Text } from '../typography/Typography';
|
|
5
|
+
import { Badge } from './Badge';
|
|
6
|
+
|
|
7
|
+
interface IdentityProps {
|
|
8
|
+
artwork: ReactNode;
|
|
9
|
+
detail?: string;
|
|
10
|
+
tag?: string;
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
presentation?: 'square' | 'poster';
|
|
13
|
+
/** Heads its page: a larger poster, an overline naming what it belongs to, and the title as the page's h1. */
|
|
14
|
+
overline?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A compact "what is this" strip: small framed artwork beside a title, one line of facts, and an optional tag. */
|
|
18
|
+
export function Identity({ artwork, detail, tag, title, overline, presentation = 'square' }: IdentityProps) {
|
|
19
|
+
const heading = overline !== undefined;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className={`flex min-w-0 items-center ${heading ? 'gap-6' : 'gap-4'}`}>
|
|
23
|
+
<div
|
|
24
|
+
className={`${presentation === 'poster' ? `${heading ? 'w-24' : 'w-16'} aspect-[2/3]` : 'size-16'} ring-base-900/10 shrink-0 overflow-hidden rounded-lg shadow-sm ring-1`}
|
|
25
|
+
>
|
|
26
|
+
{artwork}
|
|
27
|
+
</div>
|
|
28
|
+
<Stack space="tight" className="min-w-0 flex-1">
|
|
29
|
+
{heading ? (
|
|
30
|
+
<Text variant="overline" tone="muted" truncate>
|
|
31
|
+
{overline}
|
|
32
|
+
</Text>
|
|
33
|
+
) : null}
|
|
34
|
+
{title && heading ? (
|
|
35
|
+
<Heading as="h1" variant="page">
|
|
36
|
+
{title}
|
|
37
|
+
</Heading>
|
|
38
|
+
) : title ? (
|
|
39
|
+
<Text as="span" truncate variant="label">
|
|
40
|
+
{title}
|
|
41
|
+
</Text>
|
|
42
|
+
) : null}
|
|
43
|
+
{detail ? (
|
|
44
|
+
<Text as="span" truncate title={detail} tone="muted">
|
|
45
|
+
{detail}
|
|
46
|
+
</Text>
|
|
47
|
+
) : null}
|
|
48
|
+
{tag ? (
|
|
49
|
+
<div className="mt-1 flex">
|
|
50
|
+
<Badge tone="neutral">{tag}</Badge>
|
|
51
|
+
</div>
|
|
52
|
+
) : null}
|
|
53
|
+
</Stack>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { SkeletonLoader } from '../feedback/SkeletonLoader';
|
|
4
|
+
import { tabbable } from '../foundations/KeyboardFocus';
|
|
5
|
+
import { Stack } from '../layout/Flow';
|
|
6
|
+
import { LinkBox, LinkOverlay } from '../typography/Link';
|
|
7
|
+
import { Text } from '../typography/Typography';
|
|
8
|
+
|
|
9
|
+
type ImageCardProps =
|
|
10
|
+
| { loading: true; textRows?: 1 | 2 | 3; aspect?: 'square' | 'poster' }
|
|
11
|
+
| {
|
|
12
|
+
loading?: false;
|
|
13
|
+
artwork: ReactNode;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
href?: string;
|
|
16
|
+
onNavigate?: (href: string) => void;
|
|
17
|
+
subtitle?: ReactNode;
|
|
18
|
+
label?: string;
|
|
19
|
+
detail?: string;
|
|
20
|
+
title: string;
|
|
21
|
+
presentation?: 'person' | 'poster';
|
|
22
|
+
/** A short qualifier shown muted after the title on the same line, such as an edition. */
|
|
23
|
+
titleDetail?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function ImageCard(props: ImageCardProps) {
|
|
27
|
+
const lines = props.loading
|
|
28
|
+
? Array.from<unknown, ReactNode>({ length: props.textRows ?? 2 }, () => undefined)
|
|
29
|
+
: [
|
|
30
|
+
props.titleDetail ? (
|
|
31
|
+
<>
|
|
32
|
+
{props.title}
|
|
33
|
+
<span className="text-base-700 font-normal"> · {props.titleDetail}</span>
|
|
34
|
+
</>
|
|
35
|
+
) : (
|
|
36
|
+
props.title
|
|
37
|
+
),
|
|
38
|
+
...(props.subtitle || props.detail ? [props.subtitle || '\u00a0'] : []),
|
|
39
|
+
...(props.detail ? [props.detail] : []),
|
|
40
|
+
];
|
|
41
|
+
const label = props.loading
|
|
42
|
+
? undefined
|
|
43
|
+
: (props.label ??
|
|
44
|
+
[
|
|
45
|
+
props.title,
|
|
46
|
+
props.titleDetail,
|
|
47
|
+
typeof props.subtitle === 'string' ? props.subtitle : undefined,
|
|
48
|
+
props.detail,
|
|
49
|
+
]
|
|
50
|
+
.filter(Boolean)
|
|
51
|
+
.join(', '));
|
|
52
|
+
const content = (
|
|
53
|
+
<Stack space="related" className="min-w-0 text-left">
|
|
54
|
+
{props.loading ? (
|
|
55
|
+
<SkeletonLoader.Shape presentation={props.aspect === 'poster' ? 'poster' : 'artwork'} />
|
|
56
|
+
) : props.presentation === 'person' ? (
|
|
57
|
+
<span className="block size-16 overflow-hidden rounded-full [&>div]:size-full">{props.artwork}</span>
|
|
58
|
+
) : (
|
|
59
|
+
props.artwork
|
|
60
|
+
)}
|
|
61
|
+
<Stack space="none" className="min-w-0">
|
|
62
|
+
{lines.map((line, index) => (
|
|
63
|
+
<Text
|
|
64
|
+
key={index}
|
|
65
|
+
as="span"
|
|
66
|
+
variant={index === 0 ? 'label' : 'caption'}
|
|
67
|
+
tone={index === 0 ? 'default' : 'muted'}
|
|
68
|
+
truncate={props.loading || !props.presentation}
|
|
69
|
+
className={!props.loading && props.presentation ? 'wrap-anywhere' : undefined}
|
|
70
|
+
loading={props.loading}
|
|
71
|
+
>
|
|
72
|
+
{!props.loading && props.href && index === 0 ? (
|
|
73
|
+
<LinkOverlay href={props.href} onNavigate={props.onNavigate} aria-label={label}>
|
|
74
|
+
{line}
|
|
75
|
+
</LinkOverlay>
|
|
76
|
+
) : (
|
|
77
|
+
line
|
|
78
|
+
)}
|
|
79
|
+
</Text>
|
|
80
|
+
))}
|
|
81
|
+
</Stack>
|
|
82
|
+
</Stack>
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
if (props.loading || (!props.href && !props.onClick)) return content;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<LinkBox className="group/media-item rounded-lg">
|
|
89
|
+
{content}
|
|
90
|
+
{!props.href && props.onClick ? (
|
|
91
|
+
<button
|
|
92
|
+
{...tabbable}
|
|
93
|
+
type="button"
|
|
94
|
+
data-slot="action-overlay"
|
|
95
|
+
aria-label={label}
|
|
96
|
+
className="focus-visible:outline-primary absolute inset-0 z-1 w-full cursor-pointer rounded-lg focus-visible:outline-2 focus-visible:outline-offset-2"
|
|
97
|
+
onClick={props.onClick}
|
|
98
|
+
/>
|
|
99
|
+
) : null}
|
|
100
|
+
</LinkBox>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { CheckIcon, Disc3Icon } from 'lucide-react';
|
|
2
|
+
import { type ReactNode, useRef, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import { Button } from '../actions/Button';
|
|
5
|
+
import { tabbable } from '../foundations/KeyboardFocus';
|
|
6
|
+
import { Artwork } from './Artwork';
|
|
7
|
+
|
|
8
|
+
export function ImagePicker({ label, header, children }: { label: string; header: ReactNode; children: ReactNode }) {
|
|
9
|
+
return (
|
|
10
|
+
<section aria-label={label} className="flex min-h-0 flex-1 flex-col gap-3">
|
|
11
|
+
<div className="shrink-0">{header}</div>
|
|
12
|
+
<div className="-mx-1 min-h-0 flex-1 overflow-y-auto overscroll-contain p-1">{children}</div>
|
|
13
|
+
</section>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function ImagePickerGrid({ children, label }: { children: ReactNode; label: string }) {
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
role="group"
|
|
21
|
+
aria-label={label}
|
|
22
|
+
className="grid grid-cols-2 gap-3 sm:grid-cols-[repeat(auto-fill,minmax(9rem,1fr))]"
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function ImagePickerOption({
|
|
30
|
+
src,
|
|
31
|
+
pending,
|
|
32
|
+
error,
|
|
33
|
+
label,
|
|
34
|
+
detail,
|
|
35
|
+
errorLabel,
|
|
36
|
+
selected,
|
|
37
|
+
disabled,
|
|
38
|
+
landscape = false,
|
|
39
|
+
aspect,
|
|
40
|
+
onSelect,
|
|
41
|
+
}: {
|
|
42
|
+
src?: string;
|
|
43
|
+
pending?: boolean;
|
|
44
|
+
error?: boolean;
|
|
45
|
+
label: string;
|
|
46
|
+
detail?: string;
|
|
47
|
+
errorLabel: string;
|
|
48
|
+
selected: boolean;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
landscape?: boolean;
|
|
51
|
+
aspect?: 'square' | 'video' | 'poster' | 'logo';
|
|
52
|
+
onSelect: () => void;
|
|
53
|
+
}) {
|
|
54
|
+
return (
|
|
55
|
+
<button
|
|
56
|
+
{...tabbable}
|
|
57
|
+
type="button"
|
|
58
|
+
aria-label={label}
|
|
59
|
+
aria-pressed={selected}
|
|
60
|
+
disabled={disabled}
|
|
61
|
+
onClick={onSelect}
|
|
62
|
+
className={`group bg-base-100 focus-visible:outline-primary relative overflow-hidden rounded-lg border text-left transition-all focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50 ${selected ? 'border-primary ring-primary/20 ring-2' : 'border-base-300 hover:border-primary/50 hover:shadow-md'}`}
|
|
63
|
+
>
|
|
64
|
+
<Artwork
|
|
65
|
+
alt=""
|
|
66
|
+
aspect={aspect ?? (landscape ? 'video' : 'square')}
|
|
67
|
+
error={error}
|
|
68
|
+
errorLabel={errorLabel}
|
|
69
|
+
fallback={<Disc3Icon />}
|
|
70
|
+
pending={pending}
|
|
71
|
+
referrerPolicy="no-referrer"
|
|
72
|
+
showLoadingIndicator={false}
|
|
73
|
+
src={src}
|
|
74
|
+
/>
|
|
75
|
+
{selected ? (
|
|
76
|
+
<span
|
|
77
|
+
aria-hidden="true"
|
|
78
|
+
className="bg-primary text-primary-content absolute top-2 right-2 rounded-full p-1 shadow [&>svg]:size-4"
|
|
79
|
+
>
|
|
80
|
+
<CheckIcon />
|
|
81
|
+
</span>
|
|
82
|
+
) : null}
|
|
83
|
+
<span className="block truncate px-3 pt-2 text-xs font-medium">{label}</span>
|
|
84
|
+
<span className="text-base-600 block truncate px-3 pb-2 text-xs">{detail ?? '\u00a0'}</span>
|
|
85
|
+
</button>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function ImageUpload({
|
|
90
|
+
label,
|
|
91
|
+
hint,
|
|
92
|
+
disabled,
|
|
93
|
+
onFile,
|
|
94
|
+
}: {
|
|
95
|
+
label: string;
|
|
96
|
+
hint: string;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
onFile: (file: File) => void;
|
|
99
|
+
}) {
|
|
100
|
+
const [dragging, setDragging] = useState(false);
|
|
101
|
+
const input = useRef<HTMLInputElement>(null);
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<span
|
|
105
|
+
className={`inline-flex shrink-0 rounded-md whitespace-nowrap ${dragging ? 'ring-primary ring-2' : ''}`}
|
|
106
|
+
onDragOver={(event) => {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
|
|
109
|
+
if (!disabled) setDragging(true);
|
|
110
|
+
}}
|
|
111
|
+
onDragLeave={() => setDragging(false)}
|
|
112
|
+
onDrop={(event) => {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
setDragging(false);
|
|
115
|
+
|
|
116
|
+
const file = event.dataTransfer.files[0];
|
|
117
|
+
|
|
118
|
+
if (file && !disabled) onFile(file);
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
<input
|
|
122
|
+
ref={input}
|
|
123
|
+
type="file"
|
|
124
|
+
hidden
|
|
125
|
+
accept="image/jpeg,image/png,image/webp,image/gif"
|
|
126
|
+
aria-label={label}
|
|
127
|
+
disabled={disabled}
|
|
128
|
+
onChange={(event) => {
|
|
129
|
+
const file = event.target.files?.[0];
|
|
130
|
+
|
|
131
|
+
if (file) onFile(file);
|
|
132
|
+
|
|
133
|
+
event.target.value = '';
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
<Button
|
|
137
|
+
type="button"
|
|
138
|
+
disabled={disabled}
|
|
139
|
+
title={hint}
|
|
140
|
+
aria-description={hint}
|
|
141
|
+
leftIcon={<Disc3Icon />}
|
|
142
|
+
onClick={() => input.current?.click()}
|
|
143
|
+
variant="secondary"
|
|
144
|
+
>
|
|
145
|
+
{label}
|
|
146
|
+
</Button>
|
|
147
|
+
</span>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Alert } from '@ninna-ui/feedback';
|
|
2
|
+
import { ChevronRightIcon } from 'lucide-react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
import { Heading, Text } from '../typography/Typography';
|
|
6
|
+
|
|
7
|
+
interface InfoBoxProps {
|
|
8
|
+
description: string;
|
|
9
|
+
icon: ReactNode;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A prominent, actionable introduction that opens optional guidance.
|
|
16
|
+
* Use for a short teaser leading to a guide or other explanatory surface. Use Alert for current
|
|
17
|
+
* status, NoticeCard for content that needs examination or a decision, and InsetPanel for grouping.
|
|
18
|
+
*/
|
|
19
|
+
export function InfoBox({ description, icon, onClick, title }: InfoBoxProps) {
|
|
20
|
+
return (
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
onClick={onClick}
|
|
24
|
+
className="group border-primary/40 border-l-primary bg-primary/10 hover:bg-primary/15 focus-visible:outline-primary relative w-full cursor-pointer rounded-lg border border-l-4 text-left transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 motion-reduce:transition-none"
|
|
25
|
+
>
|
|
26
|
+
<Alert
|
|
27
|
+
role="presentation"
|
|
28
|
+
aria-live="off"
|
|
29
|
+
color="primary"
|
|
30
|
+
size="md"
|
|
31
|
+
icon={icon}
|
|
32
|
+
title={
|
|
33
|
+
<Heading as="h3" variant="label">
|
|
34
|
+
{title}
|
|
35
|
+
</Heading>
|
|
36
|
+
}
|
|
37
|
+
description={<Text tone="muted">{description}</Text>}
|
|
38
|
+
className="text-primary [&_[data-slot=icon]]:bg-primary/15 bg-transparent pr-12 [&_[data-slot=icon]]:mt-0 [&_[data-slot=icon]]:flex [&_[data-slot=icon]]:size-9 [&_[data-slot=icon]]:items-center [&_[data-slot=icon]]:justify-center [&_[data-slot=icon]]:rounded-lg [&_[data-slot=icon]>svg]:size-5"
|
|
39
|
+
/>
|
|
40
|
+
<span
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
className="text-primary absolute inset-y-0 right-4 flex items-center transition-transform group-hover:translate-x-0.5 motion-reduce:transition-none [&>svg]:size-5"
|
|
43
|
+
>
|
|
44
|
+
<ChevronRightIcon />
|
|
45
|
+
</span>
|
|
46
|
+
</button>
|
|
47
|
+
);
|
|
48
|
+
}
|