@iamfiro/design 0.0.0-stage → 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/AGENTS.md +82 -0
- package/README.md +15 -2
- package/agents/INDEX.md +157 -0
- package/agents/accordion/AGENTS.md +279 -0
- package/agents/action-bar/AGENTS.md +90 -0
- package/agents/alert/AGENTS.md +212 -0
- package/agents/alert-dialog/AGENTS.md +193 -0
- package/agents/app-shell/AGENTS.md +409 -0
- package/agents/area-chart/AGENTS.md +183 -0
- package/agents/aspect-ratio/AGENTS.md +143 -0
- package/agents/avatar/AGENTS.md +130 -0
- package/agents/badge/AGENTS.md +217 -0
- package/agents/bar-chart/AGENTS.md +386 -0
- package/agents/bar-list/AGENTS.md +223 -0
- package/agents/brand-icon/AGENTS.md +82 -0
- package/agents/breadcrumb/AGENTS.md +133 -0
- package/agents/button/AGENTS.md +195 -0
- package/agents/card/AGENTS.md +141 -0
- package/agents/card-frame/AGENTS.md +227 -0
- package/agents/chat-bubble/AGENTS.md +266 -0
- package/agents/chat-composer/AGENTS.md +251 -0
- package/agents/checkbox/AGENTS.md +113 -0
- package/agents/code-block/AGENTS.md +144 -0
- package/agents/color-dot/AGENTS.md +120 -0
- package/agents/color-picker/AGENTS.md +224 -0
- package/agents/colors/AGENTS.md +168 -0
- package/agents/combobox/AGENTS.md +218 -0
- package/agents/command-menu/AGENTS.md +169 -0
- package/agents/comment/AGENTS.md +206 -0
- package/agents/context-menu/AGENTS.md +303 -0
- package/agents/copy-button/AGENTS.md +84 -0
- package/agents/count-badge/AGENTS.md +115 -0
- package/agents/countdown/AGENTS.md +101 -0
- package/agents/data-grid/AGENTS.md +460 -0
- package/agents/date-picker/AGENTS.md +197 -0
- package/agents/delta/AGENTS.md +114 -0
- package/agents/description-list/AGENTS.md +251 -0
- package/agents/dialog/AGENTS.md +391 -0
- package/agents/drawer/AGENTS.md +471 -0
- package/agents/dropdown-menu/AGENTS.md +322 -0
- package/agents/dropzone/AGENTS.md +116 -0
- package/agents/elapsed/AGENTS.md +160 -0
- package/agents/empty-state/AGENTS.md +203 -0
- package/agents/file-chip/AGENTS.md +79 -0
- package/agents/file-icon/AGENTS.md +66 -0
- package/agents/file-upload/AGENTS.md +168 -0
- package/agents/filter-chips/AGENTS.md +167 -0
- package/agents/flag/AGENTS.md +67 -0
- package/agents/funnel-chart/AGENTS.md +131 -0
- package/agents/highlight/AGENTS.md +119 -0
- package/agents/hover-card/AGENTS.md +271 -0
- package/agents/icon-stack/AGENTS.md +120 -0
- package/agents/icon-tile/AGENTS.md +94 -0
- package/agents/inline-diff/AGENTS.md +211 -0
- package/agents/input/AGENTS.md +261 -0
- package/agents/kanban/AGENTS.md +352 -0
- package/agents/kbd/AGENTS.md +160 -0
- package/agents/layout/AGENTS.md +351 -0
- package/agents/line-chart/AGENTS.md +393 -0
- package/agents/link/AGENTS.md +53 -0
- package/agents/list/AGENTS.md +392 -0
- package/agents/marker/AGENTS.md +142 -0
- package/agents/masked-text/AGENTS.md +127 -0
- package/agents/menubar/AGENTS.md +276 -0
- package/agents/multi-select/AGENTS.md +159 -0
- package/agents/navigation-menu/AGENTS.md +315 -0
- package/agents/notice-stack/AGENTS.md +101 -0
- package/agents/number-stepper/AGENTS.md +96 -0
- package/agents/otp-input/AGENTS.md +162 -0
- package/agents/pagination/AGENTS.md +189 -0
- package/agents/phone-input/AGENTS.md +131 -0
- package/agents/pie-chart/AGENTS.md +243 -0
- package/agents/popover/AGENTS.md +190 -0
- package/agents/progress/AGENTS.md +273 -0
- package/agents/progress-tracker/AGENTS.md +305 -0
- package/agents/rating/AGENTS.md +165 -0
- package/agents/relative-time/AGENTS.md +103 -0
- package/agents/resizable/AGENTS.md +390 -0
- package/agents/scaled-preview/AGENTS.md +111 -0
- package/agents/scatter-chart/AGENTS.md +160 -0
- package/agents/scroll-area/AGENTS.md +271 -0
- package/agents/search-input/AGENTS.md +105 -0
- package/agents/segmented-control/AGENTS.md +153 -0
- package/agents/select/AGENTS.md +159 -0
- package/agents/selector-button/AGENTS.md +122 -0
- package/agents/sidebar/AGENTS.md +201 -0
- package/agents/skeleton/AGENTS.md +166 -0
- package/agents/slider/AGENTS.md +181 -0
- package/agents/social-login-button/AGENTS.md +156 -0
- package/agents/spark-chart/AGENTS.md +257 -0
- package/agents/sparkbar/AGENTS.md +92 -0
- package/agents/spinner/AGENTS.md +123 -0
- package/agents/split-view/AGENTS.md +290 -0
- package/agents/stat/AGENTS.md +138 -0
- package/agents/status-icon/AGENTS.md +243 -0
- package/agents/step-list/AGENTS.md +313 -0
- package/agents/table/AGENTS.md +286 -0
- package/agents/tabs/AGENTS.md +305 -0
- package/agents/tag-input/AGENTS.md +246 -0
- package/agents/time-picker/AGENTS.md +228 -0
- package/agents/timeline/AGENTS.md +1018 -0
- package/agents/toast/AGENTS.md +266 -0
- package/agents/toggle-group/AGENTS.md +216 -0
- package/agents/toolbar/AGENTS.md +277 -0
- package/agents/tooltip/AGENTS.md +154 -0
- package/agents/tracker/AGENTS.md +158 -0
- package/agents/tree-diagram/AGENTS.md +260 -0
- package/agents/tree-view/AGENTS.md +329 -0
- package/agents/typography/AGENTS.md +396 -0
- package/lib/components/Accordion/Accordion2.js +135 -0
- package/lib/components/ActionBar/ActionBar2.js +65 -0
- package/lib/components/Alert/Alert2.js +131 -0
- package/lib/components/AppShell/AppShell2.js +94 -0
- package/lib/components/AreaChart/AreaChart.js +59 -0
- package/lib/components/BarChart/BarChart2.js +243 -0
- package/lib/components/BarList/BarList2.js +172 -0
- package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
- package/lib/components/Calendar/Calendar2.js +309 -0
- package/lib/components/Calendar/DatePicker2.js +229 -0
- package/lib/components/Calendar/date.js +121 -0
- package/lib/components/Card/Card2.js +104 -0
- package/lib/components/CardFrame/CardFrame2.js +72 -0
- package/lib/components/Chart/ChartParts.js +150 -0
- package/lib/components/Chart/chart2.js +96 -0
- package/lib/components/Chart/useChartInteraction.js +94 -0
- package/lib/components/ChatBubble/ChatBubble2.js +174 -0
- package/lib/components/ChatBubble/formatChatTime.js +53 -0
- package/lib/components/ChatComposer/ChatComposer2.js +153 -0
- package/lib/components/CodeBlock/CodeBlock2.js +93 -0
- package/lib/components/CodeBlock/highlight.js +114 -0
- package/lib/components/ColorPicker/ColorPicker2.js +610 -0
- package/lib/components/ColorPicker/color.js +180 -0
- package/lib/components/ColorPicker/presets.js +75 -0
- package/lib/components/Combobox/Combobox2.js +229 -0
- package/lib/components/CommandMenu/CommandMenu.js +267 -0
- package/lib/components/Comment/Comment2.js +134 -0
- package/lib/components/ContextMenu/ContextMenu2.js +168 -0
- package/lib/components/DataGrid/DataGrid2.js +1996 -0
- package/lib/components/DataGrid/GridPopover.js +154 -0
- package/lib/components/DataGrid/anchor.js +50 -0
- package/lib/components/DataGrid/model.js +558 -0
- package/lib/components/DataGrid/panels.js +703 -0
- package/lib/components/DataGrid/typeMeta.js +76 -0
- package/lib/components/DataGrid/types.js +54 -0
- package/lib/components/DescriptionList/DescriptionList2.js +180 -0
- package/lib/components/Dialog/AlertDialog.js +118 -0
- package/lib/components/Dialog/Dialog2.js +109 -0
- package/lib/components/Dialog/modal.js +92 -0
- package/lib/components/Drawer/Drawer2.js +244 -0
- package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
- package/lib/components/DropdownMenu/menuCore.js +63 -0
- package/lib/components/Dropzone/Dropzone2.js +144 -0
- package/lib/components/EmptyState/EmptyState2.js +72 -0
- package/lib/components/FileChip/FileChip2.js +118 -0
- package/lib/components/FileUpload/FileUpload.js +258 -0
- package/lib/components/FilterChips/FilterChips2.js +101 -0
- package/lib/components/FunnelChart/FunnelChart2.js +283 -0
- package/lib/components/FunnelChart/funnel.js +69 -0
- package/lib/components/Highlight/Highlight2.js +100 -0
- package/lib/components/HoverCard/HoverCard.js +134 -0
- package/lib/components/InlineDiff/InlineDiff2.js +215 -0
- package/lib/components/InlineDiff/diff.js +126 -0
- package/lib/components/InlineDiff/useDiffReview.js +109 -0
- package/lib/components/Kanban/Kanban2.js +691 -0
- package/lib/components/Kanban/KanbanCard.js +159 -0
- package/lib/components/Kanban/move.js +69 -0
- package/lib/components/LineChart/LineChart2.js +342 -0
- package/lib/components/List/List2.js +133 -0
- package/lib/components/Listbox/Listbox2.js +163 -0
- package/lib/components/Marker/Marker2.js +82 -0
- package/lib/components/Menubar/Menubar2.js +223 -0
- package/lib/components/MultiSelect/MultiSelect2.js +204 -0
- package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
- package/lib/components/NoticeStack/NoticeStack2.js +178 -0
- package/lib/components/NumberStepper/NumberStepper2.js +129 -0
- package/lib/components/OtpInput/OtpInput2.js +122 -0
- package/lib/components/Pagination/Pagination2.js +210 -0
- package/lib/components/Pagination/paginationRange.js +53 -0
- package/lib/components/PhoneInput/PhoneInput.js +175 -0
- package/lib/components/PieChart/PieChart2.js +246 -0
- package/lib/components/PieChart/arc.js +66 -0
- package/lib/components/PieChart/useArcTween.js +94 -0
- package/lib/components/Popover/Popover2.js +112 -0
- package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
- package/lib/components/Rating/Rating2.js +186 -0
- package/lib/components/Resizable/Resizable2.js +236 -0
- package/lib/components/Resizable/layout.js +115 -0
- package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
- package/lib/components/ScatterChart/ScatterChart2.js +356 -0
- package/lib/components/ScatterChart/scatter.js +83 -0
- package/lib/components/ScrollArea/ScrollArea2.js +218 -0
- package/lib/components/Select/Select2.js +153 -0
- package/lib/components/Sidebar/Sidebar2.js +127 -0
- package/lib/components/Skeleton/Skeleton2.js +91 -0
- package/lib/components/Slider/Slider2.js +142 -0
- package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
- package/lib/components/SparkChart/SparkChart2.js +217 -0
- package/lib/components/SparkChart/spark.js +76 -0
- package/lib/components/Sparkbar/Sparkbar2.js +111 -0
- package/lib/components/SplitView/SplitView2.js +95 -0
- package/lib/components/Stat/Stat2.js +164 -0
- package/lib/components/StepList/StepList2.js +131 -0
- package/lib/components/Table/Table2.js +104 -0
- package/lib/components/Tabs/Tabs2.js +131 -0
- package/lib/components/TagInput/TagInput2.js +360 -0
- package/lib/components/TimePicker/TimePicker2.js +388 -0
- package/lib/components/TimePicker/time.js +83 -0
- package/lib/components/Timeline/Timeline2.js +369 -0
- package/lib/components/Timeline/scale.js +83 -0
- package/lib/components/Toast/Toaster.js +212 -0
- package/lib/components/Toast/store.js +129 -0
- package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
- package/lib/components/Toolbar/Toolbar2.js +281 -0
- package/lib/components/Tracker/Tracker2.js +172 -0
- package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
- package/lib/components/TreeView/TreeView2.js +284 -0
- package/lib/hooks/timing.js +55 -0
- package/lib/hooks/useControllableState.js +49 -0
- package/lib/hooks/useCountdown.js +80 -0
- package/lib/hooks/useDigitInput.js +105 -0
- package/lib/hooks/useDismiss.js +71 -0
- package/lib/hooks/useElapsed.js +83 -0
- package/lib/hooks/useFloating.js +70 -0
- package/lib/hooks/useFocusTrap.js +61 -0
- package/lib/hooks/usePresence.js +60 -0
- package/lib/hooks/usePressToOpen.js +69 -0
- package/lib/hooks/useScrollLock.js +70 -0
- package/lib/hooks/useSelection.js +68 -0
- package/lib/index.js +178 -0
- package/lib/primitives/AspectRatio2.js +80 -0
- package/lib/primitives/BrandIcon.js +245 -0
- package/lib/primitives/ColorDot2.js +70 -0
- package/lib/primitives/CopyButton2.js +85 -0
- package/lib/primitives/CountBadge2.js +78 -0
- package/lib/primitives/Countdown2.js +65 -0
- package/lib/primitives/Delta2.js +67 -0
- package/lib/primitives/Elapsed.js +62 -0
- package/lib/primitives/FileIcon2.js +125 -0
- package/lib/primitives/Flag2.js +263 -0
- package/lib/primitives/IconStack2.js +85 -0
- package/lib/primitives/IconTile2.js +68 -0
- package/lib/primitives/Kbd2.js +88 -0
- package/lib/primitives/Layout2.js +118 -0
- package/lib/primitives/Link2.js +53 -0
- package/lib/primitives/MaskedText2.js +120 -0
- package/lib/primitives/Progress2.js +137 -0
- package/lib/primitives/RelativeTime.js +84 -0
- package/lib/primitives/SearchInput2.js +84 -0
- package/lib/primitives/SelectorButton2.js +97 -0
- package/lib/primitives/Spinner2.js +98 -0
- package/lib/primitives/StatusIcon2.js +126 -0
- package/lib/primitives/Swatch2.js +79 -0
- package/lib/primitives/Tooltip2.js +132 -0
- package/lib/primitives/Typography2.js +97 -0
- package/lib/primitives/formatCountdown.js +51 -0
- package/lib/primitives/formatElapsed.js +66 -0
- package/lib/primitives/formatRelativeTime.js +64 -0
- package/lib/primitives/hotkey.js +94 -0
- package/lib/primitives/index.js +352 -0
- package/lib/primitives/maskValue.js +65 -0
- package/lib/style.css +2 -0
- package/lib/types/components/Accordion/Accordion.d.ts +57 -0
- package/lib/types/components/ActionBar/ActionBar.d.ts +24 -0
- package/lib/types/components/Alert/Alert.d.ts +36 -0
- package/lib/types/components/AppShell/AppShell.d.ts +38 -0
- package/lib/types/components/AreaChart/AreaChart.d.ts +17 -0
- package/lib/types/components/BarChart/BarChart.d.ts +57 -0
- package/lib/types/components/BarList/BarList.d.ts +56 -0
- package/lib/types/components/Breadcrumb/Breadcrumb.d.ts +15 -0
- package/lib/types/components/Calendar/Calendar.d.ts +34 -0
- package/lib/types/components/Calendar/DatePicker.d.ts +45 -0
- package/lib/types/components/Calendar/date.d.ts +32 -0
- package/lib/types/components/Card/Card.d.ts +64 -0
- package/lib/types/components/CardFrame/CardFrame.d.ts +15 -0
- package/lib/types/components/Chart/ChartParts.d.ts +38 -0
- package/lib/types/components/Chart/chart.d.ts +46 -0
- package/lib/types/components/Chart/useChartInteraction.d.ts +39 -0
- package/lib/types/components/ChatBubble/ChatBubble.d.ts +61 -0
- package/lib/types/components/ChatBubble/formatChatTime.d.ts +2 -0
- package/lib/types/components/ChatComposer/ChatComposer.d.ts +42 -0
- package/lib/types/components/CodeBlock/CodeBlock.d.ts +18 -0
- package/lib/types/components/CodeBlock/highlight.d.ts +10 -0
- package/lib/types/components/ColorPicker/ColorPicker.d.ts +61 -0
- package/lib/types/components/ColorPicker/color.d.ts +48 -0
- package/lib/types/components/ColorPicker/presets.d.ts +7 -0
- package/lib/types/components/Combobox/Combobox.d.ts +48 -0
- package/lib/types/components/CommandMenu/CommandMenu.d.ts +51 -0
- package/lib/types/components/Comment/Comment.d.ts +45 -0
- package/lib/types/components/ContextMenu/ContextMenu.d.ts +40 -0
- package/lib/types/components/DataGrid/DataGrid.d.ts +43 -0
- package/lib/types/components/DataGrid/GridPopover.d.ts +43 -0
- package/lib/types/components/DataGrid/anchor.d.ts +5 -0
- package/lib/types/components/DataGrid/model.d.ts +61 -0
- package/lib/types/components/DataGrid/panels.d.ts +63 -0
- package/lib/types/components/DataGrid/typeMeta.d.ts +6 -0
- package/lib/types/components/DataGrid/types.d.ts +77 -0
- package/lib/types/components/DescriptionList/DescriptionList.d.ts +77 -0
- package/lib/types/components/Dialog/AlertDialog.d.ts +26 -0
- package/lib/types/components/Dialog/Dialog.d.ts +42 -0
- package/lib/types/components/Dialog/modal.d.ts +38 -0
- package/lib/types/components/Drawer/Drawer.d.ts +62 -0
- package/lib/types/components/DropdownMenu/DropdownMenu.d.ts +97 -0
- package/lib/types/components/DropdownMenu/menuCore.d.ts +23 -0
- package/lib/types/components/Dropzone/Dropzone.d.ts +30 -0
- package/lib/types/components/EmptyState/EmptyState.d.ts +26 -0
- package/lib/types/components/FileChip/FileChip.d.ts +32 -0
- package/lib/types/components/FileUpload/FileUpload.d.ts +52 -0
- package/lib/types/components/FilterChips/FilterChips.d.ts +37 -0
- package/lib/types/components/FunnelChart/FunnelChart.d.ts +38 -0
- package/lib/types/components/FunnelChart/funnel.d.ts +25 -0
- package/lib/types/components/Highlight/Highlight.d.ts +35 -0
- package/lib/types/components/HoverCard/HoverCard.d.ts +47 -0
- package/lib/types/components/InlineDiff/InlineDiff.d.ts +36 -0
- package/lib/types/components/InlineDiff/diff.d.ts +42 -0
- package/lib/types/components/InlineDiff/useDiffReview.d.ts +57 -0
- package/lib/types/components/Kanban/Kanban.d.ts +64 -0
- package/lib/types/components/Kanban/KanbanCard.d.ts +35 -0
- package/lib/types/components/Kanban/move.d.ts +25 -0
- package/lib/types/components/LineChart/LineChart.d.ts +85 -0
- package/lib/types/components/List/List.d.ts +62 -0
- package/lib/types/components/Listbox/Listbox.d.ts +60 -0
- package/lib/types/components/Marker/Marker.d.ts +28 -0
- package/lib/types/components/Menubar/Menubar.d.ts +50 -0
- package/lib/types/components/MultiSelect/MultiSelect.d.ts +38 -0
- package/lib/types/components/NavigationMenu/NavigationMenu.d.ts +101 -0
- package/lib/types/components/NoticeStack/NoticeStack.d.ts +41 -0
- package/lib/types/components/NumberStepper/NumberStepper.d.ts +32 -0
- package/lib/types/components/OtpInput/OtpInput.d.ts +31 -0
- package/lib/types/components/Pagination/Pagination.d.ts +54 -0
- package/lib/types/components/Pagination/paginationRange.d.ts +7 -0
- package/lib/types/components/PhoneInput/PhoneInput.d.ts +47 -0
- package/lib/types/components/PieChart/PieChart.d.ts +67 -0
- package/lib/types/components/PieChart/arc.d.ts +26 -0
- package/lib/types/components/PieChart/useArcTween.d.ts +15 -0
- package/lib/types/components/Popover/Popover.d.ts +28 -0
- package/lib/types/components/ProgressTracker/ProgressTracker.d.ts +64 -0
- package/lib/types/components/Rating/Rating.d.ts +42 -0
- package/lib/types/components/Resizable/Resizable.d.ts +50 -0
- package/lib/types/components/Resizable/layout.d.ts +31 -0
- package/lib/types/components/ScaledPreview/ScaledPreview.d.ts +38 -0
- package/lib/types/components/ScatterChart/ScatterChart.d.ts +81 -0
- package/lib/types/components/ScatterChart/scatter.d.ts +14 -0
- package/lib/types/components/ScrollArea/ScrollArea.d.ts +34 -0
- package/lib/types/components/Select/Select.d.ts +39 -0
- package/lib/types/components/Sidebar/Sidebar.d.ts +39 -0
- package/lib/types/components/Skeleton/Skeleton.d.ts +47 -0
- package/lib/types/components/Slider/Slider.d.ts +36 -0
- package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
- package/lib/types/components/SparkChart/SparkChart.d.ts +55 -0
- package/lib/types/components/SparkChart/spark.d.ts +16 -0
- package/lib/types/components/Sparkbar/Sparkbar.d.ts +39 -0
- package/lib/types/components/SplitView/SplitView.d.ts +31 -0
- package/lib/types/components/Stat/Stat.d.ts +58 -0
- package/lib/types/components/StepList/StepList.d.ts +61 -0
- package/lib/types/components/Table/Table.d.ts +39 -0
- package/lib/types/components/Tabs/Tabs.d.ts +47 -0
- package/lib/types/components/TagInput/TagInput.d.ts +46 -0
- package/lib/types/components/TimePicker/TimePicker.d.ts +43 -0
- package/lib/types/components/TimePicker/time.d.ts +15 -0
- package/lib/types/components/Timeline/Timeline.d.ts +154 -0
- package/lib/types/components/Timeline/scale.d.ts +22 -0
- package/lib/types/components/Toast/Toaster.d.ts +19 -0
- package/lib/types/components/Toast/index.d.ts +4 -0
- package/lib/types/components/Toast/store.d.ts +75 -0
- package/lib/types/components/ToggleGroup/ToggleGroup.d.ts +28 -0
- package/lib/types/components/Toolbar/Toolbar.d.ts +70 -0
- package/lib/types/components/Tracker/Tracker.d.ts +43 -0
- package/lib/types/components/TreeDiagram/TreeDiagram.d.ts +68 -0
- package/lib/types/components/TreeView/TreeView.d.ts +107 -0
- package/lib/types/components/index.d.ts +188 -0
- package/lib/types/hooks/index.d.ts +17 -0
- package/lib/types/hooks/timing.d.ts +29 -0
- package/lib/types/hooks/useControllableState.d.ts +5 -0
- package/lib/types/hooks/useCountdown.d.ts +19 -0
- package/lib/types/hooks/useDigitInput.d.ts +24 -0
- package/lib/types/hooks/useDismiss.d.ts +3 -0
- package/lib/types/hooks/useElapsed.d.ts +28 -0
- package/lib/types/hooks/useFloating.d.ts +21 -0
- package/lib/types/hooks/useFocusTrap.d.ts +7 -0
- package/lib/types/hooks/usePresence.d.ts +8 -0
- package/lib/types/hooks/usePressToOpen.d.ts +20 -0
- package/lib/types/hooks/useScrollLock.d.ts +2 -0
- package/lib/types/hooks/useSelection.d.ts +29 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/primitives/AspectRatio.d.ts +14 -0
- package/lib/types/primitives/BrandIcon.d.ts +12 -0
- package/lib/types/primitives/ColorDot.d.ts +20 -0
- package/lib/types/primitives/CopyButton.d.ts +12 -0
- package/lib/types/primitives/CountBadge.d.ts +28 -0
- package/lib/types/primitives/Countdown.d.ts +21 -0
- package/lib/types/primitives/Delta.d.ts +33 -0
- package/lib/types/primitives/Elapsed.d.ts +23 -0
- package/lib/types/primitives/FileIcon.d.ts +17 -0
- package/lib/types/primitives/Flag.d.ts +15 -0
- package/lib/types/primitives/IconStack.d.ts +27 -0
- package/lib/types/primitives/IconTile.d.ts +24 -0
- package/lib/types/primitives/Kbd.d.ts +19 -0
- package/lib/types/primitives/Layout.d.ts +64 -0
- package/lib/types/primitives/Link.d.ts +12 -0
- package/lib/types/primitives/MaskedText.d.ts +28 -0
- package/lib/types/primitives/Progress.d.ts +52 -0
- package/lib/types/primitives/RelativeTime.d.ts +22 -0
- package/lib/types/primitives/SearchInput.d.ts +8 -0
- package/lib/types/primitives/SelectorButton.d.ts +23 -0
- package/lib/types/primitives/Spinner.d.ts +15 -0
- package/lib/types/primitives/StatusIcon.d.ts +40 -0
- package/lib/types/primitives/Swatch.d.ts +11 -0
- package/lib/types/primitives/Tooltip.d.ts +17 -0
- package/lib/types/primitives/Typography.d.ts +48 -0
- package/lib/types/primitives/formatCountdown.d.ts +2 -0
- package/lib/types/primitives/formatElapsed.d.ts +8 -0
- package/lib/types/primitives/formatRelativeTime.d.ts +16 -0
- package/lib/types/primitives/hotkey.d.ts +10 -0
- package/lib/types/primitives/index.d.ts +188 -0
- package/lib/types/primitives/maskValue.d.ts +24 -0
- package/package.json +55 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type FunnelCalculateFrom, type FunnelStep } from './funnel';
|
|
3
|
+
import './FunnelChart.css';
|
|
4
|
+
export interface FunnelChartProps {
|
|
5
|
+
/** Steps in order (방문 → 가입 → …). Values below 0 count as 0. */
|
|
6
|
+
data: FunnelStep[];
|
|
7
|
+
/** horizontal: a row per step, widths follow the value · vertical: a column per step, heights follow the value. */
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
/** Conversion shown on each step: share of the first step, or of the step before it. */
|
|
10
|
+
calculateFrom?: FunnelCalculateFrom;
|
|
11
|
+
/** Bar colour (CSS variable or any color). */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Steps walk down the single-hue `--chart-seq-*` ramp instead of one colour. */
|
|
14
|
+
gradient?: boolean;
|
|
15
|
+
/** The lost part between steps as a hatched, soft area. */
|
|
16
|
+
showDropOff?: boolean;
|
|
17
|
+
/** Plot height in px (vertical). */
|
|
18
|
+
height?: number;
|
|
19
|
+
/** Bar thickness in px (horizontal). */
|
|
20
|
+
barSize?: number;
|
|
21
|
+
formatValue?: (value: number, step: FunnelStep) => string;
|
|
22
|
+
formatPercent?: (ratio: number) => string;
|
|
23
|
+
/** Small key under the plot: 전환 (solid) · 이탈 (hatched). */
|
|
24
|
+
legend?: boolean;
|
|
25
|
+
/** Highlighted step (controlled). */
|
|
26
|
+
activeIndex?: number | null;
|
|
27
|
+
defaultActiveIndex?: number | null;
|
|
28
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
29
|
+
'aria-label'?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
style?: CSSProperties;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A conversion funnel: one bar per step sized by its value, the step's conversion beside it and the
|
|
35
|
+
* drop-off since the step before as a hatched soft area. Bars grow in one after another and morph
|
|
36
|
+
* when the data changes; hover, touch or arrow keys show a Card with value, conversion and drop-off.
|
|
37
|
+
*/
|
|
38
|
+
export declare function FunnelChart({ data, orientation, calculateFrom, color, gradient, showDropOff, height, barSize, formatValue, formatPercent, legend, activeIndex, defaultActiveIndex, onActiveIndexChange, 'aria-label': ariaLabel, className, style, }: FunnelChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface FunnelStep {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
/** CSS variable (`--chart-2`) or any color. Overrides the chart `color` / `gradient` for this step. */
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export type FunnelCalculateFrom = 'first' | 'previous';
|
|
9
|
+
export interface FunnelStepStats extends FunnelStep {
|
|
10
|
+
/** Share of the first step's value (1 for the first step). */
|
|
11
|
+
fromFirst: number;
|
|
12
|
+
/** Share of the previous step's value (1 for the first step). */
|
|
13
|
+
fromPrevious: number;
|
|
14
|
+
/** The ratio picked by `calculateFrom`. */
|
|
15
|
+
conversion: number;
|
|
16
|
+
/** How many were lost since the previous step (0 for the first step). */
|
|
17
|
+
drop: number;
|
|
18
|
+
/** `drop` as a share of the previous step. */
|
|
19
|
+
dropRate: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function funnelStats(data: FunnelStep[], calculateFrom: FunnelCalculateFrom): FunnelStepStats[];
|
|
22
|
+
/** A rect with only the right corners rounded (horizontal bars grow from the left). Same command list for any size, so `d` can morph. */
|
|
23
|
+
export declare function hBarPath(x: number, y: number, w: number, h: number, r: number): string;
|
|
24
|
+
/** Rough rendered width of a label: wide glyphs (Hangul, CJK) ~13px, others ~7.5px at the label roles. */
|
|
25
|
+
export declare const estimateTextWidth: (text: string) => number;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import './Highlight.css';
|
|
3
|
+
export type HighlightTone = 'warning' | 'accent' | 'danger';
|
|
4
|
+
export interface HighlightProps {
|
|
5
|
+
/** The marked text (or a MaskedText). */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
tone?: HighlightTone;
|
|
8
|
+
/** Body of the annotation callout. Without it the highlight is a plain mark. */
|
|
9
|
+
note?: ReactNode;
|
|
10
|
+
/** Overline title of the callout ("확인 필요"), in the tone color. */
|
|
11
|
+
noteTitle?: ReactNode;
|
|
12
|
+
/** Icon before the title. Defaults per tone (warning triangle, danger circle, accent info). */
|
|
13
|
+
noteIcon?: ReactNode;
|
|
14
|
+
/** Small line under the body, usually a Badge naming the source. */
|
|
15
|
+
noteFooter?: ReactNode;
|
|
16
|
+
/** hover: opens on hover (with intent delay) or keyboard focus, press toggles ·
|
|
17
|
+
* always: the callout stays open, pinned to the text. */
|
|
18
|
+
openOn?: 'hover' | 'always';
|
|
19
|
+
/** Controlled open state (hover mode). */
|
|
20
|
+
open?: boolean;
|
|
21
|
+
defaultOpen?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
/** Callout width in px. */
|
|
24
|
+
noteWidth?: number;
|
|
25
|
+
align?: 'start' | 'center' | 'end';
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Inline text on a soft tone background. With `note` it anchors an annotation callout (a Popover)
|
|
31
|
+
* — icon + overline title in the tone color, body, optional footer chip. The mark is focusable and
|
|
32
|
+
* `aria-describedby` points at an always-present copy of the note, so the description is read
|
|
33
|
+
* whether or not the callout is open.
|
|
34
|
+
*/
|
|
35
|
+
export declare function Highlight({ children, tone, note, noteTitle, noteIcon, noteFooter, openOn, open: openProp, defaultOpen, onOpenChange, noteWidth, align, className, style, }: HighlightProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface HoverCardMetaItem {
|
|
3
|
+
/** A 14px icon (e.g. `<Star size={14} />`). */
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface HoverCardProps {
|
|
8
|
+
/** What you hover: a name, a link, a repo chip. */
|
|
9
|
+
trigger: ReactNode;
|
|
10
|
+
/** Media across the top (a link preview image in `AspectRatio`). */
|
|
11
|
+
media?: ReactNode;
|
|
12
|
+
/** Avatar · IconTile · logo before the title. */
|
|
13
|
+
leading?: ReactNode;
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
/** One muted line under the title (role, handle, domain). */
|
|
16
|
+
subtitle?: ReactNode;
|
|
17
|
+
/** A few muted lines; clamped to three. */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
/** A row of small facts — items with an icon, or your own nodes. */
|
|
20
|
+
meta?: HoverCardMetaItem[] | ReactNode;
|
|
21
|
+
/** Free content below the structured part. */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/** Buttons at the bottom (Follow, Open). */
|
|
24
|
+
actions?: ReactNode;
|
|
25
|
+
/** Placeholder shapes while the preview loads. */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
open?: boolean;
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
onOpenChange?: (open: boolean) => void;
|
|
30
|
+
align?: 'start' | 'center' | 'end';
|
|
31
|
+
/** Card width in px (or any CSS width). */
|
|
32
|
+
width?: number | string;
|
|
33
|
+
/**
|
|
34
|
+
* Touch has no hover. tap: the first tap opens the card instead of activating the trigger (a
|
|
35
|
+
* second tap goes through). none: taps behave as usual and the card is mouse / keyboard only.
|
|
36
|
+
*/
|
|
37
|
+
touch?: 'tap' | 'none';
|
|
38
|
+
/** Name of the card; defaults to `title` when it's text. */
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A rich preview that appears while resting on a name, link or reference — built on
|
|
44
|
+
* `Popover openOn="hover"`: opens after the hover intent delay, survives a short grace period on
|
|
45
|
+
* the way to the card, opens at once on keyboard focus, and on touch opens with the first tap.
|
|
46
|
+
*/
|
|
47
|
+
export declare function HoverCard({ trigger, media, leading, title, subtitle, description, meta, children, actions, loading, open: openProp, defaultOpen, onOpenChange, align, width, touch, 'aria-label': ariaLabel, className, }: HoverCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type TextVariant } from '../../primitives';
|
|
3
|
+
import type { DiffDecisions, DiffSegment } from './diff';
|
|
4
|
+
import { type DiffReview } from './useDiffReview';
|
|
5
|
+
import './InlineDiff.css';
|
|
6
|
+
export interface InlineDiffProps {
|
|
7
|
+
/** Tracked changes as segments: `{ type: 'equal' | 'insert' | 'delete', text, changeId? }`. */
|
|
8
|
+
changes?: DiffSegment[];
|
|
9
|
+
/** Or two strings, diffed word by word (when `changes` is not given). */
|
|
10
|
+
before?: string;
|
|
11
|
+
after?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Shared review state from `useDiffReview` — pass it when a toolbar outside shows the remaining
|
|
14
|
+
* count, prev / next or 모두 수락. The diff then reads its segments and decisions from it.
|
|
15
|
+
*/
|
|
16
|
+
review?: DiffReview;
|
|
17
|
+
/** Each change can be pressed to accept or reject it. Default: true with `review`, otherwise false. */
|
|
18
|
+
reviewable?: boolean;
|
|
19
|
+
/** Controlled decisions per change id (without `review`). */
|
|
20
|
+
decisions?: DiffDecisions;
|
|
21
|
+
defaultDecisions?: DiffDecisions;
|
|
22
|
+
onDecisionsChange?: (decisions: DiffDecisions) => void;
|
|
23
|
+
/** Type role of the text. */
|
|
24
|
+
variant?: TextVariant;
|
|
25
|
+
as?: 'p' | 'div' | 'span';
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Text with inline tracked changes: deletions struck through in red, insertions in green, each on a
|
|
32
|
+
* soft tint, as real `<del>` / `<ins>` with screen-reader labels. With `reviewable` every change opens
|
|
33
|
+
* a small accept / reject popover; an accepted change collapses to the new text, a rejected one to
|
|
34
|
+
* the old text. Arrow keys move between changes (roving tabindex), Enter opens the popover.
|
|
35
|
+
*/
|
|
36
|
+
export declare function InlineDiff({ changes, before, after, review: external, reviewable, decisions, defaultDecisions, onDecisionsChange, variant, as, 'aria-label': ariaLabel, className, style, }: InlineDiffProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type DiffSegmentType = 'equal' | 'insert' | 'delete';
|
|
2
|
+
/** One run of text in a tracked-changes paragraph. */
|
|
3
|
+
export interface DiffSegment {
|
|
4
|
+
type: DiffSegmentType;
|
|
5
|
+
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* Groups a delete + insert pair into one change ("18" → "21"). Optional: adjacent insert / delete
|
|
8
|
+
* segments without an id are grouped automatically.
|
|
9
|
+
*/
|
|
10
|
+
changeId?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A segment after grouping (`resolveDiffSegments`): every insert / delete has a `changeId`. */
|
|
13
|
+
export type ResolvedDiffSegment = DiffSegment;
|
|
14
|
+
export type DiffDecision = 'accepted' | 'rejected';
|
|
15
|
+
/** Decision per change id. A change that isn't in the map is still pending. */
|
|
16
|
+
export type DiffDecisions = Record<string, DiffDecision>;
|
|
17
|
+
/** One reviewable change: the text it removes and the text it adds. */
|
|
18
|
+
export interface DiffChange {
|
|
19
|
+
id: string;
|
|
20
|
+
deleted: string;
|
|
21
|
+
inserted: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function tokenizeWords(text: string): string[];
|
|
24
|
+
/**
|
|
25
|
+
* A word-level diff of two strings (longest common subsequence over word tokens). Whitespace is
|
|
26
|
+
* kept exactly; a lone space between two changes is folded into them, and each run of changes
|
|
27
|
+
* becomes one delete followed by one insert, so "stayed flat at 2." → "fell to" reads as a single
|
|
28
|
+
* replacement instead of word-by-word confetti.
|
|
29
|
+
*/
|
|
30
|
+
export declare function diffWords(before: string, after: string): DiffSegment[];
|
|
31
|
+
/**
|
|
32
|
+
* Gives every insert / delete a `changeId`. Segments keep an id they already have; one without an
|
|
33
|
+
* id joins the change right before it when the two are adjacent, otherwise it starts a new one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveDiffSegments(segments: DiffSegment[]): ResolvedDiffSegment[];
|
|
36
|
+
/** The changes in reading order, with the text each one removes and adds. */
|
|
37
|
+
export declare function listDiffChanges(segments: ResolvedDiffSegment[]): DiffChange[];
|
|
38
|
+
/**
|
|
39
|
+
* The text with decisions applied: accepted changes read as the new text, rejected ones as the old
|
|
40
|
+
* text, and pending ones as `pending` says (default: the new text).
|
|
41
|
+
*/
|
|
42
|
+
export declare function applyDiffDecisions(segments: DiffSegment[], decisions: DiffDecisions, pending?: 'before' | 'after'): string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type DiffChange, type DiffDecision, type DiffDecisions, type DiffSegment, type ResolvedDiffSegment } from './diff';
|
|
2
|
+
export interface DiffReviewOptions {
|
|
3
|
+
/** The tracked changes as segments. */
|
|
4
|
+
changes?: DiffSegment[];
|
|
5
|
+
/** Or two strings, diffed word by word (used when `changes` is not given). */
|
|
6
|
+
before?: string;
|
|
7
|
+
after?: string;
|
|
8
|
+
/** Controlled decisions per change id. */
|
|
9
|
+
decisions?: DiffDecisions;
|
|
10
|
+
defaultDecisions?: DiffDecisions;
|
|
11
|
+
onDecisionsChange?: (decisions: DiffDecisions) => void;
|
|
12
|
+
/** After accepting or rejecting a change, move to the next pending one. Default true. */
|
|
13
|
+
advance?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DiffReview {
|
|
16
|
+
/** Segments with every insert / delete grouped under a `changeId`. */
|
|
17
|
+
segments: ResolvedDiffSegment[];
|
|
18
|
+
/** The changes in reading order. */
|
|
19
|
+
changes: DiffChange[];
|
|
20
|
+
decisions: DiffDecisions;
|
|
21
|
+
/** Pending (undecided) changes. */
|
|
22
|
+
remaining: number;
|
|
23
|
+
total: number;
|
|
24
|
+
/** The focused change, or null before any navigation. */
|
|
25
|
+
current: string | null;
|
|
26
|
+
/** Position of `current` among all changes, or -1. */
|
|
27
|
+
currentIndex: number;
|
|
28
|
+
/** The text with decisions applied (pending changes read as the new text). */
|
|
29
|
+
text: string;
|
|
30
|
+
/** Bumps on every navigation (`next`, `prev`, `goTo`, advancing) so a view can scroll to `current`. */
|
|
31
|
+
navToken: number;
|
|
32
|
+
getDecision: (id: string) => DiffDecision | 'pending';
|
|
33
|
+
/** Makes a change current without scrolling (a press or focus on it). */
|
|
34
|
+
setCurrent: (id: string | null) => void;
|
|
35
|
+
/** Makes a change current and scrolls it into view. */
|
|
36
|
+
goTo: (id: string) => void;
|
|
37
|
+
/** Next / previous pending change (all changes once none are pending), wrapping around. */
|
|
38
|
+
next: () => void;
|
|
39
|
+
prev: () => void;
|
|
40
|
+
/** null puts the change back to pending. */
|
|
41
|
+
decide: (id: string, decision: DiffDecision | null) => void;
|
|
42
|
+
/** Accept / reject a change; defaults to the current one. */
|
|
43
|
+
accept: (id?: string) => void;
|
|
44
|
+
reject: (id?: string) => void;
|
|
45
|
+
/** Every pending change; decided ones are left alone. */
|
|
46
|
+
acceptAll: () => void;
|
|
47
|
+
rejectAll: () => void;
|
|
48
|
+
setDecisions: (decisions: DiffDecisions) => void;
|
|
49
|
+
/** Everything back to pending. */
|
|
50
|
+
reset: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Review state for tracked changes: decisions (controlled or not), the current change and
|
|
54
|
+
* navigation. Pass the result to `<InlineDiff review>` and build a toolbar from the same object
|
|
55
|
+
* (remaining count, prev / next, 모두 거절 / 모두 수락).
|
|
56
|
+
*/
|
|
57
|
+
export declare function useDiffReview({ changes: input, before, after, decisions: decisionsProp, defaultDecisions, onDecisionsChange, advance, }?: DiffReviewOptions): DiffReview;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type KanbanCardProps } from './KanbanCard';
|
|
3
|
+
import { type KanbanItem, type KanbanMove, type KanbanValue } from './move';
|
|
4
|
+
import './Kanban.css';
|
|
5
|
+
export interface KanbanColumn {
|
|
6
|
+
id: string;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** Plain name for screen-reader announcements when `title` isn't a string. */
|
|
9
|
+
label?: string;
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** Small dot before the title: a CSS variable name (`--chart-1`) or a color. */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** WIP limit. The count turns orange at the limit and red past it. */
|
|
14
|
+
limit?: number;
|
|
15
|
+
/** block: a full column refuses cards from other columns · warn (default): only shows it. */
|
|
16
|
+
limitMode?: 'warn' | 'block';
|
|
17
|
+
}
|
|
18
|
+
export interface KanbanCardState {
|
|
19
|
+
/** The floating copy that follows the pointer. */
|
|
20
|
+
dragging: boolean;
|
|
21
|
+
/** Picked up with the keyboard and moving with the arrow keys. */
|
|
22
|
+
lifted: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface KanbanBoardProps<T extends KanbanItem = KanbanItem & KanbanCardProps> {
|
|
25
|
+
columns: KanbanColumn[];
|
|
26
|
+
value?: KanbanValue<T>;
|
|
27
|
+
defaultValue?: KanbanValue<T>;
|
|
28
|
+
/** Called once when a move is committed (pointer release, Space / Enter), never while previewing. */
|
|
29
|
+
onValueChange?: (next: KanbanValue<T>, move: KanbanMove<T>) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a card may go to a place. Return a string to refuse with a reason — it's shown in the
|
|
32
|
+
* column while the card hovers over it. Moves inside the same column are always allowed.
|
|
33
|
+
*/
|
|
34
|
+
canMove?: (move: KanbanMove<T>) => boolean | string;
|
|
35
|
+
/** Card face. Defaults to `<KanbanCard {...item} />`. */
|
|
36
|
+
renderCard?: (item: T, state: KanbanCardState) => ReactNode;
|
|
37
|
+
/** Click, or Enter on a focused card. */
|
|
38
|
+
onCardOpen?: (item: T) => void;
|
|
39
|
+
/** Shows "카드 추가" at the bottom of each column; Enter adds and keeps the field open for the next one. */
|
|
40
|
+
onCardAdd?: (columnId: string, title: string) => void;
|
|
41
|
+
/** Trailing buttons or a menu in each column header. */
|
|
42
|
+
columnActions?: (column: KanbanColumn) => ReactNode;
|
|
43
|
+
/** Name of a card in announcements. Defaults to a string `title`, else the id. */
|
|
44
|
+
getItemLabel?: (item: T) => string;
|
|
45
|
+
/** Column width in px. */
|
|
46
|
+
columnWidth?: number;
|
|
47
|
+
/** Shown in an empty column. */
|
|
48
|
+
emptyLabel?: ReactNode;
|
|
49
|
+
'aria-label'?: string;
|
|
50
|
+
className?: string;
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A board of columns whose cards move by drag or keyboard.
|
|
55
|
+
*
|
|
56
|
+
* - Pointer: a press past `TIMING.dragThreshold` (touch: a `TIMING.longPress` hold) lifts a floating
|
|
57
|
+
* copy; a gap opens where it would land and the other cards slide aside. Release commits and the
|
|
58
|
+
* copy flies into its slot; Esc or a refusing column sends it home. Near a scroll edge the board and
|
|
59
|
+
* the column scroll faster the closer the pointer gets.
|
|
60
|
+
* - Keyboard: arrows move focus, Space lifts, arrows move the card, Space / Enter drops, Esc cancels.
|
|
61
|
+
* Every step is announced.
|
|
62
|
+
* - Every layout change (preview, commit, cancel) animates from the old position (FLIP).
|
|
63
|
+
*/
|
|
64
|
+
export declare function KanbanBoard<T extends KanbanItem = KanbanItem & KanbanCardProps>({ columns, value: valueProp, defaultValue, onValueChange, canMove, renderCard, onCardOpen, onCardAdd, columnActions, getItemLabel, columnWidth, emptyLabel, 'aria-label': ariaLabel, className, style, }: KanbanBoardProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type Tone } from '../../primitives';
|
|
3
|
+
export interface KanbanLabel {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
tone?: Tone;
|
|
6
|
+
}
|
|
7
|
+
export interface KanbanCardProps {
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Small status / category badges above the title. */
|
|
11
|
+
labels?: KanbanLabel[];
|
|
12
|
+
/** People on the card, shown as overlapping avatars at the bottom right. */
|
|
13
|
+
assignees?: string[];
|
|
14
|
+
/** Due date text ("10월 28일"). */
|
|
15
|
+
due?: ReactNode;
|
|
16
|
+
/** warning: due soon · danger: overdue. */
|
|
17
|
+
dueTone?: 'default' | 'warning' | 'danger';
|
|
18
|
+
/** Checklist progress; turns green when everything is done. */
|
|
19
|
+
checklist?: {
|
|
20
|
+
done: number;
|
|
21
|
+
total: number;
|
|
22
|
+
};
|
|
23
|
+
comments?: number;
|
|
24
|
+
attachments?: number;
|
|
25
|
+
/** Anything else for the bottom row. */
|
|
26
|
+
meta?: ReactNode;
|
|
27
|
+
/** The card is the floating copy under the pointer. */
|
|
28
|
+
dragging?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The default card face for KanbanBoard: labels, title, a clamped description and a bottom row of
|
|
32
|
+
* facts (due date · checklist · comments · files) with assignees on the right. Assembled from
|
|
33
|
+
* Card / Stack / Inline / Text / Badge only.
|
|
34
|
+
*/
|
|
35
|
+
export declare function KanbanCard({ title, description, labels, assignees, due, dueTone, checklist, comments, attachments, meta, dragging, }: KanbanCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface KanbanItem {
|
|
2
|
+
id: string;
|
|
3
|
+
}
|
|
4
|
+
/** Column id → its cards, top to bottom. */
|
|
5
|
+
export type KanbanValue<T extends KanbanItem = KanbanItem> = Record<string, T[]>;
|
|
6
|
+
export interface KanbanPosition {
|
|
7
|
+
columnId: string;
|
|
8
|
+
/** Index in the column with the moved card taken out. */
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
export interface KanbanMove<T extends KanbanItem = KanbanItem> {
|
|
12
|
+
item: T;
|
|
13
|
+
from: KanbanPosition;
|
|
14
|
+
to: KanbanPosition;
|
|
15
|
+
}
|
|
16
|
+
/** The board with one card moved to `to` (index counted without the card). */
|
|
17
|
+
export declare function moveKanbanItem<T extends KanbanItem>(value: KanbanValue<T>, id: string, to: KanbanPosition): KanbanValue<T>;
|
|
18
|
+
/** The card with this id and where it is. */
|
|
19
|
+
export declare function locateKanbanItem<T extends KanbanItem>(value: KanbanValue<T>, id: string): {
|
|
20
|
+
item: T;
|
|
21
|
+
position: {
|
|
22
|
+
columnId: string;
|
|
23
|
+
index: number;
|
|
24
|
+
};
|
|
25
|
+
} | null;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type ChartRow, type ChartSeries, type ChartTone } from '../Chart/chart';
|
|
3
|
+
import './LineChart.css';
|
|
4
|
+
export type LineSeries = ChartSeries;
|
|
5
|
+
export type LineChartRow = ChartRow;
|
|
6
|
+
/** A highlighted x range behind the plot, from row index `from` to row index `to`. */
|
|
7
|
+
export interface LineChartBand {
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
/** Soft fill. Defaults to `warning`. */
|
|
11
|
+
tone?: ChartTone;
|
|
12
|
+
}
|
|
13
|
+
/** A dashed horizontal line at `value` (threshold, target). */
|
|
14
|
+
export interface LineChartReferenceLine {
|
|
15
|
+
value: number;
|
|
16
|
+
/** Small text at the right end, above the line. */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** Line and label color. Defaults to `neutral`. */
|
|
19
|
+
tone?: ChartTone;
|
|
20
|
+
}
|
|
21
|
+
export interface LineChartProps {
|
|
22
|
+
data: LineChartRow[];
|
|
23
|
+
/** Field used for the x axis (a label per row, e.g. '3월 6일'). */
|
|
24
|
+
xKey: string;
|
|
25
|
+
series: LineSeries[];
|
|
26
|
+
/** Plot height in px (axis labels included). */
|
|
27
|
+
height?: number;
|
|
28
|
+
/** linear: straight segments · smooth: monotone curve that never overshoots the data. */
|
|
29
|
+
curve?: 'linear' | 'smooth';
|
|
30
|
+
/** Fill under each line: `true`/`'gradient'` fades downward, `'solid'` is one flat soft tint. */
|
|
31
|
+
area?: boolean | 'gradient' | 'solid';
|
|
32
|
+
/**
|
|
33
|
+
* Pile the series on top of each other: `stacked` adds the values, `percent` scales every row to
|
|
34
|
+
* 100% (y axis 0–1, tooltip shows shares). Missing values count as 0 in a stack.
|
|
35
|
+
*/
|
|
36
|
+
stack?: 'stacked' | 'percent';
|
|
37
|
+
/** Draw straight across `null` gaps instead of breaking the line. */
|
|
38
|
+
connectNulls?: boolean;
|
|
39
|
+
/** Footer row with the sum of the row. Defaults to on for stacks. */
|
|
40
|
+
showTotal?: boolean;
|
|
41
|
+
/** Number of y-axis labels, 0 included. */
|
|
42
|
+
yTickCount?: number;
|
|
43
|
+
/** Force the top of the y axis; otherwise a round number above the largest value. */
|
|
44
|
+
yMax?: number;
|
|
45
|
+
/** Exact y-axis values (e.g. `[0, 12, 24]`); overrides `yTickCount` and `yMax`. */
|
|
46
|
+
yTicks?: number[];
|
|
47
|
+
/** auto: evenly spaced labels · edges: only the first and last row (e.g. '96초 전' … '지금'). */
|
|
48
|
+
xTicks?: 'auto' | 'edges';
|
|
49
|
+
/** Highlighted x ranges behind the plot. */
|
|
50
|
+
bands?: LineChartBand[];
|
|
51
|
+
/** Dashed horizontal lines (thresholds, targets). */
|
|
52
|
+
referenceLines?: LineChartReferenceLine[];
|
|
53
|
+
/** A dot on the last point of each line; `'pulse'` adds a repeating ring (live data). */
|
|
54
|
+
endDot?: boolean | 'pulse';
|
|
55
|
+
/**
|
|
56
|
+
* Each data change appends a row and drops the oldest (sliding window): the plot slides left by one
|
|
57
|
+
* step instead of morphing. A number sets the slide in ms — pass the update interval for a continuous scroll.
|
|
58
|
+
*/
|
|
59
|
+
streaming?: boolean | number;
|
|
60
|
+
/** Value in the tooltip. Defaults to `1,234`. */
|
|
61
|
+
formatValue?: (value: number, series: LineSeries) => string;
|
|
62
|
+
/** Y-axis labels. Defaults to compact Korean (`6천`, `1.2만`), or `45%` for `stack="percent"`. */
|
|
63
|
+
formatAxisValue?: (value: number) => string;
|
|
64
|
+
/** X-axis labels. Defaults to the raw `xKey` value. */
|
|
65
|
+
formatX?: (row: LineChartRow, index: number) => string;
|
|
66
|
+
/** Tooltip heading. Defaults to `formatX`. */
|
|
67
|
+
formatTitle?: (row: LineChartRow, index: number) => ReactNode;
|
|
68
|
+
/** Tooltip row order: biggest value first, the order of `series`, or `reverse` (top of a stack first; the default for stacks). */
|
|
69
|
+
tooltipSort?: 'value' | 'series' | 'reverse';
|
|
70
|
+
/** Legend under the plot. Hovering an entry highlights its line. */
|
|
71
|
+
legend?: boolean;
|
|
72
|
+
/** Highlighted row (controlled). `null` = nothing highlighted. */
|
|
73
|
+
activeIndex?: number | null;
|
|
74
|
+
defaultActiveIndex?: number | null;
|
|
75
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
76
|
+
/** Accessible name of the chart. */
|
|
77
|
+
'aria-label'?: string;
|
|
78
|
+
className?: string;
|
|
79
|
+
style?: CSSProperties;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A multi-series line (or area) chart. Hover, touch or arrow keys move a guide across the rows; a
|
|
83
|
+
* raised Card follows it with every series' value, flipping sides near the right edge.
|
|
84
|
+
*/
|
|
85
|
+
export declare function LineChart({ data, xKey, series, height, curve, area, stack, connectNulls, showTotal, yTickCount, yMax, yTicks, xTicks, bands, referenceLines, endDot, streaming, formatValue, formatAxisValue, formatX, formatTitle, tooltipSort, legend, activeIndex, defaultActiveIndex, onActiveIndexChange, 'aria-label': ariaLabel, className, style, }: LineChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import './List.css';
|
|
3
|
+
export interface ListProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** plain: rows on the page · inset: rows grouped on a white card. */
|
|
6
|
+
variant?: 'plain' | 'inset';
|
|
7
|
+
density?: 'compact' | 'default' | 'comfortable';
|
|
8
|
+
/** A heading above the rows (e.g. "멤버 6명"). */
|
|
9
|
+
label?: ReactNode;
|
|
10
|
+
/** Rows rise in when added (and fold away when a row is `leaving`). For lists that change while you look. */
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Rows of people, files, settings… separated by spacing, never by lines. */
|
|
17
|
+
export declare function List({ children, variant, density, label, animated, className, style, 'aria-label': ariaLabel }: ListProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace List {
|
|
19
|
+
var Item: typeof ListItem;
|
|
20
|
+
}
|
|
21
|
+
export interface ListItemProps {
|
|
22
|
+
/** Main line. */
|
|
23
|
+
title: ReactNode;
|
|
24
|
+
/** Second line in gray. */
|
|
25
|
+
description?: ReactNode;
|
|
26
|
+
/** Avatar, icon or thumbnail on the left. */
|
|
27
|
+
leading?: ReactNode;
|
|
28
|
+
/** Small gray text on the right (time, size, count). */
|
|
29
|
+
meta?: ReactNode;
|
|
30
|
+
/** Controls on the right: buttons, a switch, a badge, a menu. */
|
|
31
|
+
trailing?: ReactNode;
|
|
32
|
+
/** Makes the whole row a link. */
|
|
33
|
+
href?: string;
|
|
34
|
+
/** Makes the whole row a button (Enter / Space work too). */
|
|
35
|
+
onClick?: () => void;
|
|
36
|
+
/** Shows a › at the end of clickable rows that open something. */
|
|
37
|
+
chevron?: boolean;
|
|
38
|
+
selected?: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/** Where the leading / trailing parts sit when the text runs to several lines. */
|
|
41
|
+
align?: 'center' | 'start';
|
|
42
|
+
/** Folds the row to zero height (play this, then unmount). Content below slides up. */
|
|
43
|
+
leaving?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* default: a selected row gets the gray fill · raised: a selected row becomes a white card
|
|
46
|
+
* with a soft lift — for lists on a soft gray panel (the list side of a SplitView).
|
|
47
|
+
*/
|
|
48
|
+
variant?: 'default' | 'raised';
|
|
49
|
+
/**
|
|
50
|
+
* 0–1: a soft fill grows behind the row's content from the left (a job's progress inside its row).
|
|
51
|
+
* The width animates as it changes. Say the progress in the text too; the fill is decorative.
|
|
52
|
+
*/
|
|
53
|
+
progress?: number;
|
|
54
|
+
/** Color of the `progress` fill. */
|
|
55
|
+
progressTone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* One row. With `href` / `onClick` the whole row is pressable; controls in `trailing`
|
|
60
|
+
* still work on their own and don't trigger the row.
|
|
61
|
+
*/
|
|
62
|
+
export declare function ListItem({ title, description, leading, meta, trailing, href, onClick, chevron, selected, disabled, align, leaving, variant, progress, progressTone, className, }: ListItemProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type FloatingOptions } from '../../hooks';
|
|
3
|
+
import './Listbox.css';
|
|
4
|
+
/** One choice in a Select / Combobox. */
|
|
5
|
+
export interface ListOption<V extends string = string> {
|
|
6
|
+
value: V;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** Short muted text at the right end of the row (a dial code, a count). */
|
|
11
|
+
meta?: ReactNode;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Options sharing a group name are listed under one heading (keep them adjacent). */
|
|
14
|
+
group?: string;
|
|
15
|
+
/** Extra terms the Combobox filter matches on (aliases, English names, …). */
|
|
16
|
+
keywords?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface OptionState {
|
|
19
|
+
active: boolean;
|
|
20
|
+
selected: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** A trailing row that is not a value, e.g. "'foo' 추가". */
|
|
24
|
+
export interface ListAction {
|
|
25
|
+
label: ReactNode;
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
onSelect: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const optionId: (listId: string, index: number) => string;
|
|
30
|
+
type Navigable = {
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare function nextEnabled(items: Navigable[], from: number, dir: 1 | -1): number;
|
|
34
|
+
export declare const firstEnabled: (items: Navigable[]) => number;
|
|
35
|
+
export declare function lastEnabled(items: Navigable[]): number;
|
|
36
|
+
export interface ListboxPopoverProps extends FloatingOptions {
|
|
37
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
38
|
+
/** Playing the exit animation (see usePresence); the panel ignores the pointer meanwhile. */
|
|
39
|
+
closing?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
export declare const ListboxPopover: import("react").ForwardRefExoticComponent<ListboxPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export interface ListboxProps<V extends string> {
|
|
45
|
+
id: string;
|
|
46
|
+
options: ListOption<V>[];
|
|
47
|
+
activeIndex: number;
|
|
48
|
+
isSelected: (value: V) => boolean;
|
|
49
|
+
onSelect: (option: ListOption<V>) => void;
|
|
50
|
+
onActiveChange: (index: number) => void;
|
|
51
|
+
multiple?: boolean;
|
|
52
|
+
renderOption?: (option: ListOption<V>, state: OptionState) => ReactNode;
|
|
53
|
+
/** Shown when there are no options and no action. */
|
|
54
|
+
emptyText?: ReactNode;
|
|
55
|
+
action?: ListAction;
|
|
56
|
+
style?: CSSProperties;
|
|
57
|
+
'aria-label'?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function Listbox<V extends string>({ id, options, activeIndex, isSelected, onSelect, onActiveChange, multiple, renderOption, emptyText, action, style, 'aria-label': ariaLabel, }: ListboxProps<V>): import("react").JSX.Element;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type DateInput, type Tone } from '../../primitives';
|
|
3
|
+
import './Marker.css';
|
|
4
|
+
export type MarkerTone = Tone;
|
|
5
|
+
export interface MarkerProps {
|
|
6
|
+
/** A 16px icon that says what happened (UserPlus, GitMerge, Pin). */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/** Icon colour. neutral (muted, like the text) for most events; a status colour when the event carries one (merged = success). */
|
|
9
|
+
tone?: MarkerTone;
|
|
10
|
+
/** What happened, in one muted line. `Link variant="inherit"` for references (#482). */
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/** When it happened; a short relative time after the text with the full date on hover. */
|
|
13
|
+
date?: DateInput;
|
|
14
|
+
/**
|
|
15
|
+
* Width of the icon column in px, with the icon centred in it. Pass a `Comment`'s `avatarSize`
|
|
16
|
+
* so the icon sits under the avatars and the text lines up with the messages.
|
|
17
|
+
*/
|
|
18
|
+
gutter?: number;
|
|
19
|
+
/** Slide up and fade in when it mounts — for an event that just arrived in a live thread. */
|
|
20
|
+
appear?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One line in a thread that marks something that happened rather than something someone said:
|
|
26
|
+
* a member joined, a PR was merged, a message was pinned. Muted text after a small icon.
|
|
27
|
+
*/
|
|
28
|
+
export declare function Marker({ icon, tone, children, date, gutter, appear, className, style }: MarkerProps): import("react").JSX.Element;
|