@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,42 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './Rating.css';
|
|
3
|
+
export type RatingSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type RatingTone = 'amber' | 'accent' | 'danger' | 'neutral';
|
|
5
|
+
export interface RatingProps {
|
|
6
|
+
/** Current rating; `null` = not rated yet. Fractions (4.3) are fine when `readOnly`. */
|
|
7
|
+
value?: number | null;
|
|
8
|
+
defaultValue?: number | null;
|
|
9
|
+
onValueChange?: (value: number | null) => void;
|
|
10
|
+
/** Number of icons. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** Half steps (3.5) when choosing. */
|
|
13
|
+
allowHalf?: boolean;
|
|
14
|
+
/** Choosing the current value again clears it (also Backspace / Delete). */
|
|
15
|
+
allowClear?: boolean;
|
|
16
|
+
/** Display only: fills fractionally (4.3 → the fifth star 30%) and isn't focusable. */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
size?: RatingSize;
|
|
20
|
+
/** Fill color: amber stars (default), accent, danger (hearts), neutral. */
|
|
21
|
+
tone?: RatingTone;
|
|
22
|
+
/** Custom icon (e.g. <Heart />); drawn twice, as the empty base and the clipped fill. */
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
/** One label per whole value, shown beside the icons: labels[0] for 1 … labels[max - 1] for max. Follows the hover preview. */
|
|
25
|
+
labels?: string[];
|
|
26
|
+
/** Print the number beside the icons ("4.3"). */
|
|
27
|
+
showValue?: boolean;
|
|
28
|
+
/** Number of ratings, printed as "(128)". */
|
|
29
|
+
count?: number;
|
|
30
|
+
/** Submits the value with forms (empty when not rated). */
|
|
31
|
+
name?: string;
|
|
32
|
+
id?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
'aria-label'?: string;
|
|
35
|
+
'aria-labelledby'?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Star rating. Hover previews what a click would set and restores on leave; a click commits
|
|
39
|
+
* (and clearing is a second click on the same value). Keyboard follows radiogroup: arrows step,
|
|
40
|
+
* Home/End jump, Backspace clears. `readOnly` shows averages with fractional fill.
|
|
41
|
+
*/
|
|
42
|
+
export declare function Rating({ value: valueProp, defaultValue, onValueChange, max, allowHalf, allowClear, readOnly, disabled, size, tone, icon, labels, showValue, count, name, id, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: RatingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import './Resizable.css';
|
|
3
|
+
export type ResizableDirection = 'horizontal' | 'vertical';
|
|
4
|
+
export interface ResizablePanelGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dir'> {
|
|
5
|
+
/** horizontal: panels side by side · vertical: stacked. */
|
|
6
|
+
direction?: ResizableDirection;
|
|
7
|
+
/** `ResizablePanel`s with a `ResizableHandle` between each pair (groups nest inside panels). */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Remembers the layout in localStorage under this key. */
|
|
10
|
+
autoSaveId?: string;
|
|
11
|
+
/** Every change while dragging (preview), sizes in %. */
|
|
12
|
+
onLayoutChange?: (sizes: number[]) => void;
|
|
13
|
+
/** When a change is committed: drag released, a key pressed, a panel collapsed or expanded. */
|
|
14
|
+
onLayout?: (sizes: number[]) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface ResizablePanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
/** Starting size (% of the group). Panels without one share what's left. */
|
|
18
|
+
defaultSize?: number;
|
|
19
|
+
/** % of the group. */
|
|
20
|
+
minSize?: number;
|
|
21
|
+
maxSize?: number;
|
|
22
|
+
/** Dragging it well past `minSize`, Enter or a double click on its handle folds it to `collapsedSize`. */
|
|
23
|
+
collapsible?: boolean;
|
|
24
|
+
/** Size while collapsed (%). With 0 the content is also taken out of focus order. */
|
|
25
|
+
collapsedSize?: number;
|
|
26
|
+
/** Collapsed state (controlled). */
|
|
27
|
+
collapsed?: boolean;
|
|
28
|
+
defaultCollapsed?: boolean;
|
|
29
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface ResizableHandleProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
32
|
+
/** A small grip on the seam, so the handle can be found without hovering. */
|
|
33
|
+
withGrip?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Panels whose sizes the user sets by dragging the handles between them. Sizes are percentages with
|
|
38
|
+
* min / max; collapsible panels fold shut when dragged well past their min and open again when pulled
|
|
39
|
+
* back (or with Enter / a double click on the handle). Dragging previews live and commits on release
|
|
40
|
+
* (`onLayout`); Esc during a drag puts everything back. Give the group a height (or put it in one).
|
|
41
|
+
*/
|
|
42
|
+
export declare function ResizablePanelGroup({ direction, children, autoSaveId, onLayoutChange, onLayout, className, style, ...rest }: ResizablePanelGroupProps): import("react").JSX.Element;
|
|
43
|
+
/** One panel of a `ResizablePanelGroup`. Its size comes from the group; put scrolling content in a `ScrollArea`. */
|
|
44
|
+
export declare function ResizablePanel({ defaultSize: _defaultSize, minSize: _minSize, maxSize: _maxSize, collapsible: _collapsible, collapsedSize: _collapsedSize, collapsed: _collapsed, defaultCollapsed: _defaultCollapsed, onCollapsedChange: _onCollapsedChange, id: _id, className, style, children, ...rest }: ResizablePanelProps): import("react").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* The seam between two panels: an invisible 9px hit area that shows a thin line on hover, blue while
|
|
47
|
+
* dragging or focused. A WAI-ARIA separator: ←/→ (↑/↓ when stacked, Shift for bigger steps),
|
|
48
|
+
* Home / End, Enter folds or reopens the collapsible neighbour, Esc cancels a drag.
|
|
49
|
+
*/
|
|
50
|
+
export declare function ResizableHandle({ withGrip, disabled, className, 'aria-label': ariaLabel, ...rest }: ResizableHandleProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface PanelConstraints {
|
|
2
|
+
/** Smallest size while open (%). */
|
|
3
|
+
min: number;
|
|
4
|
+
/** Largest size (%). */
|
|
5
|
+
max: number;
|
|
6
|
+
/** Dragging past `min` (or Enter / double click on a handle) folds it to `collapsedSize`. */
|
|
7
|
+
collapsible: boolean;
|
|
8
|
+
/** Size while collapsed (%). */
|
|
9
|
+
collapsedSize: number;
|
|
10
|
+
defaultSize?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const isCollapsed: (sizes: number[], panels: PanelConstraints[], i: number) => boolean;
|
|
13
|
+
/** Starting layout: `defaultSize`s, the rest split evenly, clamped to min / max, collapsed panels folded. */
|
|
14
|
+
export declare function initialLayout(panels: PanelConstraints[], collapsed: boolean[]): number[];
|
|
15
|
+
/**
|
|
16
|
+
* Moves handle `handle` (between panel `handle` and `handle + 1`) by `delta` %, starting from `start`.
|
|
17
|
+
* The panel on the growing side takes what the shrinking side gives; the shrinking side gives
|
|
18
|
+
* nearest-first down to each panel's min (so a push carries on into the next panel). A collapsible
|
|
19
|
+
* panel pushed past its min by `snap` × (min − collapsedSize) folds shut; a collapsed one opens to
|
|
20
|
+
* at least its min once pulled that far. Pointer drags use snap 0.5, keyboard steps 0.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resizeLayout(start: number[], panels: PanelConstraints[], handle: number, delta: number, snap?: number): number[];
|
|
23
|
+
/** Folds panel `i`; the freed space goes to its neighbours (nearest first, up to their max). */
|
|
24
|
+
export declare function collapseLayout(start: number[], panels: PanelConstraints[], i: number): number[];
|
|
25
|
+
/** Opens panel `i` to `target` (clamped to min / max), taking the space from its neighbours down to their min. */
|
|
26
|
+
export declare function expandLayout(start: number[], panels: PanelConstraints[], i: number, target: number): number[];
|
|
27
|
+
/** Splits the two panels around a handle back in their starting proportion (keeping their combined size). */
|
|
28
|
+
export declare function resetPair(start: number[], panels: PanelConstraints[], handle: number, initial: number[]): number[];
|
|
29
|
+
export declare const sameLayout: (a: number[], b: number[]) => boolean;
|
|
30
|
+
export declare function loadLayout(id: string, count: number): number[] | null;
|
|
31
|
+
export declare function saveLayout(id: string, sizes: number[]): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import './ScaledPreview.css';
|
|
3
|
+
export type ScaledPreviewTone = 'subtle' | 'surface';
|
|
4
|
+
export interface ScaledPreviewProps {
|
|
5
|
+
/** The live content to show as a miniature. It is inert: no pointer, focus or screen-reader access. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Stage height in px. */
|
|
8
|
+
height?: number;
|
|
9
|
+
/** Width (px) the content lays out at before it is scaled, so `width: 100%` content has room. */
|
|
10
|
+
contentWidth?: number;
|
|
11
|
+
/** Largest scale. The content shrinks further when it doesn't fit the stage. */
|
|
12
|
+
maxScale?: number;
|
|
13
|
+
/** Smallest scale; anything still too big is clipped at the stage edge. */
|
|
14
|
+
minScale?: number;
|
|
15
|
+
/** Breathing room (px) kept between the scaled content and the stage edge. */
|
|
16
|
+
inset?: number;
|
|
17
|
+
/** White chip in the top-left corner (category). */
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
/** Gray chip in the top-right corner (count, version…). */
|
|
20
|
+
meta?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Mount the content only while the stage is on (or near) the screen, so off-screen previews don't
|
|
23
|
+
* run timers or animations. Shows `fallback` meanwhile.
|
|
24
|
+
*/
|
|
25
|
+
lazy?: boolean;
|
|
26
|
+
/** Shown while a lazy preview is off-screen. Default: a shimmering Skeleton block. */
|
|
27
|
+
fallback?: ReactNode;
|
|
28
|
+
/** subtle: the lightest gray fill · surface: white (use inside a gray tray). */
|
|
29
|
+
tone?: ScaledPreviewTone;
|
|
30
|
+
className?: string;
|
|
31
|
+
style?: CSSProperties;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A fixed-height stage that shows a live component as a centred, scaled-down miniature — gallery
|
|
35
|
+
* cards, template pickers, "what it looks like" thumbnails. The scale fits the content to the stage
|
|
36
|
+
* (up to `maxScale`), and `lazy` previews mount only while visible.
|
|
37
|
+
*/
|
|
38
|
+
export declare function ScaledPreview({ children, height, contentWidth, maxScale, minScale, inset, label, meta, lazy, fallback, tone, className, style, }: ScaledPreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type ChartRow, type ChartTone } from '../Chart/chart';
|
|
3
|
+
import './ScatterChart.css';
|
|
4
|
+
export type ScatterChartRow = ChartRow;
|
|
5
|
+
/** One colour group of points (a plan, a cohort). */
|
|
6
|
+
export interface ScatterCategory {
|
|
7
|
+
/** Value of `categoryKey` that belongs to this group. */
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** CSS variable (`--chart-1`) or any color. Defaults to the chart palette in order. */
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A dashed line across the plot at `value` on one axis (target, average). */
|
|
14
|
+
export interface ScatterReferenceLine {
|
|
15
|
+
/** `y`: a horizontal line at a y value · `x`: a vertical line at an x value. */
|
|
16
|
+
axis: 'x' | 'y';
|
|
17
|
+
value: number;
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Defaults to `neutral`. */
|
|
20
|
+
tone?: ChartTone;
|
|
21
|
+
}
|
|
22
|
+
export interface ScatterChartProps {
|
|
23
|
+
data: ScatterChartRow[];
|
|
24
|
+
/** Field with each point's x value. */
|
|
25
|
+
xKey: string;
|
|
26
|
+
/** Field with each point's y value. */
|
|
27
|
+
yKey: string;
|
|
28
|
+
/** Field that scales the point into a bubble (area grows with the value). */
|
|
29
|
+
sizeKey?: string;
|
|
30
|
+
/** Field whose value picks the point's colour group. */
|
|
31
|
+
categoryKey?: string;
|
|
32
|
+
/** Groups in legend order, with labels and colours. Defaults to the distinct `categoryKey` values in order. */
|
|
33
|
+
categories?: ScatterCategory[];
|
|
34
|
+
/** Field with the point's name (tooltip title). Defaults to the group label. */
|
|
35
|
+
labelKey?: string;
|
|
36
|
+
/** Plot height in px (axis labels included). */
|
|
37
|
+
height?: number;
|
|
38
|
+
/** Axis titles (also the tooltip row labels). */
|
|
39
|
+
xLabel?: string;
|
|
40
|
+
yLabel?: string;
|
|
41
|
+
sizeLabel?: string;
|
|
42
|
+
/** Number of axis labels. */
|
|
43
|
+
xTickCount?: number;
|
|
44
|
+
yTickCount?: number;
|
|
45
|
+
/** Range the axis must cover; rounded out to nice ticks. Defaults to the data range (0 when close). */
|
|
46
|
+
xDomain?: [number, number];
|
|
47
|
+
yDomain?: [number, number];
|
|
48
|
+
/** Bubble radius in px for the smallest · largest `sizeKey` value. */
|
|
49
|
+
sizeRange?: [number, number];
|
|
50
|
+
/** Radius in px of points without `sizeKey`. */
|
|
51
|
+
pointRadius?: number;
|
|
52
|
+
/** A dashed least-squares line: `true` through every shown point, `'category'` one per group in its colour. */
|
|
53
|
+
trendLine?: boolean | 'category';
|
|
54
|
+
referenceLines?: ScatterReferenceLine[];
|
|
55
|
+
/** Values in the tooltip. */
|
|
56
|
+
formatX?: (value: number, row: ScatterChartRow) => string;
|
|
57
|
+
formatY?: (value: number, row: ScatterChartRow) => string;
|
|
58
|
+
formatSize?: (value: number, row: ScatterChartRow) => string;
|
|
59
|
+
/** Axis labels. Default to compact Korean (`6천`, `1.2만`). */
|
|
60
|
+
formatAxisX?: (value: number) => string;
|
|
61
|
+
formatAxisY?: (value: number) => string;
|
|
62
|
+
/** Group legend under the plot; click to hide or show a group, hover to highlight it. */
|
|
63
|
+
legend?: boolean;
|
|
64
|
+
/** Group keys that are hidden (controlled). */
|
|
65
|
+
hiddenCategories?: string[];
|
|
66
|
+
defaultHiddenCategories?: string[];
|
|
67
|
+
onHiddenCategoriesChange?: (keys: string[]) => void;
|
|
68
|
+
/** Highlighted point: its index among the shown points in x order. */
|
|
69
|
+
activeIndex?: number | null;
|
|
70
|
+
defaultActiveIndex?: number | null;
|
|
71
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
72
|
+
'aria-label'?: string;
|
|
73
|
+
className?: string;
|
|
74
|
+
style?: CSSProperties;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Points on two value axes, optionally sized (bubbles) and coloured by group. The point nearest the
|
|
78
|
+
* pointer grows and the rest fade, with a Card tooltip beside it; arrow keys walk the points left to
|
|
79
|
+
* right. Legend entries toggle their group, which fades and shrinks out in place.
|
|
80
|
+
*/
|
|
81
|
+
export declare function ScatterChart({ data, xKey, yKey, sizeKey, categoryKey, categories: categoriesProp, labelKey, height, xLabel, yLabel, sizeLabel, xTickCount, yTickCount, xDomain, yDomain, sizeRange, pointRadius, trendLine, referenceLines, formatX, formatY, formatSize, formatAxisX, formatAxisY, legend, hiddenCategories, defaultHiddenCategories, onHiddenCategoriesChange, activeIndex, defaultActiveIndex, onActiveIndexChange, 'aria-label': ariaLabel, className, style, }: ScatterChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Round ticks (1 · 1.5 · 2 · 2.5 · 3 · 5 × 10ⁿ apart) that cover `min … max` in about `count` labels.
|
|
3
|
+
* With `snapZero`, an all-positive range close enough to 0 starts at 0 so bubbles keep an honest baseline.
|
|
4
|
+
* The last tick is the first round value at or past `max`, so the count can come out one lower.
|
|
5
|
+
*/
|
|
6
|
+
export declare function niceRangeTicks(min: number, max: number, count: number, snapZero?: boolean): number[];
|
|
7
|
+
/** Least-squares line through the points, or null with fewer than two distinct x values. */
|
|
8
|
+
export declare function linearRegression(points: Array<{
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}>): {
|
|
12
|
+
slope: number;
|
|
13
|
+
intercept: number;
|
|
14
|
+
} | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode, type Ref, type UIEvent } from 'react';
|
|
2
|
+
import './ScrollArea.css';
|
|
3
|
+
export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
|
|
4
|
+
export interface ScrollAreaProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onScroll'> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Which way the content scrolls. */
|
|
7
|
+
orientation?: ScrollAreaOrientation;
|
|
8
|
+
/** Caps the height; the area grows with its content up to this and then scrolls. */
|
|
9
|
+
maxHeight?: number | string;
|
|
10
|
+
/** auto: bars appear while hovered or scrolling and fade out · always: shown whenever the content overflows. */
|
|
11
|
+
scrollbars?: 'auto' | 'always';
|
|
12
|
+
/** Soft edges where more content hides (only on the sides you can still scroll toward). A number sets the fade size in px. */
|
|
13
|
+
fade?: boolean | number;
|
|
14
|
+
/** Chat logs: start at the bottom and stay there as content grows, unless the reader scrolled up. */
|
|
15
|
+
stickToBottom?: boolean;
|
|
16
|
+
/** Whether the view is at (or within 8px of) the bottom — show a "새 메시지" button when it isn't. */
|
|
17
|
+
onAtBottomChange?: (atBottom: boolean) => void;
|
|
18
|
+
/** The scrolling element, for `scrollTo` and friends. */
|
|
19
|
+
viewportRef?: Ref<HTMLDivElement>;
|
|
20
|
+
viewportClassName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Makes the viewport a Tab stop so the keyboard can scroll it. Default: on when it overflows
|
|
23
|
+
* and nothing inside is focusable. Give it an `aria-label` too.
|
|
24
|
+
*/
|
|
25
|
+
focusable?: boolean;
|
|
26
|
+
onScroll?: (e: UIEvent<HTMLDivElement>) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A scroll container with the system's overlay scrollbars on every platform. Scrolling stays native
|
|
30
|
+
* (wheel, touch, keyboard, scroll snapping); only the bars are drawn: a 4px thumb that shows while
|
|
31
|
+
* hovered or scrolling and fades out after, can be dragged (Esc puts it back), and a click on the
|
|
32
|
+
* track pages toward the click. `fade` softens the edges that still hide content.
|
|
33
|
+
*/
|
|
34
|
+
export declare function ScrollArea({ children, orientation, maxHeight, scrollbars, fade, stickToBottom, onAtBottomChange, viewportRef, viewportClassName, focusable, onScroll, className, style, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...rest }: ScrollAreaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type ListOption, type OptionState } from '../Listbox/Listbox';
|
|
3
|
+
import './Select.css';
|
|
4
|
+
export interface SelectProps<V extends string> {
|
|
5
|
+
options: ListOption<V>[];
|
|
6
|
+
value?: V | null;
|
|
7
|
+
defaultValue?: V | null;
|
|
8
|
+
onValueChange?: (value: V) => void;
|
|
9
|
+
/** Controlled open state, e.g. to open from elsewhere. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
placeholder?: ReactNode;
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
/** Icon in front of the value; defaults to the selected option's icon. */
|
|
17
|
+
leading?: ReactNode;
|
|
18
|
+
/** Submits the value with forms. */
|
|
19
|
+
name?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
maxHeight?: number;
|
|
23
|
+
renderValue?: (option: ListOption<V>) => ReactNode;
|
|
24
|
+
renderOption?: (option: ListOption<V>, state: OptionState) => ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Just the value and chevron, no field surface: a picker that sits inside another field
|
|
27
|
+
* (PhoneInput's country code). Hover is a small gray fill; the outer field draws focus.
|
|
28
|
+
*/
|
|
29
|
+
bare?: boolean;
|
|
30
|
+
/** Open the list against this element instead of the trigger (the whole field around a bare Select). */
|
|
31
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
32
|
+
'aria-label'?: string;
|
|
33
|
+
'aria-labelledby'?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Custom select (WAI-ARIA "select-only combobox"): focus stays on the trigger while
|
|
37
|
+
* arrows, Home/End, typeahead, Enter/Space and Escape drive the list.
|
|
38
|
+
*/
|
|
39
|
+
export declare function Select<V extends string>({ options, value: valueProp, defaultValue, onValueChange, open: openProp, onOpenChange, placeholder, size, disabled, invalid, leading, name, id, className, maxHeight, renderValue, renderOption, bare, anchorRef, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SelectProps<V>): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './Sidebar.css';
|
|
3
|
+
export interface SidebarProps {
|
|
4
|
+
/** Brand / workspace switcher at the top. */
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
/** Pinned at the bottom (user, settings…). */
|
|
7
|
+
footer?: ReactNode;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Vertical navigation: header, scrolling groups of items, footer. */
|
|
13
|
+
export declare function Sidebar({ header, footer, children, className, 'aria-label': ariaLabel }: SidebarProps): import("react").JSX.Element;
|
|
14
|
+
export declare namespace Sidebar {
|
|
15
|
+
var Group: typeof SidebarGroup;
|
|
16
|
+
var Item: typeof SidebarItem;
|
|
17
|
+
}
|
|
18
|
+
export interface SidebarGroupProps {
|
|
19
|
+
label?: ReactNode;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
/** A number shown at the end of the label row. */
|
|
22
|
+
count?: number;
|
|
23
|
+
/** Lets the group fold; the chevron rotates and the items slide. */
|
|
24
|
+
collapsible?: boolean;
|
|
25
|
+
defaultOpen?: boolean;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare function SidebarGroup({ label, icon, count, collapsible, defaultOpen, children }: SidebarGroupProps): import("react").JSX.Element;
|
|
29
|
+
export interface SidebarItemProps {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
href?: string;
|
|
32
|
+
onClick?: () => void;
|
|
33
|
+
active?: boolean;
|
|
34
|
+
icon?: ReactNode;
|
|
35
|
+
/** Trailing badge, dot or count. */
|
|
36
|
+
badge?: ReactNode;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function SidebarItem({ children, href, onClick, active, icon, badge, disabled }: SidebarItemProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type TextVariant } from '../../primitives';
|
|
3
|
+
import './Skeleton.css';
|
|
4
|
+
export type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
|
|
5
|
+
declare const RADIUS: {
|
|
6
|
+
readonly none: "0";
|
|
7
|
+
readonly sm: "6px";
|
|
8
|
+
readonly md: "10px";
|
|
9
|
+
readonly lg: "16px";
|
|
10
|
+
readonly full: "999px";
|
|
11
|
+
};
|
|
12
|
+
export interface SkeletonProps {
|
|
13
|
+
width?: number | string;
|
|
14
|
+
height?: number | string;
|
|
15
|
+
radius?: keyof typeof RADIUS | number;
|
|
16
|
+
animation?: SkeletonAnimation;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
/** A gray placeholder block with a light sweeping across it. */
|
|
21
|
+
export declare function Skeleton({ width, height, radius, animation, className, style }: SkeletonProps): import("react").JSX.Element;
|
|
22
|
+
export interface SkeletonTextProps {
|
|
23
|
+
lines?: number;
|
|
24
|
+
/** Width of the last line, so the block reads like a paragraph. */
|
|
25
|
+
lastLineWidth?: string;
|
|
26
|
+
/** Match the line height and cap height of a type role. */
|
|
27
|
+
variant?: TextVariant;
|
|
28
|
+
animation?: SkeletonAnimation;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Placeholder lines sized to a type role, so swapping in real text doesn't shift layout. */
|
|
32
|
+
export declare function SkeletonText({ lines, lastLineWidth, variant, animation, className }: SkeletonTextProps): import("react").JSX.Element;
|
|
33
|
+
export declare function SkeletonCircle({ size: px, animation }: {
|
|
34
|
+
size?: number;
|
|
35
|
+
animation?: SkeletonAnimation;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
37
|
+
export interface SkeletonGroupProps {
|
|
38
|
+
/** While true, shows `fallback`; when false, fades the real children in. */
|
|
39
|
+
loading: boolean;
|
|
40
|
+
fallback: ReactNode;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
label?: string;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Swaps a skeleton for the real content with a soft fade, and tells screen readers it's loading. */
|
|
46
|
+
export declare function SkeletonGroup({ loading, fallback, children, label, className }: SkeletonGroupProps): import("react").JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './Slider.css';
|
|
3
|
+
export type SliderValue = number | [number, number];
|
|
4
|
+
export type SliderMark = number | {
|
|
5
|
+
value: number;
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export interface SliderProps<T extends SliderValue> {
|
|
9
|
+
/** A number for one thumb, a `[from, to]` tuple for a range. */
|
|
10
|
+
value?: T;
|
|
11
|
+
defaultValue?: T;
|
|
12
|
+
/** Fires on every change while dragging or pressing keys. */
|
|
13
|
+
onValueChange?: (value: T) => void;
|
|
14
|
+
/** Fires once when the user lets go (pointer up / key press), e.g. to save or fetch. */
|
|
15
|
+
onValueCommit?: (value: T) => void;
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
step?: number;
|
|
19
|
+
/** Range only: smallest allowed gap between the two thumbs. */
|
|
20
|
+
minDistance?: number;
|
|
21
|
+
/** Tick marks under the track; give a label to print it. */
|
|
22
|
+
marks?: SliderMark[];
|
|
23
|
+
formatValue?: (value: number) => string;
|
|
24
|
+
/** Value bubble above the thumb: while interacting (auto), always, or never. */
|
|
25
|
+
showValue?: 'auto' | 'always' | 'never';
|
|
26
|
+
size?: 'sm' | 'md';
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Submits with forms as `name` (range: `name[0]`, `name[1]`). */
|
|
29
|
+
name?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
'aria-label'?: string;
|
|
33
|
+
/** Range: per-thumb labels, e.g. (i) => (i === 0 ? '최소 가격' : '최대 가격'). */
|
|
34
|
+
getThumbLabel?: (index: number) => string;
|
|
35
|
+
}
|
|
36
|
+
export declare function Slider<T extends SliderValue = number>({ value, defaultValue, onValueChange, onValueCommit, min, max, step, minDistance, marks, formatValue, showValue, size, disabled, name, id, className, 'aria-label': ariaLabel, getThumbLabel, }: SliderProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ButtonProps } from '../../primitives';
|
|
2
|
+
export type SocialProvider = 'google' | 'apple';
|
|
3
|
+
export type SocialLoginAction = 'continue' | 'signin' | 'signup';
|
|
4
|
+
export interface SocialLoginButtonProps extends Omit<ButtonProps, 'variant' | 'icon' | 'iconRight'> {
|
|
5
|
+
provider: SocialProvider;
|
|
6
|
+
/** Which label to show: "Google로 계속하기" · "Google로 로그인" · "Google로 가입하기". `children` overrides it. */
|
|
7
|
+
action?: SocialLoginAction;
|
|
8
|
+
}
|
|
9
|
+
/** "Continue with Google / Apple" — a Button with the provider's mark, colours and a Korean label. */
|
|
10
|
+
export declare const SocialLoginButton: import("react").ForwardRefExoticComponent<SocialLoginButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type SparkTone } from './spark';
|
|
3
|
+
import '../Chart/Chart.css';
|
|
4
|
+
import './SparkChart.css';
|
|
5
|
+
export interface SparkLineProps {
|
|
6
|
+
/** One value per step, oldest first. `null` = no data: the line breaks there. */
|
|
7
|
+
data: Array<number | null>;
|
|
8
|
+
/** Height in px. Stays crisp from 24 to 40. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Width in px or any CSS length. Defaults to filling the parent. */
|
|
11
|
+
width?: number | string;
|
|
12
|
+
/** linear: straight segments · smooth: monotone curve that never overshoots the data. */
|
|
13
|
+
curve?: 'linear' | 'smooth';
|
|
14
|
+
/** CSS variable (`--chart-2`) or any color. Wins over `tone`. */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** accent: blue · neutral: gray · trend: green when the series moved the good way, orange (or `worseTone`) otherwise. */
|
|
17
|
+
tone?: SparkTone;
|
|
18
|
+
/** What a higher number means for `tone="trend"`. Cost, time and errors are `worse`. */
|
|
19
|
+
higherIs?: 'better' | 'worse' | 'neutral';
|
|
20
|
+
/** Color of a change for the worse with `tone="trend"`. */
|
|
21
|
+
worseTone?: 'warning' | 'danger';
|
|
22
|
+
/** Bottom of the value range. Defaults to the smallest value (sparks show shape, not magnitude). */
|
|
23
|
+
min?: number;
|
|
24
|
+
/** Top of the value range. Defaults to the largest value. */
|
|
25
|
+
max?: number;
|
|
26
|
+
/** A dot on the last value. */
|
|
27
|
+
endDot?: boolean;
|
|
28
|
+
/** Hover · touch · ←/→ show a crosshair dot and the value card. `false` draws a static picture (no listeners). */
|
|
29
|
+
tooltip?: boolean;
|
|
30
|
+
/** Tooltip title per step, e.g. "10월 3일". */
|
|
31
|
+
formatLabel?: (index: number) => string;
|
|
32
|
+
/** Row name in the tooltip, e.g. "매출". */
|
|
33
|
+
valueLabel?: string;
|
|
34
|
+
formatValue?: (value: number) => string;
|
|
35
|
+
activeIndex?: number | null;
|
|
36
|
+
defaultActiveIndex?: number | null;
|
|
37
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
38
|
+
'aria-label'?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
style?: CSSProperties;
|
|
41
|
+
}
|
|
42
|
+
export interface SparkAreaProps extends SparkLineProps {
|
|
43
|
+
/** gradient: soft fill fading downward · solid: one flat soft tint. */
|
|
44
|
+
fill?: 'gradient' | 'solid';
|
|
45
|
+
}
|
|
46
|
+
export interface SparkChartProps extends SparkAreaProps {
|
|
47
|
+
/** line · area · bar (bar renders Sparkbar with the same props). */
|
|
48
|
+
type?: 'line' | 'area' | 'bar';
|
|
49
|
+
}
|
|
50
|
+
/** A tiny line without axes — for table cells and KPI cards. */
|
|
51
|
+
export declare function SparkLine(props: SparkLineProps): import("react").JSX.Element;
|
|
52
|
+
/** A tiny line with a soft gradient fill under it — for KPI cards. */
|
|
53
|
+
export declare function SparkArea(props: SparkAreaProps): import("react").JSX.Element;
|
|
54
|
+
/** One entry point for the three spark types; `type="bar"` hands the same props to Sparkbar. */
|
|
55
|
+
export declare function SparkChart({ type, ...props }: SparkChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** accent: blue · neutral: gray · trend: green or orange/red by direction (last value vs first), like Delta. */
|
|
2
|
+
export type SparkTone = 'neutral' | 'accent' | 'trend';
|
|
3
|
+
export interface SparkColorOptions {
|
|
4
|
+
/** CSS variable (`--chart-2`) or any color. Wins over `tone`. */
|
|
5
|
+
color?: string;
|
|
6
|
+
tone?: SparkTone;
|
|
7
|
+
/** What a higher number means for `tone="trend"` (same as Delta). */
|
|
8
|
+
higherIs?: 'better' | 'worse' | 'neutral';
|
|
9
|
+
/** Tone of a change for the worse. */
|
|
10
|
+
worseTone?: 'warning' | 'danger';
|
|
11
|
+
}
|
|
12
|
+
/** Which way the series moved: its last recorded value against its first. */
|
|
13
|
+
export declare function sparkTrend(data: Array<number | null>): 'up' | 'down' | 'none';
|
|
14
|
+
/** The resolved stroke / fill colour, or `undefined` when neither `color` nor `tone` is given. */
|
|
15
|
+
export declare function sparkColor(data: Array<number | null>, { color, tone, higherIs, worseTone }: SparkColorOptions): string | undefined;
|
|
16
|
+
export declare const isSparkValue: (v: number | null | undefined) => v is number;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
import { type SparkTone } from '../SparkChart/spark';
|
|
3
|
+
import '../Chart/Chart.css';
|
|
4
|
+
import './Sparkbar.css';
|
|
5
|
+
export interface SparkbarProps {
|
|
6
|
+
/** One bar per slot. `null` = no data yet (future days): drawn as a flat placeholder. */
|
|
7
|
+
data: Array<number | null>;
|
|
8
|
+
/** Height of the strip in px. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Value of a full-height bar. Defaults to the largest value. */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** CSS variable (`--accent`) or any color. The highlighted bar gets a little darker. */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Bar colour by role (shared with SparkLine): accent · neutral · trend (green / orange by direction). `color` wins. */
|
|
15
|
+
tone?: SparkTone;
|
|
16
|
+
/** What a higher number means for `tone="trend"`. */
|
|
17
|
+
higherIs?: 'better' | 'worse' | 'neutral';
|
|
18
|
+
/** Color of a change for the worse with `tone="trend"`. */
|
|
19
|
+
worseTone?: 'warning' | 'danger';
|
|
20
|
+
/** Tooltip title per slot, e.g. "10월 3일". */
|
|
21
|
+
formatLabel?: (index: number) => string;
|
|
22
|
+
/** Row name in the tooltip, e.g. "사용량". */
|
|
23
|
+
valueLabel?: string;
|
|
24
|
+
formatValue?: (value: number) => string;
|
|
25
|
+
/** Value card on hover / keyboard focus. */
|
|
26
|
+
tooltip?: boolean;
|
|
27
|
+
activeIndex?: number | null;
|
|
28
|
+
defaultActiveIndex?: number | null;
|
|
29
|
+
onActiveIndexChange?: (index: number | null) => void;
|
|
30
|
+
'aria-label'?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A compact strip of bars without axes — daily counts under a total, activity in a row.
|
|
36
|
+
* Bars grow from the baseline once and slide to new heights when the data changes.
|
|
37
|
+
* Hover, touch and ←/→ highlight a bar and show its value in the chart tooltip card.
|
|
38
|
+
*/
|
|
39
|
+
export declare function Sparkbar({ data, height, max, color, tone, higherIs, worseTone, formatLabel, formatValue, valueLabel, tooltip, activeIndex, defaultActiveIndex, onActiveIndexChange, 'aria-label': ariaLabel, className, style, }: SparkbarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import './SplitView.css';
|
|
3
|
+
export interface SplitViewProps {
|
|
4
|
+
/** The list (master) pane on the left. */
|
|
5
|
+
list: ReactNode;
|
|
6
|
+
/** The detail pane on the right. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Width of the list pane, px (controlled). */
|
|
9
|
+
listWidth?: number;
|
|
10
|
+
/** Starting width of the list pane, px. Double-clicking the divider returns to it. */
|
|
11
|
+
defaultListWidth?: number;
|
|
12
|
+
/** While dragging or pressing arrows on the divider. */
|
|
13
|
+
onListWidthChange?: (width: number) => void;
|
|
14
|
+
minListWidth?: number;
|
|
15
|
+
maxListWidth?: number;
|
|
16
|
+
/** A divider you can drag (or focus and move with ←/→) to resize the list pane. */
|
|
17
|
+
resizable?: boolean;
|
|
18
|
+
/** soft (default): the list pane sits on a soft gray panel, so raised selected rows stand out · plain: white. */
|
|
19
|
+
listTone?: 'plain' | 'soft';
|
|
20
|
+
/** Accessible names of the two panes. */
|
|
21
|
+
listLabel?: string;
|
|
22
|
+
detailLabel?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Master–detail layout: a list pane and a detail pane side by side, each scrolling on its own.
|
|
28
|
+
* Give it a height (or put it in one). With `resizable` the divider is a WAI-ARIA separator:
|
|
29
|
+
* drag it, or focus it and use ←/→ (Shift for bigger steps), Home/End; Esc during a drag puts it back.
|
|
30
|
+
*/
|
|
31
|
+
export declare function SplitView({ list, children, listWidth, defaultListWidth, onListWidthChange, minListWidth, maxListWidth, resizable, listTone, listLabel, detailLabel, className, style, }: SplitViewProps): import("react").JSX.Element;
|