@woodger/antd 0.1.2 → 0.1.4
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/dist/affix/Affix.svelte +7 -2
- package/dist/affix/affix.types.d.ts +3 -2
- package/dist/alert/Alert.svelte +17 -12
- package/dist/alert/alert.types.d.ts +12 -11
- package/dist/anchor/AnchorLink.svelte +4 -1
- package/dist/anchor/anchor.types.d.ts +10 -9
- package/dist/app/App.svelte +2 -1
- package/dist/app/app.types.d.ts +3 -2
- package/dist/auto-complete/AutoComplete.svelte +280 -69
- package/dist/auto-complete/auto-complete.types.d.ts +34 -3
- package/dist/avatar/Avatar.svelte +43 -30
- package/dist/avatar/AvatarGroup.svelte +31 -10
- package/dist/avatar/AvatarGroupOverflow.svelte +27 -8
- package/dist/avatar/AvatarGroupOverflow.svelte.d.ts +2 -0
- package/dist/avatar/avatar-group-context.d.ts +10 -0
- package/dist/avatar/avatar-group-context.js +11 -0
- package/dist/avatar/avatar-group.engine.d.ts +13 -4
- package/dist/avatar/avatar-group.engine.js +18 -0
- package/dist/avatar/avatar-group.types.d.ts +11 -5
- package/dist/avatar/avatar.types.d.ts +6 -4
- package/dist/badge/Badge.svelte +34 -15
- package/dist/badge/BadgeRibbon.svelte +23 -19
- package/dist/badge/badge-ribbon.dom.d.ts +2 -4
- package/dist/badge/badge-ribbon.dom.js +14 -10
- package/dist/badge/badge-ribbon.types.d.ts +12 -11
- package/dist/badge/badge-style.dom.d.ts +2 -2
- package/dist/badge/badge-style.dom.js +9 -5
- package/dist/badge/badge-style.engine.d.ts +5 -0
- package/dist/badge/badge-style.engine.js +9 -2
- package/dist/badge/badge.engine.js +1 -1
- package/dist/badge/badge.types.d.ts +15 -11
- package/dist/border-beam/BorderBeam.svelte +4 -2
- package/dist/border-beam/border-beam.engine.d.ts +2 -2
- package/dist/border-beam/border-beam.engine.js +7 -12
- package/dist/border-beam/border-beam.types.d.ts +4 -3
- package/dist/breadcrumb/Breadcrumb.svelte +4 -1
- package/dist/breadcrumb/BreadcrumbEntry.svelte +6 -19
- package/dist/breadcrumb/breadcrumb.engine.d.ts +5 -2
- package/dist/breadcrumb/breadcrumb.engine.js +25 -2
- package/dist/breadcrumb/breadcrumb.types.d.ts +30 -18
- package/dist/button/Button.svelte +28 -6
- package/dist/button/ButtonLabel.svelte +23 -0
- package/dist/button/ButtonLabel.svelte.d.ts +13 -0
- package/dist/button/button.engine.d.ts +6 -0
- package/dist/button/button.engine.js +35 -0
- package/dist/button/button.types.d.ts +11 -8
- package/dist/calendar/CalendarCore.svelte +23 -17
- package/dist/calendar/calendar.types.d.ts +8 -7
- package/dist/card/Card.svelte +55 -16
- package/dist/card/CardGrid.svelte +4 -1
- package/dist/card/CardMeta.svelte +4 -1
- package/dist/card/card-semantic.engine.d.ts +1 -1
- package/dist/card/card-semantic.engine.js +2 -2
- package/dist/card/card.engine.d.ts +2 -0
- package/dist/card/card.engine.js +7 -0
- package/dist/card/card.types.d.ts +19 -19
- package/dist/carousel/Carousel.svelte +5 -2
- package/dist/carousel/carousel-settings.engine.d.ts +1 -1
- package/dist/carousel/carousel.types.d.ts +4 -3
- package/dist/cascader/Cascader.svelte +8 -3
- package/dist/cascader/Cascader.svelte.d.ts +13 -13
- package/dist/cascader/CascaderColumns.svelte +25 -27
- package/dist/cascader/CascaderColumns.svelte.d.ts +9 -7
- package/dist/cascader/CascaderCore.svelte +884 -145
- package/dist/cascader/CascaderCore.svelte.d.ts +14 -14
- package/dist/cascader/CascaderPanel.svelte +9 -3
- package/dist/cascader/CascaderPanel.svelte.d.ts +13 -13
- package/dist/cascader/cascader.component.d.ts +9 -3
- package/dist/cascader/cascader.dom.d.ts +1 -1
- package/dist/cascader/cascader.dom.js +2 -2
- package/dist/cascader/cascader.engine.d.ts +51 -24
- package/dist/cascader/cascader.engine.js +69 -6
- package/dist/cascader/cascader.types.d.ts +126 -45
- package/dist/checkbox/Checkbox.svelte +10 -6
- package/dist/checkbox/CheckboxGroup.svelte +8 -3
- package/dist/checkbox/checkbox-group.types.d.ts +5 -4
- package/dist/checkbox/checkbox.types.d.ts +15 -13
- package/dist/collapse/Collapse.svelte +39 -10
- package/dist/collapse/CollapseItemView.svelte +5 -4
- package/dist/collapse/CollapsePanel.svelte +35 -3
- package/dist/collapse/CollapsePanel.svelte.d.ts +3 -0
- package/dist/collapse/collapse-context.d.ts +5 -1
- package/dist/collapse/collapse.engine.d.ts +4 -4
- package/dist/collapse/collapse.types.d.ts +20 -14
- package/dist/color-picker/ColorPicker.svelte +165 -107
- package/dist/color-picker/ColorPickerPresets.svelte +4 -1
- package/dist/color-picker/color-picker-alignment.dom.d.ts +17 -0
- package/dist/color-picker/color-picker-alignment.dom.js +144 -0
- package/dist/color-picker/color-picker.types.d.ts +14 -13
- package/dist/component-refs.types.d.ts +1 -1
- package/dist/descriptions/Descriptions.svelte +16 -9
- package/dist/descriptions/DescriptionsCell.svelte +19 -19
- package/dist/descriptions/DescriptionsCell.svelte.d.ts +2 -1
- package/dist/descriptions/descriptions-semantic.engine.d.ts +2 -2
- package/dist/descriptions/descriptions-semantic.engine.js +2 -2
- package/dist/descriptions/descriptions.types.d.ts +13 -13
- package/dist/dialog/dialog-container.model.svelte.js +2 -2
- package/dist/divider/Divider.svelte +19 -12
- package/dist/divider/divider.types.d.ts +6 -5
- package/dist/drawer/Drawer.svelte +32 -17
- package/dist/drawer/DrawerPanel.svelte +8 -6
- package/dist/drawer/drawer-ancestor-clip.dom.d.ts +15 -0
- package/dist/drawer/drawer-ancestor-clip.dom.js +145 -0
- package/dist/drawer/drawer-clip-plane.dom.d.ts +22 -0
- package/dist/drawer/drawer-clip-plane.dom.js +100 -0
- package/dist/drawer/drawer-clip-shape.dom.d.ts +5 -0
- package/dist/drawer/drawer-clip-shape.dom.js +52 -0
- package/dist/drawer/drawer-clip-style.dom.d.ts +34 -0
- package/dist/drawer/drawer-clip-style.dom.js +190 -0
- package/dist/drawer/drawer-layout.dom.d.ts +6 -0
- package/dist/drawer/drawer-layout.dom.js +240 -0
- package/dist/drawer/drawer-overflow.dom.d.ts +9 -0
- package/dist/drawer/drawer-overflow.dom.js +249 -0
- package/dist/drawer/drawer-overflow.engine.d.ts +54 -0
- package/dist/drawer/drawer-overflow.engine.js +205 -0
- package/dist/drawer/drawer-panel.engine.d.ts +3 -2
- package/dist/drawer/drawer-panel.engine.js +4 -5
- package/dist/drawer/drawer-svg-clip.dom.d.ts +9 -0
- package/dist/drawer/drawer-svg-clip.dom.js +394 -0
- package/dist/drawer/drawer.dom.d.ts +2 -0
- package/dist/drawer/drawer.dom.js +16 -6
- package/dist/drawer/drawer.types.d.ts +22 -21
- package/dist/dropdown/Dropdown.svelte +122 -21
- package/dist/dropdown/dropdown-position.dom.d.ts +3 -1
- package/dist/dropdown/dropdown-position.dom.js +18 -7
- package/dist/dropdown/dropdown.engine.d.ts +10 -7
- package/dist/dropdown/dropdown.engine.js +29 -13
- package/dist/dropdown/dropdown.types.d.ts +7 -6
- package/dist/empty/Empty.svelte +12 -9
- package/dist/empty/empty.types.d.ts +9 -8
- package/dist/flex/Flex.svelte +21 -7
- package/dist/flex/flex.types.d.ts +2 -1
- package/dist/float-button/FloatButton.svelte +18 -10
- package/dist/float-button/FloatButtonBackTop.svelte +6 -6
- package/dist/float-button/FloatButtonGroup.svelte +20 -21
- package/dist/float-button/float-button-context.d.ts +2 -1
- package/dist/float-button/float-button.types.d.ts +10 -8
- package/dist/form/Form.svelte +6 -2
- package/dist/form/FormItem.svelte +39 -23
- package/dist/form/FormItem.svelte.d.ts +4 -2
- package/dist/form/FormItemTooltip.svelte +2 -2
- package/dist/form/form-internal.d.ts +1 -0
- package/dist/form/form.model.svelte.js +37 -13
- package/dist/form/form.types.d.ts +18 -13
- package/dist/grid/Col.svelte +14 -15
- package/dist/grid/Row.svelte +6 -11
- package/dist/grid/grid.engine.d.ts +4 -1
- package/dist/grid/grid.engine.js +15 -3
- package/dist/grid/grid.types.d.ts +5 -2
- package/dist/image/Image.svelte +9 -8
- package/dist/image/ImagePreview.svelte +15 -11
- package/dist/image/ImagePreview.svelte.d.ts +2 -1
- package/dist/image/ImageProgress.svelte +8 -5
- package/dist/image/ImageProgress.svelte.d.ts +2 -1
- package/dist/image/image-preview-group.types.d.ts +2 -1
- package/dist/image/image-semantic.engine.d.ts +14 -13
- package/dist/image/image-semantic.engine.js +5 -9
- package/dist/image/image.types.d.ts +23 -22
- package/dist/index.d.ts +12 -12
- package/dist/index.js +2 -2
- package/dist/input/Input.svelte +70 -52
- package/dist/input/InputOTP.svelte +9 -7
- package/dist/input/InputPassword.svelte +10 -26
- package/dist/input/InputSearch.svelte +39 -16
- package/dist/input/TextArea.svelte +116 -87
- package/dist/input/input-otp.types.d.ts +12 -9
- package/dist/input/input-password.types.d.ts +6 -6
- package/dist/input/input-search.types.d.ts +8 -8
- package/dist/input/input-value.svelte.d.ts +7 -0
- package/dist/input/input-value.svelte.js +21 -0
- package/dist/input/input.types.d.ts +13 -8
- package/dist/input/textarea-value.svelte.d.ts +14 -0
- package/dist/input/textarea-value.svelte.js +48 -0
- package/dist/input/textarea.dom.d.ts +2 -0
- package/dist/input/textarea.dom.js +17 -0
- package/dist/input/textarea.types.d.ts +12 -8
- package/dist/input-number/InputNumberAction.svelte +2 -2
- package/dist/input-number/InputNumberControl.svelte +31 -21
- package/dist/input-number/input-number.types.d.ts +16 -16
- package/dist/layout/Layout.svelte +2 -1
- package/dist/layout/LayoutPart.svelte +2 -1
- package/dist/layout/LayoutSider.svelte +22 -15
- package/dist/layout/layout.types.d.ts +6 -5
- package/dist/listy/Listy.svelte +17 -12
- package/dist/listy/ListyGroupHeader.svelte +8 -2
- package/dist/listy/ListyGroupHeader.svelte.d.ts +2 -1
- package/dist/listy/ListyRaw.svelte +7 -9
- package/dist/listy/ListyVirtual.svelte +5 -2
- package/dist/listy/listy.types.d.ts +13 -10
- package/dist/masonry/Masonry.svelte +27 -17
- package/dist/masonry/MasonryItem.svelte +0 -1
- package/dist/masonry/masonry.types.d.ts +8 -7
- package/dist/mentions/Mentions.svelte +112 -59
- package/dist/mentions/MentionsListbox.svelte +2 -1
- package/dist/mentions/mentions.dom.d.ts +0 -2
- package/dist/mentions/mentions.dom.js +0 -54
- package/dist/mentions/mentions.engine.d.ts +35 -0
- package/dist/mentions/mentions.engine.js +7 -0
- package/dist/mentions/mentions.types.d.ts +12 -8
- package/dist/menu/Menu.svelte +6 -4
- package/dist/menu/MenuItem.svelte +23 -14
- package/dist/menu/MenuItemTooltip.svelte +2 -1
- package/dist/menu/MenuList.svelte +7 -4
- package/dist/menu/MenuSubMenu.svelte +109 -32
- package/dist/menu/menu-motion.engine.js +3 -28
- package/dist/menu/menu-motion.svelte.d.ts +1 -7
- package/dist/menu/menu-motion.svelte.js +1 -33
- package/dist/menu/menu-popup-align.dom.d.ts +1 -1
- package/dist/menu/menu-popup-align.engine.d.ts +2 -2
- package/dist/menu/menu-popup-align.engine.js +1 -4
- package/dist/menu/menu-semantic.engine.d.ts +8 -8
- package/dist/menu/menu-semantic.engine.js +16 -6
- package/dist/menu/menu.engine.d.ts +5 -1
- package/dist/menu/menu.engine.js +15 -0
- package/dist/menu/menu.types.d.ts +25 -22
- package/dist/message/MessageHolder.svelte +6 -5
- package/dist/message/MessageNotice.svelte +12 -9
- package/dist/message/MessageNotice.svelte.d.ts +2 -1
- package/dist/message/message-semantic.engine.d.ts +1 -1
- package/dist/message/message.model.svelte.d.ts +2 -1
- package/dist/message/message.model.svelte.js +2 -1
- package/dist/message/message.types.d.ts +12 -10
- package/dist/modal/Modal.svelte +120 -46
- package/dist/modal/ModalConfirmation.svelte +9 -10
- package/dist/modal/modal-close.engine.d.ts +1 -1
- package/dist/modal/modal-semantic.engine.d.ts +7 -6
- package/dist/modal/modal-semantic.engine.js +2 -2
- package/dist/modal/modal.types.d.ts +25 -18
- package/dist/motion/collapse-motion.engine.d.ts +3 -0
- package/dist/motion/collapse-motion.engine.js +31 -0
- package/dist/motion/css-motion.svelte.d.ts +7 -0
- package/dist/motion/css-motion.svelte.js +35 -0
- package/dist/notice/notice-queue.model.svelte.js +4 -0
- package/dist/notice/notice-semantic.engine.d.ts +10 -7
- package/dist/notice/notice-semantic.engine.js +9 -4
- package/dist/notification/NotificationHolder.svelte +4 -4
- package/dist/notification/NotificationList.svelte +5 -2
- package/dist/notification/NotificationList.svelte.d.ts +2 -1
- package/dist/notification/NotificationNotice.svelte +16 -18
- package/dist/notification/NotificationNotice.svelte.d.ts +2 -1
- package/dist/notification/notification.model.svelte.d.ts +2 -1
- package/dist/notification/notification.types.d.ts +12 -9
- package/dist/pagination/Pagination.svelte +87 -16
- package/dist/pagination/PaginationControl.svelte +2 -0
- package/dist/pagination/pagination.types.d.ts +19 -14
- package/dist/picker/DatePicker.svelte +9 -1
- package/dist/picker/DatePicker.svelte.d.ts +3 -3
- package/dist/picker/DatePickerCalendar.svelte +15 -12
- package/dist/picker/DatePickerCalendar.svelte.d.ts +2 -2
- package/dist/picker/DatePickerTimePanel.svelte +5 -1
- package/dist/picker/DatePickerTimePanel.svelte.d.ts +2 -4
- package/dist/picker/PickerTimeColumn.svelte +27 -12
- package/dist/picker/PickerTimeColumn.svelte.d.ts +3 -0
- package/dist/picker/PickerTimePanel.svelte +16 -0
- package/dist/picker/PickerTimePanel.svelte.d.ts +3 -0
- package/dist/picker/RangePicker.svelte +5 -1
- package/dist/picker/RangePickerCore.svelte +1066 -418
- package/dist/picker/RangePickerCore.svelte.d.ts +1 -0
- package/dist/picker/SinglePicker.svelte +859 -372
- package/dist/picker/SinglePicker.svelte.d.ts +1 -0
- package/dist/picker/TimePicker.svelte +3 -1
- package/dist/picker/TimeRangePicker.svelte +2 -0
- package/dist/picker/date-picker-semantic.engine.d.ts +7 -6
- package/dist/picker/date-picker-semantic.engine.js +5 -4
- package/dist/picker/date-picker.types.d.ts +64 -30
- package/dist/picker/picker-adapter-props.engine.d.ts +2 -0
- package/dist/picker/picker-adapter-props.engine.js +4 -0
- package/dist/picker/picker-components.types.d.ts +2 -2
- package/dist/picker/picker-editor.model.svelte.d.ts +13 -0
- package/dist/picker/picker-editor.model.svelte.js +40 -0
- package/dist/picker/picker-mask-input.model.svelte.js +11 -6
- package/dist/picker/picker-panel-updates.d.ts +6 -0
- package/dist/picker/picker-panel-updates.js +33 -0
- package/dist/picker/picker-popup-portal.dom.d.ts +49 -0
- package/dist/picker/picker-popup-portal.dom.js +49 -0
- package/dist/picker/picker-popup.dom.d.ts +14 -2
- package/dist/picker/picker-popup.dom.js +155 -40
- package/dist/picker/picker-popup.model.svelte.d.ts +33 -7
- package/dist/picker/picker-popup.model.svelte.js +183 -20
- package/dist/picker/picker-prefix.engine.js +4 -1
- package/dist/picker/picker-style.engine.d.ts +27 -0
- package/dist/picker/picker-style.engine.js +64 -0
- package/dist/picker/picker-time-scroll.model.svelte.d.ts +16 -0
- package/dist/picker/picker-time-scroll.model.svelte.js +31 -0
- package/dist/picker/range-picker-interaction.engine.d.ts +3 -2
- package/dist/picker/range-picker-interaction.engine.js +10 -4
- package/dist/picker/range-picker-popup.dom.d.ts +2 -0
- package/dist/picker/range-picker-popup.dom.js +47 -0
- package/dist/picker/range-picker.types.d.ts +13 -6
- package/dist/picker/time-picker-column.dom.d.ts +6 -1
- package/dist/picker/time-picker-column.dom.js +27 -3
- package/dist/picker/time-picker-props.engine.js +3 -2
- package/dist/picker/time-picker-semantic.engine.d.ts +6 -2
- package/dist/picker/time-picker-semantic.engine.js +32 -18
- package/dist/picker/time-picker.component.d.ts +1 -1
- package/dist/picker/time-picker.types.d.ts +30 -25
- package/dist/picker/time-range-picker-semantic.engine.d.ts +2 -0
- package/dist/picker/time-range-picker-semantic.engine.js +6 -8
- package/dist/picker/time-range-picker.types.d.ts +5 -4
- package/dist/popconfirm/Popconfirm.svelte +42 -11
- package/dist/popconfirm/popconfirm.types.d.ts +15 -11
- package/dist/popover/Popover.svelte +34 -29
- package/dist/popover/popover.types.d.ts +17 -12
- package/dist/popup/PopupContentContext.svelte +14 -0
- package/dist/popup/PopupContentContext.svelte.d.ts +7 -0
- package/dist/popup/overlay-motion.css +86 -3
- package/dist/popup/overlay-portal-alignment.dom.d.ts +34 -0
- package/dist/popup/overlay-portal-alignment.dom.js +166 -0
- package/dist/popup/overlay-semantic.engine.d.ts +16 -15
- package/dist/popup/overlay-semantic.engine.js +5 -6
- package/dist/popup/popup-css-motion.dom.d.ts +24 -0
- package/dist/{tree-select/tree-select-motion.dom.js → popup/popup-css-motion.dom.js} +13 -3
- package/dist/popup/popup-css-motion.model.svelte.d.ts +25 -0
- package/dist/popup/popup-css-motion.model.svelte.js +73 -0
- package/dist/popup/popup-geometry.dom.d.ts +8 -0
- package/dist/popup/popup-geometry.dom.js +68 -0
- package/dist/popup/popup-plane.engine.d.ts +6 -0
- package/dist/popup/popup-plane.engine.js +18 -0
- package/dist/popup/popup-portal-fit.dom.d.ts +3 -0
- package/dist/popup/popup-portal-fit.dom.js +81 -0
- package/dist/popup/popup-portal-projection.dom.d.ts +52 -0
- package/dist/popup/popup-portal-projection.dom.js +208 -0
- package/dist/popup/popup-position.engine.d.ts +5 -3
- package/dist/popup/popup.dom.d.ts +4 -1
- package/dist/popup/popup.dom.js +66 -21
- package/dist/popup/select-popup-motion.engine.d.ts +4 -0
- package/dist/popup/select-popup-motion.engine.js +18 -0
- package/dist/progress/Progress.svelte +53 -26
- package/dist/progress/ProgressCircle.svelte +40 -22
- package/dist/progress/ProgressCircle.svelte.d.ts +2 -1
- package/dist/progress/progress.types.d.ts +6 -5
- package/dist/qr-code/QRCode.svelte +7 -5
- package/dist/qr-code/qrcode.types.d.ts +10 -9
- package/dist/radio/Radio.svelte +10 -6
- package/dist/radio/RadioGroup.svelte +8 -3
- package/dist/radio/radio.types.d.ts +20 -18
- package/dist/rate/Rate.svelte +5 -2
- package/dist/rate/rate.types.d.ts +5 -4
- package/dist/render-content.engine.d.ts +9 -0
- package/dist/render-content.engine.js +21 -0
- package/dist/result/Result.svelte +14 -11
- package/dist/result/result.types.d.ts +11 -10
- package/dist/segmented/Segmented.svelte +23 -13
- package/dist/segmented/segmented.engine.js +2 -1
- package/dist/segmented/segmented.types.d.ts +11 -11
- package/dist/select/Select.svelte +418 -111
- package/dist/select/select-editor-focus.dom.d.ts +14 -0
- package/dist/select/select-editor-focus.dom.js +51 -0
- package/dist/select/select-icons.engine.d.ts +2 -0
- package/dist/select/select-icons.engine.js +17 -8
- package/dist/select/select-mouse-boundary.dom.d.ts +7 -0
- package/dist/select/select-mouse-boundary.dom.js +57 -0
- package/dist/select/select-semantic.engine.d.ts +2 -2
- package/dist/select/select-style.engine.d.ts +2 -2
- package/dist/select/select-style.engine.js +24 -2
- package/dist/select/select-token.engine.d.ts +4 -0
- package/dist/select/select-token.engine.js +13 -0
- package/dist/select/select.types.d.ts +35 -12
- package/dist/skeleton/Skeleton.svelte +20 -13
- package/dist/skeleton/SkeletonElement.svelte +11 -6
- package/dist/skeleton/skeleton.types.d.ts +11 -10
- package/dist/slider/SliderRange.svelte +26 -12
- package/dist/slider/SliderSingle.svelte +47 -67
- package/dist/slider/SliderTooltip.svelte +111 -13
- package/dist/slider/SliderTooltip.svelte.d.ts +4 -3
- package/dist/slider/slider-handle.dom.d.ts +5 -0
- package/dist/slider/slider-handle.dom.js +60 -0
- package/dist/slider/slider-range.engine.d.ts +4 -2
- package/dist/slider/slider-range.engine.js +15 -0
- package/dist/slider/slider-range.types.d.ts +10 -8
- package/dist/slider/slider-semantic.engine.d.ts +1 -1
- package/dist/slider/slider-semantic.engine.js +2 -6
- package/dist/slider/slider.types.d.ts +5 -3
- package/dist/space/Space.svelte +29 -13
- package/dist/space/SpaceAddon.svelte +5 -2
- package/dist/space/SpaceCompact.svelte +3 -1
- package/dist/space/SpaceCompactItem.svelte +4 -1
- package/dist/space/space-compact.types.d.ts +6 -6
- package/dist/space/space.engine.d.ts +5 -1
- package/dist/space/space.engine.js +32 -7
- package/dist/space/space.types.d.ts +15 -12
- package/dist/spin/Spin.svelte +20 -12
- package/dist/spin/spin.types.d.ts +5 -3
- package/dist/splitter/Splitter.svelte +9 -11
- package/dist/splitter/SplitterBar.svelte +2 -1
- package/dist/splitter/SplitterPanel.svelte +14 -2
- package/dist/splitter/SplitterPanel.svelte.d.ts +2 -1
- package/dist/splitter/SplitterPanelDeclaration.svelte +20 -0
- package/dist/splitter/SplitterPanelDeclaration.svelte.d.ts +4 -0
- package/dist/splitter/SplitterPanelDeclarations.svelte +16 -0
- package/dist/splitter/SplitterPanelDeclarations.svelte.d.ts +10 -0
- package/dist/splitter/SplitterRoot.svelte +18 -0
- package/dist/splitter/SplitterRoot.svelte.d.ts +4 -0
- package/dist/splitter/splitter-panel-context.d.ts +10 -0
- package/dist/splitter/splitter-panel-context.js +11 -0
- package/dist/splitter/splitter.component.d.ts +7 -0
- package/dist/splitter/splitter.component.js +6 -0
- package/dist/splitter/splitter.engine.d.ts +6 -1
- package/dist/splitter/splitter.engine.js +18 -0
- package/dist/splitter/splitter.types.d.ts +13 -10
- package/dist/statistic/Statistic.svelte +20 -9
- package/dist/statistic/statistic.types.d.ts +6 -4
- package/dist/steps/StepIcon.svelte +4 -2
- package/dist/steps/StepIcon.svelte.d.ts +2 -1
- package/dist/steps/StepItem.svelte +12 -16
- package/dist/steps/Steps.svelte +4 -7
- package/dist/steps/steps-data.engine.d.ts +5 -4
- package/dist/steps/steps-expanded.types.d.ts +2 -1
- package/dist/steps/steps-icon-context.d.ts +2 -1
- package/dist/steps/steps.types.d.ts +4 -3
- package/dist/style/inline-style-layers.engine.d.ts +11 -0
- package/dist/style/inline-style-layers.engine.js +120 -0
- package/dist/style/inline-style.engine.d.ts +4 -0
- package/dist/style/inline-style.engine.js +17 -9
- package/dist/style/inline-style.types.d.ts +12 -0
- package/dist/style/inline-style.types.js +1 -0
- package/dist/style/semantic-style.engine.d.ts +18 -12
- package/dist/style/semantic-style.engine.js +15 -9
- package/dist/switch/Switch.svelte +12 -7
- package/dist/switch/switch.types.d.ts +14 -12
- package/dist/table/Table.svelte +27 -19
- package/dist/table/Table.svelte.d.ts +4 -2
- package/dist/table/TableColumn.svelte +20 -0
- package/dist/table/TableColumn.svelte.d.ts +25 -0
- package/dist/table/TableColumnDeclarations.svelte +18 -0
- package/dist/table/TableColumnDeclarations.svelte.d.ts +10 -0
- package/dist/table/TableColumnGroup.svelte +31 -0
- package/dist/table/TableColumnGroup.svelte.d.ts +25 -0
- package/dist/table/TableRoot.svelte +55 -0
- package/dist/table/TableRoot.svelte.d.ts +29 -0
- package/dist/table/table-cell.engine.d.ts +8 -8
- package/dist/table/table-column-declarations.svelte.d.ts +22 -0
- package/dist/table/table-column-declarations.svelte.js +45 -0
- package/dist/table/table-semantic.engine.d.ts +18 -6
- package/dist/table/table-semantic.engine.js +14 -14
- package/dist/table/table.component.d.ts +10 -2
- package/dist/table/table.component.js +4 -1
- package/dist/table/table.types.d.ts +53 -25
- package/dist/tabs/Tabs.svelte +29 -14
- package/dist/tabs/TabsNav.svelte +33 -18
- package/dist/tabs/TabsNav.svelte.d.ts +2 -1
- package/dist/tabs/TabsOverflow.svelte +98 -122
- package/dist/tabs/TabsOverflow.svelte.d.ts +2 -1
- package/dist/tabs/TabsPanel.svelte +10 -5
- package/dist/tabs/TabsPanel.svelte.d.ts +4 -3
- package/dist/tabs/tabs-more-alignment.dom.d.ts +32 -0
- package/dist/tabs/tabs-more-alignment.dom.js +158 -0
- package/dist/tabs/tabs-more.dom.d.ts +69 -13
- package/dist/tabs/tabs-more.dom.js +76 -65
- package/dist/tabs/tabs-motion.dom.d.ts +2 -1
- package/dist/tabs/tabs-motion.dom.js +2 -1
- package/dist/tabs/tabs-motion.types.d.ts +4 -3
- package/dist/tabs/tabs-nav.types.d.ts +6 -7
- package/dist/tabs/tabs-semantic.engine.d.ts +18 -12
- package/dist/tabs/tabs-semantic.engine.js +70 -19
- package/dist/tabs/tabs.types.d.ts +35 -29
- package/dist/tag/CheckableTag.svelte +5 -3
- package/dist/tag/CheckableTagGroup.svelte +39 -31
- package/dist/tag/CheckableTagGroup.svelte.d.ts +12 -12
- package/dist/tag/Tag.svelte +11 -19
- package/dist/tag/tag-style.dom.d.ts +3 -1
- package/dist/tag/tag-style.dom.js +19 -1
- package/dist/tag/tag.types.d.ts +30 -27
- package/dist/timeline/Timeline.svelte +8 -3
- package/dist/timeline/timeline.engine.js +3 -1
- package/dist/timeline/timeline.types.d.ts +7 -6
- package/dist/tooltip/Tooltip.svelte +2 -3
- package/dist/tooltip/TooltipPopup.svelte +22 -16
- package/dist/tooltip/TooltipUniqueContent.svelte +3 -6
- package/dist/tooltip/TooltipUniqueContent.svelte.d.ts +0 -1
- package/dist/tooltip/TooltipUniquePopup.svelte +1 -1
- package/dist/tooltip/tooltip.engine.d.ts +58 -2
- package/dist/tooltip/tooltip.engine.js +54 -27
- package/dist/tooltip/tooltip.types.d.ts +22 -13
- package/dist/tour/Tour.svelte +34 -13
- package/dist/tour/TourPanel.svelte +13 -12
- package/dist/tour/TourPanel.svelte.d.ts +2 -1
- package/dist/tour/tour.engine.d.ts +7 -2
- package/dist/tour/tour.engine.js +58 -11
- package/dist/tour/tour.types.d.ts +20 -19
- package/dist/transfer/Transfer.svelte +41 -35
- package/dist/transfer/TransferAction.svelte +6 -7
- package/dist/transfer/TransferAction.svelte.d.ts +3 -2
- package/dist/transfer/TransferCheckbox.svelte +6 -2
- package/dist/transfer/TransferCheckbox.svelte.d.ts +2 -1
- package/dist/transfer/TransferList.svelte +18 -0
- package/dist/transfer/TransferList.svelte.d.ts +45 -0
- package/dist/transfer/TransferOperation.svelte +43 -0
- package/dist/transfer/TransferOperation.svelte.d.ts +4 -0
- package/dist/transfer/TransferSearch.svelte +44 -0
- package/dist/transfer/TransferSearch.svelte.d.ts +4 -0
- package/dist/transfer/TransferSection.svelte +42 -30
- package/dist/transfer/TransferSection.svelte.d.ts +2 -4
- package/dist/transfer/transfer-style.engine.d.ts +7 -0
- package/dist/transfer/transfer-style.engine.js +33 -0
- package/dist/transfer/transfer.component.d.ts +12 -0
- package/dist/transfer/transfer.component.js +6 -0
- package/dist/transfer/transfer.types.d.ts +44 -4
- package/dist/tree/Tree.svelte +5 -3
- package/dist/tree/TreeMotion.svelte +5 -1
- package/dist/tree/tree-motion.dom.js +12 -3
- package/dist/tree/tree-motion.types.d.ts +4 -3
- package/dist/tree/tree-semantic.engine.d.ts +9 -2
- package/dist/tree/tree-semantic.engine.js +37 -3
- package/dist/tree/tree.types.d.ts +8 -6
- package/dist/tree-select/TreeSelectControl.svelte +303 -155
- package/dist/tree-select/tree-select-align.engine.d.ts +2 -6
- package/dist/tree-select/tree-select-align.engine.js +1 -18
- package/dist/tree-select/tree-select-motion-frame.dom.d.ts +2 -5
- package/dist/tree-select/tree-select-semantic.engine.d.ts +6 -6
- package/dist/tree-select/tree-select-semantic.engine.js +50 -25
- package/dist/tree-select/tree-select-token.engine.d.ts +1 -3
- package/dist/tree-select/tree-select-token.engine.js +1 -13
- package/dist/tree-select/tree-select.types.d.ts +9 -5
- package/dist/types.d.ts +3 -0
- package/dist/typography/TypographyEditable.svelte +6 -3
- package/dist/typography/TypographyEditable.svelte.d.ts +3 -2
- package/dist/typography/TypographyElement.svelte +7 -4
- package/dist/typography/TypographyElement.svelte.d.ts +3 -2
- package/dist/typography/typography-semantic.engine.d.ts +9 -2
- package/dist/typography/typography-semantic.engine.js +15 -4
- package/dist/typography/typography.types.d.ts +8 -7
- package/dist/utils/declaration-order.svelte.d.ts +12 -0
- package/dist/utils/declaration-order.svelte.js +53 -0
- package/dist/vendor/date-picker-prefix.css.js +2 -2
- package/dist/vendor/tree-select-popup-motion.css +112 -112
- package/dist/vendor/tree-select-popup-motion.css.js +2 -2
- package/dist/watermark/Watermark.svelte +8 -6
- package/dist/watermark/watermark.types.d.ts +3 -2
- package/package.json +1 -1
- package/readme.md +16 -16
- package/dist/picker/time-range-picker-popup.dom.d.ts +0 -2
- package/dist/picker/time-range-picker-popup.dom.js +0 -42
- package/dist/tree-select/tree-select-motion-css.engine.d.ts +0 -2
- package/dist/tree-select/tree-select-motion-css.engine.js +0 -11
- package/dist/tree-select/tree-select-motion.dom.d.ts +0 -18
- package/dist/tree-select/tree-select-motion.engine.d.ts +0 -2
- package/dist/tree-select/tree-select-motion.engine.js +0 -5
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { getPopupPosition, PopupSurfaceGeometry } from './popup-position.engine';
|
|
2
|
+
type Alignment = ReturnType<typeof getPopupPosition>;
|
|
3
|
+
interface PopupLayoutSize {
|
|
4
|
+
width: string;
|
|
5
|
+
height: string;
|
|
6
|
+
}
|
|
7
|
+
/** Supplies the intrinsic content dimensions before each read of the probe's box. */
|
|
8
|
+
export type PopupPortalFit = (probe: HTMLElement, readSize: () => PopupLayoutSize) => () => void;
|
|
9
|
+
/** Samples the portal's border-box plane without copying the popup contents. */
|
|
10
|
+
export declare function createPopupPortalProjection(popup: HTMLElement, getAuthoredStyle: () => string | undefined, referencePosition?: 'absolute', fitPopup?: PopupPortalFit): (style: CSSStyleDeclaration, zoom: number, align: (geometry: PopupSurfaceGeometry) => Alignment, untransformed?: boolean) => {
|
|
11
|
+
alignment: {
|
|
12
|
+
align: {
|
|
13
|
+
points: [string, string];
|
|
14
|
+
offset?: readonly import("./popup-position.engine").PopupOffset[];
|
|
15
|
+
targetOffset?: readonly import("./popup-position.engine").PopupOffset[];
|
|
16
|
+
dynamicInset?: boolean;
|
|
17
|
+
autoArrow?: boolean;
|
|
18
|
+
htmlRegion?: "visible" | "scroll" | "visibleFirst";
|
|
19
|
+
_experimental?: {
|
|
20
|
+
dynamicInset?: boolean;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
useCssRight?: boolean;
|
|
24
|
+
useCssBottom?: boolean;
|
|
25
|
+
useCssTransform?: boolean;
|
|
26
|
+
ignoreShake?: boolean;
|
|
27
|
+
overflow?: {
|
|
28
|
+
adjustX?: boolean | number;
|
|
29
|
+
adjustY?: boolean | number;
|
|
30
|
+
shiftX?: boolean | number;
|
|
31
|
+
shiftY?: boolean | number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
placement: string | undefined;
|
|
35
|
+
flips: {
|
|
36
|
+
bt?: boolean;
|
|
37
|
+
tb?: boolean;
|
|
38
|
+
rl?: boolean;
|
|
39
|
+
lr?: boolean;
|
|
40
|
+
};
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
right: number;
|
|
44
|
+
bottom: number;
|
|
45
|
+
arrowX: number;
|
|
46
|
+
arrowY: number;
|
|
47
|
+
};
|
|
48
|
+
bounds: DOMRect;
|
|
49
|
+
projection: readonly (readonly [string, string, ("" | "important" | undefined)?])[];
|
|
50
|
+
scaleX: number;
|
|
51
|
+
} | undefined;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// Measures the ordinary portal plane used by rc-trigger 3.10.1 (MIT, vendor/LICENSE.rc-trigger).
|
|
2
|
+
// The probe carries coordinates and intrinsic dimensions. The live surface stays in the top layer.
|
|
3
|
+
import { getPopupPlaneProjection } from './popup-plane.engine';
|
|
4
|
+
import { getPopupBoxEdges } from './popup-geometry.dom';
|
|
5
|
+
const sampleUnit = 100;
|
|
6
|
+
/** Samples the portal's border-box plane without copying the popup contents. */
|
|
7
|
+
export function createPopupPortalProjection(popup, getAuthoredStyle, referencePosition, fitPopup) {
|
|
8
|
+
const document = popup.ownerDocument;
|
|
9
|
+
// The probe is connected and measured only from the native popup's browser controller.
|
|
10
|
+
const view = document.defaultView;
|
|
11
|
+
const probe = document.createElement(popup.localName);
|
|
12
|
+
probe.inert = true;
|
|
13
|
+
probe.setAttribute('aria-hidden', 'true');
|
|
14
|
+
const origin = createMarker();
|
|
15
|
+
const rightEdge = createMarker();
|
|
16
|
+
const farCorner = createMarker();
|
|
17
|
+
const bottomEdge = createMarker();
|
|
18
|
+
probe.append(origin, rightEdge, farCorner, bottomEdge);
|
|
19
|
+
return measure;
|
|
20
|
+
/** Creates a zero-size marker in the popup's own CSS coordinate space. */
|
|
21
|
+
function createMarker() {
|
|
22
|
+
const node = document.createElement('i');
|
|
23
|
+
node.style.cssText = 'all:initial!important;'
|
|
24
|
+
+ 'position:absolute!important;'
|
|
25
|
+
+ 'width:0!important;'
|
|
26
|
+
+ 'height:0!important;'
|
|
27
|
+
+ 'visibility:hidden!important;'
|
|
28
|
+
+ 'pointer-events:none!important;';
|
|
29
|
+
return node;
|
|
30
|
+
}
|
|
31
|
+
/** Copies sizing and semantic CSS while keeping the probe inert and out of view. */
|
|
32
|
+
function prepareProbe(style) {
|
|
33
|
+
probe.className = popup.className;
|
|
34
|
+
probe.dir = popup.dir;
|
|
35
|
+
for (const name of probe.getAttributeNames()) {
|
|
36
|
+
if (name.startsWith('data-') && !popup.hasAttribute(name)) {
|
|
37
|
+
probe.removeAttribute(name);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const attribute of popup.attributes) {
|
|
41
|
+
if (attribute.name.startsWith('data-')) {
|
|
42
|
+
probe.setAttribute(attribute.name, attribute.value);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
probe.style.cssText = getAuthoredStyle() ?? '';
|
|
46
|
+
probe.style.setProperty('display', 'block', 'important');
|
|
47
|
+
probe.style.setProperty('visibility', 'hidden', 'important');
|
|
48
|
+
probe.style.setProperty('pointer-events', 'none', 'important');
|
|
49
|
+
probe.style.setProperty('animation', 'none', 'important');
|
|
50
|
+
probe.style.setProperty('transition', 'none', 'important');
|
|
51
|
+
if (!fitPopup) {
|
|
52
|
+
probe.style.setProperty('width', style.width, 'important');
|
|
53
|
+
probe.style.setProperty('height', style.height, 'important');
|
|
54
|
+
probe.style.setProperty('min-width', '0', 'important');
|
|
55
|
+
probe.style.setProperty('max-width', 'none', 'important');
|
|
56
|
+
probe.style.setProperty('min-height', '0', 'important');
|
|
57
|
+
probe.style.setProperty('max-height', 'none', 'important');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Measures the two inset origins that rc-trigger uses to resolve dynamic placement. */
|
|
61
|
+
function readGeometry(fit) {
|
|
62
|
+
probe.style.left = '0px';
|
|
63
|
+
probe.style.top = '0px';
|
|
64
|
+
probe.style.right = 'auto';
|
|
65
|
+
probe.style.bottom = 'auto';
|
|
66
|
+
probe.style.overflow = 'hidden';
|
|
67
|
+
fit?.();
|
|
68
|
+
const rect = probe.getBoundingClientRect();
|
|
69
|
+
const style = view.getComputedStyle(probe);
|
|
70
|
+
const scaleX = Math.round(rect.width / Number.parseFloat(style.width) * 1000) / 1000;
|
|
71
|
+
const scaleY = Math.round(rect.height / Number.parseFloat(style.height) * 1000) / 1000;
|
|
72
|
+
probe.style.left = 'auto';
|
|
73
|
+
probe.style.top = 'auto';
|
|
74
|
+
probe.style.right = '0px';
|
|
75
|
+
probe.style.bottom = '0px';
|
|
76
|
+
fit?.();
|
|
77
|
+
const mirror = probe.getBoundingClientRect();
|
|
78
|
+
return {
|
|
79
|
+
popup: rect,
|
|
80
|
+
mirror: { right: mirror.right, bottom: mirror.bottom },
|
|
81
|
+
scaleX,
|
|
82
|
+
scaleY
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/** Applies source insets beneath any explicit semantic root style. */
|
|
86
|
+
function applyAlignment(result) {
|
|
87
|
+
const point = result.align.points?.[0];
|
|
88
|
+
const dynamicInset = result.align.dynamicInset || result.align._experimental?.dynamicInset;
|
|
89
|
+
const right = dynamicInset && point?.[1] === 'r';
|
|
90
|
+
const bottom = dynamicInset && point?.[0] === 'b';
|
|
91
|
+
probe.style.left ||= right ? 'auto' : `${result.x}px`;
|
|
92
|
+
probe.style.right ||= right ? `${result.right}px` : 'auto';
|
|
93
|
+
probe.style.top ||= bottom ? 'auto' : `${result.y}px`;
|
|
94
|
+
probe.style.bottom ||= bottom ? `${result.bottom}px` : 'auto';
|
|
95
|
+
if (!probe.style.getPropertyValue('--arrow-x')) {
|
|
96
|
+
probe.style.setProperty('--arrow-x', `${result.arrowX}px`);
|
|
97
|
+
}
|
|
98
|
+
if (!probe.style.getPropertyValue('--arrow-y')) {
|
|
99
|
+
probe.style.setProperty('--arrow-y', `${result.arrowY}px`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Converts a physical marker to the native popover's unzoomed coordinate system. */
|
|
103
|
+
function readMarker(node, x, y, fixed, zoom) {
|
|
104
|
+
node.style.setProperty('left', `${x - probe.clientLeft}px`, 'important');
|
|
105
|
+
node.style.setProperty('top', `${y - probe.clientTop}px`, 'important');
|
|
106
|
+
const rect = node.getBoundingClientRect();
|
|
107
|
+
return {
|
|
108
|
+
x: (rect.x + (fixed ? 0 : view.scrollX)) / zoom,
|
|
109
|
+
y: (rect.y + (fixed ? 0 : view.scrollY)) / zoom
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** Composes built-in zoom and slide motion around the source origin in the sampled plane. */
|
|
113
|
+
function renderProjection(zoom, fixed, size) {
|
|
114
|
+
const css = view.getComputedStyle(probe);
|
|
115
|
+
const [sourceX, sourceY] = css.transformOrigin.split(' ');
|
|
116
|
+
const originX = `var(--ant-overlay-motion-origin-x, ${sourceX})`;
|
|
117
|
+
const originY = `var(--ant-overlay-motion-origin-y, ${sourceY})`;
|
|
118
|
+
const unit = Math.min(sampleUnit, probe.offsetWidth, probe.offsetHeight);
|
|
119
|
+
if (!unit) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const matrix = getPopupPlaneProjection([
|
|
123
|
+
readMarker(origin, 0, 0, fixed, zoom),
|
|
124
|
+
readMarker(rightEdge, unit, 0, fixed, zoom),
|
|
125
|
+
readMarker(farCorner, unit, unit, fixed, zoom),
|
|
126
|
+
readMarker(bottomEdge, 0, unit, fixed, zoom)
|
|
127
|
+
], unit);
|
|
128
|
+
if (!matrix.every(Number.isFinite)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const transform = `matrix3d(${matrix.join(',')}) translate(${originX}, ${originY})`
|
|
132
|
+
+ ' scale(var(--ant-overlay-motion-scale, 1))'
|
|
133
|
+
+ ' scaleX(var(--ant-overlay-motion-scale-x, 1))'
|
|
134
|
+
+ ' scaleY(var(--ant-overlay-motion-scale-y, 1))'
|
|
135
|
+
+ ` translate(calc(-1 * ${originX}), calc(-1 * ${originY}))`;
|
|
136
|
+
return [
|
|
137
|
+
['position', fixed ? 'fixed' : 'absolute', 'important'],
|
|
138
|
+
['left', '0px', 'important'],
|
|
139
|
+
['top', '0px', 'important'],
|
|
140
|
+
['right', 'auto', 'important'],
|
|
141
|
+
['bottom', 'auto', 'important'],
|
|
142
|
+
['margin', '0px', 'important'],
|
|
143
|
+
['translate', 'none', 'important'],
|
|
144
|
+
['rotate', 'none', 'important'],
|
|
145
|
+
['scale', 'none', 'important'],
|
|
146
|
+
['offset-path', 'none', 'important'],
|
|
147
|
+
['transform-origin', '0px 0px', 'important'],
|
|
148
|
+
['transform', transform, 'important'],
|
|
149
|
+
...readProjectedSize(css, size)
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
/** Locks in the used box from the portal before rendering against the top-layer viewport. */
|
|
153
|
+
function readProjectedSize(css, size) {
|
|
154
|
+
if (!size)
|
|
155
|
+
return [];
|
|
156
|
+
return [
|
|
157
|
+
['width', size.width, 'important'],
|
|
158
|
+
['height', size.height, 'important'],
|
|
159
|
+
['min-width', css.minWidth.endsWith('px') ? css.minWidth : '0px', 'important'],
|
|
160
|
+
['max-width', 'none', 'important'],
|
|
161
|
+
['min-height', '0px', 'important'],
|
|
162
|
+
['max-height', 'none', 'important']
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
/** Reads a source alignment and its painted plane in one synchronous portal visit. */
|
|
166
|
+
function measure(style, zoom, align, untransformed = false) {
|
|
167
|
+
prepareProbe(style);
|
|
168
|
+
popup.before(probe);
|
|
169
|
+
try {
|
|
170
|
+
const fixed = view.getComputedStyle(probe).position === 'fixed';
|
|
171
|
+
if (referencePosition) {
|
|
172
|
+
probe.style.setProperty('--ant-overlay-position', referencePosition);
|
|
173
|
+
}
|
|
174
|
+
const fit = fitPopup?.(probe, readSize);
|
|
175
|
+
const baseStyle = probe.style.cssText;
|
|
176
|
+
const geometry = readGeometry(fit);
|
|
177
|
+
if (!(geometry.scaleX > 0 && geometry.scaleY > 0)
|
|
178
|
+
|| !Number.isFinite(geometry.scaleX) || !Number.isFinite(geometry.scaleY)) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const alignment = align(geometry);
|
|
182
|
+
probe.style.cssText = baseStyle;
|
|
183
|
+
applyAlignment(alignment);
|
|
184
|
+
fit?.();
|
|
185
|
+
const bounds = probe.getBoundingClientRect();
|
|
186
|
+
const projection = renderProjection(zoom, fixed, fit ? readSize() : undefined);
|
|
187
|
+
return projection ? { alignment, bounds, projection, scaleX: geometry.scaleX } : undefined;
|
|
188
|
+
}
|
|
189
|
+
finally {
|
|
190
|
+
probe.remove();
|
|
191
|
+
}
|
|
192
|
+
/** Preserves fractional layout units without a round trip through CSSOM's px strings. */
|
|
193
|
+
function readSize() {
|
|
194
|
+
const css = view.getComputedStyle(probe);
|
|
195
|
+
if (!untransformed || css.transform !== 'none'
|
|
196
|
+
|| css.scale !== 'none' || css.rotate !== 'none') {
|
|
197
|
+
return { width: css.width, height: css.height };
|
|
198
|
+
}
|
|
199
|
+
const box = probe.getBoundingClientRect();
|
|
200
|
+
if (css.boxSizing === 'border-box') {
|
|
201
|
+
return { width: `${box.width}px`, height: `${box.height}px` };
|
|
202
|
+
}
|
|
203
|
+
const width = Math.max(0, box.width - getPopupBoxEdges(css, 'width'));
|
|
204
|
+
const height = Math.max(0, box.height - getPopupBoxEdges(css, 'height'));
|
|
205
|
+
return { width: `${width}px`, height: `${height}px` };
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -50,16 +50,18 @@ export interface PopupFlipCache {
|
|
|
50
50
|
lr?: boolean;
|
|
51
51
|
}
|
|
52
52
|
export declare function getPopupPlacements(pointAtCenter: boolean, arrowWidth?: number, offset?: number, radius?: number, autoAdjustOverflow?: boolean | PopupOverflowAdjust): Record<string, PopupAlign>;
|
|
53
|
-
interface
|
|
54
|
-
target: PopupRect;
|
|
53
|
+
export interface PopupSurfaceGeometry {
|
|
55
54
|
popup: PopupRect;
|
|
56
55
|
mirror: {
|
|
57
56
|
right: number;
|
|
58
57
|
bottom: number;
|
|
59
58
|
};
|
|
60
|
-
visible: PopupArea;
|
|
61
59
|
scaleX: number;
|
|
62
60
|
scaleY: number;
|
|
61
|
+
}
|
|
62
|
+
interface PopupAlignmentGeometry extends PopupSurfaceGeometry {
|
|
63
|
+
target: PopupRect;
|
|
64
|
+
visible: PopupArea;
|
|
63
65
|
flips?: PopupFlipCache;
|
|
64
66
|
}
|
|
65
67
|
export declare function getPopupAlignment(input: PopupAlignmentGeometry & {
|
|
@@ -2,6 +2,8 @@ import { type TooltipPosition, type TooltipRect, type TooltipSourcePlacement } f
|
|
|
2
2
|
import type { PopupSourceAlign } from './popup-position.engine';
|
|
3
3
|
import type { PopupPoint } from './popup-geometry.dom';
|
|
4
4
|
import type { AdjustOverflow, TooltipPlacement } from '../tooltip/tooltip.types';
|
|
5
|
+
import type { InlineStyleLayer } from '../style/inline-style.engine';
|
|
6
|
+
import { type OverlayPortalOptions } from './overlay-portal-alignment.dom';
|
|
5
7
|
/** Cleanup remains a called function; forceAlign uses the same position controller. */
|
|
6
8
|
export interface PopupConnection {
|
|
7
9
|
(retainSurface?: boolean): void;
|
|
@@ -48,6 +50,7 @@ export declare function connectPopup(popup: HTMLElement, anchor: Element, option
|
|
|
48
50
|
measurePopup?: () => DOMRect;
|
|
49
51
|
getPosition?: (anchor: DOMRect, popup: DOMRect, viewport: TooltipRect) => TooltipPosition | undefined;
|
|
50
52
|
getAnchorRect?: (current: DOMRect, popup: DOMRect) => DOMRect;
|
|
51
|
-
|
|
53
|
+
portalAlignment?: OverlayPortalOptions;
|
|
54
|
+
applyPosition?: (position: TooltipPosition, projection?: InlineStyleLayer) => void;
|
|
52
55
|
onVisibilityChange?: (visible: boolean) => void;
|
|
53
56
|
}): PopupConnection;
|
package/dist/popup/popup.dom.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Connects the popover to and manages its position, visibility, and. Interaction stack belongs to
|
|
2
2
|
// the document. Connection holder protects retarget.
|
|
3
3
|
import { getTooltipPosition } from '../tooltip/tooltip.engine';
|
|
4
|
+
import { createOverlayPortalAlignment } from './overlay-portal-alignment.dom';
|
|
4
5
|
const openPopups = new WeakMap();
|
|
5
6
|
const popupConnections = new WeakMap();
|
|
6
7
|
// Take into account the active node in ShadowRoot before the transition to the document.
|
|
@@ -35,6 +36,9 @@ export function connectPopup(popup, anchor, options) {
|
|
|
35
36
|
const view = document.defaultView;
|
|
36
37
|
const owner = { anchor };
|
|
37
38
|
popupConnections.set(popup, owner);
|
|
39
|
+
const portal = options.portalAlignment && options.applyPosition
|
|
40
|
+
? createOverlayPortalAlignment(popup, options.portalAlignment, options.applyPosition)
|
|
41
|
+
: undefined;
|
|
38
42
|
let frame = 0;
|
|
39
43
|
let shown = false;
|
|
40
44
|
let disposed = false;
|
|
@@ -42,6 +46,17 @@ export function connectPopup(popup, anchor, options) {
|
|
|
42
46
|
let lastPosition = '';
|
|
43
47
|
let lastAlignment = '';
|
|
44
48
|
let flips;
|
|
49
|
+
let stretchScaleX = 1;
|
|
50
|
+
// rc-trigger stretches to the physical anchor width converted to the portal's CSS plane.
|
|
51
|
+
function applyAnchorWidth(width, match, variable) {
|
|
52
|
+
const value = `${width / stretchScaleX}px`;
|
|
53
|
+
if (match && popup.style.minWidth !== value) {
|
|
54
|
+
popup.style.minWidth = value;
|
|
55
|
+
}
|
|
56
|
+
if (variable && popup.style.getPropertyValue(variable) !== value) {
|
|
57
|
+
popup.style.setProperty(variable, value);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
45
60
|
// Removes the popup from the interaction stack before notification and hiding.
|
|
46
61
|
function hide() {
|
|
47
62
|
const stack = openPopups.get(document);
|
|
@@ -94,14 +109,12 @@ export function connectPopup(popup, anchor, options) {
|
|
|
94
109
|
?? 'var(--ant-tooltip-max-width)'}, ${Math.max(0, viewport.width - 16)}px)`;
|
|
95
110
|
}
|
|
96
111
|
const { matchAnchorWidth, anchorWidthVariable } = options;
|
|
112
|
+
let stretchWidth;
|
|
97
113
|
if (matchAnchorWidth || anchorWidthVariable) {
|
|
98
114
|
const anchorWidth = options.getAnchorWidth?.() ?? rect.width;
|
|
99
|
-
|
|
100
|
-
: Math.min(anchorWidth, Math.max(0, viewport.width - 16))
|
|
101
|
-
|
|
102
|
-
popup.style.minWidth = width;
|
|
103
|
-
if (anchorWidthVariable && popup.style.getPropertyValue(anchorWidthVariable) !== width)
|
|
104
|
-
popup.style.setProperty(anchorWidthVariable, width);
|
|
115
|
+
stretchWidth = options.constrainWidth === false ? anchorWidth
|
|
116
|
+
: Math.min(anchorWidth, Math.max(0, viewport.width - 16));
|
|
117
|
+
applyAnchorWidth(stretchWidth, matchAnchorWidth, anchorWidthVariable);
|
|
105
118
|
}
|
|
106
119
|
popup.hidden = false;
|
|
107
120
|
if (!popup.matches(':popover-open')) {
|
|
@@ -119,19 +132,16 @@ export function connectPopup(popup, anchor, options) {
|
|
|
119
132
|
const point = options.anchorPoint;
|
|
120
133
|
const positionRect = point
|
|
121
134
|
? DOMRect.fromRect(point) : options.getAnchorRect?.(rect, bounds) ?? rect;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
height: Math.max(document.documentElement.scrollHeight, bounds.height)
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
+
let layout = resolvePosition(positionRect, bounds, viewport);
|
|
136
|
+
const scaleX = layout.scaleX ?? 1;
|
|
137
|
+
if (stretchWidth !== undefined && stretchScaleX !== scaleX) {
|
|
138
|
+
// The corrected minimum width can change the box before the first visible alignment.
|
|
139
|
+
stretchScaleX = scaleX;
|
|
140
|
+
applyAnchorWidth(stretchWidth, matchAnchorWidth, anchorWidthVariable);
|
|
141
|
+
const resized = options.measurePopup?.() ?? popup.getBoundingClientRect();
|
|
142
|
+
layout = resolvePosition(positionRect, resized, viewport);
|
|
143
|
+
}
|
|
144
|
+
const { position } = layout;
|
|
135
145
|
flips = position.flips;
|
|
136
146
|
if (disposed) {
|
|
137
147
|
return;
|
|
@@ -144,13 +154,19 @@ export function connectPopup(popup, anchor, options) {
|
|
|
144
154
|
.placement}:${JSON.stringify(position.sourceAlign)}:${position.alignedPlacement}`;
|
|
145
155
|
const onAlign = options.onAlign;
|
|
146
156
|
if (onAlign) {
|
|
147
|
-
const geometry = `${signature}:${rect.x}:${rect.y}:${rect.width}:${rect.height}
|
|
157
|
+
const geometry = `${signature}:${rect.x}:${rect.y}:${rect.width}:${rect.height}`
|
|
158
|
+
+ `:${layout.bounds.width}:${layout.bounds.height}`;
|
|
148
159
|
if (manual || geometry !== lastAlignment) {
|
|
149
160
|
onAlign(position);
|
|
150
161
|
lastAlignment = geometry;
|
|
151
162
|
}
|
|
152
163
|
}
|
|
153
|
-
|
|
164
|
+
if (portal) {
|
|
165
|
+
portal.applyPosition(position, layout.projection);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
options.applyPosition?.(position);
|
|
169
|
+
}
|
|
154
170
|
if (signature !== lastPosition) {
|
|
155
171
|
if (!options.applyPosition) {
|
|
156
172
|
popup.style.left = `${position.left}px`;
|
|
@@ -166,6 +182,34 @@ export function connectPopup(popup, anchor, options) {
|
|
|
166
182
|
if (!wasShown)
|
|
167
183
|
options.onVisibilityChange?.(true);
|
|
168
184
|
}
|
|
185
|
+
// A custom portal can constrain the surface before the ordinary viewport solver runs.
|
|
186
|
+
function resolvePosition(anchor, bounds, viewport) {
|
|
187
|
+
const { placement, autoAdjustOverflow, align } = options;
|
|
188
|
+
const gap = typeof options.gap === 'function' ? options.gap() : options.gap;
|
|
189
|
+
const root = document.documentElement;
|
|
190
|
+
const context = {
|
|
191
|
+
flips,
|
|
192
|
+
source: options.sourcePlacement,
|
|
193
|
+
align: options.sourceAlign,
|
|
194
|
+
builtinPlacements: options.builtinPlacements,
|
|
195
|
+
alignPoint: options.alignPoint,
|
|
196
|
+
scrollRegion: {
|
|
197
|
+
x: -root.scrollLeft,
|
|
198
|
+
y: -root.scrollTop,
|
|
199
|
+
width: Math.max(root.scrollWidth, bounds.width),
|
|
200
|
+
height: Math.max(root.scrollHeight, bounds.height)
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const measured = portal?.getPosition(anchor, bounds, viewport, { placement, autoAdjustOverflow, align, gap }, context, getNativePosition);
|
|
204
|
+
if (measured)
|
|
205
|
+
return measured;
|
|
206
|
+
return { position: getNativePosition(bounds), bounds };
|
|
207
|
+
// The unprojected box also feeds the owner solver after a live transform is removed.
|
|
208
|
+
function getNativePosition(nativeBounds) {
|
|
209
|
+
const custom = options.getPosition?.(anchor, nativeBounds, viewport);
|
|
210
|
+
return custom ?? getTooltipPosition(anchor, nativeBounds, viewport, placement, autoAdjustOverflow, align, gap, context);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
169
213
|
// Measures each frame, including movements anchor without changing dimensions.
|
|
170
214
|
function tick() {
|
|
171
215
|
update();
|
|
@@ -267,6 +311,7 @@ export function connectPopup(popup, anchor, options) {
|
|
|
267
311
|
}
|
|
268
312
|
popupConnections.delete(popup);
|
|
269
313
|
hide();
|
|
314
|
+
portal?.clearProjection();
|
|
270
315
|
};
|
|
271
316
|
// Retargeting within one flush can temporarily unregister the trigger.
|
|
272
317
|
if (retainSurface) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Resolves the Ant Design 6.6.8 default and applies rc-select 1.10.1 precedence. */
|
|
2
|
+
export declare function selectPopupMotionName(animation: string | undefined, transitionName: string | undefined, selectPrefix: string, rootPrefix: string): string;
|
|
3
|
+
/** Uses the bundled stylesheet for the default namespace and scopes other prefixes to their owner. */
|
|
4
|
+
export declare function selectPopupMotionCss(selectPrefix: string, rootPrefix: string): string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Resolves rc-select popup motion names and scopes the pinned motion CSS to the same owner.
|
|
2
|
+
import template from '../vendor/tree-select-popup-motion.css.js';
|
|
3
|
+
/** Resolves the Ant Design 6.6.8 default and applies rc-select 1.10.1 precedence. */
|
|
4
|
+
export function selectPopupMotionName(animation, transitionName, selectPrefix, rootPrefix) {
|
|
5
|
+
return animation ? `${selectPrefix}-dropdown-${animation}`
|
|
6
|
+
: transitionName === undefined ? `${rootPrefix}-slide-up` : transitionName;
|
|
7
|
+
}
|
|
8
|
+
/** Uses the bundled stylesheet for the default namespace and scopes other prefixes to their owner. */
|
|
9
|
+
export function selectPopupMotionCss(selectPrefix, rootPrefix) {
|
|
10
|
+
if (selectPrefix === 'ant-select' && rootPrefix === 'ant') {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const owner = `:where([data-ant-select-prefix=${JSON.stringify(selectPrefix)}]`
|
|
14
|
+
+ `[data-ant-select-root-prefix=${JSON.stringify(rootPrefix)}]`
|
|
15
|
+
+ ':is([data-ant-tree-select-motion],[data-ant-cascader-motion],[data-ant-select-popup-motion]))';
|
|
16
|
+
return template.replace(/\.ant-select-dropdown([-\w]*)|\.ant-(slide|move)-/g, (_match, suffix, kind) => suffix !== undefined
|
|
17
|
+
? `.${selectPrefix}-dropdown${suffix}${owner}` : `.${rootPrefix}-${kind}-`).replace(/<\/style/gi, '<\\/style');
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
|
+
import RenderContent from '../RenderContent.svelte';
|
|
3
4
|
import ProgressCircle from './ProgressCircle.svelte';
|
|
4
5
|
import { progressCircleIcons } from './progress-circle-icons';
|
|
5
6
|
import { statusIcons } from '../icon/status-icons';
|
|
@@ -7,6 +8,8 @@
|
|
|
7
8
|
import ThemeScopeStyle from '../theme/ThemeScopeStyle.svelte';
|
|
8
9
|
import { useConfig } from '../config-provider/config-context';
|
|
9
10
|
import { useComponentTheme } from '../theme/theme-component.svelte';
|
|
11
|
+
import { inlineStyleText, mergeInlineStyleLayers } from '../style/inline-style-layers.engine';
|
|
12
|
+
import type { CSSStyle } from '../style/inline-style.types';
|
|
10
13
|
import { getProgressPrefixCss } from './progress-prefix.engine';
|
|
11
14
|
import {
|
|
12
15
|
getProgressCircleGeometry,
|
|
@@ -90,6 +93,7 @@
|
|
|
90
93
|
let lineColor = $derived(Array.isArray(strokeColor) ? strokeColor[0] : strokeColor);
|
|
91
94
|
let background = $derived(typeof lineColor === 'object'
|
|
92
95
|
? progressGradient(lineColor, config.direction === 'rtl') : lineColor);
|
|
96
|
+
let squareCorners = $derived(strokeLinecap !== 'round' ? 'border-radius: 0px;' : '');
|
|
93
97
|
let bright = $derived(isProgressColorBright(strokeColor));
|
|
94
98
|
let strings = $derived({ ...ruRU.progress, ...config.locale.progress });
|
|
95
99
|
// The legacy single-parameter callback keeps the same invocation count and arguments.
|
|
@@ -145,16 +149,44 @@
|
|
|
145
149
|
const localClasses = typeof classNames === 'function' ? classNames(semanticInfo) : classNames;
|
|
146
150
|
const localStyles = typeof styles === 'function' ? styles(semanticInfo) : styles;
|
|
147
151
|
const classes: ProgressSemanticSlots = {};
|
|
148
|
-
const slots: ProgressSemanticSlots = {};
|
|
152
|
+
const slots: ProgressSemanticSlots<CSSStyle> = {};
|
|
149
153
|
|
|
150
154
|
for (const slot of ['root', 'body', 'rail', 'track', 'indicator'] as const) {
|
|
151
155
|
classes[slot] = [contextClasses?.[slot], localClasses?.[slot]].filter(Boolean).join(' ');
|
|
152
|
-
slots[slot] =
|
|
153
|
-
|
|
156
|
+
slots[slot] = mergeInlineStyleLayers(
|
|
157
|
+
contextStyles?.[slot],
|
|
158
|
+
slot === 'root' ? config.progress?.style : undefined,
|
|
159
|
+
localStyles?.[slot],
|
|
160
|
+
slot === 'root' ? style : undefined
|
|
161
|
+
);
|
|
154
162
|
}
|
|
155
163
|
return { classes, styles: slots };
|
|
156
164
|
});
|
|
157
165
|
|
|
166
|
+
let lineRailStyle = $derived(inlineStyleText(
|
|
167
|
+
`height: ${lineSize.height}px;`
|
|
168
|
+
+ (railColor ? `background: ${railColor};` : '')
|
|
169
|
+
+ squareCorners,
|
|
170
|
+
semantics.styles.rail
|
|
171
|
+
));
|
|
172
|
+
let lineTrackStyle = $derived(inlineStyleText(
|
|
173
|
+
`width: ${value}%;`
|
|
174
|
+
+ `height: ${lineSize.height}px;`
|
|
175
|
+
+ (background
|
|
176
|
+
? `background: ${background};`
|
|
177
|
+
+ `--progress-line-stroke-color: ${background};`
|
|
178
|
+
: '')
|
|
179
|
+
+ squareCorners,
|
|
180
|
+
semantics.styles.track
|
|
181
|
+
));
|
|
182
|
+
let lineSuccessStyle = $derived(inlineStyleText(
|
|
183
|
+
`width: ${successValue}%;`
|
|
184
|
+
+ `height: ${lineSize.height}px;`
|
|
185
|
+
+ (success?.strokeColor ? `background-color: ${success.strokeColor};` : '')
|
|
186
|
+
+ squareCorners,
|
|
187
|
+
semantics.styles.track
|
|
188
|
+
));
|
|
189
|
+
|
|
158
190
|
function stepColor(active: boolean, index: number): string {
|
|
159
191
|
if (!active) {
|
|
160
192
|
return railColor ?? '';
|
|
@@ -222,9 +254,11 @@
|
|
|
222
254
|
semantics.classes.indicator
|
|
223
255
|
]} data-ant-progress-part="indicator" data-ant-progress-position={pureLine ? infoPosition : undefined}
|
|
224
256
|
data-ant-progress-icon={Boolean(statusIcon) || undefined}
|
|
225
|
-
style={semantics.styles.indicator}
|
|
226
|
-
title={typeof text === 'function' ? undefined : valueText}
|
|
227
|
-
dir={statusIcon || infoPosition === 'inner' || steps ? undefined : 'auto'}>{#if statusIcon}<span class="anticon" role="img" aria-label={statusIcon}><svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor" fill-rule={type === 'line' && resolvedStatus === 'exception' ? 'evenodd' : undefined} aria-hidden="true" focusable="false"><path d={type === 'line' ? statusIcons[resolvedStatus === 'success' ? 'check-circle-filled' : 'close-circle-filled'] : progressCircleIcons[resolvedStatus === 'success' ? 'success' : 'exception']} /></svg></span>{:else if typeof text === 'function'}{@render text()}
|
|
257
|
+
style={inlineStyleText(semantics.styles.indicator)}
|
|
258
|
+
title={typeof text === 'function' || Array.isArray(text) ? undefined : valueText}
|
|
259
|
+
dir={statusIcon || infoPosition === 'inner' || steps ? undefined : 'auto'}>{#if statusIcon}<span class="anticon" role="img" aria-label={statusIcon}><svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor" fill-rule={type === 'line' && resolvedStatus === 'exception' ? 'evenodd' : undefined} aria-hidden="true" focusable="false"><path d={type === 'line' ? statusIcons[resolvedStatus === 'success' ? 'check-circle-filled' : 'close-circle-filled'] : progressCircleIcons[resolvedStatus === 'success' ? 'success' : 'exception']} /></svg></span>{:else if typeof text === 'function'}{@render text()}
|
|
260
|
+
{:else if Array.isArray(text)}<RenderContent value={text} />
|
|
261
|
+
{:else if typeof text !== 'boolean'}{text}{/if}</span>
|
|
228
262
|
{/snippet}
|
|
229
263
|
|
|
230
264
|
{#if prefixCss}<ThemeScopeStyle css={prefixCss} scope={`progress-prefix:${prefix}`} />{/if}<div
|
|
@@ -247,7 +281,7 @@
|
|
|
247
281
|
steps && `${prefix}-steps`, showInfo && `${prefix}-show-info`,
|
|
248
282
|
size === 'small' && `${prefix}-small`, config.direction === 'rtl' && `${prefix}-rtl`,
|
|
249
283
|
config.progress?.class, className, rootClassName, semantics.classes.root
|
|
250
|
-
]} style={
|
|
284
|
+
]} style={inlineStyleText(componentTheme.style, semantics.styles.root) || undefined}
|
|
251
285
|
{...rest}>
|
|
252
286
|
{#if type !== 'line'}
|
|
253
287
|
<ProgressCircle {prefix} {type} percent={value} {diameter} strokeWidth={circle.strokeWidth}
|
|
@@ -255,42 +289,35 @@
|
|
|
255
289
|
{gapDegree} {gapPlacement} classes={semantics.classes}
|
|
256
290
|
styles={semantics.styles} indicator={showInfo ? indicator : undefined} />
|
|
257
291
|
{:else if steps && stepLayout}
|
|
258
|
-
<div class={[`${prefix}-steps-body`, semantics.classes.body]}
|
|
292
|
+
<div class={[`${prefix}-steps-body`, semantics.classes.body]}
|
|
293
|
+
style={inlineStyleText(semantics.styles.body)}
|
|
259
294
|
data-ant-progress-part="body">
|
|
260
295
|
{#each stepLayout.items as active, index}
|
|
261
296
|
<div class={[`${prefix}-steps-item`, active && `${prefix}-steps-item-active`,
|
|
262
297
|
semantics.classes.track]} data-ant-progress-part="step"
|
|
263
|
-
style={
|
|
264
|
-
|
|
265
|
-
|
|
298
|
+
style={inlineStyleText(
|
|
299
|
+
`background-color: ${stepColor(active, index)};`
|
|
300
|
+
+ `width: ${stepLayout.width}px;`
|
|
301
|
+
+ `height: ${stepLayout.height}px;`,
|
|
302
|
+
semantics.styles.track
|
|
303
|
+
)}></div>
|
|
266
304
|
{/each}
|
|
267
305
|
{#if showInfo}{@render indicator()}{/if}
|
|
268
306
|
</div>
|
|
269
307
|
{:else}
|
|
270
308
|
<div class={[`${prefix}-body`, infoAlign === 'center' && infoPosition === 'outer'
|
|
271
309
|
&& `${prefix}-body-layout-bottom`, semantics.classes.body]} data-ant-progress-part="body"
|
|
272
|
-
style={`width: ${lineSize.width}
|
|
310
|
+
style={inlineStyleText(`width: ${lineSize.width};`, semantics.styles.body)}>
|
|
273
311
|
<div class={[`${prefix}-rail`, semantics.classes.rail]} data-ant-progress-part="rail"
|
|
274
|
-
style={
|
|
275
|
-
+ `${railColor ? `background: ${railColor};` : ''}`
|
|
276
|
-
+ `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.rail ?? ''}`}>
|
|
312
|
+
style={lineRailStyle}>
|
|
277
313
|
<div class={[`${prefix}-track`, semantics.classes.track]} data-ant-progress-part="track"
|
|
278
|
-
style={
|
|
279
|
-
+ `height: ${lineSize.height}px;`
|
|
280
|
-
+ `${background
|
|
281
|
-
? `background: ${background};`
|
|
282
|
-
+ `--progress-line-stroke-color: ${background};`
|
|
283
|
-
: ''}`
|
|
284
|
-
+ `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.track ?? ''}`}>
|
|
314
|
+
style={lineTrackStyle}>
|
|
285
315
|
{#if showInfo && infoPosition === 'inner'}{@render indicator()}{/if}
|
|
286
316
|
</div>
|
|
287
317
|
{#if success?.percent !== undefined}
|
|
288
318
|
<div class={[`${prefix}-track ${prefix}-track-success`, semantics.classes.track]}
|
|
289
319
|
data-ant-progress-part="track"
|
|
290
|
-
style={
|
|
291
|
-
+ `height: ${lineSize.height}px;`
|
|
292
|
-
+ `${success.strokeColor ? `background-color: ${success.strokeColor};` : ''}`
|
|
293
|
-
+ `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.track ?? ''}`}></div>
|
|
320
|
+
style={lineSuccessStyle}></div>
|
|
294
321
|
{/if}
|
|
295
322
|
</div>
|
|
296
323
|
{#if showInfo && infoPosition === 'outer'}{@render indicator()}{/if}
|