@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,70 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps, type ButtonVariant, type TooltipSide } from '../../primitives';
|
|
3
|
+
import './Toolbar.css';
|
|
4
|
+
export type ToolbarSize = 'sm' | 'md';
|
|
5
|
+
export type ToolbarVariant = 'plain' | 'floating';
|
|
6
|
+
export interface ToolbarProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Name of the toolbar ("서식"). Or use `aria-labelledby`. */
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
'aria-labelledby'?: string;
|
|
11
|
+
/** horizontal: ←→ move · vertical: ↑↓ move. */
|
|
12
|
+
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
/** plain: no surface, just spacing · floating: white surface lifted by a shadow (no border). */
|
|
14
|
+
variant?: ToolbarVariant;
|
|
15
|
+
/** Size of the ToolbarButtons inside (match ToggleGroup `size` yourself). */
|
|
16
|
+
size?: ToolbarSize;
|
|
17
|
+
/** Arrow keys wrap from the last item to the first and back. */
|
|
18
|
+
loop?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Buttons that don't fit move into a "더보기" menu at the end (horizontal only). The toolbar then
|
|
21
|
+
* fills its parent's width. Only ToolbarButtons and ToolbarSeparators collapse, from the end.
|
|
22
|
+
*/
|
|
23
|
+
overflow?: boolean;
|
|
24
|
+
/** Label of the overflow menu button. */
|
|
25
|
+
overflowLabel?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A WAI-ARIA toolbar: one tab stop for the whole bar, then arrow keys (and Home/End) move
|
|
31
|
+
* between its buttons, toggle buttons, ToggleGroups and menu triggers. Focus is remembered, so
|
|
32
|
+
* tabbing back in lands on the last used control.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Toolbar({ children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, orientation, variant, size, loop, overflow, overflowLabel, className, style, }: ToolbarProps): import("react").JSX.Element;
|
|
35
|
+
export declare namespace Toolbar {
|
|
36
|
+
var Button: import("react").ForwardRefExoticComponent<ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
var Separator: typeof ToolbarSeparator;
|
|
38
|
+
var Spacer: typeof ToolbarSpacer;
|
|
39
|
+
}
|
|
40
|
+
export interface ToolbarButtonProps extends Omit<ButtonProps, 'size' | 'variant' | 'iconOnly' | 'shortcut'> {
|
|
41
|
+
/** What the button does ("굵게"). Accessible name of an icon-only button, the tooltip and the overflow menu row. */
|
|
42
|
+
label: string;
|
|
43
|
+
/** ghost by default; a primary action at the end of the bar can be 'primary'. */
|
|
44
|
+
variant?: ButtonVariant;
|
|
45
|
+
/** Makes it a toggle button (aria-pressed) — controlled. */
|
|
46
|
+
pressed?: boolean;
|
|
47
|
+
/** Makes it a toggle button — uncontrolled start. */
|
|
48
|
+
defaultPressed?: boolean;
|
|
49
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
50
|
+
/** Keyboard hint shown in the tooltip and the overflow menu, e.g. ['mod', 'B']. Add `hotkey` to also listen for it. */
|
|
51
|
+
shortcut?: string[];
|
|
52
|
+
/** Tooltip with `label` + shortcut. On by default for icon-only buttons; pass content to override, false to turn off. */
|
|
53
|
+
tooltip?: boolean | ReactNode;
|
|
54
|
+
tooltipSide?: TooltipSide;
|
|
55
|
+
/**
|
|
56
|
+
* May move into the overflow menu when space runs out (Toolbar `overflow`). Turn off for
|
|
57
|
+
* buttons whose action isn't their own click, like a DropdownMenu trigger.
|
|
58
|
+
*/
|
|
59
|
+
collapsible?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A ghost Button sized by the Toolbar. Icon-only buttons get their `label` as the accessible name
|
|
63
|
+
* and as a tooltip with the shortcut keys. With `pressed`/`defaultPressed` it toggles, and the
|
|
64
|
+
* pressed fill grows in like a ToggleGroup item.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ToolbarButton: import("react").ForwardRefExoticComponent<ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
67
|
+
/** A short line between groups of a Toolbar, across its direction. Collapses with its neighbours. */
|
|
68
|
+
export declare function ToolbarSeparator(): import("react").JSX.Element;
|
|
69
|
+
/** Pushes the items after it to the far end of the Toolbar. */
|
|
70
|
+
export declare function ToolbarSpacer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import '../Chart/Chart.css';
|
|
3
|
+
import './Tracker.css';
|
|
4
|
+
/** success: up · warning: degraded · danger: outage · neutral: a deployment or maintenance · empty: no data. */
|
|
5
|
+
export type TrackerTone = 'success' | 'warning' | 'danger' | 'neutral' | 'accent' | 'empty';
|
|
6
|
+
export type TrackerSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
export interface TrackerBlock {
|
|
8
|
+
key: string;
|
|
9
|
+
tone?: TrackerTone;
|
|
10
|
+
/** Block color instead of `tone`: a CSS variable (`--chart-3`) or any color. */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Tooltip title, usually the date ("10월 25일"). */
|
|
13
|
+
tooltip?: ReactNode;
|
|
14
|
+
/** Status name in the tooltip row. Defaults to the tone's name ("정상", "장애"…). */
|
|
15
|
+
status?: ReactNode;
|
|
16
|
+
/** Value on the right of the tooltip row ("99.2%", "3분"). */
|
|
17
|
+
value?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface TrackerProps {
|
|
20
|
+
/** One block per period, oldest first. */
|
|
21
|
+
data: TrackerBlock[];
|
|
22
|
+
/** Block height preset: 24 · 32 · 40 px. */
|
|
23
|
+
size?: TrackerSize;
|
|
24
|
+
/** Block height in px, overriding `size`. */
|
|
25
|
+
height?: number;
|
|
26
|
+
/** fill: blocks shrink or grow to fill the width · fixed: blocks keep their width (6 · 8 · 10 px). */
|
|
27
|
+
layout?: 'fill' | 'fixed';
|
|
28
|
+
/** Value card on hover / keyboard focus. */
|
|
29
|
+
tooltip?: boolean;
|
|
30
|
+
activeIndex?: number | null;
|
|
31
|
+
defaultActiveIndex?: number | null;
|
|
32
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
33
|
+
'aria-label'?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A status history strip: one equal block per day (or hour), coloured by how it went.
|
|
39
|
+
* Only the two ends of the strip are well rounded. Blocks rise in from left to right on mount.
|
|
40
|
+
* The first tooltip waits `TIMING.tooltipDelay`; moving along the strip after that is instant.
|
|
41
|
+
* Focus the strip and use ←/→, Home/End, Esc.
|
|
42
|
+
*/
|
|
43
|
+
export declare function Tracker({ data, size, height, layout, tooltip, activeIndex, defaultActiveIndex, onActiveIndexChange, 'aria-label': ariaLabel, className, style, }: TrackerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type Space } from '../../primitives';
|
|
3
|
+
import './TreeDiagram.css';
|
|
4
|
+
/** One node of the diagram. Put whatever you like in it with `renderNode` (usually a Card). */
|
|
5
|
+
export interface TreeDiagramNode<T = unknown> {
|
|
6
|
+
/** Unique across the whole diagram. */
|
|
7
|
+
id: string;
|
|
8
|
+
data?: T;
|
|
9
|
+
children?: TreeDiagramNode<T>[];
|
|
10
|
+
/**
|
|
11
|
+
* How this node's children sit: `row` — side by side one level down, joined by a bus line ·
|
|
12
|
+
* `indented` — a vertical list hanging under the node, joined by elbows on the left.
|
|
13
|
+
* Overrides `indentFrom`. Children of an indented node are indented too unless they say otherwise.
|
|
14
|
+
*/
|
|
15
|
+
childLayout?: 'row' | 'indented';
|
|
16
|
+
}
|
|
17
|
+
export interface TreeDiagramNodeState {
|
|
18
|
+
/** 0 for the roots. */
|
|
19
|
+
depth: number;
|
|
20
|
+
/** Number of direct children (0 for leaves). */
|
|
21
|
+
childCount: number;
|
|
22
|
+
collapsed: boolean;
|
|
23
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
24
|
+
/** A ready-made "3 ⌄" toggle wired to this node, or null for leaves. Place it inside your card. */
|
|
25
|
+
toggle: ReactNode;
|
|
26
|
+
/** How this node's own children are laid out. */
|
|
27
|
+
childLayout: 'row' | 'indented';
|
|
28
|
+
}
|
|
29
|
+
export interface TreeDiagramProps<T = unknown> {
|
|
30
|
+
/** Root nodes (usually one). Several roots sit side by side. */
|
|
31
|
+
items: TreeDiagramNode<T>[];
|
|
32
|
+
/** Draws a node — typically a `Card` with an Avatar, Text and `state.toggle`. */
|
|
33
|
+
renderNode: (node: TreeDiagramNode<T>, state: TreeDiagramNodeState) => ReactNode;
|
|
34
|
+
/** Collapsed node ids (controlled). */
|
|
35
|
+
collapsed?: string[];
|
|
36
|
+
defaultCollapsed?: string[];
|
|
37
|
+
onCollapsedChange?: (collapsed: string[]) => void;
|
|
38
|
+
/** Nodes at this depth or deeper list their children indented instead of in a row (0 = the roots). */
|
|
39
|
+
indentFrom?: number;
|
|
40
|
+
/** Space between siblings in a row; also between rows of an indented list (half of it). */
|
|
41
|
+
gap?: Space;
|
|
42
|
+
/** Vertical space between a parent and its row of children. */
|
|
43
|
+
levelGap?: Space;
|
|
44
|
+
/** How far an indented list sits to the right of its parent. */
|
|
45
|
+
indent?: Space;
|
|
46
|
+
/** A fixed width for every node box, so rows line up. */
|
|
47
|
+
nodeWidth?: number | string;
|
|
48
|
+
className?: string;
|
|
49
|
+
style?: CSSProperties;
|
|
50
|
+
'aria-label'?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface TreeDiagramToggleProps {
|
|
53
|
+
/** Number of children it hides. */
|
|
54
|
+
count: number;
|
|
55
|
+
collapsed: boolean;
|
|
56
|
+
onToggle: () => void;
|
|
57
|
+
'aria-controls'?: string;
|
|
58
|
+
'aria-label'?: string;
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|
|
61
|
+
/** "3 ⌄": the child count with a chevron that folds a subtree. Clicks don't reach a clickable card around it. */
|
|
62
|
+
export declare function TreeDiagramToggle({ count, collapsed, onToggle, 'aria-controls': controls, 'aria-label': ariaLabel, className }: TreeDiagramToggleProps): import("react").JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* A hierarchy drawn as node boxes in levels (org chart, project breakdown). Connectors are measured
|
|
65
|
+
* from the real node boxes, so they follow nodes that change size, collapse or reflow. Deep levels can
|
|
66
|
+
* hang as indented lists. Scrolls sideways when it's wider than its container.
|
|
67
|
+
*/
|
|
68
|
+
export declare function TreeDiagram<T = unknown>({ items, renderNode, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, indentFrom, gap, levelGap, indent, nodeWidth, className, style, 'aria-label': ariaLabel, }: TreeDiagramProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type Space } from '../../primitives';
|
|
3
|
+
import './TreeView.css';
|
|
4
|
+
export type TreeDensity = 'compact' | 'default' | 'comfortable';
|
|
5
|
+
/** Fixed row height (px) per density. Every row is exactly this tall, so a chart beside the tree can line up row by row. */
|
|
6
|
+
export declare const TREE_ROW_HEIGHT: Record<TreeDensity, number>;
|
|
7
|
+
/** One node of the tree. */
|
|
8
|
+
export interface TreeNode<T = unknown> {
|
|
9
|
+
/** Unique across the whole tree. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Bold name. */
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
/** Muted text after the name; truncates with an ellipsis. */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** Icon, avatar or file icon before the name. */
|
|
16
|
+
leading?: ReactNode;
|
|
17
|
+
/** Right side: a duration, a count, a spinner… */
|
|
18
|
+
trailing?: ReactNode;
|
|
19
|
+
/** Faded; can be focused but not selected or expanded. */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Text used by typeahead when `label` is not a string. */
|
|
22
|
+
textValue?: string;
|
|
23
|
+
children?: TreeNode<T>[];
|
|
24
|
+
/** Anything you need back in `renderItem` / callbacks. */
|
|
25
|
+
data?: T;
|
|
26
|
+
}
|
|
27
|
+
/** One visible row, in display order. */
|
|
28
|
+
export interface TreeRow<T = unknown> {
|
|
29
|
+
id: string;
|
|
30
|
+
node: TreeNode<T>;
|
|
31
|
+
/** 0 for top-level rows. */
|
|
32
|
+
depth: number;
|
|
33
|
+
/** Position in the visible list (0-based) — multiply by the row height for the row's top. */
|
|
34
|
+
index: number;
|
|
35
|
+
parentId: string | null;
|
|
36
|
+
hasChildren: boolean;
|
|
37
|
+
expanded: boolean;
|
|
38
|
+
/** 1-based position among its siblings. */
|
|
39
|
+
posinset: number;
|
|
40
|
+
setsize: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The rows that are visible for a given set of expanded ids, top to bottom.
|
|
44
|
+
* Use it to draw something next to a TreeView (a timeline, a column of values) that lines up row by row.
|
|
45
|
+
*/
|
|
46
|
+
export declare function flattenTree<T>(items: TreeNode<T>[], expanded: Iterable<string>): TreeRow<T>[];
|
|
47
|
+
export interface TreeItemProps extends Omit<TreeNode, 'children' | 'data'> {
|
|
48
|
+
/** Nested TreeItems. */
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/** Declares one node when you'd rather write the tree as JSX. TreeView reads its props; it renders nothing itself. */
|
|
52
|
+
export declare function TreeItem(props: TreeItemProps): null;
|
|
53
|
+
export interface TreeItemState {
|
|
54
|
+
depth: number;
|
|
55
|
+
expanded: boolean;
|
|
56
|
+
selected: boolean;
|
|
57
|
+
focused: boolean;
|
|
58
|
+
hasChildren: boolean;
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface TreeViewProps<T = unknown> {
|
|
62
|
+
/** Data-driven nodes. Or write `<TreeItem>`s as children instead. */
|
|
63
|
+
items?: TreeNode<T>[];
|
|
64
|
+
/** `<TreeItem>` elements, when `items` isn't given. */
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
/** Expanded node ids (controlled). */
|
|
67
|
+
expanded?: string[];
|
|
68
|
+
defaultExpanded?: string[];
|
|
69
|
+
onExpandedChange?: (expanded: string[]) => void;
|
|
70
|
+
/** Selected node id (controlled). `null` = controlled, nothing selected. */
|
|
71
|
+
selected?: string | null;
|
|
72
|
+
defaultSelected?: string | null;
|
|
73
|
+
onSelectedChange?: (id: string | null) => void;
|
|
74
|
+
/** single: clicking / Enter selects a row · none: rows only expand and collapse. */
|
|
75
|
+
selectionMode?: 'single' | 'none';
|
|
76
|
+
/** Clicking a parent row also toggles it (file explorers). Default: true when `selectionMode="none"`. */
|
|
77
|
+
expandOnClick?: boolean;
|
|
78
|
+
/** Fires when a row is clicked or Enter / Space is pressed on it. */
|
|
79
|
+
onAction?: (node: TreeNode<T>) => void;
|
|
80
|
+
/** Row height and padding, like List. */
|
|
81
|
+
density?: TreeDensity;
|
|
82
|
+
/** Overrides the density's row height (px). */
|
|
83
|
+
rowHeight?: number;
|
|
84
|
+
/** Indent per level, on the 4px scale. The default (6 = 24px) puts a child's chevron under its parent's icon. */
|
|
85
|
+
indent?: Space;
|
|
86
|
+
/** Faint vertical guide lines under each open parent. */
|
|
87
|
+
guides?: boolean;
|
|
88
|
+
/** Children fold open and closed to their real height. Turn off when something beside the tree must follow row positions instantly. */
|
|
89
|
+
animated?: boolean;
|
|
90
|
+
/** Replaces the name + description part of a row. leading / trailing still come from the node. */
|
|
91
|
+
renderItem?: (node: TreeNode<T>, state: TreeItemState) => ReactNode;
|
|
92
|
+
/** Called with the visible rows (in order) whenever they change — expand, collapse, new items. */
|
|
93
|
+
onVisibleChange?: (rows: TreeRow<T>[]) => void;
|
|
94
|
+
className?: string;
|
|
95
|
+
style?: CSSProperties;
|
|
96
|
+
'aria-label'?: string;
|
|
97
|
+
'aria-labelledby'?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* An indented, expandable tree (WAI-ARIA tree). ↑↓ move, → expands or steps into children,
|
|
101
|
+
* ← collapses or steps to the parent, Home / End, Enter / Space select, * expands siblings,
|
|
102
|
+
* and typing jumps to a matching row. One row is in the tab order at a time.
|
|
103
|
+
*/
|
|
104
|
+
export declare function TreeView<T = unknown>({ items, children, expanded: expandedProp, defaultExpanded, onExpandedChange, selected: selectedProp, defaultSelected, onSelectedChange, selectionMode, expandOnClick, onAction, density, rowHeight, indent, guides, animated, renderItem, onVisibleChange, className, style, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: TreeViewProps<T>): import("react").JSX.Element;
|
|
105
|
+
export declare namespace TreeView {
|
|
106
|
+
var Item: typeof TreeItem;
|
|
107
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export { ToggleGroup, ToggleGroupItem } from './ToggleGroup/ToggleGroup';
|
|
2
|
+
export type { ToggleGroupItemProps, ToggleGroupProps, ToggleGroupSize, ToggleGroupVariant } from './ToggleGroup/ToggleGroup';
|
|
3
|
+
export { FilterChip, FilterChipGroup } from './FilterChips/FilterChips';
|
|
4
|
+
export type { FilterChipGroupProps, FilterChipProps, FilterChipSize, FilterChipVariant } from './FilterChips/FilterChips';
|
|
5
|
+
export { Slider } from './Slider/Slider';
|
|
6
|
+
export type { SliderMark, SliderProps, SliderValue } from './Slider/Slider';
|
|
7
|
+
export { Select } from './Select/Select';
|
|
8
|
+
export type { SelectProps } from './Select/Select';
|
|
9
|
+
export { MultiSelect } from './MultiSelect/MultiSelect';
|
|
10
|
+
export type { MultiSelectProps } from './MultiSelect/MultiSelect';
|
|
11
|
+
export { Combobox, defaultComboboxFilter } from './Combobox/Combobox';
|
|
12
|
+
export type { ComboboxProps } from './Combobox/Combobox';
|
|
13
|
+
export { Listbox, ListboxPopover } from './Listbox/Listbox';
|
|
14
|
+
export type { ListAction, ListOption, OptionState } from './Listbox/Listbox';
|
|
15
|
+
export { Toaster, toast } from './Toast';
|
|
16
|
+
export type { ToastAction, ToastContent, ToastData, ToastOptions, ToastType, ToasterPosition, ToasterProps } from './Toast';
|
|
17
|
+
export { OtpInput } from './OtpInput/OtpInput';
|
|
18
|
+
export type { OtpInputProps, OtpPattern } from './OtpInput/OtpInput';
|
|
19
|
+
export { Skeleton, SkeletonCircle, SkeletonGroup, SkeletonText } from './Skeleton/Skeleton';
|
|
20
|
+
export type { SkeletonAnimation, SkeletonGroupProps, SkeletonProps, SkeletonTextProps } from './Skeleton/Skeleton';
|
|
21
|
+
export { EmptyState } from './EmptyState/EmptyState';
|
|
22
|
+
export type { EmptyStateProps, EmptyStateTone } from './EmptyState/EmptyState';
|
|
23
|
+
export { Card, CardBody, CardFooter, CardHeader, CardMedia } from './Card/Card';
|
|
24
|
+
export type { CardFooterProps, CardHeaderProps, CardPadding, CardProps, CardVariant } from './Card/Card';
|
|
25
|
+
export { CardFrame } from './CardFrame/CardFrame';
|
|
26
|
+
export type { CardFrameProps } from './CardFrame/CardFrame';
|
|
27
|
+
export { ScaledPreview } from './ScaledPreview/ScaledPreview';
|
|
28
|
+
export type { ScaledPreviewProps, ScaledPreviewTone } from './ScaledPreview/ScaledPreview';
|
|
29
|
+
export { CodeBlock } from './CodeBlock/CodeBlock';
|
|
30
|
+
export type { CodeBlockProps } from './CodeBlock/CodeBlock';
|
|
31
|
+
export type { CodeLanguage } from './CodeBlock/highlight';
|
|
32
|
+
export { Breadcrumb } from './Breadcrumb/Breadcrumb';
|
|
33
|
+
export type { BreadcrumbItem, BreadcrumbProps } from './Breadcrumb/Breadcrumb';
|
|
34
|
+
export { Sidebar, SidebarGroup, SidebarItem } from './Sidebar/Sidebar';
|
|
35
|
+
export type { SidebarGroupProps, SidebarItemProps, SidebarProps } from './Sidebar/Sidebar';
|
|
36
|
+
export { AppShell } from './AppShell/AppShell';
|
|
37
|
+
export type { AppShellProps } from './AppShell/AppShell';
|
|
38
|
+
export { Table } from './Table/Table';
|
|
39
|
+
export type { TableColumn, TableProps } from './Table/Table';
|
|
40
|
+
export { List, ListItem } from './List/List';
|
|
41
|
+
export type { ListItemProps, ListProps } from './List/List';
|
|
42
|
+
export { Dialog } from './Dialog/Dialog';
|
|
43
|
+
export type { DialogProps } from './Dialog/Dialog';
|
|
44
|
+
export { AlertDialog } from './Dialog/AlertDialog';
|
|
45
|
+
export type { AlertDialogProps } from './Dialog/AlertDialog';
|
|
46
|
+
export { Popover } from './Popover/Popover';
|
|
47
|
+
export type { PopoverProps } from './Popover/Popover';
|
|
48
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, } from './DropdownMenu/DropdownMenu';
|
|
49
|
+
export type { DropdownMenuCheckboxItemProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuSubProps } from './DropdownMenu/DropdownMenu';
|
|
50
|
+
export { Tab, TabList, TabPanel, Tabs } from './Tabs/Tabs';
|
|
51
|
+
export type { TabListProps, TabPanelProps, TabProps, TabsProps } from './Tabs/Tabs';
|
|
52
|
+
export { Alert, Banner } from './Alert/Alert';
|
|
53
|
+
export type { AlertProps, AlertTone, BannerProps } from './Alert/Alert';
|
|
54
|
+
export { Accordion, AccordionItem, Collapsible } from './Accordion/Accordion';
|
|
55
|
+
export type { AccordionItemProps, AccordionProps, CollapsibleProps } from './Accordion/Accordion';
|
|
56
|
+
export { Dropzone, matchesAccept } from './Dropzone/Dropzone';
|
|
57
|
+
export type { DropzoneProps } from './Dropzone/Dropzone';
|
|
58
|
+
export { FileUpload, formatBytes } from './FileUpload/FileUpload';
|
|
59
|
+
export type { FileUploadProps, UploadHandler, UploadItem, UploadStatus } from './FileUpload/FileUpload';
|
|
60
|
+
export { ProgressTracker } from './ProgressTracker/ProgressTracker';
|
|
61
|
+
export type { ProgressTrackerProps, TrackerStep } from './ProgressTracker/ProgressTracker';
|
|
62
|
+
export { DataGrid } from './DataGrid/DataGrid';
|
|
63
|
+
export type { DataGridProps } from './DataGrid/DataGrid';
|
|
64
|
+
export type { GridAggregate, GridCellEdit, GridColumn, GridColumnType, GridDensity, GridFilter, GridFilterOp, GridNumberFormat, GridOption, GridRow, GridSort, GridView, } from './DataGrid/types';
|
|
65
|
+
export { DEFAULT_VIEW as DEFAULT_GRID_VIEW } from './DataGrid/types';
|
|
66
|
+
export { Calendar } from './Calendar/Calendar';
|
|
67
|
+
export type { CalendarProps, DateRange } from './Calendar/Calendar';
|
|
68
|
+
export { DatePicker, DateRangePicker } from './Calendar/DatePicker';
|
|
69
|
+
export type { DatePickerProps, DateRangePickerProps } from './Calendar/DatePicker';
|
|
70
|
+
export { DEFAULT_DATE_PRESETS, formatDate, formatMonth } from './Calendar/date';
|
|
71
|
+
export type { DatePreset } from './Calendar/date';
|
|
72
|
+
export { LineChart } from './LineChart/LineChart';
|
|
73
|
+
export type { LineChartProps, LineChartRow, LineSeries } from './LineChart/LineChart';
|
|
74
|
+
export { BarChart } from './BarChart/BarChart';
|
|
75
|
+
export type { BarChartProps, BarChartRow, BarSeries } from './BarChart/BarChart';
|
|
76
|
+
export { PieChart } from './PieChart/PieChart';
|
|
77
|
+
export type { PieCenterContext, PieChartProps, PieSlice } from './PieChart/PieChart';
|
|
78
|
+
export { ChatComposer } from './ChatComposer/ChatComposer';
|
|
79
|
+
export type { ChatComposerProps } from './ChatComposer/ChatComposer';
|
|
80
|
+
export { ChartLegend, ChartTooltip } from './Chart/ChartParts';
|
|
81
|
+
export type { ChartLegendItem, ChartLegendProps, ChartTooltipRow } from './Chart/ChartParts';
|
|
82
|
+
export type { ChartRow, ChartSeries } from './Chart/chart';
|
|
83
|
+
export { Sparkbar } from './Sparkbar/Sparkbar';
|
|
84
|
+
export type { SparkbarProps } from './Sparkbar/Sparkbar';
|
|
85
|
+
export { Timeline, TimelineBar, TimelineRow } from './Timeline/Timeline';
|
|
86
|
+
export type { TimelineBarProps, TimelineBarTone, TimelineBarVariant, TimelineMarker, TimelineProps, TimelineRowProps, TimelineTone } from './Timeline/Timeline';
|
|
87
|
+
export { formatClock, useTimelineScale } from './Timeline/scale';
|
|
88
|
+
export type { TimelineScale } from './Timeline/scale';
|
|
89
|
+
export { formatOffset } from './Timeline/scale';
|
|
90
|
+
export type { TimelineBarSegment, TimelineDensity, TimelineLink } from './Timeline/Timeline';
|
|
91
|
+
export { Stat, StatGroup } from './Stat/Stat';
|
|
92
|
+
export type { StatGroupProps, StatLayout, StatProps, StatSize } from './Stat/Stat';
|
|
93
|
+
export { TREE_ROW_HEIGHT, TreeItem, TreeView, flattenTree } from './TreeView/TreeView';
|
|
94
|
+
export type { TreeDensity, TreeItemProps, TreeItemState, TreeNode, TreeRow, TreeViewProps } from './TreeView/TreeView';
|
|
95
|
+
export { TreeDiagram, TreeDiagramToggle } from './TreeDiagram/TreeDiagram';
|
|
96
|
+
export type { TreeDiagramNode, TreeDiagramNodeState, TreeDiagramProps, TreeDiagramToggleProps } from './TreeDiagram/TreeDiagram';
|
|
97
|
+
export { Comment, CommentThread } from './Comment/Comment';
|
|
98
|
+
export type { CommentProps, CommentThreadProps } from './Comment/Comment';
|
|
99
|
+
export { ChatBubble, ChatBubbleGroup } from './ChatBubble/ChatBubble';
|
|
100
|
+
export { formatChatTime } from './ChatBubble/formatChatTime';
|
|
101
|
+
export type { ChatBubbleGroupProps, ChatBubblePosition, ChatBubbleProps, ChatBubbleSide, ChatBubbleStatus, ChatBubbleTone } from './ChatBubble/ChatBubble';
|
|
102
|
+
export { NoticeStack } from './NoticeStack/NoticeStack';
|
|
103
|
+
export type { NoticeItem, NoticeStackProps } from './NoticeStack/NoticeStack';
|
|
104
|
+
export { CommandMenu, defaultCommandFilter } from './CommandMenu/CommandMenu';
|
|
105
|
+
export type { CommandGroup, CommandItem, CommandMenuProps } from './CommandMenu/CommandMenu';
|
|
106
|
+
export { DescriptionItem, DescriptionList, DescriptionSection } from './DescriptionList/DescriptionList';
|
|
107
|
+
export type { DescriptionItemProps, DescriptionListAlign, DescriptionListItem, DescriptionListLabelStyle, DescriptionListLayout, DescriptionListProps, DescriptionListSize, DescriptionListVariant, DescriptionSectionProps, } from './DescriptionList/DescriptionList';
|
|
108
|
+
export { Highlight } from './Highlight/Highlight';
|
|
109
|
+
export type { HighlightProps, HighlightTone } from './Highlight/Highlight';
|
|
110
|
+
export { FileChip } from './FileChip/FileChip';
|
|
111
|
+
export type { FileChipProps, FileChipVariant } from './FileChip/FileChip';
|
|
112
|
+
export type { ChartTooltipProps } from './Chart/ChartParts';
|
|
113
|
+
export type { ChartTone } from './Chart/chart';
|
|
114
|
+
export type { LineChartBand, LineChartReferenceLine } from './LineChart/LineChart';
|
|
115
|
+
export type { TrackerGroup } from './ProgressTracker/ProgressTracker';
|
|
116
|
+
export { ActionBar } from './ActionBar/ActionBar';
|
|
117
|
+
export type { ActionBarProps } from './ActionBar/ActionBar';
|
|
118
|
+
export { NumberStepper } from './NumberStepper/NumberStepper';
|
|
119
|
+
export type { NumberStepperProps } from './NumberStepper/NumberStepper';
|
|
120
|
+
export { SplitView } from './SplitView/SplitView';
|
|
121
|
+
export type { SplitViewProps } from './SplitView/SplitView';
|
|
122
|
+
export { InlineDiff } from './InlineDiff/InlineDiff';
|
|
123
|
+
export type { InlineDiffProps } from './InlineDiff/InlineDiff';
|
|
124
|
+
export { useDiffReview } from './InlineDiff/useDiffReview';
|
|
125
|
+
export type { DiffReview, DiffReviewOptions } from './InlineDiff/useDiffReview';
|
|
126
|
+
export { applyDiffDecisions, diffWords, listDiffChanges, resolveDiffSegments, tokenizeWords } from './InlineDiff/diff';
|
|
127
|
+
export type { DiffChange, DiffDecision, DiffDecisions, DiffSegment, DiffSegmentType, ResolvedDiffSegment } from './InlineDiff/diff';
|
|
128
|
+
export { StepList, StepListItem } from './StepList/StepList';
|
|
129
|
+
export type { StepListConnector, StepListDensity, StepListItemProps, StepListMarker, StepListProps, StepListSize, StepListStatus, StepListStep, } from './StepList/StepList';
|
|
130
|
+
export { Marker } from './Marker/Marker';
|
|
131
|
+
export type { MarkerProps, MarkerTone } from './Marker/Marker';
|
|
132
|
+
export { BarList } from './BarList/BarList';
|
|
133
|
+
export type { BarListItem, BarListProps, BarListSize, BarListSortOrder, BarListTone } from './BarList/BarList';
|
|
134
|
+
export { Tracker } from './Tracker/Tracker';
|
|
135
|
+
export type { TrackerBlock, TrackerProps, TrackerSize, TrackerTone } from './Tracker/Tracker';
|
|
136
|
+
export { AreaChart } from './AreaChart/AreaChart';
|
|
137
|
+
export type { AreaChartProps, AreaChartType } from './AreaChart/AreaChart';
|
|
138
|
+
export { SparkArea, SparkChart, SparkLine } from './SparkChart/SparkChart';
|
|
139
|
+
export type { SparkAreaProps, SparkChartProps, SparkLineProps } from './SparkChart/SparkChart';
|
|
140
|
+
export { sparkTrend } from './SparkChart/spark';
|
|
141
|
+
export type { SparkTone } from './SparkChart/spark';
|
|
142
|
+
export { ScatterChart } from './ScatterChart/ScatterChart';
|
|
143
|
+
export type { ScatterCategory, ScatterChartProps, ScatterChartRow, ScatterReferenceLine } from './ScatterChart/ScatterChart';
|
|
144
|
+
export { FunnelChart } from './FunnelChart/FunnelChart';
|
|
145
|
+
export type { FunnelChartProps } from './FunnelChart/FunnelChart';
|
|
146
|
+
export { funnelStats } from './FunnelChart/funnel';
|
|
147
|
+
export type { FunnelCalculateFrom, FunnelStep, FunnelStepStats } from './FunnelChart/funnel';
|
|
148
|
+
export { PhoneInput, PHONE_COUNTRIES, formatPhone, toE164 } from './PhoneInput/PhoneInput';
|
|
149
|
+
export type { PhoneCountry, PhoneInputProps } from './PhoneInput/PhoneInput';
|
|
150
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, } from './ContextMenu/ContextMenu';
|
|
151
|
+
export type { ContextMenuProps } from './ContextMenu/ContextMenu';
|
|
152
|
+
export { Menubar, MenubarCheckboxItem, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, } from './Menubar/Menubar';
|
|
153
|
+
export type { MenubarMenuProps, MenubarProps } from './Menubar/Menubar';
|
|
154
|
+
export { NavigationMenu, NavigationMenuFeature, NavigationMenuGroup, NavigationMenuItem, NavigationMenuLink, } from './NavigationMenu/NavigationMenu';
|
|
155
|
+
export type { NavigationMenuFeatureProps, NavigationMenuGroupProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuProps, } from './NavigationMenu/NavigationMenu';
|
|
156
|
+
export { Drawer, Sheet } from './Drawer/Drawer';
|
|
157
|
+
export type { DrawerProps, DrawerSide, DrawerSize, SheetProps } from './Drawer/Drawer';
|
|
158
|
+
export { HoverCard } from './HoverCard/HoverCard';
|
|
159
|
+
export type { HoverCardMetaItem, HoverCardProps } from './HoverCard/HoverCard';
|
|
160
|
+
export { Pagination } from './Pagination/Pagination';
|
|
161
|
+
export { paginationRange } from './Pagination/paginationRange';
|
|
162
|
+
export type { PaginationItem } from './Pagination/paginationRange';
|
|
163
|
+
export type { PaginationProps, PaginationRangeInfo, PaginationSize } from './Pagination/Pagination';
|
|
164
|
+
export { Toolbar, ToolbarButton, ToolbarSeparator, ToolbarSpacer } from './Toolbar/Toolbar';
|
|
165
|
+
export type { ToolbarButtonProps, ToolbarProps, ToolbarSize, ToolbarVariant } from './Toolbar/Toolbar';
|
|
166
|
+
export { KanbanBoard } from './Kanban/Kanban';
|
|
167
|
+
export type { KanbanBoardProps, KanbanCardState, KanbanColumn } from './Kanban/Kanban';
|
|
168
|
+
export { locateKanbanItem, moveKanbanItem } from './Kanban/move';
|
|
169
|
+
export type { KanbanItem, KanbanMove, KanbanPosition, KanbanValue } from './Kanban/move';
|
|
170
|
+
export { KanbanCard } from './Kanban/KanbanCard';
|
|
171
|
+
export type { KanbanCardProps, KanbanLabel } from './Kanban/KanbanCard';
|
|
172
|
+
export { ScrollArea } from './ScrollArea/ScrollArea';
|
|
173
|
+
export type { ScrollAreaOrientation, ScrollAreaProps } from './ScrollArea/ScrollArea';
|
|
174
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './Resizable/Resizable';
|
|
175
|
+
export type { ResizableDirection, ResizableHandleProps, ResizablePanelGroupProps, ResizablePanelProps } from './Resizable/Resizable';
|
|
176
|
+
export { CHART_COLOR_PRESETS, ColorField, ColorPicker } from './ColorPicker/ColorPicker';
|
|
177
|
+
export type { ColorFieldProps, ColorPickerProps, ColorPreset } from './ColorPicker/ColorPicker';
|
|
178
|
+
export { formatColor, formatHex, formatHsl, formatRgb, hslToRgb, hsvToRgb, normalizeHex, parseColor, rgbToHsl, rgbToHsv } from './ColorPicker/color';
|
|
179
|
+
export type { ColorFormat, Hsla, Hsva, Rgba } from './ColorPicker/color';
|
|
180
|
+
export { Rating } from './Rating/Rating';
|
|
181
|
+
export type { RatingProps, RatingSize, RatingTone } from './Rating/Rating';
|
|
182
|
+
export { TagInput } from './TagInput/TagInput';
|
|
183
|
+
export type { TagInputProps, TagRejectReason } from './TagInput/TagInput';
|
|
184
|
+
export { TimePicker } from './TimePicker/TimePicker';
|
|
185
|
+
export type { TimePickerProps } from './TimePicker/TimePicker';
|
|
186
|
+
export { formatDuration, formatTime, minutesToTime, parseTimeInput, timeToMinutes } from './TimePicker/time';
|
|
187
|
+
export { SocialLoginButton } from './SocialLoginButton/SocialLoginButton';
|
|
188
|
+
export type { SocialLoginAction, SocialLoginButtonProps, SocialProvider } from './SocialLoginButton/SocialLoginButton';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { useControllableState } from './useControllableState';
|
|
2
|
+
export { useSelection } from './useSelection';
|
|
3
|
+
export type { MultipleSelectionProps, SelectionProps, SelectionValue, SingleSelectionProps } from './useSelection';
|
|
4
|
+
export { useFloating } from './useFloating';
|
|
5
|
+
export type { FloatingOptions } from './useFloating';
|
|
6
|
+
export { useDismiss } from './useDismiss';
|
|
7
|
+
export { usePresence } from './usePresence';
|
|
8
|
+
export { usePressToOpen } from './usePressToOpen';
|
|
9
|
+
export { TIMING } from './timing';
|
|
10
|
+
export { useFocusTrap, focusableIn } from './useFocusTrap';
|
|
11
|
+
export { useScrollLock } from './useScrollLock';
|
|
12
|
+
export { useCountdown } from './useCountdown';
|
|
13
|
+
export type { CountdownOptions, CountdownState } from './useCountdown';
|
|
14
|
+
export { useDigitInput } from './useDigitInput';
|
|
15
|
+
export type { DigitInputOptions } from './useDigitInput';
|
|
16
|
+
export { useElapsed } from './useElapsed';
|
|
17
|
+
export type { ElapsedInput, ElapsedOptions, ElapsedState } from './useElapsed';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Interaction timings (ms). Components read these instead of inventing their own numbers. */
|
|
2
|
+
export declare const TIMING: {
|
|
3
|
+
/** First tooltip waits this long so passing over a button doesn't flash one. */
|
|
4
|
+
readonly tooltipDelay: 500;
|
|
5
|
+
/** Moving to a neighbour within this window after a tooltip closes opens the next one at once. */
|
|
6
|
+
readonly tooltipSkip: 300;
|
|
7
|
+
/** Pointer must rest this long before a hover-to-open surface (collapsed sidebar, preview) opens. */
|
|
8
|
+
readonly hoverIntent: 200;
|
|
9
|
+
/** Leaving a hover-opened surface closes it only after this grace period. */
|
|
10
|
+
readonly hoverGrace: 300;
|
|
11
|
+
/** Wait for a second click only when single and double click truly conflict. */
|
|
12
|
+
readonly doubleClick: 250;
|
|
13
|
+
/** How long an "실행 취소" toast stays before the action commits. */
|
|
14
|
+
readonly undo: 6000;
|
|
15
|
+
/** Pointer travel (px) that turns a press on a menu trigger into press-drag-release. */
|
|
16
|
+
readonly dragThreshold: 4;
|
|
17
|
+
/** Typed letters within this window build one typeahead query (tree, list); after it the query starts over. */
|
|
18
|
+
readonly typeahead: 500;
|
|
19
|
+
/** Holding a stepper button this long starts auto-repeat; a shorter press is one ordinary click. */
|
|
20
|
+
readonly repeatDelay: 400;
|
|
21
|
+
/** Interval between auto-repeat steps while a stepper button stays pressed. */
|
|
22
|
+
readonly repeatInterval: 60;
|
|
23
|
+
/** How long a button shows its pressed state when fired by its keyboard shortcut. */
|
|
24
|
+
readonly pressFlash: 140;
|
|
25
|
+
/** Countdowns re-check the clock this often, so a second never lags behind visibly. */
|
|
26
|
+
readonly countdownTick: 250;
|
|
27
|
+
/** Touch press held this long opens a context menu (the touch stand-in for right click). */
|
|
28
|
+
readonly longPress: 500;
|
|
29
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State that is either controlled (`value` + `onChange`) or owned by the component
|
|
3
|
+
* (`defaultValue`). `undefined` means uncontrolled, so use `null` for "controlled, empty".
|
|
4
|
+
*/
|
|
5
|
+
export declare function useControllableState<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void): readonly [T, (next: T) => void];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CountdownOptions {
|
|
2
|
+
/** Pauses the countdown where it is (false) and resumes from there (true). */
|
|
3
|
+
running?: boolean;
|
|
4
|
+
/** Called once when the countdown reaches 0. */
|
|
5
|
+
onComplete?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface CountdownState {
|
|
8
|
+
/** Whole seconds left, rounded up (8 → 7 → … → 0). */
|
|
9
|
+
remaining: number;
|
|
10
|
+
done: boolean;
|
|
11
|
+
/** Starts again from `seconds` (or a new number of seconds). */
|
|
12
|
+
restart: (seconds?: number) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Counts down from `seconds` to 0. The clock is only read inside effects and timers, never during
|
|
16
|
+
* render, and each tick compares against a deadline so the count doesn't drift. Changing `seconds`
|
|
17
|
+
* starts over from the new value.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useCountdown(seconds: number, { running, onComplete }?: CountdownOptions): CountdownState;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ChangeEvent, type KeyboardEvent } from 'react';
|
|
2
|
+
export interface DigitInputOptions {
|
|
3
|
+
/** Raw digits only ("1200000"), never the formatted text. */
|
|
4
|
+
digits: string;
|
|
5
|
+
onDigitsChange: (digits: string) => void;
|
|
6
|
+
/** Turns the digits into what the field shows ("1,200,000", "010-1234-5678"). Defaults to the digits as they are. */
|
|
7
|
+
format?: (digits: string) => string;
|
|
8
|
+
/** Digits past this are dropped. */
|
|
9
|
+
maxDigits?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A text field that only takes digits and shows them formatted (thousands separators, phone
|
|
13
|
+
* dashes). Letters and symbols never appear, the caret stays after the same digit while the
|
|
14
|
+
* separators move around it, and Backspace on a separator deletes the digit before it.
|
|
15
|
+
* Spread the result on `Input` (or a plain `<input>`).
|
|
16
|
+
*/
|
|
17
|
+
export declare function useDigitInput({ digits, onDigitsChange, format, maxDigits }: DigitInputOptions): {
|
|
18
|
+
ref: import("react").RefObject<HTMLInputElement | null>;
|
|
19
|
+
value: string;
|
|
20
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
onKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
22
|
+
inputMode: "numeric";
|
|
23
|
+
autoComplete: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** A moment: a Date, an epoch timestamp in ms, or an ISO string. */
|
|
2
|
+
export type ElapsedInput = Date | number | string;
|
|
3
|
+
export interface ElapsedOptions {
|
|
4
|
+
/** false pauses where it is; true resumes. With `startedAt`, resuming catches up with the clock. */
|
|
5
|
+
running?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* When the work finished. With `startedAt` the hook stops ticking and returns the final
|
|
8
|
+
* `endedAt − startedAt` — no clock involved, so it's the same on every render.
|
|
9
|
+
*/
|
|
10
|
+
endedAt?: ElapsedInput;
|
|
11
|
+
/** Without `startedAt`: seconds already on the stopwatch when it starts. */
|
|
12
|
+
initial?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ElapsedState {
|
|
15
|
+
/** Whole seconds that have passed (0 → 1 → … → 1060). */
|
|
16
|
+
elapsed: number;
|
|
17
|
+
/** Whether it is ticking right now. */
|
|
18
|
+
running: boolean;
|
|
19
|
+
/** Without `startedAt`: puts the stopwatch back to 0 (it keeps running if `running`). */
|
|
20
|
+
reset: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Counts up — the mirror of useCountdown. With `startedAt` it shows the wall-clock time since that
|
|
24
|
+
* moment ("시작 오후 9:12 · 17:40"); without it, it's a stopwatch from `initial` that pauses and
|
|
25
|
+
* resumes. The clock is only read inside effects and timers, never during render. Each tick
|
|
26
|
+
* re-reads the clock and waits for the next whole second, so the count doesn't drift.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useElapsed(startedAt?: ElapsedInput, { running, endedAt, initial }?: ElapsedOptions): ElapsedState;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CSSProperties, type RefObject } from 'react';
|
|
2
|
+
export interface FloatingOptions {
|
|
3
|
+
/** Gap between anchor and panel. */
|
|
4
|
+
offset?: number;
|
|
5
|
+
/** Panel width follows the anchor width. */
|
|
6
|
+
matchWidth?: boolean;
|
|
7
|
+
/** Upper bound for the panel height; the actual height also respects viewport space. */
|
|
8
|
+
maxHeight?: number;
|
|
9
|
+
/** Horizontal alignment to the anchor when the panel has its own width (needs `panelRef`). */
|
|
10
|
+
align?: 'start' | 'center' | 'end';
|
|
11
|
+
/** The floating element, measured for `align` and to keep it inside the viewport. */
|
|
12
|
+
panelRef?: RefObject<HTMLElement | null>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Positions a `position: fixed` panel under its anchor (or above it when there is more room
|
|
16
|
+
* there), so it escapes `overflow: hidden` parents. Tracks scroll and resize while open.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useFloating(anchorRef: RefObject<HTMLElement | null>, open: boolean, options?: FloatingOptions): {
|
|
19
|
+
style: CSSProperties;
|
|
20
|
+
side: "bottom" | "top";
|
|
21
|
+
};
|