@eocrm/design-system 0.0.0-stage → 0.6.17
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/AI-PRIMER.md +341 -0
- package/README.md +262 -2
- package/docs/components/Accordion.md +114 -0
- package/docs/components/AgentAvatar.md +58 -0
- package/docs/components/Alert.md +81 -0
- package/docs/components/AppLayout.md +70 -0
- package/docs/components/Avatar.md +49 -0
- package/docs/components/AvatarGroup.md +47 -0
- package/docs/components/Badge.md +60 -0
- package/docs/components/Banner.md +89 -0
- package/docs/components/BrandIcon.md +32 -0
- package/docs/components/Breadcrumb.md +72 -0
- package/docs/components/Button.md +107 -0
- package/docs/components/ButtonGroup.md +78 -0
- package/docs/components/Calendar.md +158 -0
- package/docs/components/Card.md +165 -0
- package/docs/components/CatalogPicker.md +83 -0
- package/docs/components/Chart.md +114 -0
- package/docs/components/ChatBubble.md +55 -0
- package/docs/components/ChatLauncher.md +97 -0
- package/docs/components/Checkbox.md +55 -0
- package/docs/components/CircularProgress.md +53 -0
- package/docs/components/Cluster.md +96 -0
- package/docs/components/Code.md +35 -0
- package/docs/components/CodeBlock.md +67 -0
- package/docs/components/ColorPicker.md +115 -0
- package/docs/components/ConfirmationPopover.md +70 -0
- package/docs/components/Constrain.md +39 -0
- package/docs/components/CurrencySelect.md +57 -0
- package/docs/components/CursorPagination.md +43 -0
- package/docs/components/DashboardCanvas.md +79 -0
- package/docs/components/DashboardWidget.md +131 -0
- package/docs/components/DataTable.md +88 -0
- package/docs/components/DatePicker.md +68 -0
- package/docs/components/DateRangePicker.md +71 -0
- package/docs/components/DateStrip.md +56 -0
- package/docs/components/DefinitionList.md +82 -0
- package/docs/components/Divider.md +57 -0
- package/docs/components/Dot.md +26 -0
- package/docs/components/Drawer.md +94 -0
- package/docs/components/DropdownMenu.md +299 -0
- package/docs/components/EmojiPicker.md +84 -0
- package/docs/components/EmptyState.md +55 -0
- package/docs/components/EntityChip.md +102 -0
- package/docs/components/ErrorState.md +72 -0
- package/docs/components/Field.md +91 -0
- package/docs/components/FileUpload.md +109 -0
- package/docs/components/FilterChip.md +88 -0
- package/docs/components/FlowCanvas.md +108 -0
- package/docs/components/FormRow.md +31 -0
- package/docs/components/FormSection.md +37 -0
- package/docs/components/Grid.md +103 -0
- package/docs/components/Highlight.md +75 -0
- package/docs/components/HighlightedText.md +50 -0
- package/docs/components/IconPicker.md +134 -0
- package/docs/components/IconTile.md +30 -0
- package/docs/components/Image.md +84 -0
- package/docs/components/ImageCrop.md +163 -0
- package/docs/components/Indent.md +31 -0
- package/docs/components/InlineDatePicker.md +58 -0
- package/docs/components/InlineDateRangePicker.md +57 -0
- package/docs/components/Input.md +54 -0
- package/docs/components/Kanban.md +122 -0
- package/docs/components/Kbd.md +41 -0
- package/docs/components/Lightbox.md +105 -0
- package/docs/components/Link.md +65 -0
- package/docs/components/LinkCard.md +41 -0
- package/docs/components/LiquidEditor.md +84 -0
- package/docs/components/List.md +68 -0
- package/docs/components/LiveRegion.md +29 -0
- package/docs/components/LocaleProvider.md +25 -0
- package/docs/components/Logo.md +41 -0
- package/docs/components/Masonry.md +48 -0
- package/docs/components/MediaTile.md +95 -0
- package/docs/components/Modal.md +107 -0
- package/docs/components/MoneyInput.md +62 -0
- package/docs/components/OptionsPicker.md +123 -0
- package/docs/components/OtpInput.md +65 -0
- package/docs/components/Page.md +35 -0
- package/docs/components/PageHeader.md +133 -0
- package/docs/components/Pagination.md +44 -0
- package/docs/components/Palette.md +32 -0
- package/docs/components/PasswordInput.md +45 -0
- package/docs/components/PasswordStrengthMeter.md +27 -0
- package/docs/components/PersonDisplay.md +153 -0
- package/docs/components/PhoneInput.md +54 -0
- package/docs/components/PillMenu.md +91 -0
- package/docs/components/Popover.md +127 -0
- package/docs/components/Progress.md +56 -0
- package/docs/components/QrCode.md +34 -0
- package/docs/components/Radio.md +37 -0
- package/docs/components/RadioGroup.md +56 -0
- package/docs/components/Rail.md +191 -0
- package/docs/components/RelativeDateInput.md +114 -0
- package/docs/components/RichText.md +44 -0
- package/docs/components/RichTextEditor.md +112 -0
- package/docs/components/Screen.md +37 -0
- package/docs/components/ScrollArea.md +39 -0
- package/docs/components/Select.md +131 -0
- package/docs/components/SettingRow.md +98 -0
- package/docs/components/Skeleton.md +68 -0
- package/docs/components/Slider.md +92 -0
- package/docs/components/SlotGrid.md +55 -0
- package/docs/components/SocialButton.md +31 -0
- package/docs/components/Sortable.md +127 -0
- package/docs/components/SortableGroup.md +52 -0
- package/docs/components/Sparkline.md +51 -0
- package/docs/components/Split.md +76 -0
- package/docs/components/Stack.md +59 -0
- package/docs/components/StagePath.md +66 -0
- package/docs/components/StatGroup.md +61 -0
- package/docs/components/StatTile.md +58 -0
- package/docs/components/Sticky.md +69 -0
- package/docs/components/Switch.md +89 -0
- package/docs/components/Table.md +184 -0
- package/docs/components/TableOfContents.md +76 -0
- package/docs/components/Tabs.md +94 -0
- package/docs/components/Text.md +63 -0
- package/docs/components/Textarea.md +59 -0
- package/docs/components/Thread.md +52 -0
- package/docs/components/TimeField.md +70 -0
- package/docs/components/Timeline.md +57 -0
- package/docs/components/Title.md +54 -0
- package/docs/components/ToastViewport.md +61 -0
- package/docs/components/Tooltip.md +63 -0
- package/docs/components/TopBar.md +214 -0
- package/docs/components/Tour.md +85 -0
- package/docs/components/TreeView.md +113 -0
- package/docs/components/VisuallyHidden.md +43 -0
- package/docs/components/WidgetPreview.md +54 -0
- package/docs/components/useBelowBreakpoint.md +11 -0
- package/docs/components/useMonth.md +18 -0
- package/docs/setup.md +51 -0
- package/docs/theming.md +95 -0
- package/docs/tokens.md +123 -0
- package/docs/transient-state.md +56 -0
- package/package.json +82 -4
- package/src/_meta/manifest.ts +293 -0
- package/src/app/AppProvider.tsx +78 -0
- package/src/app/index.ts +3 -0
- package/src/app/themeTokens.ts +95 -0
- package/src/calendar/dateMath.ts +114 -0
- package/src/calendar/formatters.ts +75 -0
- package/src/calendar/index.ts +39 -0
- package/src/calendar/types.ts +36 -0
- package/src/calendar/useAgenda.ts +70 -0
- package/src/calendar/useDay.ts +51 -0
- package/src/calendar/useMonth.ts +82 -0
- package/src/calendar/useWeek.ts +62 -0
- package/src/calendar/weekInfo.ts +83 -0
- package/src/components/Accordion/Accordion.module.scss +304 -0
- package/src/components/Accordion/Accordion.tokens.scss +64 -0
- package/src/components/Accordion/Accordion.tsx +272 -0
- package/src/components/Accordion/AccordionContent.tsx +36 -0
- package/src/components/Accordion/AccordionItem.tsx +66 -0
- package/src/components/Accordion/AccordionTrigger.tsx +121 -0
- package/src/components/Accordion/context.ts +47 -0
- package/src/components/Accordion/index.ts +14 -0
- package/src/components/Alert/Alert.module.scss +92 -0
- package/src/components/Alert/Alert.tokens.scss +60 -0
- package/src/components/Alert/Alert.tsx +136 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/AppLayout/AppLayout.module.scss +130 -0
- package/src/components/AppLayout/AppLayout.tokens.scss +27 -0
- package/src/components/AppLayout/AppLayout.tsx +211 -0
- package/src/components/AppLayout/index.ts +2 -0
- package/src/components/Avatar/AgentAvatar.module.scss +117 -0
- package/src/components/Avatar/AgentAvatar.tsx +122 -0
- package/src/components/Avatar/Avatar.module.scss +181 -0
- package/src/components/Avatar/Avatar.tokens.scss +107 -0
- package/src/components/Avatar/Avatar.tsx +210 -0
- package/src/components/Avatar/AvatarGroup.module.scss +128 -0
- package/src/components/Avatar/AvatarGroup.tsx +119 -0
- package/src/components/Avatar/AvatarGroupContext.tsx +20 -0
- package/src/components/Avatar/index.ts +6 -0
- package/src/components/Badge/Badge.module.scss +124 -0
- package/src/components/Badge/Badge.tokens.scss +74 -0
- package/src/components/Badge/Badge.tsx +164 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Banner/Banner.module.scss +73 -0
- package/src/components/Banner/Banner.tokens.scss +51 -0
- package/src/components/Banner/Banner.tsx +138 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/BrandIcon/BrandIcon.module.scss +5 -0
- package/src/components/BrandIcon/BrandIcon.tsx +99 -0
- package/src/components/BrandIcon/index.ts +2 -0
- package/src/components/Breadcrumb/Breadcrumb.module.scss +32 -0
- package/src/components/Breadcrumb/Breadcrumb.tokens.scss +9 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +146 -0
- package/src/components/Breadcrumb/index.ts +2 -0
- package/src/components/Button/Button.module.scss +167 -0
- package/src/components/Button/Button.tokens.scss +90 -0
- package/src/components/Button/Button.tsx +205 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/ButtonGroup/ButtonGroup.module.scss +134 -0
- package/src/components/ButtonGroup/ButtonGroup.tokens.scss +42 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +278 -0
- package/src/components/ButtonGroup/ButtonGroupItem.tsx +74 -0
- package/src/components/ButtonGroup/context.ts +45 -0
- package/src/components/ButtonGroup/index.ts +2 -0
- package/src/components/Calendar/AgendaView.module.scss +231 -0
- package/src/components/Calendar/AgendaView.tsx +214 -0
- package/src/components/Calendar/AllDayBand.module.scss +18 -0
- package/src/components/Calendar/AllDayBand.tsx +75 -0
- package/src/components/Calendar/Calendar.module.scss +23 -0
- package/src/components/Calendar/Calendar.tokens.scss +262 -0
- package/src/components/Calendar/Calendar.tsx +370 -0
- package/src/components/Calendar/DayCell.module.scss +30 -0
- package/src/components/Calendar/DayCell.tsx +50 -0
- package/src/components/Calendar/DayView.module.scss +10 -0
- package/src/components/Calendar/DayView.tsx +163 -0
- package/src/components/Calendar/EventChip.module.scss +171 -0
- package/src/components/Calendar/EventChip.tsx +115 -0
- package/src/components/Calendar/HourGrid.module.scss +123 -0
- package/src/components/Calendar/HourGrid.tsx +381 -0
- package/src/components/Calendar/MonthView.module.scss +99 -0
- package/src/components/Calendar/MonthView.tsx +296 -0
- package/src/components/Calendar/TimedEvent.module.scss +205 -0
- package/src/components/Calendar/TimedEvent.tsx +247 -0
- package/src/components/Calendar/ViewSwitcher.module.scss +3 -0
- package/src/components/Calendar/ViewSwitcher.tsx +47 -0
- package/src/components/Calendar/WeekView.module.scss +10 -0
- package/src/components/Calendar/WeekView.tsx +137 -0
- package/src/components/Calendar/eventColor.ts +60 -0
- package/src/components/Calendar/index.ts +18 -0
- package/src/components/Calendar/types.ts +451 -0
- package/src/components/Calendar/useEventDrag.ts +783 -0
- package/src/components/Calendar/utils.ts +622 -0
- package/src/components/Card/Card.module.scss +264 -0
- package/src/components/Card/Card.tokens.scss +55 -0
- package/src/components/Card/Card.tsx +170 -0
- package/src/components/Card/CardBody.tsx +45 -0
- package/src/components/Card/CardHeader.tsx +113 -0
- package/src/components/Card/CardList.tsx +24 -0
- package/src/components/Card/CardListRow.tsx +24 -0
- package/src/components/Card/index.ts +7 -0
- package/src/components/CatalogPicker/CatalogPicker.module.scss +193 -0
- package/src/components/CatalogPicker/CatalogPicker.tokens.scss +26 -0
- package/src/components/CatalogPicker/CatalogPicker.tsx +339 -0
- package/src/components/CatalogPicker/index.ts +2 -0
- package/src/components/Chart/Chart.module.scss +287 -0
- package/src/components/Chart/Chart.tokens.scss +63 -0
- package/src/components/Chart/Chart.tsx +607 -0
- package/src/components/Chart/ChartLegend.tsx +99 -0
- package/src/components/Chart/ChartTable.tsx +62 -0
- package/src/components/Chart/ChartTooltip.tsx +91 -0
- package/src/components/Chart/chartModel.ts +689 -0
- package/src/components/Chart/index.ts +2 -0
- package/src/components/ChatBubble/ChatBubble.module.scss +93 -0
- package/src/components/ChatBubble/ChatBubble.tokens.scss +17 -0
- package/src/components/ChatBubble/ChatBubble.tsx +61 -0
- package/src/components/ChatBubble/ChatBubbleList.tsx +27 -0
- package/src/components/ChatBubble/index.ts +3 -0
- package/src/components/ChatLauncher/ChatLauncher.module.scss +68 -0
- package/src/components/ChatLauncher/ChatLauncher.tokens.scss +27 -0
- package/src/components/ChatLauncher/ChatLauncher.tsx +202 -0
- package/src/components/ChatLauncher/index.ts +2 -0
- package/src/components/ChatLauncher/isAtBottom.ts +12 -0
- package/src/components/Checkbox/Checkbox.module.scss +147 -0
- package/src/components/Checkbox/Checkbox.tokens.scss +44 -0
- package/src/components/Checkbox/Checkbox.tsx +188 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/CircularProgress/CircularProgress.module.scss +133 -0
- package/src/components/CircularProgress/CircularProgress.tokens.scss +40 -0
- package/src/components/CircularProgress/CircularProgress.tsx +139 -0
- package/src/components/CircularProgress/index.ts +7 -0
- package/src/components/Cluster/Cluster.module.scss +145 -0
- package/src/components/Cluster/Cluster.tokens.scss +11 -0
- package/src/components/Cluster/Cluster.tsx +215 -0
- package/src/components/Cluster/index.ts +2 -0
- package/src/components/Code/Code.module.scss +28 -0
- package/src/components/Code/Code.tokens.scss +15 -0
- package/src/components/Code/Code.tsx +44 -0
- package/src/components/Code/index.ts +2 -0
- package/src/components/CodeBlock/CodeBlock.module.scss +146 -0
- package/src/components/CodeBlock/CodeBlock.tokens.scss +27 -0
- package/src/components/CodeBlock/CodeBlock.tsx +274 -0
- package/src/components/CodeBlock/highlight.ts +179 -0
- package/src/components/CodeBlock/index.ts +8 -0
- package/src/components/CodeBlock/sampleSync.ts +42 -0
- package/src/components/ColorPicker/ColorPicker.module.scss +286 -0
- package/src/components/ColorPicker/ColorPicker.tokens.scss +60 -0
- package/src/components/ColorPicker/ColorPicker.tsx +367 -0
- package/src/components/ColorPicker/ColorPickerPanel.tsx +265 -0
- package/src/components/ColorPicker/SVSquare.tsx +189 -0
- package/src/components/ColorPicker/colorMath.ts +141 -0
- package/src/components/ColorPicker/index.ts +6 -0
- package/src/components/ConfirmationPopover/ConfirmationPopover.module.scss +39 -0
- package/src/components/ConfirmationPopover/ConfirmationPopover.tokens.scss +13 -0
- package/src/components/ConfirmationPopover/ConfirmationPopover.tsx +395 -0
- package/src/components/ConfirmationPopover/index.ts +2 -0
- package/src/components/Constrain/Constrain.module.scss +99 -0
- package/src/components/Constrain/Constrain.tsx +79 -0
- package/src/components/Constrain/index.ts +2 -0
- package/src/components/CurrencySelect/CurrencySelect.module.scss +7 -0
- package/src/components/CurrencySelect/CurrencySelect.tsx +167 -0
- package/src/components/CurrencySelect/index.ts +3 -0
- package/src/components/CursorPagination/CursorPagination.module.scss +69 -0
- package/src/components/CursorPagination/CursorPagination.tokens.scss +32 -0
- package/src/components/CursorPagination/CursorPagination.tsx +121 -0
- package/src/components/CursorPagination/index.ts +2 -0
- package/src/components/DashboardCanvas/DashboardCanvas.module.scss +360 -0
- package/src/components/DashboardCanvas/DashboardCanvas.tokens.scss +48 -0
- package/src/components/DashboardCanvas/DashboardCanvas.tsx +1270 -0
- package/src/components/DashboardCanvas/DashboardCanvasItem.tsx +140 -0
- package/src/components/DashboardCanvas/DashboardCanvasSection.tsx +174 -0
- package/src/components/DashboardCanvas/engine.ts +363 -0
- package/src/components/DashboardCanvas/index.ts +9 -0
- package/src/components/DashboardWidget/DashboardWidget.module.scss +100 -0
- package/src/components/DashboardWidget/DashboardWidget.tokens.scss +16 -0
- package/src/components/DashboardWidget/DashboardWidget.tsx +188 -0
- package/src/components/DashboardWidget/index.ts +7 -0
- package/src/components/DataTable/BodyRow.tsx +197 -0
- package/src/components/DataTable/ColumnVisibilityTrigger.module.scss +7 -0
- package/src/components/DataTable/ColumnVisibilityTrigger.tsx +105 -0
- package/src/components/DataTable/DataTable.module.scss +511 -0
- package/src/components/DataTable/DataTable.tokens.scss +80 -0
- package/src/components/DataTable/DataTable.tsx +734 -0
- package/src/components/DataTable/HeaderCell.module.scss +215 -0
- package/src/components/DataTable/HeaderCell.tsx +440 -0
- package/src/components/DataTable/columnShift.ts +117 -0
- package/src/components/DataTable/index.ts +23 -0
- package/src/components/DataTable/pinStyle.ts +47 -0
- package/src/components/DataTable/reorderColumns.ts +66 -0
- package/src/components/DataTable/types.ts +289 -0
- package/src/components/DataTable/useColumnDragShift.ts +216 -0
- package/src/components/DataTable/useDataTable.ts +372 -0
- package/src/components/DataTable/useResizeHandle.ts +97 -0
- package/src/components/DatePicker/DatePicker.module.scss +180 -0
- package/src/components/DatePicker/DatePicker.tokens.scss +152 -0
- package/src/components/DatePicker/DatePicker.tsx +664 -0
- package/src/components/DatePicker/DatePickerGrid.module.scss +172 -0
- package/src/components/DatePicker/DatePickerGrid.tsx +341 -0
- package/src/components/DatePicker/InlineDatePicker.module.scss +32 -0
- package/src/components/DatePicker/InlineDatePicker.tsx +201 -0
- package/src/components/DatePicker/index.ts +4 -0
- package/src/components/DatePicker/utils.ts +364 -0
- package/src/components/DateRangePicker/DateRangePicker.module.scss +237 -0
- package/src/components/DateRangePicker/DateRangePicker.tokens.scss +78 -0
- package/src/components/DateRangePicker/DateRangePicker.tsx +720 -0
- package/src/components/DateRangePicker/InlineDateRangePicker.module.scss +94 -0
- package/src/components/DateRangePicker/InlineDateRangePicker.tsx +376 -0
- package/src/components/DateRangePicker/index.ts +5 -0
- package/src/components/DateRangePicker/utils.ts +151 -0
- package/src/components/DateStrip/DateStrip.module.scss +78 -0
- package/src/components/DateStrip/DateStrip.tokens.scss +23 -0
- package/src/components/DateStrip/DateStrip.tsx +205 -0
- package/src/components/DateStrip/index.ts +2 -0
- package/src/components/DefinitionList/DefinitionList.module.scss +102 -0
- package/src/components/DefinitionList/DefinitionList.tokens.scss +29 -0
- package/src/components/DefinitionList/DefinitionList.tsx +198 -0
- package/src/components/DefinitionList/index.ts +9 -0
- package/src/components/Divider/Divider.module.scss +144 -0
- package/src/components/Divider/Divider.tokens.scss +21 -0
- package/src/components/Divider/Divider.tsx +103 -0
- package/src/components/Divider/index.ts +2 -0
- package/src/components/Dot/Dot.module.scss +40 -0
- package/src/components/Dot/Dot.tokens.scss +4 -0
- package/src/components/Dot/Dot.tsx +45 -0
- package/src/components/Dot/index.ts +2 -0
- package/src/components/Drawer/Body.tsx +23 -0
- package/src/components/Drawer/Close.tsx +35 -0
- package/src/components/Drawer/Content.tsx +93 -0
- package/src/components/Drawer/Drawer.module.scss +232 -0
- package/src/components/Drawer/Drawer.tokens.scss +38 -0
- package/src/components/Drawer/Drawer.tsx +23 -0
- package/src/components/Drawer/DrawerRoot.tsx +190 -0
- package/src/components/Drawer/Footer.tsx +24 -0
- package/src/components/Drawer/Header.tsx +64 -0
- package/src/components/Drawer/Overlay.tsx +82 -0
- package/src/components/Drawer/context.ts +44 -0
- package/src/components/Drawer/index.ts +12 -0
- package/src/components/Drawer/useDragToClose.ts +149 -0
- package/src/components/DropdownMenu/CheckboxItem.tsx +144 -0
- package/src/components/DropdownMenu/Content.tsx +419 -0
- package/src/components/DropdownMenu/DropdownMenu.module.scss +280 -0
- package/src/components/DropdownMenu/DropdownMenu.tokens.scss +88 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +43 -0
- package/src/components/DropdownMenu/Group.tsx +76 -0
- package/src/components/DropdownMenu/Item.tsx +148 -0
- package/src/components/DropdownMenu/ItemIndicator.tsx +30 -0
- package/src/components/DropdownMenu/Radio.tsx +178 -0
- package/src/components/DropdownMenu/Root.tsx +100 -0
- package/src/components/DropdownMenu/Sub.tsx +332 -0
- package/src/components/DropdownMenu/Trigger.tsx +76 -0
- package/src/components/DropdownMenu/context.ts +65 -0
- package/src/components/DropdownMenu/index.ts +20 -0
- package/src/components/EmojiPicker/EmojiPicker.module.scss +84 -0
- package/src/components/EmojiPicker/EmojiPicker.tokens.scss +24 -0
- package/src/components/EmojiPicker/EmojiPicker.tsx +341 -0
- package/src/components/EmojiPicker/emojiData.ts +245 -0
- package/src/components/EmojiPicker/index.ts +3 -0
- package/src/components/EmptyState/EmptyState.module.scss +102 -0
- package/src/components/EmptyState/EmptyState.tokens.scss +28 -0
- package/src/components/EmptyState/EmptyState.tsx +112 -0
- package/src/components/EmptyState/index.ts +7 -0
- package/src/components/EntityChip/EntityChip.module.scss +275 -0
- package/src/components/EntityChip/EntityChip.tokens.scss +66 -0
- package/src/components/EntityChip/EntityChip.tsx +649 -0
- package/src/components/EntityChip/index.ts +10 -0
- package/src/components/ErrorState/ErrorState.module.scss +105 -0
- package/src/components/ErrorState/ErrorState.tokens.scss +32 -0
- package/src/components/ErrorState/ErrorState.tsx +125 -0
- package/src/components/ErrorState/index.ts +8 -0
- package/src/components/Field/Field.module.scss +46 -0
- package/src/components/Field/Field.tsx +185 -0
- package/src/components/Field/index.ts +2 -0
- package/src/components/FileUpload/FileUpload.module.scss +187 -0
- package/src/components/FileUpload/FileUpload.tokens.scss +81 -0
- package/src/components/FileUpload/FileUpload.tsx +569 -0
- package/src/components/FileUpload/formatBytes.ts +34 -0
- package/src/components/FileUpload/iconForFile.ts +40 -0
- package/src/components/FileUpload/index.ts +2 -0
- package/src/components/FilterChip/FilterChip.module.scss +61 -0
- package/src/components/FilterChip/FilterChip.tokens.scss +25 -0
- package/src/components/FilterChip/FilterChip.tsx +208 -0
- package/src/components/FilterChip/index.ts +5 -0
- package/src/components/FlowCanvas/FlowCanvas.module.scss +329 -0
- package/src/components/FlowCanvas/FlowCanvas.tokens.scss +45 -0
- package/src/components/FlowCanvas/FlowCanvas.tsx +1867 -0
- package/src/components/FlowCanvas/FlowControls.tsx +46 -0
- package/src/components/FlowCanvas/FlowEdge.tsx +58 -0
- package/src/components/FlowCanvas/FlowNode.tsx +76 -0
- package/src/components/FlowCanvas/edgePath.ts +85 -0
- package/src/components/FlowCanvas/index.ts +4 -0
- package/src/components/FlowCanvas/layout.ts +148 -0
- package/src/components/FlowCanvas/spatialNav.ts +76 -0
- package/src/components/FlowCanvas/types.ts +59 -0
- package/src/components/FlowCanvas/useViewport.ts +122 -0
- package/src/components/FormRow/FormRow.module.scss +2 -0
- package/src/components/FormRow/FormRow.tsx +37 -0
- package/src/components/FormRow/index.ts +2 -0
- package/src/components/FormSection/FormSection.module.scss +24 -0
- package/src/components/FormSection/FormSection.tsx +46 -0
- package/src/components/FormSection/index.ts +2 -0
- package/src/components/Grid/Grid.module.scss +162 -0
- package/src/components/Grid/Grid.tokens.scss +13 -0
- package/src/components/Grid/Grid.tsx +226 -0
- package/src/components/Grid/GridItem.tsx +77 -0
- package/src/components/Grid/index.ts +11 -0
- package/src/components/Highlight/Highlight.module.scss +43 -0
- package/src/components/Highlight/Highlight.tokens.scss +35 -0
- package/src/components/Highlight/Highlight.tsx +164 -0
- package/src/components/Highlight/HighlightOverlay.tsx +100 -0
- package/src/components/Highlight/index.ts +2 -0
- package/src/components/HighlightedText/HighlightedText.module.scss +11 -0
- package/src/components/HighlightedText/HighlightedText.tokens.scss +9 -0
- package/src/components/HighlightedText/HighlightedText.tsx +50 -0
- package/src/components/HighlightedText/highlightRanges.ts +44 -0
- package/src/components/HighlightedText/index.ts +2 -0
- package/src/components/IconPicker/IconPicker.module.scss +175 -0
- package/src/components/IconPicker/IconPicker.tokens.scss +40 -0
- package/src/components/IconPicker/IconPicker.tsx +629 -0
- package/src/components/IconPicker/index.ts +9 -0
- package/src/components/IconTile/IconTile.module.scss +57 -0
- package/src/components/IconTile/IconTile.tokens.scss +16 -0
- package/src/components/IconTile/IconTile.tsx +91 -0
- package/src/components/IconTile/index.ts +2 -0
- package/src/components/Image/Image.module.scss +266 -0
- package/src/components/Image/Image.tokens.scss +55 -0
- package/src/components/Image/Image.tsx +342 -0
- package/src/components/Image/index.ts +2 -0
- package/src/components/ImageCrop/ImageCrop.module.scss +274 -0
- package/src/components/ImageCrop/ImageCrop.tokens.scss +33 -0
- package/src/components/ImageCrop/ImageCrop.tsx +542 -0
- package/src/components/ImageCrop/cropGeometry.ts +120 -0
- package/src/components/ImageCrop/extractCropBlob.ts +140 -0
- package/src/components/ImageCrop/index.ts +11 -0
- package/src/components/ImageCrop/useCropPreview.ts +161 -0
- package/src/components/Indent/Indent.module.scss +33 -0
- package/src/components/Indent/Indent.tokens.scss +10 -0
- package/src/components/Indent/Indent.tsx +46 -0
- package/src/components/Indent/index.ts +2 -0
- package/src/components/Input/Input.module.scss +99 -0
- package/src/components/Input/Input.tokens.scss +54 -0
- package/src/components/Input/Input.tsx +105 -0
- package/src/components/Input/Suggestions.tsx +260 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/Kanban/Kanban.module.scss +39 -0
- package/src/components/Kanban/Kanban.tokens.scss +15 -0
- package/src/components/Kanban/Kanban.tsx +951 -0
- package/src/components/Kanban/index.ts +7 -0
- package/src/components/Kbd/Kbd.module.scss +47 -0
- package/src/components/Kbd/Kbd.tokens.scss +26 -0
- package/src/components/Kbd/Kbd.tsx +73 -0
- package/src/components/Kbd/index.ts +2 -0
- package/src/components/Lightbox/Lightbox.module.scss +283 -0
- package/src/components/Lightbox/Lightbox.tokens.scss +36 -0
- package/src/components/Lightbox/Lightbox.tsx +506 -0
- package/src/components/Lightbox/index.ts +2 -0
- package/src/components/Link/Link.module.scss +78 -0
- package/src/components/Link/Link.tokens.scss +28 -0
- package/src/components/Link/Link.tsx +114 -0
- package/src/components/Link/index.ts +2 -0
- package/src/components/LinkCard/LinkCard.module.scss +92 -0
- package/src/components/LinkCard/LinkCard.tokens.scss +9 -0
- package/src/components/LinkCard/LinkCard.tsx +72 -0
- package/src/components/LinkCard/index.ts +2 -0
- package/src/components/LiquidEditor/AutocompleteMenu.tsx +133 -0
- package/src/components/LiquidEditor/HighlightLayer.tsx +53 -0
- package/src/components/LiquidEditor/InsertVariableMenu.tsx +81 -0
- package/src/components/LiquidEditor/LiquidEditor.module.scss +339 -0
- package/src/components/LiquidEditor/LiquidEditor.tokens.scss +81 -0
- package/src/components/LiquidEditor/LiquidEditor.tsx +412 -0
- package/src/components/LiquidEditor/PreviewPane.tsx +29 -0
- package/src/components/LiquidEditor/caretCoordinates.ts +97 -0
- package/src/components/LiquidEditor/index.ts +7 -0
- package/src/components/LiquidEditor/liquidFilters.ts +23 -0
- package/src/components/LiquidEditor/liquidTokenizer.ts +235 -0
- package/src/components/LiquidEditor/types.ts +101 -0
- package/src/components/LiquidEditor/useLiquidAutocomplete.ts +178 -0
- package/src/components/List/List.module.scss +105 -0
- package/src/components/List/List.tokens.scss +42 -0
- package/src/components/List/List.tsx +124 -0
- package/src/components/List/index.ts +9 -0
- package/src/components/LiveRegion/LiveRegion.module.scss +3 -0
- package/src/components/LiveRegion/LiveRegion.tsx +116 -0
- package/src/components/LiveRegion/index.ts +2 -0
- package/src/components/Logo/Logo.module.scss +139 -0
- package/src/components/Logo/Logo.tokens.scss +14 -0
- package/src/components/Logo/Logo.tsx +126 -0
- package/src/components/Logo/index.ts +2 -0
- package/src/components/Masonry/Masonry.module.scss +42 -0
- package/src/components/Masonry/Masonry.tokens.scss +8 -0
- package/src/components/Masonry/Masonry.tsx +136 -0
- package/src/components/Masonry/index.ts +2 -0
- package/src/components/Masonry/masonryUtils.ts +42 -0
- package/src/components/MediaTile/MediaTile.module.scss +183 -0
- package/src/components/MediaTile/MediaTile.tokens.scss +60 -0
- package/src/components/MediaTile/MediaTile.tsx +208 -0
- package/src/components/MediaTile/index.ts +8 -0
- package/src/components/Modal/Body.tsx +27 -0
- package/src/components/Modal/Close.tsx +45 -0
- package/src/components/Modal/Content.tsx +98 -0
- package/src/components/Modal/Footer.tsx +28 -0
- package/src/components/Modal/Header.tsx +51 -0
- package/src/components/Modal/Modal.module.scss +262 -0
- package/src/components/Modal/Modal.tokens.scss +50 -0
- package/src/components/Modal/Modal.tsx +23 -0
- package/src/components/Modal/ModalRoot.tsx +299 -0
- package/src/components/Modal/Overlay.tsx +101 -0
- package/src/components/Modal/context.ts +60 -0
- package/src/components/Modal/index.ts +11 -0
- package/src/components/MoneyInput/MoneyInput.module.scss +57 -0
- package/src/components/MoneyInput/MoneyInput.tsx +433 -0
- package/src/components/MoneyInput/index.ts +2 -0
- package/src/components/OptionsPicker/OptionsPicker.module.scss +216 -0
- package/src/components/OptionsPicker/OptionsPicker.tokens.scss +68 -0
- package/src/components/OptionsPicker/OptionsPicker.tsx +936 -0
- package/src/components/OptionsPicker/index.ts +9 -0
- package/src/components/OtpInput/OtpInput.module.scss +69 -0
- package/src/components/OtpInput/OtpInput.tokens.scss +45 -0
- package/src/components/OtpInput/OtpInput.tsx +368 -0
- package/src/components/OtpInput/index.ts +2 -0
- package/src/components/Page/Page.module.scss +30 -0
- package/src/components/Page/Page.tokens.scss +11 -0
- package/src/components/Page/Page.tsx +53 -0
- package/src/components/Page/index.ts +2 -0
- package/src/components/PageHeader/PageHeader.module.scss +197 -0
- package/src/components/PageHeader/PageHeader.tokens.scss +41 -0
- package/src/components/PageHeader/PageHeader.tsx +310 -0
- package/src/components/PageHeader/index.ts +20 -0
- package/src/components/Pagination/Pagination.module.scss +117 -0
- package/src/components/Pagination/Pagination.tokens.scss +54 -0
- package/src/components/Pagination/Pagination.tsx +165 -0
- package/src/components/Pagination/index.ts +4 -0
- package/src/components/Pagination/paginationRange.ts +72 -0
- package/src/components/PasswordInput/PasswordInput.module.scss +120 -0
- package/src/components/PasswordInput/PasswordInput.tokens.scss +44 -0
- package/src/components/PasswordInput/PasswordInput.tsx +210 -0
- package/src/components/PasswordInput/index.ts +2 -0
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.module.scss +80 -0
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.tokens.scss +40 -0
- package/src/components/PasswordStrengthMeter/PasswordStrengthMeter.tsx +96 -0
- package/src/components/PasswordStrengthMeter/index.ts +2 -0
- package/src/components/PersonDisplay/PersonDisplay.module.scss +180 -0
- package/src/components/PersonDisplay/PersonDisplay.tokens.scss +35 -0
- package/src/components/PersonDisplay/PersonDisplay.tsx +420 -0
- package/src/components/PersonDisplay/index.ts +10 -0
- package/src/components/PhoneInput/PhoneInput.module.scss +23 -0
- package/src/components/PhoneInput/PhoneInput.tsx +271 -0
- package/src/components/PhoneInput/index.ts +4 -0
- package/src/components/PhoneInput/phone.ts +128 -0
- package/src/components/PillMenu/PillMenu.module.scss +117 -0
- package/src/components/PillMenu/PillMenu.tokens.scss +22 -0
- package/src/components/PillMenu/PillMenu.tsx +324 -0
- package/src/components/PillMenu/index.ts +2 -0
- package/src/components/Popover/Anchor.tsx +37 -0
- package/src/components/Popover/Close.tsx +45 -0
- package/src/components/Popover/Content.tsx +213 -0
- package/src/components/Popover/Heading.tsx +33 -0
- package/src/components/Popover/Popover.module.scss +177 -0
- package/src/components/Popover/Popover.tokens.scss +22 -0
- package/src/components/Popover/Popover.tsx +23 -0
- package/src/components/Popover/PopoverRoot.tsx +75 -0
- package/src/components/Popover/Trigger.tsx +86 -0
- package/src/components/Popover/context.ts +22 -0
- package/src/components/Popover/index.ts +7 -0
- package/src/components/Progress/Progress.module.scss +110 -0
- package/src/components/Progress/Progress.tokens.scss +44 -0
- package/src/components/Progress/Progress.tsx +129 -0
- package/src/components/Progress/index.ts +2 -0
- package/src/components/QrCode/QrCode.module.scss +97 -0
- package/src/components/QrCode/QrCode.tokens.scss +17 -0
- package/src/components/QrCode/QrCode.tsx +233 -0
- package/src/components/QrCode/index.ts +2 -0
- package/src/components/QrCode/qr.ts +161 -0
- package/src/components/Radio/Radio.module.scss +175 -0
- package/src/components/Radio/Radio.tokens.scss +59 -0
- package/src/components/Radio/Radio.tsx +127 -0
- package/src/components/Radio/RadioGroup.module.scss +42 -0
- package/src/components/Radio/RadioGroup.tsx +120 -0
- package/src/components/Radio/RadioGroupContext.tsx +30 -0
- package/src/components/Radio/index.ts +4 -0
- package/src/components/Rail/Rail.module.scss +510 -0
- package/src/components/Rail/Rail.tokens.scss +92 -0
- package/src/components/Rail/Rail.tsx +287 -0
- package/src/components/Rail/RailCollapseToggle.tsx +57 -0
- package/src/components/Rail/RailFooter.tsx +17 -0
- package/src/components/Rail/RailGroup.tsx +728 -0
- package/src/components/Rail/RailGroupContext.ts +9 -0
- package/src/components/Rail/RailHeader.tsx +23 -0
- package/src/components/Rail/RailItem.tsx +119 -0
- package/src/components/Rail/RailSection.tsx +39 -0
- package/src/components/Rail/RailSpacer.tsx +19 -0
- package/src/components/Rail/index.ts +9 -0
- package/src/components/RelativeDateInput/RelativeDateInput.module.scss +15 -0
- package/src/components/RelativeDateInput/RelativeDateInput.tokens.scss +6 -0
- package/src/components/RelativeDateInput/RelativeDateInput.tsx +474 -0
- package/src/components/RelativeDateInput/index.ts +10 -0
- package/src/components/RelativeDateInput/relativeDate.ts +127 -0
- package/src/components/RichText/RichText.module.scss +5 -0
- package/src/components/RichText/RichText.tsx +70 -0
- package/src/components/RichText/RichTextAttachment.module.scss +82 -0
- package/src/components/RichText/RichTextAttachment.tsx +122 -0
- package/src/components/RichText/_prose.scss +79 -0
- package/src/components/RichText/attachmentIcon.tsx +24 -0
- package/src/components/RichText/engine/attachment.ts +154 -0
- package/src/components/RichText/engine/autolink.ts +64 -0
- package/src/components/RichText/engine/blockUnit.ts +174 -0
- package/src/components/RichText/engine/colorMarks.ts +85 -0
- package/src/components/RichText/engine/escape.ts +11 -0
- package/src/components/RichText/engine/fromHtml.ts +353 -0
- package/src/components/RichText/engine/fromMarkdown.ts +20 -0
- package/src/components/RichText/engine/inlines.ts +82 -0
- package/src/components/RichText/engine/listDepths.ts +32 -0
- package/src/components/RichText/engine/marks.ts +80 -0
- package/src/components/RichText/engine/mdToHtml.ts +178 -0
- package/src/components/RichText/engine/model.ts +157 -0
- package/src/components/RichText/engine/position.ts +118 -0
- package/src/components/RichText/engine/renderDoc.tsx +395 -0
- package/src/components/RichText/engine/renderLink.ts +15 -0
- package/src/components/RichText/engine/renderMention.ts +16 -0
- package/src/components/RichText/engine/safeHref.ts +22 -0
- package/src/components/RichText/engine/toHtml.ts +154 -0
- package/src/components/RichText/engine/toMarkdown.ts +97 -0
- package/src/components/RichText/engine/transforms.ts +434 -0
- package/src/components/RichText/imageMaxHeightStyle.ts +10 -0
- package/src/components/RichText/index.ts +31 -0
- package/src/components/RichTextEditor/RichTextAttachmentConfig.tsx +264 -0
- package/src/components/RichTextEditor/RichTextBlockControls.tsx +365 -0
- package/src/components/RichTextEditor/RichTextBlockMenu.tsx +162 -0
- package/src/components/RichTextEditor/RichTextColorMenu.tsx +115 -0
- package/src/components/RichTextEditor/RichTextEditor.module.scss +298 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +1910 -0
- package/src/components/RichTextEditor/RichTextImageResizer.tsx +131 -0
- package/src/components/RichTextEditor/RichTextLinkEditor.tsx +151 -0
- package/src/components/RichTextEditor/RichTextMentionMenu.tsx +99 -0
- package/src/components/RichTextEditor/RichTextToolbar.tsx +379 -0
- package/src/components/RichTextEditor/autolinkInput.ts +65 -0
- package/src/components/RichTextEditor/blockDrop.ts +9 -0
- package/src/components/RichTextEditor/blockReflow.ts +62 -0
- package/src/components/RichTextEditor/commands.ts +300 -0
- package/src/components/RichTextEditor/history.ts +93 -0
- package/src/components/RichTextEditor/icons.tsx +152 -0
- package/src/components/RichTextEditor/imageSize.ts +70 -0
- package/src/components/RichTextEditor/index.ts +5 -0
- package/src/components/RichTextEditor/input.ts +209 -0
- package/src/components/RichTextEditor/inputRules.ts +71 -0
- package/src/components/RichTextEditor/links.ts +103 -0
- package/src/components/RichTextEditor/mentionContext.ts +37 -0
- package/src/components/RichTextEditor/mentions.ts +28 -0
- package/src/components/RichTextEditor/preventSelectionLoss.ts +15 -0
- package/src/components/RichTextEditor/selection.ts +415 -0
- package/src/components/RichTextEditor/shortcuts.ts +44 -0
- package/src/components/RichTextEditor/useAnchoredFloating.ts +50 -0
- package/src/components/RichTextEditor/useAttachmentConfig.ts +134 -0
- package/src/components/RichTextEditor/useDismissOnOutsidePointerDown.ts +26 -0
- package/src/components/RichTextEditor/useLinkEditor.ts +107 -0
- package/src/components/RichTextEditor/useMention.ts +226 -0
- package/src/components/RichTextEditor/useOverlayRect.ts +73 -0
- package/src/components/RichTextEditor/useUpload.ts +246 -0
- package/src/components/Screen/Screen.module.scss +46 -0
- package/src/components/Screen/Screen.tokens.scss +20 -0
- package/src/components/Screen/Screen.tsx +97 -0
- package/src/components/Screen/index.ts +2 -0
- package/src/components/ScrollArea/ScrollArea.module.scss +39 -0
- package/src/components/ScrollArea/ScrollArea.tokens.scss +15 -0
- package/src/components/ScrollArea/ScrollArea.tsx +154 -0
- package/src/components/ScrollArea/index.ts +2 -0
- package/src/components/Select/Chip.tsx +45 -0
- package/src/components/Select/Empty.tsx +39 -0
- package/src/components/Select/Error.tsx +51 -0
- package/src/components/Select/HiddenInputs.tsx +44 -0
- package/src/components/Select/Listbox.tsx +557 -0
- package/src/components/Select/Loading.tsx +30 -0
- package/src/components/Select/Select.module.scss +512 -0
- package/src/components/Select/Select.tokens.scss +140 -0
- package/src/components/Select/Select.tsx +685 -0
- package/src/components/Select/Trigger.tsx +952 -0
- package/src/components/Select/context.ts +101 -0
- package/src/components/Select/emptyStateText.ts +19 -0
- package/src/components/Select/index.ts +9 -0
- package/src/components/Select/useSelectState.ts +157 -0
- package/src/components/Select/utils-types.ts +7 -0
- package/src/components/Select/utils.ts +122 -0
- package/src/components/SettingRow/SettingRow.module.scss +166 -0
- package/src/components/SettingRow/SettingRow.tokens.scss +37 -0
- package/src/components/SettingRow/SettingRow.tsx +242 -0
- package/src/components/SettingRow/index.ts +7 -0
- package/src/components/Skeleton/Skeleton.module.scss +55 -0
- package/src/components/Skeleton/Skeleton.tokens.scss +17 -0
- package/src/components/Skeleton/Skeleton.tsx +131 -0
- package/src/components/Skeleton/index.ts +4 -0
- package/src/components/Skeleton/useSkeletonVisibility.ts +95 -0
- package/src/components/Slider/Slider.module.scss +293 -0
- package/src/components/Slider/Slider.tokens.scss +98 -0
- package/src/components/Slider/Slider.tsx +624 -0
- package/src/components/Slider/index.ts +9 -0
- package/src/components/SlotGrid/SlotGrid.module.scss +61 -0
- package/src/components/SlotGrid/SlotGrid.tokens.scss +21 -0
- package/src/components/SlotGrid/SlotGrid.tsx +111 -0
- package/src/components/SlotGrid/index.ts +2 -0
- package/src/components/SocialButton/SocialButton.module.scss +4 -0
- package/src/components/SocialButton/SocialButton.tsx +40 -0
- package/src/components/SocialButton/index.ts +2 -0
- package/src/components/Sortable/Sortable.module.scss +177 -0
- package/src/components/Sortable/Sortable.tokens.scss +27 -0
- package/src/components/Sortable/Sortable.tsx +572 -0
- package/src/components/Sortable/containerAwareCollision.ts +125 -0
- package/src/components/Sortable/index.ts +13 -0
- package/src/components/SortableGroup/SortableGroup.module.scss +23 -0
- package/src/components/SortableGroup/SortableGroup.tsx +315 -0
- package/src/components/SortableGroup/index.ts +4 -0
- package/src/components/SortableGroup/moveSortableItem.ts +39 -0
- package/src/components/Sparkline/Sparkline.module.scss +28 -0
- package/src/components/Sparkline/Sparkline.tokens.scss +7 -0
- package/src/components/Sparkline/Sparkline.tsx +133 -0
- package/src/components/Sparkline/index.ts +2 -0
- package/src/components/Sparkline/sparklineModel.ts +119 -0
- package/src/components/Split/Split.module.scss +158 -0
- package/src/components/Split/Split.tokens.scss +10 -0
- package/src/components/Split/Split.tsx +231 -0
- package/src/components/Split/index.ts +2 -0
- package/src/components/Stack/Stack.module.scss +67 -0
- package/src/components/Stack/Stack.tokens.scss +11 -0
- package/src/components/Stack/Stack.tsx +100 -0
- package/src/components/Stack/index.ts +2 -0
- package/src/components/StagePath/StagePath.module.scss +255 -0
- package/src/components/StagePath/StagePath.tokens.scss +43 -0
- package/src/components/StagePath/StagePath.tsx +176 -0
- package/src/components/StagePath/index.ts +2 -0
- package/src/components/StatGroup/StatGroup.module.scss +6 -0
- package/src/components/StatGroup/StatGroup.tsx +70 -0
- package/src/components/StatGroup/StatGroupContext.ts +10 -0
- package/src/components/StatGroup/StatTile.module.scss +99 -0
- package/src/components/StatGroup/StatTile.tokens.scss +35 -0
- package/src/components/StatGroup/StatTile.tsx +143 -0
- package/src/components/StatGroup/index.ts +4 -0
- package/src/components/Sticky/Sticky.module.scss +98 -0
- package/src/components/Sticky/Sticky.tokens.scss +17 -0
- package/src/components/Sticky/Sticky.tsx +103 -0
- package/src/components/Sticky/index.ts +2 -0
- package/src/components/Switch/Switch.module.scss +182 -0
- package/src/components/Switch/Switch.tokens.scss +59 -0
- package/src/components/Switch/Switch.tsx +214 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/Table/Table.module.scss +308 -0
- package/src/components/Table/Table.tokens.scss +79 -0
- package/src/components/Table/Table.tsx +381 -0
- package/src/components/Table/index.ts +15 -0
- package/src/components/TableOfContents/TableOfContents.module.scss +83 -0
- package/src/components/TableOfContents/TableOfContents.tokens.scss +26 -0
- package/src/components/TableOfContents/TableOfContents.tsx +192 -0
- package/src/components/TableOfContents/activeSection.ts +18 -0
- package/src/components/TableOfContents/index.ts +2 -0
- package/src/components/Tabs/Tabs.module.scss +359 -0
- package/src/components/Tabs/Tabs.tokens.scss +50 -0
- package/src/components/Tabs/Tabs.tsx +538 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Text/Text.module.scss +115 -0
- package/src/components/Text/Text.tokens.scss +55 -0
- package/src/components/Text/Text.tsx +197 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Textarea/Textarea.module.scss +94 -0
- package/src/components/Textarea/Textarea.tokens.scss +48 -0
- package/src/components/Textarea/Textarea.tsx +246 -0
- package/src/components/Textarea/index.ts +2 -0
- package/src/components/Thread/Thread.module.scss +161 -0
- package/src/components/Thread/Thread.tokens.scss +32 -0
- package/src/components/Thread/Thread.tsx +176 -0
- package/src/components/Thread/index.ts +2 -0
- package/src/components/TimeField/TimeField.module.scss +232 -0
- package/src/components/TimeField/TimeField.tsx +793 -0
- package/src/components/TimeField/index.ts +2 -0
- package/src/components/Timeline/Timeline.module.scss +58 -0
- package/src/components/Timeline/Timeline.tokens.scss +13 -0
- package/src/components/Timeline/Timeline.tsx +53 -0
- package/src/components/Timeline/index.ts +2 -0
- package/src/components/Title/Title.module.scss +84 -0
- package/src/components/Title/Title.tokens.scss +37 -0
- package/src/components/Title/Title.tsx +150 -0
- package/src/components/Title/index.ts +2 -0
- package/src/components/Toast/Toast.module.scss +299 -0
- package/src/components/Toast/Toast.tokens.scss +65 -0
- package/src/components/Toast/Toast.tsx +122 -0
- package/src/components/Toast/ToastViewport.tsx +166 -0
- package/src/components/Toast/api.ts +175 -0
- package/src/components/Toast/index.ts +5 -0
- package/src/components/Toast/store.ts +133 -0
- package/src/components/Toast/useToastTimer.ts +94 -0
- package/src/components/Tooltip/Tooltip.module.scss +99 -0
- package/src/components/Tooltip/Tooltip.tokens.scss +23 -0
- package/src/components/Tooltip/Tooltip.tsx +341 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/TopBar/TopBar.module.scss +235 -0
- package/src/components/TopBar/TopBar.tokens.scss +79 -0
- package/src/components/TopBar/TopBar.tsx +87 -0
- package/src/components/TopBar/TopBarEnd.tsx +20 -0
- package/src/components/TopBar/TopBarIconButton.tsx +86 -0
- package/src/components/TopBar/TopBarSearch.tsx +319 -0
- package/src/components/TopBar/TopBarSearchPanel.tsx +268 -0
- package/src/components/TopBar/TopBarStart.tsx +20 -0
- package/src/components/TopBar/index.ts +11 -0
- package/src/components/Tour/Spotlight.tsx +121 -0
- package/src/components/Tour/Tour.module.scss +210 -0
- package/src/components/Tour/Tour.tokens.scss +58 -0
- package/src/components/Tour/Tour.tsx +617 -0
- package/src/components/Tour/index.ts +2 -0
- package/src/components/Tour/useTourTarget.ts +115 -0
- package/src/components/TreeView/TreeView.module.scss +268 -0
- package/src/components/TreeView/TreeView.tokens.scss +36 -0
- package/src/components/TreeView/TreeView.tsx +536 -0
- package/src/components/TreeView/index.ts +3 -0
- package/src/components/TreeView/treeModel.ts +224 -0
- package/src/components/VisuallyHidden/VisuallyHidden.module.scss +7 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +29 -0
- package/src/components/VisuallyHidden/index.ts +2 -0
- package/src/components/WidgetPreview/WidgetPreview.module.scss +11 -0
- package/src/components/WidgetPreview/WidgetPreview.tokens.scss +26 -0
- package/src/components/WidgetPreview/WidgetPreview.tsx +36 -0
- package/src/components/WidgetPreview/WidgetShape.module.scss +140 -0
- package/src/components/WidgetPreview/WidgetShape.tsx +159 -0
- package/src/components/WidgetPreview/index.ts +2 -0
- package/src/components/_internal/Trend.tsx +27 -0
- package/src/components/_internal/choiceTile.scss +74 -0
- package/src/components/_internal/collapse.scss +10 -0
- package/src/components/_internal/collapse.ts +58 -0
- package/src/components/_internal/currency.ts +257 -0
- package/src/components/_internal/dragAnnouncements.ts +200 -0
- package/src/components/_internal/fieldWiring.ts +225 -0
- package/src/components/_internal/gridSpan.ts +54 -0
- package/src/components/_internal/isoDay.ts +35 -0
- package/src/components/_internal/letterKey.ts +26 -0
- package/src/components/_internal/overlay/focusRestore.ts +21 -0
- package/src/components/_internal/overlay/index.ts +12 -0
- package/src/components/_internal/overlay/tourHold.ts +23 -0
- package/src/components/_internal/overlay/useFocusTrap.ts +120 -0
- package/src/components/_internal/overlay/useInOverlay.ts +81 -0
- package/src/components/_internal/overlay/useOverlayStack.ts +232 -0
- package/src/components/_internal/overlay/useScrollLock.ts +112 -0
- package/src/components/_internal/refs.ts +48 -0
- package/src/components/_internal/statusColor.ts +26 -0
- package/src/components/_internal/timeUtils.ts +23 -0
- package/src/components/_internal/useAsyncOptions.ts +145 -0
- package/src/components/_internal/useClippedTooltip.ts +50 -0
- package/src/components/_internal/useControllableState.ts +50 -0
- package/src/components.manifest.json +1141 -0
- package/src/hooks/useBelowBreakpoint.ts +58 -0
- package/src/i18n/I18nProvider.tsx +52 -0
- package/src/i18n/LocaleProvider.tsx +17 -0
- package/src/i18n/en.ts +648 -0
- package/src/i18n/format.ts +71 -0
- package/src/i18n/index.ts +13 -0
- package/src/i18n/messages.ts +1275 -0
- package/src/i18n/ru.ts +677 -0
- package/src/i18n/useLocale.ts +19 -0
- package/src/i18n/useTranslation.ts +58 -0
- package/src/index.ts +913 -0
- package/src/palette/index.ts +2 -0
- package/src/palette/palette.ts +108 -0
- package/src/styles/dark.scss +4 -0
- package/src/styles/global.scss +7 -0
- package/src/styles/mixins.scss +143 -0
- package/src/styles/reset.scss +78 -0
- package/src/styles/tokens.scss +18 -0
- package/src/styles/typography.scss +44 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# `<Textarea>` — multi-line text
|
|
2
|
+
|
|
3
|
+
The dumb multi-line companion to `<Input>`. Auto-grows by default; capped by `maxRows`. Optional character counter below the field.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Textarea } from '@eocrm/design-system';
|
|
7
|
+
|
|
8
|
+
// Default — auto-grows, 3 min rows, no max.
|
|
9
|
+
<Textarea placeholder="Write something…" />
|
|
10
|
+
|
|
11
|
+
// With counter (Twitter-style).
|
|
12
|
+
<Textarea maxLength={140} defaultValue={value} onChange={(e) => setValue(e.target.value)} />
|
|
13
|
+
|
|
14
|
+
// Fixed rows + drag-to-resize.
|
|
15
|
+
<Textarea autoGrow={false} minRows={4} resize="vertical" />
|
|
16
|
+
|
|
17
|
+
// Capped growth.
|
|
18
|
+
<Textarea minRows={2} maxRows={8} />
|
|
19
|
+
|
|
20
|
+
// Error state.
|
|
21
|
+
<Textarea invalid aria-describedby="bio-error" />
|
|
22
|
+
<p id="bio-error">Bio is required.</p>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<!-- props:start -->
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
<!-- prettier-ignore -->
|
|
30
|
+
| Prop | Type | Required | Description |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| `invalid` | `boolean` | no | Toggles the error visual (red border + danger focus ring) and sets `aria-invalid="true"`. Pair with a visible error message and an `aria-describedby` pointer at the message id. |
|
|
33
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | no | Visual size. Defaults to `'md'`. Affects typography + padding only, not height — that comes from `minRows`. - `'sm'` — tighter padding + `--font-size-sm`. Used in dense forms. - `'md'` — default padding + `--font-size-md`. Most form contexts. - `'lg'` — same padding as md but `--font-size-lg`. Hero / focus textareas. Note: this collapses the native HTML `<textarea size>` attribute. Use `style={{ width }}` or a parent container for explicit width. |
|
|
34
|
+
| `disableAutofill` | `boolean` | no | Block browser autofill AND password managers from offering to fill this textarea. Same heuristic as Input — see Input's JSDoc for the full set of opt-out attributes applied. Smart default: when omitted, block iff `autoComplete` is also omitted (or `'off'`). Explicit autocomplete hints opt back IN to autofill. Pass `true` to force-block, `false` to force-allow. |
|
|
35
|
+
| `minRows` | `number` | no | Minimum visible rows. The textarea never renders shorter than this, regardless of content. Default: `3`. Also seeds the native `rows` attribute for SSR / no-JS rendering. |
|
|
36
|
+
| `maxRows` | `number` | no | Maximum visible rows. Beyond this, content scrolls inside the field instead of expanding further. Only meaningful when `autoGrow` is true. Default: `undefined` (unbounded growth). |
|
|
37
|
+
| `autoGrow` | `boolean` | no | When true, height adapts to content between `minRows` and `maxRows`. Default: `true`. When false, height locks at `minRows` and a scrollbar appears past it. |
|
|
38
|
+
| `resize` | `'none' \| 'vertical' \| 'both'` | no | User-drag resize handle direction. Default: `'vertical'`. **Forced to `'none'`** when `autoGrow` is `true` — user-drag fights the auto-grow measurement and produces erratic behavior. To enable a resize handle, opt out of auto-grow with `autoGrow={false}`. |
|
|
39
|
+
| `showCount` | `boolean` | no | Show the character counter (`${value.length}` or `${value.length} / ${maxLength}` when both are set). Default: `true` when `maxLength` is set, `false` otherwise. The counter renders as a `<span aria-live="polite" aria-atomic="true">` inside the wrapper, below the textarea. It updates on every input — works for both controlled and uncontrolled textareas. |
|
|
40
|
+
| …native | | | plus native `<textarea>` attributes |
|
|
41
|
+
|
|
42
|
+
<!-- props:end -->
|
|
43
|
+
|
|
44
|
+
- **Smart autofill blocking** — same heuristic as Input.
|
|
45
|
+
|
|
46
|
+
#### When NOT to use
|
|
47
|
+
|
|
48
|
+
- ❌ Single-line input → `<Input>`.
|
|
49
|
+
- ❌ Choosing from a fixed list → `<Select>`.
|
|
50
|
+
- ❌ Rich text editing (bold, lists, mentions) → use `<RichTextEditor>` (toolbar, list toggles, mark shortcuts shipped).
|
|
51
|
+
- ❌ Password fields → `<PasswordInput>`.
|
|
52
|
+
|
|
53
|
+
#### Anti-patterns
|
|
54
|
+
|
|
55
|
+
- ❌ Using `placeholder` as a label.
|
|
56
|
+
- ❌ Setting both `autoGrow={true}` AND expecting `resize="vertical"` to render a drag handle — auto-grow wins; the handle is hidden.
|
|
57
|
+
- ❌ Building your own character counter outside the component when `maxLength` / `showCount` would do it.
|
|
58
|
+
|
|
59
|
+
Forwards the `<textarea>` (not the wrapper `<div>`) via ref. All native textarea attributes pass through except `size` (shadowed by the size prop) and `rows` (computed from `minRows`). It always renders a wrapper `<div>` so the optional counter has somewhere to live, unlike `<Input>`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `<Thread>` — nested-reply threading primitive
|
|
2
|
+
|
|
3
|
+
`<Thread>` + `<Thread.Item node>` — a per-level left vertical rail connecting a parent comment to its nested replies, with the leading `node` slot (`<Avatar>` / icon / `<Dot>`) as the connection point. Replies are written as nested `<Thread.Item>`s; the recursive compound detects them (by identity) and indents under the rail. Depth-capped (`maxDepth`, default `4`) so deep threads stop marching right — past the cap, replies render flat at the same indent. `<Thread compact>` tightens the gaps for dense sidebars. The node centers on the first body line (the header) by default — pass `nodeAlign="top"` to top-align it instead. The rail terminates at the last reply's elbow, so it's surface-independent (no `--thread-surface` to keep in sync — works on tinted backgrounds). Semantic `<ul>`/`<li>`.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<Thread maxDepth={4}>
|
|
7
|
+
<Thread.Item node={<Avatar name="Maya Chen" size="sm" />}>
|
|
8
|
+
<Stack gap="xs">
|
|
9
|
+
<Text size="sm">
|
|
10
|
+
<strong>Maya Chen</strong> · 2h ago
|
|
11
|
+
</Text>
|
|
12
|
+
<Text size="sm">Flagged the Acme renewal — usage dropped last quarter.</Text>
|
|
13
|
+
</Stack>
|
|
14
|
+
{/* replies = nested <Thread.Item>s; render them inline with the body */}
|
|
15
|
+
<Thread.Item node={<Avatar name="Tom Okafor" size="sm" />}>
|
|
16
|
+
<Text size="sm">Good catch — I'll set up a call.</Text>
|
|
17
|
+
</Thread.Item>
|
|
18
|
+
</Thread.Item>
|
|
19
|
+
</Thread>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
<!-- props:start -->
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
### `ThreadProps`
|
|
27
|
+
|
|
28
|
+
<!-- prettier-ignore -->
|
|
29
|
+
| Prop | Type | Required | Description |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| `maxDepth` | `number` | no | Max visual nesting depth before replies render flat (no further indent). Once the cap is reached, deeper replies keep the same indent level so the thread stops marching right. Default `4`. |
|
|
32
|
+
| `compact` | `boolean` | no | Tighter gaps for dense surfaces (sidebars, panels). The remapped tokens cascade to every nested item via CSS custom properties. Default `false`. |
|
|
33
|
+
| `nodeAlign` | `'header' \| 'top'` | no | Where the leading `node` sits relative to the comment body. - `header` (default) — vertically centered on the **first body line** (the author / timestamp header), Jira/GitHub style, so a node taller than one line (e.g. a 24px `<Avatar>`) reads as centered against the name rather than top-aligned. Assumes the header line-box matches `--thread-header-line-height` (defaults to `<Text size="sm">`); override that token if your header line differs. Remove any old header `lineHeight` override (e.g. `var(--size-sm)`) — it now double-compensates. - `top` — top-aligned with the body (the node's top meets the body's top). Use when the node is about one line tall, or when you deliberately want top alignment. |
|
|
34
|
+
| `children` | `ReactNode` | yes | The `<Thread.Item>`s. |
|
|
35
|
+
| …native | | | plus native `<ul>` attributes |
|
|
36
|
+
|
|
37
|
+
### `ThreadItemProps`
|
|
38
|
+
|
|
39
|
+
<!-- prettier-ignore -->
|
|
40
|
+
| Prop | Type | Required | Description |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| `node` | `ReactNode` | yes | The leading marker the rail connects to — an `<Avatar>`, icon, or `<Dot>`. Centered in its node box so the rail/elbow connectors meet it cleanly regardless of node content; by default the box centers on the first body line so a taller node aligns to the header (see `Thread`'s `nodeAlign`). It's a slot: there is no built-in avatar. Size the node to `--thread-node-size` (default `sm` / 24px) — e.g. `<Avatar size="sm">`; for a larger node, override `--thread-node-size` to match. |
|
|
43
|
+
| `children` | `ReactNode` | yes | The comment body/actions, plus optional nested `<Thread.Item>` replies. Plain children render as the comment body; any direct `<Thread.Item>` child renders as a reply under the rail. |
|
|
44
|
+
| …native | | | plus native `<li>` attributes |
|
|
45
|
+
|
|
46
|
+
<!-- props:end -->
|
|
47
|
+
|
|
48
|
+
- Plain children are the comment body; any direct `<Thread.Item>` child is a reply. Don't wrap a reply in a Fragment / wrapper — the sort matches `Thread.Item` by identity and it won't be detected.
|
|
49
|
+
- **When NOT to use**: a flat activity feed with no parent/child nesting → `<Timeline>`; plain indentation with no connecting line → `<Indent>`.
|
|
50
|
+
|
|
51
|
+
- Also not for a non-threaded vertical list (`<Stack>`) or an avatar + name/meta row (`<PersonDisplay>`; use it as an item's `node` / body, not instead of Thread).
|
|
52
|
+
- ❌ Layout margins on items: spacing comes from `compact` / the row-gap token.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# `<TimeField>` — standalone time-of-day input
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import { TimeField, type TimeValue } from '@eocrm/design-system';
|
|
5
|
+
const [time, setTime] = useState<TimeValue | null>({ hours: 9, minutes: 0 });
|
|
6
|
+
<TimeField value={time} onChange={setTime} aria-label="Start time" />;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
<!-- props:start -->
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
<!-- prettier-ignore -->
|
|
14
|
+
| Prop | Type | Required | Description |
|
|
15
|
+
|---|---|---|---|
|
|
16
|
+
| `value` | `TimeValue \| null` | yes | Selected time. `null` disables the field — the field cannot be activated until the parent supplies a value (used by the picker family to gate time selection on a date being chosen first). |
|
|
17
|
+
| `onChange` | `(value: TimeValue) => void` | yes | Fired when the user commits a new time, either by typing + focus leaving the field (input, chevron or clock) / Enter, by clicking a row in the popover, or by clicking the Now button. The emitted value is always 24-hour internal regardless of display cycle. |
|
|
18
|
+
| `step` | `number` | no | Minutes step. Default `15`. Controls the row count in the minutes column (e.g., 15 → 4 rows: 00/15/30/45) AND rounds typed input on commit. Set `1` to disable rounding. |
|
|
19
|
+
| `hourCycle` | `'12' \| '24' \| 'auto'` | no | Display + parse cycle. - `'24'` — hour list 00–23, text input shows `HH:mm`, no AM/PM column. - `'12'` — hour list `12, 1, 2, …, 11` with an AM/PM column; text input shows `h:mm AM/PM`. - `'auto'` (default) — reads the active locale via `Intl.DateTimeFormat`; en-US → 12h, ru-RU → 24h. Typed input is lenient regardless of cycle — both 24h (`14:30`) and AM/PM (`2:30 PM`) shapes parse in either mode. |
|
|
20
|
+
| `locale` | `string` | no | Locale override for `hourCycle='auto'` detection + text formatting. Defaults to the active `<LocaleProvider>` / browser locale. |
|
|
21
|
+
| `hideNowButton` | `boolean` | no | Hide the "Now" quick-pick button in the popover footer. Default `false` (button shown). |
|
|
22
|
+
| `aria-label` | `string` | no | Accessible label. Optional, but the control MUST be named: pass `aria-label` for a standalone TimeField, OR `aria-labelledby` when an external element (e.g. a `<Field>` label) names it. If both are given, `aria-labelledby` wins. |
|
|
23
|
+
| `aria-labelledby` | `string` | no | Id(s) of element(s) that label this control — forwarded onto the inner `<input>` so a `<Field label>` names it. Takes precedence over `aria-label`. |
|
|
24
|
+
| `aria-describedby` | `string` | no | Id(s) of element(s) that describe this control (e.g. a `<Field>` error or helper message) — forwarded onto the inner `<input>`, not the wrapper, so the description is announced when the input is focused. |
|
|
25
|
+
| `disabled` | `boolean` | no | Disables the input + popover trigger. |
|
|
26
|
+
| `invalid` | `boolean` | no | Toggles the error visual and sets `aria-invalid="true"` on the text input. Pair with a visible message and `aria-describedby` pointing at its id, exactly like `Input` / `Textarea` / `Select`. TimeField was the only form control in the library without this — 15 other controls set `aria-invalid` and it set nothing, so a TimeField inside a `<Field error=…>` looked wrong and announced valid. |
|
|
27
|
+
| `required` | `boolean` | no | Sets `aria-required` on the text input. Field / SettingRow inject it; it used to fall through onto the wrapper div as a stray `required` attribute. |
|
|
28
|
+
| `id` | `string` | no | Stable id for the input (so an external `<label htmlFor>` can target it). |
|
|
29
|
+
| `className` | `string` | no | Additional className on the wrapper. |
|
|
30
|
+
| …native | | | plus native `<div>` attributes |
|
|
31
|
+
|
|
32
|
+
<!-- props:end -->
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
// Forced 24-hour cycle, 30-minute step, no Now button.
|
|
36
|
+
<TimeField
|
|
37
|
+
value={time}
|
|
38
|
+
onChange={setTime}
|
|
39
|
+
hourCycle="24"
|
|
40
|
+
step={30}
|
|
41
|
+
hideNowButton
|
|
42
|
+
aria-label="Departure time"
|
|
43
|
+
/>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
// Controlled inside a custom widget — the boundary conversion the picker
|
|
48
|
+
// family uses internally.
|
|
49
|
+
<TimeField
|
|
50
|
+
value={value ? { hours: value.getHours(), minutes: value.getMinutes() } : null}
|
|
51
|
+
onChange={(t) => setValue(combineDateAndTime(value, t.hours, t.minutes))}
|
|
52
|
+
step={15}
|
|
53
|
+
aria-label="Meeting time"
|
|
54
|
+
disabled={value == null}
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- Bare text input + chevron toggle that opens a popover with hour / minute (and AM/PM in 12h mode) listbox columns plus a "Now" footer button. The wrapper IS the public element; the input has no border of its own — the wrapper renders the same chrome as `<Input>`.
|
|
59
|
+
- Used internally by `<DatePicker>` / `<DateRangePicker>` / `<InlineDatePicker>` / `<InlineDateRangePicker>` when `granularity="minute"`; public for consumers who need a time input without a date.
|
|
60
|
+
- Keyboard inside the popover (WAI-ARIA APG listbox pattern with roving tabIndex per column):
|
|
61
|
+
- `ArrowDown` on the input opens the popover and focuses the current hour row.
|
|
62
|
+
- `ArrowUp` / `ArrowDown` move within the focused column (no wrap).
|
|
63
|
+
- `ArrowLeft` / `ArrowRight` switch columns (Hours ↔ Minutes ↔ AM/PM in 12h mode).
|
|
64
|
+
- `Home` / `End` jump to first / last row in the focused column.
|
|
65
|
+
- `Enter` / `Space` commit the focused row.
|
|
66
|
+
- `Escape` closes and returns focus to the input.
|
|
67
|
+
- Tab from the last row reaches the Now button (it's outside the roving set, in natural Tab order).
|
|
68
|
+
- Now button reads `new Date()`, applies `roundTimeToStep(step)`, fires `onChange`, and leaves the popover open so the user can fine-tune.
|
|
69
|
+
- Re-exports of the underlying utils are available for consumers building their own time UI on top of TimeField: `resolveHourCycle`, `getLocaleHourCycle`, `roundTimeToStep`, types `TimeValue` / `HourCycle`.
|
|
70
|
+
- **When NOT to use.** For datetime (date + time-of-day), use `<DatePicker>` / `<DateRangePicker>` / `<InlineDatePicker>` / `<InlineDateRangePicker>` with `granularity="minute"` — those wire the boundary `Date ↔ TimeValue` conversion plus the hidden form mirror for you. For elapsed-duration inputs (e.g. "3h 15m" meeting length), TimeField is wrong semantics — it clamps to 23:59 and parses AM/PM; use a numeric input pair. Time zones are out of scope — the value contract is wall-clock.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# `<Timeline>` — vertical activity-feed primitive
|
|
2
|
+
|
|
3
|
+
`<Timeline>` + `<Timeline.Item node>` — a connector line running between per-item `node` slots (`<Avatar>` / `<Dot>` / icon) with content to the right; the line stops at the last node. `<Timeline compact>` tightens it for a sidebar widget. Semantic `<ol>`/`<li>`. For a plain list use `<Stack>`.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<Timeline>
|
|
7
|
+
{activities.map((a) => (
|
|
8
|
+
<Timeline.Item key={a.id} node={<Avatar name={a.actor} size="sm" />}>
|
|
9
|
+
<Text size="sm">
|
|
10
|
+
<strong>{a.actor}</strong> · {a.type} · {a.time}
|
|
11
|
+
</Text>
|
|
12
|
+
<Text size="sm" tone="muted">
|
|
13
|
+
{a.body}
|
|
14
|
+
</Text>
|
|
15
|
+
</Timeline.Item>
|
|
16
|
+
))}
|
|
17
|
+
</Timeline>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
<!-- props:start -->
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
### `TimelineProps`
|
|
25
|
+
|
|
26
|
+
<!-- prettier-ignore -->
|
|
27
|
+
| Prop | Type | Required | Description |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `compact` | `boolean` | no | Tighter gutter, node box, and spacing for dense sidebar widgets. Default `false`. |
|
|
30
|
+
| `children` | `ReactNode` | yes | `<Timeline.Item>`s. |
|
|
31
|
+
| …native | | | plus native `<ol>` attributes |
|
|
32
|
+
|
|
33
|
+
### `TimelineItemProps`
|
|
34
|
+
|
|
35
|
+
<!-- prettier-ignore -->
|
|
36
|
+
| Prop | Type | Required | Description |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| `node` | `ReactNode` | yes | The gutter node — an `<Avatar>`, `<Dot>`, icon, etc. Centered in a fixed node box so the connector aligns regardless of node content. |
|
|
39
|
+
| `children` | `ReactNode` | yes | The item content (right of the node) — e.g. name·type·time, body, system text. |
|
|
40
|
+
| …native | | | plus native `<li>` attributes |
|
|
41
|
+
|
|
42
|
+
<!-- props:end -->
|
|
43
|
+
|
|
44
|
+
- The last item's connector stops automatically (CSS `:last-child`); `compact` flows via CSS vars.
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
// Compact sidebar widget with dot nodes:
|
|
48
|
+
<Timeline compact>
|
|
49
|
+
<Timeline.Item node={<Dot tone="success" />}>
|
|
50
|
+
<Text size="sm">Renewal confirmed</Text>
|
|
51
|
+
</Timeline.Item>
|
|
52
|
+
</Timeline>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- Not for a horizontal step indicator (Timeline is vertical).
|
|
56
|
+
- ❌ Hand-rolling the connector line: it is built in.
|
|
57
|
+
- ❌ Layout margins on items: spacing comes from `compact` / the row gap token.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# `<Title>` — semantic heading
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
<Title order={1}>Dashboard</Title>
|
|
5
|
+
<Title order={2}>Recent activity</Title>
|
|
6
|
+
<Title order={3} tone="muted">Filter group</Title>
|
|
7
|
+
<Title order={2} size="lg">Visually compact h2</Title>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
<!-- props:start -->
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
<!-- prettier-ignore -->
|
|
15
|
+
| Prop | Type | Required | Description |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| `order` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | yes | Heading semantic level (1–6). REQUIRED — forces the consumer to think about heading hierarchy on the page. Drives both the rendered element (`<h1>`–`<h6>`) and the default visual size (1→3xl, 2→2xl, 3→xl, 4→lg, 5→md, 6→sm). |
|
|
18
|
+
| `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' \| '3xl'` | no | Visual size override. Defaults to the size for the given `order`. Use this when the semantic level and the visual size need to diverge — e.g. a small section title that's still an `<h2>` for screen readers. |
|
|
19
|
+
| `tone` | `'default' \| 'muted' \| 'subtle' \| 'accent' \| 'danger'` | no | Color tone. Defaults to `'default'` (full foreground). - `default` — `--color-fg` - `muted` — `--color-fg-muted` - `subtle` — **@deprecated: resolves to `muted`. Use `muted`.** In LIGHT theme the two neutrals were indistinguishable: OKLab ΔE 0.0261 when the deprecation was filed, 0.0365 after `--color-fg-muted` was retuned, against the 0.065 floor this library's perceptual gates use. In DARK they were 0.0707 apart — a real step — so **this deprecation changes dark-theme appearance**: `subtle` text in dark gets lighter, moving from `--color-fg-subtle` to `--color-fg-muted`. That is the accepted trade (a tier that exists in one theme only is not a tier), but it is a visual change, not the removal of a duplicate. `--title-fg-subtle` now aliases `--title-fg-muted`, so nothing breaks at the type or build level; if you need the old dark value back, override `--title-fg-subtle`. - `accent` — `--color-accent` - `danger` — `--color-danger` |
|
|
20
|
+
| `weight` | `'regular' \| 'medium' \| 'semibold' \| 'bold'` | no | Font weight. Defaults to `'semibold'` (matches the most common heading weight across the existing mockups). |
|
|
21
|
+
| `truncate` | `boolean` | no | Truncate the title to a single line with ellipsis. Useful inside narrow cards or grid cells. Defaults to `false`. The full text remains in the accessibility tree — screen readers read the entire string. Don't additionally add `aria-label` to "compensate" for the visual clip. |
|
|
22
|
+
| `children` | `ReactNode` | yes | Title text content. |
|
|
23
|
+
| …native | | | plus native `<h1–h6>` attributes |
|
|
24
|
+
|
|
25
|
+
<!-- props:end -->
|
|
26
|
+
|
|
27
|
+
- `order: 1 | 2 | 3 | 4 | 5 | 6` — required. Renders `<h1>` … `<h6>` AND drives the default visual size.
|
|
28
|
+
- Default size map: `1→3xl`, `2→2xl`, `3→xl`, `4→lg`, `5→md`, `6→sm`. Override with `size` (same vocab: `xs | sm | md | lg | xl | 2xl | 3xl`).
|
|
29
|
+
- **Use `<Title>` for every heading in your UI.** Raw `<h1>` / `<h2>` is forbidden.
|
|
30
|
+
|
|
31
|
+
`size` decouples visual size from the semantic level (e.g. a nested section that needs a smaller-looking h2).
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// Heading + supporting paragraph in a Stack:
|
|
35
|
+
<Stack gap="xs">
|
|
36
|
+
<Title order={1}>Dashboard</Title>
|
|
37
|
+
<Text size="md" tone="muted">
|
|
38
|
+
Pipeline summary for this week.
|
|
39
|
+
</Text>
|
|
40
|
+
</Stack>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**When NOT to use**
|
|
44
|
+
|
|
45
|
+
- Body text: use `<Text>`.
|
|
46
|
+
- Inline emphasis: use `<strong>` / `<em>` / `<Text weight="semibold">`.
|
|
47
|
+
- Monospaced identifiers: use `<Code>`.
|
|
48
|
+
- Picking a font size without thinking about hierarchy: the required `order` prop forces the question of what level this heading is on the page.
|
|
49
|
+
|
|
50
|
+
**Anti-patterns**
|
|
51
|
+
|
|
52
|
+
- `<h2 className={styles.title}>`: use `<Title order={2}>`; consumer SCSS should never name a typography class.
|
|
53
|
+
- `<Title order={1} size="xs">`: usually a sign the heading hierarchy is wrong. Bump the order up instead of shrinking a low-order heading.
|
|
54
|
+
- Skipping heading levels (`order={1}` then `order={4}`) hurts screen-reader users; use sequential orders.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# `<ToastViewport>` + `toast` — transient notifications
|
|
2
|
+
|
|
3
|
+
Imperative singleton + one portal. Fire from anywhere; no provider, no hook.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { ToastViewport, toast } from '@eocrm/design-system';
|
|
7
|
+
|
|
8
|
+
// Mount once at app root
|
|
9
|
+
<ToastViewport position="bottom-right" />;
|
|
10
|
+
|
|
11
|
+
// Fire from anywhere
|
|
12
|
+
toast.success('Saved');
|
|
13
|
+
toast.error('Request failed', { description: err.message });
|
|
14
|
+
toast.success('Item deleted', { action: { label: 'Undo', onClick: restore } });
|
|
15
|
+
|
|
16
|
+
// Async sugar
|
|
17
|
+
toast.promise(api.upload(file), {
|
|
18
|
+
loading: 'Uploading…',
|
|
19
|
+
success: (r) => `Uploaded ${r.name}`,
|
|
20
|
+
error: (e) => `Failed: ${e.message}`,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Update in place
|
|
24
|
+
const id = toast.loading('Saving…');
|
|
25
|
+
await api.save();
|
|
26
|
+
toast.success('Saved', { id });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Reusing an `id` updates that toast in place. If it is still animating out
|
|
30
|
+
(dismissed less than 250ms ago), it is shown again as a new toast with a fresh
|
|
31
|
+
timer. `toast.update` and `toast.promise` never bring back a dismissed toast.
|
|
32
|
+
|
|
33
|
+
<!-- props:start -->
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
<!-- prettier-ignore -->
|
|
38
|
+
| Prop | Type | Required | Description |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `position` | `'top-left' \| 'top-center' \| 'top-right' \| 'bottom-left' \| 'bottom-center' \| 'bottom-right'` | no | Default position for toasts that don't specify one. Default: 'bottom-right'. All 6 positions are supported; a per-call `position` is an escape hatch — a single global position is the recommended UX. |
|
|
41
|
+
| `duration` | `number` | no | Default duration (ms) for toasts without explicit duration. Default: 4000. |
|
|
42
|
+
| `maxVisible` | `number` | no | How many toasts are fully visible per position bucket. Default: 3. |
|
|
43
|
+
| `gap` | `'sm' \| 'md'` | no | Spacing between stacked toasts. Default: 'sm' (8px). |
|
|
44
|
+
| `expand` | `boolean` | no | false (default): peek-collapsed stack, hover to fan out. true: always fanned. |
|
|
45
|
+
|
|
46
|
+
<!-- props:end -->
|
|
47
|
+
|
|
48
|
+
- **One viewport.** Mount exactly one `<ToastViewport>` at the app root. A second one logs a dev-warning and renders null.
|
|
49
|
+
- **Five tones.** `info`, `success`, `warning`, `error`, `loading`. `error` is `role="alert"` (assertive); the rest are `role="status"` (polite).
|
|
50
|
+
- **Auto-dismiss defaults to 4000ms.** Per-call `duration` (ms or `'persistent'`). `loading` defaults to `'persistent'`.
|
|
51
|
+
- **Pause on hover / focus / hidden tab.** Hovering the toast or tabbing into its action pauses the timer; document `visibilitychange` to `hidden` pauses all timers globally.
|
|
52
|
+
|
|
53
|
+
#### When NOT to use
|
|
54
|
+
|
|
55
|
+
- ❌ For form validation feedback under the field. That's inline error text, not a toast.
|
|
56
|
+
- ❌ For destructive confirmations. Use `<ConfirmationPopover>` or `<Modal>` — the user needs an explicit yes/no decision, not a transient banner.
|
|
57
|
+
- ❌ For long-form messages. Toasts are 1–2 lines. If you need more, link to a page from the description.
|
|
58
|
+
- ❌ As a substitute for in-page progress UI. A toast can announce "Upload started" but the persistent progress bar belongs in the page.
|
|
59
|
+
|
|
60
|
+
- Toasts fired before the viewport mounts sit in the store and render the moment it mounts. When a second viewport mounts, only the first (in mount order) renders and the next takes over if it unmounts.
|
|
61
|
+
- The portal target is `document.body`, so toasts aren't constrained by any parent overflow / transform / contain context.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# `<Tooltip>` — small floating label on hover / keyboard focus
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
<Tooltip content="Save the record (⌘S)">
|
|
5
|
+
<Button onClick={save}>Save</Button>
|
|
6
|
+
</Tooltip>
|
|
7
|
+
|
|
8
|
+
<Tooltip content="Filter">
|
|
9
|
+
<Button variant="ghost" aria-label="Filter">⏷</Button>
|
|
10
|
+
</Tooltip>
|
|
11
|
+
|
|
12
|
+
<Tooltip content={<>Save <kbd>⌘S</kbd></>}>
|
|
13
|
+
<Button>Save</Button>
|
|
14
|
+
</Tooltip>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
<!-- props:start -->
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
<!-- prettier-ignore -->
|
|
22
|
+
| Prop | Type | Required | Description |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| `content` | `ReactNode` | yes | Tooltip body. ReactNode so you can include inline `<kbd>` or icons. If `null`, `undefined`, or `""`, the trigger renders as-is with no listeners and no `aria-describedby` — useful for conditional UIs. |
|
|
25
|
+
| `children` | `ReactElement<unknown, string \| JSXElementConstructor<any>>` | yes | Exactly one React element that accepts a ref. Cloned to inject the tooltip's ref + listeners + aria. `<Button>` and raw `<button>` both qualify; a custom component without `forwardRef` does not. |
|
|
26
|
+
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | no | Preferred side. Default `'top'`. Auto-flips on collision via Floating UI. |
|
|
27
|
+
| `align` | `'start' \| 'center' \| 'end'` | no | Edge alignment. Default `'center'`. |
|
|
28
|
+
| `sideOffset` | `number` | no | Gap in px between trigger and tooltip. Default `6` (room for the arrow). |
|
|
29
|
+
| `delay` | `number` | no | Delay in ms before hover opens the tooltip. Default `400`. Keyboard focus is always immediate (a11y). Close is always immediate. |
|
|
30
|
+
| `open` | `boolean` | no | Controlled open state. Provide alongside `onOpenChange` to drive open externally. Omit both to let Tooltip own its state (the common case). |
|
|
31
|
+
| `onOpenChange` | `((open: boolean) => void)` | no | Fired whenever Tooltip wants to change open state. Required when `open` is provided. |
|
|
32
|
+
| `defaultOpen` | `boolean` | no | Default open state for uncontrolled usage. Defaults to `false`. |
|
|
33
|
+
|
|
34
|
+
<!-- props:end -->
|
|
35
|
+
|
|
36
|
+
- Wrapper API: `<Tooltip content="…">` cloneElement's its single child to inject the ref, listeners (`pointerenter` / `pointerleave` / `focus` / `blur`), and `aria-describedby`. Child must accept a ref — `<Button>` qualifies, as does a raw `<button>`.
|
|
37
|
+
- Trigger MUST already have its own accessible name (visible text or `aria-label`). Tooltip is _supplementary description_ via `aria-describedby` — never the label.
|
|
38
|
+
- Dismissal: `pointerleave`, `blur`, document `pointerdown`, `Escape`. Tooltip never owns focus. On `Escape` (WCAG 1.4.13) the tooltip registers as a floating surface, so inside a `Modal`/`Drawer` the dismiss press closes only the tooltip — the host survives; the next `Escape` closes the host.
|
|
39
|
+
- Touch devices: a tap toggles the tooltip on a **non-interactive** trigger (`Text`, `Badge`, `IconTile`, a focusable `span`); a tap elsewhere closes it. A tap on a button/link/form control — or on anything inside one, e.g. a Badge in a row link — performs the action and opens nothing, so don't put supplementary info you want reachable on touch behind an interactive trigger's tooltip; rely on its accessible name.
|
|
40
|
+
- Opens with a short scale-fade (140 ms) from the trigger side. Closes instantly. Respects `prefers-reduced-motion: reduce`.
|
|
41
|
+
- Z-layer `--z-tooltip: 1300` is above modal and toast, so tooltips inside any host UI remain visible.
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
// Controlled open (rare — usually let Tooltip manage state):
|
|
45
|
+
const [open, setOpen] = useState(false);
|
|
46
|
+
<Tooltip content="…" open={open} onOpenChange={setOpen}>
|
|
47
|
+
<Button>Edit</Button>
|
|
48
|
+
</Tooltip>;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Opens on hover (after `delay`) or immediately on keyboard focus, with a directional arrow. Hand-rolled on `@floating-ui/react-dom`.
|
|
52
|
+
|
|
53
|
+
**When NOT to use**
|
|
54
|
+
|
|
55
|
+
- Content the user must click to interact with: use `<Popover>`. Tooltips are not hoverable; moving the pointer into the tooltip body does not keep it open.
|
|
56
|
+
- Form-value selection: use `<Select>`.
|
|
57
|
+
- As the only source of essential information: tooltips are progressive enhancement. Make it visible in copy or, for icon buttons, in the trigger's `aria-label`.
|
|
58
|
+
- Multi-paragraph content: that is Popover territory.
|
|
59
|
+
|
|
60
|
+
**Anti-patterns**
|
|
61
|
+
|
|
62
|
+
- `<Tooltip><Button disabled>…</Button></Tooltip>`: disabled buttons fire no pointerenter or focus events in any browser. To explain _why_ a button is disabled, render it with `aria-disabled="true"` and intercept its click, or wrap the disabled element in a `<span>` and pass the span as the Tooltip child.
|
|
63
|
+
- A trigger child that doesn't accept a ref (`cloneElement` needs the ref contract).
|