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,559 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
AI BUTTON
|
|
3
|
+
The AI entry point: a solid field pushed past
|
|
4
|
+
the page floor (bright white in light, true
|
|
5
|
+
black in dark), slowly rotating gradient ring,
|
|
6
|
+
soft glow of the same gradient haloing the
|
|
7
|
+
edge. The ring is the system's "a model
|
|
8
|
+
answers here" signal — ordinary actions keep
|
|
9
|
+
the flat action teal.
|
|
10
|
+
============================================ */
|
|
11
|
+
|
|
12
|
+
/* The rotation animates a registered custom property: a conic gradient's
|
|
13
|
+
angle cannot tween otherwise. Browsers without @property render the ring
|
|
14
|
+
at its initial angle, static — a correct, quieter fallback. */
|
|
15
|
+
@property --ds-ai-button-angle {
|
|
16
|
+
syntax: '<angle>';
|
|
17
|
+
initial-value: 0deg;
|
|
18
|
+
inherits: false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Base */
|
|
22
|
+
.ds-ai-button {
|
|
23
|
+
/* Layout */
|
|
24
|
+
position: relative;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
gap: var(--gap-200);
|
|
29
|
+
|
|
30
|
+
/* Spacing — matches Button so the two sit on one control scale */
|
|
31
|
+
padding: var(--padding-200) var(--padding-500);
|
|
32
|
+
|
|
33
|
+
/* Buttons are always pill-shaped (design.md invariant) */
|
|
34
|
+
border-radius: var(--radius-pill);
|
|
35
|
+
|
|
36
|
+
/* Typography — the clickable-control face, same as Button */
|
|
37
|
+
font-family: var(--font-paragraph-emphasis-family);
|
|
38
|
+
font-weight: var(--font-paragraph-emphasis-weight);
|
|
39
|
+
font-size: var(--font-paragraph-emphasis-size);
|
|
40
|
+
line-height: var(--font-paragraph-emphasis-line-height);
|
|
41
|
+
letter-spacing: var(--font-paragraph-emphasis-letter-spacing);
|
|
42
|
+
text-align: center;
|
|
43
|
+
/* A pill's label never wraps — a squeezed layout shortens around the
|
|
44
|
+
button, it doesn't fold the silhouette into two lines. */
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
|
|
47
|
+
/* The field is the theme's extreme surface — brighter than the light page,
|
|
48
|
+
deeper than the dark one — so the pill stands off whatever it floats
|
|
49
|
+
over. The opaque fill also keeps the glow at the edges: the ::after
|
|
50
|
+
escapes behind the button (negative z-index, no stacking context here),
|
|
51
|
+
so it reads as a halo, not a tint. */
|
|
52
|
+
background: var(--color-ai-button-bg);
|
|
53
|
+
color: var(--color-text-primary);
|
|
54
|
+
|
|
55
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
56
|
+
|
|
57
|
+
/* Reset */
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
border: none;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* The gradient ring: a conic gradient painted across the whole button, then
|
|
64
|
+
masked to the border band (two fills, exclude-composited, inset by the
|
|
65
|
+
border width). The gradient repeats back to its start colour so the seam
|
|
66
|
+
at 360° is invisible while it turns. */
|
|
67
|
+
.ds-ai-button::before {
|
|
68
|
+
content: '';
|
|
69
|
+
position: absolute;
|
|
70
|
+
inset: 0;
|
|
71
|
+
border-radius: inherit;
|
|
72
|
+
padding: var(--border-050);
|
|
73
|
+
background: conic-gradient(
|
|
74
|
+
from var(--ds-ai-button-angle),
|
|
75
|
+
var(--color-ai-gradient-start),
|
|
76
|
+
var(--color-ai-gradient-mid),
|
|
77
|
+
var(--color-ai-gradient-end),
|
|
78
|
+
var(--color-ai-gradient-mid),
|
|
79
|
+
var(--color-ai-gradient-start)
|
|
80
|
+
);
|
|
81
|
+
/* Standard properties only — the build pipeline prefixes per its browser
|
|
82
|
+
targets, and hand-written -webkit- duplicates confuse its merging. */
|
|
83
|
+
/* ds-allow(color): mask luminance keying — the #fff paints alpha coverage
|
|
84
|
+
for mask-composite, not a theme colour */
|
|
85
|
+
mask:
|
|
86
|
+
linear-gradient(#fff 0 0) content-box,
|
|
87
|
+
linear-gradient(#fff 0 0);
|
|
88
|
+
mask-composite: exclude;
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
/* The entry shares the glow's corner origin (a fraction chosen by eye)
|
|
91
|
+
and lands a --motion-duration-fast beat after the bloom starts. */
|
|
92
|
+
transform-origin: 90% 90%;
|
|
93
|
+
/* ds-allow(motion): ambient signature rotation, tuned by eye — deliberately
|
|
94
|
+
far slower than the interaction-scale motion tokens. The 21s loop is
|
|
95
|
+
three uneven turns (the keyframes own the cadence), so the pace swells
|
|
96
|
+
and settles instead of ticking round like a clock. The second animation
|
|
97
|
+
is the one-shot entry — opacity/transform only, so the two compose. */
|
|
98
|
+
animation:
|
|
99
|
+
ds-ai-button-turn 21s var(--motion-ease-emphasized) infinite,
|
|
100
|
+
ds-ai-button-enter-ring var(--motion-duration-slower) var(--motion-ease-entrance) var(--motion-duration-fast) backwards;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* The glow: the same gradient, blurred behind the button at low opacity.
|
|
104
|
+
A colour effect, not an elevation shadow — depth stays token-owned. */
|
|
105
|
+
.ds-ai-button::after {
|
|
106
|
+
content: '';
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 0;
|
|
109
|
+
border-radius: inherit;
|
|
110
|
+
background: conic-gradient(
|
|
111
|
+
from var(--ds-ai-button-angle),
|
|
112
|
+
var(--color-ai-gradient-start),
|
|
113
|
+
var(--color-ai-gradient-mid),
|
|
114
|
+
var(--color-ai-gradient-end),
|
|
115
|
+
var(--color-ai-gradient-mid),
|
|
116
|
+
var(--color-ai-gradient-start)
|
|
117
|
+
);
|
|
118
|
+
/* The glow's spread; a length with no token family, chosen by eye. */
|
|
119
|
+
--ds-ai-button-glow: 14px;
|
|
120
|
+
filter: blur(var(--ds-ai-button-glow));
|
|
121
|
+
opacity: 0.3;
|
|
122
|
+
z-index: -1;
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
125
|
+
/* The bloom grows out of the bottom-right corner — a fraction chosen by
|
|
126
|
+
eye, matching the ring's origin. */
|
|
127
|
+
transform-origin: 90% 90%;
|
|
128
|
+
/* ds-allow(motion): same ambient rotation as the ring, kept in phase;
|
|
129
|
+
the second animation is the one-shot entry bloom */
|
|
130
|
+
animation:
|
|
131
|
+
ds-ai-button-turn 21s var(--motion-ease-emphasized) infinite,
|
|
132
|
+
ds-ai-button-enter-glow var(--motion-duration-slower) var(--motion-ease-entrance) backwards;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Three full turns with unevenly spaced stops, eased per segment: the ring
|
|
136
|
+
drifts, surges, and settles rather than rotating at one mechanical rate.
|
|
137
|
+
The angles are turn fractions tuned by eye; the loop ends on a whole
|
|
138
|
+
turn (1080deg), so the repeating gradient makes the wrap seamless and
|
|
139
|
+
the average pace stays one turn per 7s. */
|
|
140
|
+
@keyframes ds-ai-button-turn {
|
|
141
|
+
0% {
|
|
142
|
+
--ds-ai-button-angle: 0deg;
|
|
143
|
+
}
|
|
144
|
+
14% {
|
|
145
|
+
--ds-ai-button-angle: 168deg;
|
|
146
|
+
}
|
|
147
|
+
31% {
|
|
148
|
+
--ds-ai-button-angle: 306deg;
|
|
149
|
+
}
|
|
150
|
+
46% {
|
|
151
|
+
--ds-ai-button-angle: 570deg;
|
|
152
|
+
}
|
|
153
|
+
62% {
|
|
154
|
+
--ds-ai-button-angle: 690deg;
|
|
155
|
+
}
|
|
156
|
+
79% {
|
|
157
|
+
--ds-ai-button-angle: 936deg;
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
--ds-ai-button-angle: 1080deg;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* The entry: on mount the glow blooms out of the bottom-right corner while
|
|
165
|
+
the ring fades up into place a beat behind it — the button lights rather
|
|
166
|
+
than arriving at full strength. From-only keyframes: each settles onto
|
|
167
|
+
the element's base styles, so hover and the ambient turn take over with
|
|
168
|
+
nothing filled forward. */
|
|
169
|
+
@keyframes ds-ai-button-enter-ring {
|
|
170
|
+
from {
|
|
171
|
+
opacity: 0;
|
|
172
|
+
transform: scale(0.92);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes ds-ai-button-enter-glow {
|
|
177
|
+
from {
|
|
178
|
+
opacity: 0;
|
|
179
|
+
transform: scale(0.35);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Icon rides the icon-size scale */
|
|
184
|
+
.ds-ai-button__icon {
|
|
185
|
+
--icon-size: var(--icon-size-600);
|
|
186
|
+
line-height: 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* States */
|
|
190
|
+
.ds-ai-button:hover::after {
|
|
191
|
+
opacity: 0.55;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ds-ai-button:focus-visible {
|
|
195
|
+
outline: var(--border-050) solid var(--color-action-primary-bg);
|
|
196
|
+
outline-offset: 2px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ds-ai-button--disabled,
|
|
200
|
+
.ds-ai-button:disabled {
|
|
201
|
+
opacity: 0.4;
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ds-ai-button--disabled::before,
|
|
206
|
+
.ds-ai-button--disabled::after,
|
|
207
|
+
.ds-ai-button:disabled::before,
|
|
208
|
+
.ds-ai-button:disabled::after {
|
|
209
|
+
/* The turn (first in the list) pauses; the one-shot entry still runs to
|
|
210
|
+
completion, or a button disabled from birth would freeze mid-entrance
|
|
211
|
+
with an invisible ring. */
|
|
212
|
+
animation-play-state: paused, running;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Sizes */
|
|
216
|
+
.ds-ai-button--compact {
|
|
217
|
+
padding: var(--padding-150) var(--padding-300);
|
|
218
|
+
font-size: var(--font-paragraph-sm-emphasis-size);
|
|
219
|
+
line-height: var(--font-paragraph-sm-emphasis-line-height);
|
|
220
|
+
letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ds-ai-button--compact .ds-ai-button__icon {
|
|
224
|
+
--icon-size: var(--icon-size-500);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Reduced motion: the ring and glow stay, the turning stops. */
|
|
228
|
+
@media (prefers-reduced-motion: reduce) {
|
|
229
|
+
.ds-ai-button::before,
|
|
230
|
+
.ds-ai-button::after {
|
|
231
|
+
animation: none;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* ============================================
|
|
236
|
+
THE SUMMARY PANEL
|
|
237
|
+
AiButton's TLDR surface: a frosted glass card
|
|
238
|
+
summoned above (or below) the button. The
|
|
239
|
+
button and panel share one hover zone — the
|
|
240
|
+
host — and the AI gradient sweeps once around
|
|
241
|
+
the panel's border as it opens, then fades to
|
|
242
|
+
the ordinary container border.
|
|
243
|
+
============================================ */
|
|
244
|
+
|
|
245
|
+
.ds-ai-button-host {
|
|
246
|
+
position: relative;
|
|
247
|
+
display: inline-flex;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* The button acknowledges the panel's arrival with one gentle pulse. */
|
|
251
|
+
.ds-ai-button-host--open .ds-ai-button {
|
|
252
|
+
animation: ds-ai-button-acknowledge var(--motion-duration-deliberate) var(--motion-ease-spring) both;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@keyframes ds-ai-button-acknowledge {
|
|
256
|
+
from {
|
|
257
|
+
transform: scale(1);
|
|
258
|
+
}
|
|
259
|
+
50% {
|
|
260
|
+
transform: scale(1.05);
|
|
261
|
+
}
|
|
262
|
+
to {
|
|
263
|
+
transform: scale(1);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.ds-ai-button__summary {
|
|
268
|
+
position: absolute;
|
|
269
|
+
right: 0;
|
|
270
|
+
z-index: 1;
|
|
271
|
+
/* Component-local lengths, chosen by eye like the button's glow: a
|
|
272
|
+
readable measure, capped so a phone viewport keeps its margins. */
|
|
273
|
+
--ds-ai-summary-width: 340px;
|
|
274
|
+
--ds-ai-summary-viewport-margin: 40px;
|
|
275
|
+
width: min(var(--ds-ai-summary-width), calc(100vw - var(--ds-ai-summary-viewport-margin)));
|
|
276
|
+
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
gap: var(--gap-200);
|
|
280
|
+
|
|
281
|
+
padding: var(--padding-500);
|
|
282
|
+
border-radius: var(--radius-600);
|
|
283
|
+
/* ds-allow(color): the light glass token reads solid on a floating card;
|
|
284
|
+
thinned so the page shows through the frost */
|
|
285
|
+
background: color-mix(in srgb, var(--color-bg-glass) 62%, transparent);
|
|
286
|
+
/* The frost: heavier than the 24px glass pairing so the blur reads
|
|
287
|
+
unmistakably over imagery — a component-local effect length, chosen by
|
|
288
|
+
eye. Standard property only: the build pipeline prefixes it, and a
|
|
289
|
+
hand-written -webkit- duplicate makes its merging drop the declaration. */
|
|
290
|
+
--ds-ai-summary-frost: 36px;
|
|
291
|
+
backdrop-filter: blur(var(--ds-ai-summary-frost)) saturate(1.5);
|
|
292
|
+
border: var(--border-025) solid var(--color-bg-container-border);
|
|
293
|
+
box-shadow: var(--shadow-floating);
|
|
294
|
+
|
|
295
|
+
/* Mounted but resting: the closed state mirrors the pop's `from`, so
|
|
296
|
+
leaving transitions back down the same path the entrance sprang up.
|
|
297
|
+
visibility keeps the hidden panel out of the accessibility tree and
|
|
298
|
+
the tab order, the way HoverCard hides. */
|
|
299
|
+
visibility: hidden;
|
|
300
|
+
opacity: 0;
|
|
301
|
+
transform: translateY(10px) scale(0.9);
|
|
302
|
+
transition:
|
|
303
|
+
opacity var(--motion-duration-fast) var(--motion-ease-standard),
|
|
304
|
+
transform var(--motion-duration-fast) var(--motion-ease-standard),
|
|
305
|
+
visibility var(--motion-duration-fast) var(--motion-ease-standard);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ds-ai-button-host--open .ds-ai-button__summary {
|
|
309
|
+
visibility: visible;
|
|
310
|
+
opacity: 1;
|
|
311
|
+
transform: none;
|
|
312
|
+
animation: ds-ai-summary-pop var(--motion-duration-deliberate) var(--motion-ease-entrance) both;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Dark glass is already translucent; thinning it further puts body text
|
|
316
|
+
straight onto whatever bright imagery sits beneath. */
|
|
317
|
+
[data-theme='dark'] .ds-ai-button__summary {
|
|
318
|
+
background: var(--color-bg-glass);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* Placement: the panel grows out of the button, so its transform origin
|
|
322
|
+
points back at the button's side of the gap. */
|
|
323
|
+
.ds-ai-button-host--top .ds-ai-button__summary {
|
|
324
|
+
bottom: calc(100% + var(--gap-200));
|
|
325
|
+
transform-origin: calc(100% - 60px) calc(100% + 40px);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.ds-ai-button-host--bottom .ds-ai-button__summary {
|
|
329
|
+
top: calc(100% + var(--gap-200));
|
|
330
|
+
transform-origin: calc(100% - 60px) -40px;
|
|
331
|
+
transform: translateY(-10px) scale(0.9);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ds-ai-button-host--bottom.ds-ai-button-host--open .ds-ai-button__summary {
|
|
335
|
+
transform: none;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@keyframes ds-ai-summary-pop {
|
|
339
|
+
from {
|
|
340
|
+
opacity: 0;
|
|
341
|
+
transform: translateY(10px) scale(0.9);
|
|
342
|
+
}
|
|
343
|
+
to {
|
|
344
|
+
opacity: 1;
|
|
345
|
+
transform: translateY(0) scale(1);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.ds-ai-button-host--bottom.ds-ai-button-host--open .ds-ai-button__summary {
|
|
350
|
+
animation-name: ds-ai-summary-pop-down;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@keyframes ds-ai-summary-pop-down {
|
|
354
|
+
from {
|
|
355
|
+
opacity: 0;
|
|
356
|
+
transform: translateY(-10px) scale(0.9);
|
|
357
|
+
}
|
|
358
|
+
to {
|
|
359
|
+
opacity: 1;
|
|
360
|
+
transform: translateY(0) scale(1);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* The opening signature: the AI gradient sweeps once around the whole
|
|
365
|
+
border — the button's masked conic ring, run as a single swoosh — then
|
|
366
|
+
fades away, leaving the regular border. The rotation animates a
|
|
367
|
+
registered custom property; without @property support the ring still
|
|
368
|
+
fades in and out, just without turning. */
|
|
369
|
+
@property --ds-ai-summary-ring-angle {
|
|
370
|
+
syntax: '<angle>';
|
|
371
|
+
initial-value: 0deg;
|
|
372
|
+
inherits: false;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.ds-ai-button__summary::before {
|
|
376
|
+
content: '';
|
|
377
|
+
position: absolute;
|
|
378
|
+
inset: calc(-1 * var(--border-025));
|
|
379
|
+
border-radius: var(--radius-600);
|
|
380
|
+
padding: var(--border-050);
|
|
381
|
+
background: conic-gradient(
|
|
382
|
+
from var(--ds-ai-summary-ring-angle),
|
|
383
|
+
var(--color-ai-gradient-start),
|
|
384
|
+
var(--color-ai-gradient-mid),
|
|
385
|
+
var(--color-ai-gradient-end),
|
|
386
|
+
var(--color-ai-gradient-mid),
|
|
387
|
+
var(--color-ai-gradient-start)
|
|
388
|
+
);
|
|
389
|
+
/* ds-allow(color): mask luminance keying — the #fff paints alpha coverage
|
|
390
|
+
for mask-composite, not a theme colour */
|
|
391
|
+
mask:
|
|
392
|
+
linear-gradient(#fff 0 0) content-box,
|
|
393
|
+
linear-gradient(#fff 0 0);
|
|
394
|
+
mask-composite: exclude;
|
|
395
|
+
pointer-events: none;
|
|
396
|
+
opacity: 0;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ds-ai-button-host--open .ds-ai-button__summary::before {
|
|
400
|
+
/* ds-allow(motion): one-shot signature sweep timed to the panel's
|
|
401
|
+
entrance, tuned by eye — it runs once, then the border is ordinary */
|
|
402
|
+
animation: ds-ai-summary-ring 1500ms var(--motion-ease-standard) both;
|
|
403
|
+
animation-delay: 100ms;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@keyframes ds-ai-summary-ring {
|
|
407
|
+
from {
|
|
408
|
+
--ds-ai-summary-ring-angle: 0deg;
|
|
409
|
+
opacity: 0;
|
|
410
|
+
}
|
|
411
|
+
12% {
|
|
412
|
+
opacity: 1;
|
|
413
|
+
}
|
|
414
|
+
65% {
|
|
415
|
+
opacity: 1;
|
|
416
|
+
}
|
|
417
|
+
to {
|
|
418
|
+
--ds-ai-summary-ring-angle: 360deg;
|
|
419
|
+
opacity: 0;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* The content settles a beat behind the surface — each row fades up in
|
|
424
|
+
sequence, so the panel and its contents arrive as one gesture. */
|
|
425
|
+
.ds-ai-button-host--open .ds-ai-button__summary-meta,
|
|
426
|
+
.ds-ai-button-host--open .ds-ai-button__summary-title,
|
|
427
|
+
.ds-ai-button-host--open .ds-ai-button__summary-text,
|
|
428
|
+
.ds-ai-button-host--open .ds-ai-button__summary-actions {
|
|
429
|
+
animation: ds-ai-summary-rise var(--motion-duration-slow) var(--motion-ease-entrance) both;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* ds-allow(motion): stagger offsets between rows, tuned by eye — the paced
|
|
433
|
+
durations themselves are the motion tokens above */
|
|
434
|
+
.ds-ai-button-host--open .ds-ai-button__summary-meta { animation-delay: 80ms; }
|
|
435
|
+
.ds-ai-button-host--open .ds-ai-button__summary-title { animation-delay: 130ms; }
|
|
436
|
+
.ds-ai-button-host--open .ds-ai-button__summary-text { animation-delay: 180ms; }
|
|
437
|
+
.ds-ai-button-host--open .ds-ai-button__summary-actions { animation-delay: 230ms; }
|
|
438
|
+
|
|
439
|
+
@keyframes ds-ai-summary-rise {
|
|
440
|
+
from {
|
|
441
|
+
opacity: 0;
|
|
442
|
+
transform: translateY(6px);
|
|
443
|
+
}
|
|
444
|
+
to {
|
|
445
|
+
opacity: 1;
|
|
446
|
+
transform: translateY(0);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.ds-ai-button__summary-dismiss {
|
|
451
|
+
position: absolute;
|
|
452
|
+
top: var(--gap-200);
|
|
453
|
+
right: var(--gap-200);
|
|
454
|
+
display: inline-flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
justify-content: center;
|
|
457
|
+
/* Icon-button hit target — a component-local size, chosen by eye. */
|
|
458
|
+
--ds-ai-summary-dismiss-size: 28px;
|
|
459
|
+
width: var(--ds-ai-summary-dismiss-size);
|
|
460
|
+
height: var(--ds-ai-summary-dismiss-size);
|
|
461
|
+
border: none;
|
|
462
|
+
border-radius: var(--radius-pill);
|
|
463
|
+
background: transparent;
|
|
464
|
+
color: var(--color-text-secondary);
|
|
465
|
+
cursor: pointer;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.ds-ai-button__summary-dismiss:hover {
|
|
469
|
+
background: var(--color-bg-container-secondary);
|
|
470
|
+
color: var(--color-text-primary);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.ds-ai-button__summary-dismiss .material-symbols-rounded {
|
|
474
|
+
font-size: var(--icon-size-500);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.ds-ai-button__summary-meta {
|
|
478
|
+
display: flex;
|
|
479
|
+
align-items: baseline;
|
|
480
|
+
gap: var(--gap-200);
|
|
481
|
+
/* Keeps the row clear of the dismiss button in the corner. */
|
|
482
|
+
padding-right: var(--gap-1000);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.ds-ai-button__summary-overline {
|
|
486
|
+
font-family: var(--font-overline-family);
|
|
487
|
+
font-size: var(--font-overline-size);
|
|
488
|
+
font-weight: var(--font-overline-weight);
|
|
489
|
+
line-height: var(--font-overline-line-height);
|
|
490
|
+
letter-spacing: var(--font-overline-letter-spacing);
|
|
491
|
+
text-transform: uppercase;
|
|
492
|
+
color: var(--color-text-secondary);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.ds-ai-button__summary-caption {
|
|
496
|
+
font-family: var(--font-family-primary);
|
|
497
|
+
font-size: var(--font-caption-size);
|
|
498
|
+
font-weight: var(--font-caption-weight);
|
|
499
|
+
line-height: var(--font-caption-line-height);
|
|
500
|
+
color: var(--color-text-tertiary);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.ds-ai-button__summary-title {
|
|
504
|
+
/* Long titles wrap short of the dismiss corner. */
|
|
505
|
+
padding-right: var(--gap-500);
|
|
506
|
+
font-family: var(--font-family-primary);
|
|
507
|
+
font-size: var(--font-title-body-size);
|
|
508
|
+
font-weight: var(--font-title-body-weight);
|
|
509
|
+
line-height: var(--font-title-body-line-height);
|
|
510
|
+
color: var(--color-text-primary);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ds-ai-button__summary-text {
|
|
514
|
+
display: block;
|
|
515
|
+
font-family: var(--font-family-primary);
|
|
516
|
+
font-size: var(--font-paragraph-size);
|
|
517
|
+
font-weight: var(--font-paragraph-weight);
|
|
518
|
+
line-height: var(--font-paragraph-line-height);
|
|
519
|
+
color: var(--color-text-secondary);
|
|
520
|
+
/* Seats the ghost/reveal stack below. */
|
|
521
|
+
position: relative;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* During the type-out, an invisible ghost of the finished text sizes the
|
|
525
|
+
container and the stream paints over it — the panel takes its final
|
|
526
|
+
height the moment "generation" completes, and a short summary reserves
|
|
527
|
+
nothing it won't use. */
|
|
528
|
+
.ds-ai-button__summary-text-ghost {
|
|
529
|
+
visibility: hidden;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.ds-ai-button__summary-text-reveal {
|
|
533
|
+
position: absolute;
|
|
534
|
+
inset: 0;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.ds-ai-button__summary-actions {
|
|
538
|
+
display: flex;
|
|
539
|
+
flex-direction: column;
|
|
540
|
+
align-items: flex-start;
|
|
541
|
+
gap: var(--gap-200);
|
|
542
|
+
margin-top: var(--gap-100);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
@media (prefers-reduced-motion: reduce) {
|
|
546
|
+
.ds-ai-button-host--open .ds-ai-button,
|
|
547
|
+
.ds-ai-button-host--open .ds-ai-button__summary,
|
|
548
|
+
.ds-ai-button-host--open .ds-ai-button__summary::before,
|
|
549
|
+
.ds-ai-button-host--open .ds-ai-button__summary-meta,
|
|
550
|
+
.ds-ai-button-host--open .ds-ai-button__summary-title,
|
|
551
|
+
.ds-ai-button-host--open .ds-ai-button__summary-text,
|
|
552
|
+
.ds-ai-button-host--open .ds-ai-button__summary-actions {
|
|
553
|
+
animation: none;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.ds-ai-button__summary {
|
|
557
|
+
transition: none;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PromptSuggestion } from '../PromptSuggestions/PromptSuggestions';
|
|
3
|
+
/** The content of AiButton's summary panel. */
|
|
4
|
+
export interface AiButtonSummary {
|
|
5
|
+
/** Overline label above the title. */
|
|
6
|
+
overline?: string;
|
|
7
|
+
/** Title line — usually the page or subject being summarized. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Small caption beside the overline, e.g. a reading time. */
|
|
10
|
+
caption?: string;
|
|
11
|
+
/** The pre-written summary the panel reveals. */
|
|
12
|
+
text: string;
|
|
13
|
+
/** Prompt chips under the summary; a tap reports through `onSummarySuggestion`. */
|
|
14
|
+
suggestions?: PromptSuggestion[];
|
|
15
|
+
}
|
|
16
|
+
/** Props owned by AiButton itself — everything else falls through to the DOM node. */
|
|
17
|
+
type AiButtonOwnProps = {
|
|
18
|
+
/** Button text content */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Leading icon — Material Symbol name (string) or custom element (ReactNode) */
|
|
21
|
+
icon?: string | React.ReactNode;
|
|
22
|
+
/** Button size */
|
|
23
|
+
size?: 'default' | 'compact';
|
|
24
|
+
/** Whether the button is disabled */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Optional href — renders as <a> instead of <button> */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** Optional target attribute for links */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** Optional rel attribute for links */
|
|
31
|
+
rel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A TLDR panel the button can summon: overline, title, a pre-written
|
|
34
|
+
* summary revealed through a skeleton beat and a typed stream (once per
|
|
35
|
+
* mount — later openings show it instantly, as if cached), and optional
|
|
36
|
+
* prompt chips. Hovering the button opens it after the standard hover
|
|
37
|
+
* delay; the pointer keeps it alive anywhere over the button or panel,
|
|
38
|
+
* and it hides a grace period after leaving both. Omit for the plain
|
|
39
|
+
* button.
|
|
40
|
+
*/
|
|
41
|
+
summary?: AiButtonSummary;
|
|
42
|
+
/** Which side of the button the summary panel opens on. */
|
|
43
|
+
summaryPlacement?: 'top' | 'bottom';
|
|
44
|
+
/**
|
|
45
|
+
* Holds the summary panel open regardless of hover — for callers that
|
|
46
|
+
* reveal it on their own signal (scroll depth, dwell). Hover mechanics
|
|
47
|
+
* still run when it flips back off.
|
|
48
|
+
*/
|
|
49
|
+
summaryPinned?: boolean;
|
|
50
|
+
/** Fires when the panel's dismiss button is pressed. The panel closes itself either way; hovering away and back re-summons it. */
|
|
51
|
+
onSummaryDismiss?: () => void;
|
|
52
|
+
/** Fires with the tapped summary suggestion's `id`. */
|
|
53
|
+
onSummarySuggestion?: (id: string) => void;
|
|
54
|
+
/** Additional CSS classes */
|
|
55
|
+
className?: string;
|
|
56
|
+
};
|
|
57
|
+
export interface AiButtonProps extends AiButtonOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof AiButtonOwnProps | 'type'> {
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The AI entry point. Icon and label on a solid field pushed past the page
|
|
61
|
+
* floor (`--color-ai-button-bg` — bright white in light, true black in dark),
|
|
62
|
+
* ringed by the AI gradient (`--color-ai-gradient-*`) rotating slowly, with a
|
|
63
|
+
* soft glow of the same gradient haloing the edge. The treatment is the design system's signal
|
|
64
|
+
* for "a model answers here": ordinary actions keep the flat action teal,
|
|
65
|
+
* and this ring is reserved for AI surfaces so neither affordance dilutes
|
|
66
|
+
* the other.
|
|
67
|
+
*
|
|
68
|
+
* With `summary`, the button can also summon a TLDR panel — a glass card
|
|
69
|
+
* that opens above (or below) it on hover or when pinned, fakes a one-time
|
|
70
|
+
* generation beat (skeleton, then a typed reveal), and offers prompt chips.
|
|
71
|
+
* The panel and button share one hover zone, and the gradient sweeps once
|
|
72
|
+
* around the panel's border as it opens.
|
|
73
|
+
*
|
|
74
|
+
* Renders a `<button>`, or an `<a>` when `href` is supplied. Forwards a ref
|
|
75
|
+
* to whichever element it renders, and spreads unrecognised props onto it.
|
|
76
|
+
* The rotation pauses under `prefers-reduced-motion`; the ring and glow stay.
|
|
77
|
+
*/
|
|
78
|
+
export declare const AiButton: React.ForwardRefExoticComponent<AiButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
79
|
+
export {};
|