@type-dom/ui 0.0.4 → 0.0.6
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/README.md +44 -45
- package/package.json +4 -3
- package/src/aria.d.ts +15 -0
- package/src/components/basic/td-button/td-button.abstract.d.ts +19 -0
- package/src/components/basic/td-button/td-button.abstract.js +175 -0
- package/src/components/basic/td-button/td-button.class.d.ts +3 -14
- package/src/components/basic/td-button/td-button.class.js +4 -172
- package/src/components/basic/td-button/td-button.const.d.ts +7 -0
- package/src/components/basic/td-button/td-button.const.js +4 -0
- package/src/components/basic/td-button/td-button.interface.d.ts +16 -6
- package/src/components/basic/td-button/td-button.interface.js +4 -0
- package/src/components/basic/td-button/td-button.style.d.ts +8 -3
- package/src/components/basic/td-button/td-button.style.js +28 -10
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +2 -2
- package/src/components/basic/td-button-group/td-button-group.class.js +28 -25
- package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +3 -2
- package/src/components/basic/td-container/td-aside/td-aside.class.js +7 -16
- package/src/components/basic/td-container/td-container.class.d.ts +4 -3
- package/src/components/basic/td-container/td-container.class.js +9 -8
- package/src/components/basic/td-container/td-container.interface.d.ts +2 -2
- package/src/components/basic/td-container/td-container.js +3 -2
- package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +2 -3
- package/src/components/basic/td-container/td-footer/td-footer.class.js +9 -11
- package/src/components/basic/td-container/td-header/td-header.class.d.ts +2 -2
- package/src/components/basic/td-container/td-header/td-header.class.js +10 -10
- package/src/components/basic/td-container/td-main/td-main.class.d.ts +2 -1
- package/src/components/basic/td-container/td-main/td-main.class.js +6 -4
- package/src/components/basic/td-icon/td-icon.class.d.ts +30 -6
- package/src/components/basic/td-icon/td-icon.class.js +111 -47
- package/src/components/basic/td-icon/td-icon.interface.d.ts +36 -6
- package/src/components/basic/td-icon/td-icon.style.d.ts +5 -14
- package/src/components/basic/td-icon/td-icon.style.js +5 -6
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +4 -4
- package/src/components/basic/td-layout/td-col/td-col.class.js +48 -45
- package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +0 -4
- package/src/components/basic/td-layout/td-row/td-row.class.d.ts +4 -3
- package/src/components/basic/td-layout/td-row/td-row.class.js +31 -30
- package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +0 -1
- package/src/components/basic/td-link/td-link.class.d.ts +5 -5
- package/src/components/basic/td-link/td-link.class.js +53 -55
- package/src/components/basic/td-link/td-link.interface.d.ts +14 -6
- package/src/components/basic/td-link/td-link.style.d.ts +14 -3
- package/src/components/basic/td-link/td-link.style.js +40 -10
- package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +2 -1
- package/src/components/basic/td-scrollbar/bar/bar.class.js +8 -7
- package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +3 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +18 -20
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +3 -2
- package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +2 -1
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +12 -12
- package/src/components/basic/td-space/td-space.class.d.ts +5 -5
- package/src/components/basic/td-space/td-space.class.js +32 -30
- package/src/components/basic/td-space/td-space.interface.d.ts +1 -0
- package/src/components/basic/td-text/td-text.class.d.ts +3 -3
- package/src/components/basic/td-text/td-text.class.js +22 -19
- package/src/components/basic/td-text/td-text.interface.d.ts +4 -2
- package/src/components/basic/td-text/td-text.style.d.ts +1 -1
- package/src/components/basic/td-text/td-text.style.js +13 -4
- package/src/components/data/index.d.ts +30 -0
- package/src/components/data/index.js +34 -0
- package/src/components/data/td-avatar/td-avatar.class.d.ts +12 -0
- package/src/components/data/td-avatar/td-avatar.class.js +120 -0
- package/src/components/data/td-avatar/td-avatar.interface.d.ts +41 -0
- package/src/components/data/td-avatar/td-avatar.style.d.ts +13 -0
- package/src/components/data/td-avatar/td-avatar.style.js +20 -0
- package/src/components/data/td-badge/td-badge.class.d.ts +9 -0
- package/src/components/data/td-badge/td-badge.class.js +104 -0
- package/src/components/data/td-badge/td-badge.interface.d.ts +52 -0
- package/src/components/data/td-badge/td-badge.style.d.ts +7 -0
- package/src/components/data/td-badge/td-badge.style.js +12 -0
- package/src/components/data/td-card/td-card.class.d.ts +14 -0
- package/src/components/data/td-card/td-card.class.js +102 -0
- package/src/components/data/td-card/td-card.interface.d.ts +26 -0
- package/src/components/data/td-card/td-card.interface.js +2 -0
- package/src/components/data/td-card/td-card.style.d.ts +9 -0
- package/src/components/data/td-card/td-card.style.js +29 -0
- package/src/components/data/td-carousel/td-carousel.class.d.ts +0 -0
- package/src/components/data/td-carousel/td-carousel.class.js +1 -0
- package/src/components/data/td-carousel/td-carousel.interface.d.ts +0 -0
- package/src/components/data/td-carousel/td-carousel.interface.js +1 -0
- package/src/components/data/td-check-tag/td-check-tag.class.d.ts +12 -0
- package/src/components/data/td-check-tag/td-check-tag.class.js +75 -0
- package/src/components/data/td-check-tag/td-check-tag.interface.d.ts +22 -0
- package/src/components/data/td-check-tag/td-check-tag.interface.js +3 -0
- package/src/components/data/td-check-tag/td-check-tag.style.d.ts +7 -0
- package/src/components/data/td-check-tag/td-check-tag.style.js +39 -0
- package/src/components/data/td-collapse/td-collapse.class.d.ts +13 -0
- package/src/components/data/td-collapse/td-collapse.class.js +85 -0
- package/src/components/data/td-collapse/td-collapse.interface.d.ts +18 -0
- package/src/components/data/td-collapse/td-collapse.interface.js +2 -0
- package/src/components/data/td-collapse/td-collapse.style.d.ts +11 -0
- package/src/components/data/td-collapse/td-collapse.style.js +22 -0
- package/src/components/data/td-collapse-item/td-collapse-item.class.d.ts +25 -0
- package/src/components/data/td-collapse-item/td-collapse-item.class.js +222 -0
- package/src/components/data/td-collapse-item/td-collapse-item.interface.d.ts +20 -0
- package/src/components/data/td-collapse-item/td-collapse-item.interface.js +2 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.class.d.ts +6 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.class.js +12 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.interface.d.ts +4 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.interface.js +2 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.util.d.ts +2 -0
- package/src/components/data/td-collapse-transition/td-collapse-transition.util.js +147 -0
- package/src/components/data/td-count-down/td-count-down.class.d.ts +13 -0
- package/src/components/data/td-count-down/td-count-down.class.js +57 -0
- package/src/components/data/td-count-down/td-count-down.function.d.ts +0 -0
- package/src/components/data/td-count-down/td-count-down.function.js +1 -0
- package/src/components/data/td-count-down/td-count-down.interface.d.ts +11 -0
- package/src/components/data/td-count-down/td-count-down.interface.js +2 -0
- package/src/components/data/td-count-down/utils.d.ts +3 -0
- package/src/components/data/td-count-down/utils.js +32 -0
- package/src/components/data/td-descriptions/td-descriptions-row.d.ts +21 -0
- package/src/components/data/td-descriptions/td-descriptions-row.js +80 -0
- package/src/components/data/td-descriptions/td-descriptions.class.d.ts +18 -0
- package/src/components/data/td-descriptions/td-descriptions.class.js +156 -0
- package/src/components/data/td-descriptions/td-descriptions.interface.d.ts +43 -0
- package/src/components/data/td-descriptions/td-descriptions.interface.js +2 -0
- package/src/components/data/td-descriptions/td-descriptions.style.d.ts +51 -0
- package/src/components/data/td-descriptions/td-descriptions.style.js +142 -0
- package/src/components/data/td-descriptions/td-descritions-cell.d.ts +15 -0
- package/src/components/data/td-descriptions/td-descritions-cell.js +110 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.d.ts +10 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +20 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.interface.d.ts +51 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.interface.js +2 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.style.d.ts +10 -0
- package/src/components/data/td-descriptions-item/td-descriptions-item.style.js +13 -0
- package/src/components/data/td-empty/img-empty.class.d.ts +5 -0
- package/src/components/data/td-empty/img-empty.class.js +204 -0
- package/src/components/data/td-empty/td-empty.class.d.ts +13 -0
- package/src/components/data/td-empty/td-empty.class.js +77 -0
- package/src/components/data/td-empty/td-empty.interface.d.ts +25 -0
- package/src/components/data/td-empty/td-empty.interface.js +2 -0
- package/src/components/data/td-empty/td-empty.style.d.ts +24 -0
- package/src/components/data/td-empty/td-empty.style.js +65 -0
- package/src/components/data/td-image/td-image.class.d.ts +16 -0
- package/src/components/data/td-image/td-image.class.js +95 -0
- package/src/components/data/td-image/td-image.interface.d.ts +78 -0
- package/src/components/data/td-image/td-image.interface.js +2 -0
- package/src/components/data/td-image/td-image.style.d.ts +11 -0
- package/src/components/data/td-image/td-image.style.js +18 -0
- package/src/components/data/td-image/util.d.ts +1 -0
- package/src/components/data/td-image/util.js +18 -0
- package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +20 -0
- package/src/components/data/td-image-viewer/td-image-viewer.class.js +261 -0
- package/src/components/data/td-image-viewer/td-image-viewer.interface.d.ts +63 -0
- package/src/components/data/td-image-viewer/td-image-viewer.interface.js +2 -0
- package/src/components/data/td-image-viewer/td-image-viewer.style.d.ts +9 -0
- package/src/components/data/td-image-viewer/td-image-viewer.style.js +67 -0
- package/src/components/data/td-pagination/td-pagination.class.d.ts +0 -0
- package/src/components/data/td-pagination/td-pagination.class.js +1 -0
- package/src/components/data/td-pagination/td-pagination.interface.d.ts +0 -0
- package/src/components/data/td-pagination/td-pagination.interface.js +1 -0
- package/src/components/data/td-progress/td-progress.class.d.ts +0 -0
- package/src/components/data/td-progress/td-progress.class.js +1 -0
- package/src/components/data/td-progress/td-progress.interface.d.ts +0 -0
- package/src/components/data/td-progress/td-progress.interface.js +1 -0
- package/src/components/data/td-result/td-result.class.d.ts +8 -0
- package/src/components/data/td-result/td-result.class.js +87 -0
- package/src/components/data/td-result/td-result.constant.d.ts +8 -0
- package/src/components/data/td-result/td-result.constant.js +41 -0
- package/src/components/data/td-result/td-result.interface.d.ts +28 -0
- package/src/components/data/td-result/td-result.interface.js +2 -0
- package/src/components/data/td-result/td-result.style.d.ts +16 -0
- package/src/components/data/td-result/td-result.style.js +46 -0
- package/src/components/data/td-segmented/td-segmented.class.d.ts +22 -0
- package/src/components/data/td-segmented/td-segmented.class.js +172 -0
- package/src/components/data/td-segmented/td-segmented.interface.d.ts +51 -0
- package/src/components/data/td-segmented/td-segmented.interface.js +2 -0
- package/src/components/data/td-segmented/td-segmented.style.d.ts +37 -0
- package/src/components/data/td-segmented/td-segmented.style.js +142 -0
- package/src/components/data/td-statistic/td-statistic.abstract.d.ts +15 -0
- package/src/components/data/td-statistic/td-statistic.abstract.js +113 -0
- package/src/components/data/td-statistic/td-statistic.class.d.ts +6 -0
- package/src/components/data/td-statistic/td-statistic.class.js +11 -0
- package/src/components/data/td-statistic/td-statistic.interface.d.ts +58 -0
- package/src/components/data/td-statistic/td-statistic.interface.js +2 -0
- package/src/components/data/td-statistic/td-statistic.style.d.ts +9 -0
- package/src/components/data/td-statistic/td-statistic.style.js +16 -0
- package/src/components/data/td-table/td-table.class.d.ts +0 -0
- package/src/components/data/td-table/td-table.class.js +1 -0
- package/src/components/data/td-table/td-table.interface.d.ts +0 -0
- package/src/components/data/td-table/td-table.interface.js +1 -0
- package/src/components/data/td-tag/td-tag.class.d.ts +12 -0
- package/src/components/data/td-tag/td-tag.class.js +144 -0
- package/src/components/data/td-tag/td-tag.interface.d.ts +42 -0
- package/src/components/data/td-tag/td-tag.interface.js +2 -0
- package/src/components/data/td-tag/td-tag.style.d.ts +45 -0
- package/src/components/data/td-tag/td-tag.style.js +80 -0
- package/src/components/data/td-timeline/td-timeline.class.d.ts +0 -0
- package/src/components/data/td-timeline/td-timeline.class.js +1 -0
- package/src/components/data/td-timeline/td-timeline.interface.d.ts +0 -0
- package/src/components/data/td-timeline/td-timeline.interface.js +1 -0
- package/src/components/data/td-tree/td-tree.class.d.ts +0 -0
- package/src/components/data/td-tree/td-tree.class.js +1 -0
- package/src/components/data/td-tree/td-tree.interface.d.ts +0 -0
- package/src/components/data/td-tree/td-tree.interface.js +1 -0
- package/src/components/feedback/dialog/dialog.class.d.ts +2 -1
- package/src/components/feedback/dialog/dialog.class.js +5 -5
- package/src/components/feedback/dialog/dialog.interface.d.ts +2 -3
- package/src/components/feedback/index.d.ts +11 -0
- package/src/components/feedback/index.js +15 -1
- package/src/components/feedback/message-box/message-box.d.ts +2 -1
- package/src/components/feedback/message-box/message-box.interface.d.ts +2 -2
- package/src/components/feedback/message-box/message-box.js +6 -6
- package/src/components/feedback/overlay/container/body/body.js +3 -5
- package/src/components/feedback/overlay/container/container.js +4 -6
- package/src/components/feedback/overlay/container/footer/cancel-button/cancel-button.js +3 -3
- package/src/components/feedback/overlay/container/footer/confirm-button/confirm-button.js +4 -6
- package/src/components/feedback/overlay/container/footer/footer.d.ts +1 -2
- package/src/components/feedback/overlay/container/footer/footer.js +24 -26
- package/src/components/feedback/overlay/container/header/close-button/close-button.js +6 -8
- package/src/components/feedback/overlay/container/header/header.js +2 -2
- package/src/components/feedback/overlay/container/header/title/title.js +3 -5
- package/src/components/feedback/overlay/overlay.abstract.js +6 -8
- package/src/components/feedback/td-alert/td-alert.class.d.ts +15 -0
- package/src/components/feedback/td-alert/td-alert.class.js +111 -0
- package/src/components/feedback/td-alert/td-alert.interface.d.ts +41 -0
- package/src/components/feedback/td-alert/td-alert.interface.js +2 -0
- package/src/components/feedback/td-alert/td-alert.style.d.ts +21 -0
- package/src/components/feedback/td-alert/td-alert.style.js +102 -0
- package/src/components/feedback/td-dialog/td-dialog.class.d.ts +12 -0
- package/src/components/feedback/td-dialog/td-dialog.class.js +70 -0
- package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +79 -0
- package/src/components/feedback/td-dialog/td-dialog.interface.js +2 -0
- package/src/components/feedback/td-dialog/td-dialog.style.d.ts +20 -0
- package/src/components/feedback/td-dialog/td-dialog.style.js +89 -0
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.d.ts +12 -0
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +79 -0
- package/src/components/feedback/td-dialog-content/td-dialog-content.interface.d.ts +51 -0
- package/src/components/feedback/td-dialog-content/td-dialog-content.interface.js +2 -0
- package/src/components/feedback/td-drawer/td-drawer.class.d.ts +8 -0
- package/src/components/feedback/td-drawer/td-drawer.class.js +39 -0
- package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +12 -0
- package/src/components/feedback/td-drawer/td-drawer.interface.js +2 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +4 -3
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +11 -11
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +9 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.js +1 -0
- package/src/components/feedback/td-focus-trap/tokens.d.ts +5 -0
- package/src/components/feedback/td-focus-trap/tokens.js +4 -10
- package/src/components/feedback/td-focus-trap/utils.d.ts +2 -2
- package/src/components/feedback/td-focus-trap/utils.js +3 -3
- package/src/components/feedback/td-loading/td-loading.class.d.ts +12 -0
- package/src/components/feedback/td-loading/td-loading.class.js +65 -0
- package/src/components/feedback/td-loading/td-loading.interface.d.ts +37 -0
- package/src/components/feedback/td-loading/td-loading.interface.js +2 -0
- package/src/components/feedback/td-message/td-message.class.d.ts +24 -0
- package/src/components/feedback/td-message/td-message.class.js +239 -0
- package/src/components/feedback/td-message/td-message.interface.d.ts +105 -0
- package/src/components/feedback/td-message/td-message.interface.js +22 -0
- package/src/components/feedback/td-message/td-message.style.d.ts +17 -0
- package/src/components/feedback/td-message/td-message.style.js +104 -0
- package/src/components/feedback/td-message-box/td-message-box.class.d.ts +42 -0
- package/src/components/feedback/td-message-box/td-message-box.class.js +531 -0
- package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +142 -0
- package/src/components/feedback/td-message-box/td-message-box.interface.js +2 -0
- package/src/components/feedback/td-message-box/td-message-box.style.d.ts +36 -0
- package/src/components/feedback/td-message-box/td-message-box.style.js +182 -0
- package/src/components/feedback/td-notification/td-notification.class.d.ts +30 -0
- package/src/components/feedback/td-notification/td-notification.class.js +234 -0
- package/src/components/feedback/td-notification/td-notification.interface.d.ts +76 -0
- package/src/components/feedback/td-notification/td-notification.interface.js +2 -0
- package/src/components/feedback/td-notification/td-notification.style.d.ts +28 -0
- package/src/components/feedback/td-notification/td-notification.style.js +138 -0
- package/src/components/feedback/td-overlay/td-overlay.class.d.ts +10 -0
- package/src/components/feedback/td-overlay/td-overlay.class.js +35 -0
- package/src/components/feedback/td-overlay/td-overlay.interface.d.ts +13 -0
- package/src/components/feedback/td-overlay/td-overlay.interface.js +2 -0
- package/src/components/feedback/td-overlay/td-overlay.style.d.ts +2 -0
- package/src/components/feedback/td-overlay/td-overlay.style.js +16 -0
- package/src/components/feedback/td-popconfirm/td-popconfirm.class.d.ts +0 -0
- package/src/components/feedback/td-popconfirm/td-popconfirm.class.js +1 -0
- package/src/components/feedback/td-popconfirm/td-popconfirm.interface.d.ts +0 -0
- package/src/components/feedback/td-popconfirm/td-popconfirm.interface.js +1 -0
- package/src/components/feedback/td-popover/td-popover.class.d.ts +0 -0
- package/src/components/feedback/td-popover/td-popover.class.js +1 -0
- package/src/components/feedback/td-popover/td-popover.interface.d.ts +0 -0
- package/src/components/feedback/td-popover/td-popover.interface.js +1 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +2 -1
- package/src/components/feedback/td-popper/arrow/arrow.class.js +6 -6
- package/src/components/feedback/td-popper/content/content.class.d.ts +2 -1
- package/src/components/feedback/td-popper/content/content.class.js +7 -7
- package/src/components/feedback/td-popper/td-popper.class.d.ts +3 -2
- package/src/components/feedback/td-popper/td-popper.class.js +3 -3
- package/src/components/feedback/td-popper/td-popper.interface.d.ts +2 -3
- package/src/components/feedback/td-popper/td-popper.interface.js +0 -11
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +2 -1
- package/src/components/feedback/td-popper/trigger/trigger.class.js +3 -2
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +10 -0
- package/src/components/feedback/td-tooltip/content/content.class.d.ts +2 -1
- package/src/components/feedback/td-tooltip/content/content.class.js +3 -3
- package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +2 -1
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +7 -13
- package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +2 -1
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +3 -3
- package/src/components/feedback/td-tooltip/utils.d.ts +4 -0
- package/src/components/feedback/td-tooltip/utils.js +23 -0
- package/src/components/form/checkbox-group/checkbox-group.class.js +9 -8
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.class.js +3 -3
- package/src/components/form/field-item/cascade/field-cascade.abstract.js +25 -17
- package/src/components/form/field-item/field-item.abstract.d.ts +7 -3
- package/src/components/form/field-item/field-item.abstract.js +14 -9
- package/src/components/form/field-item/field-item.style.d.ts +1 -1
- package/src/components/form/field-item/field-item.style.js +1 -2
- package/src/components/form/field-item/input/field-input.abstract.d.ts +1 -2
- package/src/components/form/field-item/input/field-input.abstract.js +6 -6
- package/src/components/form/field-item/options/field-options.abstract.js +31 -27
- package/src/components/form/field-item/radio/field-radio.abstract.d.ts +2 -2
- package/src/components/form/field-item/radio/field-radio.abstract.js +30 -21
- package/src/components/form/field-item/select/field-select.abstract.d.ts +1 -2
- package/src/components/form/field-item/select/field-select.abstract.js +3 -3
- package/src/components/form/field-item/span/field-span.abstract.js +4 -4
- package/src/components/form/field-item/textarea/field-textarea.abstract.d.ts +1 -2
- package/src/components/form/field-item/textarea/field-textarea.abstract.js +6 -6
- package/src/components/form/field-select/field-select.class.js +10 -9
- package/src/components/form/field-select/option/option.class.js +1 -1
- package/src/components/form/index.d.ts +10 -0
- package/src/components/form/index.js +11 -1
- package/src/components/form/radio-group/radio-group.class.d.ts +3 -2
- package/src/components/form/radio-group/radio-group.class.js +13 -12
- package/src/components/form/radio-group/radio-option/radio-option.class.d.ts +3 -2
- package/src/components/form/radio-group/radio-option/radio-option.class.js +8 -9
- package/src/components/form/select/select.class.js +4 -4
- package/src/components/form/td-autocomplete/td-autocomplete.class.d.ts +0 -0
- package/src/components/form/td-autocomplete/td-autocomplete.class.js +1 -0
- package/src/components/form/td-autocomplete/td-autocomplete.interface.d.ts +0 -0
- package/src/components/form/td-autocomplete/td-autocomplete.interface.js +1 -0
- package/src/components/form/td-cascader/td-cascader.class.d.ts +0 -0
- package/src/components/form/td-cascader/td-cascader.class.js +1 -0
- package/src/components/form/td-cascader/td-cascader.interface.d.ts +0 -0
- package/src/components/form/td-cascader/td-cascader.interface.js +1 -0
- package/src/components/form/td-checkbox/composables/use-checkbox-status.d.ts +6 -0
- package/src/components/form/td-checkbox/composables/use-checkbox-status.js +52 -0
- package/src/components/form/td-checkbox/composables/use-checkbox.d.ts +6 -0
- package/src/components/form/td-checkbox/composables/use-checkbox.js +85 -0
- package/src/components/form/td-checkbox/td-checkbox.class.d.ts +8 -2
- package/src/components/form/td-checkbox/td-checkbox.class.js +54 -75
- package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +2 -1
- package/src/components/form/td-checkbox/td-checkbox.style.d.ts +46 -0
- package/src/components/form/td-checkbox/td-checkbox.style.js +144 -10
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +9 -2
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +56 -6
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.d.ts +9 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.js +55 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +2 -2
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +10 -10
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +1 -1
- package/src/components/form/td-color-picker/td-color-picker.class.d.ts +0 -0
- package/src/components/form/td-color-picker/td-color-picker.class.js +1 -0
- package/src/components/form/td-color-picker/td-color-picker.interface.d.ts +0 -0
- package/src/components/form/td-color-picker/td-color-picker.interface.js +1 -0
- package/src/components/form/td-date-picker/td-date-picker.class.d.ts +0 -0
- package/src/components/form/td-date-picker/td-date-picker.class.js +1 -0
- package/src/components/form/td-date-picker/td-date-picker.interface.d.ts +0 -0
- package/src/components/form/td-date-picker/td-date-picker.interface.js +1 -0
- package/src/components/form/td-date-time-picker/td-date-time-picker.class.d.ts +0 -0
- package/src/components/form/td-date-time-picker/td-date-time-picker.class.js +1 -0
- package/src/components/form/td-date-time-picker/td-date-time-picker.interface.d.ts +0 -0
- package/src/components/form/td-date-time-picker/td-date-time-picker.interface.js +1 -0
- package/src/components/form/td-form/hooks/use-form-item.d.ts +5 -0
- package/src/components/form/td-form/hooks/use-form-item.js +65 -0
- package/src/components/form/td-form/td-form.class.d.ts +3 -8
- package/src/components/form/td-form/td-form.class.js +10 -34
- package/src/components/form/td-form/td-form.const.d.ts +5 -0
- package/src/components/form/td-form/td-form.const.js +5 -0
- package/src/components/form/td-form/td-form.interface.js +33 -0
- package/src/components/form/td-form-item/td-form-item.class.d.ts +7 -4
- package/src/components/form/td-form-item/td-form-item.class.js +83 -60
- package/src/components/form/td-form-item/td-form-item.interface.d.ts +1 -3
- package/src/components/form/td-form-item/td-form-item.style.js +15 -15
- package/src/components/form/td-input/td-input-field.class.d.ts +1 -1
- package/src/components/form/td-input/td-input-field.class.js +13 -13
- package/src/components/form/td-input/td-input-field.interface.d.ts +2 -2
- package/src/components/form/td-input/td-input.class.d.ts +4 -3
- package/src/components/form/td-input/td-input.class.js +83 -49
- package/src/components/form/td-input/td-input.interface.d.ts +13 -0
- package/src/components/form/td-input/widget/prefix.js +2 -2
- package/src/components/form/td-input/widget/suffix.d.ts +1 -1
- package/src/components/form/td-input/widget/suffix.js +10 -10
- package/src/components/form/td-input/widget/td-input-wrapper.class.d.ts +3 -3
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +64 -67
- package/src/components/form/td-input/widget/td-textarea-wrapper.d.ts +2 -2
- package/src/components/form/td-input/widget/td-textarea-wrapper.js +8 -9
- package/src/components/form/td-input/widget/utils.js +9 -10
- package/src/components/form/td-input-number/td-input-number.class.d.ts +0 -0
- package/src/components/form/td-input-number/td-input-number.class.js +1 -0
- package/src/components/form/td-input-number/td-input-number.interface.d.ts +0 -0
- package/src/components/form/td-input-number/td-input-number.interface.js +1 -0
- package/src/components/form/td-option/td-option.class.d.ts +7 -0
- package/src/components/form/{td-select/option/option.class.js → td-option/td-option.class.js} +9 -10
- package/src/components/form/{td-select/option/option.interface.d.ts → td-option/td-option.interface.d.ts} +1 -1
- package/src/components/form/td-option/td-option.interface.js +2 -0
- package/src/components/form/td-option-group/td-option-group.class.d.ts +7 -0
- package/src/components/form/{td-select/option-group/option-group.class.js → td-option-group/td-option-group.class.js} +11 -11
- package/src/components/form/{td-select/option-group/option-group.interface.d.ts → td-option-group/td-option-group.interface.d.ts} +1 -1
- package/src/components/form/td-option-group/td-option-group.interface.js +2 -0
- package/src/components/form/td-radio/td-radio.class.d.ts +3 -3
- package/src/components/form/td-radio/td-radio.class.js +58 -55
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +3 -3
- package/src/components/form/td-radio-button/td-radio-button.class.js +47 -45
- package/src/components/form/td-radio-group/td-radio-group.class.d.ts +3 -3
- package/src/components/form/td-radio-group/td-radio-group.class.js +21 -19
- package/src/components/form/td-rate/td-rate.class.d.ts +0 -0
- package/src/components/form/td-rate/td-rate.class.js +1 -0
- package/src/components/form/td-rate/td-rate.interface.d.ts +0 -0
- package/src/components/form/td-rate/td-rate.interface.js +1 -0
- package/src/components/form/td-select/dropdown/dropdown.class.d.ts +3 -2
- package/src/components/form/td-select/dropdown/dropdown.class.js +15 -15
- package/src/components/form/td-select/td-select.class.d.ts +3 -1
- package/src/components/form/td-select/td-select.class.js +6 -6
- package/src/components/form/td-select/td-select.style.js +8 -8
- package/src/components/form/td-slider/td-slider.class.d.ts +0 -0
- package/src/components/form/td-slider/td-slider.class.js +1 -0
- package/src/components/form/td-slider/td-slider.interface.d.ts +0 -0
- package/src/components/form/td-slider/td-slider.interface.js +1 -0
- package/src/components/form/td-switch/td-switch.class.d.ts +8 -4
- package/src/components/form/td-switch/td-switch.class.js +92 -63
- package/src/components/form/td-switch/td-switch.interface.d.ts +7 -1
- package/src/components/form/td-switch/td-switch.interface.js +1 -0
- package/src/components/form/td-switch/td-switch.style.d.ts +1 -2
- package/src/components/form/td-switch/td-switch.style.js +1 -2
- package/src/components/form/td-switch/widget/td-switch-core.d.ts +2 -2
- package/src/components/form/td-switch/widget/td-switch-core.js +73 -71
- package/src/components/form/td-switch/widget/td-switch-left.d.ts +2 -2
- package/src/components/form/td-switch/widget/td-switch-left.js +8 -8
- package/src/components/form/td-switch/widget/td-switch-right.d.ts +3 -3
- package/src/components/form/td-switch/widget/td-switch-right.js +9 -9
- package/src/components/form/td-time-picker/td-time-picker.class.d.ts +0 -0
- package/src/components/form/td-time-picker/td-time-picker.class.js +1 -0
- package/src/components/form/td-time-picker/td-time-picker.interface.d.ts +0 -0
- package/src/components/form/td-time-picker/td-time-picker.interface.js +1 -0
- package/src/components/form/td-time-select/td-time-select.class.d.ts +0 -0
- package/src/components/form/td-time-select/td-time-select.class.js +1 -0
- package/src/components/form/td-time-select/td-time-select.interface.d.ts +0 -0
- package/src/components/form/td-time-select/td-time-select.interface.js +1 -0
- package/src/components/form/td-transfer/td-transfer.class.d.ts +0 -0
- package/src/components/form/td-transfer/td-transfer.class.js +1 -0
- package/src/components/form/td-transfer/td-transfer.interface.d.ts +0 -0
- package/src/components/form/td-transfer/td-transfer.interface.js +1 -0
- package/src/components/form/td-upload/td-upload.class.d.ts +0 -0
- package/src/components/form/td-upload/td-upload.class.js +1 -0
- package/src/components/form/td-upload/td-upload.interface.d.ts +0 -0
- package/src/components/form/td-upload/td-upload.interface.js +1 -0
- package/src/components/navigation/index.d.ts +16 -0
- package/src/components/navigation/index.js +17 -1
- package/src/components/navigation/td-affix/td-affix.class.d.ts +25 -0
- package/src/components/navigation/td-affix/td-affix.class.js +134 -0
- package/src/components/navigation/td-affix/td-affix.interface.d.ts +27 -0
- package/src/components/navigation/td-affix/td-affix.interface.js +2 -0
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.d.ts +8 -0
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +30 -0
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.d.ts +16 -0
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.js +2 -0
- package/src/components/navigation/td-anchor/td-anchor.class.d.ts +10 -0
- package/src/components/navigation/td-anchor/td-anchor.class.js +118 -0
- package/src/components/navigation/td-anchor/td-anchor.function.d.ts +2 -0
- package/src/components/navigation/td-anchor/td-anchor.function.js +91 -0
- package/src/components/navigation/td-anchor/td-anchor.interface.d.ts +44 -0
- package/src/components/navigation/td-anchor/td-anchor.interface.js +2 -0
- package/src/components/navigation/td-anchor/td-anchor.style.d.ts +14 -0
- package/src/components/navigation/td-anchor/td-anchor.style.js +17 -0
- package/src/components/navigation/td-backtop/td-backtop.class.d.ts +17 -0
- package/src/components/navigation/td-backtop/td-backtop.class.js +145 -0
- package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +26 -0
- package/src/components/navigation/td-backtop/td-backtop.interface.js +2 -0
- package/src/components/navigation/td-backtop/td-backtop.style.d.ts +5 -0
- package/src/components/navigation/td-backtop/td-backtop.style.js +13 -0
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.d.ts +11 -0
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +37 -0
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.d.ts +16 -0
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.js +2 -0
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.d.ts +8 -0
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +71 -0
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.d.ts +18 -0
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.js +2 -0
- package/src/components/navigation/td-dropdown/td-dropdown.class.d.ts +0 -0
- package/src/components/navigation/td-dropdown/td-dropdown.class.js +1 -0
- package/src/components/navigation/td-dropdown/td-dropdown.interface.d.ts +0 -0
- package/src/components/navigation/td-dropdown/td-dropdown.interface.js +1 -0
- package/src/components/navigation/td-menu/td-menu.class.d.ts +3 -2
- package/src/components/navigation/td-menu/td-menu.class.js +11 -10
- package/src/components/navigation/td-page-header/td-page-header.class.d.ts +0 -0
- package/src/components/navigation/td-page-header/td-page-header.class.js +1 -0
- package/src/components/navigation/td-page-header/td-page-header.interface.d.ts +0 -0
- package/src/components/navigation/td-page-header/td-page-header.interface.js +1 -0
- package/src/components/navigation/td-steps/td-steps.class.d.ts +0 -0
- package/src/components/navigation/td-steps/td-steps.class.js +1 -0
- package/src/components/navigation/td-steps/td-steps.interface.d.ts +0 -0
- package/src/components/navigation/td-steps/td-steps.interface.js +1 -0
- package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +12 -0
- package/src/components/navigation/td-tabs/td-tab-bar.class.js +62 -0
- package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +10 -0
- package/src/components/navigation/td-tabs/td-tab-bar.interface.js +2 -0
- package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +31 -0
- package/src/components/navigation/td-tabs/td-tab-nav.class.js +355 -0
- package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +23 -0
- package/src/components/navigation/td-tabs/td-tab-nav.interface.js +2 -0
- package/src/components/navigation/td-tabs/td-tab-pane.class.d.ts +13 -0
- package/src/components/navigation/td-tabs/td-tab-pane.class.js +41 -0
- package/src/components/navigation/td-tabs/td-tab-pane.interface.d.ts +31 -0
- package/src/components/navigation/td-tabs/td-tab-pane.interface.js +2 -0
- package/src/components/navigation/td-tabs/td-tabs.class.d.ts +18 -0
- package/src/components/navigation/td-tabs/td-tabs.class.js +159 -0
- package/src/components/navigation/td-tabs/td-tabs.interface.d.ts +74 -0
- package/src/components/navigation/td-tabs/td-tabs.interface.js +5 -0
- package/src/components/navigation/td-tabs/td-tabs.style.d.ts +19 -0
- package/src/components/navigation/td-tabs/td-tabs.style.js +128 -0
- package/src/components/others/collapsible-box/collapsible-box.d.ts +2 -3
- package/src/components/others/collapsible-box/collapsible-box.js +5 -7
- package/src/components/others/collapsible-box/contents/contents.d.ts +2 -2
- package/src/components/others/collapsible-box/contents/contents.js +6 -8
- package/src/components/others/collapsible-box/heading/expand-heading.d.ts +2 -3
- package/src/components/others/collapsible-box/heading/expand-heading.js +13 -15
- package/src/components/others/td-divider/td-divider.class.d.ts +2 -2
- package/src/components/others/td-divider/td-divider.class.js +16 -15
- package/src/components/others/td-watermark/td-watermark.class.d.ts +0 -0
- package/src/components/others/td-watermark/td-watermark.class.js +1 -0
- package/src/components/others/td-watermark/td-watermark.interface.d.ts +0 -0
- package/src/components/others/td-watermark/td-watermark.interface.js +1 -0
- package/src/constants/event.d.ts +3 -0
- package/src/constants/event.js +6 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/styles/color-scheme.js +19 -19
- package/src/styles/function.js +13 -14
- package/src/styles/index.d.ts +1 -0
- package/src/styles/size.d.ts +0 -5
- package/src/styles/size.js +3 -3
- package/src/styles/transition.d.ts +32 -0
- package/src/styles/transition.js +222 -0
- package/src/styles/var.d.ts +10 -1
- package/src/styles/var.js +17 -3
- package/src/ui/ui.abstract.d.ts +16 -6
- package/src/ui/ui.abstract.js +39 -11
- package/src/ui/ui.interface.d.ts +7 -3
- package/src/utils/types.d.ts +8 -0
- package/src/utils/types.js +35 -0
- package/src/components/basic/td-layout/td-row/td-row.style.d.ts +0 -1
- package/src/components/basic/td-layout/td-row/td-row.style.js +0 -8
- package/src/components/form/td-select/option/option.class.d.ts +0 -6
- package/src/components/form/td-select/option-group/option-group.class.d.ts +0 -6
- /package/src/components/{form/td-select/option-group/option-group.interface.js → data/td-avatar/td-avatar.interface.js} +0 -0
- /package/src/components/{form/td-select/option/option.interface.js → data/td-badge/td-badge.interface.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
import { ITdImageViewer, ITdImageViewerConfig, TdImageViewerAction, TdImageViewerMode } from './td-image-viewer.interface';
|
|
4
|
+
export declare class TdImageViewer extends UI<undefined> implements ITdImageViewer {
|
|
5
|
+
className: 'TdImageViewer';
|
|
6
|
+
props: ITdImageViewerConfig;
|
|
7
|
+
private isSingle;
|
|
8
|
+
private activeIndex?;
|
|
9
|
+
private transform;
|
|
10
|
+
private modes;
|
|
11
|
+
mode: TdImageViewerMode;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
private transition;
|
|
14
|
+
private teleport;
|
|
15
|
+
constructor(params?: ITdImageViewerConfig);
|
|
16
|
+
get imgStyle(): IStyle<0 | (string & {}), string & {}>;
|
|
17
|
+
toggleMode(): void;
|
|
18
|
+
reset(): void;
|
|
19
|
+
handleActions(action: TdImageViewerAction, options?: {}): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdImageViewer = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const utils_1 = require("@type-dom/utils");
|
|
6
|
+
const svgs_1 = require("@type-dom/svgs");
|
|
7
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
8
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
9
|
+
const td_image_viewer_style_1 = require("./td-image-viewer.style");
|
|
10
|
+
class TdImageViewer extends ui_abstract_1.UI {
|
|
11
|
+
constructor(params) {
|
|
12
|
+
super(params, 'fragment');
|
|
13
|
+
this.loading = false;
|
|
14
|
+
this.className = 'TdImageViewer';
|
|
15
|
+
this.transform = {
|
|
16
|
+
scale: 1,
|
|
17
|
+
deg: 0,
|
|
18
|
+
offsetX: 0,
|
|
19
|
+
offsetY: 0,
|
|
20
|
+
enableTransition: false
|
|
21
|
+
};
|
|
22
|
+
this.modes = {
|
|
23
|
+
CONTAIN: {
|
|
24
|
+
name: 'contain',
|
|
25
|
+
// icon: markRaw(FullScreen),
|
|
26
|
+
icon: new td_icon_class_1.TdIcon({
|
|
27
|
+
svgObj: new svgs_1.ElFullScreenSvg()
|
|
28
|
+
})
|
|
29
|
+
},
|
|
30
|
+
ORIGINAL: {
|
|
31
|
+
name: 'original',
|
|
32
|
+
// icon: markRaw(ScaleToOriginal),
|
|
33
|
+
icon: new td_icon_class_1.TdIcon({
|
|
34
|
+
svgObj: new svgs_1.ElScaleToOriginalSvg()
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
this.mode = this.modes.CONTAIN;
|
|
39
|
+
this.transition = new framework_1.Transition();
|
|
40
|
+
this.teleport = new framework_1.Teleport({
|
|
41
|
+
to: document.body,
|
|
42
|
+
});
|
|
43
|
+
this.teleport.addChild(this.transition);
|
|
44
|
+
// this.mount(document.body);
|
|
45
|
+
// this.ctrl.addAttrName('wrapper');
|
|
46
|
+
this.transition.ctrl.addStyleObj({
|
|
47
|
+
position: 'fixed',
|
|
48
|
+
top: 0,
|
|
49
|
+
right: 0,
|
|
50
|
+
bottom: 0,
|
|
51
|
+
left: 0,
|
|
52
|
+
zIndex: 2000
|
|
53
|
+
});
|
|
54
|
+
this.transition.addChildren(new framework_1.Div({
|
|
55
|
+
name: 'mask',
|
|
56
|
+
events: {
|
|
57
|
+
click: (evt, element) => {
|
|
58
|
+
//
|
|
59
|
+
element === null || element === void 0 ? void 0 : element.ctrl.hide();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}),
|
|
63
|
+
// <!-- CLOSE -->
|
|
64
|
+
new framework_1.Span({
|
|
65
|
+
name: 'close',
|
|
66
|
+
styleObj: Object.assign(Object.assign({}, td_image_viewer_style_1.$btn), {
|
|
67
|
+
// close
|
|
68
|
+
top: '40px', right: '40px', width: '40px', height: '40px', fontSize: '40px' }),
|
|
69
|
+
events: {
|
|
70
|
+
click: (evt, element) => {
|
|
71
|
+
element === null || element === void 0 ? void 0 : element.ctrl.hide();
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
childNodes: [
|
|
75
|
+
new td_icon_class_1.TdIcon({
|
|
76
|
+
svgObj: new svgs_1.ElCloseSvg(),
|
|
77
|
+
styleObj: {
|
|
78
|
+
fontSize: 'inherit',
|
|
79
|
+
cursor: 'pointer'
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
}));
|
|
84
|
+
const urlList = (params === null || params === void 0 ? void 0 : params.urlList) || [];
|
|
85
|
+
this.isSingle = urlList.length <= 1;
|
|
86
|
+
// <!-- ARROW -->
|
|
87
|
+
if (!this.isSingle) {
|
|
88
|
+
this.transition.addChildren(new framework_1.Span({
|
|
89
|
+
styleObj: Object.assign(Object.assign({}, td_image_viewer_style_1.$btn), td_image_viewer_style_1.$prev),
|
|
90
|
+
events: {
|
|
91
|
+
click: () => {
|
|
92
|
+
// todo prev
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
childNodes: [
|
|
96
|
+
new td_icon_class_1.TdIcon({
|
|
97
|
+
svgObj: new svgs_1.ElArrowLeftSvg()
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}), new framework_1.Span({
|
|
101
|
+
styleObj: Object.assign(Object.assign({}, td_image_viewer_style_1.$btn), td_image_viewer_style_1.$next),
|
|
102
|
+
events: {
|
|
103
|
+
click: () => {
|
|
104
|
+
// todo next
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
childNodes: [
|
|
108
|
+
new td_icon_class_1.TdIcon({
|
|
109
|
+
svgObj: new svgs_1.ElArrowRightSvg()
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
// <!-- ACTIONS -->
|
|
115
|
+
this.transition.addChild(new framework_1.Div({
|
|
116
|
+
styleObj: Object.assign(Object.assign({}, td_image_viewer_style_1.$btn), td_image_viewer_style_1.$actions),
|
|
117
|
+
childNodes: [
|
|
118
|
+
new framework_1.Div({
|
|
119
|
+
styleObj: td_image_viewer_style_1.$actionsInner,
|
|
120
|
+
childNodes: [
|
|
121
|
+
new td_icon_class_1.TdIcon({
|
|
122
|
+
svgObj: new svgs_1.ElZoomOutSvg(),
|
|
123
|
+
events: {
|
|
124
|
+
click: (evt, ele) => {
|
|
125
|
+
this.handleActions('zoomOut');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
new td_icon_class_1.TdIcon({
|
|
130
|
+
svgObj: new svgs_1.ElZoomInSvg(),
|
|
131
|
+
events: {
|
|
132
|
+
click: (evt, ele) => {
|
|
133
|
+
this.handleActions('zoomIn');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
new framework_1.I({}),
|
|
138
|
+
new td_icon_class_1.TdIcon({
|
|
139
|
+
// ???
|
|
140
|
+
// svgObj: this.mode.icon,
|
|
141
|
+
slot: this.mode.icon,
|
|
142
|
+
events: {
|
|
143
|
+
click: (evt, ele) => {
|
|
144
|
+
this.toggleMode();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
new framework_1.I({}),
|
|
149
|
+
new td_icon_class_1.TdIcon({
|
|
150
|
+
svgObj: new svgs_1.ElRefreshLeftSvg(),
|
|
151
|
+
events: {
|
|
152
|
+
click: (evt, ele) => {
|
|
153
|
+
this.handleActions('anticlockwise');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
new td_icon_class_1.TdIcon({
|
|
158
|
+
svgObj: new svgs_1.ElRefreshRightSvg(),
|
|
159
|
+
events: {
|
|
160
|
+
click: (evt, ele) => {
|
|
161
|
+
this.handleActions('clockwise');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
}));
|
|
169
|
+
// <!-- CANVAS -->
|
|
170
|
+
const imgList = [];
|
|
171
|
+
urlList.forEach((url, index) => {
|
|
172
|
+
imgList.push(new framework_1.Img({
|
|
173
|
+
attrObj: {
|
|
174
|
+
src: url
|
|
175
|
+
},
|
|
176
|
+
styleObj: Object.assign({ display: index === this.activeIndex ? 'block' : 'none' }, this.imgStyle)
|
|
177
|
+
}));
|
|
178
|
+
});
|
|
179
|
+
this.transition.addChild(new framework_1.Div({
|
|
180
|
+
childNodes: imgList
|
|
181
|
+
}));
|
|
182
|
+
this.props = this.setParams(params);
|
|
183
|
+
}
|
|
184
|
+
get imgStyle() {
|
|
185
|
+
const { scale, deg, offsetX, offsetY, enableTransition } = this.transform;
|
|
186
|
+
let translateX = offsetX / scale;
|
|
187
|
+
let translateY = offsetY / scale;
|
|
188
|
+
switch (deg % 360) {
|
|
189
|
+
case 90:
|
|
190
|
+
case -270:
|
|
191
|
+
[translateX, translateY] = [translateY, -translateX];
|
|
192
|
+
break;
|
|
193
|
+
case 180:
|
|
194
|
+
case -180:
|
|
195
|
+
[translateX, translateY] = [-translateX, -translateY];
|
|
196
|
+
break;
|
|
197
|
+
case 270:
|
|
198
|
+
case -90:
|
|
199
|
+
[translateX, translateY] = [-translateY, translateX];
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
const style = {
|
|
203
|
+
transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
|
|
204
|
+
transition: enableTransition ? 'transform .3s' : ''
|
|
205
|
+
};
|
|
206
|
+
if (this.mode.name === this.modes.CONTAIN.name) {
|
|
207
|
+
style.maxWidth = style.maxHeight = '100%';
|
|
208
|
+
}
|
|
209
|
+
return style;
|
|
210
|
+
}
|
|
211
|
+
toggleMode() {
|
|
212
|
+
if (this.loading)
|
|
213
|
+
return;
|
|
214
|
+
const modeNames = (0, utils_1.keysOf)(this.modes);
|
|
215
|
+
const modeValues = Object.values(this.modes);
|
|
216
|
+
const currentMode = this.mode.name;
|
|
217
|
+
const index = modeValues.findIndex((i) => i.name === currentMode);
|
|
218
|
+
const nextIndex = (index + 1) % modeNames.length;
|
|
219
|
+
this.mode = this.modes[modeNames[nextIndex]];
|
|
220
|
+
this.reset();
|
|
221
|
+
}
|
|
222
|
+
reset() {
|
|
223
|
+
this.transform = {
|
|
224
|
+
scale: 1,
|
|
225
|
+
deg: 0,
|
|
226
|
+
offsetX: 0,
|
|
227
|
+
offsetY: 0,
|
|
228
|
+
enableTransition: false
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
handleActions(action, options = {}) {
|
|
232
|
+
if (this.loading)
|
|
233
|
+
return;
|
|
234
|
+
// const { minScale, maxScale } = this.props;
|
|
235
|
+
const minScale = this.props.minScale || 0.2;
|
|
236
|
+
const maxScale = this.props.maxScale || 7;
|
|
237
|
+
const { zoomRate, rotateDeg, enableTransition } = Object.assign({ zoomRate: this.props.zoomRate || 1.2, rotateDeg: 90, enableTransition: true }, options);
|
|
238
|
+
switch (action) {
|
|
239
|
+
case 'zoomOut':
|
|
240
|
+
if (this.transform.scale > minScale) {
|
|
241
|
+
this.transform.scale = Number.parseFloat((this.transform.scale / zoomRate).toFixed(3));
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
case 'zoomIn':
|
|
245
|
+
if (this.transform.scale < maxScale) {
|
|
246
|
+
this.transform.scale = Number.parseFloat((this.transform.scale * zoomRate).toFixed(3));
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
case 'clockwise':
|
|
250
|
+
this.transform.deg += rotateDeg;
|
|
251
|
+
// emit('rotate', this.transform.deg)
|
|
252
|
+
break;
|
|
253
|
+
case 'anticlockwise':
|
|
254
|
+
this.transform.deg -= rotateDeg;
|
|
255
|
+
// emit('rotate', this.transform.deg)
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
this.transform.enableTransition = enableTransition;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.TdImageViewer = TdImageViewer;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { TdIcon } from '../../basic/td-icon/td-icon.class';
|
|
3
|
+
export interface ITdImageViewer extends IUI {
|
|
4
|
+
className: 'TdImageViewer';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdImageViewerConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description preview link list.
|
|
9
|
+
* default: () => mutable([] as const),
|
|
10
|
+
*/
|
|
11
|
+
urlList?: string[];
|
|
12
|
+
/**
|
|
13
|
+
* @description preview backdrop z-index.
|
|
14
|
+
*/
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
/**
|
|
17
|
+
* @description the initial preview image index, less than or equal to the length of `url-list`.
|
|
18
|
+
* default: 0,
|
|
19
|
+
*/
|
|
20
|
+
initialIndex?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @description whether preview is infinite.
|
|
23
|
+
* default: true,
|
|
24
|
+
*/
|
|
25
|
+
infinite?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @description whether user can emit close event when clicking backdrop.
|
|
28
|
+
*/
|
|
29
|
+
hideOnClickModal?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.
|
|
32
|
+
*/
|
|
33
|
+
teleported?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @description whether the image-viewer can be closed by pressing ESC.
|
|
36
|
+
* default?: true,
|
|
37
|
+
*/
|
|
38
|
+
closeOnPressEscape?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @description the zoom rate of the image viewer zoom event.
|
|
41
|
+
* default: 1.2,
|
|
42
|
+
*/
|
|
43
|
+
zoomRate?: number;
|
|
44
|
+
/**
|
|
45
|
+
* @description the min scale of the image viewer zoom event.
|
|
46
|
+
* default: 0.2,
|
|
47
|
+
*/
|
|
48
|
+
minScale?: number;
|
|
49
|
+
/**
|
|
50
|
+
* @description the max scale of the image viewer zoom event.
|
|
51
|
+
* default: 7,
|
|
52
|
+
*/
|
|
53
|
+
maxScale?: number;
|
|
54
|
+
/**
|
|
55
|
+
* @description set HTML attribute: crossorigin.
|
|
56
|
+
*/
|
|
57
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
58
|
+
}
|
|
59
|
+
export type TdImageViewerAction = 'zoomIn' | 'zoomOut' | 'clockwise' | 'anticlockwise';
|
|
60
|
+
export interface TdImageViewerMode {
|
|
61
|
+
name: string;
|
|
62
|
+
icon: TdIcon;
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
|
+
export declare const $opIcon: IStyle;
|
|
3
|
+
export declare const $btn: IStyle;
|
|
4
|
+
export declare const $canvas: IStyle;
|
|
5
|
+
export declare const $actions: IStyle;
|
|
6
|
+
export declare const $actionsInner: IStyle;
|
|
7
|
+
export declare const $prev: IStyle;
|
|
8
|
+
export declare const $next: IStyle;
|
|
9
|
+
export declare const $mask: IStyle;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.$mask = exports.$next = exports.$prev = exports.$actionsInner = exports.$actions = exports.$canvas = exports.$btn = exports.$opIcon = void 0;
|
|
4
|
+
const var_1 = require("../../../styles/var");
|
|
5
|
+
exports.$opIcon = {
|
|
6
|
+
width: '44px',
|
|
7
|
+
height: '44px',
|
|
8
|
+
fontSize: '24px',
|
|
9
|
+
color: '#fff',
|
|
10
|
+
// background-color: getCssVar('text-color', 'regular'),
|
|
11
|
+
backgroundColor: var_1.$textColor.regular,
|
|
12
|
+
borderColor: '#fff'
|
|
13
|
+
};
|
|
14
|
+
exports.$btn = {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
zIndex: 1,
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
opacity: 0.8,
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
boxSizing: 'border-box',
|
|
24
|
+
userSelect: 'none'
|
|
25
|
+
};
|
|
26
|
+
exports.$canvas = {
|
|
27
|
+
position: 'static',
|
|
28
|
+
width: '100%',
|
|
29
|
+
height: '100%',
|
|
30
|
+
display: 'flex',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
userSelect: 'none'
|
|
34
|
+
};
|
|
35
|
+
exports.$actions = {
|
|
36
|
+
left: '50%',
|
|
37
|
+
bottom: '30px',
|
|
38
|
+
transform: 'translateX(-50%)',
|
|
39
|
+
width: '282px',
|
|
40
|
+
height: '44px',
|
|
41
|
+
padding: '0 23px',
|
|
42
|
+
// background-color: getCssVar('text-color', 'regular'),
|
|
43
|
+
backgroundColor: var_1.$textColor.regular,
|
|
44
|
+
borderColor: '#fff',
|
|
45
|
+
borderRadius: '22px'
|
|
46
|
+
};
|
|
47
|
+
exports.$actionsInner = {
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '100%',
|
|
50
|
+
cursor: 'default',
|
|
51
|
+
fontSize: '23px',
|
|
52
|
+
color: '#fff',
|
|
53
|
+
display: 'flex',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
justifyContent: 'space-around'
|
|
56
|
+
};
|
|
57
|
+
exports.$prev = Object.assign({ top: '50%', transform: 'translateY(-50%)', left: '40px' }, exports.$opIcon);
|
|
58
|
+
exports.$next = Object.assign({ top: '50%', transform: 'translateY(-50%)', right: '40px', textIndent: '2px' }, exports.$opIcon);
|
|
59
|
+
exports.$mask = {
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
width: '100%',
|
|
62
|
+
height: '100%',
|
|
63
|
+
top: 0,
|
|
64
|
+
left: 0,
|
|
65
|
+
opacity: 0.5,
|
|
66
|
+
background: '#000'
|
|
67
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdResult, ITdResultConfig } from './td-result.interface';
|
|
3
|
+
export declare class TdResult extends UI implements ITdResult {
|
|
4
|
+
className: 'TdResult';
|
|
5
|
+
props: ITdResultConfig;
|
|
6
|
+
constructor(params?: ITdResultConfig);
|
|
7
|
+
resultIcon(params?: ITdResultConfig): import("@type-dom/framework").TypeSvgSvg;
|
|
8
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdResult = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
+
const td_result_style_1 = require("./td-result.style");
|
|
7
|
+
const td_result_constant_1 = require("./td-result.constant");
|
|
8
|
+
class TdResult extends ui_abstract_1.UI {
|
|
9
|
+
// private iconSlot?: SlotNode;
|
|
10
|
+
// private titleSlot?: SlotNode;
|
|
11
|
+
constructor(params) {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13
|
+
super(params);
|
|
14
|
+
this.className = 'TdResult';
|
|
15
|
+
this.ctrl.addAttrName('td-result');
|
|
16
|
+
this.ctrl.addStyleObj({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
flexDirection: 'column',
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
boxSizing: 'border-box',
|
|
23
|
+
// padding: getCssVar('result-padding'),
|
|
24
|
+
padding: td_result_style_1.$result.padding
|
|
25
|
+
});
|
|
26
|
+
// this.iconSlot = new SlotNode('icon');
|
|
27
|
+
this.addChild(new framework_1.Div({
|
|
28
|
+
name: 'icon',
|
|
29
|
+
childNodes: [this.getSlotNode('icon')]
|
|
30
|
+
}));
|
|
31
|
+
if ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.icon) {
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const resultIcon = this.resultIcon(params);
|
|
35
|
+
this.getSlotNode('icon').addSlot(resultIcon);
|
|
36
|
+
}
|
|
37
|
+
if (((_b = params === null || params === void 0 ? void 0 : params.slots) === null || _b === void 0 ? void 0 : _b.title) || (params === null || params === void 0 ? void 0 : params.title)) {
|
|
38
|
+
// this.titleSlot = new SlotNode('title');
|
|
39
|
+
this.addChild(new framework_1.Div({
|
|
40
|
+
name: 'title',
|
|
41
|
+
styleObj: td_result_style_1.$titleStyle,
|
|
42
|
+
childNodes: [this.getSlotNode('title')]
|
|
43
|
+
}));
|
|
44
|
+
if ((_c = params.slots) === null || _c === void 0 ? void 0 : _c.title) {
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.getSlotNode('title').addSlot(new framework_1.P({
|
|
48
|
+
name: 'title',
|
|
49
|
+
text: params.title,
|
|
50
|
+
styleObj: td_result_style_1.$titlePStyle
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (((_d = params === null || params === void 0 ? void 0 : params.slots) === null || _d === void 0 ? void 0 : _d.subTitle) || (params === null || params === void 0 ? void 0 : params.subTitle)) {
|
|
55
|
+
// const subTitleSlot = new SlotNode('sub-title');
|
|
56
|
+
this.addChild(new framework_1.Div({
|
|
57
|
+
name: 'sub-title',
|
|
58
|
+
styleObj: td_result_style_1.$subTitleStyle,
|
|
59
|
+
childNodes: [this.getSlotNode('subTitle')],
|
|
60
|
+
}));
|
|
61
|
+
if ((_e = params.slots) === null || _e === void 0 ? void 0 : _e.subTitle) {
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this.getSlotNode('subTitle').addSlot(new framework_1.P({
|
|
65
|
+
name: 'sub-title',
|
|
66
|
+
text: params.subTitle,
|
|
67
|
+
styleObj: td_result_style_1.$subTitlePStyle
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if ((_f = params === null || params === void 0 ? void 0 : params.slots) === null || _f === void 0 ? void 0 : _f.extra) {
|
|
72
|
+
// const extraSlot = new SlotNode('extra');
|
|
73
|
+
this.addChild(new framework_1.Div({
|
|
74
|
+
styleObj: td_result_style_1.$extraStyle,
|
|
75
|
+
childNodes: [this.getSlotNode('extra')]
|
|
76
|
+
}));
|
|
77
|
+
this.getSlotNode('extra').addSlot(params.slots.extra);
|
|
78
|
+
}
|
|
79
|
+
this.props = this.setParams(params);
|
|
80
|
+
}
|
|
81
|
+
resultIcon(params) {
|
|
82
|
+
const icon = params === null || params === void 0 ? void 0 : params.icon;
|
|
83
|
+
const iconClass = icon && td_result_constant_1.IconMap[icon] ? td_result_constant_1.IconMap[icon] : 'icon-info';
|
|
84
|
+
return td_result_constant_1.IconComponentMap[iconClass] || td_result_constant_1.IconComponentMap['icon-info'];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.TdResult = TdResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
export declare const IconMap: {
|
|
3
|
+
readonly success: "icon-success";
|
|
4
|
+
readonly warning: "icon-warning";
|
|
5
|
+
readonly error: "icon-error";
|
|
6
|
+
readonly info: "icon-info";
|
|
7
|
+
};
|
|
8
|
+
export declare const IconComponentMap: Record<(typeof IconMap)[keyof typeof IconMap], TypeSvgSvg>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IconComponentMap = exports.IconMap = void 0;
|
|
4
|
+
const svgs_1 = require("@type-dom/svgs");
|
|
5
|
+
const td_result_style_1 = require("./td-result.style");
|
|
6
|
+
exports.IconMap = {
|
|
7
|
+
success: 'icon-success',
|
|
8
|
+
warning: 'icon-warning',
|
|
9
|
+
error: 'icon-error',
|
|
10
|
+
info: 'icon-info'
|
|
11
|
+
};
|
|
12
|
+
exports.IconComponentMap = {
|
|
13
|
+
[exports.IconMap.success]: new svgs_1.ElCircleCheckFilledSvg({
|
|
14
|
+
styleObj: td_result_style_1.$icon['success'],
|
|
15
|
+
attrObj: {
|
|
16
|
+
width: td_result_style_1.$result.iconFontSize,
|
|
17
|
+
height: td_result_style_1.$result.iconFontSize
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
[exports.IconMap.warning]: new svgs_1.ElWarningFilledSvg({
|
|
21
|
+
styleObj: td_result_style_1.$icon['warning'],
|
|
22
|
+
attrObj: {
|
|
23
|
+
width: td_result_style_1.$result.iconFontSize,
|
|
24
|
+
height: td_result_style_1.$result.iconFontSize
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
[exports.IconMap.error]: new svgs_1.ElCircleCloseFilledSvg({
|
|
28
|
+
styleObj: td_result_style_1.$icon['error'],
|
|
29
|
+
attrObj: {
|
|
30
|
+
width: td_result_style_1.$result.iconFontSize,
|
|
31
|
+
height: td_result_style_1.$result.iconFontSize
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
[exports.IconMap.info]: new svgs_1.ElInfoFilledSvg({
|
|
35
|
+
styleObj: td_result_style_1.$icon['info'],
|
|
36
|
+
attrObj: {
|
|
37
|
+
width: td_result_style_1.$result.iconFontSize,
|
|
38
|
+
height: td_result_style_1.$result.iconFontSize
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { TypeElement } from '@type-dom/framework';
|
|
3
|
+
export interface ITdResult extends IUI {
|
|
4
|
+
className: 'TdResult';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdResultConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description title of result
|
|
9
|
+
* default: '',
|
|
10
|
+
*/
|
|
11
|
+
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description sub title of result
|
|
14
|
+
* default: '',
|
|
15
|
+
*/
|
|
16
|
+
subTitle?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @description icon type of result
|
|
19
|
+
* default: 'info',
|
|
20
|
+
*/
|
|
21
|
+
icon?: 'success' | 'warning' | 'info' | 'error';
|
|
22
|
+
slots?: {
|
|
23
|
+
title?: TypeElement;
|
|
24
|
+
subTitle?: TypeElement;
|
|
25
|
+
extra?: TypeElement;
|
|
26
|
+
icon?: TypeElement;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
|
+
import { IType } from '../../../styles/var';
|
|
3
|
+
export declare const $result: {
|
|
4
|
+
padding: string;
|
|
5
|
+
iconFontSize: string;
|
|
6
|
+
titleFontSize: string;
|
|
7
|
+
titleMarginTop: string;
|
|
8
|
+
subtitleMarginTop: string;
|
|
9
|
+
extraMarginTop: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const $titleStyle: IStyle;
|
|
12
|
+
export declare const $titlePStyle: IStyle;
|
|
13
|
+
export declare const $subTitleStyle: IStyle;
|
|
14
|
+
export declare const $subTitlePStyle: IStyle;
|
|
15
|
+
export declare const $extraStyle: IStyle;
|
|
16
|
+
export declare const $icon: Record<IType, IStyle>;
|