@stisocial/ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -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/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 +110 -0
- package/dist/id/AccountMenu/AccountMenu.d.ts +45 -0
- package/dist/id/AccountMenu/AccountMenu.js +98 -0
- package/dist/id/AccountMenu/AccountMenu.module.js +14 -0
- package/dist/id/AccountMenu/index.d.ts +2 -0
- package/dist/id/AppSwitcher/AppSwitcher.css +109 -0
- package/dist/id/AppSwitcher/AppSwitcher.d.ts +31 -0
- package/dist/id/AppSwitcher/AppSwitcher.js +88 -0
- package/dist/id/AppSwitcher/AppSwitcher.module.js +11 -0
- package/dist/id/AppSwitcher/index.d.ts +2 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.css +110 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.d.ts +37 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.js +153 -0
- package/dist/id/OrgSwitcher/OrgSwitcher.module.js +12 -0
- package/dist/id/OrgSwitcher/index.d.ts +2 -0
- package/dist/id/PermissionGate/PermissionGate.css +57 -0
- package/dist/id/PermissionGate/PermissionGate.d.ts +30 -0
- package/dist/id/PermissionGate/PermissionGate.js +51 -0
- package/dist/id/PermissionGate/PermissionGate.module.js +10 -0
- package/dist/id/PermissionGate/index.d.ts +2 -0
- package/dist/id/SignInButton/SignInButton.d.ts +20 -0
- package/dist/id/SignInButton/SignInButton.js +34 -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/index.d.ts +10 -0
- package/dist/id/index.js +6 -0
- package/dist/index.d.ts +26 -4
- package/dist/index.js +14 -3
- 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 +481 -0
- package/dist/messages/messages.js +964 -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 +24433 -14420
- package/package.json +45 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFormatter, useMessages } from "../../provider/UIProvider.js";
|
|
3
|
+
import { template } from "../../text/text.js";
|
|
4
|
+
import { AlertCircleIcon } from "../../icons/generated/AlertCircleIcon.js";
|
|
5
|
+
import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
|
|
6
|
+
import { Button } from "../Button/Button.js";
|
|
7
|
+
import { ArrowLeftIcon } from "../../icons/generated/ArrowLeftIcon.js";
|
|
8
|
+
import { ClockIcon } from "../../icons/generated/ClockIcon.js";
|
|
9
|
+
import { parseInstant } from "../DateTime/instant.js";
|
|
10
|
+
import { SearchIcon } from "../../icons/generated/SearchIcon.js";
|
|
11
|
+
import { RefreshIcon } from "../../icons/generated/RefreshIcon.js";
|
|
12
|
+
import { HomeIcon } from "../../icons/generated/HomeIcon.js";
|
|
13
|
+
import { LockIcon } from "../../icons/generated/LockIcon.js";
|
|
14
|
+
import { SettingsIcon } from "../../icons/generated/SettingsIcon.js";
|
|
15
|
+
import ErrorPage_module_default from "./ErrorPage.module.js";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
// src/components/ErrorPage/ErrorPage.tsx
|
|
18
|
+
const KINDS = {
|
|
19
|
+
notFound: {
|
|
20
|
+
code: "404",
|
|
21
|
+
tone: "accent",
|
|
22
|
+
icon: /* @__PURE__ */ jsx(SearchIcon, {})
|
|
23
|
+
},
|
|
24
|
+
forbidden: {
|
|
25
|
+
code: "403",
|
|
26
|
+
tone: "warning",
|
|
27
|
+
icon: /* @__PURE__ */ jsx(LockIcon, {})
|
|
28
|
+
},
|
|
29
|
+
serverError: {
|
|
30
|
+
code: "500",
|
|
31
|
+
tone: "danger",
|
|
32
|
+
icon: /* @__PURE__ */ jsx(AlertCircleIcon, {})
|
|
33
|
+
},
|
|
34
|
+
maintenance: {
|
|
35
|
+
code: "503",
|
|
36
|
+
tone: "info",
|
|
37
|
+
icon: /* @__PURE__ */ jsx(SettingsIcon, {})
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Hata sayfası: 404 (bulunamadı), 403 (yetki yok), 500 (beklenmeyen sorun) ve bakım (503).
|
|
42
|
+
* Durum kodu, başlık (sayfanın `h1`'i), ne olduğu ve sonraki adım; ana sayfa, yeniden deneme ve
|
|
43
|
+
* önceki sayfa eylemleri. Teknik ayrıntı (yığın izi, sorgu, sunucu adı) hiçbir türde gösterilmez;
|
|
44
|
+
* yalnız destek için başvuru kodu yazılır. Uygulama bunu sayfa içeriği olarak (`main` içinde) çizer.
|
|
45
|
+
*/
|
|
46
|
+
function ErrorPage({ kind, title, description, homeHref, onRetry, isRetrying, showBack = false, until, statusHref, reference, primaryAction, secondaryAction, children, isFullPage = true, className, id }) {
|
|
47
|
+
const t = useMessages();
|
|
48
|
+
const f = useFormatter();
|
|
49
|
+
const meta = KINDS[kind];
|
|
50
|
+
const texts = {
|
|
51
|
+
notFound: [t.pageNotFoundTitle, t.pageNotFoundDescription],
|
|
52
|
+
forbidden: [t.pageForbiddenTitle, t.pageForbiddenDescription],
|
|
53
|
+
serverError: [t.pageServerTitle, t.pageServerDescription],
|
|
54
|
+
maintenance: [t.pageMaintenanceTitle, t.pageMaintenanceDescription]
|
|
55
|
+
}[kind];
|
|
56
|
+
const untilText = kind === "maintenance" && until !== void 0 ? template(t.pageMaintenanceUntil, { time: f.dateTime(parseInstant(until)) }) : null;
|
|
57
|
+
const retry = onRetry ? /* @__PURE__ */ jsx(Button, {
|
|
58
|
+
variant: "primary",
|
|
59
|
+
onPress: onRetry,
|
|
60
|
+
isPending: isRetrying,
|
|
61
|
+
iconStart: /* @__PURE__ */ jsx(RefreshIcon, {}),
|
|
62
|
+
children: t.pageRetry
|
|
63
|
+
}) : null;
|
|
64
|
+
const home = homeHref ? /* @__PURE__ */ jsx(Button, {
|
|
65
|
+
href: homeHref,
|
|
66
|
+
variant: retry ? "secondary" : "primary",
|
|
67
|
+
iconStart: /* @__PURE__ */ jsx(HomeIcon, {}),
|
|
68
|
+
children: t.pageHome
|
|
69
|
+
}) : null;
|
|
70
|
+
const back = showBack ? /* @__PURE__ */ jsx(Button, {
|
|
71
|
+
variant: retry || home ? "ghost" : "secondary",
|
|
72
|
+
iconStart: /* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
73
|
+
onPress: () => window.history.back(),
|
|
74
|
+
children: t.pageBack
|
|
75
|
+
}) : null;
|
|
76
|
+
const status = statusHref ? /* @__PURE__ */ jsx(Button, {
|
|
77
|
+
href: statusHref,
|
|
78
|
+
variant: "ghost",
|
|
79
|
+
children: t.pageStatus
|
|
80
|
+
}) : null;
|
|
81
|
+
const hasActions = primaryAction || secondaryAction || retry || home || back || status;
|
|
82
|
+
return /* @__PURE__ */ jsx("section", {
|
|
83
|
+
id,
|
|
84
|
+
className: [ErrorPage_module_default.root, className].filter(Boolean).join(" "),
|
|
85
|
+
"data-kind": kind,
|
|
86
|
+
"data-tone": meta.tone,
|
|
87
|
+
"data-full-page": isFullPage ? "" : void 0,
|
|
88
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: ErrorPage_module_default.inner,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: ErrorPage_module_default.icon,
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
children: meta.icon
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsxs("p", {
|
|
97
|
+
className: ErrorPage_module_default.code,
|
|
98
|
+
children: [/* @__PURE__ */ jsx(VisuallyHidden, { children: template(t.pageCode, { code: meta.code }) }), /* @__PURE__ */ jsx("span", {
|
|
99
|
+
"aria-hidden": "true",
|
|
100
|
+
children: meta.code
|
|
101
|
+
})]
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ jsxs("div", {
|
|
104
|
+
className: ErrorPage_module_default.text,
|
|
105
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
106
|
+
className: ErrorPage_module_default.title,
|
|
107
|
+
children: title ?? texts[0]
|
|
108
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
109
|
+
className: ErrorPage_module_default.description,
|
|
110
|
+
children: description ?? texts[1]
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
untilText ? /* @__PURE__ */ jsxs("p", {
|
|
114
|
+
className: ErrorPage_module_default.until,
|
|
115
|
+
children: [/* @__PURE__ */ jsx(ClockIcon, {}), untilText]
|
|
116
|
+
}) : null,
|
|
117
|
+
hasActions ? /* @__PURE__ */ jsxs("div", {
|
|
118
|
+
className: ErrorPage_module_default.actions,
|
|
119
|
+
children: [
|
|
120
|
+
primaryAction ?? retry ?? home,
|
|
121
|
+
secondaryAction ?? (retry ? home : null),
|
|
122
|
+
back,
|
|
123
|
+
status
|
|
124
|
+
]
|
|
125
|
+
}) : null,
|
|
126
|
+
reference ? /* @__PURE__ */ jsxs("p", {
|
|
127
|
+
className: ErrorPage_module_default.reference,
|
|
128
|
+
children: [
|
|
129
|
+
t.pageReference,
|
|
130
|
+
": ",
|
|
131
|
+
/* @__PURE__ */ jsx("code", {
|
|
132
|
+
className: ErrorPage_module_default.referenceCode,
|
|
133
|
+
children: reference
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
}) : null,
|
|
137
|
+
children ? /* @__PURE__ */ jsx("div", {
|
|
138
|
+
className: ErrorPage_module_default.extra,
|
|
139
|
+
children
|
|
140
|
+
}) : null
|
|
141
|
+
]
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
export { ErrorPage };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './ErrorPage.css';
|
|
2
|
+
// src/components/ErrorPage/ErrorPage.module.css
|
|
3
|
+
var ErrorPage_module_default = {
|
|
4
|
+
"root": "sti-ErrorPage-root-ae1e9",
|
|
5
|
+
"inner": "sti-ErrorPage-inner-c7c13",
|
|
6
|
+
"icon": "sti-ErrorPage-icon-06390",
|
|
7
|
+
"code": "sti-ErrorPage-code-0a77d",
|
|
8
|
+
"text": "sti-ErrorPage-text-2658f",
|
|
9
|
+
"title": "sti-ErrorPage-title-f8d39",
|
|
10
|
+
"description": "sti-ErrorPage-description-896db",
|
|
11
|
+
"until": "sti-ErrorPage-until-c800b",
|
|
12
|
+
"actions": "sti-ErrorPage-actions-61022",
|
|
13
|
+
"reference": "sti-ErrorPage-reference-397f7",
|
|
14
|
+
"referenceCode": "sti-ErrorPage-referenceCode-ddf60",
|
|
15
|
+
"extra": "sti-ErrorPage-extra-aac29"
|
|
16
|
+
};
|
|
17
|
+
export { ErrorPage_module_default as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-FeedbackWidget-form-1ad48 {
|
|
4
|
+
gap: var(--sti-space-4);
|
|
5
|
+
min-inline-size: 0;
|
|
6
|
+
display: grid;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sti-FeedbackWidget-intro-072bf {
|
|
10
|
+
color: var(--sti-fg-muted);
|
|
11
|
+
font-size: var(--sti-font-size-sm);
|
|
12
|
+
line-height: var(--sti-line-height-sm);
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sti-FeedbackWidget-thanks-8e3a2 {
|
|
17
|
+
justify-items: center;
|
|
18
|
+
gap: var(--sti-space-2);
|
|
19
|
+
padding-block: var(--sti-space-4);
|
|
20
|
+
text-align: center;
|
|
21
|
+
display: grid;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sti-FeedbackWidget-thanksIcon-c40a4 {
|
|
25
|
+
inline-size: var(--sti-space-12);
|
|
26
|
+
block-size: var(--sti-space-12);
|
|
27
|
+
border: var(--sti-border-width) solid transparent;
|
|
28
|
+
border-radius: var(--sti-radius-pill);
|
|
29
|
+
background: var(--sti-bg-success-subtle);
|
|
30
|
+
box-shadow: 0 0 0 var(--sti-space-2)
|
|
31
|
+
color-mix(in oklab, var(--sti-bg-success-subtle) 50%, transparent);
|
|
32
|
+
color: var(--sti-fg-success);
|
|
33
|
+
font-size: var(--sti-icon-lg);
|
|
34
|
+
place-items: center;
|
|
35
|
+
margin-block-end: var(--sti-space-1);
|
|
36
|
+
display: inline-grid;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.sti-FeedbackWidget-thanksTitle-8c25b {
|
|
40
|
+
color: var(--sti-fg);
|
|
41
|
+
font-size: var(--sti-font-size-md);
|
|
42
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
43
|
+
line-height: var(--sti-line-height-md);
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sti-FeedbackWidget-thanksText-58fa5 {
|
|
48
|
+
color: var(--sti-fg-muted);
|
|
49
|
+
font-size: var(--sti-font-size-sm);
|
|
50
|
+
line-height: var(--sti-line-height-sm);
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (forced-colors: active) {
|
|
55
|
+
.sti-FeedbackWidget-thanksIcon-c40a4 {
|
|
56
|
+
border-color: canvastext;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Placement } from "../_internal/overlay/FloatingCard.js";
|
|
2
|
+
import "../Popover/Popover.js";
|
|
3
|
+
import { ReactElement, ReactNode } from "react";
|
|
4
|
+
export type FeedbackCategory = "issue" | "idea" | "praise";
|
|
5
|
+
/** Gönderilen geri bildirim. Sayfa adresi ya da kullanıcı bilgisi eklemek uygulamanın işidir. */
|
|
6
|
+
export interface FeedbackSubmission {
|
|
7
|
+
category: FeedbackCategory;
|
|
8
|
+
/** Kırpılmış mesaj (boş olamaz). */
|
|
9
|
+
message: string;
|
|
10
|
+
/** 1–5; yalnız `showRating` açıkken ve kullanıcı puan verdiyse. */
|
|
11
|
+
rating?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FeedbackWidgetProps {
|
|
14
|
+
/**
|
|
15
|
+
* Gönderim. Söz döndürürse düğme bekler; söz reddedilirse hata gösterilir ve yazılanlar korunur
|
|
16
|
+
* (yeniden denenebilir). Çözülürse teşekkür görünümüne geçilir.
|
|
17
|
+
*/
|
|
18
|
+
onSubmit: (feedback: FeedbackSubmission) => void | Promise<void>;
|
|
19
|
+
/** Açan düğme (React Aria tabanlı); verilmezse "Geri bildirim" düğmesi. */
|
|
20
|
+
trigger?: ReactElement;
|
|
21
|
+
/** Başlık; varsayılan "Geri bildirim gönderin". */
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
/** Başlığın altındaki açıklama. */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
/** Sunulan konular (sırasıyla); en az iki. Varsayılan üçü de. */
|
|
26
|
+
categories?: readonly FeedbackCategory[];
|
|
27
|
+
/** Başlangıçta seçili konu; varsayılan listenin ilki. */
|
|
28
|
+
defaultCategory?: FeedbackCategory;
|
|
29
|
+
/** İsteğe bağlı yıldızlı genel memnuniyet puanı. */
|
|
30
|
+
showRating?: boolean;
|
|
31
|
+
/** Mesajın en çok karakteri (yumuşak sınır: yazılabilir, aşılınca gönderilmez). Varsayılan 2000. */
|
|
32
|
+
maxLength?: number;
|
|
33
|
+
/** Kartın düğmeye göre yönü. Varsayılan `top end`. */
|
|
34
|
+
placement?: Placement;
|
|
35
|
+
isOpen?: boolean;
|
|
36
|
+
defaultOpen?: boolean;
|
|
37
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Geri bildirim: düğmeye bağlı kart. Konu (sorun, öneri, memnuniyet), mesaj ve isteğe bağlı puan;
|
|
42
|
+
* Gönder (ya da Ctrl/⌘+Enter) iletir, teşekkür görünümü ekran okuyucuya duyurulur. Gönderim
|
|
43
|
+
* başarısız olursa yazılanlar korunur ve hata bildirilir. Kart kapanınca (gönderilmediyse) taslak
|
|
44
|
+
* saklanır; gönderilip kapanınca sıfırlanır. Yazı alanında şifre ve kişisel veri yazılmaması istenir;
|
|
45
|
+
* sayfa adresi gibi bağlamı uygulama kendi ekler.
|
|
46
|
+
*/
|
|
47
|
+
export declare function FeedbackWidget({ onSubmit, trigger, title, description, categories, defaultCategory, showRating, maxLength, placement, isOpen, defaultOpen, onOpenChange, className }: FeedbackWidgetProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLocale, useMessages } from "../../provider/UIProvider.js";
|
|
3
|
+
import { template } from "../../text/text.js";
|
|
4
|
+
import { characterCount } from "../CharacterCounter/CharacterCounter.js";
|
|
5
|
+
import { TextArea } from "../TextArea/TextArea.js";
|
|
6
|
+
import { CheckCircleIcon } from "../../icons/generated/CheckCircleIcon.js";
|
|
7
|
+
import { announce } from "../Alert/announcer.js";
|
|
8
|
+
import { Alert } from "../Alert/Alert.js";
|
|
9
|
+
import { Button } from "../Button/Button.js";
|
|
10
|
+
import { Popover } from "../Popover/Popover.js";
|
|
11
|
+
import { MessageIcon } from "../../icons/generated/MessageIcon.js";
|
|
12
|
+
import { Rating } from "../Rating/Rating.js";
|
|
13
|
+
import { SegmentedControl, SegmentedControlItem } from "../SegmentedControl/SegmentedControl.js";
|
|
14
|
+
import FeedbackWidget_module_default from "./FeedbackWidget.module.js";
|
|
15
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { useId, useState } from "react";
|
|
17
|
+
// src/components/FeedbackWidget/FeedbackWidget.tsx
|
|
18
|
+
const ALL = [
|
|
19
|
+
"issue",
|
|
20
|
+
"idea",
|
|
21
|
+
"praise"
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* Geri bildirim: düğmeye bağlı kart. Konu (sorun, öneri, memnuniyet), mesaj ve isteğe bağlı puan;
|
|
25
|
+
* Gönder (ya da Ctrl/⌘+Enter) iletir, teşekkür görünümü ekran okuyucuya duyurulur. Gönderim
|
|
26
|
+
* başarısız olursa yazılanlar korunur ve hata bildirilir. Kart kapanınca (gönderilmediyse) taslak
|
|
27
|
+
* saklanır; gönderilip kapanınca sıfırlanır. Yazı alanında şifre ve kişisel veri yazılmaması istenir;
|
|
28
|
+
* sayfa adresi gibi bağlamı uygulama kendi ekler.
|
|
29
|
+
*/
|
|
30
|
+
function FeedbackWidget({ onSubmit, trigger, title, description, categories = ALL, defaultCategory, showRating = false, maxLength = 2e3, placement = "top end", isOpen, defaultOpen, onOpenChange, className }) {
|
|
31
|
+
const t = useMessages();
|
|
32
|
+
const locale = useLocale();
|
|
33
|
+
const formId = useId();
|
|
34
|
+
const first = defaultCategory ?? categories[0] ?? "issue";
|
|
35
|
+
const [category, setCategory] = useState(first);
|
|
36
|
+
const [message, setMessage] = useState("");
|
|
37
|
+
const [rating, setRating] = useState(null);
|
|
38
|
+
const [status, setStatus] = useState("idle");
|
|
39
|
+
const [failed, setFailed] = useState(false);
|
|
40
|
+
const [fieldError, setFieldError] = useState(null);
|
|
41
|
+
const sending = status === "sending";
|
|
42
|
+
const labels = {
|
|
43
|
+
issue: t.feedbackIssue,
|
|
44
|
+
idea: t.feedbackIdea,
|
|
45
|
+
praise: t.feedbackPraise
|
|
46
|
+
};
|
|
47
|
+
const reset = () => {
|
|
48
|
+
setCategory(first);
|
|
49
|
+
setMessage("");
|
|
50
|
+
setRating(null);
|
|
51
|
+
setStatus("idle");
|
|
52
|
+
setFailed(false);
|
|
53
|
+
setFieldError(null);
|
|
54
|
+
};
|
|
55
|
+
const change = (open) => {
|
|
56
|
+
if (!open && status === "sent") reset();
|
|
57
|
+
onOpenChange?.(open);
|
|
58
|
+
};
|
|
59
|
+
const submit = async () => {
|
|
60
|
+
if (sending) return;
|
|
61
|
+
const text = message.trim();
|
|
62
|
+
if (!text) {
|
|
63
|
+
setFieldError(t.errorRequired);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (characterCount(text, locale) > maxLength) {
|
|
67
|
+
setFieldError(template(t.errorTooLong, { max: maxLength }));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
setFailed(false);
|
|
71
|
+
setFieldError(null);
|
|
72
|
+
setStatus("sending");
|
|
73
|
+
try {
|
|
74
|
+
await onSubmit({
|
|
75
|
+
category,
|
|
76
|
+
message: text,
|
|
77
|
+
...showRating && rating ? { rating } : {}
|
|
78
|
+
});
|
|
79
|
+
setStatus("sent");
|
|
80
|
+
announce(`${t.feedbackThanksTitle}. ${t.feedbackThanksText}`, "polite");
|
|
81
|
+
} catch {
|
|
82
|
+
setStatus("idle");
|
|
83
|
+
setFailed(true);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const sent = status === "sent";
|
|
87
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
88
|
+
trigger: trigger ?? /* @__PURE__ */ jsx(Button, {
|
|
89
|
+
variant: "secondary",
|
|
90
|
+
size: "sm",
|
|
91
|
+
iconStart: /* @__PURE__ */ jsx(MessageIcon, {}),
|
|
92
|
+
children: t.feedbackTrigger
|
|
93
|
+
}),
|
|
94
|
+
title: title ?? t.feedbackTitle,
|
|
95
|
+
placement,
|
|
96
|
+
size: "lg",
|
|
97
|
+
isOpen,
|
|
98
|
+
defaultOpen,
|
|
99
|
+
onOpenChange: change,
|
|
100
|
+
className,
|
|
101
|
+
footer: (close) => sent ? /* @__PURE__ */ jsx(Button, {
|
|
102
|
+
variant: "primary",
|
|
103
|
+
onPress: close,
|
|
104
|
+
children: t.close
|
|
105
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
106
|
+
variant: "secondary",
|
|
107
|
+
isDisabled: sending,
|
|
108
|
+
onPress: close,
|
|
109
|
+
children: t.feedbackCancel
|
|
110
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
111
|
+
variant: "primary",
|
|
112
|
+
type: "submit",
|
|
113
|
+
form: formId,
|
|
114
|
+
isPending: sending,
|
|
115
|
+
children: t.feedbackSend
|
|
116
|
+
})] }),
|
|
117
|
+
children: sent ? /* @__PURE__ */ jsxs("div", {
|
|
118
|
+
className: FeedbackWidget_module_default.thanks,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsx("span", {
|
|
121
|
+
className: FeedbackWidget_module_default.thanksIcon,
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
children: /* @__PURE__ */ jsx(CheckCircleIcon, {})
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ jsx("p", {
|
|
126
|
+
className: FeedbackWidget_module_default.thanksTitle,
|
|
127
|
+
children: t.feedbackThanksTitle
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ jsx("p", {
|
|
130
|
+
className: FeedbackWidget_module_default.thanksText,
|
|
131
|
+
children: t.feedbackThanksText
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
}) : /* @__PURE__ */ jsxs("form", {
|
|
135
|
+
id: formId,
|
|
136
|
+
noValidate: true,
|
|
137
|
+
className: FeedbackWidget_module_default.form,
|
|
138
|
+
onSubmit: (e) => {
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
submit();
|
|
141
|
+
},
|
|
142
|
+
onKeyDown: (e) => {
|
|
143
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
submit();
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ jsx("p", {
|
|
150
|
+
className: FeedbackWidget_module_default.intro,
|
|
151
|
+
children: description ?? t.feedbackIntro
|
|
152
|
+
}),
|
|
153
|
+
categories.length > 1 ? /* @__PURE__ */ jsx(SegmentedControl, {
|
|
154
|
+
label: t.feedbackTopic,
|
|
155
|
+
value: category,
|
|
156
|
+
onChange: (v) => setCategory(v),
|
|
157
|
+
size: "sm",
|
|
158
|
+
fullWidth: true,
|
|
159
|
+
isDisabled: sending,
|
|
160
|
+
children: categories.map((c) => /* @__PURE__ */ jsx(SegmentedControlItem, {
|
|
161
|
+
value: c,
|
|
162
|
+
children: labels[c]
|
|
163
|
+
}, c))
|
|
164
|
+
}) : null,
|
|
165
|
+
/* @__PURE__ */ jsx(TextArea, {
|
|
166
|
+
label: t.feedbackMessage,
|
|
167
|
+
description: t.feedbackMessageHint,
|
|
168
|
+
value: message,
|
|
169
|
+
onChange: (v) => {
|
|
170
|
+
setMessage(v);
|
|
171
|
+
setFieldError(null);
|
|
172
|
+
},
|
|
173
|
+
minRows: 4,
|
|
174
|
+
maxRows: 8,
|
|
175
|
+
maxLength,
|
|
176
|
+
isRequired: true,
|
|
177
|
+
isReadOnly: sending,
|
|
178
|
+
isInvalid: fieldError !== null,
|
|
179
|
+
errorMessage: fieldError ?? void 0
|
|
180
|
+
}),
|
|
181
|
+
showRating ? /* @__PURE__ */ jsx(Rating, {
|
|
182
|
+
label: t.feedbackRating,
|
|
183
|
+
showOptional: true,
|
|
184
|
+
value: rating,
|
|
185
|
+
onChange: setRating,
|
|
186
|
+
isDisabled: sending,
|
|
187
|
+
size: "md"
|
|
188
|
+
}) : null,
|
|
189
|
+
failed ? /* @__PURE__ */ jsx(Alert, {
|
|
190
|
+
tone: "danger",
|
|
191
|
+
live: true,
|
|
192
|
+
children: t.feedbackFailed
|
|
193
|
+
}) : null
|
|
194
|
+
]
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
export { FeedbackWidget };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './FeedbackWidget.css';
|
|
2
|
+
// src/components/FeedbackWidget/FeedbackWidget.module.css
|
|
3
|
+
var FeedbackWidget_module_default = {
|
|
4
|
+
"form": "sti-FeedbackWidget-form-1ad48",
|
|
5
|
+
"intro": "sti-FeedbackWidget-intro-072bf",
|
|
6
|
+
"thanks": "sti-FeedbackWidget-thanks-8e3a2",
|
|
7
|
+
"thanksIcon": "sti-FeedbackWidget-thanksIcon-c40a4",
|
|
8
|
+
"thanksTitle": "sti-FeedbackWidget-thanksTitle-8c25b",
|
|
9
|
+
"thanksText": "sti-FeedbackWidget-thanksText-58fa5"
|
|
10
|
+
};
|
|
11
|
+
export { FeedbackWidget_module_default as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-Figure-root-a64e8 {
|
|
4
|
+
--sti-figure-gap: var(--sti-space-3);
|
|
5
|
+
--sti-figure-radius: var(--sti-radius-md);
|
|
6
|
+
gap: var(--sti-figure-gap);
|
|
7
|
+
min-inline-size: 0;
|
|
8
|
+
color: var(--sti-fg);
|
|
9
|
+
font-family: var(--sti-font-text);
|
|
10
|
+
margin: 0;
|
|
11
|
+
display: grid;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.sti-Figure-media-b8434 {
|
|
15
|
+
overflow-wrap: anywhere;
|
|
16
|
+
justify-items: start;
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
max-inline-size: 100%;
|
|
19
|
+
display: grid;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sti-Figure-root-a64e8[data-align="center"] .sti-Figure-media-b8434 {
|
|
23
|
+
justify-self: center;
|
|
24
|
+
justify-items: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.sti-Figure-root-a64e8[data-bordered] .sti-Figure-media-b8434 {
|
|
28
|
+
border: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
29
|
+
border-radius: var(--sti-figure-radius);
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sti-Figure-caption-aca76 {
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
column-gap: var(--sti-space-2);
|
|
36
|
+
color: var(--sti-fg-muted);
|
|
37
|
+
font-size: var(--sti-font-size-sm);
|
|
38
|
+
line-height: var(--sti-line-height-sm);
|
|
39
|
+
text-align: start;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sti-Figure-caption-aca76[data-align="center"] {
|
|
45
|
+
text-align: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.sti-Figure-text-8016e {
|
|
50
|
+
overflow-wrap: anywhere;
|
|
51
|
+
min-inline-size: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.sti-Figure-credit-e8eca {
|
|
55
|
+
font-size: var(--sti-font-size-xs);
|
|
56
|
+
line-height: var(--sti-line-height-xs);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (forced-colors: active) {
|
|
60
|
+
.sti-Figure-root-a64e8[data-bordered] .sti-Figure-media-b8434 {
|
|
61
|
+
border-color: canvastext;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
export interface FigureProps {
|
|
3
|
+
/** Görsel, grafik, tablo ya da alıntı: ortadaki içerik. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Açıklama (`figcaption`): görselin ne gösterdiğini söyler. */
|
|
6
|
+
caption?: ReactNode;
|
|
7
|
+
/** Kaynak ya da fotoğrafçı ("Fotoğraf: …"); açıklamanın yanında sessiz renkte. */
|
|
8
|
+
credit?: ReactNode;
|
|
9
|
+
/** Açıklamanın yeri: `bottom` (varsayılan) ya da `top` (tablolar). */
|
|
10
|
+
captionPosition?: "bottom" | "top";
|
|
11
|
+
/** Açıklama hizası. */
|
|
12
|
+
align?: "start" | "center";
|
|
13
|
+
/** İçeriğin çevresine ince kenar ve yuvarlak köşe. */
|
|
14
|
+
isBordered?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
ref?: Ref<HTMLElement>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Şekil: içerik ve açıklaması `figure` / `figcaption` ile bağlanır; ekran okuyucu açıklamayı
|
|
21
|
+
* içeriğin adı olarak okur. Sunucu bileşenidir. Görselin kendi alt metni (`alt`) görselde durur;
|
|
22
|
+
* açıklama onu tekrarlamaz, bağlamı ekler.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Figure({ children, caption, credit, captionPosition, align, isBordered, className, id, ref }: FigureProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Figure_module_default from "./Figure.module.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
// src/components/Figure/Figure.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Şekil: içerik ve açıklaması `figure` / `figcaption` ile bağlanır; ekran okuyucu açıklamayı
|
|
6
|
+
* içeriğin adı olarak okur. Sunucu bileşenidir. Görselin kendi alt metni (`alt`) görselde durur;
|
|
7
|
+
* açıklama onu tekrarlamaz, bağlamı ekler.
|
|
8
|
+
*/
|
|
9
|
+
function Figure({ children, caption, credit, captionPosition = "bottom", align = "start", isBordered, className, id, ref }) {
|
|
10
|
+
const text = caption || credit ? /* @__PURE__ */ jsxs("figcaption", {
|
|
11
|
+
className: Figure_module_default.caption,
|
|
12
|
+
"data-align": align,
|
|
13
|
+
children: [caption ? /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: Figure_module_default.text,
|
|
15
|
+
children: caption
|
|
16
|
+
}) : null, credit ? /* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: Figure_module_default.credit,
|
|
18
|
+
children: credit
|
|
19
|
+
}) : null]
|
|
20
|
+
}) : null;
|
|
21
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
22
|
+
id,
|
|
23
|
+
ref,
|
|
24
|
+
className: [Figure_module_default.root, className].filter(Boolean).join(" "),
|
|
25
|
+
"data-bordered": isBordered ? "" : void 0,
|
|
26
|
+
"data-caption": captionPosition,
|
|
27
|
+
"data-align": align,
|
|
28
|
+
children: [
|
|
29
|
+
captionPosition === "top" ? text : null,
|
|
30
|
+
/* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: Figure_module_default.media,
|
|
32
|
+
children
|
|
33
|
+
}),
|
|
34
|
+
captionPosition === "bottom" ? text : null
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export { Figure };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './Figure.css';
|
|
2
|
+
// src/components/Figure/Figure.module.css
|
|
3
|
+
var Figure_module_default = {
|
|
4
|
+
"root": "sti-Figure-root-a64e8",
|
|
5
|
+
"media": "sti-Figure-media-b8434",
|
|
6
|
+
"caption": "sti-Figure-caption-aca76",
|
|
7
|
+
"text": "sti-Figure-text-8016e",
|
|
8
|
+
"credit": "sti-Figure-credit-e8eca"
|
|
9
|
+
};
|
|
10
|
+
export { Figure_module_default as default };
|