@lockin90/ui-native 0.0.0-stage → 1.0.1
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/lib/commonjs/components/Accordion.js +144 -0
- package/lib/commonjs/components/Accordion.js.map +1 -0
- package/lib/commonjs/components/AchievementBadge.js +225 -0
- package/lib/commonjs/components/AchievementBadge.js.map +1 -0
- package/lib/commonjs/components/Alert.js +232 -0
- package/lib/commonjs/components/Alert.js.map +1 -0
- package/lib/commonjs/components/AreaChart.js +506 -0
- package/lib/commonjs/components/AreaChart.js.map +1 -0
- package/lib/commonjs/components/AuroraBackground.js +267 -0
- package/lib/commonjs/components/AuroraBackground.js.map +1 -0
- package/lib/commonjs/components/Avatar.js +187 -0
- package/lib/commonjs/components/Avatar.js.map +1 -0
- package/lib/commonjs/components/AvatarStack.js +95 -0
- package/lib/commonjs/components/AvatarStack.js.map +1 -0
- package/lib/commonjs/components/BackLink.js +77 -0
- package/lib/commonjs/components/BackLink.js.map +1 -0
- package/lib/commonjs/components/Badge.js +136 -0
- package/lib/commonjs/components/Badge.js.map +1 -0
- package/lib/commonjs/components/BarChart.js +641 -0
- package/lib/commonjs/components/BarChart.js.map +1 -0
- package/lib/commonjs/components/BarFill.js +55 -0
- package/lib/commonjs/components/BarFill.js.map +1 -0
- package/lib/commonjs/components/BeeswarmChart.js +615 -0
- package/lib/commonjs/components/BeeswarmChart.js.map +1 -0
- package/lib/commonjs/components/BiomarkerRange.js +610 -0
- package/lib/commonjs/components/BiomarkerRange.js.map +1 -0
- package/lib/commonjs/components/BodyBattery.js +563 -0
- package/lib/commonjs/components/BodyBattery.js.map +1 -0
- package/lib/commonjs/components/BrandMark.js +184 -0
- package/lib/commonjs/components/BrandMark.js.map +1 -0
- package/lib/commonjs/components/BulletChart.js +406 -0
- package/lib/commonjs/components/BulletChart.js.map +1 -0
- package/lib/commonjs/components/Button.js +154 -0
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/CaffeineClock.js +491 -0
- package/lib/commonjs/components/CaffeineClock.js.map +1 -0
- package/lib/commonjs/components/Card.js +142 -0
- package/lib/commonjs/components/Card.js.map +1 -0
- package/lib/commonjs/components/CharCounter.js +106 -0
- package/lib/commonjs/components/CharCounter.js.map +1 -0
- package/lib/commonjs/components/ChartState.js +554 -0
- package/lib/commonjs/components/ChartState.js.map +1 -0
- package/lib/commonjs/components/Checkbox.js +180 -0
- package/lib/commonjs/components/Checkbox.js.map +1 -0
- package/lib/commonjs/components/Chip.js +218 -0
- package/lib/commonjs/components/Chip.js.map +1 -0
- package/lib/commonjs/components/ChoiceChip.js +133 -0
- package/lib/commonjs/components/ChoiceChip.js.map +1 -0
- package/lib/commonjs/components/CodeBlock.js +126 -0
- package/lib/commonjs/components/CodeBlock.js.map +1 -0
- package/lib/commonjs/components/CodeField.js +129 -0
- package/lib/commonjs/components/CodeField.js.map +1 -0
- package/lib/commonjs/components/ColorPicker.js +181 -0
- package/lib/commonjs/components/ColorPicker.js.map +1 -0
- package/lib/commonjs/components/ComboChart.js +419 -0
- package/lib/commonjs/components/ComboChart.js.map +1 -0
- package/lib/commonjs/components/Combobox.js +108 -0
- package/lib/commonjs/components/Combobox.js.map +1 -0
- package/lib/commonjs/components/CompareChart.js +627 -0
- package/lib/commonjs/components/CompareChart.js.map +1 -0
- package/lib/commonjs/components/CompositeChart.js +654 -0
- package/lib/commonjs/components/CompositeChart.js.map +1 -0
- package/lib/commonjs/components/Countdown.js +152 -0
- package/lib/commonjs/components/Countdown.js.map +1 -0
- package/lib/commonjs/components/CreditCardVisual.js +167 -0
- package/lib/commonjs/components/CreditCardVisual.js.map +1 -0
- package/lib/commonjs/components/DateField.js +365 -0
- package/lib/commonjs/components/DateField.js.map +1 -0
- package/lib/commonjs/components/DayTimelineBlocks.js +253 -0
- package/lib/commonjs/components/DayTimelineBlocks.js.map +1 -0
- package/lib/commonjs/components/DayWheel.js +467 -0
- package/lib/commonjs/components/DayWheel.js.map +1 -0
- package/lib/commonjs/components/DeltaPill.js +154 -0
- package/lib/commonjs/components/DeltaPill.js.map +1 -0
- package/lib/commonjs/components/DistributionChart.js +776 -0
- package/lib/commonjs/components/DistributionChart.js.map +1 -0
- package/lib/commonjs/components/Divider.js +74 -0
- package/lib/commonjs/components/Divider.js.map +1 -0
- package/lib/commonjs/components/DonutChart.js +337 -0
- package/lib/commonjs/components/DonutChart.js.map +1 -0
- package/lib/commonjs/components/DotsLoader.js +94 -0
- package/lib/commonjs/components/DotsLoader.js.map +1 -0
- package/lib/commonjs/components/EffectAttributionLine.js +105 -0
- package/lib/commonjs/components/EffectAttributionLine.js.map +1 -0
- package/lib/commonjs/components/EmptyState.js +120 -0
- package/lib/commonjs/components/EmptyState.js.map +1 -0
- package/lib/commonjs/components/EngagementBar.js +122 -0
- package/lib/commonjs/components/EngagementBar.js.map +1 -0
- package/lib/commonjs/components/EnvironmentChart.js +573 -0
- package/lib/commonjs/components/EnvironmentChart.js.map +1 -0
- package/lib/commonjs/components/Eyebrow.js +32 -0
- package/lib/commonjs/components/Eyebrow.js.map +1 -0
- package/lib/commonjs/components/FocalPointPicker.js +196 -0
- package/lib/commonjs/components/FocalPointPicker.js.map +1 -0
- package/lib/commonjs/components/FollowButton.js +95 -0
- package/lib/commonjs/components/FollowButton.js.map +1 -0
- package/lib/commonjs/components/ForecastCallout.js +116 -0
- package/lib/commonjs/components/ForecastCallout.js.map +1 -0
- package/lib/commonjs/components/FormField.js +204 -0
- package/lib/commonjs/components/FormField.js.map +1 -0
- package/lib/commonjs/components/FunnelChart.js +260 -0
- package/lib/commonjs/components/FunnelChart.js.map +1 -0
- package/lib/commonjs/components/Gauge.js +252 -0
- package/lib/commonjs/components/Gauge.js.map +1 -0
- package/lib/commonjs/components/GradientText.js +136 -0
- package/lib/commonjs/components/GradientText.js.map +1 -0
- package/lib/commonjs/components/Heatmap.js +419 -0
- package/lib/commonjs/components/Heatmap.js.map +1 -0
- package/lib/commonjs/components/Highlight.js +55 -0
- package/lib/commonjs/components/Highlight.js.map +1 -0
- package/lib/commonjs/components/Hypnogram.js +842 -0
- package/lib/commonjs/components/Hypnogram.js.map +1 -0
- package/lib/commonjs/components/Icon.js +486 -0
- package/lib/commonjs/components/Icon.js.map +1 -0
- package/lib/commonjs/components/Input.js +142 -0
- package/lib/commonjs/components/Input.js.map +1 -0
- package/lib/commonjs/components/InsightCard.js +119 -0
- package/lib/commonjs/components/InsightCard.js.map +1 -0
- package/lib/commonjs/components/KeyValue.js +93 -0
- package/lib/commonjs/components/KeyValue.js.map +1 -0
- package/lib/commonjs/components/LeaderboardRow.js +140 -0
- package/lib/commonjs/components/LeaderboardRow.js.map +1 -0
- package/lib/commonjs/components/LineChart.js +1544 -0
- package/lib/commonjs/components/LineChart.js.map +1 -0
- package/lib/commonjs/components/ListRow.js +122 -0
- package/lib/commonjs/components/ListRow.js.map +1 -0
- package/lib/commonjs/components/Menu.js +183 -0
- package/lib/commonjs/components/Menu.js.map +1 -0
- package/lib/commonjs/components/MessageBubble.js +117 -0
- package/lib/commonjs/components/MessageBubble.js.map +1 -0
- package/lib/commonjs/components/MessageComposer.js +212 -0
- package/lib/commonjs/components/MessageComposer.js.map +1 -0
- package/lib/commonjs/components/MetaphorWidget.js +1053 -0
- package/lib/commonjs/components/MetaphorWidget.js.map +1 -0
- package/lib/commonjs/components/Meter.js +173 -0
- package/lib/commonjs/components/Meter.js.map +1 -0
- package/lib/commonjs/components/MetricTile.js +268 -0
- package/lib/commonjs/components/MetricTile.js.map +1 -0
- package/lib/commonjs/components/MiniRing.js +30 -0
- package/lib/commonjs/components/MiniRing.js.map +1 -0
- package/lib/commonjs/components/Modal.js +153 -0
- package/lib/commonjs/components/Modal.js.map +1 -0
- package/lib/commonjs/components/MuscleDiagram.js +326 -0
- package/lib/commonjs/components/MuscleDiagram.js.map +1 -0
- package/lib/commonjs/components/NoteField.js +73 -0
- package/lib/commonjs/components/NoteField.js.map +1 -0
- package/lib/commonjs/components/NotificationRow.js +234 -0
- package/lib/commonjs/components/NotificationRow.js.map +1 -0
- package/lib/commonjs/components/Pagination.js +212 -0
- package/lib/commonjs/components/Pagination.js.map +1 -0
- package/lib/commonjs/components/PasswordInput.js +120 -0
- package/lib/commonjs/components/PasswordInput.js.map +1 -0
- package/lib/commonjs/components/PasswordStrengthMeter.js +108 -0
- package/lib/commonjs/components/PasswordStrengthMeter.js.map +1 -0
- package/lib/commonjs/components/PendingPatternCard.js +182 -0
- package/lib/commonjs/components/PendingPatternCard.js.map +1 -0
- package/lib/commonjs/components/PhaseWheel.js +704 -0
- package/lib/commonjs/components/PhaseWheel.js.map +1 -0
- package/lib/commonjs/components/PkChart.js +566 -0
- package/lib/commonjs/components/PkChart.js.map +1 -0
- package/lib/commonjs/components/Popover.js +234 -0
- package/lib/commonjs/components/Popover.js.map +1 -0
- package/lib/commonjs/components/PrBadge.js +71 -0
- package/lib/commonjs/components/PrBadge.js.map +1 -0
- package/lib/commonjs/components/PrCard.js +150 -0
- package/lib/commonjs/components/PrCard.js.map +1 -0
- package/lib/commonjs/components/PricingTierCard.js +237 -0
- package/lib/commonjs/components/PricingTierCard.js.map +1 -0
- package/lib/commonjs/components/ProGate.js +235 -0
- package/lib/commonjs/components/ProGate.js.map +1 -0
- package/lib/commonjs/components/ProgressBar.js +515 -0
- package/lib/commonjs/components/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/Pulse.js +36 -0
- package/lib/commonjs/components/Pulse.js.map +1 -0
- package/lib/commonjs/components/QRCode.js +519 -0
- package/lib/commonjs/components/QRCode.js.map +1 -0
- package/lib/commonjs/components/RadarChart.js +492 -0
- package/lib/commonjs/components/RadarChart.js.map +1 -0
- package/lib/commonjs/components/RangeBar.js +191 -0
- package/lib/commonjs/components/RangeBar.js.map +1 -0
- package/lib/commonjs/components/ReauthDialog.js +261 -0
- package/lib/commonjs/components/ReauthDialog.js.map +1 -0
- package/lib/commonjs/components/RestTimer.js +246 -0
- package/lib/commonjs/components/RestTimer.js.map +1 -0
- package/lib/commonjs/components/RichText.js +81 -0
- package/lib/commonjs/components/RichText.js.map +1 -0
- package/lib/commonjs/components/RichTextEditor.js +274 -0
- package/lib/commonjs/components/RichTextEditor.js.map +1 -0
- package/lib/commonjs/components/Ring.js +239 -0
- package/lib/commonjs/components/Ring.js.map +1 -0
- package/lib/commonjs/components/RoseChart.js +376 -0
- package/lib/commonjs/components/RoseChart.js.map +1 -0
- package/lib/commonjs/components/SankeyChart.js +652 -0
- package/lib/commonjs/components/SankeyChart.js.map +1 -0
- package/lib/commonjs/components/ScatterChart.js +432 -0
- package/lib/commonjs/components/ScatterChart.js.map +1 -0
- package/lib/commonjs/components/ScrollProgress.js +66 -0
- package/lib/commonjs/components/ScrollProgress.js.map +1 -0
- package/lib/commonjs/components/SectionDivider.js +59 -0
- package/lib/commonjs/components/SectionDivider.js.map +1 -0
- package/lib/commonjs/components/SectionHeader.js +53 -0
- package/lib/commonjs/components/SectionHeader.js.map +1 -0
- package/lib/commonjs/components/SegmentedTabs.js +336 -0
- package/lib/commonjs/components/SegmentedTabs.js.map +1 -0
- package/lib/commonjs/components/Select.js +380 -0
- package/lib/commonjs/components/Select.js.map +1 -0
- package/lib/commonjs/components/SessionBanner.js +220 -0
- package/lib/commonjs/components/SessionBanner.js.map +1 -0
- package/lib/commonjs/components/SessionChart.js +1046 -0
- package/lib/commonjs/components/SessionChart.js.map +1 -0
- package/lib/commonjs/components/SetTable.js +351 -0
- package/lib/commonjs/components/SetTable.js.map +1 -0
- package/lib/commonjs/components/ShareCard.js +227 -0
- package/lib/commonjs/components/ShareCard.js.map +1 -0
- package/lib/commonjs/components/Sheet.js +220 -0
- package/lib/commonjs/components/Sheet.js.map +1 -0
- package/lib/commonjs/components/Skeleton.js +28 -0
- package/lib/commonjs/components/Skeleton.js.map +1 -0
- package/lib/commonjs/components/Slider.js +173 -0
- package/lib/commonjs/components/Slider.js.map +1 -0
- package/lib/commonjs/components/Sortable.js +230 -0
- package/lib/commonjs/components/Sortable.js.map +1 -0
- package/lib/commonjs/components/SourceChip.js +111 -0
- package/lib/commonjs/components/SourceChip.js.map +1 -0
- package/lib/commonjs/components/Sparkline.js +110 -0
- package/lib/commonjs/components/Sparkline.js.map +1 -0
- package/lib/commonjs/components/Spinner.js +132 -0
- package/lib/commonjs/components/Spinner.js.map +1 -0
- package/lib/commonjs/components/SplitButton.js +158 -0
- package/lib/commonjs/components/SplitButton.js.map +1 -0
- package/lib/commonjs/components/SsoButton.js +109 -0
- package/lib/commonjs/components/SsoButton.js.map +1 -0
- package/lib/commonjs/components/StackedBar.js +133 -0
- package/lib/commonjs/components/StackedBar.js.map +1 -0
- package/lib/commonjs/components/Stat.js +167 -0
- package/lib/commonjs/components/Stat.js.map +1 -0
- package/lib/commonjs/components/StatTile.js +644 -0
- package/lib/commonjs/components/StatTile.js.map +1 -0
- package/lib/commonjs/components/StateLabel.js +73 -0
- package/lib/commonjs/components/StateLabel.js.map +1 -0
- package/lib/commonjs/components/StatusDot.js +65 -0
- package/lib/commonjs/components/StatusDot.js.map +1 -0
- package/lib/commonjs/components/Stepper.js +355 -0
- package/lib/commonjs/components/Stepper.js.map +1 -0
- package/lib/commonjs/components/SupplementChart.js +1002 -0
- package/lib/commonjs/components/SupplementChart.js.map +1 -0
- package/lib/commonjs/components/TabBar.js +303 -0
- package/lib/commonjs/components/TabBar.js.map +1 -0
- package/lib/commonjs/components/Table.js +458 -0
- package/lib/commonjs/components/Table.js.map +1 -0
- package/lib/commonjs/components/Tabs.js +88 -0
- package/lib/commonjs/components/Tabs.js.map +1 -0
- package/lib/commonjs/components/TagCloud.js +118 -0
- package/lib/commonjs/components/TagCloud.js.map +1 -0
- package/lib/commonjs/components/TagInput.js +298 -0
- package/lib/commonjs/components/TagInput.js.map +1 -0
- package/lib/commonjs/components/TemplateCard.js +206 -0
- package/lib/commonjs/components/TemplateCard.js.map +1 -0
- package/lib/commonjs/components/Timeline.js +219 -0
- package/lib/commonjs/components/Timeline.js.map +1 -0
- package/lib/commonjs/components/TimelineChart.js +1228 -0
- package/lib/commonjs/components/TimelineChart.js.map +1 -0
- package/lib/commonjs/components/Toast.js +156 -0
- package/lib/commonjs/components/Toast.js.map +1 -0
- package/lib/commonjs/components/Toggle.js +166 -0
- package/lib/commonjs/components/Toggle.js.map +1 -0
- package/lib/commonjs/components/Toolbar.js +310 -0
- package/lib/commonjs/components/Toolbar.js.map +1 -0
- package/lib/commonjs/components/Tooltip.js +245 -0
- package/lib/commonjs/components/Tooltip.js.map +1 -0
- package/lib/commonjs/components/TypingIndicator.js +112 -0
- package/lib/commonjs/components/TypingIndicator.js.map +1 -0
- package/lib/commonjs/components/UnitChart.js +482 -0
- package/lib/commonjs/components/UnitChart.js.map +1 -0
- package/lib/commonjs/components/VersionBadge.js +133 -0
- package/lib/commonjs/components/VersionBadge.js.map +1 -0
- package/lib/commonjs/components/VideoThumbnail.js +152 -0
- package/lib/commonjs/components/VideoThumbnail.js.map +1 -0
- package/lib/commonjs/components/VitalsStrip.js +766 -0
- package/lib/commonjs/components/VitalsStrip.js.map +1 -0
- package/lib/commonjs/components/WatchComplication.js +563 -0
- package/lib/commonjs/components/WatchComplication.js.map +1 -0
- package/lib/commonjs/components/ZoneBar.js +149 -0
- package/lib/commonjs/components/ZoneBar.js.map +1 -0
- package/lib/commonjs/components/ZonePyramid.js +398 -0
- package/lib/commonjs/components/ZonePyramid.js.map +1 -0
- package/lib/commonjs/index.js +1140 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal/optionalBlur.js +34 -0
- package/lib/commonjs/internal/optionalBlur.js.map +1 -0
- package/lib/commonjs/internal/optionalHaptics.js +40 -0
- package/lib/commonjs/internal/optionalHaptics.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme.js +73 -0
- package/lib/commonjs/theme.js.map +1 -0
- package/lib/module/components/Accordion.js +139 -0
- package/lib/module/components/Accordion.js.map +1 -0
- package/lib/module/components/AchievementBadge.js +223 -0
- package/lib/module/components/AchievementBadge.js.map +1 -0
- package/lib/module/components/Alert.js +227 -0
- package/lib/module/components/Alert.js.map +1 -0
- package/lib/module/components/AreaChart.js +501 -0
- package/lib/module/components/AreaChart.js.map +1 -0
- package/lib/module/components/AuroraBackground.js +262 -0
- package/lib/module/components/AuroraBackground.js.map +1 -0
- package/lib/module/components/Avatar.js +183 -0
- package/lib/module/components/Avatar.js.map +1 -0
- package/lib/module/components/AvatarStack.js +91 -0
- package/lib/module/components/AvatarStack.js.map +1 -0
- package/lib/module/components/BackLink.js +73 -0
- package/lib/module/components/BackLink.js.map +1 -0
- package/lib/module/components/Badge.js +132 -0
- package/lib/module/components/Badge.js.map +1 -0
- package/lib/module/components/BarChart.js +636 -0
- package/lib/module/components/BarChart.js.map +1 -0
- package/lib/module/components/BarFill.js +51 -0
- package/lib/module/components/BarFill.js.map +1 -0
- package/lib/module/components/BeeswarmChart.js +610 -0
- package/lib/module/components/BeeswarmChart.js.map +1 -0
- package/lib/module/components/BiomarkerRange.js +605 -0
- package/lib/module/components/BiomarkerRange.js.map +1 -0
- package/lib/module/components/BodyBattery.js +558 -0
- package/lib/module/components/BodyBattery.js.map +1 -0
- package/lib/module/components/BrandMark.js +179 -0
- package/lib/module/components/BrandMark.js.map +1 -0
- package/lib/module/components/BulletChart.js +401 -0
- package/lib/module/components/BulletChart.js.map +1 -0
- package/lib/module/components/Button.js +150 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/CaffeineClock.js +486 -0
- package/lib/module/components/CaffeineClock.js.map +1 -0
- package/lib/module/components/Card.js +138 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/CharCounter.js +102 -0
- package/lib/module/components/CharCounter.js.map +1 -0
- package/lib/module/components/ChartState.js +549 -0
- package/lib/module/components/ChartState.js.map +1 -0
- package/lib/module/components/Checkbox.js +175 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/Chip.js +214 -0
- package/lib/module/components/Chip.js.map +1 -0
- package/lib/module/components/ChoiceChip.js +129 -0
- package/lib/module/components/ChoiceChip.js.map +1 -0
- package/lib/module/components/CodeBlock.js +122 -0
- package/lib/module/components/CodeBlock.js.map +1 -0
- package/lib/module/components/CodeField.js +125 -0
- package/lib/module/components/CodeField.js.map +1 -0
- package/lib/module/components/ColorPicker.js +177 -0
- package/lib/module/components/ColorPicker.js.map +1 -0
- package/lib/module/components/ComboChart.js +414 -0
- package/lib/module/components/ComboChart.js.map +1 -0
- package/lib/module/components/Combobox.js +104 -0
- package/lib/module/components/Combobox.js.map +1 -0
- package/lib/module/components/CompareChart.js +622 -0
- package/lib/module/components/CompareChart.js.map +1 -0
- package/lib/module/components/CompositeChart.js +649 -0
- package/lib/module/components/CompositeChart.js.map +1 -0
- package/lib/module/components/Countdown.js +148 -0
- package/lib/module/components/Countdown.js.map +1 -0
- package/lib/module/components/CreditCardVisual.js +163 -0
- package/lib/module/components/CreditCardVisual.js.map +1 -0
- package/lib/module/components/DateField.js +361 -0
- package/lib/module/components/DateField.js.map +1 -0
- package/lib/module/components/DayTimelineBlocks.js +249 -0
- package/lib/module/components/DayTimelineBlocks.js.map +1 -0
- package/lib/module/components/DayWheel.js +462 -0
- package/lib/module/components/DayWheel.js.map +1 -0
- package/lib/module/components/DeltaPill.js +149 -0
- package/lib/module/components/DeltaPill.js.map +1 -0
- package/lib/module/components/DistributionChart.js +771 -0
- package/lib/module/components/DistributionChart.js.map +1 -0
- package/lib/module/components/Divider.js +70 -0
- package/lib/module/components/Divider.js.map +1 -0
- package/lib/module/components/DonutChart.js +332 -0
- package/lib/module/components/DonutChart.js.map +1 -0
- package/lib/module/components/DotsLoader.js +90 -0
- package/lib/module/components/DotsLoader.js.map +1 -0
- package/lib/module/components/EffectAttributionLine.js +101 -0
- package/lib/module/components/EffectAttributionLine.js.map +1 -0
- package/lib/module/components/EmptyState.js +115 -0
- package/lib/module/components/EmptyState.js.map +1 -0
- package/lib/module/components/EngagementBar.js +118 -0
- package/lib/module/components/EngagementBar.js.map +1 -0
- package/lib/module/components/EnvironmentChart.js +568 -0
- package/lib/module/components/EnvironmentChart.js.map +1 -0
- package/lib/module/components/Eyebrow.js +28 -0
- package/lib/module/components/Eyebrow.js.map +1 -0
- package/lib/module/components/FocalPointPicker.js +192 -0
- package/lib/module/components/FocalPointPicker.js.map +1 -0
- package/lib/module/components/FollowButton.js +91 -0
- package/lib/module/components/FollowButton.js.map +1 -0
- package/lib/module/components/ForecastCallout.js +112 -0
- package/lib/module/components/ForecastCallout.js.map +1 -0
- package/lib/module/components/FormField.js +198 -0
- package/lib/module/components/FormField.js.map +1 -0
- package/lib/module/components/FunnelChart.js +255 -0
- package/lib/module/components/FunnelChart.js.map +1 -0
- package/lib/module/components/Gauge.js +249 -0
- package/lib/module/components/Gauge.js.map +1 -0
- package/lib/module/components/GradientText.js +130 -0
- package/lib/module/components/GradientText.js.map +1 -0
- package/lib/module/components/Heatmap.js +414 -0
- package/lib/module/components/Heatmap.js.map +1 -0
- package/lib/module/components/Highlight.js +51 -0
- package/lib/module/components/Highlight.js.map +1 -0
- package/lib/module/components/Hypnogram.js +837 -0
- package/lib/module/components/Hypnogram.js.map +1 -0
- package/lib/module/components/Icon.js +480 -0
- package/lib/module/components/Icon.js.map +1 -0
- package/lib/module/components/Input.js +138 -0
- package/lib/module/components/Input.js.map +1 -0
- package/lib/module/components/InsightCard.js +115 -0
- package/lib/module/components/InsightCard.js.map +1 -0
- package/lib/module/components/KeyValue.js +89 -0
- package/lib/module/components/KeyValue.js.map +1 -0
- package/lib/module/components/LeaderboardRow.js +136 -0
- package/lib/module/components/LeaderboardRow.js.map +1 -0
- package/lib/module/components/LineChart.js +1539 -0
- package/lib/module/components/LineChart.js.map +1 -0
- package/lib/module/components/ListRow.js +118 -0
- package/lib/module/components/ListRow.js.map +1 -0
- package/lib/module/components/Menu.js +179 -0
- package/lib/module/components/Menu.js.map +1 -0
- package/lib/module/components/MessageBubble.js +113 -0
- package/lib/module/components/MessageBubble.js.map +1 -0
- package/lib/module/components/MessageComposer.js +208 -0
- package/lib/module/components/MessageComposer.js.map +1 -0
- package/lib/module/components/MetaphorWidget.js +1048 -0
- package/lib/module/components/MetaphorWidget.js.map +1 -0
- package/lib/module/components/Meter.js +169 -0
- package/lib/module/components/Meter.js.map +1 -0
- package/lib/module/components/MetricTile.js +263 -0
- package/lib/module/components/MetricTile.js.map +1 -0
- package/lib/module/components/MiniRing.js +26 -0
- package/lib/module/components/MiniRing.js.map +1 -0
- package/lib/module/components/Modal.js +148 -0
- package/lib/module/components/Modal.js.map +1 -0
- package/lib/module/components/MuscleDiagram.js +321 -0
- package/lib/module/components/MuscleDiagram.js.map +1 -0
- package/lib/module/components/NoteField.js +69 -0
- package/lib/module/components/NoteField.js.map +1 -0
- package/lib/module/components/NotificationRow.js +230 -0
- package/lib/module/components/NotificationRow.js.map +1 -0
- package/lib/module/components/Pagination.js +207 -0
- package/lib/module/components/Pagination.js.map +1 -0
- package/lib/module/components/PasswordInput.js +116 -0
- package/lib/module/components/PasswordInput.js.map +1 -0
- package/lib/module/components/PasswordStrengthMeter.js +104 -0
- package/lib/module/components/PasswordStrengthMeter.js.map +1 -0
- package/lib/module/components/PendingPatternCard.js +178 -0
- package/lib/module/components/PendingPatternCard.js.map +1 -0
- package/lib/module/components/PhaseWheel.js +699 -0
- package/lib/module/components/PhaseWheel.js.map +1 -0
- package/lib/module/components/PkChart.js +558 -0
- package/lib/module/components/PkChart.js.map +1 -0
- package/lib/module/components/Popover.js +230 -0
- package/lib/module/components/Popover.js.map +1 -0
- package/lib/module/components/PrBadge.js +66 -0
- package/lib/module/components/PrBadge.js.map +1 -0
- package/lib/module/components/PrCard.js +146 -0
- package/lib/module/components/PrCard.js.map +1 -0
- package/lib/module/components/PricingTierCard.js +233 -0
- package/lib/module/components/PricingTierCard.js.map +1 -0
- package/lib/module/components/ProGate.js +229 -0
- package/lib/module/components/ProGate.js.map +1 -0
- package/lib/module/components/ProgressBar.js +511 -0
- package/lib/module/components/ProgressBar.js.map +1 -0
- package/lib/module/components/Pulse.js +32 -0
- package/lib/module/components/Pulse.js.map +1 -0
- package/lib/module/components/QRCode.js +514 -0
- package/lib/module/components/QRCode.js.map +1 -0
- package/lib/module/components/RadarChart.js +487 -0
- package/lib/module/components/RadarChart.js.map +1 -0
- package/lib/module/components/RangeBar.js +187 -0
- package/lib/module/components/RangeBar.js.map +1 -0
- package/lib/module/components/ReauthDialog.js +256 -0
- package/lib/module/components/ReauthDialog.js.map +1 -0
- package/lib/module/components/RestTimer.js +239 -0
- package/lib/module/components/RestTimer.js.map +1 -0
- package/lib/module/components/RichText.js +77 -0
- package/lib/module/components/RichText.js.map +1 -0
- package/lib/module/components/RichTextEditor.js +269 -0
- package/lib/module/components/RichTextEditor.js.map +1 -0
- package/lib/module/components/Ring.js +236 -0
- package/lib/module/components/Ring.js.map +1 -0
- package/lib/module/components/RoseChart.js +371 -0
- package/lib/module/components/RoseChart.js.map +1 -0
- package/lib/module/components/SankeyChart.js +647 -0
- package/lib/module/components/SankeyChart.js.map +1 -0
- package/lib/module/components/ScatterChart.js +427 -0
- package/lib/module/components/ScatterChart.js.map +1 -0
- package/lib/module/components/ScrollProgress.js +62 -0
- package/lib/module/components/ScrollProgress.js.map +1 -0
- package/lib/module/components/SectionDivider.js +55 -0
- package/lib/module/components/SectionDivider.js.map +1 -0
- package/lib/module/components/SectionHeader.js +49 -0
- package/lib/module/components/SectionHeader.js.map +1 -0
- package/lib/module/components/SegmentedTabs.js +332 -0
- package/lib/module/components/SegmentedTabs.js.map +1 -0
- package/lib/module/components/Select.js +375 -0
- package/lib/module/components/Select.js.map +1 -0
- package/lib/module/components/SessionBanner.js +216 -0
- package/lib/module/components/SessionBanner.js.map +1 -0
- package/lib/module/components/SessionChart.js +1040 -0
- package/lib/module/components/SessionChart.js.map +1 -0
- package/lib/module/components/SetTable.js +345 -0
- package/lib/module/components/SetTable.js.map +1 -0
- package/lib/module/components/ShareCard.js +223 -0
- package/lib/module/components/ShareCard.js.map +1 -0
- package/lib/module/components/Sheet.js +216 -0
- package/lib/module/components/Sheet.js.map +1 -0
- package/lib/module/components/Skeleton.js +24 -0
- package/lib/module/components/Skeleton.js.map +1 -0
- package/lib/module/components/Slider.js +169 -0
- package/lib/module/components/Slider.js.map +1 -0
- package/lib/module/components/Sortable.js +226 -0
- package/lib/module/components/Sortable.js.map +1 -0
- package/lib/module/components/SourceChip.js +107 -0
- package/lib/module/components/SourceChip.js.map +1 -0
- package/lib/module/components/Sparkline.js +105 -0
- package/lib/module/components/Sparkline.js.map +1 -0
- package/lib/module/components/Spinner.js +127 -0
- package/lib/module/components/Spinner.js.map +1 -0
- package/lib/module/components/SplitButton.js +154 -0
- package/lib/module/components/SplitButton.js.map +1 -0
- package/lib/module/components/SsoButton.js +104 -0
- package/lib/module/components/SsoButton.js.map +1 -0
- package/lib/module/components/StackedBar.js +129 -0
- package/lib/module/components/StackedBar.js.map +1 -0
- package/lib/module/components/Stat.js +163 -0
- package/lib/module/components/Stat.js.map +1 -0
- package/lib/module/components/StatTile.js +639 -0
- package/lib/module/components/StatTile.js.map +1 -0
- package/lib/module/components/StateLabel.js +69 -0
- package/lib/module/components/StateLabel.js.map +1 -0
- package/lib/module/components/StatusDot.js +61 -0
- package/lib/module/components/StatusDot.js.map +1 -0
- package/lib/module/components/Stepper.js +350 -0
- package/lib/module/components/Stepper.js.map +1 -0
- package/lib/module/components/SupplementChart.js +997 -0
- package/lib/module/components/SupplementChart.js.map +1 -0
- package/lib/module/components/TabBar.js +298 -0
- package/lib/module/components/TabBar.js.map +1 -0
- package/lib/module/components/Table.js +452 -0
- package/lib/module/components/Table.js.map +1 -0
- package/lib/module/components/Tabs.js +84 -0
- package/lib/module/components/Tabs.js.map +1 -0
- package/lib/module/components/TagCloud.js +113 -0
- package/lib/module/components/TagCloud.js.map +1 -0
- package/lib/module/components/TagInput.js +291 -0
- package/lib/module/components/TagInput.js.map +1 -0
- package/lib/module/components/TemplateCard.js +202 -0
- package/lib/module/components/TemplateCard.js.map +1 -0
- package/lib/module/components/Timeline.js +214 -0
- package/lib/module/components/Timeline.js.map +1 -0
- package/lib/module/components/TimelineChart.js +1223 -0
- package/lib/module/components/TimelineChart.js.map +1 -0
- package/lib/module/components/Toast.js +151 -0
- package/lib/module/components/Toast.js.map +1 -0
- package/lib/module/components/Toggle.js +162 -0
- package/lib/module/components/Toggle.js.map +1 -0
- package/lib/module/components/Toolbar.js +306 -0
- package/lib/module/components/Toolbar.js.map +1 -0
- package/lib/module/components/Tooltip.js +241 -0
- package/lib/module/components/Tooltip.js.map +1 -0
- package/lib/module/components/TypingIndicator.js +108 -0
- package/lib/module/components/TypingIndicator.js.map +1 -0
- package/lib/module/components/UnitChart.js +477 -0
- package/lib/module/components/UnitChart.js.map +1 -0
- package/lib/module/components/VersionBadge.js +129 -0
- package/lib/module/components/VersionBadge.js.map +1 -0
- package/lib/module/components/VideoThumbnail.js +147 -0
- package/lib/module/components/VideoThumbnail.js.map +1 -0
- package/lib/module/components/VitalsStrip.js +761 -0
- package/lib/module/components/VitalsStrip.js.map +1 -0
- package/lib/module/components/WatchComplication.js +558 -0
- package/lib/module/components/WatchComplication.js.map +1 -0
- package/lib/module/components/ZoneBar.js +145 -0
- package/lib/module/components/ZoneBar.js.map +1 -0
- package/lib/module/components/ZonePyramid.js +393 -0
- package/lib/module/components/ZonePyramid.js.map +1 -0
- package/lib/module/index.js +166 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/optionalBlur.js +30 -0
- package/lib/module/internal/optionalBlur.js.map +1 -0
- package/lib/module/internal/optionalHaptics.js +34 -0
- package/lib/module/internal/optionalHaptics.js.map +1 -0
- package/lib/module/theme.js +6 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/typescript/components/Accordion.d.ts +20 -0
- package/lib/typescript/components/Accordion.d.ts.map +1 -0
- package/lib/typescript/components/AchievementBadge.d.ts +29 -0
- package/lib/typescript/components/AchievementBadge.d.ts.map +1 -0
- package/lib/typescript/components/Alert.d.ts +18 -0
- package/lib/typescript/components/Alert.d.ts.map +1 -0
- package/lib/typescript/components/AreaChart.d.ts +58 -0
- package/lib/typescript/components/AreaChart.d.ts.map +1 -0
- package/lib/typescript/components/AuroraBackground.d.ts +24 -0
- package/lib/typescript/components/AuroraBackground.d.ts.map +1 -0
- package/lib/typescript/components/Avatar.d.ts +38 -0
- package/lib/typescript/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/components/AvatarStack.d.ts +26 -0
- package/lib/typescript/components/AvatarStack.d.ts.map +1 -0
- package/lib/typescript/components/BackLink.d.ts +20 -0
- package/lib/typescript/components/BackLink.d.ts.map +1 -0
- package/lib/typescript/components/Badge.d.ts +12 -0
- package/lib/typescript/components/Badge.d.ts.map +1 -0
- package/lib/typescript/components/BarChart.d.ts +83 -0
- package/lib/typescript/components/BarChart.d.ts.map +1 -0
- package/lib/typescript/components/BarFill.d.ts +15 -0
- package/lib/typescript/components/BarFill.d.ts.map +1 -0
- package/lib/typescript/components/BeeswarmChart.d.ts +71 -0
- package/lib/typescript/components/BeeswarmChart.d.ts.map +1 -0
- package/lib/typescript/components/BiomarkerRange.d.ts +64 -0
- package/lib/typescript/components/BiomarkerRange.d.ts.map +1 -0
- package/lib/typescript/components/BodyBattery.d.ts +70 -0
- package/lib/typescript/components/BodyBattery.d.ts.map +1 -0
- package/lib/typescript/components/BrandMark.d.ts +10 -0
- package/lib/typescript/components/BrandMark.d.ts.map +1 -0
- package/lib/typescript/components/BulletChart.d.ts +61 -0
- package/lib/typescript/components/BulletChart.d.ts.map +1 -0
- package/lib/typescript/components/Button.d.ts +27 -0
- package/lib/typescript/components/Button.d.ts.map +1 -0
- package/lib/typescript/components/CaffeineClock.d.ts +64 -0
- package/lib/typescript/components/CaffeineClock.d.ts.map +1 -0
- package/lib/typescript/components/Card.d.ts +23 -0
- package/lib/typescript/components/Card.d.ts.map +1 -0
- package/lib/typescript/components/CharCounter.d.ts +30 -0
- package/lib/typescript/components/CharCounter.d.ts.map +1 -0
- package/lib/typescript/components/ChartState.d.ts +58 -0
- package/lib/typescript/components/ChartState.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox.d.ts +44 -0
- package/lib/typescript/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/components/Chip.d.ts +17 -0
- package/lib/typescript/components/Chip.d.ts.map +1 -0
- package/lib/typescript/components/ChoiceChip.d.ts +31 -0
- package/lib/typescript/components/ChoiceChip.d.ts.map +1 -0
- package/lib/typescript/components/CodeBlock.d.ts +18 -0
- package/lib/typescript/components/CodeBlock.d.ts.map +1 -0
- package/lib/typescript/components/CodeField.d.ts +22 -0
- package/lib/typescript/components/CodeField.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker.d.ts +20 -0
- package/lib/typescript/components/ColorPicker.d.ts.map +1 -0
- package/lib/typescript/components/ComboChart.d.ts +56 -0
- package/lib/typescript/components/ComboChart.d.ts.map +1 -0
- package/lib/typescript/components/Combobox.d.ts +39 -0
- package/lib/typescript/components/Combobox.d.ts.map +1 -0
- package/lib/typescript/components/CompareChart.d.ts +80 -0
- package/lib/typescript/components/CompareChart.d.ts.map +1 -0
- package/lib/typescript/components/CompositeChart.d.ts +83 -0
- package/lib/typescript/components/CompositeChart.d.ts.map +1 -0
- package/lib/typescript/components/Countdown.d.ts +28 -0
- package/lib/typescript/components/Countdown.d.ts.map +1 -0
- package/lib/typescript/components/CreditCardVisual.d.ts +26 -0
- package/lib/typescript/components/CreditCardVisual.d.ts.map +1 -0
- package/lib/typescript/components/DateField.d.ts +39 -0
- package/lib/typescript/components/DateField.d.ts.map +1 -0
- package/lib/typescript/components/DayTimelineBlocks.d.ts +40 -0
- package/lib/typescript/components/DayTimelineBlocks.d.ts.map +1 -0
- package/lib/typescript/components/DayWheel.d.ts +70 -0
- package/lib/typescript/components/DayWheel.d.ts.map +1 -0
- package/lib/typescript/components/DeltaPill.d.ts +22 -0
- package/lib/typescript/components/DeltaPill.d.ts.map +1 -0
- package/lib/typescript/components/DistributionChart.d.ts +94 -0
- package/lib/typescript/components/DistributionChart.d.ts.map +1 -0
- package/lib/typescript/components/Divider.d.ts +16 -0
- package/lib/typescript/components/Divider.d.ts.map +1 -0
- package/lib/typescript/components/DonutChart.d.ts +70 -0
- package/lib/typescript/components/DonutChart.d.ts.map +1 -0
- package/lib/typescript/components/DotsLoader.d.ts +19 -0
- package/lib/typescript/components/DotsLoader.d.ts.map +1 -0
- package/lib/typescript/components/EffectAttributionLine.d.ts +24 -0
- package/lib/typescript/components/EffectAttributionLine.d.ts.map +1 -0
- package/lib/typescript/components/EmptyState.d.ts +17 -0
- package/lib/typescript/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/components/EngagementBar.d.ts +23 -0
- package/lib/typescript/components/EngagementBar.d.ts.map +1 -0
- package/lib/typescript/components/EnvironmentChart.d.ts +89 -0
- package/lib/typescript/components/EnvironmentChart.d.ts.map +1 -0
- package/lib/typescript/components/Eyebrow.d.ts +7 -0
- package/lib/typescript/components/Eyebrow.d.ts.map +1 -0
- package/lib/typescript/components/FocalPointPicker.d.ts +31 -0
- package/lib/typescript/components/FocalPointPicker.d.ts.map +1 -0
- package/lib/typescript/components/FollowButton.d.ts +21 -0
- package/lib/typescript/components/FollowButton.d.ts.map +1 -0
- package/lib/typescript/components/ForecastCallout.d.ts +21 -0
- package/lib/typescript/components/ForecastCallout.d.ts.map +1 -0
- package/lib/typescript/components/FormField.d.ts +32 -0
- package/lib/typescript/components/FormField.d.ts.map +1 -0
- package/lib/typescript/components/FunnelChart.d.ts +46 -0
- package/lib/typescript/components/FunnelChart.d.ts.map +1 -0
- package/lib/typescript/components/Gauge.d.ts +70 -0
- package/lib/typescript/components/Gauge.d.ts.map +1 -0
- package/lib/typescript/components/GradientText.d.ts +21 -0
- package/lib/typescript/components/GradientText.d.ts.map +1 -0
- package/lib/typescript/components/Heatmap.d.ts +87 -0
- package/lib/typescript/components/Heatmap.d.ts.map +1 -0
- package/lib/typescript/components/Highlight.d.ts +11 -0
- package/lib/typescript/components/Highlight.d.ts.map +1 -0
- package/lib/typescript/components/Hypnogram.d.ts +94 -0
- package/lib/typescript/components/Hypnogram.d.ts.map +1 -0
- package/lib/typescript/components/Icon.d.ts +30 -0
- package/lib/typescript/components/Icon.d.ts.map +1 -0
- package/lib/typescript/components/Input.d.ts +25 -0
- package/lib/typescript/components/Input.d.ts.map +1 -0
- package/lib/typescript/components/InsightCard.d.ts +37 -0
- package/lib/typescript/components/InsightCard.d.ts.map +1 -0
- package/lib/typescript/components/KeyValue.d.ts +18 -0
- package/lib/typescript/components/KeyValue.d.ts.map +1 -0
- package/lib/typescript/components/LeaderboardRow.d.ts +31 -0
- package/lib/typescript/components/LeaderboardRow.d.ts.map +1 -0
- package/lib/typescript/components/LineChart.d.ts +166 -0
- package/lib/typescript/components/LineChart.d.ts.map +1 -0
- package/lib/typescript/components/ListRow.d.ts +37 -0
- package/lib/typescript/components/ListRow.d.ts.map +1 -0
- package/lib/typescript/components/Menu.d.ts +28 -0
- package/lib/typescript/components/Menu.d.ts.map +1 -0
- package/lib/typescript/components/MessageBubble.d.ts +20 -0
- package/lib/typescript/components/MessageBubble.d.ts.map +1 -0
- package/lib/typescript/components/MessageComposer.d.ts +20 -0
- package/lib/typescript/components/MessageComposer.d.ts.map +1 -0
- package/lib/typescript/components/MetaphorWidget.d.ts +107 -0
- package/lib/typescript/components/MetaphorWidget.d.ts.map +1 -0
- package/lib/typescript/components/Meter.d.ts +34 -0
- package/lib/typescript/components/Meter.d.ts.map +1 -0
- package/lib/typescript/components/MetricTile.d.ts +43 -0
- package/lib/typescript/components/MetricTile.d.ts.map +1 -0
- package/lib/typescript/components/MiniRing.d.ts +9 -0
- package/lib/typescript/components/MiniRing.d.ts.map +1 -0
- package/lib/typescript/components/Modal.d.ts +19 -0
- package/lib/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/components/MuscleDiagram.d.ts +37 -0
- package/lib/typescript/components/MuscleDiagram.d.ts.map +1 -0
- package/lib/typescript/components/NoteField.d.ts +9 -0
- package/lib/typescript/components/NoteField.d.ts.map +1 -0
- package/lib/typescript/components/NotificationRow.d.ts +36 -0
- package/lib/typescript/components/NotificationRow.d.ts.map +1 -0
- package/lib/typescript/components/Pagination.d.ts +22 -0
- package/lib/typescript/components/Pagination.d.ts.map +1 -0
- package/lib/typescript/components/PasswordInput.d.ts +24 -0
- package/lib/typescript/components/PasswordInput.d.ts.map +1 -0
- package/lib/typescript/components/PasswordStrengthMeter.d.ts +18 -0
- package/lib/typescript/components/PasswordStrengthMeter.d.ts.map +1 -0
- package/lib/typescript/components/PendingPatternCard.d.ts +27 -0
- package/lib/typescript/components/PendingPatternCard.d.ts.map +1 -0
- package/lib/typescript/components/PhaseWheel.d.ts +103 -0
- package/lib/typescript/components/PhaseWheel.d.ts.map +1 -0
- package/lib/typescript/components/PkChart.d.ts +67 -0
- package/lib/typescript/components/PkChart.d.ts.map +1 -0
- package/lib/typescript/components/Popover.d.ts +27 -0
- package/lib/typescript/components/Popover.d.ts.map +1 -0
- package/lib/typescript/components/PrBadge.d.ts +21 -0
- package/lib/typescript/components/PrBadge.d.ts.map +1 -0
- package/lib/typescript/components/PrCard.d.ts +29 -0
- package/lib/typescript/components/PrCard.d.ts.map +1 -0
- package/lib/typescript/components/PricingTierCard.d.ts +46 -0
- package/lib/typescript/components/PricingTierCard.d.ts.map +1 -0
- package/lib/typescript/components/ProGate.d.ts +26 -0
- package/lib/typescript/components/ProGate.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar.d.ts +60 -0
- package/lib/typescript/components/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/components/Pulse.d.ts +8 -0
- package/lib/typescript/components/Pulse.d.ts.map +1 -0
- package/lib/typescript/components/QRCode.d.ts +17 -0
- package/lib/typescript/components/QRCode.d.ts.map +1 -0
- package/lib/typescript/components/RadarChart.d.ts +59 -0
- package/lib/typescript/components/RadarChart.d.ts.map +1 -0
- package/lib/typescript/components/RangeBar.d.ts +38 -0
- package/lib/typescript/components/RangeBar.d.ts.map +1 -0
- package/lib/typescript/components/ReauthDialog.d.ts +44 -0
- package/lib/typescript/components/ReauthDialog.d.ts.map +1 -0
- package/lib/typescript/components/RestTimer.d.ts +45 -0
- package/lib/typescript/components/RestTimer.d.ts.map +1 -0
- package/lib/typescript/components/RichText.d.ts +26 -0
- package/lib/typescript/components/RichText.d.ts.map +1 -0
- package/lib/typescript/components/RichTextEditor.d.ts +25 -0
- package/lib/typescript/components/RichTextEditor.d.ts.map +1 -0
- package/lib/typescript/components/Ring.d.ts +63 -0
- package/lib/typescript/components/Ring.d.ts.map +1 -0
- package/lib/typescript/components/RoseChart.d.ts +54 -0
- package/lib/typescript/components/RoseChart.d.ts.map +1 -0
- package/lib/typescript/components/SankeyChart.d.ts +93 -0
- package/lib/typescript/components/SankeyChart.d.ts.map +1 -0
- package/lib/typescript/components/ScatterChart.d.ts +59 -0
- package/lib/typescript/components/ScatterChart.d.ts.map +1 -0
- package/lib/typescript/components/ScrollProgress.d.ts +24 -0
- package/lib/typescript/components/ScrollProgress.d.ts.map +1 -0
- package/lib/typescript/components/SectionDivider.d.ts +18 -0
- package/lib/typescript/components/SectionDivider.d.ts.map +1 -0
- package/lib/typescript/components/SectionHeader.d.ts +18 -0
- package/lib/typescript/components/SectionHeader.d.ts.map +1 -0
- package/lib/typescript/components/SegmentedTabs.d.ts +85 -0
- package/lib/typescript/components/SegmentedTabs.d.ts.map +1 -0
- package/lib/typescript/components/Select.d.ts +47 -0
- package/lib/typescript/components/Select.d.ts.map +1 -0
- package/lib/typescript/components/SessionBanner.d.ts +45 -0
- package/lib/typescript/components/SessionBanner.d.ts.map +1 -0
- package/lib/typescript/components/SessionChart.d.ts +130 -0
- package/lib/typescript/components/SessionChart.d.ts.map +1 -0
- package/lib/typescript/components/SetTable.d.ts +58 -0
- package/lib/typescript/components/SetTable.d.ts.map +1 -0
- package/lib/typescript/components/ShareCard.d.ts +40 -0
- package/lib/typescript/components/ShareCard.d.ts.map +1 -0
- package/lib/typescript/components/Sheet.d.ts +22 -0
- package/lib/typescript/components/Sheet.d.ts.map +1 -0
- package/lib/typescript/components/Skeleton.d.ts +9 -0
- package/lib/typescript/components/Skeleton.d.ts.map +1 -0
- package/lib/typescript/components/Slider.d.ts +27 -0
- package/lib/typescript/components/Slider.d.ts.map +1 -0
- package/lib/typescript/components/Sortable.d.ts +25 -0
- package/lib/typescript/components/Sortable.d.ts.map +1 -0
- package/lib/typescript/components/SourceChip.d.ts +24 -0
- package/lib/typescript/components/SourceChip.d.ts.map +1 -0
- package/lib/typescript/components/Sparkline.d.ts +28 -0
- package/lib/typescript/components/Sparkline.d.ts.map +1 -0
- package/lib/typescript/components/Spinner.d.ts +23 -0
- package/lib/typescript/components/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/SplitButton.d.ts +21 -0
- package/lib/typescript/components/SplitButton.d.ts.map +1 -0
- package/lib/typescript/components/SsoButton.d.ts +10 -0
- package/lib/typescript/components/SsoButton.d.ts.map +1 -0
- package/lib/typescript/components/StackedBar.d.ts +32 -0
- package/lib/typescript/components/StackedBar.d.ts.map +1 -0
- package/lib/typescript/components/Stat.d.ts +33 -0
- package/lib/typescript/components/Stat.d.ts.map +1 -0
- package/lib/typescript/components/StatTile.d.ts +90 -0
- package/lib/typescript/components/StatTile.d.ts.map +1 -0
- package/lib/typescript/components/StateLabel.d.ts +12 -0
- package/lib/typescript/components/StateLabel.d.ts.map +1 -0
- package/lib/typescript/components/StatusDot.d.ts +13 -0
- package/lib/typescript/components/StatusDot.d.ts.map +1 -0
- package/lib/typescript/components/Stepper.d.ts +47 -0
- package/lib/typescript/components/Stepper.d.ts.map +1 -0
- package/lib/typescript/components/SupplementChart.d.ts +121 -0
- package/lib/typescript/components/SupplementChart.d.ts.map +1 -0
- package/lib/typescript/components/TabBar.d.ts +52 -0
- package/lib/typescript/components/TabBar.d.ts.map +1 -0
- package/lib/typescript/components/Table.d.ts +64 -0
- package/lib/typescript/components/Table.d.ts.map +1 -0
- package/lib/typescript/components/Tabs.d.ts +16 -0
- package/lib/typescript/components/Tabs.d.ts.map +1 -0
- package/lib/typescript/components/TagCloud.d.ts +31 -0
- package/lib/typescript/components/TagCloud.d.ts.map +1 -0
- package/lib/typescript/components/TagInput.d.ts +37 -0
- package/lib/typescript/components/TagInput.d.ts.map +1 -0
- package/lib/typescript/components/TemplateCard.d.ts +43 -0
- package/lib/typescript/components/TemplateCard.d.ts.map +1 -0
- package/lib/typescript/components/Timeline.d.ts +18 -0
- package/lib/typescript/components/Timeline.d.ts.map +1 -0
- package/lib/typescript/components/TimelineChart.d.ts +124 -0
- package/lib/typescript/components/TimelineChart.d.ts.map +1 -0
- package/lib/typescript/components/Toast.d.ts +18 -0
- package/lib/typescript/components/Toast.d.ts.map +1 -0
- package/lib/typescript/components/Toggle.d.ts +22 -0
- package/lib/typescript/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/components/Toolbar.d.ts +48 -0
- package/lib/typescript/components/Toolbar.d.ts.map +1 -0
- package/lib/typescript/components/Tooltip.d.ts +16 -0
- package/lib/typescript/components/Tooltip.d.ts.map +1 -0
- package/lib/typescript/components/TypingIndicator.d.ts +16 -0
- package/lib/typescript/components/TypingIndicator.d.ts.map +1 -0
- package/lib/typescript/components/UnitChart.d.ts +84 -0
- package/lib/typescript/components/UnitChart.d.ts.map +1 -0
- package/lib/typescript/components/VersionBadge.d.ts +17 -0
- package/lib/typescript/components/VersionBadge.d.ts.map +1 -0
- package/lib/typescript/components/VideoThumbnail.d.ts +24 -0
- package/lib/typescript/components/VideoThumbnail.d.ts.map +1 -0
- package/lib/typescript/components/VitalsStrip.d.ts +53 -0
- package/lib/typescript/components/VitalsStrip.d.ts.map +1 -0
- package/lib/typescript/components/WatchComplication.d.ts +84 -0
- package/lib/typescript/components/WatchComplication.d.ts.map +1 -0
- package/lib/typescript/components/ZoneBar.d.ts +33 -0
- package/lib/typescript/components/ZoneBar.d.ts.map +1 -0
- package/lib/typescript/components/ZonePyramid.d.ts +51 -0
- package/lib/typescript/components/ZonePyramid.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +288 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/internal/optionalBlur.d.ts +13 -0
- package/lib/typescript/internal/optionalBlur.d.ts.map +1 -0
- package/lib/typescript/internal/optionalHaptics.d.ts +7 -0
- package/lib/typescript/internal/optionalHaptics.d.ts.map +1 -0
- package/lib/typescript/theme.d.ts +5 -0
- package/lib/typescript/theme.d.ts.map +1 -0
- package/package.json +92 -3
- package/src/components/Accordion.tsx +130 -0
- package/src/components/AchievementBadge.tsx +217 -0
- package/src/components/Alert.tsx +149 -0
- package/src/components/AreaChart.tsx +546 -0
- package/src/components/AuroraBackground.tsx +198 -0
- package/src/components/Avatar.tsx +164 -0
- package/src/components/AvatarStack.tsx +94 -0
- package/src/components/BackLink.tsx +64 -0
- package/src/components/Badge.tsx +91 -0
- package/src/components/BarChart.tsx +643 -0
- package/src/components/BarFill.tsx +37 -0
- package/src/components/BeeswarmChart.tsx +567 -0
- package/src/components/BiomarkerRange.tsx +571 -0
- package/src/components/BodyBattery.tsx +551 -0
- package/src/components/BrandMark.tsx +107 -0
- package/src/components/BulletChart.tsx +433 -0
- package/src/components/Button.tsx +127 -0
- package/src/components/CaffeineClock.tsx +472 -0
- package/src/components/Card.tsx +139 -0
- package/src/components/CharCounter.tsx +113 -0
- package/src/components/ChartState.tsx +473 -0
- package/src/components/Checkbox.tsx +175 -0
- package/src/components/Chip.tsx +132 -0
- package/src/components/ChoiceChip.tsx +119 -0
- package/src/components/CodeBlock.tsx +106 -0
- package/src/components/CodeField.tsx +137 -0
- package/src/components/ColorPicker.tsx +169 -0
- package/src/components/ComboChart.tsx +476 -0
- package/src/components/Combobox.tsx +141 -0
- package/src/components/CompareChart.tsx +651 -0
- package/src/components/CompositeChart.tsx +609 -0
- package/src/components/Countdown.tsx +155 -0
- package/src/components/CreditCardVisual.tsx +151 -0
- package/src/components/DateField.tsx +346 -0
- package/src/components/DayTimelineBlocks.tsx +270 -0
- package/src/components/DayWheel.tsx +483 -0
- package/src/components/DeltaPill.tsx +114 -0
- package/src/components/DistributionChart.tsx +739 -0
- package/src/components/Divider.tsx +61 -0
- package/src/components/DonutChart.tsx +399 -0
- package/src/components/DotsLoader.tsx +74 -0
- package/src/components/EffectAttributionLine.tsx +82 -0
- package/src/components/EmptyState.tsx +108 -0
- package/src/components/EngagementBar.tsx +140 -0
- package/src/components/EnvironmentChart.tsx +522 -0
- package/src/components/Eyebrow.tsx +22 -0
- package/src/components/FocalPointPicker.tsx +193 -0
- package/src/components/FollowButton.tsx +78 -0
- package/src/components/ForecastCallout.tsx +100 -0
- package/src/components/FormField.tsx +217 -0
- package/src/components/FunnelChart.tsx +310 -0
- package/src/components/Gauge.tsx +329 -0
- package/src/components/GradientText.tsx +114 -0
- package/src/components/Heatmap.tsx +459 -0
- package/src/components/Highlight.tsx +36 -0
- package/src/components/Hypnogram.tsx +751 -0
- package/src/components/Icon.tsx +680 -0
- package/src/components/Input.tsx +125 -0
- package/src/components/InsightCard.tsx +130 -0
- package/src/components/KeyValue.tsx +83 -0
- package/src/components/LeaderboardRow.tsx +156 -0
- package/src/components/LineChart.tsx +1529 -0
- package/src/components/ListRow.tsx +153 -0
- package/src/components/Menu.tsx +156 -0
- package/src/components/MessageBubble.tsx +118 -0
- package/src/components/MessageComposer.tsx +202 -0
- package/src/components/MetaphorWidget.tsx +848 -0
- package/src/components/Meter.tsx +186 -0
- package/src/components/MetricTile.tsx +247 -0
- package/src/components/MiniRing.tsx +17 -0
- package/src/components/Modal.tsx +129 -0
- package/src/components/MuscleDiagram.tsx +319 -0
- package/src/components/NoteField.tsx +68 -0
- package/src/components/NotificationRow.tsx +230 -0
- package/src/components/Pagination.tsx +188 -0
- package/src/components/PasswordInput.tsx +111 -0
- package/src/components/PasswordStrengthMeter.tsx +104 -0
- package/src/components/PendingPatternCard.tsx +163 -0
- package/src/components/PhaseWheel.tsx +781 -0
- package/src/components/PkChart.tsx +539 -0
- package/src/components/Popover.tsx +206 -0
- package/src/components/PrBadge.tsx +51 -0
- package/src/components/PrCard.tsx +132 -0
- package/src/components/PricingTierCard.tsx +234 -0
- package/src/components/ProGate.tsx +194 -0
- package/src/components/ProgressBar.tsx +439 -0
- package/src/components/Pulse.tsx +17 -0
- package/src/components/QRCode.tsx +555 -0
- package/src/components/RadarChart.tsx +538 -0
- package/src/components/RangeBar.tsx +206 -0
- package/src/components/ReauthDialog.tsx +282 -0
- package/src/components/RestTimer.tsx +193 -0
- package/src/components/RichText.tsx +71 -0
- package/src/components/RichTextEditor.tsx +207 -0
- package/src/components/Ring.tsx +269 -0
- package/src/components/RoseChart.tsx +375 -0
- package/src/components/SankeyChart.tsx +687 -0
- package/src/components/ScatterChart.tsx +498 -0
- package/src/components/ScrollProgress.tsx +61 -0
- package/src/components/SectionDivider.tsx +51 -0
- package/src/components/SectionHeader.tsx +41 -0
- package/src/components/SegmentedTabs.tsx +389 -0
- package/src/components/Select.tsx +335 -0
- package/src/components/SessionBanner.tsx +195 -0
- package/src/components/SessionChart.tsx +917 -0
- package/src/components/SetTable.tsx +341 -0
- package/src/components/ShareCard.tsx +145 -0
- package/src/components/Sheet.tsx +212 -0
- package/src/components/Skeleton.tsx +13 -0
- package/src/components/Slider.tsx +187 -0
- package/src/components/Sortable.tsx +263 -0
- package/src/components/SourceChip.tsx +95 -0
- package/src/components/Sparkline.tsx +108 -0
- package/src/components/Spinner.tsx +128 -0
- package/src/components/SplitButton.tsx +111 -0
- package/src/components/SsoButton.tsx +93 -0
- package/src/components/StackedBar.tsx +138 -0
- package/src/components/Stat.tsx +118 -0
- package/src/components/StatTile.tsx +581 -0
- package/src/components/StateLabel.tsx +62 -0
- package/src/components/StatusDot.tsx +58 -0
- package/src/components/Stepper.tsx +359 -0
- package/src/components/SupplementChart.tsx +1044 -0
- package/src/components/TabBar.tsx +297 -0
- package/src/components/Table.tsx +448 -0
- package/src/components/Tabs.tsx +85 -0
- package/src/components/TagCloud.tsx +111 -0
- package/src/components/TagInput.tsx +325 -0
- package/src/components/TemplateCard.tsx +181 -0
- package/src/components/Timeline.tsx +132 -0
- package/src/components/TimelineChart.tsx +1035 -0
- package/src/components/Toast.tsx +138 -0
- package/src/components/Toggle.tsx +155 -0
- package/src/components/Toolbar.tsx +292 -0
- package/src/components/Tooltip.tsx +193 -0
- package/src/components/TypingIndicator.tsx +106 -0
- package/src/components/UnitChart.tsx +519 -0
- package/src/components/VersionBadge.tsx +129 -0
- package/src/components/VideoThumbnail.tsx +140 -0
- package/src/components/VitalsStrip.tsx +636 -0
- package/src/components/WatchComplication.tsx +536 -0
- package/src/components/ZoneBar.tsx +148 -0
- package/src/components/ZonePyramid.tsx +405 -0
- package/src/components/__tests__/Chip.test.tsx +33 -0
- package/src/components/__tests__/CodeInput.test.tsx +62 -0
- package/src/components/__tests__/DeltaPill.test.tsx +41 -0
- package/src/components/__tests__/GradientText.test.tsx +69 -0
- package/src/components/__tests__/Icon.test.tsx +61 -0
- package/src/components/__tests__/Input.test.tsx +30 -0
- package/src/components/__tests__/LineChart.test.tsx +62 -0
- package/src/components/__tests__/ListRow.test.tsx +28 -0
- package/src/components/__tests__/PkChart.test.tsx +47 -0
- package/src/components/__tests__/PrBadge.test.tsx +32 -0
- package/src/components/__tests__/PrCard.test.tsx +49 -0
- package/src/components/__tests__/RestTimer.test.tsx +94 -0
- package/src/components/__tests__/SegmentedTabs.test.tsx +58 -0
- package/src/components/__tests__/SessionBanner.test.tsx +96 -0
- package/src/components/__tests__/SetTable.test.tsx +105 -0
- package/src/components/__tests__/SourceChip.test.tsx +82 -0
- package/src/components/__tests__/SupplementChart.test.tsx +71 -0
- package/src/components/__tests__/Table.test.tsx +81 -0
- package/src/components/__tests__/TemplateCard.test.tsx +85 -0
- package/src/components/__tests__/Toggle.test.tsx +49 -0
- package/src/components/__tests__/UnitChart.test.tsx +44 -0
- package/src/components/__tests__/markup.ts +142 -0
- package/src/components/__tests__/react-dom-server.d.ts +11 -0
- package/src/index.ts +320 -0
- package/src/internal/optionalBlur.ts +37 -0
- package/src/internal/optionalHaptics.ts +38 -0
- package/src/theme.ts +26 -0
- package/README.md +0 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { View, Text, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
|
+
import { colors, fonts } from '@lockin90/tokens';
|
|
4
|
+
|
|
5
|
+
export interface DividerProps {
|
|
6
|
+
/** fade-to-transparent gradient rule (mirrors the web `gradient` variant) */
|
|
7
|
+
gradient?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Optional centered label — renders `hairline — label — hairline` (the
|
|
10
|
+
* "or continue with" pattern). Mirrors the web `label` variant.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Hairline divider. With `gradient`, the rule fades to transparent at both ends —
|
|
17
|
+
* the native analogue of web `linear-gradient(90deg, transparent, var(--border-2), transparent)`.
|
|
18
|
+
* With `label`, renders a flat hairline on each side of a centered label. */
|
|
19
|
+
export function Divider({ gradient, label, style }: DividerProps) {
|
|
20
|
+
if (label != null) {
|
|
21
|
+
return (
|
|
22
|
+
<View style={[styles.labelRow, style]}>
|
|
23
|
+
<View style={styles.labelLine} />
|
|
24
|
+
<Text style={styles.label}>{label}</Text>
|
|
25
|
+
<View style={styles.labelLine} />
|
|
26
|
+
</View>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (gradient) {
|
|
30
|
+
return (
|
|
31
|
+
<LinearGradient
|
|
32
|
+
colors={['transparent', colors.border2, 'transparent']}
|
|
33
|
+
start={{ x: 0, y: 0 }}
|
|
34
|
+
end={{ x: 1, y: 0 }}
|
|
35
|
+
style={[styles.line, style]}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
return <View style={[styles.line, styles.flat, style]} />;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
line: { height: 1 },
|
|
44
|
+
flat: { backgroundColor: colors.border },
|
|
45
|
+
labelRow: {
|
|
46
|
+
flexDirection: 'row',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
gap: 12,
|
|
49
|
+
},
|
|
50
|
+
labelLine: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
height: 1,
|
|
53
|
+
backgroundColor: colors.border,
|
|
54
|
+
},
|
|
55
|
+
label: {
|
|
56
|
+
flexShrink: 0,
|
|
57
|
+
fontFamily: fonts.ui,
|
|
58
|
+
fontSize: 12,
|
|
59
|
+
color: colors.textFaint,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { useId, type ReactNode } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import Svg, { Circle, Defs, FeGaussianBlur, Filter, G, Line, Path, Rect, Text as SvgText } from 'react-native-svg';
|
|
4
|
+
import { colors, fonts } from '@lockin90/tokens';
|
|
5
|
+
|
|
6
|
+
/** One arc of the donut, sized by its `value` share of the total. */
|
|
7
|
+
export interface DonutSegment {
|
|
8
|
+
/** the segment's value — sizes its arc relative to the sum of all values */
|
|
9
|
+
value: number;
|
|
10
|
+
/** the arc color — a hex/rgb color string */
|
|
11
|
+
color: string;
|
|
12
|
+
/** optional label (accessibility / external legends / `callouts` chip text) */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** per-segment opacity override (nested-arcs shades the outer breakdown by
|
|
15
|
+
* family, e.g. 1 / 0.68 / 0.42) */
|
|
16
|
+
opacity?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface DonutChartProps {
|
|
20
|
+
/** the donut segments, drawn clockwise from 12 o'clock */
|
|
21
|
+
segments?: DonutSegment[];
|
|
22
|
+
/** Catalog variant (pie-charts PC-01…PC-13). `donut` (default) keeps the
|
|
23
|
+
* legacy dasharray renderer; every other value renders **share arcs** —
|
|
24
|
+
* round-cap segmented stroke arcs with cap-compensated real gaps (tiny
|
|
25
|
+
* segments become dots), no track ring:
|
|
26
|
+
* - `duo-split` (PC-01) — 2 segments, e.g. mint + glass remainder
|
|
27
|
+
* - `split-arcs` (PC-02) — 2–5 spectrum-ordered segments
|
|
28
|
+
* - `zone-share` (PC-04) — segments colored by zone verdict tokens
|
|
29
|
+
* - `hero-arc` (PC-05) — hero segment +4px & shine, others 30%
|
|
30
|
+
* - `callout-arcs` (PC-07) — leader lines + chip-pill labels
|
|
31
|
+
* - `thin-share` (PC-09) — slim 6px halo-weight segments
|
|
32
|
+
* - `mini-multiples` (PC-11) — one small ring; compose 3 side by side
|
|
33
|
+
* - `nested-arcs` (PC-13) — `innerSegments` coarse ring + outer breakdown */
|
|
34
|
+
variant?:
|
|
35
|
+
| 'donut'
|
|
36
|
+
| 'duo-split'
|
|
37
|
+
| 'split-arcs'
|
|
38
|
+
| 'zone-share'
|
|
39
|
+
| 'hero-arc'
|
|
40
|
+
| 'callout-arcs'
|
|
41
|
+
| 'thin-share'
|
|
42
|
+
| 'mini-multiples'
|
|
43
|
+
| 'nested-arcs';
|
|
44
|
+
/** overall diameter in px (default 120 · `mini-multiples` 72) */
|
|
45
|
+
size?: number;
|
|
46
|
+
/** ring stroke width in px (default 14 · share 13 · `thin-share` 6 ·
|
|
47
|
+
* `mini-multiples` 8) */
|
|
48
|
+
thickness?: number;
|
|
49
|
+
/** gap between segments, in degrees (default 2 · share variants 5).
|
|
50
|
+
* Share arcs additionally grow every gap by the round-cap overhang
|
|
51
|
+
* (`capDeg = (thickness / r) · 180/π`) so the VISIBLE gap stays true. */
|
|
52
|
+
gap?: number;
|
|
53
|
+
/** background (track) ring color — legacy `donut` variant only (share arcs
|
|
54
|
+
* draw no track) */
|
|
55
|
+
track?: string;
|
|
56
|
+
/** hero segment index — drawn +4px wider with shine, others dim to 30%
|
|
57
|
+
* (defaults to `0` for `variant="hero-arc"`) */
|
|
58
|
+
hero?: number;
|
|
59
|
+
/** glow underlay behind full-opacity segments — a Gaussian-blurred duplicate
|
|
60
|
+
* arc (defaults on for `hero-arc`) */
|
|
61
|
+
shine?: boolean;
|
|
62
|
+
/** leader lines + chip-pill labels around the ring, from each segment's
|
|
63
|
+
* `label` (defaults on for `callout-arcs` / `nested-arcs`). Reserves 34px
|
|
64
|
+
* of the box on every side, shrinking the ring. */
|
|
65
|
+
callouts?: boolean;
|
|
66
|
+
/** inner coarse ring for `nested-arcs` (PC-13) — drawn at ~0.47·r with a 6°
|
|
67
|
+
* base gap */
|
|
68
|
+
innerSegments?: DonutSegment[];
|
|
69
|
+
/** center content — if omitted, the summed total is shown */
|
|
70
|
+
children?: ReactNode;
|
|
71
|
+
/** optional wrapper style */
|
|
72
|
+
style?: StyleProp<ViewStyle>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Faithful reproduction of a macro-style breakdown. */
|
|
76
|
+
const DEFAULT_SEGMENTS: DonutSegment[] = [
|
|
77
|
+
{ value: 50, color: colors.cyan, label: 'Carbs' },
|
|
78
|
+
{ value: 30, color: colors.lime, label: 'Protein' },
|
|
79
|
+
{ value: 20, color: colors.accent, label: 'Fat' },
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
/** point on a circle for catalog angle `aDeg` (0° = 12 o'clock, clockwise). */
|
|
83
|
+
function polar(cx: number, cy: number, r: number, aDeg: number) {
|
|
84
|
+
const rad = ((aDeg - 90) * Math.PI) / 180;
|
|
85
|
+
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** SVG arc path from `a0` to `a1` (catalog angles, clockwise). */
|
|
89
|
+
function arcPath(cx: number, cy: number, r: number, a0: number, a1: number) {
|
|
90
|
+
const p0 = polar(cx, cy, r, a0);
|
|
91
|
+
const p1 = polar(cx, cy, r, a1);
|
|
92
|
+
const large = (a1 - a0) % 360 > 180 ? 1 : 0;
|
|
93
|
+
return `M${p0.x.toFixed(1)} ${p0.y.toFixed(1)}A${r} ${r} 0 ${large} 1 ${p1.x.toFixed(1)} ${p1.y.toFixed(1)}`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** One resolved share arc (or dot, when the segment is too small for its caps). */
|
|
97
|
+
interface ShareArc {
|
|
98
|
+
seg: DonutSegment;
|
|
99
|
+
a0: number;
|
|
100
|
+
a1: number;
|
|
101
|
+
mid: number;
|
|
102
|
+
swi: number;
|
|
103
|
+
op: number;
|
|
104
|
+
dot: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** The catalog `arcRing` math: round caps + real gaps (cap growth compensated).
|
|
108
|
+
* Fracs share the sweep left after per-segment gaps; tiny segments become dots. */
|
|
109
|
+
function shareArcs(
|
|
110
|
+
segments: DonutSegment[],
|
|
111
|
+
r: number,
|
|
112
|
+
sw: number,
|
|
113
|
+
gapDeg: number,
|
|
114
|
+
hero: number | undefined,
|
|
115
|
+
): ShareArc[] {
|
|
116
|
+
const total = segments.reduce((sum, s) => sum + (s.value > 0 ? s.value : 0), 0) || 1;
|
|
117
|
+
const capDeg = (sw / r) * (180 / Math.PI);
|
|
118
|
+
const gapT = capDeg + gapDeg;
|
|
119
|
+
const avail = Math.max(0, 360 - segments.length * gapT);
|
|
120
|
+
let a = 0;
|
|
121
|
+
return segments.map((seg, i) => {
|
|
122
|
+
const f = (seg.value > 0 ? seg.value : 0) / total;
|
|
123
|
+
const sweep = f * avail;
|
|
124
|
+
const swi = hero === i ? sw + 4 : sw;
|
|
125
|
+
const op = seg.opacity ?? (hero != null && hero !== i ? 0.3 : 1);
|
|
126
|
+
const a0 = a + gapT / 2 + capDeg / 2;
|
|
127
|
+
const a1 = a + gapT / 2 + sweep - capDeg / 2;
|
|
128
|
+
const mid = a + gapT / 2 + sweep / 2;
|
|
129
|
+
a += gapT + sweep;
|
|
130
|
+
return { seg, a0, a1, mid, swi, op, dot: a1 <= a0 };
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* DonutChart — proportional composition as a ring. Two renderers behind one
|
|
136
|
+
* API: the legacy `donut` variant (dasharray arcs over a faint track — the
|
|
137
|
+
* macro-breakdown donut) and the catalog **share arcs** (PC-01…PC-13):
|
|
138
|
+
* luminous round-cap segmented stroke arcs with cap-compensated gaps, hero
|
|
139
|
+
* emphasis, leader-line callouts and a nested two-ring mode. Center shows
|
|
140
|
+
* custom `children` or the summed total.
|
|
141
|
+
*/
|
|
142
|
+
export function DonutChart({
|
|
143
|
+
segments = DEFAULT_SEGMENTS,
|
|
144
|
+
variant = 'donut',
|
|
145
|
+
size,
|
|
146
|
+
thickness,
|
|
147
|
+
gap,
|
|
148
|
+
track = 'rgba(255,255,255,0.07)',
|
|
149
|
+
hero,
|
|
150
|
+
shine,
|
|
151
|
+
callouts,
|
|
152
|
+
innerSegments,
|
|
153
|
+
children,
|
|
154
|
+
style,
|
|
155
|
+
}: DonutChartProps) {
|
|
156
|
+
const uid = useId().replace(/[^a-zA-Z0-9]/g, '');
|
|
157
|
+
const blurId = `lk-dn-blur-${uid}`;
|
|
158
|
+
const isShare = variant !== 'donut';
|
|
159
|
+
const box = size ?? (variant === 'mini-multiples' ? 72 : 120);
|
|
160
|
+
const sw =
|
|
161
|
+
thickness ??
|
|
162
|
+
(variant === 'thin-share' ? 6 : variant === 'mini-multiples' ? 8 : isShare ? 13 : 14);
|
|
163
|
+
const gapDeg = Math.max(0, gap ?? (isShare ? 5 : 2));
|
|
164
|
+
const heroIdx = hero ?? (variant === 'hero-arc' ? 0 : undefined);
|
|
165
|
+
const shineOn = shine ?? variant === 'hero-arc';
|
|
166
|
+
const calloutsOn =
|
|
167
|
+
isShare && (callouts ?? (variant === 'callout-arcs' || variant === 'nested-arcs'));
|
|
168
|
+
|
|
169
|
+
const c = box / 2;
|
|
170
|
+
// callouts reserve chip room on every side, shrinking the ring
|
|
171
|
+
const r = Math.max(10, (box - sw) / 2 - (calloutsOn ? 34 : 0));
|
|
172
|
+
|
|
173
|
+
const total = segments.reduce((sum, s) => sum + (s.value > 0 ? s.value : 0), 0) || 1;
|
|
174
|
+
|
|
175
|
+
/* ---------------------------------------------------------------- share */
|
|
176
|
+
if (isShare) {
|
|
177
|
+
const arcs = shareArcs(segments, r, sw, gapDeg, heroIdx);
|
|
178
|
+
const innerR = Math.max(8, r * 0.47);
|
|
179
|
+
const innerSw = Math.max(5, Math.round(sw * 0.9));
|
|
180
|
+
const innerArcs =
|
|
181
|
+
variant === 'nested-arcs' && innerSegments
|
|
182
|
+
? shareArcs(innerSegments, innerR, innerSw, 6, undefined)
|
|
183
|
+
: [];
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<View style={[{ width: box, height: box }, styles.box, style]}>
|
|
187
|
+
<Svg width={box} height={box} viewBox={`0 0 ${box} ${box}`}>
|
|
188
|
+
{shineOn ? (
|
|
189
|
+
/* real Gaussian blur for the shine (Fabric-native in react-native-svg
|
|
190
|
+
15) — the native twin of the web segment's `blur(5px)` underlay.
|
|
191
|
+
Region in user space so thin segments never clip the blur. */
|
|
192
|
+
<Defs>
|
|
193
|
+
<Filter
|
|
194
|
+
id={blurId}
|
|
195
|
+
filterUnits="userSpaceOnUse"
|
|
196
|
+
x={-10}
|
|
197
|
+
y={-10}
|
|
198
|
+
width={box + 20}
|
|
199
|
+
height={box + 20}
|
|
200
|
+
>
|
|
201
|
+
<FeGaussianBlur stdDeviation={2.5} />
|
|
202
|
+
</Filter>
|
|
203
|
+
</Defs>
|
|
204
|
+
) : null}
|
|
205
|
+
{innerArcs.map((a, i) => {
|
|
206
|
+
if (a.dot) {
|
|
207
|
+
const p = polar(c, c, innerR, a.mid);
|
|
208
|
+
return (
|
|
209
|
+
<Circle
|
|
210
|
+
key={`in-${i}`}
|
|
211
|
+
cx={p.x}
|
|
212
|
+
cy={p.y}
|
|
213
|
+
r={a.swi / 2}
|
|
214
|
+
fill={a.seg.color}
|
|
215
|
+
opacity={a.op}
|
|
216
|
+
/>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
return (
|
|
220
|
+
<Path
|
|
221
|
+
key={`in-${i}`}
|
|
222
|
+
d={arcPath(c, c, innerR, a.a0, a.a1)}
|
|
223
|
+
fill="none"
|
|
224
|
+
stroke={a.seg.color}
|
|
225
|
+
strokeWidth={a.swi}
|
|
226
|
+
strokeLinecap="round"
|
|
227
|
+
opacity={a.op}
|
|
228
|
+
/>
|
|
229
|
+
);
|
|
230
|
+
})}
|
|
231
|
+
{arcs.map((a, i) => {
|
|
232
|
+
if (a.dot) {
|
|
233
|
+
const p = polar(c, c, r, a.mid);
|
|
234
|
+
return (
|
|
235
|
+
<Circle
|
|
236
|
+
key={i}
|
|
237
|
+
cx={p.x}
|
|
238
|
+
cy={p.y}
|
|
239
|
+
r={a.swi / 2}
|
|
240
|
+
fill={a.seg.color}
|
|
241
|
+
opacity={a.op}
|
|
242
|
+
/>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
return (
|
|
246
|
+
<G key={i}>
|
|
247
|
+
{/* shine — a Gaussian-blurred duplicate of the segment behind it:
|
|
248
|
+
the same soft glow the web segment gets from its `blur(5px)`
|
|
249
|
+
underlay. (Feather copies read as banded outlines on device.) */}
|
|
250
|
+
{shineOn && a.op === 1 ? (
|
|
251
|
+
<Path
|
|
252
|
+
d={arcPath(c, c, r, a.a0, a.a1)}
|
|
253
|
+
fill="none"
|
|
254
|
+
stroke={a.seg.color}
|
|
255
|
+
strokeWidth={a.swi + 5}
|
|
256
|
+
strokeOpacity={0.45}
|
|
257
|
+
strokeLinecap="round"
|
|
258
|
+
filter={`url(#${blurId})`}
|
|
259
|
+
/>
|
|
260
|
+
) : null}
|
|
261
|
+
<Path
|
|
262
|
+
d={arcPath(c, c, r, a.a0, a.a1)}
|
|
263
|
+
fill="none"
|
|
264
|
+
stroke={a.seg.color}
|
|
265
|
+
strokeWidth={a.swi}
|
|
266
|
+
strokeLinecap="round"
|
|
267
|
+
opacity={a.op}
|
|
268
|
+
/>
|
|
269
|
+
</G>
|
|
270
|
+
);
|
|
271
|
+
})}
|
|
272
|
+
{calloutsOn
|
|
273
|
+
? arcs.map((a, i) => {
|
|
274
|
+
const label = a.seg.label;
|
|
275
|
+
if (!label) return null;
|
|
276
|
+
const pO = polar(c, c, r + sw / 2 + 2, a.mid);
|
|
277
|
+
const pE = polar(c, c, r + sw / 2 + 13, a.mid);
|
|
278
|
+
const right = pE.x > c;
|
|
279
|
+
const w = label.length * 5.35 + 12;
|
|
280
|
+
const anchorX = pE.x + (right ? 5 : -5);
|
|
281
|
+
const xa = Math.max(2, Math.min(right ? anchorX : anchorX - w, box - w - 2));
|
|
282
|
+
return (
|
|
283
|
+
<G key={`co-${i}`}>
|
|
284
|
+
<Line
|
|
285
|
+
x1={pO.x}
|
|
286
|
+
y1={pO.y}
|
|
287
|
+
x2={pE.x}
|
|
288
|
+
y2={pE.y}
|
|
289
|
+
stroke={colors.text}
|
|
290
|
+
strokeOpacity={0.3}
|
|
291
|
+
strokeWidth={1}
|
|
292
|
+
/>
|
|
293
|
+
<Rect
|
|
294
|
+
x={xa}
|
|
295
|
+
y={pE.y - 6.5}
|
|
296
|
+
width={w}
|
|
297
|
+
height={13}
|
|
298
|
+
rx={6.5}
|
|
299
|
+
fill={`${colors.bg0}C7`}
|
|
300
|
+
stroke={a.seg.color}
|
|
301
|
+
strokeOpacity={0.35}
|
|
302
|
+
strokeWidth={0.8}
|
|
303
|
+
/>
|
|
304
|
+
<SvgText
|
|
305
|
+
x={xa + w / 2}
|
|
306
|
+
y={pE.y + 2.8}
|
|
307
|
+
fill={a.seg.color}
|
|
308
|
+
fontFamily={fonts.mono}
|
|
309
|
+
fontSize={8}
|
|
310
|
+
textAnchor="middle"
|
|
311
|
+
>
|
|
312
|
+
{label}
|
|
313
|
+
</SvgText>
|
|
314
|
+
</G>
|
|
315
|
+
);
|
|
316
|
+
})
|
|
317
|
+
: null}
|
|
318
|
+
</Svg>
|
|
319
|
+
<View style={styles.center} pointerEvents="none">
|
|
320
|
+
{children ?? <Text style={styles.total}>{total}</Text>}
|
|
321
|
+
</View>
|
|
322
|
+
</View>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* --------------------------------------------------------------- legacy */
|
|
327
|
+
const circ = 2 * Math.PI * r;
|
|
328
|
+
/** the visible-arc count: segments with a positive value get a leading gap */
|
|
329
|
+
const drawn = segments.filter((s) => s.value > 0).length;
|
|
330
|
+
/** px length of the angular gap, capped so it never exceeds a segment's share */
|
|
331
|
+
const gapPx = (gapDeg / 360) * circ;
|
|
332
|
+
|
|
333
|
+
// running offset (negative) so arcs chain clockwise from 12 o'clock
|
|
334
|
+
let cursor = 0;
|
|
335
|
+
const arcs = segments.map((s) => {
|
|
336
|
+
const share = (s.value > 0 ? s.value : 0) / total;
|
|
337
|
+
const full = circ * share;
|
|
338
|
+
// shave a gap off the head of each arc (only when there's room + >1 arc)
|
|
339
|
+
const trim = drawn > 1 ? Math.min(gapPx, full) : 0;
|
|
340
|
+
const len = Math.max(0, full - trim);
|
|
341
|
+
const offset = -(cursor + trim);
|
|
342
|
+
cursor += full;
|
|
343
|
+
return { len, offset };
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
return (
|
|
347
|
+
<View style={[{ width: box, height: box }, styles.box, style]}>
|
|
348
|
+
<Svg width={box} height={box} viewBox={`0 0 ${box} ${box}`}>
|
|
349
|
+
<G origin={`${c}, ${c}`} rotation={-90}>
|
|
350
|
+
<Circle cx={c} cy={c} r={r} fill="none" stroke={track} strokeWidth={sw} />
|
|
351
|
+
{segments.map((s, i) => {
|
|
352
|
+
const a = arcs[i]!;
|
|
353
|
+
if (a.len <= 0) return null;
|
|
354
|
+
return (
|
|
355
|
+
<Circle
|
|
356
|
+
key={`${s.label ?? 'seg'}-${i}`}
|
|
357
|
+
cx={c}
|
|
358
|
+
cy={c}
|
|
359
|
+
r={r}
|
|
360
|
+
fill="none"
|
|
361
|
+
stroke={s.color}
|
|
362
|
+
strokeWidth={sw}
|
|
363
|
+
strokeLinecap="round"
|
|
364
|
+
strokeDasharray={[a.len, circ - a.len]}
|
|
365
|
+
strokeDashoffset={a.offset}
|
|
366
|
+
opacity={s.opacity}
|
|
367
|
+
/>
|
|
368
|
+
);
|
|
369
|
+
})}
|
|
370
|
+
</G>
|
|
371
|
+
</Svg>
|
|
372
|
+
<View style={styles.center} pointerEvents="none">
|
|
373
|
+
{children ?? <Text style={styles.total}>{total}</Text>}
|
|
374
|
+
</View>
|
|
375
|
+
</View>
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const styles = StyleSheet.create({
|
|
380
|
+
box: { position: 'relative', alignItems: 'center', justifyContent: 'center' },
|
|
381
|
+
center: {
|
|
382
|
+
position: 'absolute',
|
|
383
|
+
top: 0,
|
|
384
|
+
left: 0,
|
|
385
|
+
right: 0,
|
|
386
|
+
bottom: 0,
|
|
387
|
+
flexDirection: 'column',
|
|
388
|
+
alignItems: 'center',
|
|
389
|
+
justifyContent: 'center',
|
|
390
|
+
gap: 2,
|
|
391
|
+
},
|
|
392
|
+
total: {
|
|
393
|
+
fontFamily: fonts.display,
|
|
394
|
+
fontSize: 26,
|
|
395
|
+
lineHeight: 26,
|
|
396
|
+
letterSpacing: -0.5,
|
|
397
|
+
color: colors.text,
|
|
398
|
+
},
|
|
399
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { colors } from '@lockin90/tokens';
|
|
4
|
+
|
|
5
|
+
export interface DotsLoaderProps {
|
|
6
|
+
/** dot diameter */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** dot color */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** number of dots */
|
|
11
|
+
count?: number;
|
|
12
|
+
/** gap between dots */
|
|
13
|
+
gap?: number;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* N small dots that bounce/pulse in a staggered sequence — typing indicator
|
|
19
|
+
* (the AI coach composing) and generic inline loading state. Mirrors the web
|
|
20
|
+
* `DotsLoader` (same prop API + staggered 0.16s wave) using Animated loops.
|
|
21
|
+
*/
|
|
22
|
+
export function DotsLoader({ size = 7, color = colors.accent, count = 3, gap = 6, style }: DotsLoaderProps) {
|
|
23
|
+
const n = Math.max(1, Math.floor(count));
|
|
24
|
+
// one driver per dot; 0 = resting (down/dim), 1 = peak (up/bright)
|
|
25
|
+
const valsRef = useRef<Animated.Value[]>([]);
|
|
26
|
+
if (valsRef.current.length !== n) {
|
|
27
|
+
valsRef.current = Array.from({ length: n }, () => new Animated.Value(0));
|
|
28
|
+
}
|
|
29
|
+
const vals = valsRef.current;
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const loops = vals.map((v, i) =>
|
|
33
|
+
Animated.loop(
|
|
34
|
+
Animated.sequence([
|
|
35
|
+
Animated.delay(i * 160), // staggered start (matches web 0/.16/.32s)
|
|
36
|
+
Animated.timing(v, { toValue: 1, duration: 360, easing: Easing.out(Easing.quad), useNativeDriver: true }),
|
|
37
|
+
Animated.timing(v, { toValue: 0, duration: 480, easing: Easing.in(Easing.quad), useNativeDriver: true }),
|
|
38
|
+
Animated.delay(Math.max(0, (n - 1 - i) * 160)), // pad so cycles realign
|
|
39
|
+
]),
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
loops.forEach((l) => l.start());
|
|
43
|
+
return () => loops.forEach((l) => l.stop());
|
|
44
|
+
}, [vals, n]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<View style={[styles.row, { gap }, style]} accessibilityRole="progressbar" accessibilityLabel="Loading">
|
|
48
|
+
{vals.map((v, i) => (
|
|
49
|
+
<Animated.View
|
|
50
|
+
key={i}
|
|
51
|
+
style={{
|
|
52
|
+
width: size,
|
|
53
|
+
height: size,
|
|
54
|
+
borderRadius: size / 2,
|
|
55
|
+
backgroundColor: color,
|
|
56
|
+
shadowColor: color,
|
|
57
|
+
shadowOpacity: 0.5,
|
|
58
|
+
shadowRadius: 10,
|
|
59
|
+
shadowOffset: { width: 0, height: 0 },
|
|
60
|
+
opacity: v.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] }),
|
|
61
|
+
transform: [
|
|
62
|
+
{ translateY: v.interpolate({ inputRange: [0, 1], outputRange: [0, -4] }) },
|
|
63
|
+
{ scale: v.interpolate({ inputRange: [0, 1], outputRange: [0.7, 1] }) },
|
|
64
|
+
],
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
))}
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const styles = StyleSheet.create({
|
|
73
|
+
row: { flexDirection: 'row', alignItems: 'center' },
|
|
74
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { colors, fonts } from '@lockin90/tokens';
|
|
4
|
+
import { Icon, type IconName } from './Icon';
|
|
5
|
+
|
|
6
|
+
export type EffectTone = 'auto' | 'positive' | 'negative' | 'neutral';
|
|
7
|
+
|
|
8
|
+
export interface EffectAttributionLineProps {
|
|
9
|
+
/** Signed contribution; rendered with an explicit + or − sign. */
|
|
10
|
+
value: number;
|
|
11
|
+
/** What the contribution is attributed to, e.g. 'Deep sleep 1h20m'. */
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
/** Unit appended to the value, e.g. 'pts'. */
|
|
14
|
+
unit?: string;
|
|
15
|
+
/** Color tone. 'auto' (default) = positive if value>0, negative if <0, neutral if 0. */
|
|
16
|
+
tone?: EffectTone;
|
|
17
|
+
/** Optional leading glyph. */
|
|
18
|
+
icon?: IconName;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Native has no `currentColor`; resolve each tone to its value/icon color.
|
|
23
|
+
const TONE_COLOR: Record<'positive' | 'negative' | 'neutral', string> = {
|
|
24
|
+
positive: colors.zoneHigh,
|
|
25
|
+
negative: colors.zoneLow,
|
|
26
|
+
neutral: colors.textDim,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** Resolve the effective tone from the explicit prop, falling back to the numeric sign. */
|
|
30
|
+
function resolveTone(tone: EffectTone, value: number): 'positive' | 'negative' | 'neutral' {
|
|
31
|
+
if (tone !== 'auto') return tone;
|
|
32
|
+
if (value > 0) return 'positive';
|
|
33
|
+
if (value < 0) return 'negative';
|
|
34
|
+
return 'neutral';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function signFor(value: number): string {
|
|
38
|
+
if (value > 0) return '+';
|
|
39
|
+
if (value < 0) return '−';
|
|
40
|
+
return '±';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A single "why this score" attribution row: optional leading icon, a large
|
|
45
|
+
* signed contribution (display font, tinted by tone) with unit, and the label
|
|
46
|
+
* describing the driver. Stack several inside an energy-explain list.
|
|
47
|
+
*/
|
|
48
|
+
export function EffectAttributionLine({
|
|
49
|
+
value,
|
|
50
|
+
label,
|
|
51
|
+
unit,
|
|
52
|
+
tone = 'auto',
|
|
53
|
+
icon,
|
|
54
|
+
style,
|
|
55
|
+
}: EffectAttributionLineProps) {
|
|
56
|
+
const resolved = resolveTone(tone, value);
|
|
57
|
+
const color = TONE_COLOR[resolved];
|
|
58
|
+
return (
|
|
59
|
+
<View style={[styles.row, style]}>
|
|
60
|
+
{icon != null && (
|
|
61
|
+
<View style={styles.icon}>
|
|
62
|
+
<Icon name={icon} size={16} color={color} />
|
|
63
|
+
</View>
|
|
64
|
+
)}
|
|
65
|
+
<Text style={[styles.value, { color }]}>
|
|
66
|
+
<Text style={styles.sign}>{signFor(value)}</Text>
|
|
67
|
+
{String(Math.abs(value))}
|
|
68
|
+
{unit != null && <Text style={styles.unit}>{unit}</Text>}
|
|
69
|
+
</Text>
|
|
70
|
+
<Text style={styles.label}>{label}</Text>
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
row: { flexDirection: 'row', alignItems: 'flex-end', gap: 10 },
|
|
77
|
+
icon: { alignSelf: 'center' },
|
|
78
|
+
value: { fontFamily: fonts.display, fontWeight: '700', fontSize: 26, letterSpacing: -0.52, lineHeight: 28 },
|
|
79
|
+
sign: { fontFamily: fonts.display, fontWeight: '700' },
|
|
80
|
+
unit: { fontSize: 13, fontWeight: '500', color: colors.textFaint },
|
|
81
|
+
label: { fontFamily: fonts.mono, fontSize: 10, textTransform: 'uppercase', letterSpacing: 1.2, color: colors.textDim },
|
|
82
|
+
});
|