@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,228 @@
|
|
|
1
|
+
# TimePicker
|
|
2
|
+
|
|
3
|
+
> 선택 컨트롤 · `@iamfiro/design` · 직접 만들지 말고 이 컴포넌트를 쓴다.
|
|
4
|
+
|
|
5
|
+
시각 입력. DatePicker와 같은 입력 칸이라 '14:30', '오후 2시 반'처럼 바로 쳐도 되고, 누르면 오전·오후 / 시 / 분 열이 열려요. 열마다 따로 스크롤되고 한 칸씩 맞춰 멈춰요. 고르는 동안은 칸에 미리 보여주기만 하고, Enter · 확인 · 바깥 클릭에서 확정, Esc는 열기 전 시각으로 되돌려요. 값은 언제나 'HH:mm'(24시간) 문자열이에요. 일정처럼 정해진 칸에서 고를 땐 mode="list".
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { TimePicker, formatTime, parseTimeInput } from '@iamfiro/design'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## API
|
|
12
|
+
|
|
13
|
+
### TimePicker
|
|
14
|
+
|
|
15
|
+
| prop | 타입 | 기본값 | 설명 |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| `value` | `string \| null` | | 'HH:mm'(제어). |
|
|
18
|
+
| `defaultValue` | `string \| null` | `null` | 처음 값(비제어). |
|
|
19
|
+
| `onValueChange` | `(time: string \| null) => void` | | 확정하거나 지울 때. |
|
|
20
|
+
| `hourCycle` | `12 \| 24` | `12` | '오후 2:30' + 오전·오후 열, 또는 '14:30'. |
|
|
21
|
+
| `minuteStep` | `number` | `5 (list: 30)` | 분 열 간격 · 목록 칸 간격. |
|
|
22
|
+
| `min / max` | `string` | | 고를 수 있는 처음 · 마지막 시각('HH:mm'). |
|
|
23
|
+
| `isTimeDisabled` | `(time: string) => boolean` | | 추가로 막을 시각(점심시간, 예약된 칸). |
|
|
24
|
+
| `mode` | `'columns' \| 'list'` | `'columns'` | 열 팝오버 또는 Listbox 목록. |
|
|
25
|
+
| `durationFrom` | `string` | | 목록 모드: 이 시각부터의 길이를 설명으로 보여주고, 이전 칸은 막아요(종료 시간). |
|
|
26
|
+
| `formatValue` | `(time: string) => string` | `formatTime` | 칸에 쓰는 형식. |
|
|
27
|
+
| `placeholder` | `string` | `'시간 입력 또는 선택'` | 비었을 때 문구. |
|
|
28
|
+
| `clearable` | `boolean` | `true` | × 지우기. |
|
|
29
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 높이 36 / 44 / 52px. |
|
|
30
|
+
| `invalid / disabled` | `boolean` | | 오류 · 비활성. |
|
|
31
|
+
| `align` | `'start' \| 'end'` | `'start'` | 팝오버 정렬. |
|
|
32
|
+
| `name` | `string` | | 폼 제출용 hidden input('HH:mm'). |
|
|
33
|
+
|
|
34
|
+
### 도우미 함수
|
|
35
|
+
|
|
36
|
+
| prop | 타입 | 기본값 | 설명 |
|
|
37
|
+
| --- | --- | --- | --- |
|
|
38
|
+
| `formatTime(time, hourCycle?)` | `string` | | '14:30' → '오후 2:30' / '14:30'. |
|
|
39
|
+
| `parseTimeInput(text)` | `string \| null` | | '오후 2시 반' → '14:30'. 못 읽으면 null. |
|
|
40
|
+
| `timeToMinutes / minutesToTime` | `number · string` | | 'HH:mm' ↔ 자정부터의 분. |
|
|
41
|
+
| `formatDuration(minutes)` | `string` | | 90 → '1시간 30분'. |
|
|
42
|
+
|
|
43
|
+
## 예제
|
|
44
|
+
|
|
45
|
+
예제를 감싼 `style={{ ... }}` div는 미리보기 배치용이다. 실제 화면 배치는 `Stack` · `Inline` · `Grid`로 한다.
|
|
46
|
+
|
|
47
|
+
### 기본
|
|
48
|
+
|
|
49
|
+
'오후 2:30'처럼 보이고 값은 '14:30'. ↓로 열에 들어가 ↑↓로 바꾸고, ←→ · Tab으로 열을 옮겨요. Enter 확정, Esc 취소.
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { useState } from 'react'
|
|
53
|
+
import { Field, Stack, Text, TimePicker } from '@iamfiro/design'
|
|
54
|
+
|
|
55
|
+
export default function Example() {
|
|
56
|
+
const [time, setTime] = useState<string | null>('14:30')
|
|
57
|
+
return (
|
|
58
|
+
<Stack gap={2} style={{ width: 260 }}>
|
|
59
|
+
<Field label="알림 시간" htmlFor="remind-at">
|
|
60
|
+
<TimePicker id="remind-at" value={time} onValueChange={setTime} />
|
|
61
|
+
</Field>
|
|
62
|
+
<Text variant="caption" tone="tertiary">
|
|
63
|
+
값: {time ?? '없음'}
|
|
64
|
+
</Text>
|
|
65
|
+
</Stack>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 직접 입력
|
|
71
|
+
|
|
72
|
+
완전한 시각이 되면 열이 따라와요. 못 알아들으면 빨갛게, 칸을 벗어나면 원래 값으로. 오전·오후가 없으면 24시간으로 읽어요.
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { useState } from 'react'
|
|
76
|
+
import { Field, Stack, Text, TimePicker } from '@iamfiro/design'
|
|
77
|
+
|
|
78
|
+
export default function Example() {
|
|
79
|
+
const [time, setTime] = useState<string | null>(null)
|
|
80
|
+
return (
|
|
81
|
+
<Stack gap={2} style={{ width: 260 }}>
|
|
82
|
+
<Field label="퇴근 시간" htmlFor="leave-at" hint="예) 18:30 · 1830 · 오후 6시 반 · 6:30pm · 정오">
|
|
83
|
+
<TimePicker id="leave-at" value={time} onValueChange={setTime} />
|
|
84
|
+
</Field>
|
|
85
|
+
<Text variant="caption" tone="tertiary">
|
|
86
|
+
값: {time ?? '없음'}
|
|
87
|
+
</Text>
|
|
88
|
+
</Stack>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 12시간 · 24시간 · 간격
|
|
94
|
+
|
|
95
|
+
hourCycle과 minuteStep. 간격에 안 맞게 친 분(09:07)도 열에 끼워 보여줘요.
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
import { Field, Grid, TimePicker } from '@iamfiro/design'
|
|
99
|
+
|
|
100
|
+
export default function Example() {
|
|
101
|
+
return (
|
|
102
|
+
<Grid columns={2} gap={4} style={{ width: 480 }}>
|
|
103
|
+
<Field label="12시간 · 5분 단위" htmlFor="tp-12">
|
|
104
|
+
<TimePicker id="tp-12" defaultValue="09:05" />
|
|
105
|
+
</Field>
|
|
106
|
+
<Field label="24시간 · 15분 단위" htmlFor="tp-24">
|
|
107
|
+
<TimePicker id="tp-24" hourCycle={24} minuteStep={15} defaultValue="21:45" />
|
|
108
|
+
</Field>
|
|
109
|
+
</Grid>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 고를 수 있는 시간 제한
|
|
115
|
+
|
|
116
|
+
min · max · isTimeDisabled. 모든 분이 막힌 시와 오전·오후도 함께 막혀요.
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
import { Field, TimePicker, timeToMinutes } from '@iamfiro/design'
|
|
120
|
+
|
|
121
|
+
// 점심시간(12:00 – 12:59)은 예약할 수 없어요.
|
|
122
|
+
const isLunch = (time: string) => timeToMinutes(time) >= 12 * 60 && timeToMinutes(time) < 13 * 60
|
|
123
|
+
|
|
124
|
+
export default function Example() {
|
|
125
|
+
return (
|
|
126
|
+
<div style={{ width: 260 }}>
|
|
127
|
+
<Field label="방문 예약" htmlFor="visit-at" hint="09:00 – 18:00, 점심시간 제외. 막힌 시간은 취소선이에요.">
|
|
128
|
+
<TimePicker id="visit-at" min="09:00" max="18:00" minuteStep={10} isTimeDisabled={isLunch} />
|
|
129
|
+
</Field>
|
|
130
|
+
</div>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 목록 모드(일정)
|
|
136
|
+
|
|
137
|
+
mode="list"는 30분 간격 목록. 종료 칸은 durationFrom으로 길이('1시간 30분')를 보여주고 시작 이전은 막아요. 입력 칸에서 ↑↓로 옮기며 계속 칠 수 있어요.
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import { useState } from 'react'
|
|
141
|
+
import { Field, Grid, TimePicker, minutesToTime, timeToMinutes } from '@iamfiro/design'
|
|
142
|
+
|
|
143
|
+
export default function Example() {
|
|
144
|
+
const [start, setStart] = useState<string | null>('10:00')
|
|
145
|
+
const [end, setEnd] = useState<string | null>('11:00')
|
|
146
|
+
return (
|
|
147
|
+
<Grid columns={2} gap={4} style={{ width: 480 }}>
|
|
148
|
+
<Field label="시작" htmlFor="meet-start">
|
|
149
|
+
<TimePicker
|
|
150
|
+
id="meet-start"
|
|
151
|
+
mode="list"
|
|
152
|
+
min="08:00"
|
|
153
|
+
max="20:00"
|
|
154
|
+
value={start}
|
|
155
|
+
onValueChange={(next) => {
|
|
156
|
+
setStart(next)
|
|
157
|
+
// 시작을 옮기면 끝도 같은 길이만큼 따라가요.
|
|
158
|
+
if (next && start && end) {
|
|
159
|
+
const length = timeToMinutes(end) - timeToMinutes(start)
|
|
160
|
+
setEnd(minutesToTime(Math.min(timeToMinutes(next) + length, 21 * 60)))
|
|
161
|
+
}
|
|
162
|
+
}}
|
|
163
|
+
/>
|
|
164
|
+
</Field>
|
|
165
|
+
<Field label="종료" htmlFor="meet-end">
|
|
166
|
+
<TimePicker id="meet-end" mode="list" min="08:00" max="21:00" durationFrom={start ?? undefined} value={end} onValueChange={setEnd} />
|
|
167
|
+
</Field>
|
|
168
|
+
</Grid>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### DatePicker와 함께
|
|
174
|
+
|
|
175
|
+
날짜와 시각을 따로 받아 하나의 Date로 합쳐요.
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
import { useState } from 'react'
|
|
179
|
+
import { Field, Grid, Stack, Text, DatePicker, TimePicker, formatDate, formatTime, timeToMinutes } from '@iamfiro/design'
|
|
180
|
+
|
|
181
|
+
export default function Example() {
|
|
182
|
+
const [date, setDate] = useState<Date | null>(new Date(2026, 9, 28))
|
|
183
|
+
const [time, setTime] = useState<string | null>('15:00')
|
|
184
|
+
const at = date && time ? new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, timeToMinutes(time)) : null
|
|
185
|
+
return (
|
|
186
|
+
<Stack gap={2} style={{ width: 480 }}>
|
|
187
|
+
<Grid columns={2} gap={3}>
|
|
188
|
+
<Field label="게시 날짜" htmlFor="publish-date">
|
|
189
|
+
<DatePicker id="publish-date" value={date} onValueChange={setDate} />
|
|
190
|
+
</Field>
|
|
191
|
+
<Field label="게시 시간" htmlFor="publish-time">
|
|
192
|
+
<TimePicker id="publish-time" value={time} onValueChange={setTime} minuteStep={15} />
|
|
193
|
+
</Field>
|
|
194
|
+
</Grid>
|
|
195
|
+
<Text variant="caption" tone="tertiary">
|
|
196
|
+
{at && time ? `${formatDate(at)} ${formatTime(time)}에 게시돼요` : '날짜와 시간을 골라 주세요'}
|
|
197
|
+
</Text>
|
|
198
|
+
</Stack>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 크기와 상태
|
|
204
|
+
|
|
205
|
+
size · invalid · disabled. Field와 함께 쓰면 라벨이 연결돼요.
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import { Field, Grid, TimePicker } from '@iamfiro/design'
|
|
209
|
+
|
|
210
|
+
export default function Example() {
|
|
211
|
+
return (
|
|
212
|
+
<Grid columns={2} gap={4} style={{ width: 480 }}>
|
|
213
|
+
<Field label="작게 (sm)" htmlFor="tp-sm">
|
|
214
|
+
<TimePicker id="tp-sm" size="sm" defaultValue="08:30" />
|
|
215
|
+
</Field>
|
|
216
|
+
<Field label="크게 (lg)" htmlFor="tp-lg">
|
|
217
|
+
<TimePicker id="tp-lg" size="lg" />
|
|
218
|
+
</Field>
|
|
219
|
+
<Field label="마감 시간" invalid hint="마감 시간을 골라 주세요." htmlFor="tp-err">
|
|
220
|
+
<TimePicker id="tp-err" invalid />
|
|
221
|
+
</Field>
|
|
222
|
+
<Field label="정산 시간" htmlFor="tp-off">
|
|
223
|
+
<TimePicker id="tp-off" defaultValue="00:00" disabled />
|
|
224
|
+
</Field>
|
|
225
|
+
</Grid>
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
```
|