@lobehub/ui 6.10.1 → 6.11.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/Accordion/Accordion.mjs +1 -1
- package/es/Accordion/atoms.mjs +2 -2
- package/es/Accordion/index.d.mts +2 -2
- package/es/Accordion/index.mjs +1 -1
- package/es/Accordion/style.d.mts +9 -9
- package/es/Accordion/style.mjs +26 -1
- package/es/Accordion/style.mjs.map +1 -1
- package/es/ActionIcon/ActionIcon.mjs +2 -2
- package/es/ActionIcon/index.d.mts +1 -1
- package/es/ActionIcon/index.mjs +1 -1
- package/es/ActionIcon/style.d.mts +13 -40
- package/es/ActionIcon/style.mjs +12 -2
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/ActionIconGroup/ActionIconGroup.mjs +4 -4
- package/es/ActionIconGroup/index.d.mts +1 -1
- package/es/ActionIconGroup/type.d.mts +4 -4
- package/es/AgentAvatar/AgentAvatar.mjs +1 -1
- package/es/AgentAvatar/index.d.mts +1 -1
- package/es/AgentAvatar/index.mjs +1 -1
- package/es/AgentAvatar/utils.mjs +1 -1
- package/es/Alert/Alert.mjs +2 -2
- package/es/Alert/index.d.mts +1 -1
- package/es/Alert/index.mjs +1 -1
- package/es/Alert/style.d.mts +36 -232
- package/es/Alert/style.mjs +35 -2
- package/es/Alert/style.mjs.map +1 -1
- package/es/Anchor/Anchor.mjs +2 -2
- package/es/Anchor/index.d.mts +1 -1
- package/es/AutoComplete/AutoComplete.mjs +3 -3
- package/es/AutoComplete/index.d.mts +1 -1
- package/es/AutoComplete/index.mjs +1 -1
- package/es/Avatar/Avatar.mjs +5 -5
- package/es/Avatar/AvatarGroup/index.mjs +3 -3
- package/es/Avatar/index.d.mts +1 -1
- package/es/Badge/Badge.mjs +1 -1
- package/es/Badge/index.d.mts +1 -1
- package/es/Block/Block.mjs +2 -2
- package/es/Block/index.d.mts +1 -1
- package/es/Breadcrumb/Breadcrumb.mjs +1 -1
- package/es/Breadcrumb/index.d.mts +1 -1
- package/es/Burger/Burger.mjs +2 -2
- package/es/Burger/index.d.mts +1 -1
- package/es/Button/Button.mjs +3 -3
- package/es/Button/SplitButton.mjs +3 -3
- package/es/Button/index.d.mts +1 -1
- package/es/Button/index.mjs +1 -1
- package/es/Button/style.d.mts +37 -204
- package/es/Button/style.mjs +36 -2
- package/es/Button/style.mjs.map +1 -1
- package/es/Carousel/Carousel.mjs +2 -2
- package/es/Carousel/index.d.mts +1 -1
- package/es/Checkbox/Checkbox.mjs +2 -2
- package/es/Checkbox/CheckboxGroup.mjs +2 -2
- package/es/Checkbox/index.d.mts +1 -1
- package/es/Checkbox/index.mjs +1 -1
- package/es/Checkbox/style.d.mts +13 -58
- package/es/Checkbox/style.mjs +12 -2
- package/es/Checkbox/style.mjs.map +1 -1
- package/es/Checkbox/type.d.mts +2 -2
- package/es/CodeDiff/DiffPanel.mjs +4 -4
- package/es/CodeDiff/index.d.mts +1 -1
- package/es/CodeDiff/theme.mjs +1 -1
- package/es/CodeEditor/CodeEditor.mjs +3 -3
- package/es/CodeEditor/index.d.mts +1 -1
- package/es/Collapsible/Collapsible.mjs +1 -1
- package/es/Collapsible/index.d.mts +1 -1
- package/es/ColorPicker/ColorInputs.mjs +1 -1
- package/es/ColorPicker/ColorPanel.mjs +4 -4
- package/es/ColorPicker/ColorPicker.mjs +4 -4
- package/es/ColorPicker/Swatches.mjs +1 -1
- package/es/ColorPicker/Trigger.mjs +4 -4
- package/es/ColorPicker/index.d.mts +1 -1
- package/es/ColorSwatches/ColorSwatches.mjs +7 -7
- package/es/ColorSwatches/CustomPicker.mjs +2 -2
- package/es/ColorSwatches/index.d.mts +1 -1
- package/es/ContextMenu/ContextMenuHost.mjs +8 -9
- package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
- package/es/ContextMenu/index.d.mts +2 -2
- package/es/ContextMenu/renderItems.mjs +20 -21
- package/es/ContextMenu/renderItems.mjs.map +1 -1
- package/es/ContextMenu/store.d.mts +3 -3
- package/es/CopyButton/index.d.mts +1 -1
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs +2 -2
- 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/Icon.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +1 -1
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +1 -1
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/DateTimePanel/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs +1 -1
- package/es/DatePicker/core/PickerPanel/index.mjs +5 -5
- package/es/DatePicker/core/PickerPopup.mjs +1 -1
- package/es/DatePicker/core/hooks/useTimeInfo.mjs +1 -1
- package/es/DatePicker/index.d.mts +1 -1
- package/es/DatePicker/index.mjs +2 -2
- package/es/DatePicker/legacyDate.mjs +1 -1
- package/es/DatePicker/locale.d.mts +1 -1
- package/es/DatePicker/locale.mjs +1 -1
- package/es/DatePicker/type.d.mts +2 -2
- package/es/DatePicker/usePickerShared.mjs +4 -4
- package/es/Descriptions/Descriptions.mjs +1 -1
- package/es/Descriptions/index.d.mts +1 -1
- package/es/Divider/Divider.mjs +1 -1
- package/es/Divider/index.d.mts +1 -1
- package/es/DownloadButton/index.d.mts +1 -1
- package/es/DraggablePanel/DraggablePanel.mjs +1 -1
- package/es/DraggablePanel/atoms.mjs +4 -4
- package/es/DraggablePanel/index.d.mts +1 -1
- package/es/DraggablePanel/index.mjs +1 -1
- package/es/DraggableSideNav/DraggableSideNav.mjs +4 -4
- package/es/DraggableSideNav/index.d.mts +1 -1
- package/es/Drawer/Drawer.mjs +3 -3
- package/es/Drawer/atoms.mjs +3 -3
- package/es/Drawer/index.d.mts +1 -1
- package/es/Drawer/index.mjs +2 -2
- package/es/DropdownMenu/DropdownMenu.mjs +2 -2
- package/es/DropdownMenu/atoms.d.mts +2 -2
- package/es/DropdownMenu/atoms.mjs +4 -4
- package/es/DropdownMenu/index.d.mts +2 -2
- package/es/DropdownMenu/index.mjs +1 -1
- package/es/DropdownMenu/renderItems.mjs +2 -2
- package/es/DropdownMenu/sharedStyle.d.mts +2 -3
- package/es/DropdownMenu/style.d.mts +24 -168
- package/es/DropdownMenu/style.mjs +24 -1
- package/es/DropdownMenu/style.mjs.map +1 -1
- package/es/DropdownMenu/type.d.mts +4 -4
- package/es/EditableText/ControlInput.mjs +1 -1
- package/es/EditableText/EditableText.mjs +4 -4
- package/es/EditableText/index.d.mts +1 -1
- package/es/EditableText/type.d.mts +1 -1
- package/es/EditorSlashMenu/EditorSlashMenu.mjs +1 -1
- package/es/EditorSlashMenu/index.d.mts +1 -1
- package/es/EmojiPicker/AvatarUploader.mjs +6 -6
- package/es/EmojiPicker/EmojiPicker.mjs +9 -9
- package/es/EmojiPicker/index.d.mts +1 -1
- package/es/EmojiPicker/type.d.mts +2 -2
- package/es/Empty/Empty.mjs +4 -4
- package/es/Empty/index.d.mts +1 -1
- package/es/Empty/type.d.mts +3 -3
- package/es/FileTypeIcon/FileTypeIcon.mjs +3 -3
- package/es/FileTypeIcon/components/FileIcon.mjs +1 -1
- package/es/FileTypeIcon/components/FolderIcon.mjs +1 -1
- package/es/FileTypeIcon/index.d.mts +1 -1
- package/es/Flex/index.d.mts +1 -1
- package/es/Flex/index.mjs +1 -1
- package/es/FloatingPanel/FloatingPanel.mjs +1 -1
- package/es/FloatingPanel/index.d.mts +1 -1
- package/es/FloatingSheet/FloatingSheet.mjs +3 -3
- package/es/FloatingSheet/index.d.mts +1 -1
- package/es/FluentEmoji/FluentEmoji.mjs +1 -1
- package/es/FluentEmoji/index.d.mts +1 -1
- package/es/FluentEmoji/type.d.mts +1 -1
- package/es/FocusScope/index.mjs +1 -1
- package/es/FocusScope/useScopeArrowNav.mjs +1 -1
- package/es/FocusScope/useScopeSwitcher.mjs +1 -1
- package/es/Form/Form.mjs +5 -5
- package/es/Form/components/FormField.mjs +1 -1
- package/es/Form/components/FormFlatGroup.mjs +1 -1
- package/es/Form/components/FormFooter.mjs +1 -1
- package/es/Form/components/FormGroup.mjs +3 -3
- package/es/Form/components/FormSubmitFooter.mjs +6 -6
- package/es/Form/components/FormTitle.mjs +1 -1
- package/es/Form/index.mjs +2 -2
- package/es/Form/type.d.mts +3 -3
- package/es/FormKit/Field.mjs +4 -4
- package/es/FormKit/Form.mjs +5 -5
- package/es/FormKit/List.mjs +3 -3
- package/es/FormKit/SubmitFooter.mjs +1 -1
- package/es/FormKit/index.d.mts +2 -2
- package/es/FormKit/index.mjs +2 -2
- package/es/FormKit/stable.mjs +1 -1
- package/es/Freeze/index.d.mts +1 -1
- package/es/Grid/Grid.mjs +1 -1
- package/es/Grid/index.d.mts +1 -1
- package/es/GroupAvatar/GroupAvatar.mjs +1 -1
- package/es/GroupAvatar/index.d.mts +1 -1
- package/es/GuideCard/GuideCard.mjs +4 -4
- package/es/GuideCard/index.d.mts +1 -1
- package/es/GuideCard/type.d.mts +2 -2
- package/es/Header/Header.mjs +1 -1
- package/es/Header/index.d.mts +1 -1
- package/es/Highlighter/FullFeatured.mjs +7 -7
- package/es/Highlighter/Highlighter.mjs +6 -6
- package/es/Highlighter/LangSelect.mjs +2 -2
- package/es/Highlighter/SyntaxHighlighter/StaticRenderer.mjs +1 -1
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs +1 -1
- package/es/Highlighter/SyntaxHighlighter/index.mjs +1 -1
- package/es/Highlighter/index.d.mts +1 -1
- package/es/Highlighter/index.mjs +1 -1
- package/es/Highlighter/type.d.mts +2 -2
- package/es/Hotkey/Hotkey.mjs +5 -5
- package/es/Hotkey/index.d.mts +1 -1
- package/es/Hotkey/index.mjs +1 -1
- package/es/HotkeyInput/HotkeyInput.mjs +7 -7
- package/es/HotkeyInput/index.d.mts +1 -1
- package/es/HtmlPreview/HtmlPreview.mjs +9 -9
- package/es/HtmlPreview/Iframe.mjs +3 -3
- package/es/HtmlPreview/index.d.mts +1 -1
- package/es/HtmlPreview/index.mjs +2 -2
- package/es/HtmlPreview/type.d.mts +2 -2
- package/es/Icon/Icon.mjs +1 -1
- package/es/Icon/index.d.mts +1 -1
- package/es/Image/Image.mjs +4 -4
- package/es/Image/index.d.mts +1 -1
- package/es/Image/index.mjs +1 -1
- package/es/Image/useImagePreview.mjs +1 -1
- package/es/Image/viewer/GalleryNav.mjs +3 -3
- package/es/Image/viewer/ImageViewer.mjs +4 -3
- package/es/Image/viewer/ImageViewer.mjs.map +1 -1
- package/es/Image/viewer/PreviewOutlet.mjs +1 -1
- package/es/Image/viewer/Toolbar.mjs +8 -8
- package/es/Image/viewer/ViewerChrome.mjs +1 -1
- package/es/Image/viewer/geometry.mjs +2 -2
- package/es/Image/viewer/geometry.mjs.map +1 -1
- package/es/Image/viewer/registry.mjs.map +1 -1
- package/es/Image/viewer/useZoomPan.mjs +5 -2
- package/es/Image/viewer/useZoomPan.mjs.map +1 -1
- package/es/ImageSelect/ImageSelect.mjs +3 -3
- package/es/ImageSelect/index.d.mts +1 -1
- package/es/Input/ClearButton.mjs +2 -2
- package/es/Input/Input.mjs +4 -4
- package/es/Input/InputNumber.mjs +3 -3
- package/es/Input/InputOTP.mjs +2 -2
- package/es/Input/InputPassword.mjs +3 -3
- package/es/Input/TextArea.mjs +3 -3
- package/es/Input/index.d.mts +1 -1
- package/es/Input/index.mjs +1 -1
- package/es/Input/style.mjs +1 -1
- package/es/Layout/Layout.mjs +3 -3
- package/es/Layout/index.d.mts +1 -1
- package/es/List/List.d.mts +1 -1
- package/es/List/List.mjs +2 -2
- package/es/List/ListRow.mjs +3 -3
- package/es/List/index.d.mts +1 -1
- package/es/Markdown/Markdown.mjs +2 -2
- package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs +1 -1
- package/es/Markdown/components/Footnotes.mjs +1 -1
- package/es/Markdown/components/MarkdownTable/index.mjs +1 -1
- package/es/Markdown/components/SearchResultCards/SearchResultCard.mjs +1 -1
- package/es/Markdown/components/SearchResultCards/index.mjs +1 -1
- package/es/Markdown/index.d.mts +1 -1
- package/es/Markdown/index.mjs +1 -1
- package/es/Markdown/type.d.mts +5 -5
- package/es/MaskShadow/MaskShadow.mjs +2 -2
- package/es/MaskShadow/index.d.mts +1 -1
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.mjs +1 -1
- package/es/MaterialFileTypeIcon/index.d.mts +1 -1
- package/es/Mermaid/FullFeatured.mjs +6 -6
- package/es/Mermaid/Mermaid.mjs +5 -5
- package/es/Mermaid/SyntaxMermaid/MermaidSvg.mjs +4 -3
- package/es/Mermaid/SyntaxMermaid/MermaidSvg.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/StaticMermaid.mjs +3 -3
- package/es/Mermaid/SyntaxMermaid/StreamMermaid.mjs +3 -3
- package/es/Mermaid/SyntaxMermaid/index.mjs +2 -2
- package/es/Mermaid/index.d.mts +2 -2
- package/es/Mermaid/index.mjs +1 -1
- package/es/Mermaid/type.d.mts +2 -2
- package/es/Modal/Modal.mjs +4 -4
- package/es/Modal/atoms.mjs +3 -3
- package/es/Modal/imperative.mjs +2 -2
- package/es/Modal/index.d.mts +1 -1
- package/es/Modal/index.mjs +1 -1
- package/es/Pagination/Pagination.mjs +3 -3
- package/es/Pagination/index.d.mts +1 -1
- package/es/Popover/PopoverGroup.mjs +3 -3
- package/es/Popover/PopoverInGroup.mjs +1 -1
- package/es/Popover/PopoverStandalone.mjs +3 -3
- package/es/Popover/atoms.mjs +3 -3
- package/es/Popover/index.d.mts +2 -2
- package/es/Popover/index.mjs +1 -1
- package/es/ProTable/ProTable.d.mts +1 -1
- package/es/ProTable/ProTable.mjs +3 -3
- package/es/ProTable/hooks/useProColumns.mjs +2 -2
- package/es/ProTable/index.d.mts +1 -1
- package/es/ProTable/parts/ColumnSetting.mjs +1 -1
- package/es/ProTable/parts/FieldControl.mjs +6 -6
- package/es/ProTable/parts/LightFilter.mjs +1 -1
- package/es/ProTable/parts/SearchForm.mjs +2 -2
- package/es/ProTable/parts/TableAlert.mjs +1 -1
- package/es/ProTable/parts/Toolbar.mjs +1 -1
- package/es/ProTable/parts/renderValue.mjs +1 -1
- package/es/ProTable/type.d.mts +2 -2
- package/es/Progress/Progress.mjs +3 -3
- package/es/Progress/index.d.mts +1 -1
- package/es/ProgressiveBlur/ProgressiveBlur.mjs +1 -1
- package/es/ProgressiveBlur/index.d.mts +1 -1
- package/es/QRCode/QRCode.mjs +5 -5
- package/es/QRCode/index.d.mts +1 -1
- package/es/Radio/Radio.mjs +1 -1
- package/es/Radio/RadioGroup.mjs +2 -2
- package/es/Radio/index.d.mts +1 -1
- package/es/Radio/index.mjs +1 -1
- package/es/Radio/style.d.mts +10 -52
- package/es/Radio/style.mjs +9 -2
- package/es/Radio/style.mjs.map +1 -1
- package/es/Radio/type.d.mts +2 -2
- package/es/Rate/Rate.mjs +2 -2
- package/es/Rate/index.d.mts +1 -1
- package/es/Result/Result.mjs +1 -1
- package/es/Result/index.d.mts +1 -1
- package/es/ScrollArea/atoms.mjs +1 -1
- package/es/ScrollArea/index.d.mts +1 -1
- package/es/ScrollShadow/ScrollShadow.mjs +2 -2
- package/es/ScrollShadow/index.d.mts +1 -1
- package/es/SearchBar/SearchBar.mjs +6 -6
- package/es/SearchBar/index.d.mts +1 -1
- package/es/Segmented/Segmented.mjs +1 -1
- package/es/Segmented/atoms.mjs +2 -2
- package/es/Segmented/index.d.mts +1 -1
- package/es/Select/Select.mjs +4 -4
- package/es/Select/atoms.mjs +4 -4
- package/es/Select/index.d.mts +1 -1
- package/es/Select/parts.mjs +4 -4
- package/es/Select/renderOptions.mjs +3 -3
- package/es/SideNav/SideNav.mjs +1 -1
- package/es/SideNav/index.d.mts +1 -1
- package/es/Skeleton/Skeleton.mjs +1 -1
- package/es/Skeleton/SkeletonAvatar.mjs +1 -1
- package/es/Skeleton/SkeletonText.mjs +2 -2
- package/es/Skeleton/index.d.mts +1 -1
- package/es/Slider/Slider.mjs +1 -1
- package/es/Slider/SliderWithInput.mjs +2 -2
- package/es/Slider/index.d.mts +1 -1
- package/es/Slider/index.mjs +1 -1
- package/es/Slider/style.d.mts +9 -48
- package/es/Slider/style.mjs +8 -2
- package/es/Slider/style.mjs.map +1 -1
- package/es/Snippet/Snippet.mjs +4 -4
- package/es/Snippet/index.d.mts +1 -1
- package/es/SortableList/SortableList.mjs +4 -4
- package/es/SortableList/components/SortableItem.mjs +2 -2
- package/es/SortableList/index.d.mts +1 -1
- package/es/Spin/Spin.mjs +3 -3
- package/es/Spin/index.d.mts +1 -1
- package/es/Statistic/Statistic.mjs +2 -2
- package/es/Statistic/index.d.mts +1 -1
- package/es/Steps/Steps.mjs +2 -2
- package/es/Steps/index.d.mts +1 -1
- package/es/Switch/Switch.mjs +3 -3
- package/es/Switch/atoms.d.mts +2 -20
- package/es/Switch/atoms.mjs +4 -11
- package/es/Switch/atoms.mjs.map +1 -1
- package/es/Switch/index.d.mts +3 -2
- package/es/Switch/index.mjs +2 -1
- package/es/Switch/style.d.mts +21 -0
- package/es/Switch/style.mjs +20 -1
- package/es/Switch/style.mjs.map +1 -1
- package/es/Table/Table.d.mts +1 -1
- package/es/Table/Table.mjs +6 -6
- package/es/Table/index.d.mts +2 -2
- package/es/Table/internal.d.mts +1 -1
- package/es/Table/pipeline/normalizeColumns.mjs +1 -1
- package/es/Table/pipeline/useTableLocale.mjs +1 -1
- package/es/Table/pipeline/useTableState.mjs +1 -1
- package/es/Table/render/Body.mjs +2 -2
- package/es/Table/render/BodyCell.mjs +1 -1
- package/es/Table/render/CellShell.mjs +1 -1
- package/es/Table/render/FilterDropdown.mjs +2 -2
- package/es/Table/render/FilterPanel.mjs +5 -5
- package/es/Table/render/Header.mjs +5 -5
- package/es/Table/render/SelectionCells.mjs +3 -3
- package/es/Table/render/Summary.d.mts +2 -2
- package/es/Table/render/TableView.mjs +3 -3
- package/es/Table/render/VirtualBody.mjs +2 -2
- package/es/Table/render/filterUtils.mjs +1 -1
- package/es/Table/type.d.mts +2 -2
- package/es/Table/useTableController.mjs +3 -3
- package/es/Tabs/Tabs.mjs +2 -2
- package/es/Tabs/atoms.mjs +1 -1
- package/es/Tabs/index.d.mts +2 -2
- package/es/Tabs/style.d.mts +4 -4
- package/es/Tabs/style.mjs +13 -1
- package/es/Tabs/style.mjs.map +1 -1
- package/es/Tag/Tag.mjs +2 -2
- package/es/Tag/index.d.mts +1 -1
- package/es/Tag/index.mjs +1 -1
- package/es/Text/Text.mjs +3 -3
- package/es/Text/index.d.mts +1 -1
- package/es/Text/style.d.mts +11 -11
- package/es/Text/style.mjs +21 -1
- package/es/Text/style.mjs.map +1 -1
- package/es/Toast/Toast.mjs +3 -3
- package/es/Toast/imperative.mjs +1 -1
- package/es/Toast/index.d.mts +1 -1
- package/es/ToggleGroup/ToggleGroup.mjs +1 -1
- package/es/ToggleGroup/atoms.d.mts +2 -3
- package/es/ToggleGroup/atoms.mjs +2 -4
- package/es/ToggleGroup/atoms.mjs.map +1 -1
- package/es/ToggleGroup/index.d.mts +3 -2
- package/es/ToggleGroup/index.mjs +2 -1
- package/es/ToggleGroup/style.d.mts +18 -94
- package/es/ToggleGroup/style.mjs +18 -1
- package/es/ToggleGroup/style.mjs.map +1 -1
- package/es/Tooltip/TooltipGroup.mjs +6 -6
- package/es/Tooltip/TooltipInGroup.mjs +1 -1
- package/es/Tooltip/TooltipStandalone.mjs +6 -6
- package/es/Tooltip/index.d.mts +1 -1
- package/es/Tree/Tree.mjs +4 -4
- package/es/Tree/TreeNode.mjs +4 -4
- package/es/Tree/index.d.mts +1 -1
- package/es/Tree/index.mjs +1 -1
- package/es/Upload/Upload.mjs +2 -2
- package/es/Video/Video.mjs +2 -2
- package/es/Video/index.d.mts +1 -1
- package/es/Video/index.mjs +2 -2
- package/es/Video/parts/CenterPlay.mjs +2 -2
- package/es/Video/parts/Controls.mjs +3 -3
- package/es/Video/parts/Frame.mjs +3 -3
- package/es/Video/parts/LoadError.mjs +2 -2
- package/es/Video/parts/RateMenu.mjs +3 -3
- package/es/Video/parts/Root.mjs +3 -3
- package/es/Video/parts/SectionMenu.mjs +3 -3
- package/es/Video/parts/Timeline.mjs +2 -2
- package/es/awesome/AgentSkillCard/AgentSkillCard.mjs +3 -3
- package/es/awesome/AgentSkillCard/index.d.mts +1 -1
- package/es/awesome/AuroraBackground/AuroraBackground.mjs +1 -1
- package/es/awesome/AuroraBackground/index.d.mts +1 -1
- package/es/awesome/BentoGrid/BentoCard.mjs +1 -1
- package/es/awesome/BentoGrid/index.d.mts +1 -1
- package/es/awesome/BentoGrid/type.d.mts +1 -1
- package/es/awesome/BottomGradientButton/index.d.mts +1 -1
- package/es/awesome/CodeShowcase/CodeShowcase.mjs +1 -1
- package/es/awesome/CodeShowcase/index.d.mts +1 -1
- package/es/awesome/FeatureGrid/FeatureGrid.mjs +2 -2
- package/es/awesome/FeatureGrid/index.d.mts +1 -1
- package/es/awesome/FeatureGrid/type.d.mts +2 -2
- package/es/awesome/Features/FeatureItem.mjs +3 -3
- package/es/awesome/Features/Features.mjs +1 -1
- package/es/awesome/Features/index.d.mts +1 -1
- package/es/awesome/Features/type.d.mts +2 -2
- package/es/awesome/FluidGradient/FluidGradient.mjs +1 -1
- package/es/awesome/FluidGradient/index.d.mts +1 -1
- package/es/awesome/FluidGradient/type.d.mts +1 -1
- package/es/awesome/Giscus/index.d.mts +1 -1
- package/es/awesome/Giscus/style.mjs +1 -1
- package/es/awesome/GradientButton/GradientButton.mjs +2 -2
- package/es/awesome/GradientButton/index.d.mts +1 -1
- package/es/awesome/Grainient/index.d.mts +1 -1
- package/es/awesome/GridBackground/GridBackground.mjs +4 -4
- package/es/awesome/GridBackground/GridShowcase.mjs +4 -4
- package/es/awesome/GridBackground/index.d.mts +1 -1
- package/es/awesome/Hero/Hero.mjs +6 -6
- package/es/awesome/Hero/index.d.mts +1 -1
- package/es/awesome/InstallBanner/InstallBanner.mjs +1 -1
- package/es/awesome/InstallBanner/index.d.mts +1 -1
- package/es/awesome/LandingHero/LandingHero.mjs +1 -1
- package/es/awesome/LandingHero/index.d.mts +1 -1
- package/es/awesome/LandingHero/type.d.mts +2 -2
- package/es/awesome/LandingSection/LandingSection.mjs +1 -1
- package/es/awesome/LandingSection/index.d.mts +1 -1
- package/es/awesome/LandingSection/type.d.mts +2 -2
- package/es/awesome/LogoMarquee/LogoMarquee.mjs +1 -1
- package/es/awesome/LogoMarquee/index.d.mts +1 -1
- package/es/awesome/Spotlight/Spotlight.mjs +1 -1
- package/es/awesome/Spotlight/index.d.mts +1 -1
- package/es/awesome/SpotlightCard/SpotlightCard.mjs +2 -2
- package/es/awesome/SpotlightCard/SpotlightCardItem.mjs +1 -1
- package/es/awesome/SpotlightCard/index.d.mts +1 -1
- package/es/awesome/index.d.mts +20 -20
- package/es/awesome/index.mjs +4 -4
- package/es/awesome/landingActions.d.mts +2 -2
- package/es/awesome/landingActions.mjs +3 -3
- package/es/brand/LobeChat/index.mjs +3 -3
- package/es/brand/LobeChatText/index.mjs +1 -1
- package/es/brand/LobeHub/index.mjs +4 -4
- package/es/brand/LobeHubText/index.mjs +1 -1
- package/es/brand/components/Divider.mjs +1 -1
- package/es/brand/index.mjs +3 -3
- package/es/chat/BackBottom/BackBottom.mjs +1 -1
- package/es/chat/BackBottom/index.d.mts +1 -1
- package/es/chat/ChatHeader/ChatHeader.mjs +2 -2
- package/es/chat/ChatHeader/ChatHeaderTitle.mjs +1 -1
- package/es/chat/ChatHeader/index.d.mts +1 -1
- package/es/chat/ChatInputArea/ChatInputArea.mjs +2 -2
- package/es/chat/ChatInputArea/components/ChatInputActionBar.mjs +1 -1
- package/es/chat/ChatInputArea/components/ChatSendButton.mjs +2 -2
- package/es/chat/ChatInputArea/index.d.mts +1 -1
- package/es/chat/ChatInputArea/index.mjs +1 -1
- package/es/chat/ChatInputArea/type.d.mts +3 -3
- package/es/chat/ChatItem/ChatItem.mjs +6 -6
- package/es/chat/ChatItem/components/Actions.mjs +1 -1
- package/es/chat/ChatItem/components/Avatar.mjs +2 -2
- package/es/chat/ChatItem/components/ErrorContent.mjs +2 -2
- package/es/chat/ChatItem/components/Loading.mjs +2 -2
- package/es/chat/ChatItem/components/MessageContent.mjs +2 -2
- package/es/chat/ChatItem/components/Title.mjs +2 -2
- package/es/chat/ChatItem/index.d.mts +1 -1
- package/es/chat/ChatItem/type.d.mts +7 -7
- package/es/chat/ChatList/ChatList.mjs +3 -3
- package/es/chat/ChatList/components/ChatListItem.mjs +2 -2
- package/es/chat/ChatList/components/HistoryDivider.mjs +2 -2
- package/es/chat/ChatList/index.d.mts +1 -1
- package/es/chat/ChatList/type.d.mts +4 -4
- package/es/chat/EditableMessage/EditableMessage.mjs +3 -3
- package/es/chat/EditableMessage/index.d.mts +1 -1
- package/es/chat/EditableMessage/type.d.mts +3 -3
- package/es/chat/EditableMessageList/EditableMessageList.mjs +3 -3
- package/es/chat/EditableMessageList/index.d.mts +1 -1
- package/es/chat/LoadingDots/LoadingDots.mjs +1 -1
- package/es/chat/LoadingDots/index.d.mts +1 -1
- package/es/chat/MessageInput/MessageInput.mjs +5 -5
- package/es/chat/MessageInput/index.d.mts +1 -1
- package/es/chat/MessageInput/type.d.mts +3 -3
- package/es/chat/MessageModal/MessageModal.mjs +5 -5
- package/es/chat/MessageModal/index.d.mts +1 -1
- package/es/chat/MessageModal/type.d.mts +2 -2
- package/es/chat/TokenTag/TokenTag.mjs +3 -3
- package/es/chat/TokenTag/index.d.mts +1 -1
- package/es/chat/index.d.mts +8 -8
- package/es/chat/index.mjs +3 -3
- package/es/chat/types/index.d.mts +1 -1
- package/es/color/ColorScales/ScaleRow.mjs +3 -3
- package/es/color/ColorScales/index.mjs +3 -3
- package/es/color/CssVar/ScaleRow.mjs +3 -3
- package/es/color/CssVar/VarRow.mjs +4 -4
- package/es/color/CssVar/index.mjs +3 -3
- package/es/color/index.d.mts +5 -5
- package/es/color/index.mjs +4 -4
- package/es/css/Accordion.css +475 -0
- package/es/css/ActionIcon.css +1237 -0
- package/es/css/ActionIconGroup.css +2117 -0
- package/es/css/AgentAvatar.css +400 -0
- package/es/css/Alert.css +596 -0
- package/es/css/Anchor.css +197 -0
- package/es/css/AutoComplete.css +897 -0
- package/es/css/Avatar.css +232 -0
- package/es/css/Badge.css +238 -0
- package/es/css/Block.css +83 -0
- package/es/css/Breadcrumb.css +154 -0
- package/es/css/Burger.css +1789 -0
- package/es/css/Button.css +1613 -0
- package/es/css/Carousel.css +1347 -0
- package/es/css/Checkbox.css +990 -0
- package/es/css/CodeDiff.css +1583 -0
- package/es/css/CodeEditor.css +267 -0
- package/es/css/Collapsible.css +475 -0
- package/es/css/ColorPicker.css +2254 -0
- package/es/css/ColorSwatches.css +2654 -0
- package/es/css/ContextMenu.css +1181 -0
- package/es/css/CopyButton.css +1237 -0
- package/es/css/DatePicker.css +3277 -0
- package/es/css/Descriptions.css +159 -0
- package/es/css/Divider.css +149 -0
- package/es/css/DownloadButton.css +1237 -0
- package/es/css/DraggablePanel.css +1555 -0
- package/es/css/DraggableSideNav.css +375 -0
- package/es/css/Drawer.css +580 -0
- package/es/css/DropdownMenu.css +1177 -0
- package/es/css/EditableText.css +1543 -0
- package/es/css/EditorSlashMenu.css +513 -0
- package/es/css/EmojiPicker.css +3199 -0
- package/es/css/Empty.css +897 -0
- package/es/css/FileTypeIcon.css +27 -0
- package/es/css/FloatingPanel.css +2027 -0
- package/es/css/FloatingSheet.css +182 -0
- package/es/css/FluentEmoji.css +17 -0
- package/es/css/FocusScope.css +27 -0
- package/es/css/Form.css +1964 -0
- package/es/css/Grid.css +27 -0
- package/es/css/GroupAvatar.css +308 -0
- package/es/css/GuideCard.css +1279 -0
- package/es/css/Header.css +89 -0
- package/es/css/Highlighter.css +2517 -0
- package/es/css/Hotkey.css +157 -0
- package/es/css/HotkeyInput.css +1275 -0
- package/es/css/HtmlPreview.css +1860 -0
- package/es/css/Icon.css +49 -0
- package/es/css/Image.css +2669 -0
- package/es/css/ImageSelect.css +103 -0
- package/es/css/Input.css +507 -0
- package/es/css/Layout.css +1603 -0
- package/es/css/List.css +404 -0
- package/es/css/Markdown.css +4843 -0
- package/es/css/MaskShadow.css +45 -0
- package/es/css/MaterialFileTypeIcon.css +27 -0
- package/es/css/Mermaid.css +2916 -0
- package/es/css/Modal.css +1839 -0
- package/es/css/Pagination.css +1603 -0
- package/es/css/Popover.css +408 -0
- package/es/css/Progress.css +295 -0
- package/es/css/ProgressiveBlur.css +158 -0
- package/es/css/QRCode.css +528 -0
- package/es/css/Radio.css +990 -0
- package/es/css/Rate.css +163 -0
- package/es/css/Result.css +145 -0
- package/es/css/ScrollArea.css +414 -0
- package/es/css/ScrollShadow.css +71 -0
- package/es/css/SearchBar.css +615 -0
- package/es/css/Segmented.css +389 -0
- package/es/css/Select.css +1227 -0
- package/es/css/SideNav.css +45 -0
- package/es/css/Skeleton.css +180 -0
- package/es/css/Slider.css +680 -0
- package/es/css/Snippet.css +1383 -0
- package/es/css/SortableList.css +1255 -0
- package/es/css/Spin.css +311 -0
- package/es/css/Statistic.css +236 -0
- package/es/css/Steps.css +291 -0
- package/es/css/Switch.css +482 -0
- package/es/css/Table.css +4187 -0
- package/es/css/Tabs.css +425 -0
- package/es/css/Tag.css +169 -0
- package/es/css/Text.css +787 -0
- package/es/css/Toast.css +679 -0
- package/es/css/ToggleGroup.css +315 -0
- package/es/css/Tooltip.css +594 -0
- package/es/css/Tree.css +1136 -0
- package/es/css/Upload.css +171 -0
- package/es/css/Video.css +1721 -0
- package/es/css/awesome/AgentSkillCard.css +1631 -0
- package/es/css/awesome/AuroraBackground.css +180 -0
- package/es/css/awesome/BentoGrid.css +239 -0
- package/es/css/awesome/BottomGradientButton.css +770 -0
- package/es/css/awesome/CodeShowcase.css +2698 -0
- package/es/css/awesome/FeatureGrid.css +231 -0
- package/es/css/awesome/Features.css +1022 -0
- package/es/css/awesome/FluidGradient.css +63 -0
- package/es/css/awesome/GradientButton.css +870 -0
- package/es/css/awesome/Grainient.css +43 -0
- package/es/css/awesome/GridBackground.css +183 -0
- package/es/css/awesome/Hero.css +2022 -0
- package/es/css/awesome/InstallBanner.css +1438 -0
- package/es/css/awesome/LandingHero.css +1050 -0
- package/es/css/awesome/LandingSection.css +1066 -0
- package/es/css/awesome/LogoMarquee.css +154 -0
- package/es/css/awesome/Spotlight.css +49 -0
- package/es/css/awesome/SpotlightCard.css +166 -0
- package/es/css/awesome/TypewriterEffect.css +81 -0
- package/es/css/brand/LobeChat.css +27 -0
- package/es/css/brand/LobeChatText.css +15 -0
- package/es/css/brand/LobeHub.css +27 -0
- package/es/css/brand/LobeHubText.css +15 -0
- package/es/css/brand/Logo3d.css +17 -0
- package/es/css/chat/BackBottom.css +740 -0
- package/es/css/chat/ChatHeader.css +1297 -0
- package/es/css/chat/ChatInputArea.css +2648 -0
- package/es/css/chat/ChatItem.css +5599 -0
- package/es/css/chat/ChatList.css +5655 -0
- package/es/css/chat/EditableMessage.css +5223 -0
- package/es/css/chat/EditableMessageList.css +2534 -0
- package/es/css/chat/LoadingDots.css +228 -0
- package/es/css/chat/MessageInput.css +2455 -0
- package/es/css/chat/MessageModal.css +5223 -0
- package/es/css/chat/TokenTag.css +1391 -0
- package/es/css/color/ColorScales.css +767 -0
- package/es/css/color/CssVar.css +743 -0
- package/es/css/dashboard/AuthLayout.css +1220 -0
- package/es/css/dashboard/AuthTools.css +1417 -0
- package/es/css/dashboard/Breadcrumb.css +91 -0
- package/es/css/dashboard/ChartGrid.css +49 -0
- package/es/css/dashboard/ConsoleNav.css +1184 -0
- package/es/css/dashboard/ConsoleShell.css +2711 -0
- package/es/css/dashboard/FilterSidebar.css +2861 -0
- package/es/css/dashboard/FilterStrip.css +845 -0
- package/es/css/dashboard/LabelWithKey.css +169 -0
- package/es/css/dashboard/MetricStrip.css +849 -0
- package/es/css/dashboard/PageHeader.css +851 -0
- package/es/css/dashboard/PageSkeleton.css +556 -0
- package/es/css/dashboard/PageTabs.css +502 -0
- package/es/css/dashboard/PageToolbar.css +57 -0
- package/es/css/dashboard/PanelSurface.css +733 -0
- package/es/css/dashboard/RouteProgress.css +45 -0
- package/es/css/dashboard/Section.css +749 -0
- package/es/css/dashboard/StatCard.css +572 -0
- package/es/css/dashboard/Surface.css +725 -0
- package/es/css/dashboard/TableIconActions.css +1237 -0
- package/es/css/dashboard/TitleWithTips.css +598 -0
- package/es/css/form.css +2464 -0
- package/es/css/mdx/Callout.css +145 -0
- package/es/css/mdx/Cards.css +115 -0
- package/es/css/mdx/FileTree.css +41 -0
- package/es/css/mdx/Mdx.css +5376 -0
- package/es/css/mdx/Steps.css +94 -0
- package/es/css/mdx/Tabs.css +454 -0
- package/es/css/mdx/mdxComponents.css +3769 -0
- package/es/css/mobile/ChatHeader.css +1277 -0
- package/es/css/mobile/ChatInputArea.css +2377 -0
- package/es/css/mobile/SafeArea.css +27 -0
- package/es/css/mobile/TabBar.css +98 -0
- package/es/css/pro-table.css +5838 -0
- package/es/css/storybook/StoryBook.css +1611 -0
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +1 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +4 -4
- package/es/dashboard/AuthLayout/index.d.mts +1 -1
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +1 -1
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +1 -1
- package/es/dashboard/AuthTools/index.d.mts +1 -1
- package/es/dashboard/Breadcrumb/Breadcrumb.mjs +1 -1
- package/es/dashboard/Breadcrumb/index.d.mts +1 -1
- package/es/dashboard/ChartGrid/index.d.mts +1 -1
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs +3 -3
- package/es/dashboard/ConsoleNav/Skeleton.mjs +1 -1
- package/es/dashboard/ConsoleNav/index.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +7 -7
- package/es/dashboard/ConsoleShell/index.d.mts +1 -1
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +3 -3
- package/es/dashboard/FilterSidebar/index.d.mts +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.mjs +2 -2
- package/es/dashboard/FilterStrip/index.d.mts +1 -1
- package/es/dashboard/LabelWithKey/index.d.mts +1 -1
- package/es/dashboard/MetricStrip/MetricCell.mjs +2 -2
- package/es/dashboard/MetricStrip/MetricStrip.mjs +3 -3
- package/es/dashboard/MetricStrip/index.d.mts +1 -1
- package/es/dashboard/PageHeader/PageHeader.mjs +1 -1
- package/es/dashboard/PageHeader/index.d.mts +1 -1
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +2 -2
- package/es/dashboard/PageTabs/index.d.mts +1 -1
- package/es/dashboard/PageToolbar/index.d.mts +1 -1
- package/es/dashboard/PanelSurface/PanelSurface.mjs +3 -3
- package/es/dashboard/PanelSurface/index.d.mts +1 -1
- package/es/dashboard/Section/Section.mjs +3 -3
- package/es/dashboard/Section/index.d.mts +1 -1
- package/es/dashboard/StatCard/StatCard.mjs +6 -6
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/index.d.mts +1 -1
- package/es/dashboard/Surface/Surface.mjs +5 -5
- package/es/dashboard/Surface/index.d.mts +1 -1
- package/es/dashboard/TableIconActions/TableIconActions.mjs +1 -1
- package/es/dashboard/TableIconActions/index.d.mts +1 -1
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +3 -3
- package/es/dashboard/TitleWithTips/index.d.mts +1 -1
- package/es/dashboard/index.d.mts +2 -2
- package/es/dashboard/index.mjs +9 -9
- package/es/eslint/index.d.mts +1 -1
- package/es/hooks/useMarkdown/useMarkdownComponents.mjs +1 -1
- package/es/hooks/useMarkdown/useMarkdownContent.mjs +1 -1
- package/es/i18n/context.d.mts +1 -1
- package/es/i18n/index.d.mts +1 -1
- package/es/i18n/resources/en/index.mjs +6 -6
- package/es/i18n/resources/zhCn/index.mjs +1 -1
- package/es/icons/Auth0/index.mjs +2 -2
- package/es/icons/Authelia/index.mjs +5 -5
- package/es/icons/Authentik/index.mjs +5 -5
- package/es/icons/Casdoor/index.mjs +5 -5
- package/es/icons/Clerk/index.mjs +5 -5
- package/es/icons/DingTalk/index.mjs +5 -5
- package/es/icons/Discord/index.mjs +5 -5
- package/es/icons/GoogleChat/index.mjs +2 -2
- package/es/icons/IMessage/index.mjs +1 -1
- package/es/icons/Lark/index.mjs +2 -2
- package/es/icons/Line/index.mjs +5 -5
- package/es/icons/Logto/index.mjs +5 -5
- package/es/icons/MicrosoftEntra/index.mjs +2 -2
- package/es/icons/MicrosoftTeams/index.mjs +2 -2
- package/es/icons/NextAuth/index.mjs +2 -2
- package/es/icons/QQ/index.mjs +2 -2
- package/es/icons/Slack/index.mjs +2 -2
- package/es/icons/Telegram/index.mjs +1 -1
- package/es/icons/WeChat/index.mjs +5 -5
- package/es/icons/WhatsApp/index.mjs +5 -5
- package/es/icons/Zitadel/index.mjs +5 -5
- package/es/index.d.mts +126 -123
- package/es/index.mjs +123 -121
- package/es/internal/menu/index.d.mts +3 -3
- package/es/internal/menu/renderUtils.d.mts +1 -1
- package/es/internal/virtual/MenuVirtualList.mjs +1 -1
- package/es/internal/virtual/VirtualScrollArea.mjs +1 -1
- package/es/internal/virtual/index.d.mts +2 -2
- package/es/mdx/Callout/index.mjs +3 -3
- package/es/mdx/Cards/Card.d.mts +2 -2
- package/es/mdx/Cards/Card.mjs +4 -4
- package/es/mdx/Cards/index.mjs +1 -1
- package/es/mdx/FileTree/File.mjs +1 -1
- package/es/mdx/FileTree/Folder.mjs +3 -3
- package/es/mdx/Mdx/index.mjs +6 -6
- package/es/mdx/index.mjs +7 -7
- package/es/mdx/mdxComponents/Citation/PopoverPanel.mjs +2 -2
- package/es/mdx/mdxComponents/Citation/index.mjs +1 -1
- package/es/mdx/mdxComponents/Link.mjs +1 -1
- package/es/mdx/mdxComponents/Pre.mjs +1 -1
- package/es/mdx/mdxComponents/Video.mjs +1 -1
- package/es/mdx/mdxComponents/index.mjs +3 -3
- package/es/mobile/ChatHeader/ChatHeader.mjs +2 -2
- package/es/mobile/ChatHeader/ChatHeaderTitle.mjs +1 -1
- package/es/mobile/ChatHeader/index.d.mts +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.mjs +4 -4
- package/es/mobile/ChatInputArea/index.d.mts +1 -1
- package/es/mobile/SafeArea/SafeArea.mjs +1 -1
- package/es/mobile/SafeArea/index.d.mts +1 -1
- package/es/mobile/TabBar/TabBar.mjs +2 -2
- package/es/mobile/TabBar/index.d.mts +1 -1
- package/es/mobile/index.mjs +3 -3
- package/es/node_modules/.pnpm/{@types_estree@1.0.9 → @types_estree@1.0.10}/node_modules/@types/estree/index.d.mts +7 -1
- package/es/node_modules/.pnpm/{eslint@10.13.0_jiti@2.7.0_supports-color@10.2.2 → eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2}/node_modules/eslint/lib/types/index.d.mts +1 -1
- package/es/spline/LogoThree/Loading.mjs +1 -1
- package/es/spline/LogoThree/LogoSpline.mjs +1 -1
- package/es/spline/Spline/index.d.mts +1 -1
- package/es/spline/index.d.mts +2 -2
- package/es/spline/index.mjs +1 -1
- package/es/storybook/StoryBook/index.mjs +3 -3
- package/es/style.css +737 -490
- package/es/styles/index.d.mts +5 -5
- package/es/styles/index.mjs +9 -9
- package/es/styles/theme/customNeutral.mjs +1 -1
- package/es/styles/theme/scope.d.mts +1 -1
- package/es/styles/theme/scope.mjs +3 -3
- package/es/styles/theme/themeCss.mjs +4 -4
- package/es/styles/theme/token/palette.mjs +1 -1
- package/es/styles/theme/token/primary.mjs +1 -1
- package/package.json +2 -1
- package/es/DropdownMenu/sharedStyle.mjs +0 -8
- package/es/DropdownMenu/sharedStyle.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
2
|
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
|
+
import { SkeletonImpl } from "./Skeleton.mjs";
|
|
4
5
|
import { skeletonTextClasses } from "./stable.mjs";
|
|
5
6
|
import { styles } from "./style.mjs";
|
|
6
|
-
import { SkeletonImpl } from "./Skeleton.mjs";
|
|
7
7
|
import clsx$1 from "clsx";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
// src/Skeleton/SkeletonText.tsx
|
package/es/Skeleton/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SkeletonAnimation, SkeletonAvatarProps, SkeletonProps, SkeletonTextProps } from "./type.mjs";
|
|
2
1
|
import SkeletonAvatar from "./SkeletonAvatar.mjs";
|
|
3
2
|
import SkeletonText from "./SkeletonText.mjs";
|
|
3
|
+
import { SkeletonAnimation, SkeletonAvatarProps, SkeletonProps, SkeletonTextProps } from "./type.mjs";
|
|
4
4
|
import { FC } from "react";
|
|
5
5
|
interface ISkeleton extends FC<SkeletonProps> {
|
|
6
6
|
Avatar: typeof SkeletonAvatar;
|
package/es/Slider/Slider.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
2
|
import { focusRing } from "../styles/stylex/focusRing.mjs";
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
4
|
import { sliderMarker } from "./marker.stylex.mjs";
|
|
5
5
|
import { sliderClasses } from "./stable.mjs";
|
|
6
6
|
import { styles } from "./style.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
2
|
import FlexBasic_default from "../Flex/FlexBasic.mjs";
|
|
4
3
|
import InputNumber_default from "../Input/InputNumber.mjs";
|
|
4
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
5
|
+
import Slider from "./Slider.mjs";
|
|
5
6
|
import { sliderWithInputClasses } from "./stable.mjs";
|
|
6
7
|
import { styles } from "./style.mjs";
|
|
7
|
-
import Slider from "./Slider.mjs";
|
|
8
8
|
import clsx$1 from "clsx";
|
|
9
9
|
import { memo } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/es/Slider/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SliderProps, SliderWithInputProps } from "./type.mjs";
|
|
2
1
|
import Slider from "./Slider.mjs";
|
|
3
2
|
import SliderWithInput from "./SliderWithInput.mjs";
|
|
4
3
|
import { sliderStyles } from "./style.mjs";
|
|
4
|
+
import { SliderProps, SliderWithInputProps } from "./type.mjs";
|
|
5
5
|
export { Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, sliderStyles };
|
package/es/Slider/index.mjs
CHANGED
package/es/Slider/style.d.mts
CHANGED
|
@@ -1,49 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
11
|
-
}>;
|
|
12
|
-
readonly indicator: Readonly<{
|
|
13
|
-
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "inherit">;
|
|
14
|
-
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
15
|
-
}>;
|
|
16
|
-
readonly root: Readonly<{
|
|
17
|
-
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
18
|
-
readonly cursor: stylex.StyleXClassNameFor<"cursor", "not-allowed" | null>;
|
|
19
|
-
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
20
|
-
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
21
|
-
}>;
|
|
22
|
-
readonly thumb: Readonly<{
|
|
23
|
-
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", 100>;
|
|
24
|
-
readonly transition: stylex.StyleXClassNameFor<"transition", `box-shadow 150ms ${string}`>;
|
|
25
|
-
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
26
|
-
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", string>;
|
|
27
|
-
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
28
|
-
readonly transitionDuration: stylex.StyleXClassNameFor<"transitionDuration", "0s" | null>;
|
|
29
|
-
readonly height: stylex.StyleXClassNameFor<"height", 16>;
|
|
30
|
-
readonly width: stylex.StyleXClassNameFor<"width", 8>;
|
|
31
|
-
readonly '::before': stylex.StyleXClassNameFor<"::before", {
|
|
32
|
-
readonly content: "''";
|
|
33
|
-
readonly insetBlockStart: "50%";
|
|
34
|
-
readonly insetInlineStart: "50%";
|
|
35
|
-
readonly position: "absolute";
|
|
36
|
-
readonly translate: "-50% -50%";
|
|
37
|
-
readonly height: 40;
|
|
38
|
-
readonly width: 24;
|
|
39
|
-
}>;
|
|
40
|
-
}>;
|
|
41
|
-
readonly track: Readonly<{
|
|
42
|
-
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", 100>;
|
|
43
|
-
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
44
|
-
readonly height: stylex.StyleXClassNameFor<"height", 4>;
|
|
45
|
-
readonly width: stylex.StyleXClassNameFor<"width", "100%">;
|
|
46
|
-
}>;
|
|
47
|
-
}>;
|
|
48
|
-
export declare const sliderStyles: Record<keyof typeof styles, string>;
|
|
1
|
+
import "@stylexjs/stylex";
|
|
2
|
+
export declare const sliderStyles: {
|
|
3
|
+
withInputSlider: string;
|
|
4
|
+
control: string;
|
|
5
|
+
indicator: string;
|
|
6
|
+
root: string;
|
|
7
|
+
thumb: string;
|
|
8
|
+
track: string;
|
|
9
|
+
};
|
|
49
10
|
//# sourceMappingURL=style.d.mts.map
|
package/es/Slider/style.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
2
|
-
import * as stylex from "@stylexjs/stylex";
|
|
3
2
|
// src/Slider/style.ts
|
|
4
3
|
|
|
5
4
|
const styles = {
|
|
@@ -52,7 +51,14 @@ const styles = {
|
|
|
52
51
|
$$css: true
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
|
-
const sliderStyles =
|
|
54
|
+
const sliderStyles = {
|
|
55
|
+
withInputSlider: { className: "lb98rzlu" }.className ?? "",
|
|
56
|
+
control: { className: "lb6s0dn4 lb78zum5 lb1qx5ct2 lbh8yej3" }.className ?? "",
|
|
57
|
+
indicator: { className: "lb1pjcqnp lb1hsafae lbj9t5n8" }.className ?? "",
|
|
58
|
+
root: { className: "lb6s0dn4 lb5ezrf1 lb78zum5 lbh8yej3" }.className ?? "",
|
|
59
|
+
thumb: { className: "lb1xwekrv lbp6x4vz lb1hsafae lbj9t5n8 lb1fsw8ff lb1sdogmm lb19w46ty lb2lah0s lb12w9bfk lblup9mm lb1xc55vz lb10tli2e lb1knuo7r lbfbisj7 lb1hmns74 lbqh36ef lbewkbtl lb5rknsf" }.className ?? "",
|
|
60
|
+
track: { className: "lb1xwekrv lbjjy28o lbqu0tyb lbh8yej3" }.className ?? ""
|
|
61
|
+
};
|
|
56
62
|
export { sliderStyles, styles };
|
|
57
63
|
|
|
58
64
|
//# sourceMappingURL=style.mjs.map
|
package/es/Slider/style.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Slider/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { sliderMarker } from './marker.stylex';\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst activeRing = `0 0 0 2px ${cssVar.colorPrimaryBorder}`;\n\nexport const styles = stylex.create({\n withInputSlider: {\n flex: '1',\n },\n control: {\n alignItems: 'center',\n display: 'flex',\n height: 20,\n width: '100%',\n },\n indicator: {\n borderRadius: 'inherit',\n backgroundColor: {\n default: cssVar.colorPrimary,\n [stylex.when.ancestor('[data-disabled]', sliderMarker)]: cssVar.colorTextQuaternary,\n },\n },\n root: {\n alignItems: 'center',\n cursor: { 'default': null, ':is([data-disabled])': 'not-allowed' },\n display: 'flex',\n width: '100%',\n },\n thumb: {\n 'borderRadius': 100,\n 'transition': `box-shadow 150ms ${cssVar.motionEaseOut}`,\n 'backgroundColor': {\n default: cssVar.colorPrimary,\n [stylex.when.ancestor('[data-disabled]', sliderMarker)]: cssVar.colorTextQuaternary,\n },\n 'boxShadow': {\n 'default': `0 0 0 1px ${cssVar.colorBgContainer}`,\n ':hover:not([data-disabled] *)': activeRing,\n [stylex.when.ancestor('[data-dragging]', sliderMarker)]: activeRing,\n },\n 'flexShrink': 0,\n 'transitionDuration': { default: null, [reducedMotion]: '0s' },\n 'height': 16,\n 'width': 8,\n '::before': {\n content: \"''\",\n insetBlockStart: '50%',\n insetInlineStart: '50%',\n position: 'absolute',\n translate: '-50% -50%',\n height: 40,\n width: 24,\n },\n },\n track: {\n borderRadius: 100,\n backgroundColor: cssVar.colorFillSecondary,\n height: 4,\n width: '100%',\n },\n});\n\nexport const sliderStyles =
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Slider/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { sliderMarker } from './marker.stylex';\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst activeRing = `0 0 0 2px ${cssVar.colorPrimaryBorder}`;\n\nexport const styles = stylex.create({\n withInputSlider: {\n flex: '1',\n },\n control: {\n alignItems: 'center',\n display: 'flex',\n height: 20,\n width: '100%',\n },\n indicator: {\n borderRadius: 'inherit',\n backgroundColor: {\n default: cssVar.colorPrimary,\n [stylex.when.ancestor('[data-disabled]', sliderMarker)]: cssVar.colorTextQuaternary,\n },\n },\n root: {\n alignItems: 'center',\n cursor: { 'default': null, ':is([data-disabled])': 'not-allowed' },\n display: 'flex',\n width: '100%',\n },\n thumb: {\n 'borderRadius': 100,\n 'transition': `box-shadow 150ms ${cssVar.motionEaseOut}`,\n 'backgroundColor': {\n default: cssVar.colorPrimary,\n [stylex.when.ancestor('[data-disabled]', sliderMarker)]: cssVar.colorTextQuaternary,\n },\n 'boxShadow': {\n 'default': `0 0 0 1px ${cssVar.colorBgContainer}`,\n ':hover:not([data-disabled] *)': activeRing,\n [stylex.when.ancestor('[data-dragging]', sliderMarker)]: activeRing,\n },\n 'flexShrink': 0,\n 'transitionDuration': { default: null, [reducedMotion]: '0s' },\n 'height': 16,\n 'width': 8,\n '::before': {\n content: \"''\",\n insetBlockStart: '50%',\n insetInlineStart: '50%',\n position: 'absolute',\n translate: '-50% -50%',\n height: 40,\n width: 24,\n },\n },\n track: {\n borderRadius: 100,\n backgroundColor: cssVar.colorFillSecondary,\n height: 4,\n width: '100%',\n },\n});\n\nexport const sliderStyles = {\n withInputSlider: stylex.props(styles.withInputSlider).className ?? '',\n control: stylex.props(styles.control).className ?? '',\n indicator: stylex.props(styles.indicator).className ?? '',\n root: stylex.props(styles.root).className ?? '',\n thumb: stylex.props(styles.thumb).className ?? '',\n track: stylex.props(styles.track).className ?? '',\n} satisfies Record<keyof typeof styles, string>;\n"],"mappings":";;AAMmB,GAAa,OAAO;AACvC,MAAa,SAAS;CACpB,iBAAiB;EACf,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,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,QAAQ;EACR,OAAO;CACT;AACF;AACA,MAAa,eAAe;CAC1B,iBAAiB,EACf,WAAW,WACb,EAAE,aAAa;CACf,SAAS,EACP,WAAW,uCACb,EAAE,aAAa;CACf,WAAW,EACT,WAAW,+BACb,EAAE,aAAa;CACf,MAAM,EACJ,WAAW,sCACb,EAAE,aAAa;CACf,OAAO,EACL,WAAW,8KACb,EAAE,aAAa;CACf,OAAO,EACL,WAAW,uCACb,EAAE,aAAa;AACjB"}
|
package/es/Snippet/Snippet.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Spotlight from "../awesome/Spotlight/Spotlight.mjs";
|
|
3
|
+
import CopyButton from "../CopyButton/CopyButton.mjs";
|
|
4
4
|
import FlexBasic_default from "../Flex/FlexBasic.mjs";
|
|
5
5
|
import { SyntaxHighlighterImpl } from "../Highlighter/SyntaxHighlighter/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
7
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
8
8
|
import { snippetClasses } from "./stable.mjs";
|
|
9
9
|
import { styles, variantStyles } from "./style.mjs";
|
|
10
10
|
import clsx$1 from "clsx";
|
package/es/Snippet/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
3
2
|
import FlexBasic_default from "../Flex/FlexBasic.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { styles } from "./style.mjs";
|
|
6
|
-
import SortableItem from "./components/SortableItem.mjs";
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
7
4
|
import DragHandle from "./components/DragHandle.mjs";
|
|
5
|
+
import SortableItem from "./components/SortableItem.mjs";
|
|
8
6
|
import SortableOverlay from "./components/SortableOverlay.mjs";
|
|
7
|
+
import { sortableListClasses } from "./stable.mjs";
|
|
8
|
+
import { styles } from "./style.mjs";
|
|
9
9
|
import clsx$1 from "clsx";
|
|
10
10
|
import { Fragment, memo, useMemo, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../../utils/bem.mjs";
|
|
3
|
-
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
4
2
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
3
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
5
4
|
import { stylish } from "../../styles/stylex/stylish.mjs";
|
|
5
|
+
import { toDataAttributes } from "../../utils/bem.mjs";
|
|
6
6
|
import { sortableListClasses } from "../stable.mjs";
|
|
7
7
|
import { styles } from "../style.mjs";
|
|
8
8
|
import clsx$1 from "clsx";
|
package/es/Spin/Spin.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
2
|
import Icon from "../Icon/Icon.mjs";
|
|
5
|
-
import {
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
6
5
|
import NetworkGlyph from "./NetworkGlyph.mjs";
|
|
7
6
|
import { spinClasses } from "./stable.mjs";
|
|
7
|
+
import { styles } from "./style.mjs";
|
|
8
8
|
import clsx$1 from "clsx";
|
|
9
9
|
import { memo, useMemo } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/es/Spin/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
2
|
import { SkeletonImpl } from "../Skeleton/Skeleton.mjs";
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
5
5
|
import { formatStatisticValue } from "./formatValue.mjs";
|
|
6
6
|
import { statisticClasses } from "./stable.mjs";
|
|
7
7
|
import { styles } from "./style.mjs";
|
package/es/Statistic/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { formatStatisticValue } from "./formatValue.mjs";
|
|
2
|
-
import { StatisticProps } from "./type.mjs";
|
|
3
2
|
import Statistic from "./Statistic.mjs";
|
|
3
|
+
import { StatisticProps } from "./type.mjs";
|
|
4
4
|
export { type StatisticProps, Statistic as default, formatStatisticValue };
|
package/es/Steps/Steps.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
2
|
import Icon from "../Icon/Icon.mjs";
|
|
3
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
5
5
|
import { stepsClasses } from "./stable.mjs";
|
|
6
6
|
import { indicatorStatusStyles, styles, titleStatusStyles } from "./style.mjs";
|
|
7
7
|
import clsx$1 from "clsx";
|
package/es/Steps/index.d.mts
CHANGED
package/es/Switch/Switch.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
|
-
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
4
2
|
import Icon from "../Icon/Icon.mjs";
|
|
5
|
-
import {
|
|
3
|
+
import { cssVar } from "../styles/stylex/cssVar.stylex.mjs";
|
|
4
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
6
5
|
import { SwitchIcon, SwitchRoot, SwitchThumb } from "./atoms.mjs";
|
|
6
|
+
import { styles } from "./style.mjs";
|
|
7
7
|
import clsx$1 from "clsx";
|
|
8
8
|
import { memo } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/es/Switch/atoms.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SwitchChangeEventHandler, SwitchContextType, SwitchIconProps, SwitchRootProps, SwitchThumbProps } from "./type.mjs";
|
|
2
|
+
import { switchStyles } from "./style.mjs";
|
|
2
3
|
import * as stylex from "@stylexjs/stylex";
|
|
3
4
|
export declare const useSwitchContext: () => SwitchContextType;
|
|
4
5
|
type SwitchRootInternalProps = Omit<SwitchRootProps, 'onCheckedChange' | 'onClick'> & {
|
|
@@ -18,24 +19,5 @@ export declare const SwitchIcon: {
|
|
|
18
19
|
({ children, className, position, size: _size, style, ...rest }: SwitchIconProps): import("react").JSX.Element;
|
|
19
20
|
displayName: string;
|
|
20
21
|
};
|
|
21
|
-
export
|
|
22
|
-
iconLeftSmall: string;
|
|
23
|
-
iconRightSmall: string;
|
|
24
|
-
icon: string;
|
|
25
|
-
loading: string;
|
|
26
|
-
root: string;
|
|
27
|
-
thumb: string;
|
|
28
|
-
iconLeft: string;
|
|
29
|
-
iconRight: string;
|
|
30
|
-
iconThumb: string;
|
|
31
|
-
rootDefault: string;
|
|
32
|
-
rootSmall: string;
|
|
33
|
-
rootText: string;
|
|
34
|
-
rootTextSmall: string;
|
|
35
|
-
textSizer: string;
|
|
36
|
-
textSizerSmall: string;
|
|
37
|
-
thumbDefault: string;
|
|
38
|
-
thumbSmall: string;
|
|
39
|
-
};
|
|
40
|
-
export {};
|
|
22
|
+
export { switchStyles };
|
|
41
23
|
//# sourceMappingURL=atoms.d.mts.map
|
package/es/Switch/atoms.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { toDataAttributes } from "../utils/bem.mjs";
|
|
3
|
-
import { styleProps } from "../styles/stylex/props.mjs";
|
|
4
|
-
import { focusRing } from "../styles/stylex/focusRing.mjs";
|
|
5
2
|
import { useControlledState } from "../hooks/useControlledState.mjs";
|
|
3
|
+
import { focusRing } from "../styles/stylex/focusRing.mjs";
|
|
4
|
+
import { styleProps } from "../styles/stylex/props.mjs";
|
|
5
|
+
import { toDataAttributes } from "../utils/bem.mjs";
|
|
6
6
|
import { switchMarker } from "./marker.stylex.mjs";
|
|
7
7
|
import { switchClasses } from "./stable.mjs";
|
|
8
|
-
import { styles } from "./style.mjs";
|
|
8
|
+
import { styles, switchStyles } from "./style.mjs";
|
|
9
9
|
import clsx$1 from "clsx";
|
|
10
10
|
import { createContext, use, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
import * as stylex from "@stylexjs/stylex";
|
|
13
12
|
import { Switch } from "@base-ui/react/switch";
|
|
14
13
|
import { animate, motionValue } from "motion";
|
|
15
14
|
// src/Switch/atoms.tsx
|
|
@@ -210,12 +209,6 @@ const SwitchIcon = ({ children, className, position, size: _size, style, ...rest
|
|
|
210
209
|
});
|
|
211
210
|
};
|
|
212
211
|
SwitchIcon.displayName = "SwitchIcon";
|
|
213
|
-
const switchClassNames = Object.fromEntries(Object.entries(styles).map(([key, value]) => [key, stylex.props(value).className ?? ""]));
|
|
214
|
-
const switchStyles = {
|
|
215
|
-
...switchClassNames,
|
|
216
|
-
iconLeftSmall: switchClassNames.iconLeft,
|
|
217
|
-
iconRightSmall: switchClassNames.iconRight
|
|
218
|
-
};
|
|
219
212
|
export { SwitchIcon, SwitchRoot, SwitchThumb, switchStyles, useSwitchContext };
|
|
220
213
|
|
|
221
214
|
//# sourceMappingURL=atoms.mjs.map
|
package/es/Switch/atoms.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.mjs","names":["clsx"],"sources":["../../src/Switch/atoms.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport { Switch } from '@base-ui/react/switch';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { animate, motionValue } from 'motion';\nimport type { CSSProperties, KeyboardEvent, MouseEvent, PointerEvent } from 'react';\nimport { createContext, use, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { useControlledState } from '@/hooks/useControlledState';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { switchMarker } from './marker.stylex';\nimport { switchClasses } from './stable';\nimport { styles } from './style';\nimport type {\n SwitchChangeEventHandler,\n SwitchContextType,\n SwitchIconPosition,\n SwitchIconProps,\n SwitchRootProps,\n SwitchSize,\n SwitchThumbProps,\n} from './type';\n\nconst THUMB_METRICS: Record<\n SwitchSize,\n { checkedX: number; pressedCheckedX: number; pressedWidth: number; width: number }\n> = {\n default: { checkedX: 14, pressedCheckedX: 10, pressedWidth: 22, width: 18 },\n small: { checkedX: 12, pressedCheckedX: 8, pressedWidth: 16, width: 12 },\n};\n\nconst rootSizeStyles = { default: styles.rootDefault, small: styles.rootSmall };\nconst thumbSizeStyles = { default: styles.thumbDefault, small: styles.thumbSmall };\n\nconst THUMB_SPRING = { damping: 24, stiffness: 360, type: 'spring' as const };\n\nconst SwitchContext = createContext<SwitchContextType | null>(null);\n\nexport const useSwitchContext = () => {\n const context = use(SwitchContext);\n if (!context) {\n throw new Error('useSwitchContext must be used within a SwitchRoot');\n }\n return context;\n};\n\ntype SwitchRootInternalProps = Omit<SwitchRootProps, 'onCheckedChange' | 'onClick'> & {\n onCheckedChange?: SwitchChangeEventHandler;\n onClick?: SwitchChangeEventHandler;\n xstyle?: stylex.StyleXStyles;\n};\n\nexport const SwitchRoot = ({\n checked,\n className,\n defaultChecked,\n onCheckedChange,\n onClick,\n onKeyDown,\n onKeyUp,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n size = 'default',\n children,\n disabled,\n readOnly,\n required,\n inputRef,\n id,\n name,\n style,\n xstyle,\n ...rest\n}: SwitchRootInternalProps) => {\n const [isPressed, setIsPressed] = useState(false);\n const lastEventRef = useRef<MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>>(\n null,\n );\n\n const [isChecked, setIsChecked] = useControlledState(defaultChecked ?? false, {\n defaultValue: defaultChecked,\n onChange: (value: boolean) => {\n if (lastEventRef.current) {\n onCheckedChange?.(value, lastEventRef.current);\n }\n },\n value: checked,\n });\n\n const contextValue = useMemo(\n () => ({\n isChecked: Boolean(isChecked),\n isPressed,\n setIsChecked: (value: boolean) => setIsChecked(value),\n setIsPressed,\n }),\n [isChecked, isPressed, setIsChecked],\n );\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n lastEventRef.current = event;\n onClick?.(!isChecked, event);\n };\n\n const isInteractive = !disabled && !readOnly;\n\n const handleKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n lastEventRef.current = event;\n }\n if (event.key === ' ' && isInteractive) {\n setIsPressed(true);\n }\n onKeyDown?.(event);\n };\n\n const handleKeyUp = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === ' ') {\n setIsPressed(false);\n }\n onKeyUp?.(event);\n };\n\n const handlePointerDown = (event: PointerEvent<HTMLButtonElement>) => {\n if (isInteractive) {\n setIsPressed(true);\n }\n onPointerDown?.(event);\n };\n\n const handlePointerUp = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerUp?.(event);\n };\n\n const handlePointerCancel = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerCancel?.(event);\n };\n\n const handlePointerLeave = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerLeave?.(event);\n };\n\n return (\n <SwitchContext value={contextValue}>\n <Switch.Root\n nativeButton\n checked={isChecked}\n defaultChecked={defaultChecked}\n disabled={disabled}\n id={id}\n inputRef={inputRef}\n name={name}\n readOnly={readOnly}\n required={required}\n render={\n <button\n {...toDataAttributes({ size })}\n {...rest}\n {...styleProps(\n [switchMarker, focusRing.info, styles.root, rootSizeStyles[size], xstyle],\n clsx(switchClasses(), className),\n style,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onPointerCancel={handlePointerCancel}\n onPointerDown={handlePointerDown}\n onPointerLeave={handlePointerLeave}\n onPointerUp={handlePointerUp}\n />\n }\n onCheckedChange={setIsChecked}\n >\n {children}\n </Switch.Root>\n </SwitchContext>\n );\n};\n\nSwitchRoot.displayName = 'SwitchRoot';\n\nexport const SwitchThumb = ({\n className,\n size = 'default',\n style,\n children,\n ...rest\n}: SwitchThumbProps) => {\n const { isChecked, isPressed } = useSwitchContext();\n const ref = useRef<HTMLSpanElement>(null);\n\n const metrics = THUMB_METRICS[size];\n // Track travel: the fixed metric, or the measured width when the root grows (inner text).\n const [travel, setTravel] = useState(metrics.checkedX);\n useLayoutEffect(() => {\n const root = ref.current?.parentElement;\n if (!root) return;\n const measure = () => {\n const width = root.clientWidth;\n // root padding 2px each side\n setTravel(\n width > 0 ? Math.max(metrics.checkedX, width - 4 - metrics.width) : metrics.checkedX,\n );\n };\n measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(root);\n return () => observer.disconnect();\n }, [metrics]);\n const extra = travel - metrics.checkedX;\n const targetX = isChecked ? (isPressed ? metrics.pressedCheckedX : metrics.checkedX) + extra : 0;\n const targetWidth = isPressed ? metrics.pressedWidth : metrics.width;\n\n const [values] = useState(() => ({\n width: motionValue(targetWidth),\n x: motionValue(targetX),\n }));\n\n // animated keys stay referentially stable so React never rewrites mid-flight inline values\n const [initialStyle] = useState<CSSProperties>(\n () => ({ '--switch-x': `${targetX}px`, 'width': targetWidth }) as CSSProperties,\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const unsubscribeX = values.x.on('change', (x) => {\n el.style.setProperty('--switch-x', `${x}px`);\n });\n const unsubscribeWidth = values.width.on('change', (width) => {\n el.style.setProperty('width', `${width}px`);\n });\n return () => {\n unsubscribeX();\n unsubscribeWidth();\n };\n }, [values]);\n\n useEffect(() => {\n const reduceMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n const transition = reduceMotion ? { duration: 0 } : THUMB_SPRING;\n const animations = [\n animate(values.x, targetX, transition),\n animate(values.width, targetWidth, transition),\n ];\n return () => {\n for (const animation of animations) animation.stop();\n };\n }, [values, targetX, targetWidth]);\n\n return (\n <Switch.Thumb\n render={\n <span\n {...rest}\n ref={ref}\n {...styleProps(\n [styles.thumb, thumbSizeStyles[size]],\n clsx(switchClasses('thumb'), className),\n {\n ...initialStyle,\n ...style,\n },\n )}\n >\n {children}\n </span>\n }\n />\n );\n};\n\nSwitchThumb.displayName = 'SwitchThumb';\n\nconst iconPositionStyles: Record<SwitchIconPosition, stylex.StyleXStyles> = {\n left: styles.iconLeft,\n right: styles.iconRight,\n thumb: styles.iconThumb,\n};\n\nexport const SwitchIcon = ({\n children,\n className,\n position,\n size: _size,\n style,\n ...rest\n}: SwitchIconProps) => {\n return (\n <span\n {...styleProps(\n [styles.icon, iconPositionStyles[position]],\n clsx(switchClasses('content'), className),\n style,\n )}\n {...rest}\n >\n {children}\n </span>\n );\n};\n\nSwitchIcon.displayName = 'SwitchIcon';\n\nconst switchClassNames = Object.fromEntries(\n Object.entries(styles).map(([key, value]) => [key, stylex.props(value).className ?? '']),\n) as Record<keyof typeof styles, string>;\n\nexport const switchStyles = {\n ...switchClassNames,\n iconLeftSmall: switchClassNames.iconLeft,\n iconRightSmall: switchClassNames.iconRight,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,gBAKD;CACH,SAAS;EACP,UAAU;EACV,iBAAiB;EACjB,cAAc;EACd,OAAO;CACT;CACA,OAAO;EACL,UAAU;EACV,iBAAiB;EACjB,cAAc;EACd,OAAO;CACT;AACF;AACA,MAAM,iBAAiB;CACrB,SAAS,OAAO;CAChB,OAAO,OAAO;AAChB;AACA,MAAM,kBAAkB;CACtB,SAAS,OAAO;CAChB,OAAO,OAAO;AAChB;AACA,MAAM,eAAe;CACnB,SAAS;CACT,WAAW;CACX,MAAM;AACR;AACA,MAAM,gBAAgB,cAAwC,IAAI;AAClE,MAAa,yBAAyB;CACpC,MAAM,UAAU,IAAI,aAAa;CACjC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,OAAO;AACT;AAMA,MAAa,cAAc,EACzB,SACA,WACA,gBACA,iBACA,SACA,WACA,SACA,iBACA,eACA,gBACA,aACA,OAAO,WACP,UACA,UACA,UACA,UACA,UACA,IACA,MACA,OACA,QACA,GAAG,WAC0B;CAC7B,MAAM,CAAC,WAAW,gBAAgB,SAAS,KAAK;CAChD,MAAM,eAAe,OAAyE,IAAI;CAClG,MAAM,CAAC,WAAW,gBAAgB,mBAAmB,kBAAkB,OAAO;EAC5E,cAAc;EACd,WAAW,UAAmB;GAC5B,IAAI,aAAa,SACf,kBAAkB,OAAO,aAAa,OAAO;EAEjD;EACA,OAAO;CACT,CAAC;CACD,MAAM,eAAe,eAAe;EAClC,WAAW,QAAQ,SAAS;EAC5B;EACA,eAAe,UAAmB,aAAa,KAAK;EACpD;CACF,IAAI;EAAC;EAAW;EAAW;CAAY,CAAC;CACxC,MAAM,eAAe,UAAyC;EAC5D,aA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AC,WAAW,QACtD,EAChC,UAAU,EACZ,IAAI;EACJ,MAAM,aAAa,CAAC,QAAQ,OAAO,GAAG,SAAS,UAAU,GAAG,QAAQ,OAAO,OAAO,aAAa,UAAU,CAAC;EAC1G,aAAa;GACX,KAAK,MAAM,aAAa,YAAY,UAAU,KAAK;EACrD;CACF,GAAG;EAAC;EAAQ;EAAS;CAAW,CAAC;CACjC,OAAO,oBAAC,OAAO,OAAR,EAAc,QAAQ,oBAAC,QAAD;EAAM,GAAI;EAAW;EAAK,GAAI,WAAW,CAAC,OAAO,OAAO,gBAAgB,KAAK,GAAGA,OAAK,cAAc,OAAO,GAAG,SAAS,GAAG;GACpJ,GAAG;GACH,GAAG;EACL,CAAC;EACQ;CACG,CAAA,EAAI,CAAA;AAClB;AACA,YAAY,cAAc;AAC1B,MAAM,qBAAsE;CAC1E,MAAM,OAAO;CACb,OAAO,OAAO;CACd,OAAO,OAAO;AAChB;AACA,MAAa,cAAc,EACzB,UACA,WACA,UACA,MAAM,OACN,OACA,GAAG,WACkB;CACrB,OAAO,oBAAC,QAAD;EAAM,GAAI,WAAW,CAAC,OAAO,MAAM,mBAAmB,SAAS,GAAGA,OAAK,cAAc,SAAS,GAAG,SAAS,GAAG,KAAK;EAAG,GAAI;EAC3H;CACG,CAAA;AACV;AACA,WAAW,cAAc;AACzB,MAAM,mBAAmB,OAAO,YAAY,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,OAAO,MAAM,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC;AACpI,MAAa,eAAe;CAC1B,GAAG;CACH,eAAe,iBAAiB;CAChC,gBAAgB,iBAAiB;AACnC"}
|
|
1
|
+
{"version":3,"file":"atoms.mjs","names":["clsx"],"sources":["../../src/Switch/atoms.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport { Switch } from '@base-ui/react/switch';\nimport type * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { animate, motionValue } from 'motion';\nimport type { CSSProperties, KeyboardEvent, MouseEvent, PointerEvent } from 'react';\nimport { createContext, use, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { useControlledState } from '@/hooks/useControlledState';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { switchMarker } from './marker.stylex';\nimport { switchClasses } from './stable';\nimport { styles } from './style';\nimport type {\n SwitchChangeEventHandler,\n SwitchContextType,\n SwitchIconPosition,\n SwitchIconProps,\n SwitchRootProps,\n SwitchSize,\n SwitchThumbProps,\n} from './type';\n\nconst THUMB_METRICS: Record<\n SwitchSize,\n { checkedX: number; pressedCheckedX: number; pressedWidth: number; width: number }\n> = {\n default: { checkedX: 14, pressedCheckedX: 10, pressedWidth: 22, width: 18 },\n small: { checkedX: 12, pressedCheckedX: 8, pressedWidth: 16, width: 12 },\n};\n\nconst rootSizeStyles = { default: styles.rootDefault, small: styles.rootSmall };\nconst thumbSizeStyles = { default: styles.thumbDefault, small: styles.thumbSmall };\n\nconst THUMB_SPRING = { damping: 24, stiffness: 360, type: 'spring' as const };\n\nconst SwitchContext = createContext<SwitchContextType | null>(null);\n\nexport const useSwitchContext = () => {\n const context = use(SwitchContext);\n if (!context) {\n throw new Error('useSwitchContext must be used within a SwitchRoot');\n }\n return context;\n};\n\ntype SwitchRootInternalProps = Omit<SwitchRootProps, 'onCheckedChange' | 'onClick'> & {\n onCheckedChange?: SwitchChangeEventHandler;\n onClick?: SwitchChangeEventHandler;\n xstyle?: stylex.StyleXStyles;\n};\n\nexport const SwitchRoot = ({\n checked,\n className,\n defaultChecked,\n onCheckedChange,\n onClick,\n onKeyDown,\n onKeyUp,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n size = 'default',\n children,\n disabled,\n readOnly,\n required,\n inputRef,\n id,\n name,\n style,\n xstyle,\n ...rest\n}: SwitchRootInternalProps) => {\n const [isPressed, setIsPressed] = useState(false);\n const lastEventRef = useRef<MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>>(\n null,\n );\n\n const [isChecked, setIsChecked] = useControlledState(defaultChecked ?? false, {\n defaultValue: defaultChecked,\n onChange: (value: boolean) => {\n if (lastEventRef.current) {\n onCheckedChange?.(value, lastEventRef.current);\n }\n },\n value: checked,\n });\n\n const contextValue = useMemo(\n () => ({\n isChecked: Boolean(isChecked),\n isPressed,\n setIsChecked: (value: boolean) => setIsChecked(value),\n setIsPressed,\n }),\n [isChecked, isPressed, setIsChecked],\n );\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n lastEventRef.current = event;\n onClick?.(!isChecked, event);\n };\n\n const isInteractive = !disabled && !readOnly;\n\n const handleKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n lastEventRef.current = event;\n }\n if (event.key === ' ' && isInteractive) {\n setIsPressed(true);\n }\n onKeyDown?.(event);\n };\n\n const handleKeyUp = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === ' ') {\n setIsPressed(false);\n }\n onKeyUp?.(event);\n };\n\n const handlePointerDown = (event: PointerEvent<HTMLButtonElement>) => {\n if (isInteractive) {\n setIsPressed(true);\n }\n onPointerDown?.(event);\n };\n\n const handlePointerUp = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerUp?.(event);\n };\n\n const handlePointerCancel = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerCancel?.(event);\n };\n\n const handlePointerLeave = (event: PointerEvent<HTMLButtonElement>) => {\n setIsPressed(false);\n onPointerLeave?.(event);\n };\n\n return (\n <SwitchContext value={contextValue}>\n <Switch.Root\n nativeButton\n checked={isChecked}\n defaultChecked={defaultChecked}\n disabled={disabled}\n id={id}\n inputRef={inputRef}\n name={name}\n readOnly={readOnly}\n required={required}\n render={\n <button\n {...toDataAttributes({ size })}\n {...rest}\n {...styleProps(\n [switchMarker, focusRing.info, styles.root, rootSizeStyles[size], xstyle],\n clsx(switchClasses(), className),\n style,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onPointerCancel={handlePointerCancel}\n onPointerDown={handlePointerDown}\n onPointerLeave={handlePointerLeave}\n onPointerUp={handlePointerUp}\n />\n }\n onCheckedChange={setIsChecked}\n >\n {children}\n </Switch.Root>\n </SwitchContext>\n );\n};\n\nSwitchRoot.displayName = 'SwitchRoot';\n\nexport const SwitchThumb = ({\n className,\n size = 'default',\n style,\n children,\n ...rest\n}: SwitchThumbProps) => {\n const { isChecked, isPressed } = useSwitchContext();\n const ref = useRef<HTMLSpanElement>(null);\n\n const metrics = THUMB_METRICS[size];\n // Track travel: the fixed metric, or the measured width when the root grows (inner text).\n const [travel, setTravel] = useState(metrics.checkedX);\n useLayoutEffect(() => {\n const root = ref.current?.parentElement;\n if (!root) return;\n const measure = () => {\n const width = root.clientWidth;\n // root padding 2px each side\n setTravel(\n width > 0 ? Math.max(metrics.checkedX, width - 4 - metrics.width) : metrics.checkedX,\n );\n };\n measure();\n if (typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(root);\n return () => observer.disconnect();\n }, [metrics]);\n const extra = travel - metrics.checkedX;\n const targetX = isChecked ? (isPressed ? metrics.pressedCheckedX : metrics.checkedX) + extra : 0;\n const targetWidth = isPressed ? metrics.pressedWidth : metrics.width;\n\n const [values] = useState(() => ({\n width: motionValue(targetWidth),\n x: motionValue(targetX),\n }));\n\n // animated keys stay referentially stable so React never rewrites mid-flight inline values\n const [initialStyle] = useState<CSSProperties>(\n () => ({ '--switch-x': `${targetX}px`, 'width': targetWidth }) as CSSProperties,\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const unsubscribeX = values.x.on('change', (x) => {\n el.style.setProperty('--switch-x', `${x}px`);\n });\n const unsubscribeWidth = values.width.on('change', (width) => {\n el.style.setProperty('width', `${width}px`);\n });\n return () => {\n unsubscribeX();\n unsubscribeWidth();\n };\n }, [values]);\n\n useEffect(() => {\n const reduceMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n const transition = reduceMotion ? { duration: 0 } : THUMB_SPRING;\n const animations = [\n animate(values.x, targetX, transition),\n animate(values.width, targetWidth, transition),\n ];\n return () => {\n for (const animation of animations) animation.stop();\n };\n }, [values, targetX, targetWidth]);\n\n return (\n <Switch.Thumb\n render={\n <span\n {...rest}\n ref={ref}\n {...styleProps(\n [styles.thumb, thumbSizeStyles[size]],\n clsx(switchClasses('thumb'), className),\n {\n ...initialStyle,\n ...style,\n },\n )}\n >\n {children}\n </span>\n }\n />\n );\n};\n\nSwitchThumb.displayName = 'SwitchThumb';\n\nconst iconPositionStyles: Record<SwitchIconPosition, stylex.StyleXStyles> = {\n left: styles.iconLeft,\n right: styles.iconRight,\n thumb: styles.iconThumb,\n};\n\nexport const SwitchIcon = ({\n children,\n className,\n position,\n size: _size,\n style,\n ...rest\n}: SwitchIconProps) => {\n return (\n <span\n {...styleProps(\n [styles.icon, iconPositionStyles[position]],\n clsx(switchClasses('content'), className),\n style,\n )}\n {...rest}\n >\n {children}\n </span>\n );\n};\n\nSwitchIcon.displayName = 'SwitchIcon';\n\nexport { switchStyles } from './style';\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,gBAKD;CACH,SAAS;EACP,UAAU;EACV,iBAAiB;EACjB,cAAc;EACd,OAAO;CACT;CACA,OAAO;EACL,UAAU;EACV,iBAAiB;EACjB,cAAc;EACd,OAAO;CACT;AACF;AACA,MAAM,iBAAiB;CACrB,SAAS,OAAO;CAChB,OAAO,OAAO;AAChB;AACA,MAAM,kBAAkB;CACtB,SAAS,OAAO;CAChB,OAAO,OAAO;AAChB;AACA,MAAM,eAAe;CACnB,SAAS;CACT,WAAW;CACX,MAAM;AACR;AACA,MAAM,gBAAgB,cAAwC,IAAI;AAClE,MAAa,yBAAyB;CACpC,MAAM,UA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Ac,EACzB,UACA,WACA,UACA,MAAM,OACN,OACA,GAAG,WACkB;CACrB,OAAO,oBAAC,QAAD;EAAM,GAAI,WAAW,CAAC,OAAO,MAAM,mBAAmB,SAAS,GAAGA,OAAK,cAAc,SAAS,GAAG,SAAS,GAAG,KAAK;EAAG,GAAI;EAC3H;CACG,CAAA;AACV;AACA,WAAW,cAAc"}
|
package/es/Switch/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SwitchIcon, SwitchRoot, SwitchThumb, useSwitchContext } from "./atoms.mjs";
|
|
2
|
+
import { switchStyles } from "./style.mjs";
|
|
3
3
|
import Switch from "./Switch.mjs";
|
|
4
|
+
import { SwitchChangeEventHandler, SwitchClassNames, SwitchClickEventHandler, SwitchContextType, SwitchIconPosition, SwitchIconProps, SwitchProps, SwitchRootProps, SwitchSize, SwitchStyles, SwitchThumbProps } from "./type.mjs";
|
|
4
5
|
export { type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, Switch as default, switchStyles, useSwitchContext };
|
package/es/Switch/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { switchStyles } from "./style.mjs";
|
|
2
|
+
import { SwitchIcon, SwitchRoot, SwitchThumb, useSwitchContext } from "./atoms.mjs";
|
|
2
3
|
import Switch from "./Switch.mjs";
|
|
3
4
|
export { SwitchIcon, SwitchRoot, SwitchThumb, Switch as default, switchStyles, useSwitchContext };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "@stylexjs/stylex";
|
|
2
|
+
export declare const switchStyles: {
|
|
3
|
+
icon: string;
|
|
4
|
+
iconLeft: string;
|
|
5
|
+
iconRight: string;
|
|
6
|
+
iconThumb: string;
|
|
7
|
+
loading: string;
|
|
8
|
+
root: string;
|
|
9
|
+
rootDefault: string;
|
|
10
|
+
rootSmall: string;
|
|
11
|
+
rootText: string;
|
|
12
|
+
rootTextSmall: string;
|
|
13
|
+
textSizer: string;
|
|
14
|
+
textSizerSmall: string;
|
|
15
|
+
thumb: string;
|
|
16
|
+
thumbDefault: string;
|
|
17
|
+
thumbSmall: string;
|
|
18
|
+
iconLeftSmall: string;
|
|
19
|
+
iconRightSmall: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=style.d.mts.map
|
package/es/Switch/style.mjs
CHANGED
|
@@ -128,6 +128,25 @@ const styles = {
|
|
|
128
128
|
$$css: true
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
const switchStyles = {
|
|
132
|
+
icon: { className: "lb10no89f lbaqpy6h lb6s0dn4 lb15g0kca lb78zum5 lbl56j7k lb47corl lb10l6tqk lb12w9bfk lbuxw1ft" }.className ?? "",
|
|
133
|
+
iconLeft: { className: "lbjwk6fx lbg01cxk lbqtmd8e lb1t448cz lb1gshqrl" }.className ?? "",
|
|
134
|
+
iconRight: { className: "lb1inkcgm lb12foe86 lb1t60ft6" }.className ?? "",
|
|
135
|
+
iconThumb: { className: "lbh3736h lb1saa4dr lb16owwnm lb1n2onr6 lb1c071of" }.className ?? "",
|
|
136
|
+
loading: { className: "lb1q3qbx4 lb1u6grsq lba4qsjk lbb6ayas lb1esw782" }.className ?? "",
|
|
137
|
+
root: { className: "lb1i3ajwb lb181nr7w lb1xwekrv lbng3xce lbc342km lb1a2a7pz lbb3r6kr lbr3aam3 lb6s0dn4 lbjjy28o lb1ljx72h lb1j7gpvn lbx0eq3e lb11a9emz lb19y05k0 lb9f619 lb1ypdohk lb5ezrf1 lb3nfvp2 lb1nhvcw1 lb1k4xm7o lb1n2onr6 lb12w9bfk lb87ps6o" }.className ?? "",
|
|
138
|
+
rootDefault: { className: "lb17rw0jw lb15hfatp lb14qfxbe" }.className ?? "",
|
|
139
|
+
rootSmall: { className: "lblup9mm lb1264ykn lbgd8bvy" }.className ?? "",
|
|
140
|
+
rootText: { className: "lbfifm61 lbo5v014 lb1nb6za0 lb14atkfc" }.className ?? "",
|
|
141
|
+
rootTextSmall: { className: "lb1k6wstc lbo5v014 lb46jg8d lb14atkfc" }.className ?? "",
|
|
142
|
+
textSizer: { className: "lb1okw0bk lbrvj5dj lb9ek82g lb11lfxj5 lb13jy36j lb47corl lblshs6z lbuxw1ft" }.className ?? "",
|
|
143
|
+
textSizerSmall: { className: "lb14vy60q lbf7dkkf" }.className ?? "",
|
|
144
|
+
thumb: { className: "lb16rqkct lbxj5fsl lb6s0dn4 lb6yijhg lb1oicym lbiy1ocm lb4g9y83 lb78zum5 lb2lah0s lbl56j7k lb1u2ey76 lb12w9bfk" }.className ?? "",
|
|
145
|
+
thumbDefault: { className: "lbmix8c7 lb1xp8n7a" }.className ?? "",
|
|
146
|
+
thumbSmall: { className: "lb1kpxq89 lbsmyaan" }.className ?? "",
|
|
147
|
+
iconLeftSmall: { className: "lbjwk6fx lbg01cxk lbqtmd8e lb1t448cz lb1gshqrl" }.className ?? "",
|
|
148
|
+
iconRightSmall: { className: "lb1inkcgm lb12foe86 lb1t60ft6" }.className ?? ""
|
|
149
|
+
};
|
|
150
|
+
export { styles, switchStyles };
|
|
132
151
|
|
|
133
152
|
//# sourceMappingURL=style.mjs.map
|
package/es/Switch/style.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Switch/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { switchMarker } from './marker.stylex';\n\nconst loadingSpin = stylex.keyframes({\n '0%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(360deg)' },\n});\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst enabledHover = ':hover:not([data-disabled])';\n\nexport const styles = stylex.create({\n icon: {\n insetBlock: 0,\n transition: `opacity 200ms ${cssVar.motionEaseOut}, scale 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n color: cssVar.colorBgLayout,\n display: 'flex',\n justifyContent: 'center',\n pointerEvents: 'none',\n position: 'absolute',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n whiteSpace: 'nowrap',\n },\n iconLeft: {\n insetInlineStart: 7,\n opacity: { default: 0, [stylex.when.ancestor('[data-checked]', switchMarker)]: 1 },\n scale: { default: 0, [stylex.when.ancestor('[data-checked]', switchMarker)]: 1 },\n },\n iconRight: {\n insetInlineEnd: 7,\n opacity: { default: null, [stylex.when.ancestor('[data-checked]', switchMarker)]: 0 },\n scale: { default: null, [stylex.when.ancestor('[data-checked]', switchMarker)]: 0 },\n },\n iconThumb: {\n inset: 'unset',\n insetBlock: 'unset',\n color: cssVar.colorPrimary,\n position: 'relative',\n transform: 'none',\n },\n loading: {\n animationDuration: { default: '1s', [reducedMotion]: '0s' },\n animationIterationCount: 'infinite',\n animationName: loadingSpin,\n animationTimingFunction: 'linear',\n },\n root: {\n padding: 2,\n borderColor: 'currentcolor',\n borderRadius: 100,\n borderStyle: 'none',\n borderWidth: 0,\n outline: 'none',\n overflow: 'hidden',\n transition: `background 200ms ${cssVar.motionEaseOut}, box-shadow 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n backgroundColor: {\n 'default': cssVar.colorFillSecondary,\n [enabledHover]: cssVar.colorFill,\n ':is([data-checked])': cssVar.colorPrimary,\n ':is([data-checked]):hover:not([data-disabled])': cssVar.colorPrimaryHover,\n },\n boxShadow: {\n 'default': 'inset 0 1.5px 2px rgb(0 0 0 / 8%)',\n ':is([data-checked])': 'inset 0 1.5px 3px rgb(0 0 0 / 18%)',\n },\n boxSizing: 'border-box',\n cursor: { 'default': 'pointer', ':is([data-disabled])': 'not-allowed' },\n display: 'inline-flex',\n justifyContent: 'flex-start',\n opacity: { 'default': null, ':is([data-disabled])': 0.45 },\n position: 'relative',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n userSelect: 'none',\n },\n rootDefault: {\n height: 22,\n minWidth: 36,\n width: 36,\n },\n rootSmall: {\n height: 16,\n minWidth: 28,\n width: 28,\n },\n rootText: {\n fontSize: 12,\n lineHeight: 1,\n minWidth: 44,\n width: 'auto',\n },\n rootTextSmall: {\n fontSize: 10,\n lineHeight: 1,\n minWidth: 32,\n width: 'auto',\n },\n textSizer: {\n flex: 'none',\n display: 'grid',\n order: 1,\n paddingInlineEnd: '4px',\n paddingInlineStart: '24px',\n pointerEvents: 'none',\n visibility: 'hidden',\n whiteSpace: 'nowrap',\n },\n textSizerSmall: {\n paddingInlineEnd: '2px',\n paddingInlineStart: '16px',\n },\n thumb: {\n borderRadius: '50%',\n transition: `box-shadow 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: {\n 'default':\n '0 0 0 0.5px rgb(0 0 0 / 4%), 0 1px 1px rgb(0 0 0 / 6%), 0 3px 8px rgb(0 30 80 / 16%)',\n ':is([data-disabled])': 'none',\n [stylex.when.ancestor(enabledHover, switchMarker)]:\n '0 0 0 0.5px rgb(0 0 0 / 4%), 0 1px 1px rgb(0 0 0 / 8%), 0 6px 14px rgb(0 30 80 / 24%)',\n },\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n transform: 'translateX(calc(var(--switch-x, 0px) * var(--switch-dir, 1)))',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n },\n thumbDefault: {\n height: 18,\n width: 18,\n },\n thumbSmall: {\n height: 12,\n width: 12,\n },\n});\n"],"mappings":";AAQA,MAAa,SAAS;CACpB,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,UAAU;EACR,QAAQ;EACR,QAAQ;EAC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":"style.mjs","names":[],"sources":["../../src/Switch/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { switchMarker } from './marker.stylex';\n\nconst loadingSpin = stylex.keyframes({\n '0%': { transform: 'rotate(0deg)' },\n '100%': { transform: 'rotate(360deg)' },\n});\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst enabledHover = ':hover:not([data-disabled])';\n\nexport const styles = stylex.create({\n icon: {\n insetBlock: 0,\n transition: `opacity 200ms ${cssVar.motionEaseOut}, scale 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n color: cssVar.colorBgLayout,\n display: 'flex',\n justifyContent: 'center',\n pointerEvents: 'none',\n position: 'absolute',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n whiteSpace: 'nowrap',\n },\n iconLeft: {\n insetInlineStart: 7,\n opacity: { default: 0, [stylex.when.ancestor('[data-checked]', switchMarker)]: 1 },\n scale: { default: 0, [stylex.when.ancestor('[data-checked]', switchMarker)]: 1 },\n },\n iconRight: {\n insetInlineEnd: 7,\n opacity: { default: null, [stylex.when.ancestor('[data-checked]', switchMarker)]: 0 },\n scale: { default: null, [stylex.when.ancestor('[data-checked]', switchMarker)]: 0 },\n },\n iconThumb: {\n inset: 'unset',\n insetBlock: 'unset',\n color: cssVar.colorPrimary,\n position: 'relative',\n transform: 'none',\n },\n loading: {\n animationDuration: { default: '1s', [reducedMotion]: '0s' },\n animationIterationCount: 'infinite',\n animationName: loadingSpin,\n animationTimingFunction: 'linear',\n },\n root: {\n padding: 2,\n borderColor: 'currentcolor',\n borderRadius: 100,\n borderStyle: 'none',\n borderWidth: 0,\n outline: 'none',\n overflow: 'hidden',\n transition: `background 200ms ${cssVar.motionEaseOut}, box-shadow 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n backgroundColor: {\n 'default': cssVar.colorFillSecondary,\n [enabledHover]: cssVar.colorFill,\n ':is([data-checked])': cssVar.colorPrimary,\n ':is([data-checked]):hover:not([data-disabled])': cssVar.colorPrimaryHover,\n },\n boxShadow: {\n 'default': 'inset 0 1.5px 2px rgb(0 0 0 / 8%)',\n ':is([data-checked])': 'inset 0 1.5px 3px rgb(0 0 0 / 18%)',\n },\n boxSizing: 'border-box',\n cursor: { 'default': 'pointer', ':is([data-disabled])': 'not-allowed' },\n display: 'inline-flex',\n justifyContent: 'flex-start',\n opacity: { 'default': null, ':is([data-disabled])': 0.45 },\n position: 'relative',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n userSelect: 'none',\n },\n rootDefault: {\n height: 22,\n minWidth: 36,\n width: 36,\n },\n rootSmall: {\n height: 16,\n minWidth: 28,\n width: 28,\n },\n rootText: {\n fontSize: 12,\n lineHeight: 1,\n minWidth: 44,\n width: 'auto',\n },\n rootTextSmall: {\n fontSize: 10,\n lineHeight: 1,\n minWidth: 32,\n width: 'auto',\n },\n textSizer: {\n flex: 'none',\n display: 'grid',\n order: 1,\n paddingInlineEnd: '4px',\n paddingInlineStart: '24px',\n pointerEvents: 'none',\n visibility: 'hidden',\n whiteSpace: 'nowrap',\n },\n textSizerSmall: {\n paddingInlineEnd: '2px',\n paddingInlineStart: '16px',\n },\n thumb: {\n borderRadius: '50%',\n transition: `box-shadow 200ms ${cssVar.motionEaseOut}`,\n alignItems: 'center',\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: {\n 'default':\n '0 0 0 0.5px rgb(0 0 0 / 4%), 0 1px 1px rgb(0 0 0 / 6%), 0 3px 8px rgb(0 30 80 / 16%)',\n ':is([data-disabled])': 'none',\n [stylex.when.ancestor(enabledHover, switchMarker)]:\n '0 0 0 0.5px rgb(0 0 0 / 4%), 0 1px 1px rgb(0 0 0 / 8%), 0 6px 14px rgb(0 30 80 / 24%)',\n },\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n transform: 'translateX(calc(var(--switch-x, 0px) * var(--switch-dir, 1)))',\n transitionDuration: { default: null, [reducedMotion]: '0s' },\n },\n thumbDefault: {\n height: 18,\n width: 18,\n },\n thumbSmall: {\n height: 12,\n width: 12,\n },\n});\n\nexport const switchStyles = {\n icon: stylex.props(styles.icon).className ?? '',\n iconLeft: stylex.props(styles.iconLeft).className ?? '',\n iconRight: stylex.props(styles.iconRight).className ?? '',\n iconThumb: stylex.props(styles.iconThumb).className ?? '',\n loading: stylex.props(styles.loading).className ?? '',\n root: stylex.props(styles.root).className ?? '',\n rootDefault: stylex.props(styles.rootDefault).className ?? '',\n rootSmall: stylex.props(styles.rootSmall).className ?? '',\n rootText: stylex.props(styles.rootText).className ?? '',\n rootTextSmall: stylex.props(styles.rootTextSmall).className ?? '',\n textSizer: stylex.props(styles.textSizer).className ?? '',\n textSizerSmall: stylex.props(styles.textSizerSmall).className ?? '',\n thumb: stylex.props(styles.thumb).className ?? '',\n thumbDefault: stylex.props(styles.thumbDefault).className ?? '',\n thumbSmall: stylex.props(styles.thumbSmall).className ?? '',\n iconLeftSmall: stylex.props(styles.iconLeft).className ?? '',\n iconRightSmall: stylex.props(styles.iconRight).className ?? '',\n} satisfies Record<keyof typeof styles | 'iconLeftSmall' | 'iconRightSmall', string>;\n"],"mappings":";AAQA,MAAa,SAAS;CACpB,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,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ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W,8BACb,EAAE,aAAa;CACf,UAAU,EACR,WAAW,wCACb,EAAE,aAAa;CACf,eAAe,EACb,WAAW,wCACb,EAAE,aAAa;CACf,WAAW,EACT,WAAW,6EACb,EAAE,aAAa;CACf,gBAAgB,EACd,WAAW,qBACb,EAAE,aAAa;CACf,OAAO,EACL,WAAW,iHACb,EAAE,aAAa;CACf,cAAc,EACZ,WAAW,qBACb,EAAE,aAAa;CACf,YAAY,EACV,WAAW,qBACb,EAAE,aAAa;CACf,eAAe,EACb,WAAW,iDACb,EAAE,aAAa;CACf,gBAAgB,EACd,WAAW,gCACb,EAAE,aAAa;AACjB"}
|
package/es/Table/Table.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TableProps } from "./type.mjs";
|
|
2
1
|
import Column from "./Column.mjs";
|
|
3
2
|
import ColumnGroup from "./ColumnGroup.mjs";
|
|
4
3
|
import "./internal.mjs";
|
|
5
4
|
import { EXPAND_COLUMN } from "./pipeline/columnUtils.mjs";
|
|
6
5
|
import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } from "./pipeline/selectionUtils.mjs";
|
|
7
6
|
import { TableSummary } from "./render/Summary.mjs";
|
|
7
|
+
import { TableProps } from "./type.mjs";
|
|
8
8
|
import { ReactNode } from "react";
|
|
9
9
|
type TableComponent = (<T>(props: TableProps<T>) => ReactNode) & {
|
|
10
10
|
Column: typeof Column;
|
package/es/Table/Table.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useTranslation } from "../i18n/useTranslation.mjs";
|
|
3
2
|
import Block from "../Block/Block.mjs";
|
|
4
3
|
import Empty from "../Empty/Empty.mjs";
|
|
5
|
-
import Spin from "../Spin/Spin.mjs";
|
|
6
|
-
import { PREFIX_CLS } from "./constants.mjs";
|
|
7
4
|
import table_default from "../i18n/resources/en/table.mjs";
|
|
5
|
+
import { useTranslation } from "../i18n/useTranslation.mjs";
|
|
6
|
+
import Spin from "../Spin/Spin.mjs";
|
|
8
7
|
import Column from "./Column.mjs";
|
|
9
8
|
import ColumnGroup from "./ColumnGroup.mjs";
|
|
9
|
+
import { PREFIX_CLS } from "./constants.mjs";
|
|
10
10
|
import { getStickyOffsets } from "./engine/fixed.mjs";
|
|
11
|
-
import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } from "./pipeline/selectionUtils.mjs";
|
|
12
11
|
import { EXPAND_COLUMN } from "./pipeline/columnUtils.mjs";
|
|
12
|
+
import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } from "./pipeline/selectionUtils.mjs";
|
|
13
13
|
import { HeaderContext, SelectionContext, TableViewContext } from "./render/context.mjs";
|
|
14
|
-
import { styles } from "./style.mjs";
|
|
15
14
|
import FixedFrost from "./render/FixedFrost.mjs";
|
|
16
15
|
import TableLoadingSkeleton from "./render/LoadingSkeleton.mjs";
|
|
17
16
|
import { renderPaginationBars } from "./render/PaginationBar.mjs";
|
|
18
17
|
import { TableSummary } from "./render/Summary.mjs";
|
|
19
18
|
import { resolveSticky, toTableRef } from "./render/tableHelpers.mjs";
|
|
20
|
-
import { TableStoreProvider } from "./store/hooks.mjs";
|
|
21
19
|
import TableView from "./render/TableView.mjs";
|
|
22
20
|
import { useViewContexts } from "./render/useViewContexts.mjs";
|
|
23
21
|
import { useStableSemantic } from "./semantic.mjs";
|
|
22
|
+
import { TableStoreProvider } from "./store/hooks.mjs";
|
|
23
|
+
import { styles } from "./style.mjs";
|
|
24
24
|
import { useTableController } from "./useTableController.mjs";
|
|
25
25
|
import clsx$1 from "clsx";
|
|
26
26
|
import { isValidElement, memo, useCallback, useImperativeHandle, useMemo, useRef } from "react";
|
package/es/Table/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./atoms/index.mjs";
|
|
2
2
|
import { TableCell, TableCellProps, TableExpandedRow, TableExpandedRowProps, TableHeaderCell, TableRow, TableRowProps } from "./atoms/cells.mjs";
|
|
3
3
|
import { TableBody, TableColGroup, TableColGroupColumn, TableColGroupProps, TableContainer, TableElement, TableElementProps, TableFooter, TableHeader, TablePartProps, TableRoot, TableRootProps, TableScroll, TableScrollProps, TableSectionProps, TableSummaryFoot, TableTitle } from "./atoms/layout.mjs";
|
|
4
|
-
import "./atoms/index.mjs";
|
|
5
4
|
import { TableColumnProps } from "./Column.mjs";
|
|
6
5
|
import { TableColumnGroupProps } from "./ColumnGroup.mjs";
|
|
7
6
|
import Table from "./Table.mjs";
|
|
7
|
+
import { FilterValue, SortOrder, TableBreakpoint, TableCellAttributes, TableClassNames, TableColumn, TableColumnAlign, TableColumnEllipsis, TableColumnFilterItem, TableColumnFixed, TableColumnGroupType, TableColumnSorter, TableColumnTitle, TableColumnTitleProps, TableColumnType, TableColumnsType, TableCompareFn, TableComponents, TableComponentsSemanticName, TableCurrentDataSource, TableCustomizeComponent, TableDataIndex, TableExpandIconProps, TableExpandableConfig, TableExpandedRowRender, TableFilterDropdownPopupProps, TableFilterDropdownProps, TableFilters, TableHeaderCellAttributes, TableLoadingConfig, TableLocale, TableMultipleSorterResult, TablePaginationConfig, TablePaginationPlacement, TableProps, TableRef, TableRenderedCell, TableRowClassName, TableRowSelectMethod, TableRowSelection, TableRowSelectionCheckboxProps, TableRowSelectionType, TableScrollToConfig, TableSelectionItem, TableSelectionPreset, TableSemanticInfo, TableSemanticName, TableSize, TableSorterResult, TableSorterTooltipProps, TableSticky, TableStyles, TableSummaryCellProps, TableSummaryProps, TableSummaryRowProps, TableVariant } from "./type.mjs";
|
|
8
8
|
export { type FilterValue, type SortOrder, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Table as default };
|
package/es/Table/internal.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SELECTION_COLUMN } from "./selectionUtils.mjs";
|
|
2
1
|
import { EXPAND_COLUMN, getColumnId, getColumnPos, isColumnGroup, isColumnVisibleAt } from "./columnUtils.mjs";
|
|
2
|
+
import { SELECTION_COLUMN } from "./selectionUtils.mjs";
|
|
3
3
|
// src/Table/pipeline/normalizeColumns.ts
|
|
4
4
|
const toEngineFixed = (fixed) => {
|
|
5
5
|
if (fixed === true || fixed === "left" || fixed === "start") return "start";
|