@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,47 @@
|
|
|
1
|
+
import { CheckIcon } from "../../icons/generated/CheckIcon.js";
|
|
2
|
+
import { AlertTriangleIcon } from "../../icons/generated/AlertTriangleIcon.js";
|
|
3
|
+
import { Badge } from "../../components/Badge/Badge.js";
|
|
4
|
+
import { ClockIcon } from "../../icons/generated/ClockIcon.js";
|
|
5
|
+
import { CalendarIcon } from "../../icons/generated/CalendarIcon.js";
|
|
6
|
+
import { XCircleIcon } from "../../icons/generated/XCircleIcon.js";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
// src/commerce/StockBadge/StockBadge.tsx
|
|
9
|
+
const TONE = {
|
|
10
|
+
"in-stock": "success",
|
|
11
|
+
"low-stock": "warning",
|
|
12
|
+
"out-of-stock": "danger",
|
|
13
|
+
backorder: "info",
|
|
14
|
+
preorder: "info"
|
|
15
|
+
};
|
|
16
|
+
const ICON = {
|
|
17
|
+
"in-stock": /* @__PURE__ */ jsx(CheckIcon, {}),
|
|
18
|
+
"low-stock": /* @__PURE__ */ jsx(AlertTriangleIcon, {}),
|
|
19
|
+
"out-of-stock": /* @__PURE__ */ jsx(XCircleIcon, {}),
|
|
20
|
+
backorder: /* @__PURE__ */ jsx(ClockIcon, {}),
|
|
21
|
+
preorder: /* @__PURE__ */ jsx(CalendarIcon, {})
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Stok adedinden durumu çıkarır: sıfır ya da altı `out-of-stock`, `lowThreshold` ve altı
|
|
25
|
+
* `low-stock`, üstü `in-stock`. Adet bilinmiyorsa (`undefined`) stokta sayılır.
|
|
26
|
+
*/
|
|
27
|
+
function stockStatus(quantity, lowThreshold = 5) {
|
|
28
|
+
if (quantity === void 0 || !Number.isFinite(quantity)) return "in-stock";
|
|
29
|
+
if (quantity <= 0) return "out-of-stock";
|
|
30
|
+
return quantity <= lowThreshold ? "low-stock" : "in-stock";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Stok rozeti: durumu renk, ikon ve metinle birlikte gösterir (renk tek başına anlam taşımaz).
|
|
34
|
+
* `Badge` üzerine kuruludur; sunucu bileşenidir, yerleşik metin taşımaz.
|
|
35
|
+
*/
|
|
36
|
+
function StockBadge({ status, children, size = "md", variant = "soft", className, id }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
38
|
+
id,
|
|
39
|
+
className,
|
|
40
|
+
tone: TONE[status],
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
icon: ICON[status],
|
|
44
|
+
children
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { StockBadge, stockStatus };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-VariantSelector-root-5fc46 {
|
|
4
|
+
--sti-variant-h: var(--sti-control-h-md);
|
|
5
|
+
--sti-variant-swatch: var(--sti-space-8);
|
|
6
|
+
--sti-variant-gap: var(--sti-space-2);
|
|
7
|
+
--sti-variant-radius: var(--sti-radius-md);
|
|
8
|
+
--sti-variant-font-size: var(--sti-font-size-sm);
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.sti-VariantSelector-root-5fc46[data-size="sm"] {
|
|
13
|
+
--sti-variant-h: var(--sti-control-h-sm);
|
|
14
|
+
--sti-variant-swatch: var(--sti-space-6);
|
|
15
|
+
--sti-variant-font-size: var(--sti-font-size-xs);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sti-VariantSelector-root-5fc46[data-size="lg"] {
|
|
19
|
+
--sti-variant-h: var(--sti-control-h-lg);
|
|
20
|
+
--sti-variant-swatch: var(--sti-space-10);
|
|
21
|
+
--sti-variant-font-size: var(--sti-font-size-md);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sti-VariantSelector-header-0db61 {
|
|
25
|
+
align-items: baseline;
|
|
26
|
+
gap: var(--sti-space-1) var(--sti-space-2);
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sti-VariantSelector-chosen-4a308 {
|
|
33
|
+
min-width: 0;
|
|
34
|
+
color: var(--sti-fg-muted);
|
|
35
|
+
font-size: var(--sti-font-size-sm);
|
|
36
|
+
line-height: var(--sti-line-height-sm);
|
|
37
|
+
overflow-wrap: anywhere;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.sti-VariantSelector-options-db5a2 {
|
|
41
|
+
gap: var(--sti-variant-gap);
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sti-VariantSelector-option-e1e74 {
|
|
48
|
+
min-width: 0;
|
|
49
|
+
max-width: 100%;
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.sti-VariantSelector-control-f5de0 {
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
min-width: var(--sti-variant-h);
|
|
56
|
+
min-height: var(--sti-variant-h);
|
|
57
|
+
border: var(--sti-border-width) solid var(--sti-border-control);
|
|
58
|
+
border-radius: var(--sti-variant-radius);
|
|
59
|
+
background: var(--sti-bg-canvas);
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
color: var(--sti-fg);
|
|
62
|
+
font-family: var(--sti-font-text);
|
|
63
|
+
font-size: var(--sti-variant-font-size);
|
|
64
|
+
font-weight: var(--sti-font-weight-medium);
|
|
65
|
+
line-height: var(--sti-line-height-sm);
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
transition: border-color var(--sti-duration-fast) var(--sti-ease-snap),
|
|
68
|
+
background-color var(--sti-duration-fast) var(--sti-ease-snap),
|
|
69
|
+
box-shadow var(--sti-duration-fast) var(--sti-ease-snap);
|
|
70
|
+
-webkit-tap-highlight-color: transparent;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
position: relative;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.sti-VariantSelector-text-cad67 {
|
|
78
|
+
min-width: 0;
|
|
79
|
+
padding-inline: var(--sti-space-4);
|
|
80
|
+
overflow-wrap: anywhere;
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.sti-VariantSelector-root-5fc46[data-type="swatch"] .sti-VariantSelector-control-f5de0 {
|
|
85
|
+
min-width: calc(var(--sti-variant-swatch) + var(--sti-space-2));
|
|
86
|
+
min-height: calc(var(--sti-variant-swatch) + var(--sti-space-2));
|
|
87
|
+
border-radius: var(--sti-radius-pill);
|
|
88
|
+
background: none;
|
|
89
|
+
border-color: #0000;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sti-VariantSelector-swatch-cc845 {
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
width: var(--sti-variant-swatch);
|
|
95
|
+
height: var(--sti-variant-swatch);
|
|
96
|
+
border: var(--sti-border-width) solid var(--sti-border-control);
|
|
97
|
+
border-radius: var(--sti-radius-pill);
|
|
98
|
+
background-color: var(--sti-variant-color, transparent);
|
|
99
|
+
forced-color-adjust: none;
|
|
100
|
+
display: block;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (pointer: coarse) {
|
|
104
|
+
.sti-VariantSelector-control-f5de0 {
|
|
105
|
+
min-width: var(--sti-control-h-md);
|
|
106
|
+
min-height: var(--sti-control-h-md);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (hover: hover) {
|
|
111
|
+
.sti-VariantSelector-control-f5de0[data-hovered]:not([data-selected], [data-disabled]) {
|
|
112
|
+
border-color: var(--sti-border-strong);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.sti-VariantSelector-root-5fc46[data-type="text"] .sti-VariantSelector-control-f5de0[data-hovered]:not([data-selected], [data-disabled]) {
|
|
116
|
+
background: var(--sti-bg-surface-hover);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.sti-VariantSelector-control-f5de0[data-selected] {
|
|
121
|
+
border-color: var(--sti-border-selected);
|
|
122
|
+
box-shadow: inset 0 0 0 1px var(--sti-border-selected);
|
|
123
|
+
font-weight: var(--sti-font-weight-semibold);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.sti-VariantSelector-root-5fc46[data-type="text"] .sti-VariantSelector-control-f5de0[data-selected] {
|
|
127
|
+
background: var(--sti-bg-accent-subtle);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.sti-VariantSelector-root-5fc46[data-type="swatch"] .sti-VariantSelector-control-f5de0[data-selected] {
|
|
131
|
+
box-shadow: none;
|
|
132
|
+
border-width: var(--sti-border-width-strong);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.sti-VariantSelector-control-f5de0[data-focus-visible] {
|
|
136
|
+
outline: var(--sti-focus-ring-width) solid var(--sti-focus-ring);
|
|
137
|
+
outline-offset: var(--sti-focus-ring-offset);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.sti-VariantSelector-control-f5de0[data-invalid]:not([data-selected]) {
|
|
141
|
+
border-color: var(--sti-fg-danger);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.sti-VariantSelector-control-f5de0[data-disabled] {
|
|
145
|
+
opacity: var(--sti-opacity-disabled);
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.sti-VariantSelector-root-5fc46[data-type="text"] .sti-VariantSelector-control-f5de0[data-disabled] {
|
|
150
|
+
color: var(--sti-fg-muted);
|
|
151
|
+
border-style: dashed;
|
|
152
|
+
text-decoration: line-through;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.sti-VariantSelector-root-5fc46[data-type="swatch"] .sti-VariantSelector-control-f5de0[data-disabled]:after {
|
|
156
|
+
border-block-start: var(--sti-border-width-strong) solid var(--sti-fg);
|
|
157
|
+
content: "";
|
|
158
|
+
position: absolute;
|
|
159
|
+
inset-block-start: 50%;
|
|
160
|
+
inset-inline: 0;
|
|
161
|
+
transform: rotate(-45deg);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (prefers-reduced-motion: reduce) {
|
|
165
|
+
.sti-VariantSelector-control-f5de0 {
|
|
166
|
+
transition: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (forced-colors: active) {
|
|
171
|
+
.sti-VariantSelector-root-5fc46[data-type="text"] .sti-VariantSelector-control-f5de0:not([data-selected], [data-disabled]) {
|
|
172
|
+
border-color: buttontext;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.sti-VariantSelector-control-f5de0[data-selected] {
|
|
176
|
+
border-color: highlight;
|
|
177
|
+
box-shadow: inset 0 0 0 1px highlight;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.sti-VariantSelector-root-5fc46[data-type="swatch"] .sti-VariantSelector-control-f5de0[data-selected] {
|
|
181
|
+
box-shadow: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.sti-VariantSelector-swatch-cc845 {
|
|
185
|
+
border-color: canvastext;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.sti-VariantSelector-control-f5de0[data-focus-visible] {
|
|
189
|
+
outline-color: highlight;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.sti-VariantSelector-control-f5de0[data-disabled] {
|
|
193
|
+
color: graytext;
|
|
194
|
+
opacity: 1;
|
|
195
|
+
border-color: graytext;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.sti-VariantSelector-root-5fc46[data-type="swatch"] .sti-VariantSelector-control-f5de0[data-disabled]:after {
|
|
199
|
+
border-block-start-color: graytext;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ErrorMessage } from "../../components/Field/Field.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface VariantOption {
|
|
4
|
+
/** Seçeneğin değeri (formla gönderilen ve `onChange`'e giden). */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Görünür ve okunan ad ("Lacivert", "M"). Renk örneğinde de erişilebilir ad budur. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** `swatch` türünde örneğin rengi (herhangi bir CSS rengi: "#1f3a5f", "oklch(...)"). */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Seçenek şu anda alınamıyor (tükendi): çizgili görünür, seçilemez; adına "tükendi" eklenir. */
|
|
11
|
+
isUnavailable?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface VariantSelectorProps {
|
|
14
|
+
/** Seçenek grubunun adı ("Renk", "Beden"). */
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
errorMessage?: ErrorMessage;
|
|
18
|
+
options: readonly VariantOption[];
|
|
19
|
+
value?: string | null;
|
|
20
|
+
defaultValue?: string | null;
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Görünüş:
|
|
24
|
+
* - `text`: etiketli seçim düğmeleri (beden, kapasite);
|
|
25
|
+
* - `swatch`: renk örnekleri (etiket görünmez, ekran okuyucu okur).
|
|
26
|
+
*/
|
|
27
|
+
type?: "text" | "swatch";
|
|
28
|
+
/** Seçili seçeneğin adını grup etiketinin yanında yazar ("Renk: Lacivert"); varsayılan açık. */
|
|
29
|
+
showSelected?: boolean;
|
|
30
|
+
/** Boy: `sm`, `md`, `lg` (`control-h-*`); dokunmatikte en az 44 piksel. */
|
|
31
|
+
size?: "sm" | "md" | "lg";
|
|
32
|
+
name?: string;
|
|
33
|
+
isRequired?: boolean;
|
|
34
|
+
isInvalid?: boolean;
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
className?: string;
|
|
37
|
+
id?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Ürün seçeneği seçici (APG Radio Group): beden, renk, kapasite gibi tek seçimli seçenekler. Grup
|
|
41
|
+
* tek sekme durağıdır, oklar seçeneği değiştirir. Tükenen seçenek çizgili görünür ve seçilemez;
|
|
42
|
+
* seçili seçenek halka ve işaretle belli edilir (yalnız renkle değil).
|
|
43
|
+
*/
|
|
44
|
+
export declare function VariantSelector({ label, description, errorMessage, options, value, defaultValue, onChange, type, showSelected, size, className, ...rest }: VariantSelectorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMessages } from "../../provider/UIProvider.js";
|
|
3
|
+
import { FieldDescription, FieldErrorText, FieldLabel, fieldStyles } from "../../components/Field/Field.js";
|
|
4
|
+
import { VisuallyHidden } from "../../components/VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
import VariantSelector_module_default from "./VariantSelector.module.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { RadioButton, RadioField, RadioGroup } from "react-aria-components";
|
|
9
|
+
// src/commerce/VariantSelector/VariantSelector.tsx
|
|
10
|
+
/** Renk geçerli bir CSS rengiyse CSSOM ile örneğe yazar (satır içi stil özniteliği kullanılmaz). */
|
|
11
|
+
function paint(color) {
|
|
12
|
+
return (el) => {
|
|
13
|
+
if (!el) return;
|
|
14
|
+
if (color && typeof CSS !== "undefined" && CSS.supports("color", color)) el.style.setProperty("--sti-variant-color", color);
|
|
15
|
+
else el.style.removeProperty("--sti-variant-color");
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Ürün seçeneği seçici (APG Radio Group): beden, renk, kapasite gibi tek seçimli seçenekler. Grup
|
|
20
|
+
* tek sekme durağıdır, oklar seçeneği değiştirir. Tükenen seçenek çizgili görünür ve seçilemez;
|
|
21
|
+
* seçili seçenek halka ve işaretle belli edilir (yalnız renkle değil).
|
|
22
|
+
*/
|
|
23
|
+
function VariantSelector({ label, description, errorMessage, options, value, defaultValue, onChange, type = "text", showSelected = true, size = "md", className, ...rest }) {
|
|
24
|
+
const t = useMessages();
|
|
25
|
+
const [inner, setInner] = useState(defaultValue ?? null);
|
|
26
|
+
const current = value === void 0 ? inner : value;
|
|
27
|
+
const chosen = options.find((o) => o.value === current);
|
|
28
|
+
return /* @__PURE__ */ jsxs(RadioGroup, {
|
|
29
|
+
...rest,
|
|
30
|
+
orientation: "horizontal",
|
|
31
|
+
value,
|
|
32
|
+
defaultValue: defaultValue ?? void 0,
|
|
33
|
+
onChange: (v) => {
|
|
34
|
+
setInner(v);
|
|
35
|
+
onChange?.(v);
|
|
36
|
+
},
|
|
37
|
+
className: [
|
|
38
|
+
fieldStyles.root,
|
|
39
|
+
VariantSelector_module_default.root,
|
|
40
|
+
className
|
|
41
|
+
].filter(Boolean).join(" "),
|
|
42
|
+
"data-size": size,
|
|
43
|
+
"data-type": type,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: VariantSelector_module_default.header,
|
|
47
|
+
children: [/* @__PURE__ */ jsx(FieldLabel, { children: label }), showSelected && chosen ? /* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: VariantSelector_module_default.chosen,
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
children: chosen.label
|
|
51
|
+
}) : null]
|
|
52
|
+
}),
|
|
53
|
+
description ? /* @__PURE__ */ jsx(FieldDescription, { children: description }) : null,
|
|
54
|
+
/* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: VariantSelector_module_default.options,
|
|
56
|
+
children: options.map((option) => /* @__PURE__ */ jsx(RadioField, {
|
|
57
|
+
value: option.value,
|
|
58
|
+
isDisabled: option.isUnavailable,
|
|
59
|
+
className: VariantSelector_module_default.option,
|
|
60
|
+
children: /* @__PURE__ */ jsxs(RadioButton, {
|
|
61
|
+
className: VariantSelector_module_default.control,
|
|
62
|
+
children: [type === "swatch" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: VariantSelector_module_default.swatch,
|
|
64
|
+
ref: paint(option.color),
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}), /* @__PURE__ */ jsx(VisuallyHidden, { children: option.label })] }) : /* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: VariantSelector_module_default.text,
|
|
68
|
+
children: option.label
|
|
69
|
+
}), option.isUnavailable ? /* @__PURE__ */ jsx(VisuallyHidden, { children: `, ${t.variantUnavailable}` }) : null]
|
|
70
|
+
})
|
|
71
|
+
}, option.value))
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(FieldErrorText, { errorMessage })
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export { VariantSelector };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './VariantSelector.css';
|
|
2
|
+
// src/commerce/VariantSelector/VariantSelector.module.css
|
|
3
|
+
var VariantSelector_module_default = {
|
|
4
|
+
"root": "sti-VariantSelector-root-5fc46",
|
|
5
|
+
"header": "sti-VariantSelector-header-0db61",
|
|
6
|
+
"chosen": "sti-VariantSelector-chosen-4a308",
|
|
7
|
+
"options": "sti-VariantSelector-options-db5a2",
|
|
8
|
+
"option": "sti-VariantSelector-option-e1e74",
|
|
9
|
+
"control": "sti-VariantSelector-control-f5de0",
|
|
10
|
+
"text": "sti-VariantSelector-text-cad67",
|
|
11
|
+
"swatch": "sti-VariantSelector-swatch-cc845"
|
|
12
|
+
};
|
|
13
|
+
export { VariantSelector_module_default as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AddToCartButton, AddToCartButtonProps, AddToCartStatus } from "./AddToCartButton/AddToCartButton.js";
|
|
2
|
+
import "./AddToCartButton/index.js";
|
|
3
|
+
import { PriceDisplay, PriceDisplayProps, PriceDisplaySize, discountRatio } from "./PriceDisplay/PriceDisplay.js";
|
|
4
|
+
import { QuantityStepper, QuantityStepperProps } from "./QuantityStepper/QuantityStepper.js";
|
|
5
|
+
import "./QuantityStepper/index.js";
|
|
6
|
+
import { StockBadge, StockBadgeProps, StockStatus, stockStatus } from "./StockBadge/StockBadge.js";
|
|
7
|
+
import "./StockBadge/index.js";
|
|
8
|
+
import { VariantOption, VariantSelector, VariantSelectorProps } from "./VariantSelector/VariantSelector.js";
|
|
9
|
+
import "./VariantSelector/index.js";
|
|
10
|
+
export { AddToCartButton, AddToCartButtonProps, AddToCartStatus, PriceDisplay, PriceDisplayProps, PriceDisplaySize, QuantityStepper, QuantityStepperProps, StockBadge, StockBadgeProps, StockStatus, VariantOption, VariantSelector, VariantSelectorProps, discountRatio, stockStatus };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AddToCartButton } from "./AddToCartButton/AddToCartButton.js";
|
|
2
|
+
import { PriceDisplay, discountRatio } from "./PriceDisplay/PriceDisplay.js";
|
|
3
|
+
import { QuantityStepper } from "./QuantityStepper/QuantityStepper.js";
|
|
4
|
+
import { StockBadge, stockStatus } from "./StockBadge/StockBadge.js";
|
|
5
|
+
import { VariantSelector } from "./VariantSelector/VariantSelector.js";
|
|
6
|
+
export { AddToCartButton, PriceDisplay, QuantityStepper, StockBadge, VariantSelector, discountRatio, stockStatus };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
@layer sti.reset, sti.tokens, sti.base, sti.components, sti.variants, sti.utilities;
|
|
2
|
+
@layer sti.components {
|
|
3
|
+
.sti-Accordion-root-3bc1b {
|
|
4
|
+
--sti-accordion-h: var(--sti-control-h-lg);
|
|
5
|
+
--sti-accordion-px: var(--sti-space-4);
|
|
6
|
+
--sti-accordion-gap: var(--sti-space-3);
|
|
7
|
+
--sti-accordion-title-size: var(--sti-font-size-md);
|
|
8
|
+
--sti-accordion-title-leading: var(--sti-line-height-md);
|
|
9
|
+
--sti-accordion-radius: var(--sti-radius-md);
|
|
10
|
+
--sti-accordion-divider: var(--sti-border-subtle);
|
|
11
|
+
min-inline-size: 0;
|
|
12
|
+
color: var(--sti-fg);
|
|
13
|
+
font-family: var(--sti-font-text);
|
|
14
|
+
display: grid;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.sti-Accordion-root-3bc1b[data-size="sm"] {
|
|
18
|
+
--sti-accordion-h: var(--sti-control-h-md);
|
|
19
|
+
--sti-accordion-px: var(--sti-space-3);
|
|
20
|
+
--sti-accordion-title-size: var(--sti-font-size-sm);
|
|
21
|
+
--sti-accordion-title-leading: var(--sti-line-height-sm);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sti-Accordion-root-3bc1b[data-size="lg"] {
|
|
25
|
+
--sti-accordion-h: calc(var(--sti-control-h-lg) + var(--sti-space-4));
|
|
26
|
+
--sti-accordion-px: var(--sti-space-6);
|
|
27
|
+
--sti-accordion-title-size: var(--sti-font-size-lg);
|
|
28
|
+
--sti-accordion-title-leading: var(--sti-line-height-lg);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sti-Accordion-root-3bc1b[data-variant="flush"] {
|
|
32
|
+
border-block-start: var(--sti-border-width) solid var(--sti-accordion-divider);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.sti-Accordion-root-3bc1b[data-variant="separated"] {
|
|
36
|
+
gap: var(--sti-space-2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.sti-Accordion-group-84d77 {
|
|
40
|
+
display: contents;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.sti-Accordion-item-aa828 {
|
|
44
|
+
min-inline-size: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sti-Accordion-root-3bc1b[data-variant="flush"] .sti-Accordion-item-aa828 {
|
|
48
|
+
border-block-end: var(--sti-border-width) solid var(--sti-accordion-divider);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sti-Accordion-root-3bc1b[data-variant="separated"] .sti-Accordion-item-aa828 {
|
|
52
|
+
border: var(--sti-border-width) solid var(--sti-border-subtle);
|
|
53
|
+
border-radius: var(--sti-accordion-radius);
|
|
54
|
+
background: var(--sti-bg-surface);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sti-Accordion-heading-bc71f {
|
|
58
|
+
font: inherit;
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sti-Accordion-trigger-4ad24 {
|
|
63
|
+
inline-size: 100%;
|
|
64
|
+
min-block-size: var(--sti-accordion-h);
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--sti-accordion-gap);
|
|
67
|
+
padding-block: var(--sti-space-2);
|
|
68
|
+
padding-inline: var(--sti-accordion-px);
|
|
69
|
+
border-radius: inherit;
|
|
70
|
+
color: inherit;
|
|
71
|
+
font: inherit;
|
|
72
|
+
text-align: start;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
transition: background var(--sti-duration-fast) var(--sti-ease-snap);
|
|
75
|
+
background: none;
|
|
76
|
+
border: 0;
|
|
77
|
+
outline: none;
|
|
78
|
+
display: flex;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (hover: hover) {
|
|
82
|
+
.sti-Accordion-trigger-4ad24[data-hovered] {
|
|
83
|
+
background: var(--sti-bg-surface-hover);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.sti-Accordion-trigger-4ad24[data-pressed] {
|
|
88
|
+
background: var(--sti-bg-surface-active);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sti-Accordion-trigger-4ad24[data-focus-visible] {
|
|
92
|
+
outline: var(--sti-focus-ring-width) solid var(--sti-focus-ring);
|
|
93
|
+
outline-offset: calc(var(--sti-focus-ring-width) * -1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sti-Accordion-trigger-4ad24[data-disabled] {
|
|
97
|
+
opacity: var(--sti-opacity-disabled);
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.sti-Accordion-icon-f8291 {
|
|
102
|
+
color: var(--sti-fg-muted);
|
|
103
|
+
font-size: var(--sti-icon-md);
|
|
104
|
+
flex: none;
|
|
105
|
+
place-items: center;
|
|
106
|
+
display: inline-grid;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.sti-Accordion-title-a05be {
|
|
110
|
+
flex: 1;
|
|
111
|
+
min-inline-size: 0;
|
|
112
|
+
display: grid;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.sti-Accordion-name-66847 {
|
|
116
|
+
font-size: var(--sti-accordion-title-size);
|
|
117
|
+
font-weight: var(--sti-font-weight-medium);
|
|
118
|
+
line-height: var(--sti-accordion-title-leading);
|
|
119
|
+
overflow-wrap: anywhere;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sti-Accordion-description-572eb {
|
|
123
|
+
color: var(--sti-fg-muted);
|
|
124
|
+
font-size: var(--sti-font-size-sm);
|
|
125
|
+
line-height: var(--sti-line-height-sm);
|
|
126
|
+
overflow-wrap: anywhere;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.sti-Accordion-chevron-53919 {
|
|
130
|
+
color: var(--sti-fg-muted);
|
|
131
|
+
transition: rotate var(--sti-duration-fast) var(--sti-ease-snap);
|
|
132
|
+
flex: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.sti-Accordion-item-aa828[data-expanded] .sti-Accordion-chevron-53919 {
|
|
136
|
+
rotate: 180deg;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.sti-Accordion-panel-33d52 {
|
|
140
|
+
min-inline-size: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.sti-Accordion-content-ae7b8 {
|
|
144
|
+
padding-block: var(--sti-space-1) var(--sti-space-5);
|
|
145
|
+
padding-inline: var(--sti-accordion-px);
|
|
146
|
+
color: var(--sti-fg);
|
|
147
|
+
font-size: var(--sti-font-size-md);
|
|
148
|
+
line-height: var(--sti-line-height-md);
|
|
149
|
+
overflow-wrap: anywhere;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@media (forced-colors: active) {
|
|
153
|
+
.sti-Accordion-root-3bc1b[data-variant="separated"] .sti-Accordion-item-aa828 {
|
|
154
|
+
border-color: canvastext;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.sti-Accordion-root-3bc1b[data-variant="flush"], .sti-Accordion-root-3bc1b[data-variant="flush"] .sti-Accordion-item-aa828 {
|
|
158
|
+
border-color: graytext;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.sti-Accordion-trigger-4ad24[data-hovered] {
|
|
162
|
+
outline: var(--sti-border-width) solid Highlight;
|
|
163
|
+
outline-offset: calc(var(--sti-border-width) * -1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.sti-Accordion-trigger-4ad24[data-focus-visible] {
|
|
167
|
+
outline-color: highlight;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@media (prefers-reduced-motion: reduce) {
|
|
172
|
+
.sti-Accordion-chevron-53919, .sti-Accordion-trigger-4ad24 {
|
|
173
|
+
transition: none;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
export type AccordionSize = "sm" | "md" | "lg";
|
|
3
|
+
export type AccordionVariant = "flush" | "separated";
|
|
4
|
+
export interface AccordionItem {
|
|
5
|
+
/** Öğenin kimliği (zorunlu, benzersiz). */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Başlık (zorunlu): düğmenin adıdır. */
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** Açılan içerik. */
|
|
10
|
+
content: ReactNode;
|
|
11
|
+
/** Başlığın altında kısa not. */
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
/** Başlığın önünde süs ikonu. */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface AccordionProps {
|
|
18
|
+
/** Akordeonun adı (zorunlu): grup bu adla bir bölge olarak okunur. */
|
|
19
|
+
label: string;
|
|
20
|
+
items: readonly AccordionItem[];
|
|
21
|
+
/** Birden çok öğe aynı anda açık kalabilir; varsayılan: biri açılınca diğeri kapanır. */
|
|
22
|
+
allowsMultiple?: boolean;
|
|
23
|
+
expandedKeys?: Iterable<string>;
|
|
24
|
+
defaultExpandedKeys?: Iterable<string>;
|
|
25
|
+
onExpandedChange?: (keys: Set<string>) => void;
|
|
26
|
+
/** Başlıkların belge düzeyi; görünüşü değişmez. */
|
|
27
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
28
|
+
/** Görünüş: `flush` yalnız ayraç çizgileri, `separated` her öğe ayrı kart. */
|
|
29
|
+
variant?: AccordionVariant;
|
|
30
|
+
size?: AccordionSize;
|
|
31
|
+
isDisabled?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
ref?: Ref<HTMLElement>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Akordeon (APG Accordion): üst üste başlıklar; her başlıktaki düğme kendi bölümünü açar. Enter ve
|
|
38
|
+
* Boşluk açıp kapatır; ↑ ↓ başlıklar arasında gezer, Home ve End ilk ve son başlığa gider.
|
|
39
|
+
*/
|
|
40
|
+
export declare function Accordion({ label, items, allowsMultiple, expandedKeys, defaultExpandedKeys, onExpandedChange, headingLevel, variant, size, isDisabled, className, id, ref }: AccordionProps): import("react").JSX.Element;
|