@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,150 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-Table-scroll-962cf {
|
|
4
|
+
border: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
5
|
+
border-radius: var(--sti-radius-md);
|
|
6
|
+
background: var(--sti-bg-surface);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sti-Table-root-864aa {
|
|
10
|
+
--sti-table-row-h: var(--sti-row-h);
|
|
11
|
+
--sti-table-px: var(--sti-space-4);
|
|
12
|
+
--sti-table-font-size: var(--sti-font-size-sm);
|
|
13
|
+
--sti-table-leading: var(--sti-line-height-sm);
|
|
14
|
+
--sti-table-head-bg: var(--sti-bg-subtle);
|
|
15
|
+
--sti-table-stripe-bg: var(--sti-bg-subtle);
|
|
16
|
+
--sti-table-hover-bg: var(--sti-bg-surface-hover);
|
|
17
|
+
--sti-table-divider: var(--sti-border-subtle);
|
|
18
|
+
border-collapse: separate;
|
|
19
|
+
border-spacing: 0;
|
|
20
|
+
inline-size: 100%;
|
|
21
|
+
min-inline-size: max-content;
|
|
22
|
+
color: var(--sti-fg);
|
|
23
|
+
font-family: var(--sti-font-text);
|
|
24
|
+
font-size: var(--sti-table-font-size);
|
|
25
|
+
line-height: var(--sti-table-leading);
|
|
26
|
+
text-align: start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sti-Table-root-864aa[data-size="sm"] {
|
|
30
|
+
--sti-table-row-h: calc(var(--sti-row-h) - var(--sti-space-2));
|
|
31
|
+
--sti-table-px: var(--sti-space-3);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sti-Table-root-864aa[data-size="lg"] {
|
|
35
|
+
--sti-table-row-h: calc(var(--sti-row-h) + var(--sti-space-3));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.sti-Table-caption-c6208 {
|
|
39
|
+
padding: var(--sti-space-3) var(--sti-table-px);
|
|
40
|
+
color: var(--sti-fg-muted);
|
|
41
|
+
font-size: var(--sti-font-size-sm);
|
|
42
|
+
text-align: start;
|
|
43
|
+
caption-side: top;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sti-Table-heading-d96d6, .sti-Table-cell-c930d {
|
|
47
|
+
block-size: var(--sti-table-row-h);
|
|
48
|
+
padding-block: var(--sti-space-1);
|
|
49
|
+
padding-inline: var(--sti-table-px);
|
|
50
|
+
vertical-align: middle;
|
|
51
|
+
text-align: start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.sti-Table-cell-c930d {
|
|
55
|
+
border-block-end: var(--sti-border-width) solid var(--sti-table-divider);
|
|
56
|
+
font-weight: var(--sti-font-weight-regular);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sti-Table-cell-c930d[data-row-header] {
|
|
60
|
+
font-weight: var(--sti-font-weight-medium);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sti-Table-heading-d96d6 {
|
|
64
|
+
background: var(--sti-table-head-bg);
|
|
65
|
+
border-block-end: var(--sti-border-width) solid var(--sti-border);
|
|
66
|
+
color: var(--sti-fg-muted);
|
|
67
|
+
font-size: var(--sti-font-size-xs);
|
|
68
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
69
|
+
line-height: var(--sti-line-height-xs);
|
|
70
|
+
letter-spacing: var(--sti-tracking-label);
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
position: relative;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.sti-Table-root-864aa[data-sticky] .sti-Table-heading-d96d6 {
|
|
76
|
+
z-index: var(--sti-z-raised);
|
|
77
|
+
position: sticky;
|
|
78
|
+
inset-block-start: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.sti-Table-heading-d96d6[data-align="end"], .sti-Table-cell-c930d[data-align="end"] {
|
|
82
|
+
text-align: end;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sti-Table-heading-d96d6[data-align="center"], .sti-Table-cell-c930d[data-align="center"] {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.sti-Table-cell-c930d[data-numeric] {
|
|
90
|
+
font-family: var(--sti-font-numeric);
|
|
91
|
+
font-variant-numeric: tabular-nums;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sti-Table-row-9f24a:last-child > .sti-Table-cell-c930d {
|
|
95
|
+
border-block-end: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sti-Table-root-864aa[data-striped] .sti-Table-row-9f24a:nth-child(2n) > .sti-Table-cell-c930d {
|
|
99
|
+
background: var(--sti-table-stripe-bg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (hover: hover) {
|
|
103
|
+
.sti-Table-root-864aa[data-hoverable] .sti-Table-row-9f24a:hover > .sti-Table-cell-c930d {
|
|
104
|
+
background: var(--sti-table-hover-bg);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sti-Table-foot-0c5cf .sti-Table-cell-c930d {
|
|
109
|
+
border-block-start: var(--sti-border-width) solid var(--sti-border);
|
|
110
|
+
background: var(--sti-table-head-bg);
|
|
111
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
112
|
+
border-block-end: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.sti-Table-empty-3ca3c {
|
|
116
|
+
padding: var(--sti-space-8) var(--sti-table-px);
|
|
117
|
+
color: var(--sti-fg-muted);
|
|
118
|
+
text-align: center;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.sti-Table-hidden-baa78 {
|
|
122
|
+
clip-path: inset(50%);
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
block-size: 1px;
|
|
125
|
+
inline-size: 1px;
|
|
126
|
+
margin: -1px;
|
|
127
|
+
position: absolute;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (pointer: coarse) {
|
|
132
|
+
.sti-Table-root-864aa {
|
|
133
|
+
--sti-table-row-h: var(--sti-control-h-md);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (forced-colors: active) {
|
|
138
|
+
.sti-Table-scroll-962cf {
|
|
139
|
+
border-color: canvastext;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.sti-Table-heading-d96d6 {
|
|
143
|
+
border-block-end-color: canvastext;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.sti-Table-cell-c930d {
|
|
147
|
+
border-block-end-color: graytext;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ScrollAreaMaxHeight } from "../ScrollArea/ScrollArea.js";
|
|
2
|
+
import { ReactNode, Ref } from "react";
|
|
3
|
+
export type TableSize = "sm" | "md" | "lg";
|
|
4
|
+
export type TableAlign = "start" | "center" | "end";
|
|
5
|
+
export interface TableColumn {
|
|
6
|
+
/** Sütunun anahtarı: satır nesnesindeki aynı adlı alan hücrenin içeriğidir. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Sütun başlığı. */
|
|
9
|
+
header: ReactNode;
|
|
10
|
+
/** Hücre hizası; sayılar `end`. Varsayılan `start`. */
|
|
11
|
+
align?: TableAlign;
|
|
12
|
+
/** Sayısal sütun: eşit genişlikte rakamlar, sağa (sağdan sola yazıda sola) hizalı. */
|
|
13
|
+
isNumeric?: boolean;
|
|
14
|
+
/** Satırın başlık hücresi (`th scope="row"`): ekran okuyucu satırı bu hücreyle adlandırır. */
|
|
15
|
+
isRowHeader?: boolean;
|
|
16
|
+
/** Sütun başlığı ekran okuyucuya okunur, görünmez (ör. eylem sütunu). */
|
|
17
|
+
isHeaderHidden?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type TableRowData = {
|
|
20
|
+
id: string;
|
|
21
|
+
} & Record<string, ReactNode>;
|
|
22
|
+
export interface TableProps {
|
|
23
|
+
/** Tablonun adı (zorunlu): tablonun ve kaydırma bölgesinin erişilebilir adı. */
|
|
24
|
+
label: string;
|
|
25
|
+
/** Görünür başlık (`caption`). */
|
|
26
|
+
caption?: ReactNode;
|
|
27
|
+
columns: readonly TableColumn[];
|
|
28
|
+
/** Satırlar: `id` ve her sütunun `id`'siyle eşleşen alanlar. */
|
|
29
|
+
rows: readonly TableRowData[];
|
|
30
|
+
/** Son satır (toplam, ortalama): sütun `id`'sine göre içerik. */
|
|
31
|
+
footer?: Record<string, ReactNode>;
|
|
32
|
+
/** Satır yüksekliği: `sm` 32, `md` 44, `lg` 56 piksel (yoğunluğa göre). */
|
|
33
|
+
size?: TableSize;
|
|
34
|
+
/** Çift satırlar bir ton koyu. */
|
|
35
|
+
isStriped?: boolean;
|
|
36
|
+
/** Üzerine gelinen satır vurgulanır (satır tıklanabilir değildir; yalnız okumayı kolaylaştırır). */
|
|
37
|
+
isHoverable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Verilirse tablo bu yükseklikte dikey kaydırılır ve başlık satırı yapışkandır (`sm`, `md`,
|
|
40
|
+
* `lg`, `viewport`).
|
|
41
|
+
*/
|
|
42
|
+
maxHeight?: ScrollAreaMaxHeight;
|
|
43
|
+
/** Satır yokken gösterilecek içerik (yönergeli `EmptyState` ya da kısa metin). */
|
|
44
|
+
emptyState?: ReactNode;
|
|
45
|
+
className?: string;
|
|
46
|
+
id?: string;
|
|
47
|
+
ref?: Ref<HTMLTableElement>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Salt okunur veri tablosu: gerçek `table`, `th` ve `scope` öznitelikleriyle; ekran okuyucu satır
|
|
51
|
+
* ve sütun başlıklarını her hücrede bildirir. Geniş tablo kendi kaydırma bölgesinde yatay kayar
|
|
52
|
+
* (sayfa taşmaz). Sunucu bileşenidir; sıralama, seçim ve sayfalama gerekiyorsa `DataTable`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function Table({ label, caption, columns, rows, footer, size, isStriped, isHoverable, maxHeight, emptyState, className, id, ref }: TableProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ScrollArea } from "../ScrollArea/ScrollArea.js";
|
|
2
|
+
import Table_module_default from "./Table.module.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/components/Table/Table.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Salt okunur veri tablosu: gerçek `table`, `th` ve `scope` öznitelikleriyle; ekran okuyucu satır
|
|
7
|
+
* ve sütun başlıklarını her hücrede bildirir. Geniş tablo kendi kaydırma bölgesinde yatay kayar
|
|
8
|
+
* (sayfa taşmaz). Sunucu bileşenidir; sıralama, seçim ve sayfalama gerekiyorsa `DataTable`.
|
|
9
|
+
*/
|
|
10
|
+
function Table({ label, caption, columns, rows, footer, size = "md", isStriped, isHoverable, maxHeight, emptyState, className, id, ref }) {
|
|
11
|
+
const cell = (c, content, key, row) => {
|
|
12
|
+
const props = {
|
|
13
|
+
key,
|
|
14
|
+
className: Table_module_default.cell,
|
|
15
|
+
"data-align": c.align ?? (c.isNumeric ? "end" : void 0),
|
|
16
|
+
"data-numeric": c.isNumeric ? "" : void 0
|
|
17
|
+
};
|
|
18
|
+
return c.isRowHeader && row !== false ? /* @__PURE__ */ jsx("th", {
|
|
19
|
+
...props,
|
|
20
|
+
scope: "row",
|
|
21
|
+
"data-row-header": "",
|
|
22
|
+
children: content
|
|
23
|
+
}) : /* @__PURE__ */ jsx("td", {
|
|
24
|
+
...props,
|
|
25
|
+
children: content
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
29
|
+
label,
|
|
30
|
+
orientation: maxHeight ? "both" : "horizontal",
|
|
31
|
+
maxHeight,
|
|
32
|
+
className: Table_module_default.scroll,
|
|
33
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
34
|
+
id,
|
|
35
|
+
ref,
|
|
36
|
+
"aria-label": label,
|
|
37
|
+
className: [Table_module_default.root, className].filter(Boolean).join(" "),
|
|
38
|
+
"data-size": size,
|
|
39
|
+
"data-striped": isStriped ? "" : void 0,
|
|
40
|
+
"data-hoverable": isHoverable ? "" : void 0,
|
|
41
|
+
"data-sticky": maxHeight ? "" : void 0,
|
|
42
|
+
children: [
|
|
43
|
+
caption ? /* @__PURE__ */ jsx("caption", {
|
|
44
|
+
className: Table_module_default.caption,
|
|
45
|
+
children: caption
|
|
46
|
+
}) : null,
|
|
47
|
+
/* @__PURE__ */ jsx("thead", {
|
|
48
|
+
className: Table_module_default.head,
|
|
49
|
+
children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsx("th", {
|
|
50
|
+
scope: "col",
|
|
51
|
+
className: Table_module_default.heading,
|
|
52
|
+
"data-align": c.align ?? (c.isNumeric ? "end" : void 0),
|
|
53
|
+
children: c.isHeaderHidden ? /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: Table_module_default.hidden,
|
|
55
|
+
children: c.header
|
|
56
|
+
}) : c.header
|
|
57
|
+
}, c.id)) })
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
60
|
+
className: Table_module_default.empty,
|
|
61
|
+
colSpan: columns.length,
|
|
62
|
+
children: emptyState
|
|
63
|
+
}) }) : rows.map((row) => /* @__PURE__ */ jsx("tr", {
|
|
64
|
+
className: Table_module_default.row,
|
|
65
|
+
children: columns.map((c) => cell(c, row[c.id], c.id))
|
|
66
|
+
}, row.id)) }),
|
|
67
|
+
footer ? /* @__PURE__ */ jsx("tfoot", {
|
|
68
|
+
className: Table_module_default.foot,
|
|
69
|
+
children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => cell(c, footer[c.id], c.id, true)) })
|
|
70
|
+
}) : null
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export { Table };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './Table.css';
|
|
2
|
+
// src/components/Table/Table.module.css
|
|
3
|
+
var Table_module_default = {
|
|
4
|
+
"scroll": "sti-Table-scroll-962cf",
|
|
5
|
+
"root": "sti-Table-root-864aa",
|
|
6
|
+
"caption": "sti-Table-caption-c6208",
|
|
7
|
+
"heading": "sti-Table-heading-d96d6",
|
|
8
|
+
"cell": "sti-Table-cell-c930d",
|
|
9
|
+
"row": "sti-Table-row-9f24a",
|
|
10
|
+
"foot": "sti-Table-foot-0c5cf",
|
|
11
|
+
"empty": "sti-Table-empty-3ca3c",
|
|
12
|
+
"hidden": "sti-Table-hidden-baa78"
|
|
13
|
+
};
|
|
14
|
+
export { Table_module_default as default };
|
|
@@ -3,10 +3,10 @@ import { useMessages } from "../../provider/UIProvider.js";
|
|
|
3
3
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
4
4
|
import { MenuItem } from "../Menu/Menu.js";
|
|
5
5
|
import { DropdownMenu } from "../DropdownMenu/DropdownMenu.js";
|
|
6
|
+
import { SegmentedControl, SegmentedControlItem } from "../SegmentedControl/SegmentedControl.js";
|
|
6
7
|
import { MonitorIcon } from "../../icons/generated/MonitorIcon.js";
|
|
7
8
|
import { MoonIcon } from "../../icons/generated/MoonIcon.js";
|
|
8
9
|
import { SunIcon } from "../../icons/generated/SunIcon.js";
|
|
9
|
-
import { SegmentedControl, SegmentedControlItem } from "../SegmentedControl/SegmentedControl.js";
|
|
10
10
|
import { isTheme } from "../ThemeScript/theme.js";
|
|
11
11
|
import { useTheme } from "../ThemeScript/useTheme.js";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import { TimeSlot } from "./timeSlots.js";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
|
-
export interface TimeSlot {
|
|
3
|
-
/** Başlangıç saati ("09:30"). */
|
|
4
|
-
time: string;
|
|
5
|
-
/** Dolu ya da kapalı saat (seçilemez, görünür kalır). */
|
|
6
|
-
isUnavailable?: boolean;
|
|
7
|
-
}
|
|
8
3
|
export interface TimeSlotPickerProps {
|
|
9
4
|
label: ReactNode;
|
|
10
5
|
description?: ReactNode;
|
|
@@ -28,11 +23,6 @@ export interface TimeSlotPickerProps {
|
|
|
28
23
|
className?: string;
|
|
29
24
|
id?: string;
|
|
30
25
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Aralıktan saatler: `timeSlots("09:00", "17:00", 30)` → 09:00, 09:30 … 16:30 (bitiş dahil
|
|
33
|
-
* değildir: son randevu bitişte biter). `unavailable` dolu saatleri işaretler.
|
|
34
|
-
*/
|
|
35
|
-
export declare function timeSlots(start: string, end: string, stepMinutes: number, unavailable?: readonly string[]): TimeSlot[];
|
|
36
26
|
/**
|
|
37
27
|
* Randevu saati seçimi: saatler hap biçiminde ızgarada (React Aria ListBox, `layout="grid"`);
|
|
38
28
|
* dolu saatler üstü çizili ve seçilemez, sabah, öğleden sonra ve akşam başlıklarıyla gruplu. Oklar
|
|
@@ -4,33 +4,11 @@ import { template } from "../../text/text.js";
|
|
|
4
4
|
import { AlertCircleIcon } from "../../icons/generated/AlertCircleIcon.js";
|
|
5
5
|
import { fieldStyles } from "../Field/Field.js";
|
|
6
6
|
import TimeSlotPicker_module_default from "./TimeSlotPicker.module.js";
|
|
7
|
+
import { toMinutes, toTime } from "./timeSlots.js";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
9
10
|
import { Header, ListBox, ListBoxItem, ListBoxSection } from "react-aria-components";
|
|
10
11
|
// src/components/TimeSlotPicker/TimeSlotPicker.tsx
|
|
11
|
-
const toMinutes = (t) => {
|
|
12
|
-
const m = /^(\d{1,2}):(\d{2})$/.exec(t);
|
|
13
|
-
return m ? Number(m[1]) * 60 + Number(m[2]) : NaN;
|
|
14
|
-
};
|
|
15
|
-
const toTime = (min) => `${String(Math.floor(min / 60) % 24).padStart(2, "0")}:${String(min % 60).padStart(2, "0")}`;
|
|
16
|
-
/**
|
|
17
|
-
* Aralıktan saatler: `timeSlots("09:00", "17:00", 30)` → 09:00, 09:30 … 16:30 (bitiş dahil
|
|
18
|
-
* değildir: son randevu bitişte biter). `unavailable` dolu saatleri işaretler.
|
|
19
|
-
*/
|
|
20
|
-
function timeSlots(start, end, stepMinutes, unavailable = []) {
|
|
21
|
-
const from = toMinutes(start);
|
|
22
|
-
const to = toMinutes(end);
|
|
23
|
-
if (!Number.isFinite(from) || !Number.isFinite(to) || stepMinutes <= 0) return [];
|
|
24
|
-
const out = [];
|
|
25
|
-
for (let m = from; m + stepMinutes <= to; m += stepMinutes) {
|
|
26
|
-
const time = toTime(m);
|
|
27
|
-
out.push({
|
|
28
|
-
time,
|
|
29
|
-
isUnavailable: unavailable.includes(time)
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return out;
|
|
33
|
-
}
|
|
34
12
|
const partOf = (t) => {
|
|
35
13
|
const m = toMinutes(t);
|
|
36
14
|
return m < 720 ? "morning" : m < 1020 ? "afternoon" : "evening";
|
|
@@ -159,4 +137,4 @@ function TimeSlotPicker({ label, description, errorMessage, slots, value, defaul
|
|
|
159
137
|
]
|
|
160
138
|
});
|
|
161
139
|
}
|
|
162
|
-
export { TimeSlotPicker
|
|
140
|
+
export { TimeSlotPicker };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { TimeSlot,
|
|
2
|
-
|
|
1
|
+
import { TimeSlot, timeSlots } from "./timeSlots.js";
|
|
2
|
+
import { TimeSlotPicker, TimeSlotPickerProps } from "./TimeSlotPicker.js";
|
|
3
|
+
export { type TimeSlot, TimeSlotPicker, TimeSlotPickerProps, timeSlots };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Saat aralığı yardımcıları: istemci yönergesi yoktur, sunucu bileşeninden de çağrılır. */
|
|
2
|
+
export interface TimeSlot {
|
|
3
|
+
/** Başlangıç saati ("09:30"). */
|
|
4
|
+
time: string;
|
|
5
|
+
/** Dolu ya da kapalı saat (seçilemez, görünür kalır). */
|
|
6
|
+
isUnavailable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Aralıktan saatler: `timeSlots("09:00", "17:00", 30)` → 09:00, 09:30 … 16:30 (bitiş dahil
|
|
10
|
+
* değildir: son randevu bitişte biter). `unavailable` dolu saatleri işaretler.
|
|
11
|
+
*/
|
|
12
|
+
export declare function timeSlots(start: string, end: string, stepMinutes: number, unavailable?: readonly string[]): TimeSlot[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/components/TimeSlotPicker/timeSlots.ts
|
|
2
|
+
const toMinutes = (t) => {
|
|
3
|
+
const m = /^(\d{1,2}):(\d{2})$/.exec(t);
|
|
4
|
+
return m ? Number(m[1]) * 60 + Number(m[2]) : NaN;
|
|
5
|
+
};
|
|
6
|
+
const toTime = (min) => `${String(Math.floor(min / 60) % 24).padStart(2, "0")}:${String(min % 60).padStart(2, "0")}`;
|
|
7
|
+
/**
|
|
8
|
+
* Aralıktan saatler: `timeSlots("09:00", "17:00", 30)` → 09:00, 09:30 … 16:30 (bitiş dahil
|
|
9
|
+
* değildir: son randevu bitişte biter). `unavailable` dolu saatleri işaretler.
|
|
10
|
+
*/
|
|
11
|
+
function timeSlots(start, end, stepMinutes, unavailable = []) {
|
|
12
|
+
const from = toMinutes(start);
|
|
13
|
+
const to = toMinutes(end);
|
|
14
|
+
if (!Number.isFinite(from) || !Number.isFinite(to) || stepMinutes <= 0) return [];
|
|
15
|
+
const out = [];
|
|
16
|
+
for (let m = from; m + stepMinutes <= to; m += stepMinutes) {
|
|
17
|
+
const time = toTime(m);
|
|
18
|
+
out.push({
|
|
19
|
+
time,
|
|
20
|
+
isUnavailable: unavailable.includes(time)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
export { timeSlots, toMinutes, toTime };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-TotalsBlock-root-08e5d {
|
|
4
|
+
--sti-totals-width: calc(var(--sti-space-32) * 2.5);
|
|
5
|
+
--sti-totals-line: var(--sti-border-subtle);
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
max-inline-size: var(--sti-totals-width);
|
|
8
|
+
min-inline-size: 0;
|
|
9
|
+
color: var(--sti-fg);
|
|
10
|
+
font-size: var(--sti-document-font-size, var(--sti-font-size-md));
|
|
11
|
+
line-height: var(--sti-document-line-height, var(--sti-line-height-md));
|
|
12
|
+
margin-inline-start: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sti-TotalsBlock-root-08e5d[data-size="sm"] {
|
|
16
|
+
--sti-document-font-size: var(--sti-font-size-sm);
|
|
17
|
+
--sti-document-line-height: var(--sti-line-height-sm);
|
|
18
|
+
--sti-document-cell: var(--sti-space-1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sti-TotalsBlock-root-08e5d[data-size="lg"] {
|
|
22
|
+
--sti-document-font-size: var(--sti-font-size-body);
|
|
23
|
+
--sti-document-line-height: var(--sti-line-height-body);
|
|
24
|
+
--sti-document-cell: var(--sti-space-3);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.sti-TotalsBlock-list-2fc5f {
|
|
28
|
+
margin: 0;
|
|
29
|
+
display: grid;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sti-TotalsBlock-row-fa85c {
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
gap: 0 var(--sti-space-4);
|
|
36
|
+
padding-block: var(--sti-document-cell, var(--sti-space-2));
|
|
37
|
+
border-block-end: var(--sti-border-width) solid var(--sti-totals-line);
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.sti-TotalsBlock-label-eb8ed {
|
|
43
|
+
color: var(--sti-fg-muted);
|
|
44
|
+
overflow-wrap: anywhere;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sti-TotalsBlock-value-e31ea {
|
|
49
|
+
font-variant-numeric: tabular-nums;
|
|
50
|
+
text-align: end;
|
|
51
|
+
margin: 0;
|
|
52
|
+
margin-inline-start: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.sti-TotalsBlock-row-fa85c[data-total] {
|
|
56
|
+
border-block-end: 0;
|
|
57
|
+
border-block-start: var(--sti-border-width-strong) solid var(--sti-border-strong);
|
|
58
|
+
font-size: var(--sti-font-size-lg);
|
|
59
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
60
|
+
line-height: var(--sti-line-height-lg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sti-TotalsBlock-row-fa85c[data-total] > .sti-TotalsBlock-label-eb8ed {
|
|
64
|
+
color: var(--sti-fg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.sti-TotalsBlock-row-fa85c:has( + .sti-TotalsBlock-row-fa85c[data-total]) {
|
|
68
|
+
border-block-end: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (forced-colors: active) {
|
|
72
|
+
.sti-TotalsBlock-row-fa85c {
|
|
73
|
+
border-color: graytext;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.sti-TotalsBlock-row-fa85c[data-total] {
|
|
77
|
+
border-block-start-color: canvastext;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media print {
|
|
82
|
+
.sti-TotalsBlock-root-08e5d {
|
|
83
|
+
break-inside: avoid;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Locale } from "../../provider/locale.js";
|
|
2
|
+
import { DocumentSize } from "../_document/types.js";
|
|
3
|
+
import { DocumentTotals } from "./totals.js";
|
|
4
|
+
export interface TotalsBlockLabels {
|
|
5
|
+
subtotal?: string;
|
|
6
|
+
discount?: string;
|
|
7
|
+
/** `{rate}` yer tutucusu oranı alır ("KDV %{rate}"). */
|
|
8
|
+
vat?: string;
|
|
9
|
+
vatTotal?: string;
|
|
10
|
+
total?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TotalsBlockProps {
|
|
13
|
+
/** Toplamlar; `calculateTotals(lines)` ile hesaplanır ya da elle verilir. */
|
|
14
|
+
totals: DocumentTotals;
|
|
15
|
+
/** ISO 4217 para birimi; varsayılan "TRY". */
|
|
16
|
+
currency?: string;
|
|
17
|
+
/** Oran başına KDV satırları yerine tek "Toplam KDV" satırı. */
|
|
18
|
+
isVatCollapsed?: boolean;
|
|
19
|
+
labels?: TotalsBlockLabels;
|
|
20
|
+
/** Bloğun adı (ekran okuyucu); varsayılan "Toplamlar". */
|
|
21
|
+
title?: string;
|
|
22
|
+
size?: DocumentSize;
|
|
23
|
+
locale?: Locale;
|
|
24
|
+
className?: string;
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Ara toplam, iskonto, KDV ve genel toplam bloğu. Ad–değer listesidir (`dl`); tutarlar sağa
|
|
29
|
+
* yaslı ve eşit genişlikte rakamlıdır, genel toplam üstten çizgiyle ayrılır ve büyüktür.
|
|
30
|
+
* İskonto ve oran satırları yalnız varsa yazılır. Sunucu bileşenidir.
|
|
31
|
+
*/
|
|
32
|
+
export declare function TotalsBlock({ totals, currency, isVatCollapsed, labels, title, size, locale, className, id }: TotalsBlockProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Amount } from "../Amount/Amount.js";
|
|
2
|
+
import { documentText, fill } from "../_document/text.js";
|
|
3
|
+
import TotalsBlock_module_default from "./TotalsBlock.module.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/TotalsBlock/TotalsBlock.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Ara toplam, iskonto, KDV ve genel toplam bloğu. Ad–değer listesidir (`dl`); tutarlar sağa
|
|
8
|
+
* yaslı ve eşit genişlikte rakamlıdır, genel toplam üstten çizgiyle ayrılır ve büyüktür.
|
|
9
|
+
* İskonto ve oran satırları yalnız varsa yazılır. Sunucu bileşenidir.
|
|
10
|
+
*/
|
|
11
|
+
function TotalsBlock({ totals, currency = "TRY", isVatCollapsed = false, labels, title, size, locale, className, id }) {
|
|
12
|
+
const t = documentText(locale);
|
|
13
|
+
const text = {
|
|
14
|
+
subtotal: labels?.subtotal ?? t.documentSubtotal,
|
|
15
|
+
discount: labels?.discount ?? t.documentDiscount,
|
|
16
|
+
vat: labels?.vat ?? t.documentVat,
|
|
17
|
+
vatTotal: labels?.vatTotal ?? t.documentVatTotal,
|
|
18
|
+
total: labels?.total ?? t.documentTotal
|
|
19
|
+
};
|
|
20
|
+
const money = (value) => /* @__PURE__ */ jsx(Amount, {
|
|
21
|
+
value,
|
|
22
|
+
currency,
|
|
23
|
+
locale
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx("section", {
|
|
26
|
+
id,
|
|
27
|
+
className: [TotalsBlock_module_default.root, className].filter(Boolean).join(" "),
|
|
28
|
+
"data-size": size,
|
|
29
|
+
"data-sti-document-totals": "",
|
|
30
|
+
"aria-label": title ?? t.documentTotals,
|
|
31
|
+
children: /* @__PURE__ */ jsxs("dl", {
|
|
32
|
+
className: TotalsBlock_module_default.list,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: TotalsBlock_module_default.row,
|
|
36
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
37
|
+
className: TotalsBlock_module_default.label,
|
|
38
|
+
children: text.subtotal
|
|
39
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
40
|
+
className: TotalsBlock_module_default.value,
|
|
41
|
+
children: money(totals.subtotal)
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
totals.discount > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: TotalsBlock_module_default.row,
|
|
46
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
47
|
+
className: TotalsBlock_module_default.label,
|
|
48
|
+
children: text.discount
|
|
49
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
50
|
+
className: TotalsBlock_module_default.value,
|
|
51
|
+
children: money(-totals.discount)
|
|
52
|
+
})]
|
|
53
|
+
}) : null,
|
|
54
|
+
isVatCollapsed ? totals.vatTotal > 0 && /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: TotalsBlock_module_default.row,
|
|
56
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
57
|
+
className: TotalsBlock_module_default.label,
|
|
58
|
+
children: text.vatTotal
|
|
59
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
60
|
+
className: TotalsBlock_module_default.value,
|
|
61
|
+
children: money(totals.vatTotal)
|
|
62
|
+
})]
|
|
63
|
+
}) : totals.vat.map((v) => /* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: TotalsBlock_module_default.row,
|
|
65
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
66
|
+
className: TotalsBlock_module_default.label,
|
|
67
|
+
children: fill(text.vat, { rate: v.rate })
|
|
68
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
69
|
+
className: TotalsBlock_module_default.value,
|
|
70
|
+
children: money(v.amount)
|
|
71
|
+
})]
|
|
72
|
+
}, v.rate)),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", {
|
|
74
|
+
className: TotalsBlock_module_default.row,
|
|
75
|
+
"data-total": "",
|
|
76
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
77
|
+
className: TotalsBlock_module_default.label,
|
|
78
|
+
children: text.total
|
|
79
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
80
|
+
className: TotalsBlock_module_default.value,
|
|
81
|
+
children: money(totals.total)
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export { TotalsBlock };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './TotalsBlock.css';
|
|
2
|
+
// src/components/TotalsBlock/TotalsBlock.module.css
|
|
3
|
+
var TotalsBlock_module_default = {
|
|
4
|
+
"root": "sti-TotalsBlock-root-08e5d",
|
|
5
|
+
"list": "sti-TotalsBlock-list-2fc5f",
|
|
6
|
+
"row": "sti-TotalsBlock-row-fa85c",
|
|
7
|
+
"label": "sti-TotalsBlock-label-eb8ed",
|
|
8
|
+
"value": "sti-TotalsBlock-value-e31ea"
|
|
9
|
+
};
|
|
10
|
+
export { TotalsBlock_module_default as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DocumentLine } from "../_document/types.js";
|
|
2
|
+
/** Bir KDV oranının matrahı ve tutarı. */
|
|
3
|
+
export interface VatLine {
|
|
4
|
+
/** Yüzde olarak oran (20). */
|
|
5
|
+
rate: number;
|
|
6
|
+
/** Bu orana tabi iskontolu tutar (matrah). */
|
|
7
|
+
base: number;
|
|
8
|
+
/** Matrahın KDV'si. */
|
|
9
|
+
amount: number;
|
|
10
|
+
}
|
|
11
|
+
export interface DocumentTotals {
|
|
12
|
+
/** İskontosuz ara toplam (KDV hariç). */
|
|
13
|
+
subtotal: number;
|
|
14
|
+
/** Toplam iskonto (pozitif sayı). */
|
|
15
|
+
discount: number;
|
|
16
|
+
/** Orana göre KDV dökümü; yalnız sıfırdan büyük oranlar, küçükten büyüğe. */
|
|
17
|
+
vat: readonly VatLine[];
|
|
18
|
+
/** Toplam KDV. */
|
|
19
|
+
vatTotal: number;
|
|
20
|
+
/** Genel toplam = ara toplam − iskonto + KDV. */
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Kalemlerden toplamları hesaplar. Her kalemin tutarı kuruşa yuvarlanır, iskonto kalem
|
|
25
|
+
* düzeyindedir, KDV oran başına matrah toplamı üzerinden hesaplanır ve kuruşa yuvarlanır
|
|
26
|
+
* (fatura düzenleme uygulamalarındaki olağan yöntem). Sonlu olmayan sayılar hata verir.
|
|
27
|
+
*/
|
|
28
|
+
export declare function calculateTotals(lines: readonly DocumentLine[]): DocumentTotals;
|