@stisocial/ui 0.1.0 → 0.2.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/CHANGELOG.md +32 -0
- package/README.md +25 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.css +73 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.d.ts +27 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.js +80 -0
- package/dist/agency/FacebookPostPreview/FacebookPostPreview.module.js +15 -0
- package/dist/agency/FacebookPostPreview/index.d.ts +2 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.css +84 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.d.ts +23 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.js +80 -0
- package/dist/agency/InstagramPostPreview/InstagramPostPreview.module.js +17 -0
- package/dist/agency/InstagramPostPreview/index.d.ts +2 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.css +84 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.d.ts +24 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.js +88 -0
- package/dist/agency/InstagramReelPreview/InstagramReelPreview.module.js +13 -0
- package/dist/agency/InstagramReelPreview/index.d.ts +2 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.css +105 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.d.ts +23 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.js +59 -0
- package/dist/agency/InstagramStoryPreview/InstagramStoryPreview.module.js +14 -0
- package/dist/agency/InstagramStoryPreview/index.d.ts +2 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.css +83 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.d.ts +30 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.js +99 -0
- package/dist/agency/LinkedInPostPreview/LinkedInPostPreview.module.js +16 -0
- package/dist/agency/LinkedInPostPreview/index.d.ts +2 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.css +96 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.d.ts +23 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.js +57 -0
- package/dist/agency/PinterestPinPreview/PinterestPinPreview.module.js +15 -0
- package/dist/agency/PinterestPinPreview/index.d.ts +2 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.css +101 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.d.ts +19 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.js +82 -0
- package/dist/agency/ThreadsPostPreview/ThreadsPostPreview.module.js +17 -0
- package/dist/agency/ThreadsPostPreview/index.d.ts +2 -0
- package/dist/agency/TikTokPreview/TikTokPreview.css +84 -0
- package/dist/agency/TikTokPreview/TikTokPreview.d.ts +25 -0
- package/dist/agency/TikTokPreview/TikTokPreview.js +95 -0
- package/dist/agency/TikTokPreview/TikTokPreview.module.js +13 -0
- package/dist/agency/TikTokPreview/index.d.ts +2 -0
- package/dist/agency/XPostPreview/XPostPreview.css +89 -0
- package/dist/agency/XPostPreview/XPostPreview.d.ts +20 -0
- package/dist/agency/XPostPreview/XPostPreview.js +91 -0
- package/dist/agency/XPostPreview/XPostPreview.module.js +16 -0
- package/dist/agency/XPostPreview/index.d.ts +2 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.css +55 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.d.ts +20 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.js +49 -0
- package/dist/agency/YouTubeThumbnailPreview/YouTubeThumbnailPreview.module.js +13 -0
- package/dist/agency/YouTubeThumbnailPreview/index.d.ts +2 -0
- package/dist/agency/_shared/Preview.css +226 -0
- package/dist/agency/_shared/Preview.d.ts +27 -0
- package/dist/agency/_shared/Preview.js +117 -0
- package/dist/agency/_shared/Preview.module.js +21 -0
- package/dist/agency/_shared/platforms.d.ts +24 -0
- package/dist/agency/_shared/platforms.js +109 -0
- package/dist/agency/index.d.ts +23 -0
- package/dist/agency/index.js +12 -0
- package/dist/ai/AiDisclosure/AiDisclosure.css +99 -0
- package/dist/ai/AiDisclosure/AiDisclosure.d.ts +28 -0
- package/dist/ai/AiDisclosure/AiDisclosure.js +52 -0
- package/dist/ai/AiDisclosure/AiDisclosure.module.js +10 -0
- package/dist/ai/AiDisclosure/index.d.ts +2 -0
- package/dist/ai/AttachmentChip/AttachmentChip.css +144 -0
- package/dist/ai/AttachmentChip/AttachmentChip.d.ts +40 -0
- package/dist/ai/AttachmentChip/AttachmentChip.js +140 -0
- package/dist/ai/AttachmentChip/AttachmentChip.module.js +13 -0
- package/dist/ai/AttachmentChip/index.d.ts +2 -0
- package/dist/ai/ChatThread/ChatThread.css +66 -0
- package/dist/ai/ChatThread/ChatThread.d.ts +20 -0
- package/dist/ai/ChatThread/ChatThread.js +87 -0
- package/dist/ai/ChatThread/ChatThread.module.js +10 -0
- package/dist/ai/ChatThread/ChatThreadMessage.css +80 -0
- package/dist/ai/ChatThread/ChatThreadMessage.d.ts +23 -0
- package/dist/ai/ChatThread/ChatThreadMessage.js +41 -0
- package/dist/ai/ChatThread/ChatThreadMessage.module.js +10 -0
- package/dist/ai/ChatThread/index.d.ts +3 -0
- package/dist/ai/ConversationList/ConversationList.css +175 -0
- package/dist/ai/ConversationList/ConversationList.d.ts +33 -0
- package/dist/ai/ConversationList/ConversationList.js +133 -0
- package/dist/ai/ConversationList/ConversationList.module.js +18 -0
- package/dist/ai/ConversationList/groups.d.ts +23 -0
- package/dist/ai/ConversationList/groups.js +47 -0
- package/dist/ai/MessageActions/MessageActions.css +9 -0
- package/dist/ai/MessageActions/MessageActions.d.ts +33 -0
- package/dist/ai/MessageActions/MessageActions.js +89 -0
- package/dist/ai/MessageActions/MessageActions.module.js +4 -0
- package/dist/ai/MessageActions/index.d.ts +2 -0
- package/dist/ai/ModelSelect/ModelSelect.css +7 -0
- package/dist/ai/ModelSelect/ModelSelect.d.ts +38 -0
- package/dist/ai/ModelSelect/ModelSelect.js +41 -0
- package/dist/ai/ModelSelect/ModelSelect.module.js +4 -0
- package/dist/ai/ModelSelect/index.d.ts +2 -0
- package/dist/ai/PromptInput/PromptInput.css +176 -0
- package/dist/ai/PromptInput/PromptInput.d.ts +54 -0
- package/dist/ai/PromptInput/PromptInput.js +199 -0
- package/dist/ai/PromptInput/PromptInput.module.js +15 -0
- package/dist/ai/PromptInput/index.d.ts +2 -0
- package/dist/ai/SourceList/SourceList.css +226 -0
- package/dist/ai/SourceList/SourceList.d.ts +36 -0
- package/dist/ai/SourceList/SourceList.js +102 -0
- package/dist/ai/SourceList/SourceList.module.js +17 -0
- package/dist/ai/StreamingText/StreamingText.css +69 -0
- package/dist/ai/StreamingText/StreamingText.d.ts +33 -0
- package/dist/ai/StreamingText/StreamingText.js +98 -0
- package/dist/ai/StreamingText/StreamingText.module.js +9 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.css +198 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.d.ts +35 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.js +54 -0
- package/dist/ai/SuggestedPrompts/SuggestedPrompts.module.js +14 -0
- package/dist/ai/SuggestedPrompts/index.d.ts +2 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.css +83 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.d.ts +16 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.js +47 -0
- package/dist/ai/ThinkingIndicator/ThinkingIndicator.module.js +10 -0
- package/dist/ai/ToolCallCard/ToolCallCard.css +249 -0
- package/dist/ai/ToolCallCard/ToolCallCard.d.ts +39 -0
- package/dist/ai/ToolCallCard/ToolCallCard.js +157 -0
- package/dist/ai/ToolCallCard/ToolCallCard.module.js +22 -0
- package/dist/ai/ToolCallCard/index.d.ts +2 -0
- package/dist/ai/_internal/glyphs.js +45 -0
- package/dist/ai/index.d.ts +23 -0
- package/dist/ai/index.js +15 -0
- package/dist/charts/AreaChart/AreaChart.css +9 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +13 -0
- package/dist/charts/AreaChart/AreaChart.js +19 -0
- package/dist/charts/AreaChart/AreaChart.module.js +4 -0
- package/dist/charts/AreaChart/index.d.ts +2 -0
- package/dist/charts/BarChart/BarChart.css +9 -0
- package/dist/charts/BarChart/BarChart.d.ts +17 -0
- package/dist/charts/BarChart/BarChart.js +21 -0
- package/dist/charts/BarChart/BarChart.module.js +4 -0
- package/dist/charts/BarChart/index.d.ts +2 -0
- package/dist/charts/ChartLegend/ChartLegend.css +110 -0
- package/dist/charts/ChartLegend/ChartLegend.d.ts +36 -0
- package/dist/charts/ChartLegend/ChartLegend.js +55 -0
- package/dist/charts/ChartLegend/ChartLegend.module.js +11 -0
- package/dist/charts/ChartLegend/index.d.ts +2 -0
- package/dist/charts/ChartTable/ChartTable.css +109 -0
- package/dist/charts/ChartTable/ChartTable.d.ts +43 -0
- package/dist/charts/ChartTable/ChartTable.js +60 -0
- package/dist/charts/ChartTable/ChartTable.module.js +12 -0
- package/dist/charts/ChartTable/index.d.ts +2 -0
- package/dist/charts/ChartTooltip/ChartTooltip.css +77 -0
- package/dist/charts/ChartTooltip/ChartTooltip.d.ts +29 -0
- package/dist/charts/ChartTooltip/ChartTooltip.js +48 -0
- package/dist/charts/ChartTooltip/ChartTooltip.module.js +12 -0
- package/dist/charts/ChartTooltip/index.d.ts +2 -0
- package/dist/charts/ComboChart/ComboChart.css +9 -0
- package/dist/charts/ComboChart/ComboChart.d.ts +21 -0
- package/dist/charts/ComboChart/ComboChart.js +19 -0
- package/dist/charts/ComboChart/ComboChart.module.js +4 -0
- package/dist/charts/ComboChart/index.d.ts +3 -0
- package/dist/charts/LineChart/LineChart.css +9 -0
- package/dist/charts/LineChart/LineChart.d.ts +13 -0
- package/dist/charts/LineChart/LineChart.js +19 -0
- package/dist/charts/LineChart/LineChart.module.js +4 -0
- package/dist/charts/LineChart/index.d.ts +2 -0
- package/dist/charts/StackedBarChart/StackedBarChart.css +9 -0
- package/dist/charts/StackedBarChart/StackedBarChart.d.ts +17 -0
- package/dist/charts/StackedBarChart/StackedBarChart.js +21 -0
- package/dist/charts/StackedBarChart/StackedBarChart.module.js +4 -0
- package/dist/charts/StackedBarChart/index.d.ts +2 -0
- package/dist/charts/_internal/Bars.d.ts +31 -0
- package/dist/charts/_internal/Bars.js +295 -0
- package/dist/charts/_internal/LineArea.d.ts +32 -0
- package/dist/charts/_internal/LineArea.js +150 -0
- package/dist/charts/_internal/category.d.ts +19 -0
- package/dist/charts/_internal/category.js +139 -0
- package/dist/charts/_internal/format.d.ts +14 -0
- package/dist/charts/_internal/format.js +41 -0
- package/dist/charts/_internal/frame/ChartFrame.css +113 -0
- package/dist/charts/_internal/frame/ChartFrame.d.ts +3 -0
- package/dist/charts/_internal/frame/ChartFrame.js +217 -0
- package/dist/charts/_internal/frame/ChartFrame.module.js +17 -0
- package/dist/charts/_internal/marks/marks.css +195 -0
- package/dist/charts/_internal/marks/marks.js +192 -0
- package/dist/charts/_internal/marks/marks.module.js +12 -0
- package/dist/charts/_internal/math.js +107 -0
- package/dist/charts/_internal/shapes.d.ts +1 -0
- package/dist/charts/_internal/shapes.js +127 -0
- package/dist/charts/index.d.ts +20 -0
- package/dist/charts/index.js +9 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.css +54 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.d.ts +42 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.js +94 -0
- package/dist/commerce/AddToCartButton/AddToCartButton.module.js +10 -0
- package/dist/commerce/AddToCartButton/index.d.ts +2 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.css +77 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.d.ts +35 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.js +60 -0
- package/dist/commerce/PriceDisplay/PriceDisplay.module.js +10 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.css +108 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.d.ts +32 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.js +86 -0
- package/dist/commerce/QuantityStepper/QuantityStepper.module.js +9 -0
- package/dist/commerce/QuantityStepper/index.d.ts +2 -0
- package/dist/commerce/StockBadge/StockBadge.d.ts +31 -0
- package/dist/commerce/StockBadge/StockBadge.js +47 -0
- package/dist/commerce/StockBadge/index.d.ts +2 -0
- package/dist/commerce/VariantSelector/VariantSelector.css +202 -0
- package/dist/commerce/VariantSelector/VariantSelector.d.ts +44 -0
- package/dist/commerce/VariantSelector/VariantSelector.js +77 -0
- package/dist/commerce/VariantSelector/VariantSelector.module.js +13 -0
- package/dist/commerce/VariantSelector/index.d.ts +2 -0
- package/dist/commerce/index.d.ts +10 -0
- package/dist/commerce/index.js +6 -0
- package/dist/components/Accordion/Accordion.css +176 -0
- package/dist/components/Accordion/Accordion.d.ts +40 -0
- package/dist/components/Accordion/Accordion.js +90 -0
- package/dist/components/Accordion/Accordion.module.js +17 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Disclosure/Disclosure.css +162 -0
- package/dist/components/Disclosure/Disclosure.d.ts +32 -0
- package/dist/components/Disclosure/Disclosure.js +60 -0
- package/dist/components/Disclosure/Disclosure.module.js +15 -0
- package/dist/components/Disclosure/index.d.ts +2 -0
- package/dist/components/DocumentLayout/DocumentLayout.css +202 -0
- package/dist/components/DocumentLayout/DocumentLayout.d.ts +33 -0
- package/dist/components/DocumentLayout/DocumentLayout.js +69 -0
- package/dist/components/DocumentLayout/DocumentLayout.module.js +20 -0
- package/dist/components/DocumentLayout/index.d.ts +2 -0
- package/dist/components/DocumentTable/DocumentTable.css +149 -0
- package/dist/components/DocumentTable/DocumentTable.d.ts +40 -0
- package/dist/components/DocumentTable/DocumentTable.js +67 -0
- package/dist/components/DocumentTable/DocumentTable.module.js +12 -0
- package/dist/components/DocumentTable/index.d.ts +2 -0
- package/dist/components/ErrorPage/ErrorPage.css +181 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +44 -0
- package/dist/components/ErrorPage/ErrorPage.js +145 -0
- package/dist/components/ErrorPage/ErrorPage.module.js +17 -0
- package/dist/components/ErrorPage/index.d.ts +2 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.css +59 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.d.ts +47 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.js +198 -0
- package/dist/components/FeedbackWidget/FeedbackWidget.module.js +11 -0
- package/dist/components/FeedbackWidget/index.d.ts +2 -0
- package/dist/components/Figure/Figure.css +64 -0
- package/dist/components/Figure/Figure.d.ts +24 -0
- package/dist/components/Figure/Figure.js +38 -0
- package/dist/components/Figure/Figure.module.js +10 -0
- package/dist/components/Figure/index.d.ts +2 -0
- package/dist/components/FileList/FileList.css +160 -0
- package/dist/components/FileList/FileList.d.ts +45 -0
- package/dist/components/FileList/FileList.js +146 -0
- package/dist/components/FileList/FileList.module.js +15 -0
- package/dist/components/FileList/index.d.ts +2 -0
- package/dist/components/FilterPanel/FilterPanel.js +1 -1
- package/dist/components/IconPicker/IconPicker.js +1 -1
- package/dist/components/LinkRows/LinkRows.css +135 -0
- package/dist/components/LinkRows/LinkRows.d.ts +32 -0
- package/dist/components/LinkRows/LinkRows.js +62 -0
- package/dist/components/LinkRows/LinkRows.module.js +15 -0
- package/dist/components/LinkRows/index.d.ts +2 -0
- package/dist/components/NotificationCenter/NotificationCenter.js +1 -1
- package/dist/components/OnboardingChecklist/OnboardingChecklist.js +1 -1
- package/dist/components/PageNumber/PageNumber.css +21 -0
- package/dist/components/PageNumber/PageNumber.d.ts +23 -0
- package/dist/components/PageNumber/PageNumber.js +33 -0
- package/dist/components/PageNumber/PageNumber.module.js +4 -0
- package/dist/components/PaymentInfo/PaymentInfo.css +116 -0
- package/dist/components/PaymentInfo/PaymentInfo.d.ts +41 -0
- package/dist/components/PaymentInfo/PaymentInfo.js +115 -0
- package/dist/components/PaymentInfo/PaymentInfo.module.js +15 -0
- package/dist/components/PaymentInfo/index.d.ts +2 -0
- package/dist/components/PersonItem/PersonItem.css +112 -0
- package/dist/components/PersonItem/PersonItem.d.ts +31 -0
- package/dist/components/PersonItem/PersonItem.js +54 -0
- package/dist/components/PersonItem/PersonItem.module.js +11 -0
- package/dist/components/PersonItem/index.d.ts +2 -0
- package/dist/components/PhoneField/PhoneField.js +1 -1
- package/dist/components/ReadMore/ReadMore.js +1 -1
- package/dist/components/SideNav/SideNav.js +1 -1
- package/dist/components/SignaturePad/SignaturePad.js +1 -1
- package/dist/components/SplitButton/SplitButton.js +1 -1
- package/dist/components/Table/Table.css +150 -0
- package/dist/components/Table/Table.d.ts +54 -0
- package/dist/components/Table/Table.js +75 -0
- package/dist/components/Table/Table.module.js +14 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.js +1 -1
- package/dist/components/TimeSlotPicker/TimeSlotPicker.d.ts +1 -11
- package/dist/components/TimeSlotPicker/TimeSlotPicker.js +2 -24
- package/dist/components/TimeSlotPicker/index.d.ts +3 -2
- package/dist/components/TimeSlotPicker/timeSlots.d.ts +12 -0
- package/dist/components/TimeSlotPicker/timeSlots.js +25 -0
- package/dist/components/TotalsBlock/TotalsBlock.css +86 -0
- package/dist/components/TotalsBlock/TotalsBlock.d.ts +32 -0
- package/dist/components/TotalsBlock/TotalsBlock.js +88 -0
- package/dist/components/TotalsBlock/TotalsBlock.module.js +10 -0
- package/dist/components/TotalsBlock/index.d.ts +3 -0
- package/dist/components/TotalsBlock/totals.d.ts +28 -0
- package/dist/components/TotalsBlock/totals.js +38 -0
- package/dist/components/TrashView/TrashView.css +166 -0
- package/dist/components/TrashView/TrashView.d.ts +49 -0
- package/dist/components/TrashView/TrashView.js +244 -0
- package/dist/components/TrashView/TrashView.module.js +22 -0
- package/dist/components/TrashView/index.d.ts +2 -0
- package/dist/components/TreeSelect/TreeSelect.js +1 -1
- package/dist/components/UploadQueue/UploadQueue.js +1 -1
- package/dist/components/Watermark/Watermark.css +51 -0
- package/dist/components/Watermark/Watermark.d.ts +23 -0
- package/dist/components/Watermark/Watermark.js +54 -0
- package/dist/components/Watermark/Watermark.module.js +8 -0
- package/dist/components/WhatsNew/WhatsNew.css +196 -0
- package/dist/components/WhatsNew/WhatsNew.d.ts +57 -0
- package/dist/components/WhatsNew/WhatsNew.js +191 -0
- package/dist/components/WhatsNew/WhatsNew.module.js +27 -0
- package/dist/components/WhatsNew/index.d.ts +2 -0
- package/dist/components/_document/text.js +14 -0
- package/dist/components/_document/types.d.ts +36 -0
- package/dist/components/_document/types.js +8 -0
- package/dist/components/_internal/listbox/SelectShell.js +1 -1
- package/dist/document/index.d.ts +13 -0
- package/dist/document/index.js +9 -0
- package/dist/editor/CodeEditor/CodeEditor.css +312 -0
- package/dist/editor/CodeEditor/CodeEditor.d.ts +66 -0
- package/dist/editor/CodeEditor/CodeEditor.js +256 -0
- package/dist/editor/CodeEditor/CodeEditor.module.js +32 -0
- package/dist/editor/CodeEditor/codeEdits.d.ts +1 -0
- package/dist/editor/CodeEditor/codeEdits.js +284 -0
- package/dist/editor/CodeEditor/highlight.js +195 -0
- package/dist/editor/CodeEditor/index.d.ts +3 -0
- package/dist/editor/JsonEditor/JsonEditor.css +10 -0
- package/dist/editor/JsonEditor/JsonEditor.d.ts +43 -0
- package/dist/editor/JsonEditor/JsonEditor.js +133 -0
- package/dist/editor/JsonEditor/JsonEditor.module.js +4 -0
- package/dist/editor/JsonEditor/index.d.ts +3 -0
- package/dist/editor/JsonEditor/json.d.ts +44 -0
- package/dist/editor/JsonEditor/json.js +246 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.css +173 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.d.ts +47 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.js +371 -0
- package/dist/editor/MarkdownEditor/MarkdownEditor.module.js +18 -0
- package/dist/editor/MarkdownEditor/commands.js +198 -0
- package/dist/editor/MarkdownEditor/index.d.ts +2 -0
- package/dist/editor/_shared/FormatIcons.js +138 -0
- package/dist/editor/_shared/textEdit.js +76 -0
- package/dist/editor/index.d.ts +9 -0
- package/dist/editor/index.js +5 -0
- package/dist/email/EmailButton/EmailButton.d.ts +22 -0
- package/dist/email/EmailButton/EmailButton.js +102 -0
- package/dist/email/EmailButton/index.d.ts +2 -0
- package/dist/email/EmailCallout/EmailCallout.d.ts +14 -0
- package/dist/email/EmailCallout/EmailCallout.js +42 -0
- package/dist/email/EmailCallout/index.d.ts +2 -0
- package/dist/email/EmailCode/EmailCode.d.ts +15 -0
- package/dist/email/EmailCode/EmailCode.js +58 -0
- package/dist/email/EmailCode/index.d.ts +2 -0
- package/dist/email/EmailColumns/EmailColumns.d.ts +18 -0
- package/dist/email/EmailColumns/EmailColumns.js +49 -0
- package/dist/email/EmailColumns/index.d.ts +2 -0
- package/dist/email/EmailDivider/EmailDivider.d.ts +7 -0
- package/dist/email/EmailDivider/EmailDivider.js +24 -0
- package/dist/email/EmailDivider/index.d.ts +2 -0
- package/dist/email/EmailFooter/EmailFooter.d.ts +30 -0
- package/dist/email/EmailFooter/EmailFooter.js +64 -0
- package/dist/email/EmailFooter/index.d.ts +2 -0
- package/dist/email/EmailHeader/EmailHeader.d.ts +23 -0
- package/dist/email/EmailHeader/EmailHeader.js +75 -0
- package/dist/email/EmailHeader/index.d.ts +2 -0
- package/dist/email/EmailHeading/EmailHeading.d.ts +11 -0
- package/dist/email/EmailHeading/EmailHeading.js +43 -0
- package/dist/email/EmailHeading/index.d.ts +2 -0
- package/dist/email/EmailImage/EmailImage.d.ts +25 -0
- package/dist/email/EmailImage/EmailImage.js +53 -0
- package/dist/email/EmailImage/index.d.ts +2 -0
- package/dist/email/EmailLayout/EmailLayout.d.ts +30 -0
- package/dist/email/EmailLayout/EmailLayout.js +79 -0
- package/dist/email/EmailLayout/emailDocument.d.ts +16 -0
- package/dist/email/EmailLayout/emailDocument.js +36 -0
- package/dist/email/EmailLayout/index.d.ts +3 -0
- package/dist/email/EmailList/EmailList.d.ts +10 -0
- package/dist/email/EmailList/EmailList.js +28 -0
- package/dist/email/EmailList/index.d.ts +2 -0
- package/dist/email/EmailPreheader/EmailPreheader.d.ts +14 -0
- package/dist/email/EmailPreheader/EmailPreheader.js +30 -0
- package/dist/email/EmailPreheader/index.d.ts +2 -0
- package/dist/email/EmailProductRow/EmailProductRow.d.ts +23 -0
- package/dist/email/EmailProductRow/EmailProductRow.js +112 -0
- package/dist/email/EmailProductRow/index.d.ts +2 -0
- package/dist/email/EmailSocialLinks/EmailSocialLinks.d.ts +19 -0
- package/dist/email/EmailSocialLinks/EmailSocialLinks.js +53 -0
- package/dist/email/EmailSocialLinks/index.d.ts +2 -0
- package/dist/email/EmailStats/EmailStats.d.ts +23 -0
- package/dist/email/EmailStats/EmailStats.js +86 -0
- package/dist/email/EmailStats/index.d.ts +2 -0
- package/dist/email/EmailTable/EmailTable.d.ts +24 -0
- package/dist/email/EmailTable/EmailTable.js +90 -0
- package/dist/email/EmailTable/index.d.ts +2 -0
- package/dist/email/EmailText/EmailText.d.ts +13 -0
- package/dist/email/EmailText/EmailText.js +35 -0
- package/dist/email/EmailText/index.d.ts +2 -0
- package/dist/email/_shared/theme.d.ts +8 -0
- package/dist/email/_shared/theme.js +90 -0
- package/dist/email/index.d.ts +36 -0
- package/dist/email/index.js +19 -0
- package/dist/icons/generated/index.js +8 -8
- package/dist/icons/index.js +8 -8
- package/dist/id/AccountMenu/AccountMenu.css +194 -0
- package/dist/id/AccountMenu/AccountMenu.d.ts +73 -0
- package/dist/id/AccountMenu/AccountMenu.js +171 -0
- package/dist/id/AccountMenu/AccountMenu.module.js +21 -0
- package/dist/id/AccountMenu/index.d.ts +2 -0
- package/dist/id/AppSwitcher/AppSwitcher.css +231 -0
- package/dist/id/AppSwitcher/AppSwitcher.d.ts +56 -0
- package/dist/id/AppSwitcher/AppSwitcher.js +141 -0
- package/dist/id/AppSwitcher/AppSwitcher.module.js +17 -0
- package/dist/id/AppSwitcher/index.d.ts +2 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.css +222 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.d.ts +62 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.js +189 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.module.js +16 -0
- package/dist/id/OrgSwitcher/index.d.ts +2 -0
- package/dist/id/PermissionGate/PermissionGate.css +68 -0
- package/dist/id/PermissionGate/PermissionGate.d.ts +32 -0
- package/dist/id/PermissionGate/PermissionGate.js +58 -0
- package/dist/id/PermissionGate/PermissionGate.module.js +11 -0
- package/dist/id/PermissionGate/index.d.ts +2 -0
- package/dist/id/SignInButton/SignInButton.css +179 -0
- package/dist/id/SignInButton/SignInButton.d.ts +29 -0
- package/dist/id/SignInButton/SignInButton.js +53 -0
- package/dist/id/SignInButton/SignInButton.module.js +10 -0
- package/dist/id/_internal/ActionItem/ActionItem.css +143 -0
- package/dist/id/_internal/ActionItem/ActionItem.js +68 -0
- package/dist/id/_internal/ActionItem/ActionItem.module.js +11 -0
- package/dist/id/_internal/StiMark/StiMark.css +28 -0
- package/dist/id/_internal/StiMark/StiMark.js +37 -0
- package/dist/id/_internal/StiMark/StiMark.module.js +8 -0
- package/dist/id/index.d.ts +10 -0
- package/dist/id/index.js +6 -0
- package/dist/index.d.ts +28 -5
- package/dist/index.js +16 -4
- package/dist/maps/DirectionsLink/DirectionsLink.css +10 -0
- package/dist/maps/DirectionsLink/DirectionsLink.d.ts +35 -0
- package/dist/maps/DirectionsLink/DirectionsLink.js +84 -0
- package/dist/maps/DirectionsLink/DirectionsLink.module.js +4 -0
- package/dist/maps/DirectionsLink/index.d.ts +2 -0
- package/dist/maps/LocationPicker/LocationPicker.css +60 -0
- package/dist/maps/LocationPicker/LocationPicker.d.ts +37 -0
- package/dist/maps/LocationPicker/LocationPicker.js +278 -0
- package/dist/maps/LocationPicker/LocationPicker.module.js +12 -0
- package/dist/maps/LocationPicker/index.d.ts +2 -0
- package/dist/maps/MapMarker/MapMarker.css +318 -0
- package/dist/maps/MapMarker/MapMarker.d.ts +35 -0
- package/dist/maps/MapMarker/MapMarker.js +142 -0
- package/dist/maps/MapMarker/MapMarker.module.js +20 -0
- package/dist/maps/MapMarker/index.d.ts +2 -0
- package/dist/maps/MapView/MapView.css +268 -0
- package/dist/maps/MapView/MapView.d.ts +71 -0
- package/dist/maps/MapView/MapView.js +495 -0
- package/dist/maps/MapView/MapView.module.js +23 -0
- package/dist/maps/MapView/index.d.ts +2 -0
- package/dist/maps/StoreLocator/StoreLocator.css +201 -0
- package/dist/maps/StoreLocator/StoreLocator.d.ts +43 -0
- package/dist/maps/StoreLocator/StoreLocator.js +225 -0
- package/dist/maps/StoreLocator/StoreLocator.module.js +21 -0
- package/dist/maps/StoreLocator/index.d.ts +2 -0
- package/dist/maps/TurkeyMap/TurkeyMap.css +229 -0
- package/dist/maps/TurkeyMap/TurkeyMap.d.ts +45 -0
- package/dist/maps/TurkeyMap/TurkeyMap.js +280 -0
- package/dist/maps/TurkeyMap/TurkeyMap.module.js +17 -0
- package/dist/maps/TurkeyMap/tileGrid.js +85 -0
- package/dist/maps/_internal/geo.d.ts +8 -0
- package/dist/maps/_internal/geo.js +116 -0
- package/dist/maps/_internal/mapContext.js +8 -0
- package/dist/maps/_internal/useControllable.js +24 -0
- package/dist/maps/index.d.ts +12 -0
- package/dist/maps/index.js +7 -0
- package/dist/media/AudioPlayer/AudioPlayer.css +106 -0
- package/dist/media/AudioPlayer/AudioPlayer.d.ts +38 -0
- package/dist/media/AudioPlayer/AudioPlayer.js +134 -0
- package/dist/media/AudioPlayer/AudioPlayer.module.js +16 -0
- package/dist/media/AudioPlayer/index.d.ts +2 -0
- package/dist/media/AudioWaveform/AudioWaveform.css +43 -0
- package/dist/media/AudioWaveform/AudioWaveform.d.ts +25 -0
- package/dist/media/AudioWaveform/AudioWaveform.js +101 -0
- package/dist/media/AudioWaveform/AudioWaveform.module.js +9 -0
- package/dist/media/AudioWaveform/peaks.d.ts +14 -0
- package/dist/media/AudioWaveform/peaks.js +54 -0
- package/dist/media/MediaCard/MediaCard.css +229 -0
- package/dist/media/MediaCard/MediaCard.d.ts +38 -0
- package/dist/media/MediaCard/MediaCard.js +120 -0
- package/dist/media/MediaCard/MediaCard.module.js +18 -0
- package/dist/media/MediaCard/index.d.ts +2 -0
- package/dist/media/VideoPlayer/VideoPlayer.css +125 -0
- package/dist/media/VideoPlayer/VideoPlayer.d.ts +54 -0
- package/dist/media/VideoPlayer/VideoPlayer.js +193 -0
- package/dist/media/VideoPlayer/VideoPlayer.module.js +12 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.css +139 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.d.ts +34 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.js +63 -0
- package/dist/media/VideoThumbnail/VideoThumbnail.module.js +10 -0
- package/dist/media/VideoThumbnail/VideoThumbnailLink.js +18 -0
- package/dist/media/_internal/clock.js +17 -0
- package/dist/media/_internal/consent/ConsentNotice.css +55 -0
- package/dist/media/_internal/consent/ConsentNotice.js +40 -0
- package/dist/media/_internal/consent/ConsentNotice.module.js +10 -0
- package/dist/media/_internal/icons.js +77 -0
- package/dist/media/_internal/range/Range.css +187 -0
- package/dist/media/_internal/range/Range.js +130 -0
- package/dist/media/_internal/range/Range.module.js +10 -0
- package/dist/media/_internal/transport/MediaTransport.css +90 -0
- package/dist/media/_internal/transport/MediaTransport.js +172 -0
- package/dist/media/_internal/transport/MediaTransport.module.js +14 -0
- package/dist/media/_internal/url.js +31 -0
- package/dist/media/_internal/useConsent.js +28 -0
- package/dist/media/_internal/useMedia.js +146 -0
- package/dist/media/index.d.ts +9 -0
- package/dist/media/index.js +7 -0
- package/dist/messages/messages.d.ts +488 -0
- package/dist/messages/messages.js +978 -2
- package/dist/site/AnnouncementBar/AnnouncementBar.css +132 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.d.ts +28 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.js +64 -0
- package/dist/site/AnnouncementBar/AnnouncementBar.module.js +11 -0
- package/dist/site/AnnouncementBar/index.d.ts +2 -0
- package/dist/site/MegaMenu/MegaMenu.css +324 -0
- package/dist/site/MegaMenu/MegaMenu.d.ts +51 -0
- package/dist/site/MegaMenu/MegaMenu.js +170 -0
- package/dist/site/MegaMenu/MegaMenu.module.js +28 -0
- package/dist/site/MegaMenu/index.d.ts +2 -0
- package/dist/site/SiteFooter/SiteFooter.css +129 -0
- package/dist/site/SiteFooter/SiteFooter.d.ts +38 -0
- package/dist/site/SiteFooter/SiteFooter.js +79 -0
- package/dist/site/SiteFooter/SiteFooter.module.js +20 -0
- package/dist/site/SiteFooter/index.d.ts +2 -0
- package/dist/site/SiteHeader/SiteHeader.css +213 -0
- package/dist/site/SiteHeader/SiteHeader.d.ts +40 -0
- package/dist/site/SiteHeader/SiteHeader.js +115 -0
- package/dist/site/SiteHeader/SiteHeader.module.js +18 -0
- package/dist/site/SiteHeader/index.d.ts +2 -0
- package/dist/site/StickyCta/StickyCta.css +112 -0
- package/dist/site/StickyCta/StickyCta.d.ts +27 -0
- package/dist/site/StickyCta/StickyCta.js +69 -0
- package/dist/site/StickyCta/StickyCta.module.js +10 -0
- package/dist/site/StickyCta/index.d.ts +2 -0
- package/dist/site/index.d.ts +11 -0
- package/dist/site/index.js +6 -0
- package/dist/styles.css +24991 -14440
- package/dist/text/text.d.ts +5 -1
- package/dist/text/text.js +8 -2
- package/package.json +45 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Bars } from "../_internal/Bars.js";
|
|
2
|
+
import ComboChart_module_default from "./ComboChart.module.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/charts/ComboChart/ComboChart.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Bileşik grafik: çubukları ve çizgileri aynı kategori ekseninde birleştirir (harcama çubukları,
|
|
7
|
+
* dönüşüm oranı çizgisi). Birimleri farklı seriler için çizgi ikinci eksene bağlanır; iki eksen de
|
|
8
|
+
* adlı değer biçimiyle etiketlenir ve ipucu her seriyi kendi biçimiyle yazar. Etkileşim ve klavye
|
|
9
|
+
* `BarChart` ile aynıdır.
|
|
10
|
+
*/
|
|
11
|
+
function ComboChart({ className, stacked = false, series, ...rest }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Bars, {
|
|
13
|
+
...rest,
|
|
14
|
+
series,
|
|
15
|
+
mode: stacked ? "stacked" : "grouped",
|
|
16
|
+
className: [ComboChart_module_default.root, className].filter(Boolean).join(" ")
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { ComboChart };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LineAreaCommonProps } from "../_internal/LineArea.js";
|
|
2
|
+
export interface LineChartProps extends LineAreaCommonProps {
|
|
3
|
+
/** Noktalarda seri işareti (daire, kare, baklava…); varsayılan en çok 24 kategoride açık. */
|
|
4
|
+
showMarkers?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Çizgi grafiği: bir ya da birkaç serinin kategoriler (ay, gün, kampanya) boyunca değişimini
|
|
8
|
+
* gösterir. Seri yalnız renkle değil işaret biçimiyle de ayrılır; gösterge seri gizler; eksik
|
|
9
|
+
* değerde çizgi kesilir. İşaretçi ve klavye (oklar, Home, End) kategori başına veri ipucu açar;
|
|
10
|
+
* `tableToggle` ile aynı veri tablo olarak da görülür. WAI-ARIA'da grafik kalıbı yoktur: çizim
|
|
11
|
+
* alanı tek odak durağıdır, ekran okuyucu değerleri duyurur.
|
|
12
|
+
*/
|
|
13
|
+
export declare function LineChart({ className, ...rest }: LineChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LineArea } from "../_internal/LineArea.js";
|
|
2
|
+
import LineChart_module_default from "./LineChart.module.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/charts/LineChart/LineChart.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Çizgi grafiği: bir ya da birkaç serinin kategoriler (ay, gün, kampanya) boyunca değişimini
|
|
7
|
+
* gösterir. Seri yalnız renkle değil işaret biçimiyle de ayrılır; gösterge seri gizler; eksik
|
|
8
|
+
* değerde çizgi kesilir. İşaretçi ve klavye (oklar, Home, End) kategori başına veri ipucu açar;
|
|
9
|
+
* `tableToggle` ile aynı veri tablo olarak da görülür. WAI-ARIA'da grafik kalıbı yoktur: çizim
|
|
10
|
+
* alanı tek odak durağıdır, ekran okuyucu değerleri duyurur.
|
|
11
|
+
*/
|
|
12
|
+
function LineChart({ className, ...rest }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(LineArea, {
|
|
14
|
+
...rest,
|
|
15
|
+
area: false,
|
|
16
|
+
className: [LineChart_module_default.root, className].filter(Boolean).join(" ")
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { LineChart };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-StackedBarChart-root-4af52 {
|
|
4
|
+
--sti-stacked-bar-chart-gap: var(--sti-space-3);
|
|
5
|
+
gap: var(--sti-stacked-bar-chart-gap);
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChartSeries } from "../_internal/category.js";
|
|
2
|
+
import { BarsCommonProps } from "../_internal/Bars.js";
|
|
3
|
+
export interface StackedBarChartProps extends BarsCommonProps {
|
|
4
|
+
/** Üst üste dizilen seriler (sıra aşağıdan yukarıya / soldan sağa). */
|
|
5
|
+
series: readonly ChartSeries[];
|
|
6
|
+
/** Her kategoriyi yüzde 100'e çeker (paylar karşılaştırılır). */
|
|
7
|
+
normalize?: boolean;
|
|
8
|
+
orientation?: "vertical" | "horizontal";
|
|
9
|
+
/** Her yığının ucuna toplamı yazar (`normalize` ile "%100"). */
|
|
10
|
+
showValues?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Yığın çubuk grafiği: bir bütünün parçalarını kategori başına üst üste gösterir (kanal bazında
|
|
14
|
+
* harcama dağılımı). Negatif değerler istife girmez. `normalize` ile payları karşılaştırır. Eksik
|
|
15
|
+
* değer sıfır yükseklik sayılır. Etkileşim ve klavye `BarChart` ile aynıdır.
|
|
16
|
+
*/
|
|
17
|
+
export declare function StackedBarChart({ className, normalize, orientation, showValues, series, ...rest }: StackedBarChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Bars } from "../_internal/Bars.js";
|
|
2
|
+
import StackedBarChart_module_default from "./StackedBarChart.module.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/charts/StackedBarChart/StackedBarChart.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Yığın çubuk grafiği: bir bütünün parçalarını kategori başına üst üste gösterir (kanal bazında
|
|
7
|
+
* harcama dağılımı). Negatif değerler istife girmez. `normalize` ile payları karşılaştırır. Eksik
|
|
8
|
+
* değer sıfır yükseklik sayılır. Etkileşim ve klavye `BarChart` ile aynıdır.
|
|
9
|
+
*/
|
|
10
|
+
function StackedBarChart({ className, normalize, orientation, showValues, series, ...rest }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Bars, {
|
|
12
|
+
...rest,
|
|
13
|
+
series,
|
|
14
|
+
mode: "stacked",
|
|
15
|
+
normalize,
|
|
16
|
+
orientation,
|
|
17
|
+
showValues,
|
|
18
|
+
className: [StackedBarChart_module_default.root, className].filter(Boolean).join(" ")
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export { StackedBarChart };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChartValueFormat } from "./format.js";
|
|
2
|
+
import { ChartSeries } from "./category.js";
|
|
3
|
+
import { ReactNode, Ref } from "react";
|
|
4
|
+
/** Çubuk ve bileşik grafiklerin serisi. */
|
|
5
|
+
export interface BarSeries extends ChartSeries {
|
|
6
|
+
/** `bar` (varsayılan) ya da `line` (yalnız bileşik grafikte). */
|
|
7
|
+
type?: "bar" | "line";
|
|
8
|
+
/** Çizgi serisinin ekseni; `right` ikinci (sağ) eksendir. Çubuklar her zaman soldadır. */
|
|
9
|
+
axis?: "left" | "right";
|
|
10
|
+
}
|
|
11
|
+
export interface BarsCommonProps {
|
|
12
|
+
/** Grafiğin erişilebilir adı (zorunlu). */
|
|
13
|
+
label: string;
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
categories: readonly string[];
|
|
17
|
+
valueFormat?: ChartValueFormat;
|
|
18
|
+
/** Gösterge; varsayılan birden çok seri varsa görünür. */
|
|
19
|
+
showLegend?: boolean;
|
|
20
|
+
legendToggle?: boolean;
|
|
21
|
+
/** Çizim alanı yüksekliği (piksel); varsayılan 280 (yatay çubukta kategori sayısına göre büyür). */
|
|
22
|
+
height?: number;
|
|
23
|
+
/** Değer ekseni sınırları; verilmezse veriden. */
|
|
24
|
+
yMin?: number;
|
|
25
|
+
yMax?: number;
|
|
26
|
+
tableToggle?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
ref?: Ref<HTMLElement>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFormatter } from "../../provider/UIProvider.js";
|
|
3
|
+
import { bandIndexAt, bandScale, clamp, extentOf, isNum, linear, niceScale, stackSeries, textWidth } from "./math.js";
|
|
4
|
+
import { AxisLine, BarMark, CategoryLabels, Guide, Marker, SeriesPath, ValueLabel, XLabels, XTicks, YTicks } from "./marks/marks.js";
|
|
5
|
+
import { ChartLegend } from "../ChartLegend/ChartLegend.js";
|
|
6
|
+
import { makeValueFormat, useValueFormat } from "./format.js";
|
|
7
|
+
import { cartesianLayout, categoryHit, categoryNav, useCategoryModel } from "./category.js";
|
|
8
|
+
import { ChartFrame } from "./frame/ChartFrame.js";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
// src/charts/_internal/Bars.tsx
|
|
11
|
+
const BAR_GAP = 2;
|
|
12
|
+
/** Çubuk, yığın çubuk ve bileşik grafiğin ortak gövdesi (dışa açılmaz). */
|
|
13
|
+
function Bars(props) {
|
|
14
|
+
const { label, title, description, categories, series, valueFormat, rightValueFormat, mode, normalize = false, orientation = "vertical", showValues = false, showLegend, legendToggle = true, curve = "linear", yMin, yMax, tableToggle, isLoading, className, id, ref } = props;
|
|
15
|
+
const f = useFormatter();
|
|
16
|
+
const rightFmt = useValueFormat(rightValueFormat ?? valueFormat);
|
|
17
|
+
const horizontal = orientation === "horizontal" && !series.some((s) => s.type === "line");
|
|
18
|
+
const kindOf = (s) => series[s]?.type === "line" ? "line" : "bar";
|
|
19
|
+
const m = useCategoryModel({
|
|
20
|
+
categories,
|
|
21
|
+
series,
|
|
22
|
+
valueFormat,
|
|
23
|
+
kindOf,
|
|
24
|
+
formatOf: (s) => series[s]?.type === "line" && series[s]?.axis === "right" ? rightFmt : void 0
|
|
25
|
+
});
|
|
26
|
+
const n = categories.length;
|
|
27
|
+
const stacked = mode === "stacked";
|
|
28
|
+
const axisFmt = normalize ? makeValueFormat(f, { style: "percent" }) : m.fmt;
|
|
29
|
+
const bars = m.visible.filter((v) => v.series.type !== "line");
|
|
30
|
+
const lines = m.visible.filter((v) => v.series.type === "line");
|
|
31
|
+
const leftLines = lines.filter((v) => v.series.axis !== "right");
|
|
32
|
+
const rightLines = lines.filter((v) => v.series.axis === "right");
|
|
33
|
+
const stack = stacked ? stackSeries(bars.map((v) => v.series.data), normalize) : null;
|
|
34
|
+
const height = props.height ?? (horizontal ? Math.max(160, n * 36 * (stacked ? 1 : Math.max(1, bars.length) * .6) + 48) : 280);
|
|
35
|
+
const leftDomain = () => {
|
|
36
|
+
const vals = [];
|
|
37
|
+
if (stack) vals.push(0, normalize ? 1 : Math.max(0, ...stack.totals));
|
|
38
|
+
else for (const v of bars) for (const x of v.series.data) if (isNum(x)) vals.push(x);
|
|
39
|
+
for (const v of leftLines) for (const x of v.series.data) if (isNum(x)) vals.push(x);
|
|
40
|
+
let [lo, hi] = extentOf(vals);
|
|
41
|
+
if (bars.length) lo = Math.min(0, lo);
|
|
42
|
+
if (bars.length) hi = Math.max(0, hi);
|
|
43
|
+
return [yMin ?? lo, yMax ?? hi];
|
|
44
|
+
};
|
|
45
|
+
const rightDomain = () => {
|
|
46
|
+
const [lo, hi] = extentOf(rightLines.flatMap((v) => v.series.data));
|
|
47
|
+
return [Math.min(0, lo), hi];
|
|
48
|
+
};
|
|
49
|
+
const layout = (ctx) => cartesianLayout({
|
|
50
|
+
width: ctx.width,
|
|
51
|
+
height: ctx.height,
|
|
52
|
+
compact: ctx.compact,
|
|
53
|
+
categories,
|
|
54
|
+
domain: leftDomain(),
|
|
55
|
+
format: axisFmt,
|
|
56
|
+
right: rightLines.length ? {
|
|
57
|
+
domain: rightDomain(),
|
|
58
|
+
format: rightFmt
|
|
59
|
+
} : void 0,
|
|
60
|
+
inner: .3,
|
|
61
|
+
top: showValues ? 24 : 8
|
|
62
|
+
});
|
|
63
|
+
/** Yatay yerleşim: kategori adları solda, değer ekseni altta. */
|
|
64
|
+
const hLayout = (ctx) => {
|
|
65
|
+
const [lo, hi] = leftDomain();
|
|
66
|
+
const ns = niceScale(lo, hi, clamp(Math.round(ctx.width / 90), 2, 6));
|
|
67
|
+
const totals = stack ? stack.totals : bars.flatMap((v) => v.series.data.filter(isNum));
|
|
68
|
+
const maxValueW = Math.max(...totals.map((t) => textWidth(m.fmt(t))), 0);
|
|
69
|
+
const labelW = Math.min(Math.max(...categories.map((c) => textWidth(c)), 0) + 12, Math.round(ctx.width * .38));
|
|
70
|
+
const left = Math.ceil(labelW);
|
|
71
|
+
const right = showValues && !normalize ? Math.ceil(maxValueW) + 12 : 16;
|
|
72
|
+
const top = 4;
|
|
73
|
+
const bottom = 28;
|
|
74
|
+
const plotW = Math.max(0, ctx.width - left - right);
|
|
75
|
+
const plotH = Math.max(0, ctx.height - top - bottom);
|
|
76
|
+
return {
|
|
77
|
+
ns,
|
|
78
|
+
left,
|
|
79
|
+
right,
|
|
80
|
+
top,
|
|
81
|
+
bottom,
|
|
82
|
+
plotW,
|
|
83
|
+
plotH,
|
|
84
|
+
x: linear(ns.min, ns.max, left, left + plotW),
|
|
85
|
+
band: bandScale(n, top, top + plotH, .3),
|
|
86
|
+
maxChars: Math.max(4, Math.floor((left - 12) / 7.2))
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
const trunc = (text, max) => text.length > max ? `${text.slice(0, Math.max(1, max - 1)).trimEnd()}…` : text;
|
|
90
|
+
const valueAt = (k, i) => {
|
|
91
|
+
const v = stack ? stack.upper[k]?.[i] ?? null : bars[k]?.series.data[i] ?? null;
|
|
92
|
+
return isNum(v) ? v : null;
|
|
93
|
+
};
|
|
94
|
+
const data = (ctx) => {
|
|
95
|
+
if (horizontal) {
|
|
96
|
+
const h = hLayout(ctx);
|
|
97
|
+
return categories.map((c, i) => {
|
|
98
|
+
const xs = bars.map((_, k) => valueAt(k, i)).filter(isNum);
|
|
99
|
+
return {
|
|
100
|
+
id: `c${i}`,
|
|
101
|
+
x: h.x(xs.length ? Math.max(...xs, 0) : 0),
|
|
102
|
+
y: h.band.center(i),
|
|
103
|
+
title: c,
|
|
104
|
+
rows: m.rowsAt(i),
|
|
105
|
+
announce: m.announceAt(i)
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const lay = layout(ctx);
|
|
110
|
+
return categories.map((c, i) => {
|
|
111
|
+
const ys = [
|
|
112
|
+
...bars.map((_, k) => valueAt(k, i)).filter(isNum).map((v) => lay.y(v)),
|
|
113
|
+
...leftLines.map((v) => v.series.data[i]).filter(isNum).map((v) => lay.y(v)),
|
|
114
|
+
...rightLines.map((v) => v.series.data[i]).filter(isNum).map((v) => (lay.yRight ?? lay.y)(v))
|
|
115
|
+
];
|
|
116
|
+
return {
|
|
117
|
+
id: `c${i}`,
|
|
118
|
+
x: lay.band.center(i),
|
|
119
|
+
y: ys.length ? Math.min(...ys) : lay.top + lay.plotH,
|
|
120
|
+
title: c,
|
|
121
|
+
rows: m.rowsAt(i),
|
|
122
|
+
announce: m.announceAt(i)
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const renderHorizontal = (ctx) => {
|
|
127
|
+
const h = hLayout(ctx);
|
|
128
|
+
const activeI = ctx.activeId ? Number(ctx.activeId.slice(1)) : -1;
|
|
129
|
+
const zero = h.x(Math.max(h.ns.min, 0));
|
|
130
|
+
const slot = stacked ? h.band.width : h.band.width / Math.max(1, bars.length);
|
|
131
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
132
|
+
/* @__PURE__ */ jsx(XTicks, {
|
|
133
|
+
ticks: h.ns.ticks,
|
|
134
|
+
x: h.x,
|
|
135
|
+
top: h.top,
|
|
136
|
+
bottom: h.top + h.plotH,
|
|
137
|
+
format: axisFmt
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ jsx(AxisLine, {
|
|
140
|
+
x1: zero,
|
|
141
|
+
y1: h.top,
|
|
142
|
+
x2: zero,
|
|
143
|
+
y2: h.top + h.plotH
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsx(CategoryLabels, {
|
|
146
|
+
x: h.left - 8,
|
|
147
|
+
labels: categories.map((c, i) => ({
|
|
148
|
+
text: trunc(c, h.maxChars),
|
|
149
|
+
y: h.band.center(i)
|
|
150
|
+
}))
|
|
151
|
+
}),
|
|
152
|
+
categories.map((c, i) => bars.map((v, k) => {
|
|
153
|
+
const val = stack ? stack.upper[k]?.[i] ?? null : v.series.data[i] ?? null;
|
|
154
|
+
if (!isNum(val)) return null;
|
|
155
|
+
const lo = stack ? stack.lower[k]?.[i] ?? 0 : 0;
|
|
156
|
+
const x1 = h.x(Math.min(lo, val));
|
|
157
|
+
const x2 = h.x(Math.max(lo, val));
|
|
158
|
+
const y = h.band.start(i) + (stacked ? 0 : k * slot);
|
|
159
|
+
return /* @__PURE__ */ jsx(BarMark, {
|
|
160
|
+
s: v.c,
|
|
161
|
+
x: x1,
|
|
162
|
+
y: y + (stacked ? 0 : BAR_GAP / 2),
|
|
163
|
+
width: x2 - x1,
|
|
164
|
+
height: Math.max(1, slot - (stacked ? 0 : BAR_GAP)),
|
|
165
|
+
dim: activeI >= 0 && i !== activeI
|
|
166
|
+
}, `${c}-${v.series.id}`);
|
|
167
|
+
})),
|
|
168
|
+
showValues && !normalize ? categories.map((c, i) => bars.map((v, k) => {
|
|
169
|
+
const val = stack ? stack.totals[i] ?? 0 : v.series.data[i];
|
|
170
|
+
if (!isNum(val) || stack && k !== bars.length - 1) return null;
|
|
171
|
+
const end = h.x(val);
|
|
172
|
+
return /* @__PURE__ */ jsx(ValueLabel, {
|
|
173
|
+
x: end + 6,
|
|
174
|
+
y: h.band.start(i) + (stacked ? 0 : k * slot) + (stacked ? h.band.width : slot) / 2,
|
|
175
|
+
anchor: "start",
|
|
176
|
+
text: m.valueText(v.s, val)
|
|
177
|
+
}, `${c}-${v.series.id}-l`);
|
|
178
|
+
})) : null
|
|
179
|
+
] });
|
|
180
|
+
};
|
|
181
|
+
const renderVertical = (ctx) => {
|
|
182
|
+
const lay = layout(ctx);
|
|
183
|
+
const activeI = ctx.activeId ? Number(ctx.activeId.slice(1)) : -1;
|
|
184
|
+
const base = lay.top + lay.plotH;
|
|
185
|
+
const zeroY = lay.y(clamp(0, lay.ticks[0] ?? 0, lay.ticks[lay.ticks.length - 1] ?? 0));
|
|
186
|
+
const slot = stacked ? lay.band.width : lay.band.width / Math.max(1, bars.length);
|
|
187
|
+
const pointsOf = (data, yFn) => data.map((v, i) => isNum(v) ? {
|
|
188
|
+
x: lay.band.center(i),
|
|
189
|
+
y: yFn(v)
|
|
190
|
+
} : null);
|
|
191
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
192
|
+
/* @__PURE__ */ jsx(YTicks, {
|
|
193
|
+
ticks: lay.ticks,
|
|
194
|
+
y: lay.y,
|
|
195
|
+
left: lay.left,
|
|
196
|
+
right: lay.left + lay.plotW,
|
|
197
|
+
format: axisFmt
|
|
198
|
+
}),
|
|
199
|
+
lay.rightTicks && lay.yRight ? /* @__PURE__ */ jsx(YTicks, {
|
|
200
|
+
ticks: lay.rightTicks,
|
|
201
|
+
y: lay.yRight,
|
|
202
|
+
left: lay.left,
|
|
203
|
+
right: lay.left + lay.plotW,
|
|
204
|
+
format: rightFmt,
|
|
205
|
+
side: "right",
|
|
206
|
+
grid: false
|
|
207
|
+
}) : null,
|
|
208
|
+
/* @__PURE__ */ jsx(AxisLine, {
|
|
209
|
+
x1: lay.left,
|
|
210
|
+
y1: zeroY,
|
|
211
|
+
x2: lay.left + lay.plotW,
|
|
212
|
+
y2: zeroY
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ jsx(XLabels, {
|
|
215
|
+
labels: lay.xLabels,
|
|
216
|
+
y: base + 8
|
|
217
|
+
}),
|
|
218
|
+
categories.map((c, i) => bars.map((v, k) => {
|
|
219
|
+
const val = stack ? stack.upper[k]?.[i] ?? null : v.series.data[i] ?? null;
|
|
220
|
+
if (!isNum(val)) return null;
|
|
221
|
+
const lo = stack ? stack.lower[k]?.[i] ?? 0 : 0;
|
|
222
|
+
const y1 = lay.y(Math.max(lo, val));
|
|
223
|
+
const y2 = lay.y(Math.min(lo, val));
|
|
224
|
+
return /* @__PURE__ */ jsx(BarMark, {
|
|
225
|
+
s: v.c,
|
|
226
|
+
x: lay.band.start(i) + (stacked ? 0 : k * slot) + (stacked ? 0 : BAR_GAP / 2),
|
|
227
|
+
y: y1,
|
|
228
|
+
width: Math.max(1, slot - (stacked ? 0 : BAR_GAP)),
|
|
229
|
+
height: Math.max(1, y2 - y1),
|
|
230
|
+
dim: activeI >= 0 && i !== activeI
|
|
231
|
+
}, `${c}-${v.series.id}`);
|
|
232
|
+
})),
|
|
233
|
+
showValues && !normalize && slot >= 22 ? categories.map((c, i) => bars.map((v, k) => {
|
|
234
|
+
if (stack && k !== bars.length - 1) return null;
|
|
235
|
+
const val = stack ? stack.totals[i] ?? 0 : v.series.data[i];
|
|
236
|
+
if (!isNum(val)) return null;
|
|
237
|
+
const top = lay.y(Math.max(0, val));
|
|
238
|
+
return /* @__PURE__ */ jsx(ValueLabel, {
|
|
239
|
+
x: lay.band.start(i) + (stacked ? lay.band.width / 2 : k * slot + slot / 2),
|
|
240
|
+
y: top - 8,
|
|
241
|
+
text: m.valueText(v.s, val)
|
|
242
|
+
}, `${c}-${v.series.id}-l`);
|
|
243
|
+
})) : null,
|
|
244
|
+
activeI >= 0 && lines.length ? /* @__PURE__ */ jsx(Guide, {
|
|
245
|
+
x1: lay.band.center(activeI),
|
|
246
|
+
y1: lay.top,
|
|
247
|
+
x2: lay.band.center(activeI),
|
|
248
|
+
y2: base
|
|
249
|
+
}) : null,
|
|
250
|
+
lines.map((v) => {
|
|
251
|
+
const yFn = v.series.axis === "right" && lay.yRight ? lay.yRight : lay.y;
|
|
252
|
+
const pts = pointsOf(v.series.data, yFn);
|
|
253
|
+
return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx(SeriesPath, {
|
|
254
|
+
points: pts,
|
|
255
|
+
s: v.c,
|
|
256
|
+
curve
|
|
257
|
+
}), pts.map((p, i) => p ? /* @__PURE__ */ jsx(Marker, {
|
|
258
|
+
s: v.c,
|
|
259
|
+
cx: p.x,
|
|
260
|
+
cy: p.y,
|
|
261
|
+
r: i === activeI ? 5 : categories.length <= 24 ? 3 : 0
|
|
262
|
+
}, `${v.series.id}-${i}`) : null)] }, v.series.id);
|
|
263
|
+
})
|
|
264
|
+
] });
|
|
265
|
+
};
|
|
266
|
+
const legend = showLegend ?? series.length > 1 ? /* @__PURE__ */ jsx(ChartLegend, {
|
|
267
|
+
items: m.legendItems,
|
|
268
|
+
onToggle: legendToggle ? m.toggle : void 0
|
|
269
|
+
}) : void 0;
|
|
270
|
+
const hHit = (x, y, ctx) => {
|
|
271
|
+
const h = hLayout(ctx);
|
|
272
|
+
if (n === 0 || x < 0 || x > ctx.width || y < h.top || y > h.top + h.plotH) return null;
|
|
273
|
+
return `c${bandIndexAt(y, n, h.top, h.top + h.plotH)}`;
|
|
274
|
+
};
|
|
275
|
+
return /* @__PURE__ */ jsx(ChartFrame, {
|
|
276
|
+
ref,
|
|
277
|
+
id,
|
|
278
|
+
className,
|
|
279
|
+
label,
|
|
280
|
+
title,
|
|
281
|
+
description,
|
|
282
|
+
summary: m.summary,
|
|
283
|
+
height,
|
|
284
|
+
data,
|
|
285
|
+
nav: categoryNav(n),
|
|
286
|
+
hit: (x, y, ctx) => horizontal ? hHit(x, y, ctx) : categoryHit(layout(ctx), n)(x, y),
|
|
287
|
+
legend,
|
|
288
|
+
table: m.table,
|
|
289
|
+
tableToggle,
|
|
290
|
+
isEmpty: n === 0 || series.length === 0,
|
|
291
|
+
isLoading,
|
|
292
|
+
children: horizontal ? renderHorizontal : renderVertical
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
export { Bars };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChartValueFormat } from "./format.js";
|
|
2
|
+
import { ChartSeries } from "./category.js";
|
|
3
|
+
import { Curve } from "./shapes.js";
|
|
4
|
+
import { ReactNode, Ref } from "react";
|
|
5
|
+
/** Çizgi ve alan grafiğinin ortak özellikleri. */
|
|
6
|
+
export interface LineAreaCommonProps {
|
|
7
|
+
/** Grafiğin erişilebilir adı (zorunlu). */
|
|
8
|
+
label: string;
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** Yatay eksendeki kategori adları ("Ocak", "Şubat"). */
|
|
12
|
+
categories: readonly string[];
|
|
13
|
+
series: readonly ChartSeries[];
|
|
14
|
+
valueFormat?: ChartValueFormat;
|
|
15
|
+
/** Çizgi biçimi: `linear` (varsayılan), `monotone` (yumuşak, aşım yapmaz), `step` (basamak). */
|
|
16
|
+
curve?: Curve;
|
|
17
|
+
/** Gösterge; varsayılan birden çok seri varsa görünür. */
|
|
18
|
+
showLegend?: boolean;
|
|
19
|
+
/** Göstergeden seri gizleme/gösterme düğmeleri; varsayılan açık. */
|
|
20
|
+
legendToggle?: boolean;
|
|
21
|
+
/** Grafik yüksekliği (piksel); varsayılan 280. */
|
|
22
|
+
height?: number;
|
|
23
|
+
/** Değer ekseninin alt ve üst sınırı; verilmezse veriden. */
|
|
24
|
+
yMin?: number;
|
|
25
|
+
yMax?: number;
|
|
26
|
+
/** Grafik/Tablo görünüm düğmesi. */
|
|
27
|
+
tableToggle?: boolean;
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
ref?: Ref<HTMLElement>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFormatter } from "../../provider/UIProvider.js";
|
|
3
|
+
import { extentOf, isNum, stackSeries } from "./math.js";
|
|
4
|
+
import { AxisLine, Guide, Marker, SeriesArea, SeriesPath, XLabels, YTicks } from "./marks/marks.js";
|
|
5
|
+
import { ChartLegend } from "../ChartLegend/ChartLegend.js";
|
|
6
|
+
import { makeValueFormat } from "./format.js";
|
|
7
|
+
import { cartesianLayout, categoryHit, categoryNav, useCategoryModel } from "./category.js";
|
|
8
|
+
import { ChartFrame } from "./frame/ChartFrame.js";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
// src/charts/_internal/LineArea.tsx
|
|
11
|
+
/** Çizgi ve alan grafiğinin ortak gövdesi (dışa açılmaz). */
|
|
12
|
+
function LineArea(props) {
|
|
13
|
+
const { label, title, description, categories, series, valueFormat, curve = "linear", showLegend, legendToggle = true, height = 280, yMin, yMax, area, normalize = false, showMarkers = categories.length <= 24, tableToggle, isLoading, className, id, ref } = props;
|
|
14
|
+
const f = useFormatter();
|
|
15
|
+
const m = useCategoryModel({
|
|
16
|
+
categories,
|
|
17
|
+
series,
|
|
18
|
+
valueFormat,
|
|
19
|
+
kindOf: () => area ? "area" : "line"
|
|
20
|
+
});
|
|
21
|
+
const n = categories.length;
|
|
22
|
+
const stacked = area === "stacked";
|
|
23
|
+
const axisFmt = normalize ? makeValueFormat(f, { style: "percent" }) : m.fmt;
|
|
24
|
+
const visibleData = m.visible.map((v) => v.series.data);
|
|
25
|
+
const stack = stacked ? stackSeries(visibleData, normalize) : null;
|
|
26
|
+
const domain = () => {
|
|
27
|
+
const [lo, hi] = stack ? [0, normalize ? 1 : Math.max(0, ...stack.totals)] : extentOf(visibleData.flat());
|
|
28
|
+
const zeroBase = area !== false || lo >= 0 && lo <= hi * .6;
|
|
29
|
+
return [yMin ?? (zeroBase ? Math.min(0, lo) : lo), yMax ?? hi];
|
|
30
|
+
};
|
|
31
|
+
const layout = (ctx) => cartesianLayout({
|
|
32
|
+
width: ctx.width,
|
|
33
|
+
height: ctx.height,
|
|
34
|
+
compact: ctx.compact,
|
|
35
|
+
categories,
|
|
36
|
+
domain: domain(),
|
|
37
|
+
format: axisFmt
|
|
38
|
+
});
|
|
39
|
+
const topAt = (lay, i) => {
|
|
40
|
+
const ys = m.visible.map((v, k) => {
|
|
41
|
+
const val = stack ? stack.upper[k]?.[i] ?? null : v.series.data[i] ?? null;
|
|
42
|
+
return isNum(val) ? lay.y(val) : null;
|
|
43
|
+
}).filter(isNum);
|
|
44
|
+
return ys.length ? Math.min(...ys) : lay.top + lay.plotH;
|
|
45
|
+
};
|
|
46
|
+
const data = (ctx) => {
|
|
47
|
+
const lay = layout(ctx);
|
|
48
|
+
return categories.map((c, i) => ({
|
|
49
|
+
id: `c${i}`,
|
|
50
|
+
x: lay.band.center(i),
|
|
51
|
+
y: topAt(lay, i),
|
|
52
|
+
title: c,
|
|
53
|
+
rows: m.rowsAt(i),
|
|
54
|
+
announce: m.announceAt(i)
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
const render = (ctx) => {
|
|
58
|
+
const lay = layout(ctx);
|
|
59
|
+
const activeI = ctx.activeId ? Number(ctx.activeId.slice(1)) : -1;
|
|
60
|
+
const baseline = lay.y(Math.max(0, lay.ticks[0] ?? 0));
|
|
61
|
+
const base = lay.top + lay.plotH;
|
|
62
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(YTicks, {
|
|
64
|
+
ticks: lay.ticks,
|
|
65
|
+
y: lay.y,
|
|
66
|
+
left: lay.left,
|
|
67
|
+
right: lay.left + lay.plotW,
|
|
68
|
+
format: axisFmt
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx(AxisLine, {
|
|
71
|
+
x1: lay.left,
|
|
72
|
+
y1: base,
|
|
73
|
+
x2: lay.left + lay.plotW,
|
|
74
|
+
y2: base
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx(XLabels, {
|
|
77
|
+
labels: lay.xLabels,
|
|
78
|
+
y: base + 8
|
|
79
|
+
}),
|
|
80
|
+
activeI >= 0 ? /* @__PURE__ */ jsx(Guide, {
|
|
81
|
+
x1: lay.band.center(activeI),
|
|
82
|
+
y1: lay.top,
|
|
83
|
+
x2: lay.band.center(activeI),
|
|
84
|
+
y2: base
|
|
85
|
+
}) : null,
|
|
86
|
+
m.visible.map((v, k) => {
|
|
87
|
+
const pts = v.series.data.map((val, i) => {
|
|
88
|
+
const raw = stack ? stack.upper[k]?.[i] ?? null : val;
|
|
89
|
+
return isNum(raw) ? {
|
|
90
|
+
x: lay.band.center(i),
|
|
91
|
+
y: lay.y(raw)
|
|
92
|
+
} : null;
|
|
93
|
+
});
|
|
94
|
+
const bottom = stack ? v.series.data.map((_, i) => {
|
|
95
|
+
const lo = stack.lower[k]?.[i] ?? null;
|
|
96
|
+
return isNum(lo) ? {
|
|
97
|
+
x: lay.band.center(i),
|
|
98
|
+
y: lay.y(lo)
|
|
99
|
+
} : null;
|
|
100
|
+
}) : baseline;
|
|
101
|
+
return /* @__PURE__ */ jsxs("g", { children: [area ? /* @__PURE__ */ jsx(SeriesArea, {
|
|
102
|
+
top: pts,
|
|
103
|
+
bottom,
|
|
104
|
+
s: v.c,
|
|
105
|
+
curve
|
|
106
|
+
}) : null, /* @__PURE__ */ jsx(SeriesPath, {
|
|
107
|
+
points: pts,
|
|
108
|
+
s: v.c,
|
|
109
|
+
curve
|
|
110
|
+
})] }, v.series.id);
|
|
111
|
+
}),
|
|
112
|
+
m.visible.map((v, k) => v.series.data.map((val, i) => {
|
|
113
|
+
const raw = stack ? stack.upper[k]?.[i] ?? null : val;
|
|
114
|
+
if (!isNum(raw)) return null;
|
|
115
|
+
const isActive = i === activeI;
|
|
116
|
+
if (!isActive && !(showMarkers && !area)) return null;
|
|
117
|
+
return /* @__PURE__ */ jsx(Marker, {
|
|
118
|
+
s: v.c,
|
|
119
|
+
cx: lay.band.center(i),
|
|
120
|
+
cy: lay.y(raw),
|
|
121
|
+
r: isActive ? 5 : 3
|
|
122
|
+
}, `${v.series.id}-${i}`);
|
|
123
|
+
}))
|
|
124
|
+
] });
|
|
125
|
+
};
|
|
126
|
+
const legend = showLegend ?? series.length > 1 ? /* @__PURE__ */ jsx(ChartLegend, {
|
|
127
|
+
items: m.legendItems,
|
|
128
|
+
onToggle: legendToggle ? m.toggle : void 0
|
|
129
|
+
}) : void 0;
|
|
130
|
+
return /* @__PURE__ */ jsx(ChartFrame, {
|
|
131
|
+
ref,
|
|
132
|
+
id,
|
|
133
|
+
className,
|
|
134
|
+
label,
|
|
135
|
+
title,
|
|
136
|
+
description,
|
|
137
|
+
summary: m.summary,
|
|
138
|
+
height,
|
|
139
|
+
data,
|
|
140
|
+
nav: categoryNav(n),
|
|
141
|
+
hit: (x, y, ctx) => categoryHit(layout(ctx), n)(x, y),
|
|
142
|
+
legend,
|
|
143
|
+
table: m.table,
|
|
144
|
+
tableToggle,
|
|
145
|
+
isEmpty: n === 0 || series.length === 0,
|
|
146
|
+
isLoading,
|
|
147
|
+
children: render
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
export { LineArea };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "../../index.js";
|
|
2
|
+
import "../ChartLegend/ChartLegend.js";
|
|
3
|
+
import "../ChartTooltip/ChartTooltip.js";
|
|
4
|
+
import "./frame/ChartFrame.js";
|
|
5
|
+
/** Kategorik grafiklerin (çizgi, alan, çubuk, bileşik) ortak seri tanımı. */
|
|
6
|
+
export interface ChartSeries {
|
|
7
|
+
/** Benzersiz kimlik. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Gösterge, ipucu ve tablodaki ad. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Kategori başına değer; `null` eksik veridir (çizgi kesilir, çubuk çizilmez). */
|
|
12
|
+
data: readonly (number | null)[];
|
|
13
|
+
/**
|
|
14
|
+
* Anlam rengi: verilirse serinin rengi sıradan değil tondan gelir (`success` yeşil, `warning`
|
|
15
|
+
* kehribar, `danger` kırmızı, `accent` mavi, `neutral` gri). Aynı tonu paylaşan seriler yalnız
|
|
16
|
+
* adla ayrılır; renk tek başına anlam taşımaz, ad ve değer her zaman yazılıdır.
|
|
17
|
+
*/
|
|
18
|
+
tone?: "accent" | "success" | "warning" | "danger" | "neutral";
|
|
19
|
+
}
|