@lar-works/design-system 0.2.0 → 0.3.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 +5 -1
- package/dist/actions/Button.d.ts +39 -1
- package/dist/actions/Button.js +39 -9
- package/dist/actions/Button.js.map +1 -1
- package/dist/actions/ButtonLink.d.ts +5 -1
- package/dist/actions/ButtonLink.js +28 -2
- package/dist/actions/ButtonLink.js.map +1 -1
- package/dist/actions/ButtonRecipes.js +7 -0
- package/dist/actions/ButtonRecipes.js.map +1 -0
- package/dist/actions/IconButton.d.ts +2 -2
- package/dist/actions/IconButton.js +1 -1
- package/dist/actions/IconButton.js.map +1 -1
- package/dist/actions/ThemeSwitch.js +1 -1
- package/dist/board/ActivityLine.d.ts +36 -0
- package/dist/board/ActivityLine.js +144 -0
- package/dist/board/ActivityLine.js.map +1 -0
- package/dist/board/ActivityTrack.d.ts +11 -0
- package/dist/board/ActivityTrack.js +25 -0
- package/dist/board/ActivityTrack.js.map +1 -0
- package/dist/board/AddItem.d.ts +82 -0
- package/dist/board/AddItem.js +185 -0
- package/dist/board/AddItem.js.map +1 -0
- package/dist/board/Archive.d.ts +21 -0
- package/dist/board/Archive.js +63 -0
- package/dist/board/Archive.js.map +1 -0
- package/dist/board/Attention.d.ts +66 -0
- package/dist/board/Attention.js +122 -0
- package/dist/board/Attention.js.map +1 -0
- package/dist/board/BoardShell.d.ts +16 -0
- package/dist/board/BoardShell.js +35 -0
- package/dist/board/BoardShell.js.map +1 -0
- package/dist/board/BoardTitleBar.d.ts +50 -0
- package/dist/board/BoardTitleBar.js +125 -0
- package/dist/board/BoardTitleBar.js.map +1 -0
- package/dist/board/ButtonKinds.d.ts +24 -0
- package/dist/board/ButtonKinds.js +19 -0
- package/dist/board/ButtonKinds.js.map +1 -0
- package/dist/board/Cleanup.d.ts +8 -0
- package/dist/board/Cleanup.js +15 -0
- package/dist/board/Cleanup.js.map +1 -0
- package/dist/board/Counters.d.ts +101 -0
- package/dist/board/Counters.js +202 -0
- package/dist/board/Counters.js.map +1 -0
- package/dist/board/DataAttributes.d.ts +6 -0
- package/dist/board/Dependencies.d.ts +17 -0
- package/dist/board/Dependencies.js +44 -0
- package/dist/board/Dependencies.js.map +1 -0
- package/dist/board/Desk.d.ts +52 -0
- package/dist/board/Desk.js +130 -0
- package/dist/board/Desk.js.map +1 -0
- package/dist/board/Dossier.d.ts +100 -0
- package/dist/board/Dossier.js +194 -0
- package/dist/board/Dossier.js.map +1 -0
- package/dist/board/Filters.d.ts +33 -0
- package/dist/board/Filters.js +64 -0
- package/dist/board/Filters.js.map +1 -0
- package/dist/board/ItemDetails.d.ts +167 -0
- package/dist/board/ItemDetails.js +339 -0
- package/dist/board/ItemDetails.js.map +1 -0
- package/dist/board/ItemDialog.d.ts +73 -0
- package/dist/board/ItemDialog.js +140 -0
- package/dist/board/ItemDialog.js.map +1 -0
- package/dist/board/ItemParts.d.ts +42 -0
- package/dist/board/ItemParts.js +82 -0
- package/dist/board/ItemParts.js.map +1 -0
- package/dist/board/ItemProgress.d.ts +56 -0
- package/dist/board/ItemProgress.js +138 -0
- package/dist/board/ItemProgress.js.map +1 -0
- package/dist/board/List.d.ts +65 -0
- package/dist/board/List.js +118 -0
- package/dist/board/List.js.map +1 -0
- package/dist/board/LoadingScreen.d.ts +38 -0
- package/dist/board/LoadingScreen.js +74 -0
- package/dist/board/LoadingScreen.js.map +1 -0
- package/dist/board/NeedsYou.d.ts +13 -0
- package/dist/board/NeedsYou.js +31 -0
- package/dist/board/NeedsYou.js.map +1 -0
- package/dist/board/Onboarding.d.ts +53 -0
- package/dist/board/Onboarding.js +122 -0
- package/dist/board/Onboarding.js.map +1 -0
- package/dist/board/PartsList.d.ts +60 -0
- package/dist/board/PartsList.js +115 -0
- package/dist/board/PartsList.js.map +1 -0
- package/dist/board/ProjectIcon.d.ts +51 -0
- package/dist/board/ProjectIcon.js +120 -0
- package/dist/board/ProjectIcon.js.map +1 -0
- package/dist/board/PullRequests.d.ts +43 -0
- package/dist/board/PullRequests.js +83 -0
- package/dist/board/PullRequests.js.map +1 -0
- package/dist/board/RowStyles.js +14 -0
- package/dist/board/RowStyles.js.map +1 -0
- package/dist/board/Settings.d.ts +54 -0
- package/dist/board/Settings.js +112 -0
- package/dist/board/Settings.js.map +1 -0
- package/dist/board/Slices.d.ts +32 -0
- package/dist/board/Slices.js +88 -0
- package/dist/board/Slices.js.map +1 -0
- package/dist/board/SourceIcon.d.ts +12 -0
- package/dist/board/SourceIcon.js +24 -0
- package/dist/board/SourceIcon.js.map +1 -0
- package/dist/board/StagePane.d.ts +43 -0
- package/dist/board/StagePane.js +97 -0
- package/dist/board/StagePane.js.map +1 -0
- package/dist/board/StageRow.d.ts +141 -0
- package/dist/board/StageRow.js +287 -0
- package/dist/board/StageRow.js.map +1 -0
- package/dist/board/StageTrack.d.ts +18 -0
- package/dist/board/StageTrack.js +38 -0
- package/dist/board/StageTrack.js.map +1 -0
- package/dist/board/StartControls.d.ts +30 -0
- package/dist/board/StartControls.js +51 -0
- package/dist/board/StartControls.js.map +1 -0
- package/dist/board/StatusColors.d.ts +5 -0
- package/dist/board/StatusColors.js +17 -0
- package/dist/board/StatusColors.js.map +1 -0
- package/dist/board/StatusGlyph.d.ts +18 -0
- package/dist/board/StatusGlyph.js +51 -0
- package/dist/board/StatusGlyph.js.map +1 -0
- package/dist/board/Threads.d.ts +13 -0
- package/dist/board/Threads.js +35 -0
- package/dist/board/Threads.js.map +1 -0
- package/dist/board/TrackerLabels.d.ts +27 -0
- package/dist/board/TrackerLabels.js +56 -0
- package/dist/board/TrackerLabels.js.map +1 -0
- package/dist/board/UpdatePill.d.ts +52 -0
- package/dist/board/UpdatePill.js +188 -0
- package/dist/board/UpdatePill.js.map +1 -0
- package/dist/board/Vocabulary.d.ts +56 -0
- package/dist/board/Vocabulary.js +104 -0
- package/dist/board/Vocabulary.js.map +1 -0
- package/dist/board/Warnings.d.ts +35 -0
- package/dist/board/Warnings.js +85 -0
- package/dist/board/Warnings.js.map +1 -0
- package/dist/board/WorkMap.d.ts +136 -0
- package/dist/board/WorkMap.js +274 -0
- package/dist/board/WorkMap.js.map +1 -0
- package/dist/board/index.d.ts +42 -0
- package/dist/collections/CollectionState.d.ts +10 -1
- package/dist/collections/CollectionState.js +12 -5
- package/dist/collections/CollectionState.js.map +1 -1
- package/dist/collections/ResultList.js +1 -1
- package/dist/collections/ScrollRow.js +1 -1
- package/dist/collections/VirtualList.js +1 -1
- package/dist/display/Avatar.d.ts +5 -2
- package/dist/display/Avatar.js +2 -2
- package/dist/display/Avatar.js.map +1 -1
- package/dist/display/Badge.d.ts +6 -1
- package/dist/display/Badge.js +9 -4
- package/dist/display/Badge.js.map +1 -1
- package/dist/display/CheckList.js +1 -1
- package/dist/display/Comment.d.ts +12 -0
- package/dist/display/Comment.js +39 -0
- package/dist/display/Comment.js.map +1 -0
- package/dist/display/CopyButton.d.ts +10 -2
- package/dist/display/CopyButton.js +29 -16
- package/dist/display/CopyButton.js.map +1 -1
- package/dist/display/Diagram.d.ts +17 -0
- package/dist/display/Diagram.js +49 -0
- package/dist/display/Diagram.js.map +1 -0
- package/dist/display/ImagePicker.js +1 -1
- package/dist/display/InfoBox.js +2 -2
- package/dist/display/InsetPanel.d.ts +3 -1
- package/dist/display/InsetPanel.js +7 -4
- package/dist/display/InsetPanel.js.map +1 -1
- package/dist/display/ItemAction.js +2 -2
- package/dist/display/LabelChip.d.ts +26 -0
- package/dist/display/LabelChip.js +41 -0
- package/dist/display/LabelChip.js.map +1 -0
- package/dist/display/LabelTint.js +60 -0
- package/dist/display/LabelTint.js.map +1 -0
- package/dist/display/Person.d.ts +5 -0
- package/dist/display/Person.js +19 -0
- package/dist/display/Person.js.map +1 -0
- package/dist/display/PropertySheet.js +1 -1
- package/dist/display/RadioChoice.d.ts +9 -2
- package/dist/display/RadioChoice.js +5 -1
- package/dist/display/RadioChoice.js.map +1 -1
- package/dist/display/RatingLink.js +1 -1
- package/dist/display/RichText.d.ts +12 -0
- package/dist/display/RichText.js +94 -0
- package/dist/display/RichText.js.map +1 -0
- package/dist/display/RowList.js +1 -1
- package/dist/display/index.d.ts +6 -1
- package/dist/feedback/Alert.js +1 -1
- package/dist/feedback/AsyncState.js +1 -1
- package/dist/feedback/DismissButton.d.ts +12 -0
- package/dist/feedback/DismissButton.js +20 -0
- package/dist/feedback/DismissButton.js.map +1 -0
- package/dist/feedback/ErrorNotification.js +2 -0
- package/dist/feedback/ErrorNotification.js.map +1 -1
- package/dist/feedback/FormResult.d.ts +16 -0
- package/dist/feedback/FormResult.js +30 -0
- package/dist/feedback/FormResult.js.map +1 -0
- package/dist/feedback/LiveRegion.d.ts +7 -0
- package/dist/feedback/LiveRegion.js +15 -0
- package/dist/feedback/LiveRegion.js.map +1 -0
- package/dist/feedback/Loading.d.ts +19 -0
- package/dist/feedback/Loading.js +63 -0
- package/dist/feedback/Loading.js.map +1 -0
- package/dist/feedback/Notifications.d.ts +35 -1
- package/dist/feedback/Notifications.js +196 -4
- package/dist/feedback/Notifications.js.map +1 -1
- package/dist/feedback/Progress.d.ts +15 -0
- package/dist/feedback/Progress.js +38 -0
- package/dist/feedback/Progress.js.map +1 -0
- package/dist/feedback/ProgressStatusRow.js +1 -1
- package/dist/feedback/StatusIndicator.d.ts +6 -1
- package/dist/feedback/StatusIndicator.js +19 -5
- package/dist/feedback/StatusIndicator.js.map +1 -1
- package/dist/feedback/index.d.ts +8 -4
- package/dist/forms/Checkbox.js +1 -1
- package/dist/forms/ColorSwatches.d.ts +21 -0
- package/dist/forms/ColorSwatches.js +26 -0
- package/dist/forms/ColorSwatches.js.map +1 -0
- package/dist/forms/FormSection.d.ts +68 -6
- package/dist/forms/FormSection.js +139 -8
- package/dist/forms/FormSection.js.map +1 -1
- package/dist/forms/HiddenField.d.ts +6 -0
- package/dist/forms/HiddenField.js +13 -0
- package/dist/forms/HiddenField.js.map +1 -0
- package/dist/forms/Input.d.ts +12 -2
- package/dist/forms/Input.js +10 -3
- package/dist/forms/Input.js.map +1 -1
- package/dist/forms/LabelPicker.d.ts +43 -0
- package/dist/forms/LabelPicker.js +107 -0
- package/dist/forms/LabelPicker.js.map +1 -0
- package/dist/forms/MarkdownEditor.d.ts +21 -0
- package/dist/forms/MarkdownEditor.js +175 -0
- package/dist/forms/MarkdownEditor.js.map +1 -0
- package/dist/forms/MarkdownToolbar.js +204 -0
- package/dist/forms/MarkdownToolbar.js.map +1 -0
- package/dist/forms/OptionSelect.d.ts +30 -9
- package/dist/forms/OptionSelect.js +53 -13
- package/dist/forms/OptionSelect.js.map +1 -1
- package/dist/forms/Select.d.ts +4 -1
- package/dist/forms/Select.js +3 -1
- package/dist/forms/Select.js.map +1 -1
- package/dist/forms/Switch.d.ts +4 -1
- package/dist/forms/Switch.js +5 -2
- package/dist/forms/Switch.js.map +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/index.d.ts +7 -3
- package/dist/foundations/AmbientMotion.d.ts +2 -0
- package/dist/foundations/AmbientMotion.js +39 -0
- package/dist/foundations/AmbientMotion.js.map +1 -0
- package/dist/foundations/DesignSystemProvider.d.ts +34 -0
- package/dist/foundations/DesignSystemProvider.js +26 -1
- package/dist/foundations/DesignSystemProvider.js.map +1 -1
- package/dist/foundations/index.d.ts +2 -1
- package/dist/icons/BrandIcons.d.ts +8 -2
- package/dist/icons/BrandIcons.js +14 -3
- package/dist/icons/BrandIcons.js.map +1 -1
- package/dist/icons/dynamic.d.ts +2 -0
- package/dist/icons/dynamic.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +71 -10
- package/dist/index.js +78 -21
- package/dist/layout/Site.js +1 -1
- package/dist/layout/TitleBar.js +1 -1
- package/dist/layout/index.d.ts +2 -2
- package/dist/layout/index.js +3 -3
- package/dist/layout/toolbar/CommandPaletteTrigger.d.ts +17 -2
- package/dist/layout/toolbar/CommandPaletteTrigger.js +89 -6
- package/dist/layout/toolbar/CommandPaletteTrigger.js.map +1 -1
- package/dist/layout/toolbar/TriggerFit.js +56 -0
- package/dist/layout/toolbar/TriggerFit.js.map +1 -0
- package/dist/navigation/CollectionBrowseSelector.js +1 -1
- package/dist/navigation/CollectionViewToggle.d.ts +26 -0
- package/dist/navigation/CollectionViewToggle.js +54 -23
- package/dist/navigation/CollectionViewToggle.js.map +1 -1
- package/dist/navigation/DrilldownBrowseSelector.js +1 -1
- package/dist/navigation/FolderSelector.js +2 -2
- package/dist/navigation/SortMenu.d.ts +10 -0
- package/dist/navigation/SortMenu.js +33 -0
- package/dist/navigation/SortMenu.js.map +1 -0
- package/dist/navigation/index.d.ts +3 -2
- package/dist/overlays/CommandPalette.d.ts +38 -4
- package/dist/overlays/CommandPalette.js +140 -54
- package/dist/overlays/CommandPalette.js.map +1 -1
- package/dist/overlays/Drawer.js +1 -1
- package/dist/overlays/DropdownMenu.d.ts +7 -1
- package/dist/overlays/DropdownMenu.js +13 -2
- package/dist/overlays/DropdownMenu.js.map +1 -1
- package/dist/overlays/HelpTip.d.ts +8 -0
- package/dist/overlays/HelpTip.js +29 -0
- package/dist/overlays/HelpTip.js.map +1 -0
- package/dist/overlays/ImageViewer.js +2 -2
- package/dist/overlays/Modal.d.ts +5 -0
- package/dist/overlays/Modal.js +17 -2
- package/dist/overlays/Modal.js.map +1 -1
- package/dist/overlays/ModalExpandButton.d.ts +18 -0
- package/dist/overlays/ModalExpandButton.js +43 -0
- package/dist/overlays/ModalExpandButton.js.map +1 -0
- package/dist/overlays/Popover.d.ts +2 -1
- package/dist/overlays/Popover.js +1 -0
- package/dist/overlays/Popover.js.map +1 -1
- package/dist/overlays/index.d.ts +4 -2
- package/dist/showcase/Cards.js +1 -1
- package/dist/showcase/FeatureRow.js +1 -1
- package/dist/showcase/PhotoSearchConcept.js +1 -1
- package/dist/showcase/ProductBand.js +1 -1
- package/dist/showcase/Status.js +1 -1
- package/dist/typography/Code.d.ts +18 -0
- package/dist/typography/Code.js +24 -0
- package/dist/typography/Code.js.map +1 -0
- package/dist/typography/Link.d.ts +7 -2
- package/dist/typography/Link.js +15 -5
- package/dist/typography/Link.js.map +1 -1
- package/dist/typography/Typography.d.ts +19 -1
- package/dist/typography/Typography.js +11 -3
- package/dist/typography/Typography.js.map +1 -1
- package/dist/typography/index.d.ts +3 -3
- package/package.json +26 -3
- package/src/actions/Button.tsx +78 -11
- package/src/actions/ButtonLink.tsx +34 -0
- package/src/actions/ButtonRecipes.ts +10 -0
- package/src/actions/IconButton.tsx +7 -4
- package/src/board/ActivityLine.tsx +176 -0
- package/src/board/ActivityTrack.tsx +23 -0
- package/src/board/AddItem.tsx +259 -0
- package/src/board/Archive.tsx +75 -0
- package/src/board/Attention.tsx +135 -0
- package/src/board/BoardShell.tsx +30 -0
- package/src/board/BoardTitleBar.tsx +167 -0
- package/src/board/ButtonKinds.ts +32 -0
- package/src/board/Cleanup.tsx +19 -0
- package/src/board/Counters.tsx +224 -0
- package/src/board/DataAttributes.ts +3 -0
- package/src/board/Dependencies.tsx +49 -0
- package/src/board/Desk.tsx +155 -0
- package/src/board/Dossier.tsx +262 -0
- package/src/board/Filters.tsx +85 -0
- package/src/board/ItemDetails.tsx +435 -0
- package/src/board/ItemDialog.tsx +179 -0
- package/src/board/ItemParts.tsx +128 -0
- package/src/board/ItemProgress.tsx +164 -0
- package/src/board/List.tsx +154 -0
- package/src/board/LoadingScreen.tsx +78 -0
- package/src/board/NeedsYou.tsx +30 -0
- package/src/board/Onboarding.tsx +124 -0
- package/src/board/PartsList.tsx +160 -0
- package/src/board/ProjectIcon.tsx +172 -0
- package/src/board/PullRequests.tsx +106 -0
- package/src/board/RowStyles.ts +17 -0
- package/src/board/Settings.tsx +124 -0
- package/src/board/Slices.tsx +103 -0
- package/src/board/SourceIcon.tsx +33 -0
- package/src/board/StagePane.tsx +128 -0
- package/src/board/StageRow.tsx +320 -0
- package/src/board/StageTrack.tsx +61 -0
- package/src/board/StartControls.tsx +77 -0
- package/src/board/StatusColors.ts +28 -0
- package/src/board/StatusGlyph.tsx +70 -0
- package/src/board/Threads.tsx +38 -0
- package/src/board/TrackerLabels.tsx +75 -0
- package/src/board/UpdatePill.tsx +222 -0
- package/src/board/Vocabulary.tsx +155 -0
- package/src/board/Warnings.tsx +83 -0
- package/src/board/WorkMap.tsx +436 -0
- package/src/board/base.css +121 -0
- package/src/board/button-kinds.css +8 -0
- package/src/board/index.ts +224 -0
- package/src/board/items.css +75 -0
- package/src/board/loading-screen.css +171 -0
- package/src/board/rows.css +180 -0
- package/src/board/title-bar.css +56 -0
- package/src/board/tokens.css +52 -0
- package/src/board.css +19 -0
- package/src/collections/CollectionState.tsx +20 -7
- package/src/display/Avatar.tsx +6 -3
- package/src/display/Badge.tsx +25 -3
- package/src/display/Comment.tsx +26 -0
- package/src/display/CopyButton.tsx +48 -18
- package/src/display/Diagram.tsx +59 -0
- package/src/display/InsetPanel.tsx +4 -1
- package/src/display/LabelChip.tsx +73 -0
- package/src/display/LabelTint.ts +72 -0
- package/src/display/Person.tsx +11 -0
- package/src/display/RadioChoice.tsx +11 -2
- package/src/display/RichText.tsx +114 -0
- package/src/display/index.ts +5 -0
- package/src/feedback/DismissButton.tsx +28 -0
- package/src/feedback/ErrorNotification.ts +3 -0
- package/src/feedback/FormResult.tsx +50 -0
- package/src/feedback/LiveRegion.tsx +10 -0
- package/src/feedback/Loading.tsx +75 -0
- package/src/feedback/Notifications.tsx +267 -2
- package/src/feedback/Progress.tsx +44 -0
- package/src/feedback/StatusIndicator.tsx +34 -3
- package/src/feedback/index.ts +12 -2
- package/src/forms/ColorSwatches.tsx +50 -0
- package/src/forms/FormSection.tsx +245 -10
- package/src/forms/HiddenField.tsx +4 -0
- package/src/forms/Input.tsx +26 -4
- package/src/forms/LabelPicker.tsx +140 -0
- package/src/forms/MarkdownEditor.tsx +283 -0
- package/src/forms/MarkdownToolbar.tsx +267 -0
- package/src/forms/OptionSelect.tsx +110 -25
- package/src/forms/Select.tsx +20 -13
- package/src/forms/Switch.tsx +16 -2
- package/src/forms/index.ts +16 -2
- package/src/foundations/AmbientMotion.ts +51 -0
- package/src/foundations/DesignSystemProvider.tsx +19 -0
- package/src/foundations/index.ts +1 -0
- package/src/foundations/theme.css +64 -0
- package/src/icons/BrandIcons.tsx +12 -3
- package/src/icons/dynamic.ts +4 -0
- package/src/icons/index.ts +1 -1
- package/src/index.ts +2 -1
- package/src/layout/index.ts +1 -1
- package/src/layout/toolbar/CommandPaletteTrigger.tsx +187 -31
- package/src/layout/toolbar/TriggerFit.ts +84 -0
- package/src/navigation/CollectionViewToggle.tsx +94 -24
- package/src/navigation/SortMenu.tsx +41 -0
- package/src/navigation/index.ts +2 -1
- package/src/overlays/CommandPalette.tsx +190 -60
- package/src/overlays/DropdownMenu.tsx +12 -1
- package/src/overlays/HelpTip.tsx +29 -0
- package/src/overlays/Modal.tsx +23 -0
- package/src/overlays/ModalExpandButton.tsx +48 -0
- package/src/overlays/Popover.tsx +3 -1
- package/src/overlays/index.ts +9 -1
- package/src/showcase.css +6 -0
- package/src/styles.css +9 -1
- package/src/typography/Code.tsx +24 -0
- package/src/typography/Link.tsx +19 -10
- package/src/typography/Typography.tsx +25 -2
- package/src/typography/index.ts +1 -1
- package/dist/feedback/index.js +0 -11
- package/dist/typography/index.js +0 -4
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { Badge } from "../display/Badge.js";
|
|
2
|
+
import { Loading } from "../feedback/Loading.js";
|
|
3
|
+
import { ROW_ACTION, ROW_OPENS, ROW_RULE, pickedRow } from "./RowStyles.js";
|
|
4
|
+
import { ChevronDownIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/board/StageRow.tsx
|
|
7
|
+
/** A stage row: `item` names it as `data-item`, and `picked` marks the item the dialog shows. */
|
|
8
|
+
function StageRowItem({ item, picked, children }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("li", {
|
|
10
|
+
"data-item": item,
|
|
11
|
+
className: `@container py-2 ${ROW_RULE} hover:bg-(--accent) ${pickedRow(picked)}`,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/** A row's first line: its cells, then its side. */
|
|
16
|
+
function RowFirst({ children }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("div", {
|
|
18
|
+
className: "row-first",
|
|
19
|
+
children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** A row's first line's cells as the one button that opens its item. */
|
|
23
|
+
function RowOpen({ onOpen, children }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
"data-row-open": true,
|
|
27
|
+
"data-meta": true,
|
|
28
|
+
onClick: onOpen,
|
|
29
|
+
className: `row-cols ${ROW_OPENS}`,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** A row's first line's cells, when its title opens the item and the rest of the line does something else. */
|
|
34
|
+
function RowCells({ children }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: "row-cols",
|
|
37
|
+
children
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** The first cell: the item's status glyph. */
|
|
41
|
+
function RowGlyph({ children }) {
|
|
42
|
+
return /* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "grid size-6 place-items-center",
|
|
44
|
+
"data-glyph": true,
|
|
45
|
+
children
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** The first cell of a Queue row: its place in the Queue. */
|
|
49
|
+
function QueuePlace({ children }) {
|
|
50
|
+
return /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "queue-n text-center font-medium tabular-nums",
|
|
52
|
+
children
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/** Where the item's ticket is saved and its repository, in the source cell. */
|
|
56
|
+
function RowIdentity({ children }) {
|
|
57
|
+
return /* @__PURE__ */ jsx("span", {
|
|
58
|
+
"data-row-identity": true,
|
|
59
|
+
className: "flex min-w-0 items-center gap-1.5 text-[11px] text-(--muted-foreground)",
|
|
60
|
+
children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** The kind cell. */
|
|
64
|
+
function RowKindCell({ children }) {
|
|
65
|
+
return /* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "flex min-w-0 items-center",
|
|
67
|
+
"data-kind": true,
|
|
68
|
+
children
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/** The title cell: the RowTitle and what it is part of. */
|
|
72
|
+
function RowTitleCell({ children }) {
|
|
73
|
+
return /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "flex min-w-0 items-center gap-2",
|
|
75
|
+
"data-title-cell": true,
|
|
76
|
+
children
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/** The row's title, truncating; `name` gives it whole. */
|
|
80
|
+
function RowTitle({ name, children }) {
|
|
81
|
+
return /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "min-w-0 truncate text-sm leading-7 font-medium text-(--foreground)",
|
|
83
|
+
title: name,
|
|
84
|
+
"data-title": true,
|
|
85
|
+
children
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** After the title: which concept or parent the row's work belongs to, giving its room up first. */
|
|
89
|
+
function RowPartOf({ children }) {
|
|
90
|
+
return /* @__PURE__ */ jsx("span", {
|
|
91
|
+
"data-concept": true,
|
|
92
|
+
title: children,
|
|
93
|
+
className: "max-w-44 min-w-16 shrink-[100] truncate rounded bg-(--muted) px-1.5 text-(--muted-foreground)",
|
|
94
|
+
children
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/** The state cell, which `clips` what overflows it unless what it holds keeps its own width. */
|
|
98
|
+
function RowStateCell({ clips = true, children }) {
|
|
99
|
+
return /* @__PURE__ */ jsx("span", {
|
|
100
|
+
className: `flex min-w-0 items-center gap-1.5${clips ? " overflow-hidden" : ""}`,
|
|
101
|
+
"data-col": "state",
|
|
102
|
+
children
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** The row's state in words; `title` says more. */
|
|
106
|
+
function RowState({ title, children }) {
|
|
107
|
+
return /* @__PURE__ */ jsx("span", {
|
|
108
|
+
className: "max-w-full shrink-0 truncate",
|
|
109
|
+
title,
|
|
110
|
+
"data-state": true,
|
|
111
|
+
children
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** A Queue row's state: how long it has waited. */
|
|
115
|
+
function QueueAge({ children }) {
|
|
116
|
+
return /* @__PURE__ */ jsx("span", {
|
|
117
|
+
className: "queue-age shrink-0 tabular-nums",
|
|
118
|
+
"data-state": true,
|
|
119
|
+
children
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/** The row's action slot, at its right. With `passEmpty`, clicks on its controls stay there, and a click beside them
|
|
123
|
+
* reaches the row. */
|
|
124
|
+
function RowSide({ passEmpty = false, children }) {
|
|
125
|
+
if (!passEmpty) return /* @__PURE__ */ jsx("span", {
|
|
126
|
+
"data-col": "side",
|
|
127
|
+
className: `row-side ${ROW_ACTION}`,
|
|
128
|
+
children
|
|
129
|
+
});
|
|
130
|
+
return /* @__PURE__ */ jsx("span", {
|
|
131
|
+
"data-col": "side",
|
|
132
|
+
className: "row-side",
|
|
133
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
134
|
+
className: ROW_ACTION,
|
|
135
|
+
onClick: (event) => {
|
|
136
|
+
if (event.target !== event.currentTarget) event.stopPropagation();
|
|
137
|
+
},
|
|
138
|
+
children
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/** Where to act on an item that waits on you, in its action slot. */
|
|
143
|
+
function OnYourDesk({ children }) {
|
|
144
|
+
return /* @__PURE__ */ jsx("span", {
|
|
145
|
+
className: "text-(--warning-foreground)",
|
|
146
|
+
children
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/** A row's second line: `bar` and `count` on the left, `children` in its text slot, then its pull requests and
|
|
150
|
+
* figures. A click on it beside its controls goes to `onClick`. */
|
|
151
|
+
function RowSecondLine({ bar, count, prs, figures, onClick, children }) {
|
|
152
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
153
|
+
"data-progress": true,
|
|
154
|
+
onClick,
|
|
155
|
+
className: `row-second ${onClick ? "cursor-pointer" : ""}`,
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx("span", {
|
|
158
|
+
"data-col": "bar",
|
|
159
|
+
className: "min-w-0",
|
|
160
|
+
children: bar
|
|
161
|
+
}),
|
|
162
|
+
count || /* @__PURE__ */ jsx("span", { "data-col": "count" }),
|
|
163
|
+
/* @__PURE__ */ jsx("span", {
|
|
164
|
+
"data-col": "next",
|
|
165
|
+
className: "flex min-w-0 items-center gap-3",
|
|
166
|
+
children
|
|
167
|
+
}),
|
|
168
|
+
/* @__PURE__ */ jsx("span", {
|
|
169
|
+
"data-col": "pr",
|
|
170
|
+
className: "flex min-w-0 gap-2 overflow-hidden tabular-nums",
|
|
171
|
+
children: prs
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx("span", {
|
|
174
|
+
"data-col": "figures",
|
|
175
|
+
children: figures
|
|
176
|
+
})
|
|
177
|
+
]
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** The second line's count, such as `2/5 parts`. */
|
|
181
|
+
function RowCount({ title, children }) {
|
|
182
|
+
return /* @__PURE__ */ jsx("span", {
|
|
183
|
+
"data-col": "count",
|
|
184
|
+
className: "tabular-nums",
|
|
185
|
+
title,
|
|
186
|
+
children
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/** The second line's slice count as a button that unfolds the row's slices under it. */
|
|
190
|
+
function RowSliceToggle({ open, label, onToggle, children }) {
|
|
191
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
192
|
+
type: "button",
|
|
193
|
+
"aria-expanded": open,
|
|
194
|
+
"aria-label": label,
|
|
195
|
+
onClick: onToggle,
|
|
196
|
+
"data-col": "count",
|
|
197
|
+
className: `flex h-4 items-center gap-1 justify-self-start rounded tabular-nums hover:text-(--foreground) ${ROW_OPENS}`,
|
|
198
|
+
children: [children, open ? /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3" }) : /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3" })]
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/** Why the row is blocked, as a danger badge in its second line that truncates. */
|
|
202
|
+
function RowBlocked({ children }) {
|
|
203
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
204
|
+
tone: "danger",
|
|
205
|
+
className: "min-w-0",
|
|
206
|
+
title: children,
|
|
207
|
+
"data-blocked": true,
|
|
208
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
209
|
+
className: "truncate",
|
|
210
|
+
children
|
|
211
|
+
})
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
const SLICE_TONE = {
|
|
215
|
+
blocked: "text-(--st-review)",
|
|
216
|
+
active: "text-(--st-now)"
|
|
217
|
+
};
|
|
218
|
+
/** The second line's word on the row's slices: its first blocked or active slice, `more` after it, and anything `after`
|
|
219
|
+
* that (such as that every slice is implemented); `title` lists them all. */
|
|
220
|
+
function RowSliceNote({ title, first, more, after }) {
|
|
221
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
222
|
+
"data-note": true,
|
|
223
|
+
className: "min-w-0 truncate",
|
|
224
|
+
title,
|
|
225
|
+
children: [first && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
226
|
+
/* @__PURE__ */ jsx("span", {
|
|
227
|
+
className: `font-medium ${SLICE_TONE[first.tone]}`,
|
|
228
|
+
children: first.word
|
|
229
|
+
}),
|
|
230
|
+
" ",
|
|
231
|
+
/* @__PURE__ */ jsx("span", {
|
|
232
|
+
className: "text-(--foreground)",
|
|
233
|
+
children: first.title
|
|
234
|
+
}),
|
|
235
|
+
more
|
|
236
|
+
] }), after && /* @__PURE__ */ jsx("span", { children: after })]
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/** Under a row: Start's message or error and what Auto-build says of it, taking no room when empty. */
|
|
240
|
+
function RowFoot({ children }) {
|
|
241
|
+
return /* @__PURE__ */ jsx("div", {
|
|
242
|
+
className: "pt-1 pr-3 pl-12 empty:hidden",
|
|
243
|
+
children
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/** Under a row: its unfolded slices. */
|
|
247
|
+
function RowSlices({ children }) {
|
|
248
|
+
return /* @__PURE__ */ jsx("div", {
|
|
249
|
+
className: "pt-1 pr-3 pl-10",
|
|
250
|
+
"data-slices": true,
|
|
251
|
+
children
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** The agent figures on one line, at the row's right: `text`, ending in a + when `partial`, or `incomplete` when there
|
|
255
|
+
* are no figures to show; while `updating`, a spinner named by it leads them. A row that stops animating keeps its
|
|
256
|
+
* spinner `still`. */
|
|
257
|
+
function UsageFigures({ title, text, updating, still = false, partial, incomplete }) {
|
|
258
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
259
|
+
className: "flex min-w-0 items-center justify-end gap-1 text-(--muted-foreground) tabular-nums",
|
|
260
|
+
title,
|
|
261
|
+
children: [
|
|
262
|
+
updating && /* @__PURE__ */ jsx(Loading, {
|
|
263
|
+
presentation: "inline",
|
|
264
|
+
title: updating,
|
|
265
|
+
still
|
|
266
|
+
}),
|
|
267
|
+
text && /* @__PURE__ */ jsx("span", {
|
|
268
|
+
className: "truncate",
|
|
269
|
+
children: text
|
|
270
|
+
}),
|
|
271
|
+
text ? partial && /* @__PURE__ */ jsxs("span", {
|
|
272
|
+
className: "-ml-1 shrink-0",
|
|
273
|
+
"data-partial": true,
|
|
274
|
+
children: ["+", /* @__PURE__ */ jsxs("span", {
|
|
275
|
+
className: "sr-only",
|
|
276
|
+
children: [" ", partial]
|
|
277
|
+
})]
|
|
278
|
+
}) : incomplete && /* @__PURE__ */ jsx("span", {
|
|
279
|
+
className: "shrink-0",
|
|
280
|
+
children: incomplete
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
export { OnYourDesk, QueueAge, QueuePlace, RowBlocked, RowCells, RowCount, RowFirst, RowFoot, RowGlyph, RowIdentity, RowKindCell, RowOpen, RowPartOf, RowSecondLine, RowSide, RowSliceNote, RowSliceToggle, RowSlices, RowState, RowStateCell, RowTitle, RowTitleCell, StageRowItem, UsageFigures };
|
|
286
|
+
|
|
287
|
+
//# sourceMappingURL=StageRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageRow.js","names":[],"sources":["../../src/board/StageRow.tsx"],"sourcesContent":["// The board's one work row (board/rows.css), in Queue, Shaping, Ready to build, Build and Concepts and linked work: a\n// first line in columns that line up down the whole board, one button that opens the item's details with the row's\n// action beside it, and under it a second line on the same columns.\n\nimport { ChevronDownIcon, ChevronRightIcon } from 'lucide-react';\nimport type { MouseEvent, ReactNode } from 'react';\n\nimport { Badge } from '../display/Badge';\nimport { Loading } from '../feedback/Loading';\nimport { pickedRow, ROW_ACTION, ROW_OPENS, ROW_RULE } from './RowStyles';\n\n/** A stage row: `item` names it as `data-item`, and `picked` marks the item the dialog shows. */\nexport function StageRowItem({ item, picked, children }: { item: string; picked: boolean; children: ReactNode }) {\n return (\n <li data-item={item} className={`@container py-2 ${ROW_RULE} hover:bg-(--accent) ${pickedRow(picked)}`}>\n {children}\n </li>\n );\n}\n\n/** A row's first line: its cells, then its side. */\nexport function RowFirst({ children }: { children: ReactNode }) {\n return <div className=\"row-first\">{children}</div>;\n}\n\n/** A row's first line's cells as the one button that opens its item. */\nexport function RowOpen({ onOpen, children }: { onOpen: () => void; children: ReactNode }) {\n return (\n <button type=\"button\" data-row-open data-meta onClick={onOpen} className={`row-cols ${ROW_OPENS}`}>\n {children}\n </button>\n );\n}\n\n/** A row's first line's cells, when its title opens the item and the rest of the line does something else. */\nexport function RowCells({ children }: { children: ReactNode }) {\n return <div className=\"row-cols\">{children}</div>;\n}\n\n/** The first cell: the item's status glyph. */\nexport function RowGlyph({ children }: { children: ReactNode }) {\n return (\n <span className=\"grid size-6 place-items-center\" data-glyph>\n {children}\n </span>\n );\n}\n\n/** The first cell of a Queue row: its place in the Queue. */\nexport function QueuePlace({ children }: { children: ReactNode }) {\n return <span className=\"queue-n text-center font-medium tabular-nums\">{children}</span>;\n}\n\n/** Where the item's ticket is saved and its repository, in the source cell. */\nexport function RowIdentity({ children }: { children: ReactNode }) {\n return (\n <span data-row-identity className=\"flex min-w-0 items-center gap-1.5 text-[11px] text-(--muted-foreground)\">\n {children}\n </span>\n );\n}\n\n/** The kind cell. */\nexport function RowKindCell({ children }: { children: ReactNode }) {\n return (\n <span className=\"flex min-w-0 items-center\" data-kind>\n {children}\n </span>\n );\n}\n\n/** The title cell: the RowTitle and what it is part of. */\nexport function RowTitleCell({ children }: { children: ReactNode }) {\n return (\n <span className=\"flex min-w-0 items-center gap-2\" data-title-cell>\n {children}\n </span>\n );\n}\n\n/** The row's title, truncating; `name` gives it whole. */\nexport function RowTitle({ name, children }: { name: string; children: ReactNode }) {\n return (\n <span className=\"min-w-0 truncate text-sm leading-7 font-medium text-(--foreground)\" title={name} data-title>\n {children}\n </span>\n );\n}\n\n/** After the title: which concept or parent the row's work belongs to, giving its room up first. */\nexport function RowPartOf({ children }: { children: string }) {\n return (\n <span\n data-concept\n title={children}\n className=\"max-w-44 min-w-16 shrink-[100] truncate rounded bg-(--muted) px-1.5 text-(--muted-foreground)\"\n >\n {children}\n </span>\n );\n}\n\n/** The state cell, which `clips` what overflows it unless what it holds keeps its own width. */\nexport function RowStateCell({ clips = true, children }: { clips?: boolean; children: ReactNode }) {\n return (\n <span className={`flex min-w-0 items-center gap-1.5${clips ? ' overflow-hidden' : ''}`} data-col=\"state\">\n {children}\n </span>\n );\n}\n\n/** The row's state in words; `title` says more. */\nexport function RowState({ title, children }: { title?: string; children: ReactNode }) {\n return (\n <span className=\"max-w-full shrink-0 truncate\" title={title} data-state>\n {children}\n </span>\n );\n}\n\n/** A Queue row's state: how long it has waited. */\nexport function QueueAge({ children }: { children: ReactNode }) {\n return (\n <span className=\"queue-age shrink-0 tabular-nums\" data-state>\n {children}\n </span>\n );\n}\n\n/** The row's action slot, at its right. With `passEmpty`, clicks on its controls stay there, and a click beside them\n * reaches the row. */\nexport function RowSide({ passEmpty = false, children }: { passEmpty?: boolean; children: ReactNode }) {\n if (!passEmpty)\n return (\n <span data-col=\"side\" className={`row-side ${ROW_ACTION}`}>\n {children}\n </span>\n );\n\n return (\n <span data-col=\"side\" className=\"row-side\">\n <span\n className={ROW_ACTION}\n onClick={(event) => {\n if (event.target !== event.currentTarget) event.stopPropagation();\n }}\n >\n {children}\n </span>\n </span>\n );\n}\n\n/** Where to act on an item that waits on you, in its action slot. */\nexport function OnYourDesk({ children }: { children: ReactNode }) {\n return <span className=\"text-(--warning-foreground)\">{children}</span>;\n}\n\n/** A row's second line: `bar` and `count` on the left, `children` in its text slot, then its pull requests and\n * figures. A click on it beside its controls goes to `onClick`. */\nexport function RowSecondLine({\n bar,\n count,\n prs,\n figures,\n onClick,\n children,\n}: {\n bar?: ReactNode;\n /** A RowCount or RowSliceToggle; with none, its cell stays empty. */\n count?: ReactNode;\n /** The pull requests, as PullRequestRefs. */\n prs?: ReactNode;\n figures?: ReactNode;\n onClick?: ((event: MouseEvent<HTMLElement>) => void) | undefined;\n children?: ReactNode;\n}) {\n return (\n <div data-progress onClick={onClick} className={`row-second ${onClick ? 'cursor-pointer' : ''}`}>\n <span data-col=\"bar\" className=\"min-w-0\">\n {bar}\n </span>\n {count || <span data-col=\"count\" />}\n <span data-col=\"next\" className=\"flex min-w-0 items-center gap-3\">\n {children}\n </span>\n <span data-col=\"pr\" className=\"flex min-w-0 gap-2 overflow-hidden tabular-nums\">\n {prs}\n </span>\n <span data-col=\"figures\">{figures}</span>\n </div>\n );\n}\n\n/** The second line's count, such as `2/5 parts`. */\nexport function RowCount({ title, children }: { title?: string; children: ReactNode }) {\n return (\n <span data-col=\"count\" className=\"tabular-nums\" title={title}>\n {children}\n </span>\n );\n}\n\n/** The second line's slice count as a button that unfolds the row's slices under it. */\nexport function RowSliceToggle({\n open,\n label,\n onToggle,\n children,\n}: {\n open: boolean;\n /** Names the button, as what it does now. */\n label: string;\n onToggle: () => void;\n children: ReactNode;\n}) {\n return (\n <button\n type=\"button\"\n aria-expanded={open}\n aria-label={label}\n onClick={onToggle}\n data-col=\"count\"\n className={`flex h-4 items-center gap-1 justify-self-start rounded tabular-nums hover:text-(--foreground) ${ROW_OPENS}`}\n >\n {children}\n {open ? <ChevronDownIcon className=\"size-3\" /> : <ChevronRightIcon className=\"size-3\" />}\n </button>\n );\n}\n\n/** Why the row is blocked, as a danger badge in its second line that truncates. */\nexport function RowBlocked({ children }: { children: string }) {\n return (\n <Badge tone=\"danger\" className=\"min-w-0\" title={children} data-blocked>\n <span className=\"truncate\">{children}</span>\n </Badge>\n );\n}\n\nconst SLICE_TONE = { blocked: 'text-(--st-review)', active: 'text-(--st-now)' } as const;\n\n/** The second line's word on the row's slices: its first blocked or active slice, `more` after it, and anything `after`\n * that (such as that every slice is implemented); `title` lists them all. */\nexport function RowSliceNote({\n title,\n first,\n more,\n after,\n}: {\n title?: string | undefined;\n first?: { word: string; tone: keyof typeof SLICE_TONE; title: string } | undefined;\n more?: string | undefined;\n after?: string | undefined;\n}) {\n return (\n <span data-note className=\"min-w-0 truncate\" title={title}>\n {first && (\n <>\n <span className={`font-medium ${SLICE_TONE[first.tone]}`}>{first.word}</span>{' '}\n <span className=\"text-(--foreground)\">{first.title}</span>\n {more}\n </>\n )}\n {after && <span>{after}</span>}\n </span>\n );\n}\n\n/** Under a row: Start's message or error and what Auto-build says of it, taking no room when empty. */\nexport function RowFoot({ children }: { children: ReactNode }) {\n return <div className=\"pt-1 pr-3 pl-12 empty:hidden\">{children}</div>;\n}\n\n/** Under a row: its unfolded slices. */\nexport function RowSlices({ children }: { children: ReactNode }) {\n return (\n <div className=\"pt-1 pr-3 pl-10\" data-slices>\n {children}\n </div>\n );\n}\n\n/** The agent figures on one line, at the row's right: `text`, ending in a + when `partial`, or `incomplete` when there\n * are no figures to show; while `updating`, a spinner named by it leads them. A row that stops animating keeps its\n * spinner `still`. */\nexport function UsageFigures({\n title,\n text,\n updating,\n still = false,\n partial,\n incomplete,\n}: {\n title: string;\n text?: string | null | undefined;\n updating?: string | undefined;\n still?: boolean;\n /** Screen-reader words for the +. */\n partial?: string | undefined;\n /** The words in place of figures for an incomplete total with none to show. */\n incomplete?: string | undefined;\n}) {\n return (\n <span\n className=\"flex min-w-0 items-center justify-end gap-1 text-(--muted-foreground) tabular-nums\"\n title={title}\n >\n {updating && <Loading presentation=\"inline\" title={updating} still={still} />}\n {text && <span className=\"truncate\">{text}</span>}\n {text\n ? partial && (\n <span className=\"-ml-1 shrink-0\" data-partial>\n +<span className=\"sr-only\"> {partial}</span>\n </span>\n )\n : incomplete && <span className=\"shrink-0\">{incomplete}</span>}\n </span>\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A piece of work's place on the board's active stages: one segment per stage, the past ones filled, and the current
|
|
4
|
+
* one half-filled in `color` under `glyph` (its status glyph), faint and ringed dashed while it `waiting`s. Complete
|
|
5
|
+
* work shows `glyph` alone, a tick, in place of the track.
|
|
6
|
+
*/
|
|
7
|
+
export declare function StageTrack({ stages, at, color, glyph, title, waiting, complete }: {
|
|
8
|
+
/** The stages' names, in order. */
|
|
9
|
+
stages: readonly string[];
|
|
10
|
+
/** The current stage's index. */
|
|
11
|
+
at: number;
|
|
12
|
+
color: string;
|
|
13
|
+
glyph: ReactNode;
|
|
14
|
+
title: string;
|
|
15
|
+
waiting?: boolean;
|
|
16
|
+
complete?: boolean;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=StageTrack.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
// src/board/StageTrack.tsx
|
|
3
|
+
const PAST = "color-mix(in srgb, var(--foreground) 28%, transparent)";
|
|
4
|
+
/**
|
|
5
|
+
* A piece of work's place on the board's active stages: one segment per stage, the past ones filled, and the current
|
|
6
|
+
* one half-filled in `color` under `glyph` (its status glyph), faint and ringed dashed while it `waiting`s. Complete
|
|
7
|
+
* work shows `glyph` alone, a tick, in place of the track.
|
|
8
|
+
*/
|
|
9
|
+
function StageTrack({ stages, at, color, glyph, title, waiting = false, complete = false }) {
|
|
10
|
+
if (complete) return /* @__PURE__ */ jsx("span", {
|
|
11
|
+
className: "flex h-5 items-center",
|
|
12
|
+
title,
|
|
13
|
+
children: glyph
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
16
|
+
className: "m-0 grid list-none grid-cols-5 gap-px p-0",
|
|
17
|
+
title,
|
|
18
|
+
children: stages.map((name, n) => /* @__PURE__ */ jsxs("li", {
|
|
19
|
+
className: "relative flex h-5 items-center justify-center",
|
|
20
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: `absolute inset-x-0 h-1.5 ${n === 0 ? "rounded-l-full" : ""} ${n === stages.length - 1 ? "rounded-r-full" : ""}`,
|
|
22
|
+
style: { background: n < at ? PAST : "var(--soft)" }
|
|
23
|
+
}), n === at && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: `absolute right-1/2 left-0 h-1.5 ${n === 0 ? "rounded-l-full" : ""}`,
|
|
25
|
+
style: {
|
|
26
|
+
background: color,
|
|
27
|
+
opacity: waiting ? .35 : 1
|
|
28
|
+
}
|
|
29
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: `relative grid size-5 place-items-center rounded-full bg-(--card) ${waiting ? "border border-dashed border-(--muted-foreground)" : ""}`,
|
|
31
|
+
children: glyph
|
|
32
|
+
})] })]
|
|
33
|
+
}, name))
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export { StageTrack };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=StageTrack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StageTrack.js","names":[],"sources":["../../src/board/StageTrack.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nconst PAST = 'color-mix(in srgb, var(--foreground) 28%, transparent)';\n\n/**\n * A piece of work's place on the board's active stages: one segment per stage, the past ones filled, and the current\n * one half-filled in `color` under `glyph` (its status glyph), faint and ringed dashed while it `waiting`s. Complete\n * work shows `glyph` alone, a tick, in place of the track.\n */\nexport function StageTrack({\n stages,\n at,\n color,\n glyph,\n title,\n waiting = false,\n complete = false,\n}: {\n /** The stages' names, in order. */\n stages: readonly string[];\n /** The current stage's index. */\n at: number;\n color: string;\n glyph: ReactNode;\n title: string;\n waiting?: boolean;\n complete?: boolean;\n}) {\n if (complete)\n return (\n <span className=\"flex h-5 items-center\" title={title}>\n {glyph}\n </span>\n );\n\n return (\n <ol className=\"m-0 grid list-none grid-cols-5 gap-px p-0\" title={title}>\n {stages.map((name, n) => (\n <li key={name} className=\"relative flex h-5 items-center justify-center\">\n <span\n className={`absolute inset-x-0 h-1.5 ${n === 0 ? 'rounded-l-full' : ''} ${n === stages.length - 1 ? 'rounded-r-full' : ''}`}\n style={{ background: n < at ? PAST : 'var(--soft)' }}\n />\n {n === at && (\n <>\n <span\n className={`absolute right-1/2 left-0 h-1.5 ${n === 0 ? 'rounded-l-full' : ''}`}\n style={{ background: color, opacity: waiting ? 0.35 : 1 }}\n />\n <span\n className={`relative grid size-5 place-items-center rounded-full bg-(--card) ${waiting ? 'border border-dashed border-(--muted-foreground)' : ''}`}\n >\n {glyph}\n </span>\n </>\n )}\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":";;AAEA,MAAM,OAAO;;;;;;AAOb,SAAgB,WAAW,EACvB,QACA,IACA,OACA,OACA,OACA,UAAU,OACV,WAAW,SAWZ;CACC,IAAI,UACA,OACI,oBAAC,QAAD;EAAM,WAAU;EAA+B;EAC1C,UAAA;CACC,CAAA;CAGd,OACI,oBAAC,MAAD;EAAI,WAAU;EAAmD;EAC5D,UAAA,OAAO,KAAK,MAAM,MACf,qBAAC,MAAD;GAAe,WAAU;GAAzB,UAAA,CACI,oBAAC,QAAD;IACI,WAAW,4BAA4B,MAAM,IAAI,mBAAmB,GAAG,GAAG,MAAM,OAAO,SAAS,IAAI,mBAAmB;IACvH,OAAO,EAAE,YAAY,IAAI,KAAK,OAAO,cAAc;GACtD,CAAA,GACA,MAAM,MACH,qBAAA,UAAA,EAAA,UAAA,CACI,oBAAC,QAAD;IACI,WAAW,mCAAmC,MAAM,IAAI,mBAAmB;IAC3E,OAAO;KAAE,YAAY;KAAO,SAAS,UAAU,MAAO;IAAE;GAC3D,CAAA,GACD,oBAAC,QAAD;IACI,WAAW,oEAAoE,UAAU,qDAAqD;IAE7I,UAAA;GACC,CAAA,CACR,EAAA,CAAA,CAEN;EAlBK,GAAA,IAkBL,CACP;CACD,CAAA;AAEZ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DataAttributes } from "./DataAttributes.js";
|
|
2
|
+
import { ReactNode, Ref } from "react";
|
|
3
|
+
/** Start and what goes with it, at the right of its row, wrapping. */
|
|
4
|
+
export declare function StartGroup({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
/** A sentence on a line of its own in StartGroup, such as "Run finished.". */
|
|
8
|
+
export declare function StartNote({ children }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/** The tag that takes Start's place: Started, or May have started while it's `unsure`. It takes focus back from a closed
|
|
12
|
+
* message, so it is focusable from script. */
|
|
13
|
+
export declare function StartTag({ unsure, title, children, ...data }: {
|
|
14
|
+
unsure?: boolean;
|
|
15
|
+
title: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
} & DataAttributes): import("react").JSX.Element;
|
|
18
|
+
/** The small line under Start: its message or error, or what Auto-build says of the item. */
|
|
19
|
+
export declare function StartLine({ ref, tabIndex, children, ...data }: {
|
|
20
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
21
|
+
tabIndex?: number;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
} & DataAttributes): import("react").JSX.Element;
|
|
24
|
+
/** An action's error in the danger text colour, on its own line after the controls beside it. */
|
|
25
|
+
export declare function ActionError({ ref, role, children }: {
|
|
26
|
+
ref?: Ref<HTMLSpanElement>;
|
|
27
|
+
role?: 'alert';
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=StartControls.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Badge } from "../display/Badge.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/board/StartControls.tsx
|
|
4
|
+
/** Start and what goes with it, at the right of its row, wrapping. */
|
|
5
|
+
function StartGroup({ children }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("span", {
|
|
7
|
+
className: "start-group",
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** A sentence on a line of its own in StartGroup, such as "Run finished.". */
|
|
12
|
+
function StartNote({ children }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "basis-full",
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/** The tag that takes Start's place: Started, or May have started while it's `unsure`. It takes focus back from a closed
|
|
19
|
+
* message, so it is focusable from script. */
|
|
20
|
+
function StartTag({ unsure = false, title, children, ...data }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
22
|
+
...data,
|
|
23
|
+
tone: unsure ? "warning" : "success",
|
|
24
|
+
className: unsure ? "started-tag unsure" : "started-tag",
|
|
25
|
+
tabIndex: -1,
|
|
26
|
+
title,
|
|
27
|
+
children
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** The small line under Start: its message or error, or what Auto-build says of the item. */
|
|
31
|
+
function StartLine({ ref, tabIndex, children, ...data }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("p", {
|
|
33
|
+
...data,
|
|
34
|
+
ref,
|
|
35
|
+
tabIndex,
|
|
36
|
+
className: "start",
|
|
37
|
+
children
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** An action's error in the danger text colour, on its own line after the controls beside it. */
|
|
41
|
+
function ActionError({ ref, role, children }) {
|
|
42
|
+
return /* @__PURE__ */ jsx("span", {
|
|
43
|
+
ref,
|
|
44
|
+
role,
|
|
45
|
+
className: "action-error",
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export { ActionError, StartGroup, StartLine, StartNote, StartTag };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=StartControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StartControls.js","names":[],"sources":["../../src/board/StartControls.tsx"],"sourcesContent":["// What sits around a piece of work's Start (board/items.css): the group that holds it, the tag that takes its place once\n// a thread started, and the line under it with Start's message or error.\n\nimport type { ReactNode, Ref } from 'react';\n\nimport { Badge } from '../display/Badge';\nimport type { DataAttributes } from './DataAttributes';\n\n/** Start and what goes with it, at the right of its row, wrapping. */\nexport function StartGroup({ children }: { children: ReactNode }) {\n return <span className=\"start-group\">{children}</span>;\n}\n\n/** A sentence on a line of its own in StartGroup, such as \"Run finished.\". */\nexport function StartNote({ children }: { children: ReactNode }) {\n return <span className=\"basis-full\">{children}</span>;\n}\n\n/** The tag that takes Start's place: Started, or May have started while it's `unsure`. It takes focus back from a closed\n * message, so it is focusable from script. */\nexport function StartTag({\n unsure = false,\n title,\n children,\n ...data\n}: {\n unsure?: boolean;\n title: string;\n children: ReactNode;\n} & DataAttributes) {\n return (\n <Badge\n {...data}\n tone={unsure ? 'warning' : 'success'}\n className={unsure ? 'started-tag unsure' : 'started-tag'}\n tabIndex={-1}\n title={title}\n >\n {children}\n </Badge>\n );\n}\n\n/** The small line under Start: its message or error, or what Auto-build says of the item. */\nexport function StartLine({\n ref,\n tabIndex,\n children,\n ...data\n}: {\n ref?: Ref<HTMLParagraphElement>;\n tabIndex?: number;\n children: ReactNode;\n} & DataAttributes) {\n return (\n <p {...data} ref={ref} tabIndex={tabIndex} className=\"start\">\n {children}\n </p>\n );\n}\n\n/** An action's error in the danger text colour, on its own line after the controls beside it. */\nexport function ActionError({\n ref,\n role,\n children,\n}: {\n ref?: Ref<HTMLSpanElement>;\n role?: 'alert';\n children: ReactNode;\n}) {\n return (\n <span ref={ref} role={role} className=\"action-error\">\n {children}\n </span>\n );\n}\n"],"mappings":";;;;AASA,SAAgB,WAAW,EAAE,YAAqC;CAC9D,OAAO,oBAAC,QAAD;EAAM,WAAU;EAAe;CAAe,CAAA;AACzD;;AAGA,SAAgB,UAAU,EAAE,YAAqC;CAC7D,OAAO,oBAAC,QAAD;EAAM,WAAU;EAAc;CAAe,CAAA;AACxD;;;AAIA,SAAgB,SAAS,EACrB,SAAS,OACT,OACA,UACA,GAAG,QAKa;CAChB,OACI,oBAAC,OAAD;EACI,GAAI;EACJ,MAAM,SAAS,YAAY;EAC3B,WAAW,SAAS,uBAAuB;EAC3C,UAAU;EACH;EAEN;CACE,CAAA;AAEf;;AAGA,SAAgB,UAAU,EACtB,KACA,UACA,UACA,GAAG,QAKa;CAChB,OACI,oBAAC,KAAD;EAAG,GAAI;EAAW;EAAe;EAAU,WAAU;EAChD;CACF,CAAA;AAEX;;AAGA,SAAgB,YAAY,EACxB,KACA,MACA,YAKD;CACC,OACI,oBAAC,QAAD;EAAW;EAAW;EAAM,WAAU;EACjC;CACC,CAAA;AAEd"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A piece of work's status on the board. */
|
|
2
|
+
export type BoardStatus = 'List' | 'Queued' | 'Shaping' | 'Needs you' | 'Ready' | 'In progress' | 'Review' | 'Verify' | 'Ready to merge' | 'Done';
|
|
3
|
+
/** Each status's colour, as a CSS colour value. */
|
|
4
|
+
export declare const statusColor: Record<BoardStatus, string>;
|
|
5
|
+
//# sourceMappingURL=StatusColors.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/board/StatusColors.ts
|
|
2
|
+
/** Each status's colour, as a CSS colour value. */
|
|
3
|
+
const statusColor = {
|
|
4
|
+
List: "var(--st-idle)",
|
|
5
|
+
Queued: "var(--st-idle)",
|
|
6
|
+
Shaping: "var(--st-now)",
|
|
7
|
+
"Needs you": "var(--st-amber)",
|
|
8
|
+
Ready: "var(--st-now)",
|
|
9
|
+
"In progress": "var(--st-now)",
|
|
10
|
+
Review: "var(--st-review)",
|
|
11
|
+
Verify: "var(--st-amber)",
|
|
12
|
+
"Ready to merge": "var(--st-done)",
|
|
13
|
+
Done: "var(--st-done)"
|
|
14
|
+
};
|
|
15
|
+
export { statusColor };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=StatusColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusColors.js","names":[],"sources":["../../src/board/StatusColors.ts"],"sourcesContent":["// The board's statuses and the colour each is drawn in (board/tokens.css's --st-* colours).\n\n/** A piece of work's status on the board. */\nexport type BoardStatus =\n | 'List'\n | 'Queued'\n | 'Shaping'\n | 'Needs you'\n | 'Ready'\n | 'In progress'\n | 'Review'\n | 'Verify'\n | 'Ready to merge'\n | 'Done';\n\n/** Each status's colour, as a CSS colour value. */\nexport const statusColor: Record<BoardStatus, string> = {\n List: 'var(--st-idle)',\n Queued: 'var(--st-idle)',\n Shaping: 'var(--st-now)',\n 'Needs you': 'var(--st-amber)',\n Ready: 'var(--st-now)',\n 'In progress': 'var(--st-now)',\n Review: 'var(--st-review)',\n Verify: 'var(--st-amber)',\n 'Ready to merge': 'var(--st-done)',\n Done: 'var(--st-done)',\n};\n"],"mappings":";;AAgBA,MAAa,cAA2C;CACpD,MAAM;CACN,QAAQ;CACR,SAAS;CACT,aAAa;CACb,OAAO;CACP,eAAe;CACf,QAAQ;CACR,QAAQ;CACR,kBAAkB;CAClB,MAAM;AACV"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoardStatus } from "./StatusColors.js";
|
|
2
|
+
declare const sizes: {
|
|
3
|
+
readonly compact: 'size-3';
|
|
4
|
+
readonly default: 'size-3.5';
|
|
5
|
+
readonly title: 'size-4';
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A status's glyph in its colour. `running` animates it while its work is known to run: In progress spins, and
|
|
9
|
+
* Shaping, Review, Verify and Ready to merge pulse. `presentation` sizes it: 12px beside small text, 14px by default,
|
|
10
|
+
* 16px beside a title.
|
|
11
|
+
*/
|
|
12
|
+
export declare function StatusGlyph({ status, running, presentation }: {
|
|
13
|
+
status: BoardStatus;
|
|
14
|
+
running?: boolean;
|
|
15
|
+
presentation?: keyof typeof sizes;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StatusGlyph.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SpinnerIcon } from "../feedback/Loading.js";
|
|
2
|
+
import { ambientMotion } from "../foundations/AmbientMotion.js";
|
|
3
|
+
import { statusColor } from "./StatusColors.js";
|
|
4
|
+
import { CheckIcon, CircleArrowRightIcon, CircleDashedIcon, CircleDotIcon, CircleIcon, Clock3Icon, EyeIcon, GitMergeIcon, ListIcon } from "lucide-react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/board/StatusGlyph.tsx
|
|
7
|
+
const sizes = {
|
|
8
|
+
compact: "size-3",
|
|
9
|
+
default: "size-3.5",
|
|
10
|
+
title: "size-4"
|
|
11
|
+
};
|
|
12
|
+
/** The statuses whose glyph pulses while their work runs; In progress spins instead. */
|
|
13
|
+
const pulses = [
|
|
14
|
+
"Shaping",
|
|
15
|
+
"Review",
|
|
16
|
+
"Verify",
|
|
17
|
+
"Ready to merge"
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* A status's glyph in its colour. `running` animates it while its work is known to run: In progress spins, and
|
|
21
|
+
* Shaping, Review, Verify and Ready to merge pulse. `presentation` sizes it: 12px beside small text, 14px by default,
|
|
22
|
+
* 16px beside a title.
|
|
23
|
+
*/
|
|
24
|
+
function StatusGlyph({ status, running = false, presentation = "default" }) {
|
|
25
|
+
const pulse = running && pulses.includes(status);
|
|
26
|
+
const props = {
|
|
27
|
+
ref: pulse ? ambientMotion : void 0,
|
|
28
|
+
className: `shrink-0 ${sizes[presentation]}${pulse ? " status-pulse" : ""}`,
|
|
29
|
+
style: { color: statusColor[status] },
|
|
30
|
+
strokeWidth: 2.25
|
|
31
|
+
};
|
|
32
|
+
switch (status) {
|
|
33
|
+
case "List": return /* @__PURE__ */ jsx(ListIcon, { ...props });
|
|
34
|
+
case "Needs you":
|
|
35
|
+
case "Verify": return /* @__PURE__ */ jsx(CircleDotIcon, { ...props });
|
|
36
|
+
case "In progress": return running ? /* @__PURE__ */ jsx(SpinnerIcon, {
|
|
37
|
+
motion: "status",
|
|
38
|
+
...props
|
|
39
|
+
}) : /* @__PURE__ */ jsx(CircleIcon, { ...props });
|
|
40
|
+
case "Ready": return /* @__PURE__ */ jsx(CircleArrowRightIcon, { ...props });
|
|
41
|
+
case "Shaping": return /* @__PURE__ */ jsx(CircleDashedIcon, { ...props });
|
|
42
|
+
case "Review": return /* @__PURE__ */ jsx(EyeIcon, { ...props });
|
|
43
|
+
case "Ready to merge": return /* @__PURE__ */ jsx(GitMergeIcon, { ...props });
|
|
44
|
+
case "Done": return /* @__PURE__ */ jsx(CheckIcon, { ...props });
|
|
45
|
+
case "Queued": return /* @__PURE__ */ jsx(Clock3Icon, { ...props });
|
|
46
|
+
default: return /* @__PURE__ */ jsx(CircleIcon, { ...props });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export { StatusGlyph };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=StatusGlyph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusGlyph.js","names":[],"sources":["../../src/board/StatusGlyph.tsx"],"sourcesContent":["// One glyph per status of Lar Factory's work, the way T3 marks a thread working, waiting or done, in the status's\n// colour (board/tokens.css's --st-* colours).\n\nimport {\n CheckIcon,\n CircleArrowRightIcon,\n CircleDashedIcon,\n CircleDotIcon,\n CircleIcon,\n Clock3Icon,\n EyeIcon,\n GitMergeIcon,\n ListIcon,\n} from 'lucide-react';\n\nimport { SpinnerIcon } from '../feedback/Loading';\nimport { ambientMotion } from '../foundations/AmbientMotion';\nimport { type BoardStatus, statusColor } from './StatusColors';\n\nconst sizes = { compact: 'size-3', default: 'size-3.5', title: 'size-4' } as const;\n\n/** The statuses whose glyph pulses while their work runs; In progress spins instead. */\nconst pulses: BoardStatus[] = ['Shaping', 'Review', 'Verify', 'Ready to merge'];\n\n/**\n * A status's glyph in its colour. `running` animates it while its work is known to run: In progress spins, and\n * Shaping, Review, Verify and Ready to merge pulse. `presentation` sizes it: 12px beside small text, 14px by default,\n * 16px beside a title.\n */\nexport function StatusGlyph({\n status,\n running = false,\n presentation = 'default',\n}: {\n status: BoardStatus;\n running?: boolean;\n presentation?: keyof typeof sizes;\n}) {\n const pulse = running && pulses.includes(status);\n const props = {\n ref: pulse ? ambientMotion : undefined,\n className: `shrink-0 ${sizes[presentation]}${pulse ? ' status-pulse' : ''}`,\n style: { color: statusColor[status] },\n strokeWidth: 2.25,\n };\n\n switch (status) {\n case 'List':\n return <ListIcon {...props} />;\n case 'Needs you':\n case 'Verify':\n return <CircleDotIcon {...props} />;\n case 'In progress':\n return running ? <SpinnerIcon motion=\"status\" {...props} /> : <CircleIcon {...props} />;\n case 'Ready':\n return <CircleArrowRightIcon {...props} />;\n case 'Shaping':\n return <CircleDashedIcon {...props} />;\n case 'Review':\n return <EyeIcon {...props} />;\n case 'Ready to merge':\n return <GitMergeIcon {...props} />;\n case 'Done':\n return <CheckIcon {...props} />;\n case 'Queued':\n return <Clock3Icon {...props} />;\n default:\n return <CircleIcon {...props} />;\n }\n}\n"],"mappings":";;;;;;AAmBA,MAAM,QAAQ;CAAE,SAAS;CAAU,SAAS;CAAY,OAAO;AAAS;;AAGxE,MAAM,SAAwB;CAAC;CAAW;CAAU;CAAU;AAAgB;;;;;;AAO9E,SAAgB,YAAY,EACxB,QACA,UAAU,OACV,eAAe,aAKhB;CACC,MAAM,QAAQ,WAAW,OAAO,SAAS,MAAM;CAC/C,MAAM,QAAQ;EACV,KAAK,QAAQ,gBAAgB,KAAA;EAC7B,WAAW,YAAY,MAAM,gBAAgB,QAAQ,kBAAkB;EACvE,OAAO,EAAE,OAAO,YAAY,QAAQ;EACpC,aAAa;CACjB;CAEA,QAAQ,QAAR;EACI,KAAK,QACD,OAAO,oBAAC,UAAD,EAAU,GAAI,MAAQ,CAAA;EACjC,KAAK;EACL,KAAK,UACD,OAAO,oBAAC,eAAD,EAAe,GAAI,MAAQ,CAAA;EACtC,KAAK,eACD,OAAO,UAAU,oBAAC,aAAD;GAAa,QAAO;GAAS,GAAI;EAAQ,CAAA,IAAI,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;EAC1F,KAAK,SACD,OAAO,oBAAC,sBAAD,EAAsB,GAAI,MAAQ,CAAA;EAC7C,KAAK,WACD,OAAO,oBAAC,kBAAD,EAAkB,GAAI,MAAQ,CAAA;EACzC,KAAK,UACD,OAAO,oBAAC,SAAD,EAAS,GAAI,MAAQ,CAAA;EAChC,KAAK,kBACD,OAAO,oBAAC,cAAD,EAAc,GAAI,MAAQ,CAAA;EACrC,KAAK,QACD,OAAO,oBAAC,WAAD,EAAW,GAAI,MAAQ,CAAA;EAClC,KAAK,UACD,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;EACnC,SACI,OAAO,oBAAC,YAAD,EAAY,GAAI,MAAQ,CAAA;CACvC;AACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/** The earlier threads, one EarlierThread each, in small muted text. */
|
|
3
|
+
export declare function EarlierThreadList({ children }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** An earlier thread: its `name`, linked when `href` opens it, then its `state`; `title` names it in full. */
|
|
7
|
+
export declare function EarlierThread({ name, title, href, state }: {
|
|
8
|
+
name: string;
|
|
9
|
+
title: string;
|
|
10
|
+
href?: string | undefined;
|
|
11
|
+
state: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=Threads.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
// src/board/Threads.tsx
|
|
3
|
+
/** The earlier threads, one EarlierThread each, in small muted text. */
|
|
4
|
+
function EarlierThreadList({ children }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
6
|
+
className: "m-0 grid list-none gap-1 p-0 text-xs text-(--muted-foreground)",
|
|
7
|
+
"data-earlier-threads": true,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** An earlier thread: its `name`, linked when `href` opens it, then its `state`; `title` names it in full. */
|
|
12
|
+
function EarlierThread({ name, title, href, state }) {
|
|
13
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
14
|
+
className: "flex min-w-0 items-center gap-1.5",
|
|
15
|
+
title,
|
|
16
|
+
children: [
|
|
17
|
+
href ? /* @__PURE__ */ jsx("a", {
|
|
18
|
+
href,
|
|
19
|
+
className: "truncate underline",
|
|
20
|
+
children: name
|
|
21
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: "truncate",
|
|
23
|
+
children: name
|
|
24
|
+
}),
|
|
25
|
+
" ",
|
|
26
|
+
/* @__PURE__ */ jsxs("span", {
|
|
27
|
+
className: "shrink-0",
|
|
28
|
+
children: ["· ", state]
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export { EarlierThread, EarlierThreadList };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=Threads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Threads.js","names":[],"sources":["../../src/board/Threads.tsx"],"sourcesContent":["// A piece of work's earlier T3 threads, in the item dialog.\n\nimport type { ReactNode } from 'react';\n\n/** The earlier threads, one EarlierThread each, in small muted text. */\nexport function EarlierThreadList({ children }: { children: ReactNode }) {\n return (\n <ul className=\"m-0 grid list-none gap-1 p-0 text-xs text-(--muted-foreground)\" data-earlier-threads>\n {children}\n </ul>\n );\n}\n\n/** An earlier thread: its `name`, linked when `href` opens it, then its `state`; `title` names it in full. */\nexport function EarlierThread({\n name,\n title,\n href,\n state,\n}: {\n name: string;\n title: string;\n href?: string | undefined;\n state: ReactNode;\n}) {\n return (\n <li className=\"flex min-w-0 items-center gap-1.5\" title={title}>\n {href ? (\n <a href={href} className=\"truncate underline\">\n {name}\n </a>\n ) : (\n <span className=\"truncate\">{name}</span>\n )}{' '}\n <span className=\"shrink-0\">· {state}</span>\n </li>\n );\n}\n"],"mappings":";;;AAKA,SAAgB,kBAAkB,EAAE,YAAqC;CACrE,OACI,oBAAC,MAAD;EAAI,WAAU;EAAiE,wBAAA;EAC1E;CACD,CAAA;AAEZ;;AAGA,SAAgB,cAAc,EAC1B,MACA,OACA,MACA,SAMD;CACC,OACI,qBAAC,MAAD;EAAI,WAAU;EAA2C;EAAzD,UAAA;GACK,OACG,oBAAC,KAAD;IAAS;IAAM,WAAU;IACpB,UAAA;GACF,CAAA,IAEH,oBAAC,QAAD;IAAM,WAAU;IAAY,UAAA;GAAW,CAAA;GACxC;GACH,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CAA2B,MAAG,KAAY;;EAC1C;;AAEZ"}
|