rift-ds 1.0.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/LICENSE +21 -0
- package/README.md +107 -0
- package/behaviors/focusable.d.ts +26 -0
- package/behaviors/focusable.js +18 -0
- package/behaviors/useFocusScope.d.ts +38 -0
- package/behaviors/useFocusScope.js +82 -0
- package/behaviors/useLayer.d.ts +43 -0
- package/behaviors/useLayer.js +55 -0
- package/behaviors/useMounted.d.ts +7 -0
- package/behaviors/useMounted.js +14 -0
- package/behaviors/useScrollLock.d.ts +55 -0
- package/behaviors/useScrollLock.js +59 -0
- package/bin/rift-ds.mjs +82 -0
- package/charts.d.ts +16 -0
- package/charts.js +24 -0
- package/components/Accordion/Accordion.css +119 -0
- package/components/Accordion/Accordion.d.ts +24 -0
- package/components/Accordion/Accordion.js +76 -0
- package/components/AgentPlan/AgentPlan.css +251 -0
- package/components/AgentPlan/AgentPlan.d.ts +41 -0
- package/components/AgentPlan/AgentPlan.js +100 -0
- package/components/AgentRail/AgentRail.css +282 -0
- package/components/AgentRail/AgentRail.d.ts +72 -0
- package/components/AgentRail/AgentRail.js +101 -0
- package/components/AgentStatus/AgentStatus.css +511 -0
- package/components/AgentStatus/AgentStatus.d.ts +41 -0
- package/components/AgentStatus/AgentStatus.js +86 -0
- package/components/AgentStatus/AgentStatusPatterns.d.ts +17 -0
- package/components/AgentStatus/AgentStatusPatterns.js +20 -0
- package/components/AiButton/AiButton.css +559 -0
- package/components/AiButton/AiButton.d.ts +79 -0
- package/components/AiButton/AiButton.js +183 -0
- package/components/Alert/Alert.css +261 -0
- package/components/Alert/Alert.d.ts +25 -0
- package/components/Alert/Alert.js +53 -0
- package/components/AlertDialog/AlertDialog.css +133 -0
- package/components/AlertDialog/AlertDialog.d.ts +29 -0
- package/components/AlertDialog/AlertDialog.js +98 -0
- package/components/AnchorNav/AnchorNav.css +137 -0
- package/components/AnchorNav/AnchorNav.d.ts +40 -0
- package/components/AnchorNav/AnchorNav.js +135 -0
- package/components/AnimatedNumber/AnimatedNumber.css +31 -0
- package/components/AnimatedNumber/AnimatedNumber.d.ts +36 -0
- package/components/AnimatedNumber/AnimatedNumber.js +55 -0
- package/components/AppLayout/AppLayout.css +52 -0
- package/components/AppLayout/AppLayout.d.ts +33 -0
- package/components/AppLayout/AppLayout.js +47 -0
- package/components/AppSidebar/AppSidebar.css +592 -0
- package/components/AppSidebar/AppSidebar.d.ts +90 -0
- package/components/AppSidebar/AppSidebar.js +295 -0
- package/components/Avatar/Avatar.css +133 -0
- package/components/Avatar/Avatar.d.ts +20 -0
- package/components/Avatar/Avatar.js +58 -0
- package/components/Avatar/demoAvatars.d.ts +18 -0
- package/components/Avatar/demoAvatars.js +16 -0
- package/components/AvatarGroup/AvatarGroup.css +61 -0
- package/components/AvatarGroup/AvatarGroup.d.ts +32 -0
- package/components/AvatarGroup/AvatarGroup.js +31 -0
- package/components/Badge/Badge.css +67 -0
- package/components/Badge/Badge.d.ts +13 -0
- package/components/Badge/Badge.js +15 -0
- package/components/Banner/Banner.css +110 -0
- package/components/Banner/Banner.d.ts +36 -0
- package/components/Banner/Banner.js +59 -0
- package/components/Breadcrumb/Breadcrumb.css +100 -0
- package/components/Breadcrumb/Breadcrumb.d.ts +25 -0
- package/components/Breadcrumb/Breadcrumb.js +40 -0
- package/components/Button/Button.css +473 -0
- package/components/Button/Button.d.ts +73 -0
- package/components/Button/Button.js +91 -0
- package/components/ButtonGroup/ButtonGroup.css +39 -0
- package/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/components/ButtonGroup/ButtonGroup.js +30 -0
- package/components/Card/Card.css +190 -0
- package/components/Card/Card.d.ts +48 -0
- package/components/Card/Card.js +113 -0
- package/components/CardStack/CardStack.css +106 -0
- package/components/CardStack/CardStack.d.ts +44 -0
- package/components/CardStack/CardStack.js +140 -0
- package/components/Carousel/Carousel.css +121 -0
- package/components/Carousel/Carousel.d.ts +25 -0
- package/components/Carousel/Carousel.js +160 -0
- package/components/Chart/AreaChart.d.ts +40 -0
- package/components/Chart/AreaChart.js +101 -0
- package/components/Chart/BarChart.d.ts +36 -0
- package/components/Chart/BarChart.js +107 -0
- package/components/Chart/Chart.css +224 -0
- package/components/Chart/ComboChart.d.ts +40 -0
- package/components/Chart/ComboChart.js +142 -0
- package/components/Chart/LineChart.d.ts +36 -0
- package/components/Chart/LineChart.js +91 -0
- package/components/Chart/PieChart.d.ts +36 -0
- package/components/Chart/PieChart.js +93 -0
- package/components/Chart/RadarChart.d.ts +36 -0
- package/components/Chart/RadarChart.js +92 -0
- package/components/Chart/RadialChart.d.ts +43 -0
- package/components/Chart/RadialChart.js +114 -0
- package/components/Chart/ScatterChart.d.ts +38 -0
- package/components/Chart/ScatterChart.js +99 -0
- package/components/Chart/StackedBarChart.d.ts +36 -0
- package/components/Chart/StackedBarChart.js +98 -0
- package/components/Chart/Treemap.d.ts +35 -0
- package/components/Chart/Treemap.js +95 -0
- package/components/Chart/palette.d.ts +1 -0
- package/components/Chart/palette.js +17 -0
- package/components/ChatHeader/ChatHeader.css +35 -0
- package/components/ChatHeader/ChatHeader.d.ts +30 -0
- package/components/ChatHeader/ChatHeader.js +17 -0
- package/components/ChatMarker/ChatMarker.css +61 -0
- package/components/ChatMarker/ChatMarker.d.ts +22 -0
- package/components/ChatMarker/ChatMarker.js +18 -0
- package/components/ChatMessage/ChatMessage.css +326 -0
- package/components/ChatMessage/ChatMessage.d.ts +74 -0
- package/components/ChatMessage/ChatMessage.js +71 -0
- package/components/ChatThread/ChatThread.css +171 -0
- package/components/ChatThread/ChatThread.d.ts +41 -0
- package/components/ChatThread/ChatThread.js +175 -0
- package/components/Checkbox/Checkbox.css +183 -0
- package/components/Checkbox/Checkbox.d.ts +81 -0
- package/components/Checkbox/Checkbox.js +176 -0
- package/components/Chip/Chip.css +231 -0
- package/components/Chip/Chip.d.ts +27 -0
- package/components/Chip/Chip.js +80 -0
- package/components/CircularButton/CircularButton.css +263 -0
- package/components/CircularButton/CircularButton.d.ts +68 -0
- package/components/CircularButton/CircularButton.js +72 -0
- package/components/CodeBlock/CodeBlock.css +189 -0
- package/components/CodeBlock/CodeBlock.d.ts +23 -0
- package/components/CodeBlock/CodeBlock.js +96 -0
- package/components/CodeDiff/CodeDiff.css +175 -0
- package/components/CodeDiff/CodeDiff.d.ts +58 -0
- package/components/CodeDiff/CodeDiff.js +114 -0
- package/components/ColorPicker/ColorPicker.css +278 -0
- package/components/ColorPicker/ColorPicker.d.ts +50 -0
- package/components/ColorPicker/ColorPicker.js +349 -0
- package/components/ColourSwatch/ColourSwatch.css +88 -0
- package/components/ColourSwatch/ColourSwatch.d.ts +34 -0
- package/components/ColourSwatch/ColourSwatch.js +42 -0
- package/components/Combobox/Combobox.css +384 -0
- package/components/Combobox/Combobox.d.ts +93 -0
- package/components/Combobox/Combobox.js +331 -0
- package/components/CommandPalette/CommandPalette.css +342 -0
- package/components/CommandPalette/CommandPalette.d.ts +62 -0
- package/components/CommandPalette/CommandPalette.js +247 -0
- package/components/Composer/Composer.css +427 -0
- package/components/Composer/Composer.d.ts +97 -0
- package/components/Composer/Composer.js +146 -0
- package/components/ContactCard/ContactCard.css +132 -0
- package/components/ContactCard/ContactCard.d.ts +24 -0
- package/components/ContactCard/ContactCard.js +79 -0
- package/components/ContextMenu/ContextMenu.css +258 -0
- package/components/ContextMenu/ContextMenu.d.ts +26 -0
- package/components/ContextMenu/ContextMenu.js +387 -0
- package/components/ContributionGraph/ContributionGraph.css +169 -0
- package/components/ContributionGraph/ContributionGraph.d.ts +34 -0
- package/components/ContributionGraph/ContributionGraph.js +149 -0
- package/components/DataTable/DataTable.css +109 -0
- package/components/DataTable/DataTable.d.ts +81 -0
- package/components/DataTable/DataTable.js +236 -0
- package/components/DateInput/DateInput.css +127 -0
- package/components/DateInput/DateInput.d.ts +44 -0
- package/components/DateInput/DateInput.js +82 -0
- package/components/DatePicker/DatePicker.css +198 -0
- package/components/DatePicker/DatePicker.d.ts +29 -0
- package/components/DatePicker/DatePicker.js +196 -0
- package/components/Dialog/Dialog.css +178 -0
- package/components/Dialog/Dialog.d.ts +39 -0
- package/components/Dialog/Dialog.js +99 -0
- package/components/Divider/Divider.css +100 -0
- package/components/Divider/Divider.d.ts +18 -0
- package/components/Divider/Divider.js +31 -0
- package/components/DocumentChip/DocumentChip.css +190 -0
- package/components/DocumentChip/DocumentChip.d.ts +41 -0
- package/components/DocumentChip/DocumentChip.js +78 -0
- package/components/Drawer/Drawer.css +262 -0
- package/components/Drawer/Drawer.d.ts +41 -0
- package/components/Drawer/Drawer.js +101 -0
- package/components/Dropdown/Dropdown.css +288 -0
- package/components/Dropdown/Dropdown.d.ts +85 -0
- package/components/Dropdown/Dropdown.js +308 -0
- package/components/DropdownMenu/DropdownMenu.css +301 -0
- package/components/DropdownMenu/DropdownMenu.d.ts +42 -0
- package/components/DropdownMenu/DropdownMenu.js +371 -0
- package/components/EmptyState/EmptyState.css +136 -0
- package/components/EmptyState/EmptyState.d.ts +27 -0
- package/components/EmptyState/EmptyState.js +32 -0
- package/components/EntityCard/EntityCard.css +69 -0
- package/components/EntityCard/EntityCard.d.ts +19 -0
- package/components/EntityCard/EntityCard.js +26 -0
- package/components/EventCalendar/EventCalendar.css +363 -0
- package/components/EventCalendar/EventCalendar.d.ts +59 -0
- package/components/EventCalendar/EventCalendar.js +230 -0
- package/components/Field/Field.css +80 -0
- package/components/Field/Field.d.ts +57 -0
- package/components/Field/Field.js +70 -0
- package/components/Field/FieldContext.d.ts +42 -0
- package/components/Field/FieldContext.js +8 -0
- package/components/Figure/Figure.css +71 -0
- package/components/Figure/Figure.d.ts +17 -0
- package/components/Figure/Figure.js +26 -0
- package/components/FileInput/FileInput.css +281 -0
- package/components/FileInput/FileInput.d.ts +54 -0
- package/components/FileInput/FileInput.js +205 -0
- package/components/FilterBar/FilterBar.css +202 -0
- package/components/FilterBar/FilterBar.d.ts +55 -0
- package/components/FilterBar/FilterBar.js +249 -0
- package/components/FunnelChart/FunnelChart.css +17 -0
- package/components/FunnelChart/FunnelChart.d.ts +51 -0
- package/components/FunnelChart/FunnelChart.js +96 -0
- package/components/GanttChart/GanttChart.css +326 -0
- package/components/GanttChart/GanttChart.d.ts +82 -0
- package/components/GanttChart/GanttChart.js +202 -0
- package/components/Gauge/Gauge.css +120 -0
- package/components/Gauge/Gauge.d.ts +64 -0
- package/components/Gauge/Gauge.js +111 -0
- package/components/Globe/Globe.css +155 -0
- package/components/Globe/Globe.d.ts +103 -0
- package/components/Globe/Globe.js +416 -0
- package/components/HoverCard/HoverCard.css +125 -0
- package/components/HoverCard/HoverCard.d.ts +29 -0
- package/components/HoverCard/HoverCard.js +83 -0
- package/components/ImageCompare/ImageCompare.css +112 -0
- package/components/ImageCompare/ImageCompare.d.ts +40 -0
- package/components/ImageCompare/ImageCompare.js +134 -0
- package/components/Input/Input.css +150 -0
- package/components/Input/Input.d.ts +45 -0
- package/components/Input/Input.js +99 -0
- package/components/Instructions/Instructions.css +216 -0
- package/components/Instructions/Instructions.d.ts +29 -0
- package/components/Instructions/Instructions.js +32 -0
- package/components/InterruptCard/InterruptCard.css +164 -0
- package/components/InterruptCard/InterruptCard.d.ts +54 -0
- package/components/InterruptCard/InterruptCard.js +57 -0
- package/components/Kbd/Kbd.css +28 -0
- package/components/Kbd/Kbd.d.ts +19 -0
- package/components/Kbd/Kbd.js +14 -0
- package/components/LegendTile/LegendTile.css +60 -0
- package/components/LegendTile/LegendTile.d.ts +30 -0
- package/components/LegendTile/LegendTile.js +21 -0
- package/components/Lightbox/Lightbox.css +210 -0
- package/components/Lightbox/Lightbox.d.ts +45 -0
- package/components/Lightbox/Lightbox.js +109 -0
- package/components/LinkList/LinkList.css +71 -0
- package/components/LinkList/LinkList.d.ts +24 -0
- package/components/LinkList/LinkList.js +42 -0
- package/components/MapCallout/MapCallout.css +46 -0
- package/components/MapCallout/MapCallout.d.ts +29 -0
- package/components/MapCallout/MapCallout.js +17 -0
- package/components/MapLegend/MapLegend.css +88 -0
- package/components/MapLegend/MapLegend.d.ts +40 -0
- package/components/MapLegend/MapLegend.js +68 -0
- package/components/MessageActions/MessageActions.css +85 -0
- package/components/MessageActions/MessageActions.d.ts +38 -0
- package/components/MessageActions/MessageActions.js +40 -0
- package/components/MessageCard/MessageCard.css +163 -0
- package/components/MessageCard/MessageCard.d.ts +35 -0
- package/components/MessageCard/MessageCard.js +30 -0
- package/components/Meter/Meter.css +98 -0
- package/components/Meter/Meter.d.ts +36 -0
- package/components/Meter/Meter.js +48 -0
- package/components/ModelPicker/ModelPicker.css +243 -0
- package/components/ModelPicker/ModelPicker.d.ts +60 -0
- package/components/ModelPicker/ModelPicker.js +261 -0
- package/components/MotionSwatch/MotionSwatch.css +176 -0
- package/components/MotionSwatch/MotionSwatch.d.ts +25 -0
- package/components/MotionSwatch/MotionSwatch.js +74 -0
- package/components/Nav/Nav.css +51 -0
- package/components/Nav/Nav.d.ts +19 -0
- package/components/Nav/Nav.js +26 -0
- package/components/NavList/NavList.css +155 -0
- package/components/NavList/NavList.d.ts +56 -0
- package/components/NavList/NavList.js +100 -0
- package/components/NotificationCenter/NotificationCenter.css +279 -0
- package/components/NotificationCenter/NotificationCenter.d.ts +72 -0
- package/components/NotificationCenter/NotificationCenter.js +145 -0
- package/components/NumberInput/NumberInput.css +163 -0
- package/components/NumberInput/NumberInput.d.ts +44 -0
- package/components/NumberInput/NumberInput.js +147 -0
- package/components/Pagination/Pagination.css +126 -0
- package/components/Pagination/Pagination.d.ts +22 -0
- package/components/Pagination/Pagination.js +84 -0
- package/components/Panel/Panel.css +26 -0
- package/components/Panel/Panel.d.ts +22 -0
- package/components/Panel/Panel.js +19 -0
- package/components/PinInput/PinInput.css +92 -0
- package/components/PinInput/PinInput.d.ts +46 -0
- package/components/PinInput/PinInput.js +161 -0
- package/components/Popover/Popover.css +118 -0
- package/components/Popover/Popover.d.ts +22 -0
- package/components/Popover/Popover.js +113 -0
- package/components/ProgressBar/ProgressBar.css +60 -0
- package/components/ProgressBar/ProgressBar.d.ts +16 -0
- package/components/ProgressBar/ProgressBar.js +27 -0
- package/components/PromptSuggestions/PromptSuggestions.css +264 -0
- package/components/PromptSuggestions/PromptSuggestions.d.ts +68 -0
- package/components/PromptSuggestions/PromptSuggestions.js +87 -0
- package/components/Prose/Prose.css +269 -0
- package/components/Prose/Prose.d.ts +21 -0
- package/components/Prose/Prose.js +14 -0
- package/components/Quote/Quote.css +78 -0
- package/components/Quote/Quote.d.ts +18 -0
- package/components/Quote/Quote.js +26 -0
- package/components/RadioButton/RadioButton.css +151 -0
- package/components/RadioButton/RadioButton.d.ts +90 -0
- package/components/RadioButton/RadioButton.js +138 -0
- package/components/Rating/Rating.css +74 -0
- package/components/Rating/Rating.d.ts +41 -0
- package/components/Rating/Rating.js +124 -0
- package/components/Reasoning/Reasoning.css +291 -0
- package/components/Reasoning/Reasoning.d.ts +55 -0
- package/components/Reasoning/Reasoning.js +99 -0
- package/components/RichDropdown/RichDropdown.css +239 -0
- package/components/RichDropdown/RichDropdown.d.ts +78 -0
- package/components/RichDropdown/RichDropdown.js +227 -0
- package/components/SectionTitle/SectionTitle.css +45 -0
- package/components/SectionTitle/SectionTitle.d.ts +12 -0
- package/components/SectionTitle/SectionTitle.js +22 -0
- package/components/SegmentedControl/SegmentedControl.css +231 -0
- package/components/SegmentedControl/SegmentedControl.d.ts +44 -0
- package/components/SegmentedControl/SegmentedControl.js +240 -0
- package/components/SelectionCard/SelectionCard.css +255 -0
- package/components/SelectionCard/SelectionCard.d.ts +36 -0
- package/components/SelectionCard/SelectionCard.js +102 -0
- package/components/ShaderField/ShaderField.css +24 -0
- package/components/ShaderField/ShaderField.d.ts +68 -0
- package/components/ShaderField/ShaderField.js +55 -0
- package/components/ShaderField/field.glsl.d.ts +39 -0
- package/components/ShaderField/field.glsl.js +178 -0
- package/components/ShaderField/useShaderField.d.ts +103 -0
- package/components/ShaderField/useShaderField.js +410 -0
- package/components/Skeleton/Skeleton.css +81 -0
- package/components/Skeleton/Skeleton.d.ts +16 -0
- package/components/Skeleton/Skeleton.js +30 -0
- package/components/Slider/Slider.css +104 -0
- package/components/Slider/Slider.d.ts +48 -0
- package/components/Slider/Slider.js +86 -0
- package/components/SourceChip/SourceChip.css +111 -0
- package/components/SourceChip/SourceChip.d.ts +32 -0
- package/components/SourceChip/SourceChip.js +31 -0
- package/components/SourceTrail/SourceTrail.css +209 -0
- package/components/SourceTrail/SourceTrail.d.ts +49 -0
- package/components/SourceTrail/SourceTrail.js +108 -0
- package/components/SpacingSwatch/SpacingSwatch.css +108 -0
- package/components/SpacingSwatch/SpacingSwatch.d.ts +20 -0
- package/components/SpacingSwatch/SpacingSwatch.js +50 -0
- package/components/Sparkline/Sparkline.css +76 -0
- package/components/Sparkline/Sparkline.d.ts +51 -0
- package/components/Sparkline/Sparkline.js +116 -0
- package/components/Spinner/Spinner.css +84 -0
- package/components/Spinner/Spinner.d.ts +14 -0
- package/components/Spinner/Spinner.js +42 -0
- package/components/SplitButton/SplitButton.css +93 -0
- package/components/SplitButton/SplitButton.d.ts +43 -0
- package/components/SplitButton/SplitButton.js +67 -0
- package/components/SplitPane/SplitPane.css +106 -0
- package/components/SplitPane/SplitPane.d.ts +36 -0
- package/components/SplitPane/SplitPane.js +130 -0
- package/components/Stat/Stat.css +121 -0
- package/components/Stat/Stat.d.ts +22 -0
- package/components/Stat/Stat.js +36 -0
- package/components/StatusDot/StatusDot.css +104 -0
- package/components/StatusDot/StatusDot.d.ts +34 -0
- package/components/StatusDot/StatusDot.js +23 -0
- package/components/Stepper/Stepper.css +216 -0
- package/components/Stepper/Stepper.d.ts +41 -0
- package/components/Stepper/Stepper.js +61 -0
- package/components/StreamingText/StreamingText.css +40 -0
- package/components/StreamingText/StreamingText.d.ts +62 -0
- package/components/StreamingText/StreamingText.js +49 -0
- package/components/StreamingText/useStreamReveal.d.ts +70 -0
- package/components/StreamingText/useStreamReveal.js +121 -0
- package/components/Swatch/Swatch.css +52 -0
- package/components/Swatch/Swatch.d.ts +34 -0
- package/components/Swatch/Swatch.js +44 -0
- package/components/Table/Table.css +223 -0
- package/components/Table/Table.d.ts +53 -0
- package/components/Table/Table.js +65 -0
- package/components/Tabs/Tabs.css +140 -0
- package/components/Tabs/Tabs.d.ts +28 -0
- package/components/Tabs/Tabs.js +78 -0
- package/components/TagInput/TagInput.css +169 -0
- package/components/TagInput/TagInput.d.ts +43 -0
- package/components/TagInput/TagInput.js +137 -0
- package/components/Textarea/Textarea.css +109 -0
- package/components/Textarea/Textarea.d.ts +43 -0
- package/components/Textarea/Textarea.js +86 -0
- package/components/ThreadPanel/ThreadPanel.css +862 -0
- package/components/ThreadPanel/ThreadPanel.d.ts +175 -0
- package/components/ThreadPanel/ThreadPanel.js +466 -0
- package/components/ThreadTabs/ThreadTabs.css +252 -0
- package/components/ThreadTabs/ThreadTabs.d.ts +54 -0
- package/components/ThreadTabs/ThreadTabs.js +201 -0
- package/components/TimePicker/TimePicker.css +230 -0
- package/components/TimePicker/TimePicker.d.ts +46 -0
- package/components/TimePicker/TimePicker.js +250 -0
- package/components/Timeline/Timeline.css +366 -0
- package/components/Timeline/Timeline.d.ts +67 -0
- package/components/Timeline/Timeline.js +73 -0
- package/components/Toast/Toast.css +363 -0
- package/components/Toast/Toast.d.ts +63 -0
- package/components/Toast/Toast.js +215 -0
- package/components/ToggleGroup/ToggleGroup.css +110 -0
- package/components/ToggleGroup/ToggleGroup.d.ts +50 -0
- package/components/ToggleGroup/ToggleGroup.js +73 -0
- package/components/ToggleSwitch/ToggleSwitch.css +172 -0
- package/components/ToggleSwitch/ToggleSwitch.d.ts +43 -0
- package/components/ToggleSwitch/ToggleSwitch.js +76 -0
- package/components/ToolCall/ToolCall.css +234 -0
- package/components/ToolCall/ToolCall.d.ts +43 -0
- package/components/ToolCall/ToolCall.js +90 -0
- package/components/Toolbar/Toolbar.css +56 -0
- package/components/Toolbar/Toolbar.d.ts +35 -0
- package/components/Toolbar/Toolbar.js +62 -0
- package/components/Tooltip/Tooltip.css +175 -0
- package/components/Tooltip/Tooltip.d.ts +22 -0
- package/components/Tooltip/Tooltip.js +74 -0
- package/components/TreeView/TreeView.css +119 -0
- package/components/TreeView/TreeView.d.ts +45 -0
- package/components/TreeView/TreeView.js +232 -0
- package/components/TypographySwatch/TypographySwatch.css +81 -0
- package/components/TypographySwatch/TypographySwatch.d.ts +24 -0
- package/components/TypographySwatch/TypographySwatch.js +40 -0
- package/components/UsageCard/UsageCard.css +30 -0
- package/components/UsageCard/UsageCard.d.ts +48 -0
- package/components/UsageCard/UsageCard.js +54 -0
- package/components/Waveform/Waveform.css +97 -0
- package/components/Waveform/Waveform.d.ts +44 -0
- package/components/Waveform/Waveform.js +46 -0
- package/components/WorldMap/WorldMap.css +234 -0
- package/components/WorldMap/WorldMap.d.ts +113 -0
- package/components/WorldMap/WorldMap.js +427 -0
- package/components/WorldMap/land.d.ts +14 -0
- package/components/WorldMap/land.js +4 -0
- package/components/registry.d.ts +79 -0
- package/components/registry.js +13 -0
- package/components/registry.json +1153 -0
- package/components/registry.json.d.ts +1156 -0
- package/components/registry.json.js +11 -0
- package/fonts/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 +0 -0
- package/fonts/material-symbols.css +94 -0
- package/fonts/presets/dm-sans-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/dm-sans-300-700-latin.woff2 +0 -0
- package/fonts/presets/fraunces-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/fraunces-300-700-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-300-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-300-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-400-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-400-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-500-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-500-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-600-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-600-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-700-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-mono-700-latin.woff2 +0 -0
- package/fonts/presets/ibm-plex-sans-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/ibm-plex-sans-300-700-latin.woff2 +0 -0
- package/fonts/presets/inter-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/inter-300-700-latin.woff2 +0 -0
- package/fonts/presets/inter-tight-300-900-latin-ext.woff2 +0 -0
- package/fonts/presets/inter-tight-300-900-latin.woff2 +0 -0
- package/fonts/presets/lora-400-700-latin-ext.woff2 +0 -0
- package/fonts/presets/lora-400-700-latin.woff2 +0 -0
- package/fonts/presets/montserrat-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/montserrat-300-700-latin.woff2 +0 -0
- package/fonts/presets/poppins-300-latin-ext.woff2 +0 -0
- package/fonts/presets/poppins-300-latin.woff2 +0 -0
- package/fonts/presets/poppins-400-latin-ext.woff2 +0 -0
- package/fonts/presets/poppins-400-latin.woff2 +0 -0
- package/fonts/presets/poppins-500-latin-ext.woff2 +0 -0
- package/fonts/presets/poppins-500-latin.woff2 +0 -0
- package/fonts/presets/poppins-600-latin-ext.woff2 +0 -0
- package/fonts/presets/poppins-600-latin.woff2 +0 -0
- package/fonts/presets/poppins-700-latin-ext.woff2 +0 -0
- package/fonts/presets/poppins-700-latin.woff2 +0 -0
- package/fonts/presets/source-sans-3-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/source-sans-3-300-700-latin.woff2 +0 -0
- package/fonts/presets/space-grotesk-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/space-grotesk-300-700-latin.woff2 +0 -0
- package/fonts/presets/work-sans-300-700-latin-ext.woff2 +0 -0
- package/fonts/presets/work-sans-300-700-latin.woff2 +0 -0
- package/index.d.ts +132 -0
- package/index.js +277 -0
- package/package.json +87 -0
- package/tokens/motion.d.ts +44 -0
- package/tokens/motion.js +32 -0
- package/tokens/presets/contrast.css +316 -0
- package/tokens/presets/coral.css +356 -0
- package/tokens/presets/forest.css +334 -0
- package/tokens/presets/gold.css +303 -0
- package/tokens/presets/mono.css +286 -0
- package/tokens/presets/pink.css +349 -0
- package/tokens/presets/presets.css +17 -0
- package/tokens/presets/terminal.css +378 -0
- package/tokens/presets/violet.css +314 -0
- package/tokens/presets/warm.css +320 -0
- package/tokens/presets/zest.css +359 -0
- package/tokens/registry.d.ts +22 -0
- package/tokens/registry.js +14 -0
- package/tokens/registry.json +276 -0
- package/tokens/registry.json.d.ts +279 -0
- package/tokens/registry.json.js +8 -0
- package/tokens/tokens-dark.css +186 -0
- package/tokens/tokens-light.css +276 -0
- package/tokens/tokens-motion.css +72 -0
- package/tokens/tokens-primitives.css +213 -0
- package/tokens/tokens-typography.css +210 -0
- package/tokens/tokens.css +11 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
DIALOG COMPONENT
|
|
3
|
+
General-purpose modal with backdrop overlay
|
|
4
|
+
============================================ */
|
|
5
|
+
|
|
6
|
+
.ds-dialog {
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: 0;
|
|
9
|
+
z-index: 100;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
visibility: hidden; /* keeps panel controls out of the tab order when closed */
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard), visibility var(--motion-duration-base) var(--motion-ease-standard);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ds-dialog--open {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
visibility: visible;
|
|
22
|
+
pointer-events: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* ============================================
|
|
26
|
+
BACKDROP
|
|
27
|
+
============================================ */
|
|
28
|
+
|
|
29
|
+
.ds-dialog__backdrop {
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0;
|
|
32
|
+
background-color: var(--color-scrim);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ============================================
|
|
36
|
+
PANEL
|
|
37
|
+
============================================ */
|
|
38
|
+
|
|
39
|
+
.ds-dialog__panel {
|
|
40
|
+
position: relative;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--gap-400); /* 16px */
|
|
45
|
+
width: 100%;
|
|
46
|
+
max-height: calc(100vh - var(--gap-1000) * 2); /* breathing room top/bottom */
|
|
47
|
+
padding: var(--padding-500); /* 20px */
|
|
48
|
+
border: var(--border-025) solid var(--color-bg-container-border);
|
|
49
|
+
border-radius: var(--radius-300); /* 12px */
|
|
50
|
+
background-color: var(--color-bg-page-primary);
|
|
51
|
+
box-shadow: var(--shadow-modal);
|
|
52
|
+
transform: scale(0.96);
|
|
53
|
+
transition: transform var(--motion-duration-base) var(--motion-ease-standard);
|
|
54
|
+
outline: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ds-dialog--open .ds-dialog__panel {
|
|
58
|
+
transform: scale(1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Sizes */
|
|
62
|
+
.ds-dialog--sm .ds-dialog__panel {
|
|
63
|
+
max-width: 400px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ds-dialog--md .ds-dialog__panel {
|
|
67
|
+
max-width: 560px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ds-dialog--lg .ds-dialog__panel {
|
|
71
|
+
max-width: 720px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ============================================
|
|
75
|
+
HEADER
|
|
76
|
+
============================================ */
|
|
77
|
+
|
|
78
|
+
.ds-dialog__header {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
gap: var(--gap-400); /* 16px */
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ds-dialog__heading {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
gap: var(--gap-100); /* 4px */
|
|
89
|
+
min-width: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-dialog__title {
|
|
93
|
+
font-family: var(--font-heading-3-family);
|
|
94
|
+
font-size: var(--font-heading-3-size);
|
|
95
|
+
font-weight: var(--font-heading-3-weight);
|
|
96
|
+
line-height: var(--font-heading-3-line-height);
|
|
97
|
+
letter-spacing: var(--font-heading-3-letter-spacing);
|
|
98
|
+
color: var(--color-text-primary);
|
|
99
|
+
margin: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ds-dialog__description {
|
|
103
|
+
font-family: var(--font-paragraph-sm-family);
|
|
104
|
+
font-size: var(--font-paragraph-sm-size);
|
|
105
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
106
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
107
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
108
|
+
color: var(--color-text-tertiary);
|
|
109
|
+
margin: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Close button — ghost icon button */
|
|
113
|
+
.ds-dialog__close {
|
|
114
|
+
flex-shrink: 0;
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
width: 32px;
|
|
119
|
+
height: 32px;
|
|
120
|
+
padding: 0;
|
|
121
|
+
border: none;
|
|
122
|
+
border-radius: var(--radius-pill); /* pill */
|
|
123
|
+
background-color: transparent;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
transition: background-color var(--motion-duration-base) var(--motion-ease-standard);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ds-dialog__close:hover {
|
|
129
|
+
background-color: var(--color-action-passive-bg-hover);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ds-dialog__close:focus-visible {
|
|
133
|
+
outline: 2px solid var(--color-action-primary-bg);
|
|
134
|
+
outline-offset: 2px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ds-dialog__close-icon {
|
|
138
|
+
--icon-size: var(--icon-size-500);
|
|
139
|
+
line-height: 1;
|
|
140
|
+
color: var(--color-icon-primary);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* ============================================
|
|
144
|
+
BODY
|
|
145
|
+
Scrolls when content exceeds the panel height
|
|
146
|
+
============================================ */
|
|
147
|
+
|
|
148
|
+
.ds-dialog__body {
|
|
149
|
+
overflow-y: auto;
|
|
150
|
+
min-height: 0;
|
|
151
|
+
font-family: var(--font-paragraph-family);
|
|
152
|
+
font-size: var(--font-paragraph-size);
|
|
153
|
+
font-weight: var(--font-paragraph-weight);
|
|
154
|
+
line-height: var(--font-paragraph-line-height);
|
|
155
|
+
letter-spacing: var(--font-paragraph-letter-spacing);
|
|
156
|
+
color: var(--color-text-secondary);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ============================================
|
|
160
|
+
FOOTER
|
|
161
|
+
============================================ */
|
|
162
|
+
|
|
163
|
+
.ds-dialog__footer {
|
|
164
|
+
display: flex;
|
|
165
|
+
justify-content: flex-end;
|
|
166
|
+
gap: var(--gap-200); /* 8px */
|
|
167
|
+
padding-top: var(--padding-150); /* 6px */
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* ============================================
|
|
171
|
+
RESPONSIVE
|
|
172
|
+
============================================ */
|
|
173
|
+
|
|
174
|
+
@media (max-width: 480px) {
|
|
175
|
+
.ds-dialog__panel {
|
|
176
|
+
margin: var(--padding-400);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Props owned by Dialog itself — everything else falls through to the panel. */
|
|
3
|
+
type DialogOwnProps = {
|
|
4
|
+
/** Whether the dialog is open */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Callback when dialog requests to close */
|
|
7
|
+
onOpenChange: (open: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Dialog title.
|
|
10
|
+
* Note: this shadows the native `title` tooltip attribute, which Dialog does not expose.
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/** Optional subtitle under the title */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Dialog body content */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** Optional footer slot — typically a row of Buttons */
|
|
18
|
+
footer?: React.ReactNode;
|
|
19
|
+
/** Panel width */
|
|
20
|
+
size?: 'sm' | 'md' | 'lg';
|
|
21
|
+
/** Whether ESC, backdrop click, and the close button can dismiss */
|
|
22
|
+
dismissible?: boolean;
|
|
23
|
+
/** Additional CSS classes — applied to the portal container, not the panel */
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
export interface DialogProps extends DialogOwnProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof DialogOwnProps> {
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Dialog component — a general-purpose modal with arbitrary
|
|
30
|
+
* content and an optional footer. Traps focus, restores it on
|
|
31
|
+
* close, locks body scroll, and supports ESC / backdrop / close
|
|
32
|
+
* button dismissal. For confirm/cancel prompts use AlertDialog.
|
|
33
|
+
*
|
|
34
|
+
* Renders through a portal into `document.body`. The forwarded ref and any
|
|
35
|
+
* unrecognised props target the **panel** (the `role="dialog"` element), not the
|
|
36
|
+
* portal container — that is the element worth focusing or measuring.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { useRef, useId } from "react";
|
|
4
|
+
import ReactDOM from "react-dom";
|
|
5
|
+
import "./Dialog.css";
|
|
6
|
+
import "../../fonts/material-symbols.css";
|
|
7
|
+
import { useMounted } from "../../behaviors/useMounted.js";
|
|
8
|
+
import { useLayer } from "../../behaviors/useLayer.js";
|
|
9
|
+
import { useFocusScope } from "../../behaviors/useFocusScope.js";
|
|
10
|
+
import { useScrollLock } from "../../behaviors/useScrollLock.js";
|
|
11
|
+
const Dialog = React.forwardRef(
|
|
12
|
+
({
|
|
13
|
+
open,
|
|
14
|
+
onOpenChange,
|
|
15
|
+
title,
|
|
16
|
+
description,
|
|
17
|
+
children,
|
|
18
|
+
footer,
|
|
19
|
+
size = "md",
|
|
20
|
+
dismissible = true,
|
|
21
|
+
className = "",
|
|
22
|
+
...rest
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const panelRef = useRef(null);
|
|
25
|
+
const titleId = useId();
|
|
26
|
+
const descId = useId();
|
|
27
|
+
const baseClass = "ds-dialog";
|
|
28
|
+
const setPanelRef = (node) => {
|
|
29
|
+
panelRef.current = node;
|
|
30
|
+
if (typeof ref === "function") ref(node);
|
|
31
|
+
else if (ref) ref.current = node;
|
|
32
|
+
};
|
|
33
|
+
const mounted = useMounted();
|
|
34
|
+
useLayer({ open, dismissOnEscape: dismissible, onDismiss: () => onOpenChange(false) });
|
|
35
|
+
useFocusScope(panelRef, { active: open });
|
|
36
|
+
useScrollLock(open);
|
|
37
|
+
const handleBackdropClick = () => {
|
|
38
|
+
if (dismissible) onOpenChange(false);
|
|
39
|
+
};
|
|
40
|
+
const containerClasses = [
|
|
41
|
+
baseClass,
|
|
42
|
+
`${baseClass}--${size}`,
|
|
43
|
+
open ? `${baseClass}--open` : "",
|
|
44
|
+
className
|
|
45
|
+
].filter(Boolean).join(" ");
|
|
46
|
+
const dialog = /* @__PURE__ */ jsxs("div", { className: containerClasses, children: [
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: `${baseClass}__backdrop`, onClick: handleBackdropClick }),
|
|
48
|
+
/* @__PURE__ */ jsxs(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
...rest,
|
|
52
|
+
className: `${baseClass}__panel`,
|
|
53
|
+
ref: setPanelRef,
|
|
54
|
+
role: "dialog",
|
|
55
|
+
"aria-modal": "true",
|
|
56
|
+
"aria-labelledby": titleId,
|
|
57
|
+
"aria-describedby": description ? descId : rest["aria-describedby"],
|
|
58
|
+
tabIndex: -1,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__header`, children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: `${baseClass}__heading`, children: [
|
|
62
|
+
/* @__PURE__ */ jsx("h2", { className: `${baseClass}__title`, id: titleId, children: title }),
|
|
63
|
+
description && /* @__PURE__ */ jsx("p", { className: `${baseClass}__description`, id: descId, children: description })
|
|
64
|
+
] }),
|
|
65
|
+
dismissible && /* @__PURE__ */ jsx(
|
|
66
|
+
"button",
|
|
67
|
+
{
|
|
68
|
+
type: "button",
|
|
69
|
+
className: `${baseClass}__close`,
|
|
70
|
+
onClick: () => onOpenChange(false),
|
|
71
|
+
"aria-label": "Close dialog",
|
|
72
|
+
children: /* @__PURE__ */ jsx(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
className: `${baseClass}__close-icon material-symbols-rounded`,
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
children: "close"
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] }),
|
|
83
|
+
children && // Scrollable when content is long; without a tab stop a keyboard
|
|
84
|
+
// user cannot reach that scroll. The initial-focus query below
|
|
85
|
+
// still prefers a real control, so this does not steal focus.
|
|
86
|
+
/* @__PURE__ */ jsx("div", { className: `${baseClass}__body`, tabIndex: 0, children }),
|
|
87
|
+
footer && /* @__PURE__ */ jsx("div", { className: `${baseClass}__footer`, children: footer })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
if (!mounted) return null;
|
|
93
|
+
return ReactDOM.createPortal(dialog, document.body);
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
Dialog.displayName = "Dialog";
|
|
97
|
+
export {
|
|
98
|
+
Dialog
|
|
99
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
DIVIDER COMPONENT
|
|
3
|
+
Thin rule separating stacked content
|
|
4
|
+
============================================ */
|
|
5
|
+
|
|
6
|
+
/* Base — plain horizontal <hr> */
|
|
7
|
+
.ds-divider {
|
|
8
|
+
border: none;
|
|
9
|
+
margin: 0;
|
|
10
|
+
border-top: var(--border-025) solid var(--color-divider);
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* ============================================
|
|
15
|
+
SPACING
|
|
16
|
+
Block margin for horizontal, inline for vertical
|
|
17
|
+
============================================ */
|
|
18
|
+
|
|
19
|
+
.ds-divider--spacing-none {
|
|
20
|
+
margin-block: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ds-divider--spacing-sm {
|
|
24
|
+
margin-block: var(--gap-200); /* 8px */
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ds-divider--spacing-md {
|
|
28
|
+
margin-block: var(--gap-400); /* 16px */
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ds-divider--spacing-lg {
|
|
32
|
+
margin-block: var(--gap-500); /* 20px */
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ============================================
|
|
36
|
+
LABELED
|
|
37
|
+
Text label inline with the rule
|
|
38
|
+
============================================ */
|
|
39
|
+
|
|
40
|
+
.ds-divider--labeled {
|
|
41
|
+
border-top: none;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: var(--gap-300); /* 12px */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ds-divider--labeled::before,
|
|
48
|
+
.ds-divider--labeled::after {
|
|
49
|
+
content: '';
|
|
50
|
+
flex: 1;
|
|
51
|
+
height: var(--border-025);
|
|
52
|
+
background-color: var(--color-divider);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Label at the start — no leading segment */
|
|
56
|
+
.ds-divider--label-start::before {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ds-divider__label {
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
font-family: var(--font-paragraph-sm-family);
|
|
63
|
+
font-size: var(--font-paragraph-sm-size);
|
|
64
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
65
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
66
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
67
|
+
color: var(--color-text-secondary);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ============================================
|
|
71
|
+
VERTICAL
|
|
72
|
+
Stretches to container height inside flex rows
|
|
73
|
+
============================================ */
|
|
74
|
+
|
|
75
|
+
.ds-divider--vertical {
|
|
76
|
+
border-top: none;
|
|
77
|
+
width: var(--border-025);
|
|
78
|
+
align-self: stretch;
|
|
79
|
+
background-color: var(--color-divider);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ds-divider--vertical.ds-divider--spacing-none {
|
|
83
|
+
margin-block: 0;
|
|
84
|
+
margin-inline: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ds-divider--vertical.ds-divider--spacing-sm {
|
|
88
|
+
margin-block: 0;
|
|
89
|
+
margin-inline: var(--gap-200); /* 8px */
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-divider--vertical.ds-divider--spacing-md {
|
|
93
|
+
margin-block: 0;
|
|
94
|
+
margin-inline: var(--gap-400); /* 16px */
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ds-divider--vertical.ds-divider--spacing-lg {
|
|
98
|
+
margin-block: 0;
|
|
99
|
+
margin-inline: var(--gap-500); /* 20px */
|
|
100
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DividerProps {
|
|
2
|
+
/** Divider direction */
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
/** Optional label rendered inline in the line (horizontal only) */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Label placement along the line */
|
|
7
|
+
labelPosition?: 'start' | 'center';
|
|
8
|
+
/** Margin around the divider (block for horizontal, inline for vertical) */
|
|
9
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Additional CSS classes */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Divider component — a thin rule separating stacked content.
|
|
15
|
+
* Plain horizontal by default; supports an inline text label
|
|
16
|
+
* and a vertical orientation for use inside flex rows.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Divider: ({ orientation, label, labelPosition, spacing, className, }: DividerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./Divider.css";
|
|
3
|
+
const Divider = ({
|
|
4
|
+
orientation = "horizontal",
|
|
5
|
+
label,
|
|
6
|
+
labelPosition = "center",
|
|
7
|
+
spacing = "md",
|
|
8
|
+
className = ""
|
|
9
|
+
}) => {
|
|
10
|
+
const baseClass = "ds-divider";
|
|
11
|
+
const spacingClass = `${baseClass}--spacing-${spacing}`;
|
|
12
|
+
if (orientation === "vertical") {
|
|
13
|
+
const classes2 = [baseClass, `${baseClass}--vertical`, spacingClass, className].filter(Boolean).join(" ");
|
|
14
|
+
return /* @__PURE__ */ jsx("div", { className: classes2, role: "separator", "aria-orientation": "vertical" });
|
|
15
|
+
}
|
|
16
|
+
if (label) {
|
|
17
|
+
const classes2 = [
|
|
18
|
+
baseClass,
|
|
19
|
+
`${baseClass}--labeled`,
|
|
20
|
+
`${baseClass}--label-${labelPosition}`,
|
|
21
|
+
spacingClass,
|
|
22
|
+
className
|
|
23
|
+
].filter(Boolean).join(" ");
|
|
24
|
+
return /* @__PURE__ */ jsx("div", { className: classes2, role: "separator", "aria-orientation": "horizontal", children: /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }) });
|
|
25
|
+
}
|
|
26
|
+
const classes = [baseClass, spacingClass, className].filter(Boolean).join(" ");
|
|
27
|
+
return /* @__PURE__ */ jsx("hr", { className: classes });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
Divider
|
|
31
|
+
};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
DOCUMENT CHIP COMPONENT
|
|
3
|
+
Compact file reference tile: type icon, name,
|
|
4
|
+
metadata line, upload progress, optional remove.
|
|
5
|
+
============================================ */
|
|
6
|
+
|
|
7
|
+
.ds-document-chip {
|
|
8
|
+
/* Accent indirection — the error modifier repoints one variable
|
|
9
|
+
instead of restyling each part */
|
|
10
|
+
--ds-document-chip-border: var(--color-bg-container-border);
|
|
11
|
+
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--gap-200);
|
|
15
|
+
|
|
16
|
+
padding: var(--padding-150) var(--padding-300);
|
|
17
|
+
|
|
18
|
+
border: var(--border-025) solid var(--ds-document-chip-border);
|
|
19
|
+
border-radius: var(--radius-300);
|
|
20
|
+
background-color: var(--color-bg-container-primary);
|
|
21
|
+
|
|
22
|
+
transition: border-color var(--motion-duration-base) var(--motion-ease-standard);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* ============================================
|
|
26
|
+
SIZE — COMPACT (single line for composer rows)
|
|
27
|
+
============================================ */
|
|
28
|
+
|
|
29
|
+
.ds-document-chip--compact {
|
|
30
|
+
gap: var(--gap-100);
|
|
31
|
+
padding: var(--padding-100) var(--padding-200);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ============================================
|
|
35
|
+
ERROR — repoint the border accent
|
|
36
|
+
============================================ */
|
|
37
|
+
|
|
38
|
+
.ds-document-chip--error {
|
|
39
|
+
--ds-document-chip-border: var(--color-status-error-border);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ============================================
|
|
43
|
+
MAIN — body button when the chip is clickable
|
|
44
|
+
============================================ */
|
|
45
|
+
|
|
46
|
+
.ds-document-chip__main {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: inherit;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
border: none;
|
|
53
|
+
background: none;
|
|
54
|
+
border-radius: var(--radius-200);
|
|
55
|
+
font: inherit;
|
|
56
|
+
letter-spacing: inherit;
|
|
57
|
+
color: inherit;
|
|
58
|
+
text-align: left;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition: background-color var(--motion-duration-base) var(--motion-ease-standard);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-document-chip__main:hover {
|
|
64
|
+
background-color: var(--color-bg-container-secondary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ============================================
|
|
68
|
+
TYPE ICON
|
|
69
|
+
============================================ */
|
|
70
|
+
|
|
71
|
+
.ds-document-chip__icon {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
color: var(--color-icon-primary);
|
|
76
|
+
transition: color var(--motion-duration-base) var(--motion-ease-standard);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ds-document-chip__icon .material-symbols-rounded {
|
|
80
|
+
--icon-size: var(--icon-size-600);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ds-document-chip--compact .ds-document-chip__icon .material-symbols-rounded {
|
|
84
|
+
--icon-size: var(--icon-size-500);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ds-document-chip--error .ds-document-chip__icon {
|
|
88
|
+
color: var(--color-status-error-text);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ============================================
|
|
92
|
+
TEXT BLOCK — name over one detail line
|
|
93
|
+
============================================ */
|
|
94
|
+
|
|
95
|
+
.ds-document-chip__text {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
align-items: flex-start;
|
|
99
|
+
gap: var(--gap-050);
|
|
100
|
+
min-width: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ds-document-chip__name {
|
|
104
|
+
/* Consumer-overridable truncation width */
|
|
105
|
+
max-width: var(--ds-document-chip-max-width, 28ch);
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
text-overflow: ellipsis;
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
|
|
110
|
+
font-family: var(--font-paragraph-sm-emphasis-family);
|
|
111
|
+
font-size: var(--font-paragraph-sm-emphasis-size);
|
|
112
|
+
font-weight: var(--font-paragraph-sm-emphasis-weight);
|
|
113
|
+
line-height: var(--font-paragraph-sm-emphasis-line-height);
|
|
114
|
+
letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
|
|
115
|
+
color: var(--color-text-primary);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ds-document-chip__meta,
|
|
119
|
+
.ds-document-chip__error {
|
|
120
|
+
font-family: var(--font-paragraph-sm-family);
|
|
121
|
+
font-size: var(--font-paragraph-sm-size);
|
|
122
|
+
font-weight: var(--font-paragraph-sm-weight);
|
|
123
|
+
line-height: var(--font-paragraph-sm-line-height);
|
|
124
|
+
letter-spacing: var(--font-paragraph-sm-letter-spacing);
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ds-document-chip__meta {
|
|
129
|
+
color: var(--color-text-tertiary);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ds-document-chip__error {
|
|
133
|
+
color: var(--color-status-error-text);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Composed ProgressBar replacing the metadata line */
|
|
137
|
+
.ds-document-chip__progress {
|
|
138
|
+
align-self: stretch;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* ============================================
|
|
142
|
+
REMOVE BUTTON
|
|
143
|
+
============================================ */
|
|
144
|
+
|
|
145
|
+
.ds-document-chip__remove {
|
|
146
|
+
display: inline-flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
flex-shrink: 0;
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 0;
|
|
152
|
+
border: none;
|
|
153
|
+
background: none;
|
|
154
|
+
border-radius: var(--radius-pill);
|
|
155
|
+
color: var(--color-icon-primary);
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
transition: color var(--motion-duration-base) var(--motion-ease-standard);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ds-document-chip__remove .material-symbols-rounded {
|
|
161
|
+
--icon-size: var(--icon-size-500);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ds-document-chip__remove:not(:disabled):hover {
|
|
165
|
+
color: var(--color-text-primary);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ds-document-chip__remove:disabled {
|
|
169
|
+
opacity: 0.4;
|
|
170
|
+
cursor: not-allowed;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* ============================================
|
|
174
|
+
FOCUS
|
|
175
|
+
============================================ */
|
|
176
|
+
|
|
177
|
+
.ds-document-chip__main:focus-visible,
|
|
178
|
+
.ds-document-chip__remove:focus-visible {
|
|
179
|
+
outline: 2px solid var(--color-action-primary-bg);
|
|
180
|
+
outline-offset: -2px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Icons take the colour of the text around them. Explicit, not just
|
|
184
|
+
inherited by default: a consumer stylesheet that sets a colour on
|
|
185
|
+
.material-symbols-rounded itself (a common global default) would
|
|
186
|
+
otherwise override inheritance and detach the icon from the state
|
|
187
|
+
colours this component sets on its parents. */
|
|
188
|
+
.ds-document-chip .material-symbols-rounded {
|
|
189
|
+
color: inherit;
|
|
190
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type DocumentChipFileType = 'pdf' | 'doc' | 'sheet' | 'slide' | 'image' | 'code' | 'archive' | 'generic';
|
|
3
|
+
/** Props owned by DocumentChip itself — everything else falls through to the root element. */
|
|
4
|
+
type DocumentChipOwnProps = {
|
|
5
|
+
/** File name, truncated with an ellipsis when it outgrows the tile. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Document type — picks the leading Material Symbol. */
|
|
8
|
+
fileType?: DocumentChipFileType;
|
|
9
|
+
/** Override the type icon — a Material Symbol name, or any custom element. */
|
|
10
|
+
icon?: string | React.ReactNode;
|
|
11
|
+
/** Free-text metadata line, e.g. "1.2 MB" or "12 pages" — callers keep their own formatting. */
|
|
12
|
+
meta?: string;
|
|
13
|
+
/** Upload progress, 0–100. While set, replaces the metadata line with a progress bar. */
|
|
14
|
+
progress?: number;
|
|
15
|
+
/** Error message — replaces the metadata line and colours the tile with the error pair. */
|
|
16
|
+
error?: string;
|
|
17
|
+
/** Tile size. Compact drops the metadata line — name only — for dense composer rows. */
|
|
18
|
+
size?: 'default' | 'compact';
|
|
19
|
+
/** Click handler — presence makes the chip body (icon + text) an interactive button. */
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/** Remove handler — renders a trailing close button. */
|
|
22
|
+
onRemove?: () => void;
|
|
23
|
+
/** Accessible label for the remove button. */
|
|
24
|
+
removeLabel?: string;
|
|
25
|
+
/** Additional CSS classes */
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
export interface DocumentChipProps extends DocumentChipOwnProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof DocumentChipOwnProps> {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* DocumentChip is a compact file reference: a two-line tile with a type
|
|
32
|
+
* icon, name, metadata line, upload progress, and an optional remove
|
|
33
|
+
* button. It references documents attached to chat messages or queued
|
|
34
|
+
* above a composer — Chip stays the one-line pill for attributes, and
|
|
35
|
+
* FileInput stays the form control that owns selection.
|
|
36
|
+
*
|
|
37
|
+
* The root is always a `<div>`; passing `onClick` turns the body into a
|
|
38
|
+
* `<button>` so click and remove coexist without nesting controls.
|
|
39
|
+
*/
|
|
40
|
+
export declare const DocumentChip: React.ForwardRefExoticComponent<DocumentChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export {};
|