@lobehub/ui 6.4.1 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/A/index.mjs +6 -1
- package/es/A/index.mjs.map +1 -1
- package/es/A/stable.mjs +10 -0
- package/es/A/stable.mjs.map +1 -0
- package/es/Accordion/Accordion.mjs +3 -2
- package/es/Accordion/Accordion.mjs.map +1 -1
- package/es/Accordion/atoms.mjs +14 -9
- package/es/Accordion/atoms.mjs.map +1 -1
- package/es/Accordion/stable.mjs +19 -0
- package/es/Accordion/stable.mjs.map +1 -0
- package/es/Accordion/style.d.mts +1 -1
- package/es/ActionIcon/ActionIcon.mjs +28 -7
- package/es/ActionIcon/ActionIcon.mjs.map +1 -1
- package/es/ActionIcon/stable.mjs +19 -0
- package/es/ActionIcon/stable.mjs.map +1 -0
- package/es/ActionIcon/style.d.mts +15 -0
- package/es/ActionIcon/style.mjs +18 -0
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/ActionIconGroup/ActionIconGroup.mjs +12 -1
- package/es/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
- package/es/ActionIconGroup/stable.mjs +16 -0
- package/es/ActionIconGroup/stable.mjs.map +1 -0
- package/es/Alert/Alert.mjs +15 -14
- package/es/Alert/Alert.mjs.map +1 -1
- package/es/Alert/stable.mjs +23 -0
- package/es/Alert/stable.mjs.map +1 -0
- package/es/Anchor/Anchor.mjs +7 -7
- package/es/Anchor/Anchor.mjs.map +1 -1
- package/es/Anchor/stable.mjs +14 -0
- package/es/Anchor/stable.mjs.map +1 -0
- package/es/AutoComplete/AutoComplete.mjs +24 -14
- package/es/AutoComplete/AutoComplete.mjs.map +1 -1
- package/es/AutoComplete/stable.mjs +25 -0
- package/es/AutoComplete/stable.mjs.map +1 -0
- package/es/Avatar/Avatar.mjs +33 -14
- package/es/Avatar/Avatar.mjs.map +1 -1
- package/es/Avatar/AvatarGroup/index.mjs +9 -6
- package/es/Avatar/AvatarGroup/index.mjs.map +1 -1
- package/es/Avatar/AvatarGroup/style.mjs +4 -0
- package/es/Avatar/AvatarGroup/style.mjs.map +1 -1
- package/es/Avatar/stable.mjs +23 -0
- package/es/Avatar/stable.mjs.map +1 -0
- package/es/Avatar/style.mjs +30 -0
- package/es/Avatar/style.mjs.map +1 -1
- package/es/Badge/Badge.mjs +20 -9
- package/es/Badge/Badge.mjs.map +1 -1
- package/es/Badge/stable.mjs +19 -0
- package/es/Badge/stable.mjs.map +1 -0
- package/es/Badge/style.mjs +2 -1
- package/es/Badge/style.mjs.map +1 -1
- package/es/Block/Block.mjs +10 -1
- package/es/Block/Block.mjs.map +1 -1
- package/es/Block/stable.mjs +16 -0
- package/es/Block/stable.mjs.map +1 -0
- package/es/Breadcrumb/Breadcrumb.mjs +7 -7
- package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/es/Breadcrumb/stable.mjs +15 -0
- package/es/Breadcrumb/stable.mjs.map +1 -0
- package/es/Burger/Burger.mjs +8 -6
- package/es/Burger/Burger.mjs.map +1 -1
- package/es/Burger/stable.mjs +10 -0
- package/es/Burger/stable.mjs.map +1 -0
- package/es/Burger/style.mjs +1 -0
- package/es/Burger/style.mjs.map +1 -1
- package/es/Button/Button.mjs +18 -4
- package/es/Button/Button.mjs.map +1 -1
- package/es/Button/SplitButton.mjs +12 -1
- package/es/Button/SplitButton.mjs.map +1 -1
- package/es/Button/stable.mjs +29 -0
- package/es/Button/stable.mjs.map +1 -0
- package/es/Carousel/Carousel.mjs +12 -11
- package/es/Carousel/Carousel.mjs.map +1 -1
- package/es/Carousel/stable.mjs +18 -0
- package/es/Carousel/stable.mjs.map +1 -0
- package/es/Carousel/style.mjs +8 -0
- package/es/Carousel/style.mjs.map +1 -1
- package/es/Checkbox/Checkbox.mjs +26 -12
- package/es/Checkbox/Checkbox.mjs.map +1 -1
- package/es/Checkbox/CheckboxGroup.mjs +11 -7
- package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
- package/es/Checkbox/stable.mjs +20 -0
- package/es/Checkbox/stable.mjs.map +1 -0
- package/es/Checkbox/style.d.mts +26 -0
- package/es/Checkbox/style.mjs +33 -0
- package/es/Checkbox/style.mjs.map +1 -1
- package/es/CodeDiff/CodeDiff.mjs +2 -0
- package/es/CodeDiff/CodeDiff.mjs.map +1 -1
- package/es/CodeDiff/DiffPanel.mjs +20 -14
- package/es/CodeDiff/DiffPanel.mjs.map +1 -1
- package/es/CodeDiff/PatchDiff.mjs +2 -0
- package/es/CodeDiff/PatchDiff.mjs.map +1 -1
- package/es/CodeDiff/stable.mjs +26 -0
- package/es/CodeDiff/stable.mjs.map +1 -0
- package/es/CodeEditor/CodeEditor.mjs +7 -5
- package/es/CodeEditor/CodeEditor.mjs.map +1 -1
- package/es/CodeEditor/stable.mjs +11 -0
- package/es/CodeEditor/stable.mjs.map +1 -0
- package/es/CodeEditor/style.mjs +4 -0
- package/es/CodeEditor/style.mjs.map +1 -1
- package/es/Collapsible/Collapsible.mjs +4 -2
- package/es/Collapsible/Collapsible.mjs.map +1 -1
- package/es/Collapsible/stable.mjs +10 -0
- package/es/Collapsible/stable.mjs.map +1 -0
- package/es/ColorPicker/ColorPanel.mjs +7 -6
- package/es/ColorPicker/ColorPanel.mjs.map +1 -1
- package/es/ColorPicker/ColorPicker.mjs +7 -0
- package/es/ColorPicker/ColorPicker.mjs.map +1 -1
- package/es/ColorPicker/Swatch.mjs +3 -3
- package/es/ColorPicker/Swatch.mjs.map +1 -1
- package/es/ColorPicker/Trigger.mjs +27 -10
- package/es/ColorPicker/Trigger.mjs.map +1 -1
- package/es/ColorPicker/stable.mjs +21 -0
- package/es/ColorPicker/stable.mjs.map +1 -0
- package/es/ColorPicker/style.mjs +20 -0
- package/es/ColorPicker/style.mjs.map +1 -1
- package/es/ColorSwatches/ColorSwatches.mjs +18 -11
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ColorSwatches/CustomPicker.mjs +24 -16
- package/es/ColorSwatches/CustomPicker.mjs.map +1 -1
- package/es/ColorSwatches/stable.mjs +15 -0
- package/es/ColorSwatches/stable.mjs.map +1 -0
- package/es/ColorSwatches/style.mjs +20 -0
- package/es/ColorSwatches/style.mjs.map +1 -1
- package/es/ContextMenu/ContextMenuHost.mjs +8 -6
- package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
- package/es/ContextMenu/ContextMenuTrigger.mjs +5 -4
- package/es/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- package/es/ContextMenu/renderItems.mjs +43 -39
- package/es/ContextMenu/renderItems.mjs.map +1 -1
- package/es/ContextMenu/stable.mjs +29 -0
- package/es/ContextMenu/stable.mjs.map +1 -0
- package/es/CopyButton/CopyButton.mjs +4 -1
- package/es/CopyButton/CopyButton.mjs.map +1 -1
- package/es/CopyButton/stable.mjs +10 -0
- package/es/CopyButton/stable.mjs.map +1 -0
- package/es/DatePicker/RangePicker.mjs +3 -1
- package/es/DatePicker/RangePicker.mjs.map +1 -1
- package/es/DatePicker/SinglePicker.mjs +3 -1
- package/es/DatePicker/SinglePicker.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Popup/index.mjs +1 -1
- package/es/DatePicker/core/PickerInput/RangePicker.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/Icon.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/MultipleDates.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +1 -1
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/DatePanel/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/PanelBody.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/PanelHeader.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/WeekPanel/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/index.mjs +1 -1
- package/es/DatePicker/core/PickerPopup.mjs +1 -1
- package/es/DatePicker/stable.mjs +26 -0
- package/es/DatePicker/stable.mjs.map +1 -0
- package/es/DatePicker/usePickerShared.mjs +14 -5
- package/es/DatePicker/usePickerShared.mjs.map +1 -1
- package/es/Descriptions/Descriptions.mjs +11 -9
- package/es/Descriptions/Descriptions.mjs.map +1 -1
- package/es/Descriptions/stable.mjs +18 -0
- package/es/Descriptions/stable.mjs.map +1 -0
- package/es/Divider/Divider.mjs +8 -4
- package/es/Divider/Divider.mjs.map +1 -1
- package/es/Divider/stable.mjs +11 -0
- package/es/Divider/stable.mjs.map +1 -0
- package/es/DownloadButton/DownloadButton.mjs +4 -1
- package/es/DownloadButton/DownloadButton.mjs.map +1 -1
- package/es/DownloadButton/stable.mjs +10 -0
- package/es/DownloadButton/stable.mjs.map +1 -0
- package/es/DraggablePanel/atoms.mjs +7 -7
- package/es/DraggablePanel/atoms.mjs.map +1 -1
- package/es/DraggablePanel/stable.mjs +19 -0
- package/es/DraggablePanel/stable.mjs.map +1 -0
- package/es/DraggableSideNav/DraggableSideNav.mjs +22 -15
- package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
- package/es/DraggableSideNav/stable.mjs +21 -0
- package/es/DraggableSideNav/stable.mjs.map +1 -0
- package/es/DraggableSideNav/style.mjs +1 -0
- package/es/DraggableSideNav/style.mjs.map +1 -1
- package/es/Drawer/Drawer.mjs +16 -14
- package/es/Drawer/Drawer.mjs.map +1 -1
- package/es/Drawer/atoms.mjs +34 -21
- package/es/Drawer/atoms.mjs.map +1 -1
- package/es/Drawer/constants.mjs +1 -2
- package/es/Drawer/constants.mjs.map +1 -1
- package/es/Drawer/stable.mjs +26 -0
- package/es/Drawer/stable.mjs.map +1 -0
- package/es/Drawer/style.mjs +11 -0
- package/es/Drawer/style.mjs.map +1 -1
- package/es/DropdownMenu/DropdownMenu.mjs +1 -0
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/DropdownMenu/atoms.d.mts +10 -2
- package/es/DropdownMenu/atoms.mjs +36 -29
- package/es/DropdownMenu/atoms.mjs.map +1 -1
- package/es/DropdownMenu/stable.mjs +30 -0
- package/es/DropdownMenu/stable.mjs.map +1 -0
- package/es/DropdownMenu/style.d.mts +4 -0
- package/es/DropdownMenu/style.mjs +5 -0
- package/es/DropdownMenu/style.mjs.map +1 -1
- package/es/EditableText/EditableText.mjs +23 -23
- package/es/EditableText/EditableText.mjs.map +1 -1
- package/es/EditableText/stable.mjs +19 -0
- package/es/EditableText/stable.mjs.map +1 -0
- package/es/EditableText/style.mjs +32 -0
- package/es/EditableText/style.mjs.map +1 -0
- package/es/EditorSlashMenu/atoms.d.mts +5 -1
- package/es/EditorSlashMenu/atoms.mjs +19 -14
- package/es/EditorSlashMenu/atoms.mjs.map +1 -1
- package/es/EditorSlashMenu/stable.mjs +22 -0
- package/es/EditorSlashMenu/stable.mjs.map +1 -0
- package/es/EmojiPicker/AvatarUploader.mjs +6 -3
- package/es/EmojiPicker/AvatarUploader.mjs.map +1 -1
- package/es/EmojiPicker/EmojiPicker.mjs +9 -9
- package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
- package/es/EmojiPicker/stable.mjs +17 -0
- package/es/EmojiPicker/stable.mjs.map +1 -0
- package/es/EmojiPicker/style.mjs +10 -0
- package/es/EmojiPicker/style.mjs.map +1 -1
- package/es/Empty/Empty.mjs +19 -13
- package/es/Empty/Empty.mjs.map +1 -1
- package/es/Empty/stable.mjs +16 -0
- package/es/Empty/stable.mjs.map +1 -0
- package/es/Empty/style.mjs +30 -0
- package/es/Empty/style.mjs.map +1 -1
- package/es/FileTypeIcon/FileTypeIcon.mjs +10 -7
- package/es/FileTypeIcon/FileTypeIcon.mjs.map +1 -1
- package/es/FileTypeIcon/stable.mjs +10 -0
- package/es/FileTypeIcon/stable.mjs.map +1 -0
- package/es/Flex/Center.mjs +4 -1
- package/es/Flex/Center.mjs.map +1 -1
- package/es/Flex/stable.mjs +13 -0
- package/es/Flex/stable.mjs.map +1 -0
- package/es/FloatingPanel/FloatingPanel.mjs +33 -19
- package/es/FloatingPanel/FloatingPanel.mjs.map +1 -1
- package/es/FloatingPanel/stable.mjs +22 -0
- package/es/FloatingPanel/stable.mjs.map +1 -0
- package/es/FloatingPanel/style.mjs +12 -0
- package/es/FloatingPanel/style.mjs.map +1 -1
- package/es/FloatingSheet/FloatingSheet.mjs +11 -4
- package/es/FloatingSheet/FloatingSheet.mjs.map +1 -1
- package/es/FloatingSheet/FloatingSheetHeader.mjs +7 -6
- package/es/FloatingSheet/FloatingSheetHeader.mjs.map +1 -1
- package/es/FloatingSheet/stable.mjs +22 -0
- package/es/FloatingSheet/stable.mjs.map +1 -0
- package/es/FloatingSheet/style.mjs +1 -0
- package/es/FloatingSheet/style.mjs.map +1 -1
- package/es/FluentEmoji/FluentEmoji.mjs +4 -2
- package/es/FluentEmoji/FluentEmoji.mjs.map +1 -1
- package/es/FluentEmoji/stable.mjs +10 -0
- package/es/FluentEmoji/stable.mjs.map +1 -0
- package/es/Form/Form.mjs +5 -1
- package/es/Form/Form.mjs.map +1 -1
- package/es/Form/components/FormDivider.mjs +10 -8
- package/es/Form/components/FormDivider.mjs.map +1 -1
- package/es/Form/components/FormField.mjs +7 -5
- package/es/Form/components/FormField.mjs.map +1 -1
- package/es/Form/components/FormFlatGroup.mjs +4 -1
- package/es/Form/components/FormFlatGroup.mjs.map +1 -1
- package/es/Form/components/FormFooter.mjs +14 -9
- package/es/Form/components/FormFooter.mjs.map +1 -1
- package/es/Form/components/FormGroup.mjs +33 -14
- package/es/Form/components/FormGroup.mjs.map +1 -1
- package/es/Form/components/FormSubmitFooter.mjs +8 -10
- package/es/Form/components/FormSubmitFooter.mjs.map +1 -1
- package/es/Form/components/FormTitle.mjs +8 -4
- package/es/Form/components/FormTitle.mjs.map +1 -1
- package/es/Form/stable.mjs +33 -0
- package/es/Form/stable.mjs.map +1 -0
- package/es/Form/stableContext.mjs +9 -0
- package/es/Form/stableContext.mjs.map +1 -0
- package/es/Form/style.mjs +32 -10
- package/es/Form/style.mjs.map +1 -1
- package/es/FormKit/Field.mjs +12 -7
- package/es/FormKit/Field.mjs.map +1 -1
- package/es/FormKit/Form.mjs +18 -7
- package/es/FormKit/Form.mjs.map +1 -1
- package/es/FormKit/List.mjs +12 -10
- package/es/FormKit/List.mjs.map +1 -1
- package/es/FormKit/stable.mjs +25 -0
- package/es/FormKit/stable.mjs.map +1 -0
- package/es/Grid/Grid.mjs +3 -1
- package/es/Grid/Grid.mjs.map +1 -1
- package/es/Grid/stable.mjs +10 -0
- package/es/Grid/stable.mjs.map +1 -0
- package/es/GroupAvatar/GroupAvatar.mjs +8 -1
- package/es/GroupAvatar/GroupAvatar.mjs.map +1 -1
- package/es/GroupAvatar/stable.mjs +11 -0
- package/es/GroupAvatar/stable.mjs.map +1 -0
- package/es/GuideCard/GuideCard.mjs +13 -6
- package/es/GuideCard/GuideCard.mjs.map +1 -1
- package/es/GuideCard/stable.mjs +17 -0
- package/es/GuideCard/stable.mjs.map +1 -0
- package/es/Header/Header.mjs +9 -30
- package/es/Header/Header.mjs.map +1 -1
- package/es/Header/stable.mjs +14 -0
- package/es/Header/stable.mjs.map +1 -0
- package/es/Header/style.mjs +15 -0
- package/es/Header/style.mjs.map +1 -1
- package/es/Highlighter/FullFeatured.mjs +15 -6
- package/es/Highlighter/FullFeatured.mjs.map +1 -1
- package/es/Highlighter/Highlighter.mjs +16 -10
- package/es/Highlighter/Highlighter.mjs.map +1 -1
- package/es/Highlighter/LangSelect.mjs +6 -5
- package/es/Highlighter/LangSelect.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/StaticRenderer.mjs +2 -1
- package/es/Highlighter/SyntaxHighlighter/StaticRenderer.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs +4 -2
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/index.mjs +7 -1
- package/es/Highlighter/SyntaxHighlighter/index.mjs.map +1 -1
- package/es/Highlighter/stable.mjs +30 -0
- package/es/Highlighter/stable.mjs.map +1 -0
- package/es/Highlighter/style.mjs +9 -0
- package/es/Highlighter/style.mjs.map +1 -1
- package/es/Hotkey/Hotkey.mjs +10 -2
- package/es/Hotkey/Hotkey.mjs.map +1 -1
- package/es/Hotkey/stable.mjs +15 -0
- package/es/Hotkey/stable.mjs.map +1 -0
- package/es/HotkeyInput/HotkeyInput.mjs +30 -14
- package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
- package/es/HotkeyInput/stable.mjs +26 -0
- package/es/HotkeyInput/stable.mjs.map +1 -0
- package/es/HotkeyInput/style.mjs +9 -0
- package/es/HotkeyInput/style.mjs.map +1 -1
- package/es/HtmlPreview/HtmlPreview.mjs +20 -16
- package/es/HtmlPreview/HtmlPreview.mjs.map +1 -1
- package/es/HtmlPreview/Iframe.mjs +6 -2
- package/es/HtmlPreview/Iframe.mjs.map +1 -1
- package/es/HtmlPreview/stable.mjs +27 -0
- package/es/HtmlPreview/stable.mjs.map +1 -0
- package/es/HtmlPreview/style.mjs +8 -0
- package/es/HtmlPreview/style.mjs.map +1 -1
- package/es/Icon/Icon.mjs +5 -2
- package/es/Icon/Icon.mjs.map +1 -1
- package/es/Icon/stable.mjs +11 -0
- package/es/Icon/stable.mjs.map +1 -0
- package/es/Image/Image.mjs +9 -5
- package/es/Image/Image.mjs.map +1 -1
- package/es/Image/stable.mjs +15 -0
- package/es/Image/stable.mjs.map +1 -0
- package/es/Image/style.mjs +1 -0
- package/es/Image/style.mjs.map +1 -1
- package/es/ImageSelect/ImageSelect.mjs +13 -9
- package/es/ImageSelect/ImageSelect.mjs.map +1 -1
- package/es/ImageSelect/stable.mjs +14 -0
- package/es/ImageSelect/stable.mjs.map +1 -0
- package/es/ImageSelect/styles.mjs +2 -0
- package/es/ImageSelect/styles.mjs.map +1 -1
- package/es/Img/index.mjs +4 -1
- package/es/Img/index.mjs.map +1 -1
- package/es/Img/stable.mjs +10 -0
- package/es/Img/stable.mjs.map +1 -0
- package/es/Input/ClearButton.mjs +4 -3
- package/es/Input/ClearButton.mjs.map +1 -1
- package/es/Input/Input.mjs +15 -5
- package/es/Input/Input.mjs.map +1 -1
- package/es/Input/InputNumber.mjs +14 -5
- package/es/Input/InputNumber.mjs.map +1 -1
- package/es/Input/InputOTP.mjs +10 -2
- package/es/Input/InputOTP.mjs.map +1 -1
- package/es/Input/InputPassword.mjs +7 -4
- package/es/Input/InputPassword.mjs.map +1 -1
- package/es/Input/TextArea.mjs +8 -4
- package/es/Input/TextArea.mjs.map +1 -1
- package/es/Input/stable.mjs +58 -0
- package/es/Input/stable.mjs.map +1 -0
- package/es/Input/style.mjs +4 -0
- package/es/Input/style.mjs.map +1 -1
- package/es/Layout/Layout.mjs +13 -10
- package/es/Layout/Layout.mjs.map +1 -1
- package/es/Layout/components/LayoutFooter.mjs +3 -1
- package/es/Layout/components/LayoutFooter.mjs.map +1 -1
- package/es/Layout/components/LayoutHeader.mjs +4 -2
- package/es/Layout/components/LayoutHeader.mjs.map +1 -1
- package/es/Layout/components/LayoutMain.mjs +3 -1
- package/es/Layout/components/LayoutMain.mjs.map +1 -1
- package/es/Layout/components/LayoutSidebar.mjs +3 -1
- package/es/Layout/components/LayoutSidebar.mjs.map +1 -1
- package/es/Layout/components/LayoutSidebarInner.mjs +3 -1
- package/es/Layout/components/LayoutSidebarInner.mjs.map +1 -1
- package/es/Layout/components/LayoutToc.mjs +3 -1
- package/es/Layout/components/LayoutToc.mjs.map +1 -1
- package/es/Layout/stable.mjs +18 -0
- package/es/Layout/stable.mjs.map +1 -0
- package/es/Layout/style.mjs +8 -0
- package/es/Layout/style.mjs.map +1 -1
- package/es/Layout/type.d.mts +3 -1
- package/es/List/List.mjs +10 -3
- package/es/List/List.mjs.map +1 -1
- package/es/List/ListRow.mjs +17 -9
- package/es/List/ListRow.mjs.map +1 -1
- package/es/List/stable.mjs +24 -0
- package/es/List/stable.mjs.map +1 -0
- package/es/Markdown/Markdown.mjs +6 -3
- package/es/Markdown/Markdown.mjs.map +1 -1
- package/es/Markdown/Typography.mjs +9 -8
- package/es/Markdown/Typography.mjs.map +1 -1
- package/es/Markdown/components/SearchResultCards/SearchResultCard.mjs +6 -2
- package/es/Markdown/components/SearchResultCards/SearchResultCard.mjs.map +1 -1
- package/es/Markdown/components/SearchResultCards/index.mjs +6 -4
- package/es/Markdown/components/SearchResultCards/index.mjs.map +1 -1
- package/es/Markdown/components/SearchResultCards/style.mjs +11 -0
- package/es/Markdown/components/SearchResultCards/style.mjs.map +1 -0
- package/es/Markdown/stable.mjs +24 -0
- package/es/Markdown/stable.mjs.map +1 -0
- package/es/MaskShadow/MaskShadow.mjs +5 -1
- package/es/MaskShadow/MaskShadow.mjs.map +1 -1
- package/es/MaskShadow/stable.mjs +11 -0
- package/es/MaskShadow/stable.mjs.map +1 -0
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.mjs +8 -3
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.mjs.map +1 -1
- package/es/MaterialFileTypeIcon/stable.mjs +10 -0
- package/es/MaterialFileTypeIcon/stable.mjs.map +1 -0
- package/es/Mermaid/FullFeatured.mjs +14 -6
- package/es/Mermaid/FullFeatured.mjs.map +1 -1
- package/es/Mermaid/Mermaid.mjs +12 -4
- package/es/Mermaid/Mermaid.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/MermaidFallback.mjs +5 -7
- package/es/Mermaid/SyntaxMermaid/MermaidFallback.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/MermaidSvg.mjs +6 -6
- package/es/Mermaid/SyntaxMermaid/MermaidSvg.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/StaticMermaid.mjs +7 -7
- package/es/Mermaid/SyntaxMermaid/StaticMermaid.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/StreamMermaid.mjs +7 -7
- package/es/Mermaid/SyntaxMermaid/StreamMermaid.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/index.mjs +16 -4
- package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/style.mjs +21 -0
- package/es/Mermaid/SyntaxMermaid/style.mjs.map +1 -1
- package/es/Mermaid/stable.mjs +29 -0
- package/es/Mermaid/stable.mjs.map +1 -0
- package/es/Modal/Modal.mjs +15 -14
- package/es/Modal/Modal.mjs.map +1 -1
- package/es/Modal/atoms.d.mts +1 -0
- package/es/Modal/atoms.mjs +26 -20
- package/es/Modal/atoms.mjs.map +1 -1
- package/es/Modal/stable.mjs +25 -0
- package/es/Modal/stable.mjs.map +1 -0
- package/es/Modal/style.mjs +12 -0
- package/es/Modal/style.mjs.map +1 -1
- package/es/Pagination/Pagination.mjs +29 -18
- package/es/Pagination/Pagination.mjs.map +1 -1
- package/es/Pagination/stable.mjs +26 -0
- package/es/Pagination/stable.mjs.map +1 -0
- package/es/Pagination/style.mjs +5 -0
- package/es/Pagination/style.mjs.map +1 -1
- package/es/Popover/PopoverInGroup.mjs +4 -3
- package/es/Popover/PopoverInGroup.mjs.map +1 -1
- package/es/Popover/atoms.d.mts +1 -1
- package/es/Popover/atoms.mjs +12 -8
- package/es/Popover/atoms.mjs.map +1 -1
- package/es/Popover/stable.mjs +16 -0
- package/es/Popover/stable.mjs.map +1 -0
- package/es/ProTable/ProTable.mjs +1 -1
- package/es/ProTable/parts/TableAlert.mjs +5 -4
- package/es/ProTable/parts/TableAlert.mjs.map +1 -1
- package/es/ProTable/parts/Toolbar.mjs +4 -3
- package/es/ProTable/parts/Toolbar.mjs.map +1 -1
- package/es/ProTable/parts/renderValue.mjs +1 -1
- package/es/ProTable/stable.mjs +19 -0
- package/es/ProTable/stable.mjs.map +1 -0
- package/es/ProTable/style.mjs +2 -1
- package/es/ProTable/style.mjs.map +1 -1
- package/es/Progress/Progress.mjs +92 -58
- package/es/Progress/Progress.mjs.map +1 -1
- package/es/Progress/stable.mjs +24 -0
- package/es/Progress/stable.mjs.map +1 -0
- package/es/Progress/style.mjs +48 -4
- package/es/Progress/style.mjs.map +1 -1
- package/es/QRCode/QRCode.mjs +19 -16
- package/es/QRCode/QRCode.mjs.map +1 -1
- package/es/QRCode/stable.mjs +17 -0
- package/es/QRCode/stable.mjs.map +1 -0
- package/es/QRCode/style.mjs +12 -2
- package/es/QRCode/style.mjs.map +1 -1
- package/es/Radio/Radio.mjs +21 -16
- package/es/Radio/Radio.mjs.map +1 -1
- package/es/Radio/RadioGroup.mjs +11 -7
- package/es/Radio/RadioGroup.mjs.map +1 -1
- package/es/Radio/stable.mjs +19 -0
- package/es/Radio/stable.mjs.map +1 -0
- package/es/Radio/style.d.mts +18 -0
- package/es/Radio/style.mjs +22 -0
- package/es/Radio/style.mjs.map +1 -1
- package/es/Rate/Rate.mjs +15 -17
- package/es/Rate/Rate.mjs.map +1 -1
- package/es/Rate/stable.mjs +15 -0
- package/es/Rate/stable.mjs.map +1 -0
- package/es/Rate/style.mjs +11 -0
- package/es/Rate/style.mjs.map +1 -1
- package/es/Result/Result.mjs +18 -22
- package/es/Result/Result.mjs.map +1 -1
- package/es/Result/stable.mjs +16 -0
- package/es/Result/stable.mjs.map +1 -0
- package/es/Result/style.mjs +21 -7
- package/es/Result/style.mjs.map +1 -1
- package/es/ScrollArea/atoms.d.mts +4 -1
- package/es/ScrollArea/atoms.mjs +14 -7
- package/es/ScrollArea/atoms.mjs.map +1 -1
- package/es/ScrollArea/stable.mjs +16 -0
- package/es/ScrollArea/stable.mjs.map +1 -0
- package/es/ScrollShadow/ScrollShadow.mjs +9 -7
- package/es/ScrollShadow/ScrollShadow.mjs.map +1 -1
- package/es/ScrollShadow/stable.mjs +11 -0
- package/es/ScrollShadow/stable.mjs.map +1 -0
- package/es/ScrollShadow/style.mjs +7 -6
- package/es/ScrollShadow/style.mjs.map +1 -1
- package/es/SearchBar/SearchBar.mjs +9 -7
- package/es/SearchBar/SearchBar.mjs.map +1 -1
- package/es/SearchBar/stable.mjs +15 -0
- package/es/SearchBar/stable.mjs.map +1 -0
- package/es/SearchBar/style.mjs +1 -0
- package/es/SearchBar/style.mjs.map +1 -1
- package/es/Segmented/Segmented.mjs +3 -1
- package/es/Segmented/Segmented.mjs.map +1 -1
- package/es/Segmented/atoms.mjs +13 -6
- package/es/Segmented/atoms.mjs.map +1 -1
- package/es/Segmented/stable.mjs +22 -0
- package/es/Segmented/stable.mjs.map +1 -0
- package/es/Select/Select.mjs +21 -10
- package/es/Select/Select.mjs.map +1 -1
- package/es/Select/atoms.mjs +17 -16
- package/es/Select/atoms.mjs.map +1 -1
- package/es/Select/parts.mjs +8 -6
- package/es/Select/parts.mjs.map +1 -1
- package/es/Select/renderOptions.mjs +7 -6
- package/es/Select/renderOptions.mjs.map +1 -1
- package/es/Select/stable.mjs +35 -0
- package/es/Select/stable.mjs.map +1 -0
- package/es/Select/style.mjs +5 -0
- package/es/Select/style.mjs.map +1 -1
- package/es/SideNav/SideNav.mjs +6 -1
- package/es/SideNav/SideNav.mjs.map +1 -1
- package/es/SideNav/stable.mjs +14 -0
- package/es/SideNav/stable.mjs.map +1 -0
- package/es/Skeleton/Skeleton.mjs +13 -4
- package/es/Skeleton/Skeleton.mjs.map +1 -1
- package/es/Skeleton/SkeletonAvatar.mjs +8 -6
- package/es/Skeleton/SkeletonAvatar.mjs.map +1 -1
- package/es/Skeleton/SkeletonText.mjs +17 -8
- package/es/Skeleton/SkeletonText.mjs.map +1 -1
- package/es/Skeleton/stable.mjs +20 -0
- package/es/Skeleton/stable.mjs.map +1 -0
- package/es/Skeleton/style.mjs +21 -0
- package/es/Skeleton/style.mjs.map +1 -1
- package/es/Slider/Slider.mjs +6 -4
- package/es/Slider/Slider.mjs.map +1 -1
- package/es/Slider/SliderWithInput.mjs +10 -7
- package/es/Slider/SliderWithInput.mjs.map +1 -1
- package/es/Slider/stable.mjs +20 -0
- package/es/Slider/stable.mjs.map +1 -0
- package/es/Slider/style.d.mts +3 -0
- package/es/Slider/style.mjs +4 -0
- package/es/Slider/style.mjs.map +1 -1
- package/es/Snippet/Snippet.mjs +11 -3
- package/es/Snippet/Snippet.mjs.map +1 -1
- package/es/Snippet/stable.mjs +15 -0
- package/es/Snippet/stable.mjs.map +1 -0
- package/es/SortableList/SortableList.mjs +5 -3
- package/es/SortableList/SortableList.mjs.map +1 -1
- package/es/SortableList/components/DragHandle.mjs +4 -1
- package/es/SortableList/components/DragHandle.mjs.map +1 -1
- package/es/SortableList/components/SortableItem.mjs +8 -1
- package/es/SortableList/components/SortableItem.mjs.map +1 -1
- package/es/SortableList/stable.mjs +10 -0
- package/es/SortableList/stable.mjs.map +1 -0
- package/es/Spin/Spin.mjs +15 -6
- package/es/Spin/Spin.mjs.map +1 -1
- package/es/Spin/stable.mjs +15 -0
- package/es/Spin/stable.mjs.map +1 -0
- package/es/Statistic/Statistic.mjs +17 -11
- package/es/Statistic/Statistic.mjs.map +1 -1
- package/es/Statistic/stable.mjs +18 -0
- package/es/Statistic/stable.mjs.map +1 -0
- package/es/Statistic/style.mjs +5 -0
- package/es/Statistic/style.mjs.map +1 -1
- package/es/Steps/Steps.mjs +16 -12
- package/es/Steps/Steps.mjs.map +1 -1
- package/es/Steps/stable.mjs +18 -0
- package/es/Steps/stable.mjs.map +1 -0
- package/es/Steps/style.mjs +5 -0
- package/es/Steps/style.mjs.map +1 -1
- package/es/Switch/Switch.mjs +3 -1
- package/es/Switch/Switch.mjs.map +1 -1
- package/es/Switch/atoms.mjs +7 -4
- package/es/Switch/atoms.mjs.map +1 -1
- package/es/Switch/stable.mjs +11 -0
- package/es/Switch/stable.mjs.map +1 -0
- package/es/Table/Table.mjs +1 -1
- package/es/Table/atoms/cells.mjs +1 -1
- package/es/Table/atoms/layout.mjs +6 -1
- package/es/Table/atoms/layout.mjs.map +1 -1
- package/es/Table/render/Body.mjs +1 -1
- package/es/Table/render/CellShell.mjs +1 -1
- package/es/Table/render/ExpandIcon.mjs +1 -1
- package/es/Table/render/FilterDropdown.mjs +1 -1
- package/es/Table/render/FilterPanel.mjs +1 -1
- package/es/Table/render/Header.mjs +1 -1
- package/es/Table/render/PaginationBar.mjs +1 -1
- package/es/Table/render/SelectionCells.mjs +1 -1
- package/es/Table/render/StickyScrollBar.mjs +1 -1
- package/es/Table/render/TableView.mjs +1 -1
- package/es/Table/semantic.mjs +19 -6
- package/es/Table/semantic.mjs.map +1 -1
- package/es/Table/stable.mjs +23 -0
- package/es/Table/stable.mjs.map +1 -0
- package/es/Tabs/Tabs.mjs +1 -1
- package/es/Tabs/atoms.mjs +13 -6
- package/es/Tabs/atoms.mjs.map +1 -1
- package/es/Tabs/stable.mjs +16 -0
- package/es/Tabs/stable.mjs.map +1 -0
- package/es/Tag/Tag.mjs +14 -5
- package/es/Tag/Tag.mjs.map +1 -1
- package/es/Tag/stable.mjs +16 -0
- package/es/Tag/stable.mjs.map +1 -0
- package/es/Tag/style.mjs +8 -0
- package/es/Tag/style.mjs.map +1 -1
- package/es/Text/Text.mjs +5 -2
- package/es/Text/Text.mjs.map +1 -1
- package/es/Text/stable.mjs +11 -0
- package/es/Text/stable.mjs.map +1 -0
- package/es/Text/style.d.mts +1 -1
- package/es/Toast/Toast.mjs +22 -19
- package/es/Toast/Toast.mjs.map +1 -1
- package/es/Toast/imperative.mjs +4 -1
- package/es/Toast/imperative.mjs.map +1 -1
- package/es/Toast/stable.mjs +23 -0
- package/es/Toast/stable.mjs.map +1 -0
- package/es/Toast/style.mjs +4 -0
- package/es/Toast/style.mjs.map +1 -1
- package/es/ToggleGroup/ToggleGroup.mjs +3 -1
- package/es/ToggleGroup/ToggleGroup.mjs.map +1 -1
- package/es/ToggleGroup/atoms.mjs +6 -5
- package/es/ToggleGroup/atoms.mjs.map +1 -1
- package/es/ToggleGroup/stable.mjs +15 -0
- package/es/ToggleGroup/stable.mjs.map +1 -0
- package/es/Tooltip/TooltipGroup.mjs +7 -5
- package/es/Tooltip/TooltipGroup.mjs.map +1 -1
- package/es/Tooltip/TooltipInGroup.mjs +4 -0
- package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
- package/es/Tooltip/TooltipStandalone.mjs +9 -5
- package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
- package/es/Tooltip/stable.mjs +16 -0
- package/es/Tooltip/stable.mjs.map +1 -0
- package/es/Tree/Tree.mjs +3 -2
- package/es/Tree/Tree.mjs.map +1 -1
- package/es/Tree/TreeNode.mjs +9 -8
- package/es/Tree/TreeNode.mjs.map +1 -1
- package/es/Tree/stable.mjs +18 -0
- package/es/Tree/stable.mjs.map +1 -0
- package/es/Upload/Upload.mjs +15 -8
- package/es/Upload/Upload.mjs.map +1 -1
- package/es/Upload/UploadDragger.mjs +4 -1
- package/es/Upload/UploadDragger.mjs.map +1 -1
- package/es/Upload/stable.mjs +20 -0
- package/es/Upload/stable.mjs.map +1 -0
- package/es/Upload/style.mjs +4 -0
- package/es/Upload/style.mjs.map +1 -1
- package/es/Video/Video.mjs +1 -1
- package/es/Video/parts/Caption.mjs +3 -1
- package/es/Video/parts/Caption.mjs.map +1 -1
- package/es/Video/parts/CenterPlay.mjs +2 -1
- package/es/Video/parts/CenterPlay.mjs.map +1 -1
- package/es/Video/parts/Controls.mjs +5 -3
- package/es/Video/parts/Controls.mjs.map +1 -1
- package/es/Video/parts/Frame.mjs +5 -3
- package/es/Video/parts/Frame.mjs.map +1 -1
- package/es/Video/parts/LoadError.mjs +2 -1
- package/es/Video/parts/LoadError.mjs.map +1 -1
- package/es/Video/parts/Root.mjs +3 -1
- package/es/Video/parts/Root.mjs.map +1 -1
- package/es/Video/parts/SectionList.mjs +4 -2
- package/es/Video/parts/SectionList.mjs.map +1 -1
- package/es/Video/parts/Timeline.mjs +8 -15
- package/es/Video/parts/Timeline.mjs.map +1 -1
- package/es/Video/stable.mjs +27 -0
- package/es/Video/stable.mjs.map +1 -0
- package/es/Video/style.mjs +14 -0
- package/es/Video/style.mjs.map +1 -1
- package/es/awesome/AgentSkillCard/AgentSkillCard.mjs +13 -9
- package/es/awesome/AgentSkillCard/AgentSkillCard.mjs.map +1 -1
- package/es/awesome/AgentSkillCard/stable.mjs +19 -0
- package/es/awesome/AgentSkillCard/stable.mjs.map +1 -0
- package/es/awesome/AgentSkillCard/style.mjs +1 -5
- package/es/awesome/AgentSkillCard/style.mjs.map +1 -1
- package/es/awesome/AuroraBackground/AuroraBackground.mjs +7 -9
- package/es/awesome/AuroraBackground/AuroraBackground.mjs.map +1 -1
- package/es/awesome/AuroraBackground/stable.mjs +14 -0
- package/es/awesome/AuroraBackground/stable.mjs.map +1 -0
- package/es/awesome/AuroraBackground/style.mjs +4 -0
- package/es/awesome/AuroraBackground/style.mjs.map +1 -1
- package/es/awesome/BentoGrid/BentoCard.mjs +12 -11
- package/es/awesome/BentoGrid/BentoCard.mjs.map +1 -1
- package/es/awesome/BentoGrid/BentoGrid.mjs +6 -4
- package/es/awesome/BentoGrid/BentoGrid.mjs.map +1 -1
- package/es/awesome/BentoGrid/stable.mjs +20 -0
- package/es/awesome/BentoGrid/stable.mjs.map +1 -0
- package/es/awesome/BentoGrid/style.mjs +6 -2
- package/es/awesome/BentoGrid/style.mjs.map +1 -1
- package/es/awesome/BottomGradientButton/BottomGradientButton.mjs +4 -6
- package/es/awesome/BottomGradientButton/BottomGradientButton.mjs.map +1 -1
- package/es/awesome/BottomGradientButton/stable.mjs +10 -0
- package/es/awesome/BottomGradientButton/stable.mjs.map +1 -0
- package/es/awesome/BottomGradientButton/style.mjs +2 -0
- package/es/awesome/BottomGradientButton/style.mjs.map +1 -1
- package/es/awesome/CodeShowcase/CodeShowcase.mjs +9 -8
- package/es/awesome/CodeShowcase/CodeShowcase.mjs.map +1 -1
- package/es/awesome/CodeShowcase/stable.mjs +15 -0
- package/es/awesome/CodeShowcase/stable.mjs.map +1 -0
- package/es/awesome/CodeShowcase/style.mjs +2 -12
- package/es/awesome/CodeShowcase/style.mjs.map +1 -1
- package/es/awesome/FeatureGrid/FeatureGrid.mjs +10 -9
- package/es/awesome/FeatureGrid/FeatureGrid.mjs.map +1 -1
- package/es/awesome/FeatureGrid/stable.mjs +15 -0
- package/es/awesome/FeatureGrid/stable.mjs.map +1 -0
- package/es/awesome/FeatureGrid/style.mjs +2 -1
- package/es/awesome/FeatureGrid/style.mjs.map +1 -1
- package/es/awesome/Features/FeatureItem.mjs +12 -12
- package/es/awesome/Features/FeatureItem.mjs.map +1 -1
- package/es/awesome/Features/Features.mjs +5 -3
- package/es/awesome/Features/Features.mjs.map +1 -1
- package/es/awesome/Features/stable.mjs +18 -0
- package/es/awesome/Features/stable.mjs.map +1 -0
- package/es/awesome/Features/style.mjs +1 -14
- package/es/awesome/Features/style.mjs.map +1 -1
- package/es/awesome/FluidGradient/FluidGradient.mjs +4 -3
- package/es/awesome/FluidGradient/FluidGradient.mjs.map +1 -1
- package/es/awesome/FluidGradient/stable.mjs +11 -0
- package/es/awesome/FluidGradient/stable.mjs.map +1 -0
- package/es/awesome/Giscus/Giscus.mjs +3 -1
- package/es/awesome/Giscus/Giscus.mjs.map +1 -1
- package/es/awesome/Giscus/stable.mjs +10 -0
- package/es/awesome/Giscus/stable.mjs.map +1 -0
- package/es/awesome/GradientButton/GradientButton.mjs +5 -3
- package/es/awesome/GradientButton/GradientButton.mjs.map +1 -1
- package/es/awesome/GradientButton/stable.mjs +10 -0
- package/es/awesome/GradientButton/stable.mjs.map +1 -0
- package/es/awesome/Grainient/Grainient.mjs +4 -3
- package/es/awesome/Grainient/Grainient.mjs.map +1 -1
- package/es/awesome/Grainient/stable.mjs +10 -0
- package/es/awesome/Grainient/stable.mjs.map +1 -0
- package/es/awesome/GridBackground/GridBackground.mjs +10 -10
- package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
- package/es/awesome/GridBackground/GridShowcase.mjs +9 -10
- package/es/awesome/GridBackground/GridShowcase.mjs.map +1 -1
- package/es/awesome/GridBackground/components/Grid.mjs +3 -1
- package/es/awesome/GridBackground/components/Grid.mjs.map +1 -1
- package/es/awesome/GridBackground/stable.mjs +24 -0
- package/es/awesome/GridBackground/stable.mjs.map +1 -0
- package/es/awesome/GridBackground/style.mjs +27 -1
- package/es/awesome/GridBackground/style.mjs.map +1 -1
- package/es/awesome/Hero/Hero.mjs +11 -13
- package/es/awesome/Hero/Hero.mjs.map +1 -1
- package/es/awesome/Hero/stable.mjs +16 -0
- package/es/awesome/Hero/stable.mjs.map +1 -0
- package/es/awesome/Hero/style.mjs +5 -0
- package/es/awesome/Hero/style.mjs.map +1 -1
- package/es/awesome/Hero/type.d.mts +1 -0
- package/es/awesome/InstallBanner/InstallBanner.mjs +7 -7
- package/es/awesome/InstallBanner/InstallBanner.mjs.map +1 -1
- package/es/awesome/InstallBanner/stable.mjs +15 -0
- package/es/awesome/InstallBanner/stable.mjs.map +1 -0
- package/es/awesome/LandingHero/LandingHero.mjs +13 -12
- package/es/awesome/LandingHero/LandingHero.mjs.map +1 -1
- package/es/awesome/LandingHero/stable.mjs +21 -0
- package/es/awesome/LandingHero/stable.mjs.map +1 -0
- package/es/awesome/LandingSection/LandingSection.mjs +10 -9
- package/es/awesome/LandingSection/LandingSection.mjs.map +1 -1
- package/es/awesome/LandingSection/stable.mjs +18 -0
- package/es/awesome/LandingSection/stable.mjs.map +1 -0
- package/es/awesome/LogoMarquee/LogoMarquee.mjs +11 -11
- package/es/awesome/LogoMarquee/LogoMarquee.mjs.map +1 -1
- package/es/awesome/LogoMarquee/stable.mjs +15 -0
- package/es/awesome/LogoMarquee/stable.mjs.map +1 -0
- package/es/awesome/LogoMarquee/style.mjs +8 -5
- package/es/awesome/LogoMarquee/style.mjs.map +1 -1
- package/es/awesome/Spotlight/Spotlight.mjs +5 -1
- package/es/awesome/Spotlight/Spotlight.mjs.map +1 -1
- package/es/awesome/Spotlight/stable.mjs +11 -0
- package/es/awesome/Spotlight/stable.mjs.map +1 -0
- package/es/awesome/SpotlightCard/SpotlightCard.mjs +4 -2
- package/es/awesome/SpotlightCard/SpotlightCard.mjs.map +1 -1
- package/es/awesome/SpotlightCard/SpotlightCardItem.mjs +2 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.mjs.map +1 -1
- package/es/awesome/SpotlightCard/stable.mjs +10 -0
- package/es/awesome/SpotlightCard/stable.mjs.map +1 -0
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs +8 -7
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs.map +1 -1
- package/es/awesome/TypewriterEffect/stable.mjs +14 -0
- package/es/awesome/TypewriterEffect/stable.mjs.map +1 -0
- package/es/awesome/TypewriterEffect/style.mjs +4 -0
- package/es/awesome/TypewriterEffect/style.mjs.map +1 -1
- package/es/awesome/landingActions.mjs +1 -1
- package/es/brand/BrandLoading/index.mjs +4 -2
- package/es/brand/BrandLoading/index.mjs.map +1 -1
- package/es/brand/BrandLoading/stable.mjs +10 -0
- package/es/brand/BrandLoading/stable.mjs.map +1 -0
- package/es/brand/LobeChat/index.mjs +23 -11
- package/es/brand/LobeChat/index.mjs.map +1 -1
- package/es/brand/LobeChat/stable.mjs +16 -0
- package/es/brand/LobeChat/stable.mjs.map +1 -0
- package/es/brand/LobeChatText/index.mjs +6 -6
- package/es/brand/LobeChatText/index.mjs.map +1 -1
- package/es/brand/LobeChatText/stable.mjs +10 -0
- package/es/brand/LobeChatText/stable.mjs.map +1 -0
- package/es/brand/LobeHub/index.mjs +23 -11
- package/es/brand/LobeHub/index.mjs.map +1 -1
- package/es/brand/LobeHub/stable.mjs +16 -0
- package/es/brand/LobeHub/stable.mjs.map +1 -0
- package/es/brand/LobeHub/style.mjs +11 -5
- package/es/brand/LobeHub/style.mjs.map +1 -1
- package/es/brand/LobeHubText/index.mjs +6 -6
- package/es/brand/LobeHubText/index.mjs.map +1 -1
- package/es/brand/LobeHubText/stable.mjs +10 -0
- package/es/brand/LobeHubText/stable.mjs.map +1 -0
- package/es/brand/Logo3d/index.mjs +4 -1
- package/es/brand/Logo3d/index.mjs.map +1 -1
- package/es/brand/Logo3d/stable.mjs +10 -0
- package/es/brand/Logo3d/stable.mjs.map +1 -0
- package/es/brand/components/Divider.mjs +4 -6
- package/es/brand/components/Divider.mjs.map +1 -1
- package/es/brand/components/style.mjs +10 -0
- package/es/brand/components/style.mjs.map +1 -0
- package/es/chat/BackBottom/BackBottom.mjs +5 -1
- package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
- package/es/chat/BackBottom/stable.mjs +11 -0
- package/es/chat/BackBottom/stable.mjs.map +1 -0
- package/es/chat/ChatHeader/ChatHeader.mjs +7 -4
- package/es/chat/ChatHeader/ChatHeader.mjs.map +1 -1
- package/es/chat/ChatHeader/ChatHeaderTitle.mjs +9 -7
- package/es/chat/ChatHeader/ChatHeaderTitle.mjs.map +1 -1
- package/es/chat/ChatHeader/stable.mjs +19 -0
- package/es/chat/ChatHeader/stable.mjs.map +1 -0
- package/es/chat/ChatInputArea/ChatInputArea.mjs +11 -18
- package/es/chat/ChatInputArea/ChatInputArea.mjs.map +1 -1
- package/es/chat/ChatInputArea/components/ChatInputActionBar.mjs +7 -4
- package/es/chat/ChatInputArea/components/ChatInputActionBar.mjs.map +1 -1
- package/es/chat/ChatInputArea/components/ChatSendButton.mjs +11 -7
- package/es/chat/ChatInputArea/components/ChatSendButton.mjs.map +1 -1
- package/es/chat/ChatInputArea/stable.mjs +29 -0
- package/es/chat/ChatInputArea/stable.mjs.map +1 -0
- package/es/chat/ChatInputArea/style.mjs +8 -1
- package/es/chat/ChatInputArea/style.mjs.map +1 -1
- package/es/chat/ChatInputArea/type.d.mts +2 -0
- package/es/chat/ChatItem/ChatItem.mjs +18 -9
- package/es/chat/ChatItem/ChatItem.mjs.map +1 -1
- package/es/chat/ChatItem/components/Actions.mjs +3 -1
- package/es/chat/ChatItem/components/Actions.mjs.map +1 -1
- package/es/chat/ChatItem/components/Avatar.mjs +6 -5
- package/es/chat/ChatItem/components/Avatar.mjs.map +1 -1
- package/es/chat/ChatItem/components/BorderSpacing.mjs +4 -4
- package/es/chat/ChatItem/components/BorderSpacing.mjs.map +1 -1
- package/es/chat/ChatItem/components/ErrorContent.mjs +3 -2
- package/es/chat/ChatItem/components/ErrorContent.mjs.map +1 -1
- package/es/chat/ChatItem/components/Loading.mjs +3 -2
- package/es/chat/ChatItem/components/Loading.mjs.map +1 -1
- package/es/chat/ChatItem/components/MessageContent.mjs +12 -2
- package/es/chat/ChatItem/components/MessageContent.mjs.map +1 -1
- package/es/chat/ChatItem/components/Title.mjs +7 -3
- package/es/chat/ChatItem/components/Title.mjs.map +1 -1
- package/es/chat/ChatItem/stable.mjs +29 -0
- package/es/chat/ChatItem/stable.mjs.map +1 -0
- package/es/chat/ChatItem/style.mjs +12 -0
- package/es/chat/ChatItem/style.mjs.map +1 -1
- package/es/chat/ChatList/ChatList.mjs +6 -2
- package/es/chat/ChatList/ChatList.mjs.map +1 -1
- package/es/chat/ChatList/components/ChatActionsBar.mjs +4 -1
- package/es/chat/ChatList/components/ChatActionsBar.mjs.map +1 -1
- package/es/chat/ChatList/components/HistoryDivider.mjs +4 -1
- package/es/chat/ChatList/components/HistoryDivider.mjs.map +1 -1
- package/es/chat/ChatList/stable.mjs +15 -0
- package/es/chat/ChatList/stable.mjs.map +1 -0
- package/es/chat/ChatList/style.mjs +11 -4
- package/es/chat/ChatList/style.mjs.map +1 -1
- package/es/chat/EditableMessage/EditableMessage.mjs +6 -3
- package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
- package/es/chat/EditableMessage/stable.mjs +11 -0
- package/es/chat/EditableMessage/stable.mjs.map +1 -0
- package/es/chat/EditableMessageList/EditableMessageList.mjs +10 -1
- package/es/chat/EditableMessageList/EditableMessageList.mjs.map +1 -1
- package/es/chat/EditableMessageList/stable.mjs +16 -0
- package/es/chat/EditableMessageList/stable.mjs.map +1 -0
- package/es/chat/EditableMessageList/type.d.mts +3 -0
- package/es/chat/LoadingDots/LoadingDots.mjs +27 -58
- package/es/chat/LoadingDots/LoadingDots.mjs.map +1 -1
- package/es/chat/LoadingDots/stable.mjs +11 -0
- package/es/chat/LoadingDots/stable.mjs.map +1 -0
- package/es/chat/LoadingDots/style.mjs +31 -1
- package/es/chat/LoadingDots/style.mjs.map +1 -1
- package/es/chat/MessageInput/MessageInput.mjs +12 -14
- package/es/chat/MessageInput/MessageInput.mjs.map +1 -1
- package/es/chat/MessageInput/stable.mjs +15 -0
- package/es/chat/MessageInput/stable.mjs.map +1 -0
- package/es/chat/MessageInput/style.mjs +6 -9
- package/es/chat/MessageInput/style.mjs.map +1 -1
- package/es/chat/MessageModal/MessageModal.mjs +30 -24
- package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
- package/es/chat/MessageModal/stable.mjs +15 -0
- package/es/chat/MessageModal/stable.mjs.map +1 -0
- package/es/chat/MessageModal/type.d.mts +1 -1
- package/es/chat/TokenTag/TokenTag.mjs +10 -1
- package/es/chat/TokenTag/TokenTag.mjs.map +1 -1
- package/es/chat/TokenTag/stable.mjs +11 -0
- package/es/chat/TokenTag/stable.mjs.map +1 -0
- package/es/color/ColorScales/ScaleRow.mjs +23 -31
- package/es/color/ColorScales/ScaleRow.mjs.map +1 -1
- package/es/color/ColorScales/index.d.mts +3 -0
- package/es/color/ColorScales/index.mjs +17 -9
- package/es/color/ColorScales/index.mjs.map +1 -1
- package/es/color/ColorScales/stable.mjs +19 -0
- package/es/color/ColorScales/stable.mjs.map +1 -0
- package/es/color/ColorScales/style.mjs +31 -5
- package/es/color/ColorScales/style.mjs.map +1 -1
- package/es/color/CssVar/ScaleRow.mjs +17 -14
- package/es/color/CssVar/ScaleRow.mjs.map +1 -1
- package/es/color/CssVar/VarRow.mjs +17 -12
- package/es/color/CssVar/VarRow.mjs.map +1 -1
- package/es/color/CssVar/index.d.mts +3 -0
- package/es/color/CssVar/index.mjs +26 -22
- package/es/color/CssVar/index.mjs.map +1 -1
- package/es/color/CssVar/stable.mjs +19 -0
- package/es/color/CssVar/stable.mjs.map +1 -0
- package/es/color/CssVar/style.mjs +16 -0
- package/es/color/CssVar/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/Aside.mjs +8 -7
- package/es/dashboard/AuthLayout/Aside.mjs.map +1 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +29 -25
- package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
- package/es/dashboard/AuthLayout/stable.mjs +37 -0
- package/es/dashboard/AuthLayout/stable.mjs.map +1 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +8 -7
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -1
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +7 -6
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -1
- package/es/dashboard/AuthTools/stable.mjs +18 -0
- package/es/dashboard/AuthTools/stable.mjs.map +1 -0
- package/es/dashboard/Breadcrumb/Breadcrumb.d.mts +1 -1
- package/es/dashboard/Breadcrumb/Breadcrumb.mjs +12 -8
- package/es/dashboard/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/es/dashboard/Breadcrumb/stable.mjs +17 -0
- package/es/dashboard/Breadcrumb/stable.mjs.map +1 -0
- package/es/dashboard/Breadcrumb/type.d.mts +1 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +4 -3
- package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -1
- package/es/dashboard/ChartGrid/stable.mjs +10 -0
- package/es/dashboard/ChartGrid/stable.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/ConsoleNav.d.mts +1 -1
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs +67 -20
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +3 -1
- package/es/dashboard/ConsoleNav/Skeleton.mjs +14 -8
- package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/stable.mjs +41 -0
- package/es/dashboard/ConsoleNav/stable.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/type.d.mts +1 -0
- package/es/dashboard/ConsoleShell/ConsoleBrand.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs +7 -5
- package/es/dashboard/ConsoleShell/ConsoleBrand.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +25 -14
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/stable.mjs +29 -0
- package/es/dashboard/ConsoleShell/stable.mjs.map +1 -0
- package/es/dashboard/ConsoleShell/type.d.mts +1 -0
- package/es/dashboard/FilterSidebar/FilterSidebar.d.mts +3 -3
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +25 -19
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
- package/es/dashboard/FilterSidebar/stable.mjs +28 -0
- package/es/dashboard/FilterSidebar/stable.mjs.map +1 -0
- package/es/dashboard/FilterSidebar/type.d.mts +3 -0
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.mjs +15 -7
- package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -1
- package/es/dashboard/FilterStrip/stable.mjs +17 -0
- package/es/dashboard/FilterStrip/stable.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +1 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +1 -1
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs +8 -2
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -1
- package/es/dashboard/LabelWithKey/stable.mjs +10 -0
- package/es/dashboard/LabelWithKey/stable.mjs.map +1 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs +24 -14
- package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -1
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +1 -1
- package/es/dashboard/MetricStrip/MetricStrip.mjs +18 -6
- package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -1
- package/es/dashboard/MetricStrip/stable.mjs +30 -0
- package/es/dashboard/MetricStrip/stable.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +1 -0
- package/es/dashboard/PageHeader/PageHeader.d.mts +1 -1
- package/es/dashboard/PageHeader/PageHeader.mjs +9 -17
- package/es/dashboard/PageHeader/PageHeader.mjs.map +1 -1
- package/es/dashboard/PageHeader/stable.mjs +16 -0
- package/es/dashboard/PageHeader/stable.mjs.map +1 -0
- package/es/dashboard/PageHeader/type.d.mts +1 -0
- package/es/dashboard/PageSkeleton/PageSkeleton.d.mts +7 -5
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +46 -46
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/stable.mjs +43 -0
- package/es/dashboard/PageSkeleton/stable.mjs.map +1 -0
- package/es/dashboard/PageSkeleton/style.mjs +4 -3
- package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/type.d.mts +4 -0
- package/es/dashboard/PageTabs/PageTabs.d.mts +1 -1
- package/es/dashboard/PageTabs/PageTabs.mjs +10 -16
- package/es/dashboard/PageTabs/PageTabs.mjs.map +1 -1
- package/es/dashboard/PageTabs/stable.mjs +16 -0
- package/es/dashboard/PageTabs/stable.mjs.map +1 -0
- package/es/dashboard/PageTabs/type.d.mts +1 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs +5 -4
- package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -1
- package/es/dashboard/PageToolbar/stable.mjs +10 -0
- package/es/dashboard/PageToolbar/stable.mjs.map +1 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +7 -4
- package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -1
- package/es/dashboard/PanelSurface/stable.mjs +11 -0
- package/es/dashboard/PanelSurface/stable.mjs.map +1 -0
- package/es/dashboard/RouteProgress/RouteProgress.d.mts +1 -1
- package/es/dashboard/RouteProgress/RouteProgress.mjs +8 -8
- package/es/dashboard/RouteProgress/RouteProgress.mjs.map +1 -1
- package/es/dashboard/RouteProgress/stable.mjs +10 -0
- package/es/dashboard/RouteProgress/stable.mjs.map +1 -0
- package/es/dashboard/RouteProgress/style.mjs +1 -0
- package/es/dashboard/RouteProgress/style.mjs.map +1 -1
- package/es/dashboard/RouteProgress/type.d.mts +1 -0
- package/es/dashboard/Section/Section.mjs +17 -8
- package/es/dashboard/Section/Section.mjs.map +1 -1
- package/es/dashboard/Section/stable.mjs +19 -0
- package/es/dashboard/Section/stable.mjs.map +1 -0
- package/es/dashboard/StatCard/StatCard.mjs +9 -1
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/stable.mjs +23 -0
- package/es/dashboard/StatCard/stable.mjs.map +1 -0
- package/es/dashboard/Surface/Surface.mjs +19 -14
- package/es/dashboard/Surface/Surface.mjs.map +1 -1
- package/es/dashboard/Surface/stable.mjs +23 -0
- package/es/dashboard/Surface/stable.mjs.map +1 -0
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +2 -2
- package/es/dashboard/TableIconActions/TableIconActions.mjs +6 -2
- package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -1
- package/es/dashboard/TableIconActions/stable.mjs +14 -0
- package/es/dashboard/TableIconActions/stable.mjs.map +1 -0
- package/es/dashboard/TableIconActions/type.d.mts +2 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +13 -3
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -1
- package/es/dashboard/TitleWithTips/stable.mjs +10 -0
- package/es/dashboard/TitleWithTips/stable.mjs.map +1 -0
- package/es/internal/overflow/OverflowList.mjs +1 -1
- package/es/mdx/Callout/index.mjs +18 -45
- package/es/mdx/Callout/index.mjs.map +1 -1
- package/es/mdx/Callout/stable.mjs +15 -0
- package/es/mdx/Callout/stable.mjs.map +1 -0
- package/es/mdx/Callout/style.mjs +34 -0
- package/es/mdx/Callout/style.mjs.map +1 -1
- package/es/mdx/Cards/Card.mjs +15 -22
- package/es/mdx/Cards/Card.mjs.map +1 -1
- package/es/mdx/Cards/index.mjs +3 -2
- package/es/mdx/Cards/index.mjs.map +1 -1
- package/es/mdx/Cards/stable.mjs +20 -0
- package/es/mdx/Cards/stable.mjs.map +1 -0
- package/es/mdx/Cards/style.mjs +10 -0
- package/es/mdx/Cards/style.mjs.map +1 -1
- package/es/mdx/FileTree/File.mjs +11 -2
- package/es/mdx/FileTree/File.mjs.map +1 -1
- package/es/mdx/FileTree/Folder.mjs +16 -4
- package/es/mdx/FileTree/Folder.mjs.map +1 -1
- package/es/mdx/FileTree/index.mjs +3 -1
- package/es/mdx/FileTree/index.mjs.map +1 -1
- package/es/mdx/FileTree/stable.mjs +18 -0
- package/es/mdx/FileTree/stable.mjs.map +1 -0
- package/es/mdx/Mdx/index.mjs +5 -2
- package/es/mdx/Mdx/index.mjs.map +1 -1
- package/es/mdx/Mdx/stable.mjs +11 -0
- package/es/mdx/Mdx/stable.mjs.map +1 -0
- package/es/mdx/Steps/index.mjs +3 -2
- package/es/mdx/Steps/index.mjs.map +1 -1
- package/es/mdx/Steps/stable.mjs +10 -0
- package/es/mdx/Steps/stable.mjs.map +1 -0
- package/es/mdx/Tabs/Tab.mjs +4 -3
- package/es/mdx/Tabs/Tab.mjs.map +1 -1
- package/es/mdx/Tabs/index.mjs +9 -27
- package/es/mdx/Tabs/index.mjs.map +1 -1
- package/es/mdx/Tabs/stable.mjs +17 -0
- package/es/mdx/Tabs/stable.mjs.map +1 -0
- package/es/mdx/mdxComponents/Image.mjs +5 -6
- package/es/mdx/mdxComponents/Image.mjs.map +1 -1
- package/es/mdx/mdxComponents/Link.mjs +4 -1
- package/es/mdx/mdxComponents/Link.mjs.map +1 -1
- package/es/mdx/mdxComponents/Pre.mjs +6 -5
- package/es/mdx/mdxComponents/Pre.mjs.map +1 -1
- package/es/mdx/mdxComponents/Video.mjs +5 -6
- package/es/mdx/mdxComponents/Video.mjs.map +1 -1
- package/es/mdx/mdxComponents/stable.mjs +26 -0
- package/es/mdx/mdxComponents/stable.mjs.map +1 -0
- package/es/mobile/ChatHeader/ChatHeader.mjs +8 -6
- package/es/mobile/ChatHeader/ChatHeader.mjs.map +1 -1
- package/es/mobile/ChatHeader/ChatHeaderTitle.mjs +9 -4
- package/es/mobile/ChatHeader/ChatHeaderTitle.mjs.map +1 -1
- package/es/mobile/ChatHeader/stable.mjs +20 -0
- package/es/mobile/ChatHeader/stable.mjs.map +1 -0
- package/es/mobile/ChatInputArea/ChatInputArea.mjs +16 -7
- package/es/mobile/ChatInputArea/ChatInputArea.mjs.map +1 -1
- package/es/mobile/ChatInputArea/components/ChatSendButton.mjs +4 -1
- package/es/mobile/ChatInputArea/components/ChatSendButton.mjs.map +1 -1
- package/es/mobile/ChatInputArea/stable.mjs +23 -0
- package/es/mobile/ChatInputArea/stable.mjs.map +1 -0
- package/es/mobile/ChatInputArea/style.mjs +13 -0
- package/es/mobile/ChatInputArea/style.mjs.map +1 -1
- package/es/mobile/SafeArea/SafeArea.mjs +5 -1
- package/es/mobile/SafeArea/SafeArea.mjs.map +1 -1
- package/es/mobile/SafeArea/stable.mjs +11 -0
- package/es/mobile/SafeArea/stable.mjs.map +1 -0
- package/es/mobile/TabBar/TabBar.mjs +9 -6
- package/es/mobile/TabBar/TabBar.mjs.map +1 -1
- package/es/mobile/TabBar/stable.mjs +16 -0
- package/es/mobile/TabBar/stable.mjs.map +1 -0
- package/es/style.css +632 -36
- package/es/styles/theme/scope.mjs +3 -1
- package/es/styles/theme/scope.mjs.map +1 -1
- package/es/styles/theme/stable.mjs +10 -0
- package/es/styles/theme/stable.mjs.map +1 -0
- package/es/utils/bem.mjs +18 -1
- package/es/utils/bem.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { stableClasses } from "../utils/bem.mjs";
|
|
2
|
+
//#region src/Tabs/stable.ts
|
|
3
|
+
const tabsClasses = stableClasses({
|
|
4
|
+
block: "tabs",
|
|
5
|
+
dataAttributes: ["size", "variant"],
|
|
6
|
+
elements: [
|
|
7
|
+
"list",
|
|
8
|
+
"indicator",
|
|
9
|
+
"tab",
|
|
10
|
+
"panel"
|
|
11
|
+
]
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { tabsClasses };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=stable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stable.mjs","names":[],"sources":["../../src/Tabs/stable.ts"],"sourcesContent":["import { stableClasses } from '@/utils/bem';\n\nexport const tabsClasses = stableClasses({\n block: 'tabs',\n dataAttributes: ['size', 'variant'],\n elements: ['list', 'indicator', 'tab', 'panel'],\n});\n"],"mappings":";;AAEA,MAAa,cAAc,cAAc;CACvC,OAAO;CACP,gBAAgB,CAAC,QAAQ,SAAS;CAClC,UAAU;EAAC;EAAQ;EAAa;EAAO;CAAO;AAChD,CAAC"}
|
package/es/Tag/Tag.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
2
3
|
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
4
|
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
4
5
|
import { stylish } from "../styles/stylex/stylish.mjs";
|
|
5
6
|
import { safeReadableColor } from "../utils/safeReadableColor.mjs";
|
|
7
|
+
import { tagClasses } from "./stable.mjs";
|
|
6
8
|
import { styles } from "./style.mjs";
|
|
7
9
|
import { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from "./utils.mjs";
|
|
10
|
+
import clsx$1 from "clsx";
|
|
8
11
|
import { memo, useMemo, useState } from "react";
|
|
9
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import clsx$1 from "clsx";
|
|
11
13
|
import { X } from "lucide-react";
|
|
12
14
|
//#region src/Tag/Tag.tsx
|
|
13
15
|
const variantStyles = {
|
|
@@ -24,7 +26,7 @@ const roundSizeStyles = {
|
|
|
24
26
|
const Tag = memo(({ children, className, classNames, closable, closeIcon, color, icon, onClick, onClose, ref, shape = "normal", size = "middle", style, styles: customStyles, variant = "filled", ...rest }) => {
|
|
25
27
|
const [visible, setVisible] = useState(true);
|
|
26
28
|
const colors = useMemo(() => {
|
|
27
|
-
let textColor
|
|
29
|
+
let textColor;
|
|
28
30
|
let backgroundColor;
|
|
29
31
|
let borderColor;
|
|
30
32
|
const isBorderless = variant === "borderless";
|
|
@@ -63,23 +65,30 @@ const Tag = memo(({ children, className, classNames, closable, closeIcon, color,
|
|
|
63
65
|
styles.root,
|
|
64
66
|
variantStyles[variant],
|
|
65
67
|
styles[size],
|
|
66
|
-
shape === "round" && [styles.round, roundSizeStyles[size]]
|
|
68
|
+
shape === "round" && [styles.round, roundSizeStyles[size]],
|
|
69
|
+
!colors.textColor && styles.defaultColor,
|
|
70
|
+
!!onClick && styles.clickable
|
|
67
71
|
], clsx$1("lobe-tag", className, classNames?.root), {
|
|
68
72
|
background: colors.backgroundColor,
|
|
69
73
|
borderColor: colors.borderColor,
|
|
70
74
|
color: colors.textColor,
|
|
71
|
-
cursor: onClick ? "pointer" : void 0,
|
|
72
75
|
...style,
|
|
73
76
|
...customStyles?.root
|
|
74
77
|
}),
|
|
75
78
|
onClick,
|
|
79
|
+
...toDataAttributes({
|
|
80
|
+
color,
|
|
81
|
+
shape,
|
|
82
|
+
size,
|
|
83
|
+
variant
|
|
84
|
+
}),
|
|
76
85
|
...rest,
|
|
77
86
|
children: [
|
|
78
87
|
icon,
|
|
79
88
|
children,
|
|
80
89
|
closable && /* @__PURE__ */ jsx("button", {
|
|
81
90
|
"aria-label": "Close",
|
|
82
|
-
...styleProps(styles.close, classNames?.closeIcon, customStyles?.closeIcon),
|
|
91
|
+
...styleProps(styles.close, clsx$1(tagClasses("close"), classNames?.closeIcon), customStyles?.closeIcon),
|
|
83
92
|
type: "button",
|
|
84
93
|
onClick: (e) => {
|
|
85
94
|
e.stopPropagation();
|
package/es/Tag/Tag.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.mjs","names":["clsx"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\nimport { memo, useMemo, useState } from 'react';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { stylish } from '@/styles/stylex/stylish';\nimport { safeReadableColor } from '@/utils/safeReadableColor';\n\nimport { styles } from './style';\nimport type { TagProps } from './type';\nimport { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from './utils';\n\nconst variantStyles = {\n borderless: stylish.variantBorderlessWithoutHover,\n filled: stylish.variantFilledWithoutHover,\n outlined: stylish.variantOutlinedWithoutHover,\n solid: stylish.variantFilledWithoutHover,\n};\n\nconst roundSizeStyles = {\n large: styles.roundLarge,\n middle: styles.roundMiddle,\n small: styles.roundSmall,\n};\n\nconst Tag = memo<TagProps>(\n ({\n children,\n className,\n classNames,\n closable,\n closeIcon,\n color,\n icon,\n onClick,\n onClose,\n ref,\n shape = 'normal',\n size = 'middle',\n style,\n styles: customStyles,\n variant = 'filled',\n ...rest\n }) => {\n const [visible, setVisible] = useState(true);\n\n const colors = useMemo(() => {\n let textColor
|
|
1
|
+
{"version":3,"file":"Tag.mjs","names":["clsx"],"sources":["../../src/Tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\nimport { memo, useMemo, useState } from 'react';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { stylish } from '@/styles/stylex/stylish';\nimport { toDataAttributes } from '@/utils/bem';\nimport { safeReadableColor } from '@/utils/safeReadableColor';\n\nimport { tagClasses } from './stable';\nimport { styles } from './style';\nimport type { TagProps } from './type';\nimport { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from './utils';\n\nconst variantStyles = {\n borderless: stylish.variantBorderlessWithoutHover,\n filled: stylish.variantFilledWithoutHover,\n outlined: stylish.variantOutlinedWithoutHover,\n solid: stylish.variantFilledWithoutHover,\n};\n\nconst roundSizeStyles = {\n large: styles.roundLarge,\n middle: styles.roundMiddle,\n small: styles.roundSmall,\n};\n\nconst Tag = memo<TagProps>(\n ({\n children,\n className,\n classNames,\n closable,\n closeIcon,\n color,\n icon,\n onClick,\n onClose,\n ref,\n shape = 'normal',\n size = 'middle',\n style,\n styles: customStyles,\n variant = 'filled',\n ...rest\n }) => {\n const [visible, setVisible] = useState(true);\n\n const colors = useMemo(() => {\n let textColor: string | undefined;\n let backgroundColor;\n let borderColor;\n const isBorderless = variant === 'borderless';\n const isFilled = variant === 'filled';\n const isSolid = variant === 'solid';\n const isPresetColor = color && presetColors.includes(color);\n const isPresetSystemColors = color && presetSystemColors.has(color);\n const isHexColor = color && color.startsWith('#');\n\n if (isPresetColor) {\n const solidBgColor = colorsPreset(color);\n textColor = isSolid ? safeReadableColor(solidBgColor) : colorsPreset(color, 'active');\n backgroundColor = isSolid\n ? solidBgColor\n : isBorderless\n ? 'transparent'\n : colorsPreset(color, 'fillTertiary');\n borderColor = isSolid\n ? solidBgColor\n : colorsPreset(color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isPresetSystemColors) {\n const solidBgColor = colorsPresetSystem(color);\n textColor = isSolid ? safeReadableColor(solidBgColor) : colorsPresetSystem(color);\n backgroundColor = isSolid\n ? solidBgColor\n : isBorderless\n ? 'transparent'\n : colorsPresetSystem(color, 'fillTertiary');\n borderColor = isSolid\n ? solidBgColor\n : colorsPresetSystem(color, isFilled ? 'fillQuaternary' : 'fillTertiary');\n }\n if (isHexColor) {\n textColor = isSolid\n ? safeReadableColor(color)\n : isBorderless\n ? color\n : cssVar.colorBgLayout;\n backgroundColor = isSolid ? color : isBorderless ? 'transparent' : color;\n borderColor = isSolid ? color : borderColor;\n }\n\n return {\n backgroundColor,\n borderColor,\n textColor,\n };\n }, [color, variant]);\n\n if (!visible) return null;\n\n return (\n <span\n ref={ref}\n {...styleProps(\n [\n styles.root,\n variantStyles[variant],\n styles[size],\n shape === 'round' && [styles.round, roundSizeStyles[size]],\n !colors.textColor && styles.defaultColor,\n !!onClick && styles.clickable,\n ],\n clsx('lobe-tag', className, classNames?.root),\n {\n background: colors.backgroundColor,\n borderColor: colors.borderColor,\n color: colors.textColor,\n ...style,\n ...customStyles?.root,\n },\n )}\n onClick={onClick}\n {...toDataAttributes({ color, shape, size, variant })}\n {...rest}\n >\n {icon}\n {children}\n {closable && (\n <button\n aria-label=\"Close\"\n {...styleProps(\n styles.close,\n clsx(tagClasses('close'), classNames?.closeIcon),\n customStyles?.closeIcon,\n )}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.(e);\n setVisible(false);\n }}\n >\n {closeIcon ?? <X size={10} />}\n </button>\n )}\n </span>\n );\n },\n);\n\nTag.displayName = 'Tag';\n\nexport default Tag;\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,gBAAgB;CACpB,YAAY,QAAQ;CACpB,QAAQ,QAAQ;CAChB,UAAU,QAAQ;CAClB,OAAO,QAAQ;AACjB;AAEA,MAAM,kBAAkB;CACtB,OAAO,OAAO;CACd,QAAQ,OAAO;CACf,OAAO,OAAO;AAChB;AAEA,MAAM,MAAM,MACT,EACC,UACA,WACA,YACA,UACA,WACA,O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,OAAO;GAC5B,CAAC,CAAC,WAAW,OAAO;EACtB,GACAA,OAAK,YAAY,WAAW,YAAY,IAAI,GAC5C;GACE,YAAY,OAAO;GACnB,aAAa,OAAO;GACpB,OAAO,OAAO;GACd,GAAG;GACH,GAAG,cAAc;EACnB,CACF;EACS;EACT,GAAI,iBAAiB;GAAE;GAAO;GAAO;GAAM;EAAQ,CAAC;EACpD,GAAI;EAtBN,UAAA;GAwBG;GACA;GACA,YACC,oBAAC,UAAD;IACE,cAAW;IACX,GAAI,WACF,OAAO,OACPA,OAAK,WAAW,OAAO,GAAG,YAAY,SAAS,GAC/C,cAAc,SAChB;IACA,MAAK;IACL,UAAU,MAAM;KACd,EAAE,gBAAgB;KAClB,UAAU,CAAC;KACX,WAAW,KAAK;IAClB;IAEC,UAAA,aAAa,oBAAC,GAAD,EAAG,MAAM,GAAK,CAAA;GACtB,CAAA;EAEN;;AAEV,CACF;AAEA,IAAI,cAAc"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { stableClasses } from "../utils/bem.mjs";
|
|
2
|
+
//#region src/Tag/stable.ts
|
|
3
|
+
const tagClasses = stableClasses({
|
|
4
|
+
block: "tag",
|
|
5
|
+
dataAttributes: [
|
|
6
|
+
"variant",
|
|
7
|
+
"size",
|
|
8
|
+
"shape",
|
|
9
|
+
"color"
|
|
10
|
+
],
|
|
11
|
+
elements: ["close"]
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { tagClasses };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=stable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stable.mjs","names":[],"sources":["../../src/Tag/stable.ts"],"sourcesContent":["import { stableClasses } from '@/utils/bem';\n\nexport const tagClasses = stableClasses({\n block: 'tag',\n dataAttributes: ['variant', 'size', 'shape', 'color'],\n elements: ['close'],\n});\n"],"mappings":";;AAEA,MAAa,aAAa,cAAc;CACtC,OAAO;CACP,gBAAgB;EAAC;EAAW;EAAQ;EAAS;CAAO;CACpD,UAAU,CAAC,OAAO;AACpB,CAAC"}
|
package/es/Tag/style.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/Tag/style.ts
|
|
2
2
|
const styles = {
|
|
3
|
+
clickable: {
|
|
4
|
+
kkrTdU: "lb1ypdohk",
|
|
5
|
+
$$css: true
|
|
6
|
+
},
|
|
3
7
|
close: {
|
|
4
8
|
kogj98: "lb1ghz6dp",
|
|
5
9
|
kmVPX3: "lb1717udv",
|
|
@@ -15,6 +19,10 @@ const styles = {
|
|
|
15
19
|
kjj79g: "lbl56j7k",
|
|
16
20
|
$$css: true
|
|
17
21
|
},
|
|
22
|
+
defaultColor: {
|
|
23
|
+
kMwMTN: "lbc77et8",
|
|
24
|
+
$$css: true
|
|
25
|
+
},
|
|
18
26
|
large: {
|
|
19
27
|
kaIpWk: "lb1kogg8i",
|
|
20
28
|
kg3NbH: "lbaope02",
|
package/es/Tag/style.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Tag/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nexport const styles = stylex.create({\n close: {\n margin: 0,\n padding: 0,\n borderColor: 'currentcolor',\n borderStyle: 'none',\n borderWidth: 'medium',\n gap: 0,\n alignItems: 'center',\n backgroundColor: 'transparent',\n color: {\n 'default': cssVar.colorIcon,\n ':hover': cssVar.colorTextHeading,\n },\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n large: {\n borderRadius: 6,\n paddingInline: 12,\n height: 28,\n },\n middle: {\n borderRadius: 3,\n paddingInline: 8,\n height: 22,\n },\n root: {\n margin: 0,\n gap: '0.4em',\n alignItems: 'center',\n display: 'inline-flex',\n fontSize: cssVar.fontSizeSM,\n justifyContent: 'center',\n lineHeight: 1.2,\n userSelect: 'none',\n whiteSpace: 'nowrap',\n width: 'fit-content',\n },\n round: {\n borderRadius: 999,\n },\n roundLarge: {\n paddingInline: 14,\n },\n roundMiddle: {\n paddingInline: 10,\n },\n roundSmall: {\n paddingInline: 8,\n },\n small: {\n borderRadius: 3,\n paddingInline: 4,\n height: 20,\n },\n});\n"],"mappings":";AAGA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Tag/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nexport const styles = stylex.create({\n clickable: {\n cursor: 'pointer',\n },\n close: {\n margin: 0,\n padding: 0,\n borderColor: 'currentcolor',\n borderStyle: 'none',\n borderWidth: 'medium',\n gap: 0,\n alignItems: 'center',\n backgroundColor: 'transparent',\n color: {\n 'default': cssVar.colorIcon,\n ':hover': cssVar.colorTextHeading,\n },\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n defaultColor: {\n color: cssVar.colorTextSecondary,\n },\n large: {\n borderRadius: 6,\n paddingInline: 12,\n height: 28,\n },\n middle: {\n borderRadius: 3,\n paddingInline: 8,\n height: 22,\n },\n root: {\n margin: 0,\n gap: '0.4em',\n alignItems: 'center',\n display: 'inline-flex',\n fontSize: cssVar.fontSizeSM,\n justifyContent: 'center',\n lineHeight: 1.2,\n userSelect: 'none',\n whiteSpace: 'nowrap',\n width: 'fit-content',\n },\n round: {\n borderRadius: 999,\n },\n roundLarge: {\n paddingInline: 14,\n },\n roundMiddle: {\n paddingInline: 10,\n },\n roundSmall: {\n paddingInline: 8,\n },\n small: {\n borderRadius: 3,\n paddingInline: 4,\n height: 20,\n },\n});\n"],"mappings":";AAGA,MAAa,SAAS;CACpB,WAAW;EACT,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
package/es/Text/Text.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
2
3
|
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
4
|
import { Tooltip } from "../Tooltip/Tooltip.mjs";
|
|
4
5
|
import { textStyleArray } from "./style.mjs";
|
|
5
6
|
import { useTextOverflow } from "../hooks/useTextOverflow.mjs";
|
|
7
|
+
import { textClasses } from "./stable.mjs";
|
|
8
|
+
import clsx$1 from "clsx";
|
|
6
9
|
import { memo, useRef } from "react";
|
|
7
10
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import clsx$1 from "clsx";
|
|
9
11
|
//#region src/Text/Text.tsx
|
|
10
12
|
const InternalText = memo(({ align, as: Container = "div", children, className, classNames, code, color, delete: deleteStyle, disabled, ellipsis, fontSize, italic, lineClamp, lineHeight, mark, noWrap, ref, shiny, shinyDuration, strong, style, styles: customStyles, textDecoration, textTransform, type, underline, weight, whiteSpace, wordBreak, ...rest }) => {
|
|
11
13
|
const innerRef = useRef(null);
|
|
@@ -41,6 +43,7 @@ const InternalText = memo(({ align, as: Container = "div", children, className,
|
|
|
41
43
|
...customStyles?.root
|
|
42
44
|
};
|
|
43
45
|
const content = /* @__PURE__ */ jsx(Container, {
|
|
46
|
+
...toDataAttributes({ type }),
|
|
44
47
|
...rest,
|
|
45
48
|
ref: setNodeRef,
|
|
46
49
|
style: textStyle,
|
|
@@ -63,7 +66,7 @@ const InternalText = memo(({ align, as: Container = "div", children, className,
|
|
|
63
66
|
strong,
|
|
64
67
|
type,
|
|
65
68
|
underline
|
|
66
|
-
}), clsx$1(shiny && "lobe-text-shiny", className, classNames?.root)).className,
|
|
69
|
+
}), clsx$1(textClasses(), shiny && "lobe-text-shiny", className, classNames?.root)).className,
|
|
67
70
|
children
|
|
68
71
|
});
|
|
69
72
|
if (ellipsis && typeof ellipsis === "object" && (ellipsis.tooltip || ellipsis.tooltipWhenOverflow)) {
|
package/es/Text/Text.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.mjs","names":["clsx"],"sources":["../../src/Text/Text.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport clsx from 'clsx';\nimport { type CSSProperties, memo, type ReactNode, type RefObject, useRef } from 'react';\n\nimport { useTextOverflow } from '@/hooks/useTextOverflow';\nimport { styleProps } from '@/styles/stylex/props';\nimport Tooltip from '@/Tooltip';\n\nimport { textStyleArray } from './style';\nimport { type TextBaseProps, type TextProps } from './type';\n\ntype InternalTextProps = TextBaseProps & {\n shiny?: boolean;\n shinyDuration?: CSSProperties['animationDuration'];\n};\n\nconst InternalText = memo<InternalTextProps>(\n ({\n align,\n as: Container = 'div',\n children,\n className,\n classNames,\n code,\n color,\n delete: deleteStyle,\n disabled,\n ellipsis,\n fontSize,\n italic,\n lineClamp,\n lineHeight,\n mark,\n noWrap,\n ref,\n shiny,\n shinyDuration,\n strong,\n style,\n styles: customStyles,\n textDecoration,\n textTransform,\n type,\n underline,\n weight,\n whiteSpace,\n wordBreak,\n ...rest\n }) => {\n const innerRef = useRef<HTMLElement>(null);\n const isOverflow = useTextOverflow(innerRef, ellipsis, children);\n\n const isMultiEllipsis = typeof ellipsis === 'object' && !!ellipsis.rows && ellipsis.rows > 1;\n const tooltipWhenOverflow = typeof ellipsis === 'object' && ellipsis.tooltipWhenOverflow;\n\n const setNodeRef = (node: HTMLElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node as HTMLDivElement);\n else if (ref) (ref as RefObject<HTMLDivElement | null>).current = node as HTMLDivElement;\n };\n\n const textStyle: CSSProperties = {\n ...(color && { color }),\n ...(weight && { fontWeight: weight }),\n ...(lineHeight && { lineHeight }),\n ...(textTransform && { textTransform }),\n ...(textDecoration && { textDecoration }),\n ...(wordBreak && { wordBreak }),\n ...(typeof ellipsis === 'object' &&\n ellipsis.rows && {\n WebkitLineClamp: ellipsis.rows,\n }),\n ...(!ellipsis &&\n !!lineClamp && {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lineClamp,\n display: '-webkit-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }),\n ...(shiny && shinyDuration && { '--shiny-duration': shinyDuration }),\n ...(fontSize && { fontSize }),\n ...(align && { textAlign: align }),\n ...(!isMultiEllipsis && noWrap && { whiteSpace: 'nowrap' as const }),\n ...(whiteSpace && { whiteSpace }),\n ...style,\n ...customStyles?.root,\n };\n\n const content = (\n <Container\n {...rest}\n ref={setNodeRef}\n style={textStyle}\n className={\n styleProps(\n textStyleArray({\n as: ['h1', 'h2', 'h3', 'h4', 'h5', 'p'].includes(Container as string)\n ? (Container as 'h1')\n : undefined,\n code,\n delete: deleteStyle,\n disabled,\n ellipsis: ellipsis\n ? typeof ellipsis === 'object' && ellipsis.rows\n ? 'multi'\n : true\n : undefined,\n italic,\n mark,\n shiny,\n strong,\n type,\n underline,\n }),\n clsx(shiny && 'lobe-text-shiny', className, classNames?.root),\n ).className\n }\n >\n {children}\n </Container>\n );\n\n if (\n ellipsis &&\n typeof ellipsis === 'object' &&\n (ellipsis.tooltip || ellipsis.tooltipWhenOverflow)\n ) {\n if (tooltipWhenOverflow && !isOverflow) return content;\n\n const title = typeof ellipsis.tooltip === 'string' ? ellipsis.tooltip : children;\n if (ellipsis.tooltip && typeof ellipsis.tooltip === 'object')\n return (\n <Tooltip {...ellipsis.tooltip} title={ellipsis.tooltip?.title || title}>\n {content}\n </Tooltip>\n );\n return <Tooltip title={title}>{content}</Tooltip>;\n }\n\n return content;\n },\n);\n\nInternalText.displayName = 'Text';\n\nexport interface IText {\n <Shiny extends boolean = boolean>(props: TextProps<Shiny>): ReactNode;\n}\n\nconst Text = InternalText as unknown as IText;\n\nexport default Text;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.mjs","names":["clsx"],"sources":["../../src/Text/Text.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport clsx from 'clsx';\nimport { type CSSProperties, memo, type ReactNode, type RefObject, useRef } from 'react';\n\nimport { useTextOverflow } from '@/hooks/useTextOverflow';\nimport { styleProps } from '@/styles/stylex/props';\nimport Tooltip from '@/Tooltip';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { textClasses } from './stable';\nimport { textStyleArray } from './style';\nimport { type TextBaseProps, type TextProps } from './type';\n\ntype InternalTextProps = TextBaseProps & {\n shiny?: boolean;\n shinyDuration?: CSSProperties['animationDuration'];\n};\n\nconst InternalText = memo<InternalTextProps>(\n ({\n align,\n as: Container = 'div',\n children,\n className,\n classNames,\n code,\n color,\n delete: deleteStyle,\n disabled,\n ellipsis,\n fontSize,\n italic,\n lineClamp,\n lineHeight,\n mark,\n noWrap,\n ref,\n shiny,\n shinyDuration,\n strong,\n style,\n styles: customStyles,\n textDecoration,\n textTransform,\n type,\n underline,\n weight,\n whiteSpace,\n wordBreak,\n ...rest\n }) => {\n const innerRef = useRef<HTMLElement>(null);\n const isOverflow = useTextOverflow(innerRef, ellipsis, children);\n\n const isMultiEllipsis = typeof ellipsis === 'object' && !!ellipsis.rows && ellipsis.rows > 1;\n const tooltipWhenOverflow = typeof ellipsis === 'object' && ellipsis.tooltipWhenOverflow;\n\n const setNodeRef = (node: HTMLElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node as HTMLDivElement);\n else if (ref) (ref as RefObject<HTMLDivElement | null>).current = node as HTMLDivElement;\n };\n\n const textStyle: CSSProperties = {\n ...(color && { color }),\n ...(weight && { fontWeight: weight }),\n ...(lineHeight && { lineHeight }),\n ...(textTransform && { textTransform }),\n ...(textDecoration && { textDecoration }),\n ...(wordBreak && { wordBreak }),\n ...(typeof ellipsis === 'object' &&\n ellipsis.rows && {\n WebkitLineClamp: ellipsis.rows,\n }),\n ...(!ellipsis &&\n !!lineClamp && {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lineClamp,\n display: '-webkit-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }),\n ...(shiny && shinyDuration && { '--shiny-duration': shinyDuration }),\n ...(fontSize && { fontSize }),\n ...(align && { textAlign: align }),\n ...(!isMultiEllipsis && noWrap && { whiteSpace: 'nowrap' as const }),\n ...(whiteSpace && { whiteSpace }),\n ...style,\n ...customStyles?.root,\n };\n\n const content = (\n <Container\n {...toDataAttributes({ type })}\n {...rest}\n ref={setNodeRef}\n style={textStyle}\n className={\n styleProps(\n textStyleArray({\n as: ['h1', 'h2', 'h3', 'h4', 'h5', 'p'].includes(Container as string)\n ? (Container as 'h1')\n : undefined,\n code,\n delete: deleteStyle,\n disabled,\n ellipsis: ellipsis\n ? typeof ellipsis === 'object' && ellipsis.rows\n ? 'multi'\n : true\n : undefined,\n italic,\n mark,\n shiny,\n strong,\n type,\n underline,\n }),\n clsx(textClasses(), shiny && 'lobe-text-shiny', className, classNames?.root),\n ).className\n }\n >\n {children}\n </Container>\n );\n\n if (\n ellipsis &&\n typeof ellipsis === 'object' &&\n (ellipsis.tooltip || ellipsis.tooltipWhenOverflow)\n ) {\n if (tooltipWhenOverflow && !isOverflow) return content;\n\n const title = typeof ellipsis.tooltip === 'string' ? ellipsis.tooltip : children;\n if (ellipsis.tooltip && typeof ellipsis.tooltip === 'object')\n return (\n <Tooltip {...ellipsis.tooltip} title={ellipsis.tooltip?.title || title}>\n {content}\n </Tooltip>\n );\n return <Tooltip title={title}>{content}</Tooltip>;\n }\n\n return content;\n },\n);\n\nInternalText.displayName = 'Text';\n\nexport interface IText {\n <Shiny extends boolean = boolean>(props: TextProps<Shiny>): ReactNode;\n}\n\nconst Text = InternalText as unknown as IText;\n\nexport default Text;\n"],"mappings":";;;;;;;;;;;AAqBA,MAAM,eAAe,MAClB,EACC,OACA,IAAI,YAAY,OAChB,UACA,WACA,YACA,MACA,OACA,QAAQ,aACR,UACA,UACA,UACA,QACA,WACA,YACA,MACA,QACA,KACA,OACA,eACA,QACA,OACA,QAAQ,cACR,gBAC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R;GACA,UAAU,WACN,OAAO,aAAa,YAAY,SAAS,OACvC,UACA,OACF,KAAA;GACJ;GACA;GACA;GACA;GACA;GACA;EACF,CAAC,GACDA,OAAK,YAAY,GAAG,SAAS,mBAAmB,WAAW,YAAY,IAAI,CAC7E,CAAC,CAAC;EAGH;CACQ,CAAA;CAGb,IACE,YACA,OAAO,aAAa,aACnB,SAAS,WAAW,SAAS,sBAC9B;EACA,IAAI,uBAAuB,CAAC,YAAY,OAAO;EAE/C,MAAM,QAAQ,OAAO,SAAS,YAAY,WAAW,SAAS,UAAU;EACxE,IAAI,SAAS,WAAW,OAAO,SAAS,YAAY,UAClD,OACE,oBAAC,SAAD;GAAS,GAAI,SAAS;GAAS,OAAO,SAAS,SAAS,SAAS;GAC9D,UAAA;EACM,CAAA;EAEb,OAAO,oBAAC,SAAD;GAAgB;GAAQ,UAAA;EAAiB,CAAA;CAClD;CAEA,OAAO;AACT,CACF;AAEA,aAAa,cAAc;AAM3B,MAAM,OAAO"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { stableClasses } from "../utils/bem.mjs";
|
|
2
|
+
//#region src/Text/stable.ts
|
|
3
|
+
const textClasses = stableClasses({
|
|
4
|
+
block: "text",
|
|
5
|
+
dataAttributes: ["type"],
|
|
6
|
+
elements: []
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { textClasses };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=stable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stable.mjs","names":[],"sources":["../../src/Text/stable.ts"],"sourcesContent":["import { stableClasses } from '@/utils/bem';\n\nexport const textClasses = stableClasses({\n block: 'text',\n dataAttributes: ['type'],\n elements: [],\n});\n"],"mappings":";;AAEA,MAAa,cAAc,cAAc;CACvC,OAAO;CACP,gBAAgB,CAAC,MAAM;CACvB,UAAU,CAAC;AACb,CAAC"}
|
package/es/Text/style.d.mts
CHANGED
package/es/Toast/Toast.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
2
3
|
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
4
|
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
4
5
|
import { focusRing } from "../styles/stylex/focusRing.mjs";
|
|
5
6
|
import Icon from "../Icon/Icon.mjs";
|
|
6
7
|
import { useToastContext } from "./context.mjs";
|
|
8
|
+
import { toastClasses } from "./stable.mjs";
|
|
7
9
|
import { actionVariantStyles, rootPositionStyles, styles } from "./style.mjs";
|
|
10
|
+
import clsx$1 from "clsx";
|
|
8
11
|
import { memo } from "react";
|
|
9
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import * as stylex from "@stylexjs/stylex";
|
|
11
13
|
import { AlertTriangle, CheckCircle, Info, Loader2, X, XCircle } from "lucide-react";
|
|
12
14
|
import { Toast } from "@base-ui/react/toast";
|
|
13
15
|
//#region src/Toast/Toast.tsx
|
|
@@ -45,7 +47,7 @@ const ToastItem = memo(({ toast, classNames, styles: customStyles }) => {
|
|
|
45
47
|
const renderIcon = () => {
|
|
46
48
|
if (!IconComponent) return null;
|
|
47
49
|
return /* @__PURE__ */ jsx("div", {
|
|
48
|
-
...styleProps(styles.icon, classNames?.icon, customStyles?.icon),
|
|
50
|
+
...styleProps(styles.icon, clsx$1(toastClasses("icon"), classNames?.icon), customStyles?.icon),
|
|
49
51
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
50
52
|
color: iconColor,
|
|
51
53
|
icon: IconComponent,
|
|
@@ -56,13 +58,13 @@ const ToastItem = memo(({ toast, classNames, styles: customStyles }) => {
|
|
|
56
58
|
};
|
|
57
59
|
const renderActions = () => {
|
|
58
60
|
if (actions && actions.length > 0) return /* @__PURE__ */ jsx("div", {
|
|
59
|
-
...styleProps(styles.actions, classNames?.actions, customStyles?.actions),
|
|
61
|
+
...styleProps(styles.actions, clsx$1(toastClasses("actions"), classNames?.actions), customStyles?.actions),
|
|
60
62
|
children: actions.map((action, index) => /* @__PURE__ */ jsx(Toast.Action, {
|
|
61
63
|
...styleProps([
|
|
62
64
|
styles.action,
|
|
63
65
|
focusRing.info,
|
|
64
66
|
actionVariantStyles[action.variant ?? "primary"]
|
|
65
|
-
], classNames?.action, customStyles?.action),
|
|
67
|
+
], clsx$1(toastClasses("action"), classNames?.action), customStyles?.action),
|
|
66
68
|
onClick: action.onClick,
|
|
67
69
|
...action.props,
|
|
68
70
|
children: action.label
|
|
@@ -73,7 +75,7 @@ const ToastItem = memo(({ toast, classNames, styles: customStyles }) => {
|
|
|
73
75
|
styles.action,
|
|
74
76
|
focusRing.info,
|
|
75
77
|
styles.actionPrimary
|
|
76
|
-
], classNames?.action, customStyles?.action),
|
|
78
|
+
], clsx$1(toastClasses("action"), classNames?.action), customStyles?.action),
|
|
77
79
|
...actionProps
|
|
78
80
|
});
|
|
79
81
|
return null;
|
|
@@ -81,40 +83,41 @@ const ToastItem = memo(({ toast, classNames, styles: customStyles }) => {
|
|
|
81
83
|
return /* @__PURE__ */ jsx(Toast.Root, {
|
|
82
84
|
swipeDirection,
|
|
83
85
|
toast,
|
|
84
|
-
...
|
|
86
|
+
...toDataAttributes({
|
|
87
|
+
position,
|
|
88
|
+
type
|
|
89
|
+
}),
|
|
90
|
+
...styleProps([styles.root, rootPositionStyles[position]], clsx$1(toastClasses(), classNames?.root), {
|
|
85
91
|
...customStyles?.root,
|
|
86
92
|
...toastData?.style
|
|
87
93
|
}),
|
|
88
94
|
children: /* @__PURE__ */ jsx(Toast.Content, {
|
|
89
|
-
...styleProps(styles.content, classNames?.content, customStyles?.content),
|
|
95
|
+
...styleProps(styles.content, clsx$1(toastClasses("content"), classNames?.content), customStyles?.content),
|
|
90
96
|
children: /* @__PURE__ */ jsxs("div", {
|
|
91
|
-
...
|
|
97
|
+
...styleProps(styles.toastBody, toastClasses("body")),
|
|
92
98
|
children: [renderIcon(), /* @__PURE__ */ jsxs("div", {
|
|
93
|
-
...
|
|
99
|
+
...styleProps(styles.contentArea, toastClasses("main")),
|
|
94
100
|
children: [title ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
95
|
-
...
|
|
101
|
+
...styleProps(styles.titleRow, toastClasses("title-row")),
|
|
96
102
|
children: [/* @__PURE__ */ jsx(Toast.Title, {
|
|
97
|
-
...styleProps(styles.title, classNames?.title, customStyles?.title),
|
|
103
|
+
...styleProps(styles.title, clsx$1(toastClasses("title"), classNames?.title), customStyles?.title),
|
|
98
104
|
children: title
|
|
99
105
|
}), showCloseButton && /* @__PURE__ */ jsx(Toast.Close, {
|
|
100
106
|
"aria-label": "Close",
|
|
101
|
-
...styleProps(styles.close, classNames?.close, customStyles?.close),
|
|
107
|
+
...styleProps(styles.close, clsx$1(toastClasses("close"), classNames?.close), customStyles?.close),
|
|
102
108
|
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
103
109
|
})]
|
|
104
110
|
}), description && /* @__PURE__ */ jsx(Toast.Description, {
|
|
105
|
-
...styleProps(styles.description, classNames?.description,
|
|
106
|
-
marginBlockStart: 4,
|
|
107
|
-
...customStyles?.description
|
|
108
|
-
}),
|
|
111
|
+
...styleProps([styles.description, styles.descriptionWithTitle], clsx$1(toastClasses("description"), classNames?.description), customStyles?.description),
|
|
109
112
|
children: description
|
|
110
113
|
})] }) : description && /* @__PURE__ */ jsxs("div", {
|
|
111
|
-
...
|
|
114
|
+
...styleProps(styles.titleRow, toastClasses("title-row")),
|
|
112
115
|
children: [/* @__PURE__ */ jsx(Toast.Description, {
|
|
113
|
-
...styleProps([styles.description, styles.descriptionStandalone], classNames?.description, customStyles?.description),
|
|
116
|
+
...styleProps([styles.description, styles.descriptionStandalone], clsx$1(toastClasses("description"), classNames?.description), customStyles?.description),
|
|
114
117
|
children: description
|
|
115
118
|
}), showCloseButton && /* @__PURE__ */ jsx(Toast.Close, {
|
|
116
119
|
"aria-label": "Close",
|
|
117
|
-
...styleProps(styles.close, classNames?.close, customStyles?.close),
|
|
120
|
+
...styleProps(styles.close, clsx$1(toastClasses("close"), classNames?.close), customStyles?.close),
|
|
118
121
|
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
119
122
|
})]
|
|
120
123
|
}), renderActions()]
|
package/es/Toast/Toast.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.mjs","names":["BaseToast"],"sources":["../../src/Toast/Toast.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport * as stylex from '@stylexjs/stylex';\nimport { AlertTriangle, CheckCircle, Info, Loader2, X, XCircle } from 'lucide-react';\nimport { memo, type ReactNode } from 'react';\n\nimport Icon from '@/Icon';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { useToastContext } from './context';\nimport { actionVariantStyles, rootPositionStyles, styles } from './style';\nimport { type ToastOptions, type ToastProps, type ToastType } from './type';\n\nconst typeIcons: Record<ToastType, typeof Info> = {\n default: Info,\n error: XCircle,\n info: Info,\n loading: Loader2,\n success: CheckCircle,\n warning: AlertTriangle,\n};\n\nconst typeColors: Record<ToastType, string> = {\n default: cssVar.colorText,\n error: cssVar.colorError,\n info: cssVar.colorInfo,\n loading: cssVar.colorPrimary,\n success: cssVar.colorSuccess,\n warning: cssVar.colorWarning,\n};\n\nconst ToastItem = memo<ToastProps>(({ toast, classNames, styles: customStyles }) => {\n const { position, swipeDirection } = useToastContext();\n const toastData = toast.data as ToastOptions | undefined;\n const type = toastData?.type ?? 'default';\n const closable = toastData?.closable ?? true;\n const hideCloseButton = toastData?.hideCloseButton ?? false;\n const showCloseButton = closable && !hideCloseButton;\n const icon = toastData?.icon;\n const title = toast.title ?? toastData?.title;\n const description = toast.description ?? toastData?.description;\n const actionProps = toast.actionProps ?? toastData?.actionProps;\n const actions = toastData?.actions;\n\n const iconColor = typeColors[type];\n const IconComponent = icon ?? typeIcons[type];\n const isLoading = type === 'loading';\n\n const renderIcon = (): ReactNode => {\n if (!IconComponent) return null;\n return (\n <div {...styleProps(styles.icon, classNames?.icon, customStyles?.icon)}>\n <Icon color={iconColor} icon={IconComponent} size={18} spin={isLoading} />\n </div>\n );\n };\n\n const renderActions = (): ReactNode => {\n if (actions && actions.length > 0) {\n return (\n <div {...styleProps(styles.actions, classNames?.actions, customStyles?.actions)}>\n {actions.map((action, index) => (\n <BaseToast.Action\n key={index}\n {...styleProps(\n [styles.action, focusRing.info, actionVariantStyles[action.variant ?? 'primary']],\n classNames?.action,\n customStyles?.action,\n )}\n onClick={action.onClick}\n {...action.props}\n >\n {action.label}\n </BaseToast.Action>\n ))}\n </div>\n );\n }\n if (actionProps) {\n return (\n <BaseToast.Action\n {...styleProps(\n [styles.action, focusRing.info, styles.actionPrimary],\n classNames?.action,\n customStyles?.action,\n )}\n {...actionProps}\n />\n );\n }\n return null;\n };\n\n return (\n <BaseToast.Root\n swipeDirection={swipeDirection}\n toast={toast}\n {...styleProps([styles.root, rootPositionStyles[position]], classNames?.root, {\n ...customStyles?.root,\n ...toastData?.style,\n })}\n >\n <BaseToast.Content\n {...styleProps(styles.content, classNames?.content, customStyles?.content)}\n >\n <div {...stylex.props(styles.toastBody)}>\n {renderIcon()}\n <div {...stylex.props(styles.contentArea)}>\n {title ? (\n <>\n <div {...stylex.props(styles.titleRow)}>\n <BaseToast.Title\n {...styleProps(styles.title, classNames?.title, customStyles?.title)}\n >\n {title}\n </BaseToast.Title>\n {showCloseButton && (\n <BaseToast.Close\n aria-label=\"Close\"\n {...styleProps(styles.close, classNames?.close, customStyles?.close)}\n >\n <X size={14} />\n </BaseToast.Close>\n )}\n </div>\n {description && (\n <BaseToast.Description\n {...styleProps(styles.description, classNames?.description, {\n marginBlockStart: 4,\n ...customStyles?.description,\n })}\n >\n {description}\n </BaseToast.Description>\n )}\n </>\n ) : (\n description && (\n <div {...stylex.props(styles.titleRow)}>\n <BaseToast.Description\n {...styleProps(\n [styles.description, styles.descriptionStandalone],\n classNames?.description,\n customStyles?.description,\n )}\n >\n {description}\n </BaseToast.Description>\n {showCloseButton && (\n <BaseToast.Close\n aria-label=\"Close\"\n {...styleProps(styles.close, classNames?.close, customStyles?.close)}\n >\n <X size={14} />\n </BaseToast.Close>\n )}\n </div>\n )\n )}\n {renderActions()}\n </div>\n </div>\n </BaseToast.Content>\n </BaseToast.Root>\n );\n});\n\nToastItem.displayName = 'ToastItem';\n\nexport default ToastItem;\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,YAA4C;CAChD,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;AACX;AACA,MAAM,aAAwC;CAC5C,SAAS,OAAO;CAChB,OAAO,OAAO;CACd,MAAM,OAAO;CACb,SAAS,OAAO;CAChB,SAAS,OAAO;CAChB,SAAS,OAAO;AAClB;AACA,MAAM,YAAY,MAAkB,EAClC,OACA,YACA,QAAQ,mBACJ;CACJ,MAAM,EACJ,UACA,mBACE,gBAAgB;CACpB,MAAM,YAAY,MAAM;CACxB,MAAM,OAAO,WAAW,QAAQ;CAChC,MAAM,WAAW,WAAW,YAAY;CACxC,MAAM,kBAAkB,WAAW,mBAAmB;CACtD,MAAM,kBAAkB,YAAY,CAAC;CACrC,MAAM,OAAO,WAAW;CACxB,MAAM,QAAQ,MAAM,SAAS,WAAW;CACxC,MAAM,cAAc,MAAM,eAAe,WAAW;CACpD,MAAM,cAAc,MAAM,eAAe,WAAW;CACpD,MAAM,UAAU,WAAW;CAC3B,MAAM,YAAY,WAAW;CAC7B,MAAM,gBAAgB,QAAQ,UAAU;CACxC,MAAM,YAAY,SAAS;CAC3B,MAAM,mBAA8B;EAClC,IAAI,CAAC,eAAe,OAAO;EAC3B,OAAO,oBAAC,OAAD;GAAK,GAAI,WAAW,OAAO,MAAM,YAAY,MAAM,cAAc,I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OAAO,YAAY,OAAO,cAAc,KAAK;OACjF,UAAA;MACc,CAAA,GAChB,mBAAmB,oBAACA,MAAU,OAAX;OAAiB,cAAW;OAAQ,GAAI,WAAW,OAAO,OAAO,YAAY,OAAO,cAAc,KAAK;OACvH,UAAA,oBAAC,GAAD,EAAG,MAAM,GAAK,CAAA;MACC,CAAA,CAChB;KACJ,CAAA,GAAA,eAAe,oBAACA,MAAU,aAAX;MAAuB,GAAI,WAAW,OAAO,aAAa,YAAY,aAAa;OACrG,kBAAkB;OAClB,GAAG,cAAc;MACnB,CAAC;MACQ,UAAA;KACoB,CAAA,CACzB,EAAA,CAAA,IAAI,eAAe,qBAAC,OAAD;MAAK,GAAI,OAAO,MAAM,OAAO,QAAQ;MAArC,UAAA,CACjB,oBAACA,MAAU,aAAX;OAAuB,GAAI,WAAW,CAAC,OAAO,aAAa,OAAO,qBAAqB,GAAG,YAAY,aAAa,cAAc,WAAW;OACzI,UAAA;MACoB,CAAA,GACtB,mBAAmB,oBAACA,MAAU,OAAX;OAAiB,cAAW;OAAQ,GAAI,WAAW,OAAO,OAAO,YAAY,OAAO,cAAc,KAAK;OACvH,UAAA,oBAAC,GAAD,EAAG,MAAM,GAAK,CAAA;MACC,CAAA,CAChB;KACR,CAAA,GAAA,cAAc,CACZ;IACF,CAAA,CAAA;;EACY,CAAA;CACL,CAAA;AACpB,CAAC;AACD,UAAU,cAAc"}
|
|
1
|
+
{"version":3,"file":"Toast.mjs","names":["clsx","BaseToast"],"sources":["../../src/Toast/Toast.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport clsx from 'clsx';\nimport { AlertTriangle, CheckCircle, Info, Loader2, X, XCircle } from 'lucide-react';\nimport { memo, type ReactNode } from 'react';\n\nimport Icon from '@/Icon';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { useToastContext } from './context';\nimport { toastClasses } from './stable';\nimport { actionVariantStyles, rootPositionStyles, styles } from './style';\nimport { type ToastOptions, type ToastProps, type ToastType } from './type';\n\nconst typeIcons: Record<ToastType, typeof Info> = {\n default: Info,\n error: XCircle,\n info: Info,\n loading: Loader2,\n success: CheckCircle,\n warning: AlertTriangle,\n};\n\nconst typeColors: Record<ToastType, string> = {\n default: cssVar.colorText,\n error: cssVar.colorError,\n info: cssVar.colorInfo,\n loading: cssVar.colorPrimary,\n success: cssVar.colorSuccess,\n warning: cssVar.colorWarning,\n};\n\nconst ToastItem = memo<ToastProps>(({ toast, classNames, styles: customStyles }) => {\n const { position, swipeDirection } = useToastContext();\n const toastData = toast.data as ToastOptions | undefined;\n const type = toastData?.type ?? 'default';\n const closable = toastData?.closable ?? true;\n const hideCloseButton = toastData?.hideCloseButton ?? false;\n const showCloseButton = closable && !hideCloseButton;\n const icon = toastData?.icon;\n const title = toast.title ?? toastData?.title;\n const description = toast.description ?? toastData?.description;\n const actionProps = toast.actionProps ?? toastData?.actionProps;\n const actions = toastData?.actions;\n\n const iconColor = typeColors[type];\n const IconComponent = icon ?? typeIcons[type];\n const isLoading = type === 'loading';\n\n const renderIcon = (): ReactNode => {\n if (!IconComponent) return null;\n return (\n <div\n {...styleProps(\n styles.icon,\n clsx(toastClasses('icon'), classNames?.icon),\n customStyles?.icon,\n )}\n >\n <Icon color={iconColor} icon={IconComponent} size={18} spin={isLoading} />\n </div>\n );\n };\n\n const renderActions = (): ReactNode => {\n if (actions && actions.length > 0) {\n return (\n <div\n {...styleProps(\n styles.actions,\n clsx(toastClasses('actions'), classNames?.actions),\n customStyles?.actions,\n )}\n >\n {actions.map((action, index) => (\n <BaseToast.Action\n key={index}\n {...styleProps(\n [styles.action, focusRing.info, actionVariantStyles[action.variant ?? 'primary']],\n clsx(toastClasses('action'), classNames?.action),\n customStyles?.action,\n )}\n onClick={action.onClick}\n {...action.props}\n >\n {action.label}\n </BaseToast.Action>\n ))}\n </div>\n );\n }\n if (actionProps) {\n return (\n <BaseToast.Action\n {...styleProps(\n [styles.action, focusRing.info, styles.actionPrimary],\n clsx(toastClasses('action'), classNames?.action),\n customStyles?.action,\n )}\n {...actionProps}\n />\n );\n }\n return null;\n };\n\n return (\n <BaseToast.Root\n swipeDirection={swipeDirection}\n toast={toast}\n {...toDataAttributes({ position, type })}\n {...styleProps(\n [styles.root, rootPositionStyles[position]],\n clsx(toastClasses(), classNames?.root),\n {\n ...customStyles?.root,\n ...toastData?.style,\n },\n )}\n >\n <BaseToast.Content\n {...styleProps(\n styles.content,\n clsx(toastClasses('content'), classNames?.content),\n customStyles?.content,\n )}\n >\n <div {...styleProps(styles.toastBody, toastClasses('body'))}>\n {renderIcon()}\n <div {...styleProps(styles.contentArea, toastClasses('main'))}>\n {title ? (\n <>\n <div {...styleProps(styles.titleRow, toastClasses('title-row'))}>\n <BaseToast.Title\n {...styleProps(\n styles.title,\n clsx(toastClasses('title'), classNames?.title),\n customStyles?.title,\n )}\n >\n {title}\n </BaseToast.Title>\n {showCloseButton && (\n <BaseToast.Close\n aria-label=\"Close\"\n {...styleProps(\n styles.close,\n clsx(toastClasses('close'), classNames?.close),\n customStyles?.close,\n )}\n >\n <X size={14} />\n </BaseToast.Close>\n )}\n </div>\n {description && (\n <BaseToast.Description\n {...styleProps(\n [styles.description, styles.descriptionWithTitle],\n clsx(toastClasses('description'), classNames?.description),\n customStyles?.description,\n )}\n >\n {description}\n </BaseToast.Description>\n )}\n </>\n ) : (\n description && (\n <div {...styleProps(styles.titleRow, toastClasses('title-row'))}>\n <BaseToast.Description\n {...styleProps(\n [styles.description, styles.descriptionStandalone],\n clsx(toastClasses('description'), classNames?.description),\n customStyles?.description,\n )}\n >\n {description}\n </BaseToast.Description>\n {showCloseButton && (\n <BaseToast.Close\n aria-label=\"Close\"\n {...styleProps(\n styles.close,\n clsx(toastClasses('close'), classNames?.close),\n customStyles?.close,\n )}\n >\n <X size={14} />\n </BaseToast.Close>\n )}\n </div>\n )\n )}\n {renderActions()}\n </div>\n </div>\n </BaseToast.Content>\n </BaseToast.Root>\n );\n});\n\nToastItem.displayName = 'ToastItem';\n\nexport default ToastItem;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,YAA4C;CAChD,SAAS;CACT,OAAO;CACP,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;AACX;AAEA,MAAM,aAAwC;CAC5C,SAAS,OAAO;CAChB,OAAO,OAAO;CACd,MAAM,OAAO;CACb,SAAS,OAAO;CAChB,SAAS,OAAO;CAChB,SAAS,OAAO;AAClB;AAEA,MAAM,YAAY,MAAkB,EAAE,OAAO,YAAY,QAAQ,mBAAmB;CAClF,MAAM,EAAE,UAAU,mBAAmB,gBAAgB;CACrD,MAAM,YAAY,MAAM;CACxB,MAAM,OAAO,WAAW,QAAQ;CAChC,MAAM,WAAW,WAAW,YAAY;CACxC,MAAM,kBAAkB,WAAW,mBAAmB;CACtD,MAAM,kBAAkB,YAAY,CAAC;CACrC,MAAM,OAAO,WAAW;CACxB,MAAM,QAAQ,MAAM,SAAS,WAAW;CACxC,MAAM,cAAc,MAAM,eAAe,WAAW;CACpD,MAAM,cAAc,MAAM,eAAe,WAAW;CACpD,MAAM,UAAU,WAAW;CAE3B,MAAM,YAAY,WAAW;CAC7B,MAAM,gBAAgB,QAAQ,UAAU;CACxC,MAAM,YAAY,SAAS;CAE3B,MAAM,mBAA8B;EAClC,IAAI,CAAC,eAAe,OAAO;EAC3B,OACE,oBAAC,OAAD;GACE,GAAI,WACF,OAAO,MACPA,OAAK,aAAa,MAAM,GAAG,YAAY,IAAI,GAC3C,cAAc,IAChB;GAEA,UAAA,oBAAC,MAAD;IAAM,OAAO;IAAW,MAAM;IAAe,MAAM;IAAI,MAAM;GAAY,CAAA;EACtE,CAAA;CAET;CAEA,MAAM,sBAAiC;EACrC,IAAI,WAAW,QAAQ,SAAS,GAC9B,OACE,oBAAC,OAAD;GACE,GAAI,WACF,OAAO,SACPA,O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OAAO,GAAG,YAAY,KAAK,GAC7C,cAAc,KAChB;OAEC,UAAA;MACc,CAAA,GAChB,mBACC,oBAACC,MAAU,OAAX;OACE,cAAW;OACX,GAAI,WACF,OAAO,OACPD,OAAK,aAAa,OAAO,GAAG,YAAY,KAAK,GAC7C,cAAc,KAChB;OAEA,UAAA,oBAAC,GAAD,EAAG,MAAM,GAAK,CAAA;MACC,CAAA,CAEhB;KACJ,CAAA,GAAA,eACC,oBAACC,MAAU,aAAX;MACE,GAAI,WACF,CAAC,OAAO,aAAa,OAAO,oBAAoB,GAChDD,OAAK,aAAa,aAAa,GAAG,YAAY,WAAW,GACzD,cAAc,WAChB;MAEC,UAAA;KACoB,CAAA,CAEzB,EAAA,CAAA,IAEF,eACE,qBAAC,OAAD;MAAK,GAAI,WAAW,OAAO,UAAU,aAAa,WAAW,CAAC;MAA9D,UAAA,CACE,oBAACC,MAAU,aAAX;OACE,GAAI,WACF,CAAC,OAAO,aAAa,OAAO,qBAAqB,GACjDD,OAAK,aAAa,aAAa,GAAG,YAAY,WAAW,GACzD,cAAc,WAChB;OAEC,UAAA;MACoB,CAAA,GACtB,mBACC,oBAACC,MAAU,OAAX;OACE,cAAW;OACX,GAAI,WACF,OAAO,OACPD,OAAK,aAAa,OAAO,GAAG,YAAY,KAAK,GAC7C,cAAc,KAChB;OAEA,UAAA,oBAAC,GAAD,EAAG,MAAM,GAAK,CAAA;MACC,CAAA,CAEhB;KAGR,CAAA,GAAA,cAAc,CACZ;IACF,CAAA,CAAA;;EACY,CAAA;CACL,CAAA;AAEpB,CAAC;AAED,UAAU,cAAc"}
|
package/es/Toast/imperative.mjs
CHANGED
|
@@ -6,8 +6,10 @@ import { acquireLayerZIndex } from "../internal/zIndex/manager.mjs";
|
|
|
6
6
|
import { ToastContext } from "./context.mjs";
|
|
7
7
|
import { isActiveToastHost, registerToastHost, subscribeToastHost } from "./hostGuard.mjs";
|
|
8
8
|
import { markToastHostNotReady, markToastHostReady, runWhenToastHostReady } from "./pendingQueue.mjs";
|
|
9
|
+
import { toastClasses } from "./stable.mjs";
|
|
9
10
|
import { styles, viewportPositionStyles } from "./style.mjs";
|
|
10
11
|
import ToastItem from "./Toast.mjs";
|
|
12
|
+
import clsx$1 from "clsx";
|
|
11
13
|
import { memo, useEffect, useId, useState, useSyncExternalStore } from "react";
|
|
12
14
|
import { jsx } from "react/jsx-runtime";
|
|
13
15
|
import { Toast } from "@base-ui/react/toast";
|
|
@@ -237,7 +239,8 @@ const ToastHost = memo(({ root, className, duration = 5e3, limit = 5, position =
|
|
|
237
239
|
children: /* @__PURE__ */ jsx(Toast.Portal, {
|
|
238
240
|
container,
|
|
239
241
|
children: /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
240
|
-
|
|
242
|
+
"data-position": pos,
|
|
243
|
+
...styleProps([styles.viewport, viewportPositionStyles[pos]], clsx$1(toastClasses("viewport"), className), viewportZIndex === void 0 ? void 0 : { zIndex: viewportZIndex }),
|
|
241
244
|
children: /* @__PURE__ */ jsx(ToastList, {})
|
|
242
245
|
})
|
|
243
246
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imperative.mjs","names":["BaseToast"],"sources":["../../src/Toast/imperative.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport { memo, useEffect, useId, useState, useSyncExternalStore } from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { acquireLayerZIndex } from '../internal/zIndex';\nimport { ToastContext } from './context';\nimport { isActiveToastHost, registerToastHost, subscribeToastHost } from './hostGuard';\nimport {\n __resetPendingToastQueueForTests,\n markToastHostNotReady,\n markToastHostReady,\n runWhenToastHostReady,\n} from './pendingQueue';\nimport { styles, viewportPositionStyles } from './style';\nimport ToastItem from './Toast';\nimport {\n type ToastAPI,\n type ToastInstance,\n type ToastOptions,\n type ToastPosition,\n type ToastPromiseOptions,\n type ToastType,\n} from './type';\n\n// All possible positions\nconst ALL_POSITIONS: ToastPosition[] = [\n 'top',\n 'top-left',\n 'top-right',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n];\n\n// Global state management\ninterface ToastState {\n duration: number;\n limit: number;\n position: ToastPosition;\n swipeDirection: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nlet globalState: ToastState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n};\n\n// Toast managers for each position\nconst toastManagers: Record<ToastPosition, ReturnType<typeof BaseToast.createToastManager>> = {\n 'bottom': BaseToast.createToastManager(),\n 'bottom-left': BaseToast.createToastManager(),\n 'bottom-right': BaseToast.createToastManager(),\n 'top': BaseToast.createToastManager(),\n 'top-left': BaseToast.createToastManager(),\n 'top-right': BaseToast.createToastManager(),\n};\n\ninterface ActiveToast {\n superseded: boolean;\n}\n\nconst activeToasts: Record<ToastPosition, Map<string, ActiveToast>> = {\n 'bottom': new Map(),\n 'bottom-left': new Map(),\n 'bottom-right': new Map(),\n 'top': new Map(),\n 'top-left': new Map(),\n 'top-right': new Map(),\n};\n\nconst getManager = (position: ToastPosition) => toastManagers[position];\n\nlet toastIdCounter = 0;\nconst generateToastId = (): string =>\n `toast-${Date.now().toString(36)}-${(toastIdCounter++).toString(36)}`;\n\nconst findActivePosition = (id: string) => ALL_POSITIONS.find((pos) => activeToasts[pos].has(id));\n\n// Base UI prepends every new toast, so the last entry we registered is the one\n// currently rendered at the front of the stack.\nconst isFrontMost = (position: ToastPosition, id: string) =>\n Array.from(activeToasts[position].keys()).at(-1) === id;\n\nconst normalizeOptions = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n type: ToastType,\n): ToastOptions => {\n if (typeof optionsOrMessage === 'string') {\n return {\n description: optionsOrMessage,\n type,\n };\n }\n return {\n ...optionsOrMessage,\n type,\n };\n};\n\nconst createToastInstance = (id: string, position: ToastPosition): ToastInstance => ({\n close: () => runWhenToastHostReady(() => getManager(position).close(id)),\n id,\n update: (options) => {\n runWhenToastHostReady(() =>\n getManager(position).update(id, {\n data: options,\n description: options.description,\n title: options.title,\n }),\n );\n },\n});\n\n// createToastManager() is a stateless emitter (see @base-ui/react/toast/createToastManager):\n// add/close/update just broadcast to whatever is currently subscribed, and the\n// ToastProvider that owns the real toast state only subscribes from a passive\n// useEffect. Calls made while no host is ready (e.g. mid-handoff between the\n// previously-active ToastHost unmounting and its successor's Provider\n// subscribing) would otherwise be silently dropped, so every manager call is\n// routed through runWhenToastHostReady to queue until a host is listening.\nconst addToast = (options: ToastOptions): ToastInstance => {\n const position = options.placement ?? globalState.position;\n const manager = getManager(position);\n const { id: dedupeId, onClose, onRemove } = options;\n\n if (dedupeId) {\n const prevPosition = findActivePosition(dedupeId);\n // Already the front-most toast: let Base UI upsert it in place so it only\n // refreshes its content and timer, without replaying the slide-in animation.\n const shouldPromote =\n prevPosition && !(prevPosition === position && isFrontMost(position, dedupeId));\n\n if (shouldPromote) {\n // Closing marks the toast as `ending`, which makes the following `add`\n // drop it and prepend a fresh one — Base UI's own upsert keeps the\n // original slot instead.\n activeToasts[prevPosition].get(dedupeId)!.superseded = true;\n activeToasts[prevPosition].delete(dedupeId);\n runWhenToastHostReady(() => getManager(prevPosition).close(dedupeId));\n }\n }\n\n const id = dedupeId ?? generateToastId();\n const active: ActiveToast = { superseded: false };\n activeToasts[position].set(id, active);\n runWhenToastHostReady(() => {\n manager.add({\n id,\n data: options,\n description: options.description,\n onClose: () => {\n if (active.superseded) return;\n onClose?.();\n },\n onRemove: () => {\n if (active.superseded) return;\n activeToasts[position].delete(id);\n onRemove?.();\n },\n timeout: options.duration ?? globalState.duration,\n title: options.title,\n });\n });\n return createToastInstance(id, position);\n};\n\nconst dismissToast = (id?: string) => {\n if (id) {\n // Try to close from all managers since we don't know which position the toast is in\n for (const [position, manager] of Object.entries(toastManagers)) {\n activeToasts[position as ToastPosition].delete(id);\n runWhenToastHostReady(() => manager.close(id));\n }\n } else {\n // Clear all toasts\n for (const [position, manager] of Object.entries(toastManagers)) {\n const ids = Array.from(activeToasts[position as ToastPosition].keys());\n activeToasts[position as ToastPosition].clear();\n runWhenToastHostReady(() => {\n for (const toastId of ids) {\n manager.close(toastId);\n }\n });\n }\n }\n};\n\nconst createSuccessToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'success'));\n};\n\nconst createErrorToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'error'));\n};\n\nconst createInfoToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'info'));\n};\n\nconst createWarningToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'warning'));\n};\n\nconst createLoadingToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n const options = normalizeOptions(optionsOrMessage, 'loading');\n // Loading toasts don't auto-dismiss by default\n return addToast({ duration: 0, ...options });\n};\n\nasync function promiseToast<T>(promise: Promise<T>, options: ToastPromiseOptions<T>): Promise<T> {\n const loadingOptions =\n typeof options.loading === 'string'\n ? { description: options.loading }\n : (options.loading as ToastOptions);\n\n const loadingToast = addToast({\n closable: false,\n duration: 0,\n type: 'loading',\n ...loadingOptions,\n });\n\n try {\n const result = await promise;\n\n loadingToast.close();\n\n const successOptions = (() => {\n if (typeof options.success === 'string') {\n return { description: options.success };\n }\n if (typeof options.success === 'function') {\n return { description: options.success(result) };\n }\n return options.success as ToastOptions;\n })();\n\n addToast({ type: 'success', ...successOptions });\n\n return result;\n } catch (error) {\n loadingToast.close();\n\n const errorOptions = (() => {\n if (typeof options.error === 'string') {\n return { description: options.error };\n }\n if (typeof options.error === 'function') {\n return { description: options.error(error as Error) };\n }\n return options.error as ToastOptions;\n })();\n\n addToast({ type: 'error', ...errorOptions });\n\n throw error;\n }\n}\n\n// Base toast function\nconst baseToast = (options: ToastOptions): ToastInstance => {\n return addToast({ type: 'default', ...options });\n};\n\n// Toast API\nexport const toast: ToastAPI = Object.assign(baseToast, {\n dismiss: dismissToast,\n error: createErrorToast,\n info: createInfoToast,\n loading: createLoadingToast,\n promise: promiseToast,\n success: createSuccessToast,\n warning: createWarningToast,\n});\n\n// Toast List Component\nconst ToastList = memo(() => {\n const { toasts } = BaseToast.useToastManager();\n return toasts.map((t) => <ToastItem key={t.id} toast={t} />);\n});\n\nToastList.displayName = 'ToastList';\n\nexport interface ToastHostProps {\n className?: string;\n /**\n * Default duration for toasts\n * @default 5000\n */\n duration?: number;\n /**\n * Maximum number of toasts\n * @default 5\n */\n limit?: number;\n /**\n * Toast position\n * @default 'bottom-right'\n */\n position?: ToastPosition;\n /**\n * Root element for portal\n */\n root?: HTMLElement | ShadowRoot | null;\n /**\n * Swipe direction to dismiss\n * @default ['down', 'right']\n */\n swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nexport const ToastHost = memo(\n ({\n root,\n className,\n duration = 5000,\n limit = 5,\n position = 'bottom-right',\n swipeDirection = ['down', 'right'],\n }: ToastHostProps) => {\n const isClient = useIsClient();\n const appElement = useAppElement();\n const [viewportZIndex, setViewportZIndex] = useState<number | undefined>(undefined);\n const hostId = useId();\n\n useEffect(() => registerToastHost(hostId), [hostId]);\n\n const isActive = useSyncExternalStore(\n subscribeToastHost,\n () => isActiveToastHost(hostId),\n () => false,\n );\n\n useEffect(() => {\n if (!isActive) return;\n globalState = {\n duration,\n limit,\n position,\n swipeDirection,\n };\n }, [duration, limit, position, swipeDirection, isActive]);\n\n useEffect(() => {\n if (!isActive) return;\n setViewportZIndex(acquireLayerZIndex('toast'));\n }, [isActive]);\n\n useEffect(() => {\n if (!isActive || !isClient) return undefined;\n // Runs after the six BaseToast.Provider children below have committed\n // and subscribed (child effects run before the parent's), so the\n // managers are guaranteed to have a live listener once this fires.\n markToastHostReady();\n return () => {\n markToastHostNotReady();\n };\n }, [isActive, isClient]);\n\n if (!isClient || !isActive) return null;\n\n const container = root ?? appElement ?? document.body;\n\n return ALL_POSITIONS.map((pos) => (\n <ToastContext key={pos} value={{ position: pos, swipeDirection }}>\n <BaseToast.Provider limit={limit} timeout={duration} toastManager={getManager(pos)}>\n <BaseToast.Portal container={container}>\n <BaseToast.Viewport\n {...styleProps([styles.viewport, viewportPositionStyles[pos]], className, {\n zIndex: viewportZIndex,\n })}\n >\n <ToastList />\n </BaseToast.Viewport>\n </BaseToast.Portal>\n </BaseToast.Provider>\n </ToastContext>\n ));\n },\n);\n\nToastHost.displayName = 'ToastHost';\n\n// Hook to use toast manager\nexport const useToast = () => toast;\n\nexport const __resetToastStateForTests = (): void => {\n globalState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n };\n for (const position of ALL_POSITIONS) {\n toastManagers[position] = BaseToast.createToastManager();\n activeToasts[position].clear();\n }\n __resetPendingToastQueueForTests();\n};\n"],"mappings":";;;;;;;;;;;;;;AA8BA,MAAM,gBAAiC;CACrC;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,IAAI,cAA0B;CAC5B,UAAU;CACV,OAAO;CACP,UAAU;CACV,gBAAgB,CAAC,QAAQ,OAAO;AAClC;AAGA,MAAM,gBAAwF;CAC5F,UAAUA,MAAU,mBAAmB;CACvC,eAAeA,MAAU,mBAAmB;CAC5C,gBAAgBA,MAAU,mBAAmB;CAC7C,OAAOA,MAAU,mBAAmB;CACpC,YAAYA,MAAU,mBAAmB;CACzC,aAAaA,MAAU,mBAAmB;AAC5C;AAMA,MAAM,eAAgE;CACpE,0BAAU,IAAI,IAAI;CAClB,+BAAe,IAAI,IAAI;CACvB,gCAAgB,IAAI,IAAI;CACxB,uBAAO,IAAI,IAAI;CACf,4BAAY,IAAI,IAAI;C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R,GAZK,GAYL,CACf;AACH,CACF;AAEA,UAAU,cAAc;AAGxB,MAAa,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"imperative.mjs","names":["BaseToast","clsx"],"sources":["../../src/Toast/imperative.tsx"],"sourcesContent":["'use client';\n\nimport { Toast as BaseToast } from '@base-ui/react/toast';\nimport clsx from 'clsx';\nimport { memo, useEffect, useId, useState, useSyncExternalStore } from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { acquireLayerZIndex } from '../internal/zIndex';\nimport { ToastContext } from './context';\nimport { isActiveToastHost, registerToastHost, subscribeToastHost } from './hostGuard';\nimport {\n __resetPendingToastQueueForTests,\n markToastHostNotReady,\n markToastHostReady,\n runWhenToastHostReady,\n} from './pendingQueue';\nimport { toastClasses } from './stable';\nimport { styles, viewportPositionStyles } from './style';\nimport ToastItem from './Toast';\nimport {\n type ToastAPI,\n type ToastInstance,\n type ToastOptions,\n type ToastPosition,\n type ToastPromiseOptions,\n type ToastType,\n} from './type';\n\n// All possible positions\nconst ALL_POSITIONS: ToastPosition[] = [\n 'top',\n 'top-left',\n 'top-right',\n 'bottom',\n 'bottom-left',\n 'bottom-right',\n];\n\n// Global state management\ninterface ToastState {\n duration: number;\n limit: number;\n position: ToastPosition;\n swipeDirection: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nlet globalState: ToastState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n};\n\n// Toast managers for each position\nconst toastManagers: Record<ToastPosition, ReturnType<typeof BaseToast.createToastManager>> = {\n 'bottom': BaseToast.createToastManager(),\n 'bottom-left': BaseToast.createToastManager(),\n 'bottom-right': BaseToast.createToastManager(),\n 'top': BaseToast.createToastManager(),\n 'top-left': BaseToast.createToastManager(),\n 'top-right': BaseToast.createToastManager(),\n};\n\ninterface ActiveToast {\n superseded: boolean;\n}\n\nconst activeToasts: Record<ToastPosition, Map<string, ActiveToast>> = {\n 'bottom': new Map(),\n 'bottom-left': new Map(),\n 'bottom-right': new Map(),\n 'top': new Map(),\n 'top-left': new Map(),\n 'top-right': new Map(),\n};\n\nconst getManager = (position: ToastPosition) => toastManagers[position];\n\nlet toastIdCounter = 0;\nconst generateToastId = (): string =>\n `toast-${Date.now().toString(36)}-${(toastIdCounter++).toString(36)}`;\n\nconst findActivePosition = (id: string) => ALL_POSITIONS.find((pos) => activeToasts[pos].has(id));\n\n// Base UI prepends every new toast, so the last entry we registered is the one\n// currently rendered at the front of the stack.\nconst isFrontMost = (position: ToastPosition, id: string) =>\n Array.from(activeToasts[position].keys()).at(-1) === id;\n\nconst normalizeOptions = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n type: ToastType,\n): ToastOptions => {\n if (typeof optionsOrMessage === 'string') {\n return {\n description: optionsOrMessage,\n type,\n };\n }\n return {\n ...optionsOrMessage,\n type,\n };\n};\n\nconst createToastInstance = (id: string, position: ToastPosition): ToastInstance => ({\n close: () => runWhenToastHostReady(() => getManager(position).close(id)),\n id,\n update: (options) => {\n runWhenToastHostReady(() =>\n getManager(position).update(id, {\n data: options,\n description: options.description,\n title: options.title,\n }),\n );\n },\n});\n\n// createToastManager() is a stateless emitter (see @base-ui/react/toast/createToastManager):\n// add/close/update just broadcast to whatever is currently subscribed, and the\n// ToastProvider that owns the real toast state only subscribes from a passive\n// useEffect. Calls made while no host is ready (e.g. mid-handoff between the\n// previously-active ToastHost unmounting and its successor's Provider\n// subscribing) would otherwise be silently dropped, so every manager call is\n// routed through runWhenToastHostReady to queue until a host is listening.\nconst addToast = (options: ToastOptions): ToastInstance => {\n const position = options.placement ?? globalState.position;\n const manager = getManager(position);\n const { id: dedupeId, onClose, onRemove } = options;\n\n if (dedupeId) {\n const prevPosition = findActivePosition(dedupeId);\n // Already the front-most toast: let Base UI upsert it in place so it only\n // refreshes its content and timer, without replaying the slide-in animation.\n const shouldPromote =\n prevPosition && !(prevPosition === position && isFrontMost(position, dedupeId));\n\n if (shouldPromote) {\n // Closing marks the toast as `ending`, which makes the following `add`\n // drop it and prepend a fresh one — Base UI's own upsert keeps the\n // original slot instead.\n activeToasts[prevPosition].get(dedupeId)!.superseded = true;\n activeToasts[prevPosition].delete(dedupeId);\n runWhenToastHostReady(() => getManager(prevPosition).close(dedupeId));\n }\n }\n\n const id = dedupeId ?? generateToastId();\n const active: ActiveToast = { superseded: false };\n activeToasts[position].set(id, active);\n runWhenToastHostReady(() => {\n manager.add({\n id,\n data: options,\n description: options.description,\n onClose: () => {\n if (active.superseded) return;\n onClose?.();\n },\n onRemove: () => {\n if (active.superseded) return;\n activeToasts[position].delete(id);\n onRemove?.();\n },\n timeout: options.duration ?? globalState.duration,\n title: options.title,\n });\n });\n return createToastInstance(id, position);\n};\n\nconst dismissToast = (id?: string) => {\n if (id) {\n // Try to close from all managers since we don't know which position the toast is in\n for (const [position, manager] of Object.entries(toastManagers)) {\n activeToasts[position as ToastPosition].delete(id);\n runWhenToastHostReady(() => manager.close(id));\n }\n } else {\n // Clear all toasts\n for (const [position, manager] of Object.entries(toastManagers)) {\n const ids = Array.from(activeToasts[position as ToastPosition].keys());\n activeToasts[position as ToastPosition].clear();\n runWhenToastHostReady(() => {\n for (const toastId of ids) {\n manager.close(toastId);\n }\n });\n }\n }\n};\n\nconst createSuccessToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'success'));\n};\n\nconst createErrorToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'error'));\n};\n\nconst createInfoToast = (optionsOrMessage: Omit<ToastOptions, 'type'> | string): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'info'));\n};\n\nconst createWarningToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n return addToast(normalizeOptions(optionsOrMessage, 'warning'));\n};\n\nconst createLoadingToast = (\n optionsOrMessage: Omit<ToastOptions, 'type'> | string,\n): ToastInstance => {\n const options = normalizeOptions(optionsOrMessage, 'loading');\n // Loading toasts don't auto-dismiss by default\n return addToast({ duration: 0, ...options });\n};\n\nasync function promiseToast<T>(promise: Promise<T>, options: ToastPromiseOptions<T>): Promise<T> {\n const loadingOptions =\n typeof options.loading === 'string'\n ? { description: options.loading }\n : (options.loading as ToastOptions);\n\n const loadingToast = addToast({\n closable: false,\n duration: 0,\n type: 'loading',\n ...loadingOptions,\n });\n\n try {\n const result = await promise;\n\n loadingToast.close();\n\n const successOptions = (() => {\n if (typeof options.success === 'string') {\n return { description: options.success };\n }\n if (typeof options.success === 'function') {\n return { description: options.success(result) };\n }\n return options.success as ToastOptions;\n })();\n\n addToast({ type: 'success', ...successOptions });\n\n return result;\n } catch (error) {\n loadingToast.close();\n\n const errorOptions = (() => {\n if (typeof options.error === 'string') {\n return { description: options.error };\n }\n if (typeof options.error === 'function') {\n return { description: options.error(error as Error) };\n }\n return options.error as ToastOptions;\n })();\n\n addToast({ type: 'error', ...errorOptions });\n\n throw error;\n }\n}\n\n// Base toast function\nconst baseToast = (options: ToastOptions): ToastInstance => {\n return addToast({ type: 'default', ...options });\n};\n\n// Toast API\nexport const toast: ToastAPI = Object.assign(baseToast, {\n dismiss: dismissToast,\n error: createErrorToast,\n info: createInfoToast,\n loading: createLoadingToast,\n promise: promiseToast,\n success: createSuccessToast,\n warning: createWarningToast,\n});\n\n// Toast List Component\nconst ToastList = memo(() => {\n const { toasts } = BaseToast.useToastManager();\n return toasts.map((t) => <ToastItem key={t.id} toast={t} />);\n});\n\nToastList.displayName = 'ToastList';\n\nexport interface ToastHostProps {\n className?: string;\n /**\n * Default duration for toasts\n * @default 5000\n */\n duration?: number;\n /**\n * Maximum number of toasts\n * @default 5\n */\n limit?: number;\n /**\n * Toast position\n * @default 'bottom-right'\n */\n position?: ToastPosition;\n /**\n * Root element for portal\n */\n root?: HTMLElement | ShadowRoot | null;\n /**\n * Swipe direction to dismiss\n * @default ['down', 'right']\n */\n swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];\n}\n\nexport const ToastHost = memo(\n ({\n root,\n className,\n duration = 5000,\n limit = 5,\n position = 'bottom-right',\n swipeDirection = ['down', 'right'],\n }: ToastHostProps) => {\n const isClient = useIsClient();\n const appElement = useAppElement();\n const [viewportZIndex, setViewportZIndex] = useState<number | undefined>(undefined);\n const hostId = useId();\n\n useEffect(() => registerToastHost(hostId), [hostId]);\n\n const isActive = useSyncExternalStore(\n subscribeToastHost,\n () => isActiveToastHost(hostId),\n () => false,\n );\n\n useEffect(() => {\n if (!isActive) return;\n globalState = {\n duration,\n limit,\n position,\n swipeDirection,\n };\n }, [duration, limit, position, swipeDirection, isActive]);\n\n useEffect(() => {\n if (!isActive) return;\n setViewportZIndex(acquireLayerZIndex('toast'));\n }, [isActive]);\n\n useEffect(() => {\n if (!isActive || !isClient) return undefined;\n // Runs after the six BaseToast.Provider children below have committed\n // and subscribed (child effects run before the parent's), so the\n // managers are guaranteed to have a live listener once this fires.\n markToastHostReady();\n return () => {\n markToastHostNotReady();\n };\n }, [isActive, isClient]);\n\n if (!isClient || !isActive) return null;\n\n const container = root ?? appElement ?? document.body;\n\n return ALL_POSITIONS.map((pos) => (\n <ToastContext key={pos} value={{ position: pos, swipeDirection }}>\n <BaseToast.Provider limit={limit} timeout={duration} toastManager={getManager(pos)}>\n <BaseToast.Portal container={container}>\n <BaseToast.Viewport\n data-position={pos}\n {...styleProps(\n [styles.viewport, viewportPositionStyles[pos]],\n clsx(toastClasses('viewport'), className),\n viewportZIndex === undefined ? undefined : { zIndex: viewportZIndex },\n )}\n >\n <ToastList />\n </BaseToast.Viewport>\n </BaseToast.Portal>\n </BaseToast.Provider>\n </ToastContext>\n ));\n },\n);\n\nToastHost.displayName = 'ToastHost';\n\n// Hook to use toast manager\nexport const useToast = () => toast;\n\nexport const __resetToastStateForTests = (): void => {\n globalState = {\n duration: 5000,\n limit: 5,\n position: 'bottom-right',\n swipeDirection: ['down', 'right'],\n };\n for (const position of ALL_POSITIONS) {\n toastManagers[position] = BaseToast.createToastManager();\n activeToasts[position].clear();\n }\n __resetPendingToastQueueForTests();\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,MAAM,gBAAiC;CACrC;CACA;CACA;CACA;CACA;CACA;AACF;AAUA,IAAI,cAA0B;CAC5B,UAAU;CACV,OAAO;CACP,UAAU;CACV,gBAAgB,CAAC,QAAQ,OAAO;AAClC;AAGA,MAAM,gBAAwF;CAC5F,UAAUA,MAAU,mBAAmB;CACvC,eAAeA,MAAU,mBAAmB;CAC5C,gBAAgBA,MAAU,mBAAmB;CAC7C,OAAOA,MAAU,mBAAmB;CACpC,YAAYA,MAAU,mBAAmB;CACzC,aAAaA,MAAU,mBAAmB;AAC5C;AAMA,MAAM,eAAgE;CACpE,0BAAU,IAAI,IAAI;CAClB,+BAAe,IAAI,IAAI;CACvB,gCAAgB,IAAI,IAAI;CACxB,uBAAO,IAAI,IAAI;CACf,4BAAY,IAAI,IAAI;CACpB,6BAAa,IAAI,IAAI;AACvB;AAEA,MAAM,cAAc,aAA4B,cAAc;AAE9D,IAAI,iBAAiB;AACrB,MAAM,wBACJ,SAAS,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,iBAAA,CAAkB,SAAS,EAAE;AAEpE,MAAM,sBAAsB,OAAe,cAAc,MAAM,QAAQ,aAAa,IAAI,CAAC,IAAI,EAAE,CAAC;AAIhG,MAAM,eAAe,UAAyB,OAC5C,MAAM,KAAK,aAAa,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM;AAEvD,MAAM,oBACJ,kBACA,SACiB;CACjB,IAAI,OAAO,qBAAqB,UAC9B,OAAO;EACL,aAAa;EACb;CACF;CAEF,OAAO;EACL,GAAG;EACH;CACF;AACF;AAEA,MAAM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AC;CAExD,gBAAgB;EACd,IAAI,CAAC,UAAU;EACf,kBAAkB,mBAAmB,OAAO,CAAC;CAC/C,GAAG,CAAC,QAAQ,CAAC;CAEb,gBAAgB;EACd,IAAI,CAAC,YAAY,CAAC,UAAU,OAAO,KAAA;EAInC,mBAAmB;EACnB,aAAa;GACX,sBAAsB;EACxB;CACF,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,IAAI,CAAC,YAAY,CAAC,UAAU,OAAO;CAEnC,MAAM,YAAY,QAAQ,cAAc,SAAS;CAEjD,OAAO,cAAc,KAAK,QACxB,oBAAC,cAAD;EAAwB,OAAO;GAAE,UAAU;GAAK;EAAe;EAC7D,UAAA,oBAACA,MAAU,UAAX;GAA2B;GAAO,SAAS;GAAU,cAAc,WAAW,GAAG;GAC/E,UAAA,oBAACA,MAAU,QAAX;IAA6B;IAC3B,UAAA,oBAACA,MAAU,UAAX;KACE,iBAAe;KACf,GAAI,WACF,CAAC,OAAO,UAAU,uBAAuB,IAAI,GAC7CC,OAAK,aAAa,UAAU,GAAG,SAAS,GACxC,mBAAmB,KAAA,IAAY,KAAA,IAAY,EAAE,QAAQ,eAAe,CACtE;KAEA,UAAA,oBAAC,WAAD,CAAY,CAAA;IACM,CAAA;GACJ,CAAA;EACA,CAAA;CACR,GAfK,GAeL,CACf;AACH,CACF;AAEA,UAAU,cAAc;AAGxB,MAAa,iBAAiB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { stableClasses } from "../utils/bem.mjs";
|
|
2
|
+
//#region src/Toast/stable.ts
|
|
3
|
+
const toastClasses = stableClasses({
|
|
4
|
+
block: "toast",
|
|
5
|
+
dataAttributes: ["type", "position"],
|
|
6
|
+
elements: [
|
|
7
|
+
"viewport",
|
|
8
|
+
"content",
|
|
9
|
+
"body",
|
|
10
|
+
"icon",
|
|
11
|
+
"main",
|
|
12
|
+
"title-row",
|
|
13
|
+
"title",
|
|
14
|
+
"close",
|
|
15
|
+
"description",
|
|
16
|
+
"actions",
|
|
17
|
+
"action"
|
|
18
|
+
]
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { toastClasses };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=stable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stable.mjs","names":[],"sources":["../../src/Toast/stable.ts"],"sourcesContent":["import { stableClasses } from '@/utils/bem';\n\nexport const toastClasses = stableClasses({\n block: 'toast',\n dataAttributes: ['type', 'position'],\n elements: [\n 'viewport',\n 'content',\n 'body',\n 'icon',\n 'main',\n 'title-row',\n 'title',\n 'close',\n 'description',\n 'actions',\n 'action',\n ],\n});\n"],"mappings":";;AAEA,MAAa,eAAe,cAAc;CACxC,OAAO;CACP,gBAAgB,CAAC,QAAQ,UAAU;CACnC,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC"}
|