@type-dom/ui 0.0.3 → 0.0.5
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 +0 -1
- package/package.json +1 -1
- package/src/aria.d.ts +15 -0
- package/src/components/basic/index.d.ts +2 -0
- package/src/components/basic/index.js +8 -1
- 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 +26 -8
- 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 +39 -9
- 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 +11 -2
- 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 +19 -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.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-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 +3 -3
- 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 +16 -2
- 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,44 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
export interface ITdAnchor extends IUI {
|
|
3
|
+
className: 'TdAnchor';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdAnchorConfig extends IUIConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @description scroll container
|
|
8
|
+
*/
|
|
9
|
+
container?: string | HTMLElement | Window;
|
|
10
|
+
/**
|
|
11
|
+
* @description Set the offset of the anchor scroll
|
|
12
|
+
* default: 0,
|
|
13
|
+
*/
|
|
14
|
+
offset?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @description The offset of the element starting to trigger the anchor
|
|
17
|
+
* default: 15,
|
|
18
|
+
*/
|
|
19
|
+
bound?: number;
|
|
20
|
+
/**
|
|
21
|
+
* @description Set the scroll duration of the container when the anchor is clicked, in milliseconds
|
|
22
|
+
* default: 300,
|
|
23
|
+
*/
|
|
24
|
+
duration?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @description Whether to show the marker
|
|
27
|
+
* default: true,
|
|
28
|
+
*/
|
|
29
|
+
marker?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @description Set Anchor type
|
|
32
|
+
* default: 'default',
|
|
33
|
+
*/
|
|
34
|
+
type?: 'default' | 'underline';
|
|
35
|
+
/**
|
|
36
|
+
* @description Set Anchor direction
|
|
37
|
+
* default: 'vertical',
|
|
38
|
+
*/
|
|
39
|
+
direction?: 'vertical' | 'horizontal';
|
|
40
|
+
}
|
|
41
|
+
export interface AnchorLinkState {
|
|
42
|
+
el: HTMLElement;
|
|
43
|
+
href: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const $anchor: {
|
|
2
|
+
bgColor: {
|
|
3
|
+
'': string;
|
|
4
|
+
default: string;
|
|
5
|
+
page: string;
|
|
6
|
+
overlay: string;
|
|
7
|
+
};
|
|
8
|
+
paddingIndent: string;
|
|
9
|
+
lineHeight: string;
|
|
10
|
+
fontSize: string;
|
|
11
|
+
color: string;
|
|
12
|
+
activeColor: string;
|
|
13
|
+
markerBgColor: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.$anchor = void 0;
|
|
4
|
+
const var_1 = require("../../../styles/var");
|
|
5
|
+
exports.$anchor = {
|
|
6
|
+
// bgColor: getCssVar('bg-color'),
|
|
7
|
+
bgColor: var_1.$bgColor,
|
|
8
|
+
paddingIndent: '14px',
|
|
9
|
+
lineHeight: '22px',
|
|
10
|
+
fontSize: '12px',
|
|
11
|
+
// color: getCssVar('text-color-secondary'),
|
|
12
|
+
color: var_1.$textColor.secondary,
|
|
13
|
+
// activeColor: getCssVar('color-primary'),
|
|
14
|
+
activeColor: var_1.$colorPrimary,
|
|
15
|
+
// markerBgColor: getCssVar('color-primary'),
|
|
16
|
+
markerBgColor: var_1.$colorPrimary
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdBackTop, ITdBackTopConfig } from './td-backtop.interface';
|
|
3
|
+
export declare class TdBackTop extends UI implements ITdBackTop {
|
|
4
|
+
className: 'TdBackTop';
|
|
5
|
+
props: ITdBackTopConfig;
|
|
6
|
+
static initCalled: boolean;
|
|
7
|
+
private container;
|
|
8
|
+
private el;
|
|
9
|
+
private visible;
|
|
10
|
+
private transition;
|
|
11
|
+
private division;
|
|
12
|
+
constructor(params?: ITdBackTopConfig);
|
|
13
|
+
mounted(): void;
|
|
14
|
+
initEvents(): void;
|
|
15
|
+
handleScroll(event?: MouseEvent): void;
|
|
16
|
+
handleClick(event?: MouseEvent): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdBackTop = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const svgs_1 = require("@type-dom/svgs");
|
|
7
|
+
const utils_1 = require("@type-dom/utils");
|
|
8
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
9
|
+
const var_1 = require("../../../styles/var");
|
|
10
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
11
|
+
const td_backtop_style_1 = require("./td-backtop.style");
|
|
12
|
+
class TdBackTop extends ui_abstract_1.UI {
|
|
13
|
+
constructor(params) {
|
|
14
|
+
super(params, 'fragment');
|
|
15
|
+
this.visible = false;
|
|
16
|
+
this.className = 'TdBackTop';
|
|
17
|
+
this.division = new framework_1.Div({
|
|
18
|
+
name: 'td-back-top',
|
|
19
|
+
attrObj: {
|
|
20
|
+
class: 'td-back-top'
|
|
21
|
+
},
|
|
22
|
+
styleObj: {
|
|
23
|
+
right: (0, utils_1.addUnit)(params === null || params === void 0 ? void 0 : params.right) || '40px',
|
|
24
|
+
bottom: (0, utils_1.addUnit)(params === null || params === void 0 ? void 0 : params.bottom) || '40px',
|
|
25
|
+
position: 'fixed',
|
|
26
|
+
// backgroundColor: getCssVar('backtop', 'bg-color'),
|
|
27
|
+
// backgroundColor: $backtop.bgColor,
|
|
28
|
+
width: '40px',
|
|
29
|
+
height: '40px',
|
|
30
|
+
borderRadius: '50%',
|
|
31
|
+
// color: getCssVar('backtop', 'text-color'),
|
|
32
|
+
color: td_backtop_style_1.$backtop.textColor,
|
|
33
|
+
// display: this.visible ? 'flex' : 'none',
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
fontSize: '20px',
|
|
38
|
+
// boxShadow: getCssVar('box-shadow', 'lighter'),
|
|
39
|
+
boxShadow: var_1.$boxShadow.lighter,
|
|
40
|
+
cursor: 'pointer',
|
|
41
|
+
zIndex: 999
|
|
42
|
+
},
|
|
43
|
+
events: {
|
|
44
|
+
click: (event) => {
|
|
45
|
+
this.handleClick(event);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
this.division.ctrl.addAttrObj({
|
|
50
|
+
componentId: this.componentId
|
|
51
|
+
});
|
|
52
|
+
this.transition = new framework_1.Transition({
|
|
53
|
+
name: 'fade',
|
|
54
|
+
slot: this.division
|
|
55
|
+
});
|
|
56
|
+
this.addChild(this.transition);
|
|
57
|
+
// this.ctrl.addAttrName('td-back-top');
|
|
58
|
+
if (!TdBackTop.initCalled) {
|
|
59
|
+
TdBackTop.initCalled = true;
|
|
60
|
+
(0, framework_1.createClass)('td-back-top', {
|
|
61
|
+
// position: 'fixed',
|
|
62
|
+
// backgroundColor: getCssVar('backtop', 'bg-color'),
|
|
63
|
+
backgroundColor: td_backtop_style_1.$backtop.bgColor
|
|
64
|
+
// width: '40px',
|
|
65
|
+
// height: '40px',
|
|
66
|
+
// borderRadius: '50%',
|
|
67
|
+
// // color: getCssVar('backtop', 'text-color'),
|
|
68
|
+
// color: $backtop.textColor,
|
|
69
|
+
// display: 'flex',
|
|
70
|
+
// // display: 'flex',
|
|
71
|
+
// alignItems: 'center',
|
|
72
|
+
// justifyContent: 'center',
|
|
73
|
+
// fontSize: '20px',
|
|
74
|
+
// // boxShadow: getCssVar('box-shadow', 'lighter'),
|
|
75
|
+
// boxShadow: $boxShadow.lighter,
|
|
76
|
+
// cursor: 'pointer',
|
|
77
|
+
// zIndex: 5
|
|
78
|
+
});
|
|
79
|
+
(0, framework_1.createClass)('td-back-top:hover', {
|
|
80
|
+
backgroundColor: td_backtop_style_1.$backtop.hoverBgColor
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
this.division.addChild(this.getSlotNode());
|
|
84
|
+
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
85
|
+
// this.setSlot(this.transition, this.props.slot);
|
|
86
|
+
// this.division.slotChild(params.slot);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.getSlotNode().resetSlot(new td_icon_class_1.TdIcon({
|
|
90
|
+
size: 20,
|
|
91
|
+
svgObj: new svgs_1.ElCaretTopSvg()
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
this.container = document;
|
|
95
|
+
this.el = document.documentElement; // todo 监听不生效 ????
|
|
96
|
+
this.props = this.setParams(params);
|
|
97
|
+
}
|
|
98
|
+
mounted() {
|
|
99
|
+
var _a;
|
|
100
|
+
console.log('TdBackTop mounted');
|
|
101
|
+
if ((_a = this.props) === null || _a === void 0 ? void 0 : _a.target) {
|
|
102
|
+
this.el = this.props.target;
|
|
103
|
+
// if (!this.el) {
|
|
104
|
+
// throw Error(`target does not exist: ${this.props.target}`)
|
|
105
|
+
// }
|
|
106
|
+
}
|
|
107
|
+
// this.container = this.root?.dom as HTMLDivElement; // this.el;
|
|
108
|
+
// this.container.style.setProperty('over-flow', 'scroll');
|
|
109
|
+
// Give visible an initial value, fix #13066
|
|
110
|
+
this.handleScroll();
|
|
111
|
+
}
|
|
112
|
+
initEvents() {
|
|
113
|
+
console.log('TdBackTop initEvents');
|
|
114
|
+
// nextTick(() => {
|
|
115
|
+
console.log('TdBackTop initEvents 2');
|
|
116
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.container, 'scroll')
|
|
117
|
+
.pipe((0, rxjs_1.throttleTime)(300))
|
|
118
|
+
.subscribe((event) => {
|
|
119
|
+
// console.error('handleScroll . 1');
|
|
120
|
+
this.handleScroll(event);
|
|
121
|
+
}));
|
|
122
|
+
// });
|
|
123
|
+
}
|
|
124
|
+
handleScroll(event) {
|
|
125
|
+
var _a;
|
|
126
|
+
console.error('handleScroll . ');
|
|
127
|
+
// console.log('this.el', this.el);
|
|
128
|
+
if (this.el) {
|
|
129
|
+
this.visible =
|
|
130
|
+
this.el.scrollTop >= (((_a = this.props) === null || _a === void 0 ? void 0 : _a.visibilityHeight) || 200);
|
|
131
|
+
console.log('this.visible', this.visible);
|
|
132
|
+
// this.setStyleObj({
|
|
133
|
+
// display: this.visible ? 'flex' : 'none',
|
|
134
|
+
// })
|
|
135
|
+
this.transition.showSlot(this.visible);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
handleClick(event) {
|
|
139
|
+
var _a;
|
|
140
|
+
console.error('handleClick . ');
|
|
141
|
+
(_a = this.el) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0, behavior: 'smooth' });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.TdBackTop = TdBackTop;
|
|
145
|
+
TdBackTop.initCalled = false;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
export interface ITdBackTop extends IUI {
|
|
3
|
+
className: 'TdBackTop';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdBackTopConfig extends IUIConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @description the button will not show until the scroll height reaches this value.
|
|
8
|
+
* default: 200,
|
|
9
|
+
*/
|
|
10
|
+
visibilityHeight?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @description the target to trigger scroll.
|
|
13
|
+
* default: '',
|
|
14
|
+
*/
|
|
15
|
+
target?: HTMLElement;
|
|
16
|
+
/**
|
|
17
|
+
* @description right distance.
|
|
18
|
+
* default: 40,
|
|
19
|
+
*/
|
|
20
|
+
right?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @description bottom distance.
|
|
23
|
+
* default: 40,
|
|
24
|
+
*/
|
|
25
|
+
bottom?: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.$backtop = void 0;
|
|
4
|
+
const var_1 = require("../../../styles/var");
|
|
5
|
+
exports.$backtop = {
|
|
6
|
+
// 'bg-color': getCssVar('bg-color', 'overlay'),
|
|
7
|
+
bgColor: var_1.$bgColor.overlay,
|
|
8
|
+
// 'text-color': getCssVar('color-primary'),
|
|
9
|
+
textColor: var_1.$colorPrimary,
|
|
10
|
+
// 'hover-bg-color': getCssVar('border-color-extra-light'),
|
|
11
|
+
hoverBgColor: var_1.$borderColor.extraLight
|
|
12
|
+
// 'hover-text-color':
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { TdBreadcrumbItem } from '../td-breadcrumb-item/td-breadcrumb-item.class';
|
|
3
|
+
import { ITdBreadcrumb, ITdBreadcrumbConfig } from './td-breadcrumb.interface';
|
|
4
|
+
export declare class TdBreadcrumb extends UI implements ITdBreadcrumb {
|
|
5
|
+
className: 'TdBreadcrumb';
|
|
6
|
+
props: ITdBreadcrumbConfig;
|
|
7
|
+
childNodes: TdBreadcrumbItem[];
|
|
8
|
+
constructor(params?: ITdBreadcrumbConfig);
|
|
9
|
+
created(): void;
|
|
10
|
+
mounted(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdBreadcrumb = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
// todo link 样式没有添加
|
|
6
|
+
class TdBreadcrumb extends ui_abstract_1.UI {
|
|
7
|
+
constructor(params) {
|
|
8
|
+
super(params);
|
|
9
|
+
this.className = 'TdBreadcrumb';
|
|
10
|
+
this.ctrl.addAttrName('td-breadcrumb');
|
|
11
|
+
this.ctrl.addStyleObj({
|
|
12
|
+
fontSize: '14px',
|
|
13
|
+
lineHeight: 1
|
|
14
|
+
});
|
|
15
|
+
this.childNodes = [];
|
|
16
|
+
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
17
|
+
this.slotChild(params === null || params === void 0 ? void 0 : params.slot);
|
|
18
|
+
}
|
|
19
|
+
this.props = this.setParams(params);
|
|
20
|
+
}
|
|
21
|
+
created() {
|
|
22
|
+
console.log('TdBreadcrumb created . ');
|
|
23
|
+
this.childNodes.forEach((item, index) => {
|
|
24
|
+
if (index < this.childNodes.length - 1) {
|
|
25
|
+
item.addSeparator(this.props);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
mounted() {
|
|
30
|
+
var _a;
|
|
31
|
+
const items = this.childNodes;
|
|
32
|
+
if (items.length) {
|
|
33
|
+
(_a = items[items.length - 1]) === null || _a === void 0 ? void 0 : _a.ctrl.setAttribute('aria-current', 'page');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.TdBreadcrumb = TdBreadcrumb;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
export interface ITdBreadcrumb extends IUI {
|
|
4
|
+
className: 'TdBreadcrumb';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdBreadcrumbConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description separator character
|
|
9
|
+
* default: '/',
|
|
10
|
+
*/
|
|
11
|
+
separator?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description icon component of icon separator
|
|
14
|
+
*/
|
|
15
|
+
separatorIcon?: TypeSvgSvg;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdBreadcrumbConfig } from '../td-breadcrumb/td-breadcrumb.interface';
|
|
3
|
+
import { ITdBreadcrumbItem, ITdBreadcrumbItemConfig } from './td-breadcrumb-item.interface';
|
|
4
|
+
export declare class TdBreadcrumbItem extends UI implements ITdBreadcrumbItem {
|
|
5
|
+
className: 'TdBreadcrumbItem';
|
|
6
|
+
constructor(params?: ITdBreadcrumbItemConfig);
|
|
7
|
+
addSeparator(breadcrumbConfig?: ITdBreadcrumbConfig): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdBreadcrumbItem = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
+
const var_1 = require("../../../styles/var");
|
|
7
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
8
|
+
class TdBreadcrumbItem extends ui_abstract_1.UI {
|
|
9
|
+
constructor(params) {
|
|
10
|
+
super(params, 'span');
|
|
11
|
+
this.className = 'TdBreadcrumbItem';
|
|
12
|
+
this.ctrl.addStyleObj({
|
|
13
|
+
float: 'left',
|
|
14
|
+
display: 'inline-flex',
|
|
15
|
+
alignItems: 'center'
|
|
16
|
+
});
|
|
17
|
+
const link = new framework_1.Span({
|
|
18
|
+
name: 'link',
|
|
19
|
+
attrObj: {
|
|
20
|
+
role: 'link'
|
|
21
|
+
},
|
|
22
|
+
styleObj: {
|
|
23
|
+
// color: getCssVar('text-color', 'regular');
|
|
24
|
+
color: var_1.$textColor.regular
|
|
25
|
+
},
|
|
26
|
+
events: {
|
|
27
|
+
click: (evt) => {
|
|
28
|
+
if (!(params === null || params === void 0 ? void 0 : params.toPath) || !(params === null || params === void 0 ? void 0 : params.router)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
(params === null || params === void 0 ? void 0 : params.replace)
|
|
32
|
+
? params.router.replace(params.toPath)
|
|
33
|
+
: params.router.push(params.toPath);
|
|
34
|
+
// params.replace ? params.router.replace(params.toPath) : params.router.push(params.toPath)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}); // todo slot
|
|
38
|
+
this.addChild(link);
|
|
39
|
+
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
40
|
+
this.slotChild(params === null || params === void 0 ? void 0 : params.slot);
|
|
41
|
+
}
|
|
42
|
+
this.setParams(params);
|
|
43
|
+
}
|
|
44
|
+
addSeparator(breadcrumbConfig) {
|
|
45
|
+
if (breadcrumbConfig === null || breadcrumbConfig === void 0 ? void 0 : breadcrumbConfig.separatorIcon) {
|
|
46
|
+
breadcrumbConfig.separatorIcon.ctrl.addStyleObj({
|
|
47
|
+
verticalAlign: 'middle'
|
|
48
|
+
});
|
|
49
|
+
this.addChild(new td_icon_class_1.TdIcon({
|
|
50
|
+
styleObj: {
|
|
51
|
+
margin: '0 6px',
|
|
52
|
+
fontWeight: 'normal'
|
|
53
|
+
},
|
|
54
|
+
svgObj: breadcrumbConfig.separatorIcon.clone()
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.addChild(new framework_1.Span({
|
|
59
|
+
text: (breadcrumbConfig === null || breadcrumbConfig === void 0 ? void 0 : breadcrumbConfig.separator) || '/',
|
|
60
|
+
attrObj: {
|
|
61
|
+
role: 'presentation'
|
|
62
|
+
},
|
|
63
|
+
styleObj: {
|
|
64
|
+
margin: '0 6px',
|
|
65
|
+
fontWeight: 'normal'
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.TdBreadcrumbItem = TdBreadcrumbItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { Router } from '@type-dom/framework';
|
|
3
|
+
export interface ITdBreadcrumbItem extends IUI {
|
|
4
|
+
className: 'TdBreadcrumbItem';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdBreadcrumbItemConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description target route of the link, same as `to` of `vue-router`
|
|
9
|
+
* default: '',
|
|
10
|
+
*/
|
|
11
|
+
toPath?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description if `true`, the navigation will not leave a history record
|
|
14
|
+
* default: false,
|
|
15
|
+
*/
|
|
16
|
+
replace?: boolean;
|
|
17
|
+
router?: Router;
|
|
18
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -2,6 +2,7 @@ import { UI } from '../../../ui/ui.abstract';
|
|
|
2
2
|
import { ITdMenu, ITdMenuConfig } from './td-menu.interface';
|
|
3
3
|
export declare class TdMenu extends UI implements ITdMenu {
|
|
4
4
|
className: 'TdMenu';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
props: ITdMenuConfig;
|
|
6
|
+
constructor(params?: ITdMenuConfig);
|
|
7
|
+
setup(): void;
|
|
7
8
|
}
|
|
@@ -4,13 +4,14 @@ exports.TdMenu = void 0;
|
|
|
4
4
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
5
|
const var_1 = require("../../../styles/var");
|
|
6
6
|
class TdMenu extends ui_abstract_1.UI {
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
7
|
+
constructor(params) {
|
|
8
|
+
super(params, 'ul');
|
|
9
9
|
this.className = 'TdMenu';
|
|
10
|
-
this.addAttrObj({
|
|
10
|
+
this.ctrl.addAttrObj({
|
|
11
|
+
name: 'td-menu',
|
|
11
12
|
role: 'menubar'
|
|
12
13
|
});
|
|
13
|
-
this.addStyleObj({
|
|
14
|
+
this.ctrl.addStyleObj({
|
|
14
15
|
// border-right: solid 1px var(--el-menu-border-color),
|
|
15
16
|
borderRight: 'solid 1px ' + var_1.$borderColor.base,
|
|
16
17
|
listStyle: 'none',
|
|
@@ -21,16 +22,16 @@ class TdMenu extends ui_abstract_1.UI {
|
|
|
21
22
|
backgroundColor: var_1.$borderColor.base,
|
|
22
23
|
boxSizing: 'border-box'
|
|
23
24
|
});
|
|
24
|
-
this.
|
|
25
|
+
this.props = this.setParams(params);
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const mode =
|
|
27
|
+
setup() {
|
|
28
|
+
const props = this.props;
|
|
29
|
+
const mode = props.mode || 'vertical';
|
|
29
30
|
if (mode === 'vertical') {
|
|
30
|
-
this.addStyleObj({});
|
|
31
|
+
this.ctrl.addStyleObj({});
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
|
-
this.addStyleObj({
|
|
34
|
+
this.ctrl.addStyleObj({
|
|
34
35
|
display: 'flex',
|
|
35
36
|
flexWrap: 'nowrap',
|
|
36
37
|
borderRight: 'none'
|
|
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,12 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
import { ITdTabBar, ITdTabBarConfig } from './td-tab-bar.interface';
|
|
4
|
+
export declare class TdTabBar extends UI implements ITdTabBar {
|
|
5
|
+
className: 'TdTabBar';
|
|
6
|
+
props: ITdTabBarConfig;
|
|
7
|
+
barStyle?: IStyle;
|
|
8
|
+
private rootTabs;
|
|
9
|
+
constructor(params: ITdTabBarConfig);
|
|
10
|
+
getBarStyle(): IStyle;
|
|
11
|
+
change(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdTabBar = void 0;
|
|
4
|
+
const utils_1 = require("@type-dom/utils");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
+
const td_tabs_style_1 = require("./td-tabs.style");
|
|
7
|
+
class TdTabBar extends ui_abstract_1.UI {
|
|
8
|
+
constructor(params) {
|
|
9
|
+
super(params);
|
|
10
|
+
this.className = 'TdTabBar';
|
|
11
|
+
this.ctrl.addAttrName('td-tab-bar');
|
|
12
|
+
this.ctrl.addStyleObj(td_tabs_style_1.$tabsActiveBarStyle);
|
|
13
|
+
this.rootTabs = params.rootTabs;
|
|
14
|
+
this.props = this.setParams(params);
|
|
15
|
+
}
|
|
16
|
+
getBarStyle() {
|
|
17
|
+
var _a;
|
|
18
|
+
console.log('getBarStyle . ');
|
|
19
|
+
let offset = 0;
|
|
20
|
+
let tabSize = 0;
|
|
21
|
+
const sizeName = ['top', 'bottom'].includes(((_a = this.rootTabs) === null || _a === void 0 ? void 0 : _a.props.tabPosition) || 'top')
|
|
22
|
+
? 'width'
|
|
23
|
+
: 'height';
|
|
24
|
+
const sizeDir = sizeName === 'width' ? 'x' : 'y';
|
|
25
|
+
const position = sizeDir === 'x' ? 'left' : 'top';
|
|
26
|
+
this.props.tabs.every((tab, index) => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
// const $el = instance.parent?.refs?.[`tab-${tab.uid}`] as HTMLElement
|
|
29
|
+
const $el = (_a = this.rootTabs.tabNav.tabs.find((node) => { var _a, _b; return ((_a = node.props.attrObj) === null || _a === void 0 ? void 0 : _a.tabName) === ((_b = tab.name) !== null && _b !== void 0 ? _b : (index + 1)); })) === null || _a === void 0 ? void 0 : _a.dom;
|
|
30
|
+
console.log('$el is ', $el);
|
|
31
|
+
if (!$el)
|
|
32
|
+
return false;
|
|
33
|
+
const tabName = (_b = tab.name) !== null && _b !== void 0 ? _b : (index + 1);
|
|
34
|
+
if (tabName !== this.rootTabs.currentName) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
offset =
|
|
38
|
+
$el[`offset${(0, utils_1.capitalize)(position)}`];
|
|
39
|
+
tabSize =
|
|
40
|
+
$el[`client${(0, utils_1.capitalize)(sizeName)}`];
|
|
41
|
+
const tabStyles = window.getComputedStyle($el);
|
|
42
|
+
// console.log('tabStyle is ', tabStyles);
|
|
43
|
+
if (sizeName === 'width') {
|
|
44
|
+
tabSize -=
|
|
45
|
+
Number.parseFloat(tabStyles.paddingLeft) +
|
|
46
|
+
Number.parseFloat(tabStyles.paddingRight);
|
|
47
|
+
offset += Number.parseFloat(tabStyles.paddingLeft);
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
[sizeName]: `${tabSize}px`,
|
|
53
|
+
transform: `translate${(0, utils_1.capitalize)(sizeDir)}(${offset}px)`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
change() {
|
|
57
|
+
console.log('update . ');
|
|
58
|
+
this.barStyle = this.getBarStyle();
|
|
59
|
+
this.ctrl.setStyleObj(this.barStyle);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.TdTabBar = TdTabBar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { ITdTabPaneConfig } from './td-tab-pane.interface';
|
|
3
|
+
import { TdTabs } from './td-tabs.class';
|
|
4
|
+
export interface ITdTabBar extends IUI {
|
|
5
|
+
className: 'TdTabBar';
|
|
6
|
+
}
|
|
7
|
+
export interface ITdTabBarConfig extends IUIConfig {
|
|
8
|
+
tabs: ITdTabPaneConfig[];
|
|
9
|
+
rootTabs: TdTabs;
|
|
10
|
+
}
|