@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,341 @@
|
|
|
1
|
+
import { View, Text, Pressable, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
|
+
import Svg, { Path } from 'react-native-svg';
|
|
4
|
+
import { colors, fonts, gradients, radii } from '@lockin90/tokens';
|
|
5
|
+
import { hapticSelection } from '../internal/optionalHaptics';
|
|
6
|
+
import { PrBadge } from './PrBadge';
|
|
7
|
+
|
|
8
|
+
/** Set kind — drives the SET-column label + color. */
|
|
9
|
+
export type SetType = 'warmup' | 'working' | 'drop' | 'failure';
|
|
10
|
+
|
|
11
|
+
/** Reference-column tint: mint for coach targets, violet accent for AI. */
|
|
12
|
+
export type SetReferenceTone = 'coach' | 'ai' | 'none';
|
|
13
|
+
|
|
14
|
+
export interface WorkoutSet {
|
|
15
|
+
id: string;
|
|
16
|
+
setType: SetType;
|
|
17
|
+
/** SET-column label override. Default: `W` warmup · working sets numbered `1,2,…` · `D` drop · `F` failure. */
|
|
18
|
+
label?: string;
|
|
19
|
+
weight?: number;
|
|
20
|
+
reps?: number;
|
|
21
|
+
unit?: 'kg' | 'lb';
|
|
22
|
+
/** Reference readout (e.g. the coach/AI recommendation `80×5`). */
|
|
23
|
+
reference?: string;
|
|
24
|
+
/** Reference tint — `coach` mint · `ai` violet accent · `none` faint (default). */
|
|
25
|
+
referenceTone?: SetReferenceTone;
|
|
26
|
+
done?: boolean;
|
|
27
|
+
/** Personal record — stamps a red `PR` badge next to the value once `done`. */
|
|
28
|
+
isPr?: boolean;
|
|
29
|
+
/** The set being performed now — subtle cyan row tint. */
|
|
30
|
+
isCurrent?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type SetTableColumn = 'set' | 'value' | 'reference' | 'check';
|
|
34
|
+
|
|
35
|
+
const ALL_COLUMNS: SetTableColumn[] = ['set', 'value', 'reference', 'check'];
|
|
36
|
+
|
|
37
|
+
export interface SetTableProps {
|
|
38
|
+
/** The sets, in order. */
|
|
39
|
+
sets: WorkoutSet[];
|
|
40
|
+
/** Columns to render, in this order (default all 4). */
|
|
41
|
+
columns?: SetTableColumn[];
|
|
42
|
+
/** Values are tappable (tap → `onSetPress`); they stay plain text — only
|
|
43
|
+
* the CURRENT set's value gets the cyan-accented box ("you are here"). */
|
|
44
|
+
editable?: boolean;
|
|
45
|
+
/** Row tapped (open the set editor). */
|
|
46
|
+
onSetPress?: (id: string) => void;
|
|
47
|
+
/** Done-check toggled. */
|
|
48
|
+
onTogglePress?: (id: string) => void;
|
|
49
|
+
/** When given, renders the trailing `+ Add set` row. */
|
|
50
|
+
onAddSet?: () => void;
|
|
51
|
+
/** Add-row label (default `'Add set'`). */
|
|
52
|
+
addLabel?: string;
|
|
53
|
+
/** Reference column header (default `'Coach rec'`). */
|
|
54
|
+
referenceHeader?: string;
|
|
55
|
+
style?: StyleProp<ViewStyle>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Default SET-column labels: warmup `W`, drop `D`, failure `F`, working sets numbered `1,2,…`. */
|
|
59
|
+
export function setLabels(sets: readonly Pick<WorkoutSet, 'setType' | 'label'>[]): string[] {
|
|
60
|
+
let n = 0;
|
|
61
|
+
return sets.map((s) => {
|
|
62
|
+
if (s.setType === 'working') n += 1;
|
|
63
|
+
if (s.label != null) return s.label;
|
|
64
|
+
return s.setType === 'warmup' ? 'W' : s.setType === 'drop' ? 'D' : s.setType === 'failure' ? 'F' : String(n);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* set-type colors — warmup amber · working cyan · drop violet · failure magenta */
|
|
69
|
+
const TYPE_COLOR: Record<SetType, string> = {
|
|
70
|
+
warmup: colors.zoneMid,
|
|
71
|
+
working: colors.accent2,
|
|
72
|
+
drop: colors.violet,
|
|
73
|
+
failure: colors.magenta,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const REF_COLOR: Record<SetReferenceTone, string> = {
|
|
77
|
+
coach: colors.mint,
|
|
78
|
+
ai: colors.accent,
|
|
79
|
+
none: colors.textFaint,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/* row tints — current = cyan (accent-2 @ 7%), done = mint (matched web literals) */
|
|
83
|
+
const CURRENT_TINT = 'rgba(34,211,238,0.07)';
|
|
84
|
+
const DONE_TINT = 'rgba(52,245,197,0.05)';
|
|
85
|
+
|
|
86
|
+
/** `80×5`, with an em dash for a missing half. */
|
|
87
|
+
function formatValue(s: WorkoutSet): string {
|
|
88
|
+
const w = s.weight != null ? String(s.weight) : '—';
|
|
89
|
+
const r = s.reps != null ? String(s.reps) : '—';
|
|
90
|
+
return `${w}×${r}`;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Value-column header from the sets' unit (`KG × REPS` / `LB × REPS`). */
|
|
94
|
+
function valueHeader(sets: readonly WorkoutSet[]): string {
|
|
95
|
+
const unit = sets.find((s) => s.unit)?.unit;
|
|
96
|
+
return unit ? `${unit.toUpperCase()} × REPS` : 'WEIGHT × REPS';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function CheckGlyph({ color }: { color: string }) {
|
|
100
|
+
return (
|
|
101
|
+
<Svg width={16} height={16} viewBox="0 0 24 24" fill="none">
|
|
102
|
+
<Path d="M20 6 9 17l-5-5" stroke={color} strokeWidth={2.2} strokeLinecap="round" strokeLinejoin="round" />
|
|
103
|
+
</Svg>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* SetTable — the per-set workout table, the training design's core primitive.
|
|
109
|
+
* Native twin of the web `SetTable` (same prop API): one row per set with the
|
|
110
|
+
* colored SET label (`W`/`1`/`2`/`D`/`F` — warmup amber, working cyan, drop
|
|
111
|
+
* violet, failure magenta), the centered mono `weight×reps` value, the
|
|
112
|
+
* right-aligned mono reference (coach mint / AI violet accent), and the done
|
|
113
|
+
* check (filled mint gradient once done). Current set = subtle cyan row
|
|
114
|
+
* tint; done = subtle mint tint; a PR'd done set floats a red `PrBadge`
|
|
115
|
+
* right of the value without shifting the centered number.
|
|
116
|
+
*/
|
|
117
|
+
export function SetTable({
|
|
118
|
+
sets,
|
|
119
|
+
columns = ALL_COLUMNS,
|
|
120
|
+
editable = false,
|
|
121
|
+
onSetPress,
|
|
122
|
+
onTogglePress,
|
|
123
|
+
onAddSet,
|
|
124
|
+
addLabel = 'Add set',
|
|
125
|
+
referenceHeader = 'Coach rec',
|
|
126
|
+
style,
|
|
127
|
+
}: SetTableProps) {
|
|
128
|
+
const has = (c: SetTableColumn) => columns.includes(c);
|
|
129
|
+
const labels = setLabels(sets);
|
|
130
|
+
|
|
131
|
+
const headers: Record<SetTableColumn, string> = {
|
|
132
|
+
set: 'SET',
|
|
133
|
+
value: valueHeader(sets),
|
|
134
|
+
reference: referenceHeader.toUpperCase(),
|
|
135
|
+
check: '',
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const headerStyle: Record<SetTableColumn, StyleProp<ViewStyle>> = {
|
|
139
|
+
set: styles.colSet,
|
|
140
|
+
value: styles.colValue,
|
|
141
|
+
reference: styles.colRef,
|
|
142
|
+
check: styles.colCheck,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<View style={style}>
|
|
147
|
+
{/* header row */}
|
|
148
|
+
<View style={[styles.row, styles.headRow]}>
|
|
149
|
+
{columns.map((c) => (
|
|
150
|
+
<View key={c} style={headerStyle[c]}>
|
|
151
|
+
<Text
|
|
152
|
+
style={[
|
|
153
|
+
styles.headText,
|
|
154
|
+
c === 'set' || c === 'value' ? styles.center : null,
|
|
155
|
+
c === 'reference' ? styles.right : null,
|
|
156
|
+
]}
|
|
157
|
+
>
|
|
158
|
+
{headers[c]}
|
|
159
|
+
</Text>
|
|
160
|
+
</View>
|
|
161
|
+
))}
|
|
162
|
+
</View>
|
|
163
|
+
|
|
164
|
+
{sets.map((s, i) => {
|
|
165
|
+
const rowPress = onSetPress
|
|
166
|
+
? () => {
|
|
167
|
+
hapticSelection();
|
|
168
|
+
onSetPress(s.id);
|
|
169
|
+
}
|
|
170
|
+
: undefined;
|
|
171
|
+
const rowTint = s.isCurrent ? CURRENT_TINT : s.done ? DONE_TINT : undefined;
|
|
172
|
+
const last = i === sets.length - 1 && !onAddSet;
|
|
173
|
+
|
|
174
|
+
const cells = (
|
|
175
|
+
<>
|
|
176
|
+
{has('set') && (
|
|
177
|
+
<View style={styles.colSet}>
|
|
178
|
+
<Text style={[styles.setLabel, { color: TYPE_COLOR[s.setType] }]}>{labels[i]}</Text>
|
|
179
|
+
</View>
|
|
180
|
+
)}
|
|
181
|
+
{has('value') && (
|
|
182
|
+
<View style={styles.colValue}>
|
|
183
|
+
{/* three glance-distinct states: pending = plain mono text,
|
|
184
|
+
current = the ONE cyan-boxed emphasized value, done =
|
|
185
|
+
dimmed plain text on the mint row wash. The PR badge sits
|
|
186
|
+
in a content-hugging row NEXT TO the value (not pinned to
|
|
187
|
+
the column's own right edge) so it hugs the number at any
|
|
188
|
+
column width. */}
|
|
189
|
+
<View style={styles.valGroup}>
|
|
190
|
+
<View style={editable && s.isCurrent ? styles.valBox : null}>
|
|
191
|
+
<Text style={[styles.valText, s.done ? styles.valDone : null]}>{formatValue(s)}</Text>
|
|
192
|
+
</View>
|
|
193
|
+
{s.isPr && s.done ? <PrBadge size="sm" style={styles.pr} /> : null}
|
|
194
|
+
</View>
|
|
195
|
+
</View>
|
|
196
|
+
)}
|
|
197
|
+
{has('reference') && (
|
|
198
|
+
<View style={styles.colRef}>
|
|
199
|
+
<Text style={[styles.refText, { color: REF_COLOR[s.referenceTone ?? 'none'] }]} numberOfLines={1}>
|
|
200
|
+
{s.reference ?? '—'}
|
|
201
|
+
</Text>
|
|
202
|
+
</View>
|
|
203
|
+
)}
|
|
204
|
+
{has('check') && (
|
|
205
|
+
<View style={styles.colCheck}>
|
|
206
|
+
<Pressable
|
|
207
|
+
accessibilityRole="button"
|
|
208
|
+
accessibilityState={{ selected: !!s.done }}
|
|
209
|
+
accessibilityLabel={`Set ${labels[i]} done`}
|
|
210
|
+
hitSlop={6}
|
|
211
|
+
onPress={
|
|
212
|
+
onTogglePress
|
|
213
|
+
? () => {
|
|
214
|
+
hapticSelection();
|
|
215
|
+
onTogglePress(s.id);
|
|
216
|
+
}
|
|
217
|
+
: undefined
|
|
218
|
+
}
|
|
219
|
+
>
|
|
220
|
+
{s.done ? (
|
|
221
|
+
<LinearGradient
|
|
222
|
+
colors={gradients.mint.stops as unknown as [string, string]}
|
|
223
|
+
start={{ x: 0, y: 0 }}
|
|
224
|
+
end={{ x: 1, y: 1 }}
|
|
225
|
+
style={[styles.check, styles.checkDone]}
|
|
226
|
+
>
|
|
227
|
+
<CheckGlyph color="#07080D" />
|
|
228
|
+
</LinearGradient>
|
|
229
|
+
) : (
|
|
230
|
+
<View style={styles.check}>
|
|
231
|
+
<CheckGlyph color={colors.textFaint} />
|
|
232
|
+
</View>
|
|
233
|
+
)}
|
|
234
|
+
</Pressable>
|
|
235
|
+
</View>
|
|
236
|
+
)}
|
|
237
|
+
</>
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
const rowStyle = [
|
|
241
|
+
styles.row,
|
|
242
|
+
!last && styles.rowDivider,
|
|
243
|
+
rowTint ? { backgroundColor: rowTint } : null,
|
|
244
|
+
];
|
|
245
|
+
|
|
246
|
+
return rowPress ? (
|
|
247
|
+
<Pressable key={s.id} accessibilityRole="button" onPress={rowPress} style={rowStyle}>
|
|
248
|
+
{cells}
|
|
249
|
+
</Pressable>
|
|
250
|
+
) : (
|
|
251
|
+
<View key={s.id} style={rowStyle}>
|
|
252
|
+
{cells}
|
|
253
|
+
</View>
|
|
254
|
+
);
|
|
255
|
+
})}
|
|
256
|
+
|
|
257
|
+
{onAddSet ? (
|
|
258
|
+
<Pressable
|
|
259
|
+
accessibilityRole="button"
|
|
260
|
+
onPress={() => {
|
|
261
|
+
hapticSelection();
|
|
262
|
+
onAddSet();
|
|
263
|
+
}}
|
|
264
|
+
style={({ pressed }) => [styles.addRow, pressed && styles.addPressed]}
|
|
265
|
+
>
|
|
266
|
+
<Text style={styles.addText}>+ {addLabel.toUpperCase()}</Text>
|
|
267
|
+
</Pressable>
|
|
268
|
+
) : null}
|
|
269
|
+
</View>
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const styles = StyleSheet.create({
|
|
274
|
+
row: { flexDirection: 'row', alignItems: 'center', paddingVertical: 9, paddingHorizontal: 2 },
|
|
275
|
+
headRow: { paddingVertical: 6, borderBottomWidth: 1, borderBottomColor: colors.border },
|
|
276
|
+
rowDivider: { borderBottomWidth: 1, borderBottomColor: colors.border },
|
|
277
|
+
headText: { fontFamily: fonts.mono, fontSize: 9.5, letterSpacing: 1.1, color: colors.textFaint },
|
|
278
|
+
center: { textAlign: 'center' },
|
|
279
|
+
right: { textAlign: 'right' },
|
|
280
|
+
|
|
281
|
+
colSet: { width: 44, alignItems: 'center' },
|
|
282
|
+
colValue: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
283
|
+
colRef: { flex: 1, alignItems: 'flex-end', paddingRight: 4 },
|
|
284
|
+
colCheck: { width: 44, alignItems: 'center' },
|
|
285
|
+
|
|
286
|
+
setLabel: { fontFamily: fonts.display, fontWeight: '700', fontSize: 14 },
|
|
287
|
+
|
|
288
|
+
valText: {
|
|
289
|
+
fontFamily: fonts.mono,
|
|
290
|
+
fontSize: 13.5,
|
|
291
|
+
fontWeight: '600',
|
|
292
|
+
fontVariant: ['tabular-nums'],
|
|
293
|
+
color: colors.text,
|
|
294
|
+
},
|
|
295
|
+
valDone: { color: colors.textDim },
|
|
296
|
+
// Content-hugging row: the value box + its PR badge size to their own
|
|
297
|
+
// content, not the flexed column — this is what makes the badge HUG the
|
|
298
|
+
// number instead of pinning to the column's right edge.
|
|
299
|
+
valGroup: { flexDirection: 'row', alignItems: 'center', gap: 6 },
|
|
300
|
+
// The one accented box — editable CURRENT set only (mirrors the web valbox).
|
|
301
|
+
valBox: {
|
|
302
|
+
paddingVertical: 6,
|
|
303
|
+
paddingHorizontal: 12,
|
|
304
|
+
borderRadius: radii.sm,
|
|
305
|
+
borderWidth: 1,
|
|
306
|
+
borderColor: 'rgba(34,211,238,0.35)',
|
|
307
|
+
backgroundColor: 'rgba(34,211,238,0.05)',
|
|
308
|
+
},
|
|
309
|
+
pr: {},
|
|
310
|
+
|
|
311
|
+
refText: { fontFamily: fonts.mono, fontSize: 11, fontVariant: ['tabular-nums'] },
|
|
312
|
+
|
|
313
|
+
check: {
|
|
314
|
+
width: 32,
|
|
315
|
+
height: 32,
|
|
316
|
+
borderRadius: 10,
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
justifyContent: 'center',
|
|
319
|
+
backgroundColor: colors.glass,
|
|
320
|
+
borderWidth: 1,
|
|
321
|
+
borderColor: colors.border,
|
|
322
|
+
},
|
|
323
|
+
checkDone: {
|
|
324
|
+
borderWidth: 0,
|
|
325
|
+
shadowColor: colors.mint,
|
|
326
|
+
shadowOpacity: 0.35,
|
|
327
|
+
shadowRadius: 9,
|
|
328
|
+
shadowOffset: { width: 0, height: 0 },
|
|
329
|
+
transform: [{ scale: 1.04 }],
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
addRow: { paddingVertical: 11, alignItems: 'center', borderRadius: radii.sm },
|
|
333
|
+
addPressed: { backgroundColor: 'rgba(34,211,238,0.06)' },
|
|
334
|
+
addText: {
|
|
335
|
+
fontFamily: fonts.mono,
|
|
336
|
+
fontSize: 10.5,
|
|
337
|
+
fontWeight: '600',
|
|
338
|
+
letterSpacing: 1.3,
|
|
339
|
+
color: colors.accent2,
|
|
340
|
+
},
|
|
341
|
+
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { View, Text, StyleSheet, type ViewProps } from 'react-native';
|
|
2
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
|
+
import { colors, radii, fonts, gradients, nativeShadows } from '@lockin90/tokens';
|
|
4
|
+
import { BrandMark } from './BrandMark';
|
|
5
|
+
import { GradientText } from './GradientText';
|
|
6
|
+
import { Ring } from './Ring';
|
|
7
|
+
import { Stat } from './Stat';
|
|
8
|
+
|
|
9
|
+
export type ShareCardGradient = 'flux' | 'cta' | 'mint' | 'violet';
|
|
10
|
+
export type ShareCardSize = 'sm' | 'md' | 'lg';
|
|
11
|
+
|
|
12
|
+
export interface ShareCardStat {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ShareCardProps extends ViewProps {
|
|
18
|
+
/** small mono eyebrow above the metric (e.g. a date range or "Avg energy"). */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** the headline — a number or short string (shown big, or inside the `ring`). */
|
|
21
|
+
metric: string | number;
|
|
22
|
+
/** small mono caption under the metric (e.g. a zone, "out of 100"). */
|
|
23
|
+
metricLabel?: string;
|
|
24
|
+
/** render a `Ring` with `metric` as its centered readout instead of a big number.
|
|
25
|
+
* `value` is mapped onto 0–100 against `max` (default 100). */
|
|
26
|
+
ring?: { value: number; max?: number };
|
|
27
|
+
/** up to 3 supporting stats (rendered with the `Stat` primitive). */
|
|
28
|
+
stats?: ShareCardStat[];
|
|
29
|
+
/** show the LockIn90 `BrandMark` lockup + watermark @default true */
|
|
30
|
+
brand?: boolean;
|
|
31
|
+
/** aurora wash + ring/headline gradient @default 'flux' */
|
|
32
|
+
gradient?: ShareCardGradient;
|
|
33
|
+
/** share aspect + scale @default 'md' (sm 1:1 · md 4:5 · lg 9:16) */
|
|
34
|
+
size?: ShareCardSize;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const SIZES: Record<
|
|
38
|
+
ShareCardSize,
|
|
39
|
+
{ aspectRatio: number; pad: number; eyebrow: number; metric: number; score: number; label: number; brand: number; ring: number; thickness: number; wm: number }
|
|
40
|
+
> = {
|
|
41
|
+
sm: { aspectRatio: 1, pad: 18, eyebrow: 9, metric: 44, score: 34, label: 9, brand: 18, ring: 96, thickness: 8, wm: 7 },
|
|
42
|
+
md: { aspectRatio: 4 / 5, pad: 22, eyebrow: 10, metric: 56, score: 42, label: 9.5, brand: 20, ring: 120, thickness: 9, wm: 7.5 },
|
|
43
|
+
lg: { aspectRatio: 9 / 16, pad: 26, eyebrow: 10, metric: 64, score: 48, label: 9.5, brand: 22, ring: 140, thickness: 10, wm: 8 },
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* ShareCard — the branded, shareable progress/score card users post to socials:
|
|
48
|
+
* a `BrandMark` lockup, a headline `metric` (a big `GradientText` number or a
|
|
49
|
+
* `Ring` readout), an optional caption, and up to three supporting `Stat`s, on
|
|
50
|
+
* an Aurora-gradient wash. The `gradient` token drives the wash + ring/text
|
|
51
|
+
* gradient; `size` picks the share aspect (1:1 / 4:5 / 9:16). Composed from
|
|
52
|
+
* BrandMark + GradientText + Ring + Stat. Mirrors the web `@lockin90/ui`
|
|
53
|
+
* ShareCard. This is the *only* sanctioned share card — never hand-roll one.
|
|
54
|
+
*/
|
|
55
|
+
export function ShareCard({
|
|
56
|
+
title,
|
|
57
|
+
metric,
|
|
58
|
+
metricLabel,
|
|
59
|
+
ring,
|
|
60
|
+
stats,
|
|
61
|
+
brand = true,
|
|
62
|
+
gradient = 'flux',
|
|
63
|
+
size = 'md',
|
|
64
|
+
style,
|
|
65
|
+
...rest
|
|
66
|
+
}: ShareCardProps) {
|
|
67
|
+
const S = SIZES[size];
|
|
68
|
+
const g = gradients[gradient];
|
|
69
|
+
const arc: [string, string] = [g.stops[0], g.stops[g.stops.length - 1]];
|
|
70
|
+
// GradientText only exposes flux/cta/violet — mint headlines fall back to flux
|
|
71
|
+
// (the wash + ring still carry the true mint tint).
|
|
72
|
+
const headlineGradient = gradient === 'cta' ? 'cta' : gradient === 'violet' ? 'violet' : 'flux';
|
|
73
|
+
const ringPct = ring ? Math.max(0, Math.min(100, (ring.value / (ring.max ?? 100)) * 100)) : 0;
|
|
74
|
+
const visibleStats = stats?.slice(0, 3) ?? [];
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<View style={[styles.card, { aspectRatio: S.aspectRatio, padding: S.pad }, style]} {...rest}>
|
|
78
|
+
<LinearGradient
|
|
79
|
+
colors={g.stops as unknown as readonly [string, string, ...string[]]}
|
|
80
|
+
start={{ x: 0, y: 0 }}
|
|
81
|
+
end={{ x: 1, y: 1 }}
|
|
82
|
+
style={styles.wash}
|
|
83
|
+
pointerEvents="none"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<View style={styles.top}>{brand ? <BrandMark variant="lockup" size={S.brand} /> : null}</View>
|
|
87
|
+
|
|
88
|
+
<View style={styles.body}>
|
|
89
|
+
{title ? <Text style={[styles.eyebrow, { fontSize: S.eyebrow }]}>{title}</Text> : null}
|
|
90
|
+
|
|
91
|
+
{ring ? (
|
|
92
|
+
<Ring value={ringPct} size={S.ring} thickness={S.thickness} gradient={arc}>
|
|
93
|
+
<Text style={[styles.score, { fontSize: S.score }]}>{String(metric)}</Text>
|
|
94
|
+
</Ring>
|
|
95
|
+
) : (
|
|
96
|
+
<GradientText gradient={headlineGradient} style={[styles.metric, { fontSize: S.metric }]}>
|
|
97
|
+
{String(metric)}
|
|
98
|
+
</GradientText>
|
|
99
|
+
)}
|
|
100
|
+
|
|
101
|
+
{metricLabel ? <Text style={[styles.metricLabel, { fontSize: S.label }]}>{metricLabel}</Text> : null}
|
|
102
|
+
|
|
103
|
+
{visibleStats.length > 0 ? (
|
|
104
|
+
<View style={styles.stats}>
|
|
105
|
+
{visibleStats.map((s, i) => (
|
|
106
|
+
<Stat key={`${s.label}-${i}`} label={s.label} value={s.value} style={styles.stat} />
|
|
107
|
+
))}
|
|
108
|
+
</View>
|
|
109
|
+
) : null}
|
|
110
|
+
</View>
|
|
111
|
+
|
|
112
|
+
{brand ? (
|
|
113
|
+
<View style={styles.foot}>
|
|
114
|
+
<Text style={[styles.wm, { fontSize: S.wm }]}>lockin90.com</Text>
|
|
115
|
+
</View>
|
|
116
|
+
) : null}
|
|
117
|
+
</View>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const styles = StyleSheet.create({
|
|
122
|
+
card: {
|
|
123
|
+
width: '100%',
|
|
124
|
+
overflow: 'hidden',
|
|
125
|
+
justifyContent: 'space-between',
|
|
126
|
+
borderRadius: radii.lg,
|
|
127
|
+
borderWidth: 1,
|
|
128
|
+
borderColor: colors.border2,
|
|
129
|
+
backgroundColor: colors.void,
|
|
130
|
+
...nativeShadows.elev2,
|
|
131
|
+
},
|
|
132
|
+
// aurora wash — a subtle token-gradient over the void surface (kept low so the
|
|
133
|
+
// void dominates the center and light --text stays legible, ~matching the web mesh)
|
|
134
|
+
wash: { ...StyleSheet.absoluteFillObject, opacity: 0.32 },
|
|
135
|
+
top: { position: 'relative' },
|
|
136
|
+
body: { flex: 1, position: 'relative', alignItems: 'center', justifyContent: 'center', gap: 10 },
|
|
137
|
+
eyebrow: { fontFamily: fonts.mono, letterSpacing: 2, textTransform: 'uppercase', color: colors.textDim },
|
|
138
|
+
metric: { fontFamily: fonts.display, fontWeight: '700', letterSpacing: -1.6, color: colors.text },
|
|
139
|
+
score: { fontFamily: fonts.display, fontWeight: '700', letterSpacing: -1.4, color: colors.text, textAlign: 'center' },
|
|
140
|
+
metricLabel: { fontFamily: fonts.mono, letterSpacing: 1.6, textTransform: 'uppercase', color: colors.textDim },
|
|
141
|
+
stats: { flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'center', gap: 16, marginTop: 6 },
|
|
142
|
+
stat: { alignItems: 'center' },
|
|
143
|
+
foot: { position: 'relative', alignItems: 'center' },
|
|
144
|
+
wm: { fontFamily: fonts.mono, letterSpacing: 0.6, color: colors.textFaint },
|
|
145
|
+
});
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { useEffect, useRef, type ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Modal as RNModal,
|
|
4
|
+
View,
|
|
5
|
+
Text,
|
|
6
|
+
Pressable,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
Animated,
|
|
9
|
+
KeyboardAvoidingView,
|
|
10
|
+
PanResponder,
|
|
11
|
+
Platform,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
import { colors, radii, fonts } from '@lockin90/tokens';
|
|
14
|
+
|
|
15
|
+
export interface SheetProps {
|
|
16
|
+
/** Show the sheet. When false, nothing renders. */
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/** Called on scrim tap or Android back. */
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
/** Edge the panel slides in from. Bottom = full-width bottom sheet with a
|
|
21
|
+
* drag handle; right/left = full-height side drawer. */
|
|
22
|
+
side?: 'bottom' | 'right' | 'left';
|
|
23
|
+
/** Optional header title (font-display). */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Body content. */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
30
|
+
|
|
31
|
+
/** Fraction of the sheet height the user must drag past to dismiss. */
|
|
32
|
+
const DISMISS_FRACTION = 0.25;
|
|
33
|
+
/** Downward fling velocity (px/ms) that dismisses regardless of distance. */
|
|
34
|
+
const DISMISS_VELOCITY = 0.5;
|
|
35
|
+
|
|
36
|
+
/** Side drawer + bottom sheet over a dimmed scrim. The bottom variant is
|
|
37
|
+
* anchored to the bottom edge with rounded top corners and a centered drag
|
|
38
|
+
* handle; right/left variants are full-height ~360px edge panels. Closes on
|
|
39
|
+
* scrim tap + Android back; the panel stops propagation. The bottom variant's
|
|
40
|
+
* header strip (handle + title) is draggable: pull down past ~25% of the
|
|
41
|
+
* sheet height (or fling) to dismiss, otherwise it springs back. */
|
|
42
|
+
export function Sheet({ open = true, onClose, side = 'bottom', title, children }: SheetProps) {
|
|
43
|
+
const isBottom = side === 'bottom';
|
|
44
|
+
const align = isBottom ? styles.scrimBottom : side === 'right' ? styles.scrimRight : styles.scrimLeft;
|
|
45
|
+
const panel = isBottom ? styles.panelBottom : side === 'right' ? styles.panelRight : styles.panelLeft;
|
|
46
|
+
|
|
47
|
+
// ---- drag-to-dismiss (bottom sheet only) ----
|
|
48
|
+
const dragY = useRef(new Animated.Value(0)).current;
|
|
49
|
+
const sheetHeightRef = useRef(0);
|
|
50
|
+
const onCloseRef = useRef(onClose);
|
|
51
|
+
onCloseRef.current = onClose;
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (open) dragY.setValue(0);
|
|
55
|
+
}, [open, dragY]);
|
|
56
|
+
|
|
57
|
+
const springBack = useRef(() => {
|
|
58
|
+
Animated.spring(dragY, { toValue: 0, bounciness: 4, useNativeDriver: true }).start();
|
|
59
|
+
}).current;
|
|
60
|
+
|
|
61
|
+
const panResponder = useRef(
|
|
62
|
+
PanResponder.create({
|
|
63
|
+
onStartShouldSetPanResponder: () => true,
|
|
64
|
+
onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dy) > 2,
|
|
65
|
+
onPanResponderTerminationRequest: () => false,
|
|
66
|
+
onPanResponderMove: (_e, g) => {
|
|
67
|
+
dragY.setValue(Math.max(0, g.dy));
|
|
68
|
+
},
|
|
69
|
+
onPanResponderRelease: (_e, g) => {
|
|
70
|
+
const height = sheetHeightRef.current || 320;
|
|
71
|
+
const shouldDismiss =
|
|
72
|
+
onCloseRef.current && (g.dy > height * DISMISS_FRACTION || (g.dy > 0 && g.vy > DISMISS_VELOCITY));
|
|
73
|
+
if (shouldDismiss) {
|
|
74
|
+
Animated.timing(dragY, { toValue: height, duration: 180, useNativeDriver: true }).start(
|
|
75
|
+
() => onCloseRef.current?.(),
|
|
76
|
+
);
|
|
77
|
+
} else {
|
|
78
|
+
springBack();
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
onPanResponderTerminate: () => springBack(),
|
|
82
|
+
}),
|
|
83
|
+
).current;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<RNModal transparent visible={open} animationType="slide" onRequestClose={onClose} statusBarTranslucent>
|
|
87
|
+
<Pressable style={styles.scrim} onPress={() => onClose?.()}>
|
|
88
|
+
{/* Keyboard avoidance (same pattern as the kit Select): the avoider
|
|
89
|
+
fills the scrim and pads itself by the iOS keyboard height, so an
|
|
90
|
+
input-bearing sheet rises above the keyboard instead of being
|
|
91
|
+
covered. `box-none` keeps scrim taps dismissing as before. */}
|
|
92
|
+
<KeyboardAvoidingView
|
|
93
|
+
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
94
|
+
pointerEvents="box-none"
|
|
95
|
+
style={[styles.avoider, align]}
|
|
96
|
+
>
|
|
97
|
+
<AnimatedPressable
|
|
98
|
+
style={[styles.panel, panel, isBottom && { transform: [{ translateY: dragY }] }]}
|
|
99
|
+
onPress={() => {}}
|
|
100
|
+
accessibilityViewIsModal
|
|
101
|
+
onLayout={
|
|
102
|
+
isBottom
|
|
103
|
+
? (e) => {
|
|
104
|
+
sheetHeightRef.current = e.nativeEvent.layout.height;
|
|
105
|
+
}
|
|
106
|
+
: undefined
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
{isBottom ? (
|
|
110
|
+
<View
|
|
111
|
+
hitSlop={{ top: 8, bottom: 10, left: 16, right: 16 }}
|
|
112
|
+
{...panResponder.panHandlers}
|
|
113
|
+
>
|
|
114
|
+
<View style={styles.handle} pointerEvents="none" />
|
|
115
|
+
{title ? <Text style={styles.title}>{title}</Text> : null}
|
|
116
|
+
</View>
|
|
117
|
+
) : title ? (
|
|
118
|
+
<Text style={styles.title}>{title}</Text>
|
|
119
|
+
) : null}
|
|
120
|
+
<View style={styles.body}>
|
|
121
|
+
{typeof children === 'string' ? <Text style={styles.bodyText}>{children}</Text> : children}
|
|
122
|
+
</View>
|
|
123
|
+
</AnimatedPressable>
|
|
124
|
+
</KeyboardAvoidingView>
|
|
125
|
+
</Pressable>
|
|
126
|
+
</RNModal>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const styles = StyleSheet.create({
|
|
131
|
+
scrim: {
|
|
132
|
+
...StyleSheet.absoluteFillObject,
|
|
133
|
+
flex: 1,
|
|
134
|
+
backgroundColor: 'rgba(0,0,0,0.55)',
|
|
135
|
+
},
|
|
136
|
+
// Fills the scrim so the panel's %-heights keep a definite parent; the
|
|
137
|
+
// side-alignment styles now live here (the avoider positions the panel).
|
|
138
|
+
avoider: { flex: 1 },
|
|
139
|
+
scrimBottom: { justifyContent: 'flex-end' },
|
|
140
|
+
scrimRight: { flexDirection: 'row', justifyContent: 'flex-end' },
|
|
141
|
+
scrimLeft: { flexDirection: 'row', justifyContent: 'flex-start' },
|
|
142
|
+
|
|
143
|
+
panel: {
|
|
144
|
+
backgroundColor: colors.bg1,
|
|
145
|
+
borderWidth: 1,
|
|
146
|
+
borderColor: colors.border,
|
|
147
|
+
shadowColor: '#000',
|
|
148
|
+
shadowOpacity: 0.7,
|
|
149
|
+
shadowRadius: 50,
|
|
150
|
+
shadowOffset: { width: 0, height: -18 },
|
|
151
|
+
elevation: 20,
|
|
152
|
+
},
|
|
153
|
+
panelBottom: {
|
|
154
|
+
width: '100%',
|
|
155
|
+
maxHeight: '86%',
|
|
156
|
+
paddingTop: 8,
|
|
157
|
+
paddingHorizontal: 16,
|
|
158
|
+
paddingBottom: 18,
|
|
159
|
+
borderBottomWidth: 0,
|
|
160
|
+
borderTopLeftRadius: radii.lg,
|
|
161
|
+
borderTopRightRadius: radii.lg,
|
|
162
|
+
},
|
|
163
|
+
panelRight: {
|
|
164
|
+
height: '100%',
|
|
165
|
+
width: 360,
|
|
166
|
+
maxWidth: '100%',
|
|
167
|
+
paddingVertical: 18,
|
|
168
|
+
paddingHorizontal: 20,
|
|
169
|
+
borderTopLeftRadius: radii.lg,
|
|
170
|
+
borderBottomLeftRadius: radii.lg,
|
|
171
|
+
},
|
|
172
|
+
panelLeft: {
|
|
173
|
+
height: '100%',
|
|
174
|
+
width: 360,
|
|
175
|
+
maxWidth: '100%',
|
|
176
|
+
paddingVertical: 18,
|
|
177
|
+
paddingHorizontal: 20,
|
|
178
|
+
borderTopRightRadius: radii.lg,
|
|
179
|
+
borderBottomRightRadius: radii.lg,
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
handle: {
|
|
183
|
+
width: 40,
|
|
184
|
+
height: 4,
|
|
185
|
+
marginTop: 2,
|
|
186
|
+
marginBottom: 10,
|
|
187
|
+
alignSelf: 'center',
|
|
188
|
+
borderRadius: 999,
|
|
189
|
+
backgroundColor: colors.border2,
|
|
190
|
+
},
|
|
191
|
+
title: {
|
|
192
|
+
paddingTop: 2,
|
|
193
|
+
paddingHorizontal: 2,
|
|
194
|
+
fontFamily: fonts.display,
|
|
195
|
+
fontWeight: '700',
|
|
196
|
+
fontSize: 16,
|
|
197
|
+
letterSpacing: -0.16,
|
|
198
|
+
color: colors.text,
|
|
199
|
+
},
|
|
200
|
+
body: {
|
|
201
|
+
flexShrink: 1,
|
|
202
|
+
paddingTop: 12,
|
|
203
|
+
paddingHorizontal: 2,
|
|
204
|
+
paddingBottom: 2,
|
|
205
|
+
},
|
|
206
|
+
bodyText: {
|
|
207
|
+
fontFamily: fonts.ui,
|
|
208
|
+
fontSize: 14,
|
|
209
|
+
lineHeight: 22,
|
|
210
|
+
color: colors.textDim,
|
|
211
|
+
},
|
|
212
|
+
});
|