@type-dom/ui 0.0.4 → 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 +44 -45
- package/package.json +1 -1
- 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 +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.d.ts +1 -1
- 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 +8 -8
- 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
|
@@ -5,101 +5,99 @@ const framework_1 = require("@type-dom/framework");
|
|
|
5
5
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
6
|
const td_link_style_1 = require("../td-link/td-link.style");
|
|
7
7
|
class TdLink extends ui_abstract_1.UI {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(params) {
|
|
9
|
+
super(params, 'a');
|
|
10
10
|
this.className = 'TdLink';
|
|
11
|
-
|
|
12
|
-
this.
|
|
11
|
+
(0, td_link_style_1.useType)(params);
|
|
12
|
+
this.ctrl.addStyleObj(td_link_style_1.$linkStyle);
|
|
13
|
+
this.props = this.setParams(params);
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (config === null || config === void 0 ? void 0 : config.disabled) {
|
|
28
|
-
this.addAttrObj({
|
|
29
|
-
disabled: config.disabled
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
if (config === null || config === void 0 ? void 0 : config.type) {
|
|
33
|
-
if (config === null || config === void 0 ? void 0 : config.disabled) {
|
|
34
|
-
this.addStyleObj(td_link_style_1.$linkStateColors[config.type].disabled);
|
|
15
|
+
// override beforeCreate() {
|
|
16
|
+
// this.ctrl.addStyleObj($linkStyle);
|
|
17
|
+
// }
|
|
18
|
+
setup() {
|
|
19
|
+
const props = this.props;
|
|
20
|
+
this.ctrl.addAttrObj({
|
|
21
|
+
href: props === null || props === void 0 ? void 0 : props.href,
|
|
22
|
+
target: props === null || props === void 0 ? void 0 : props.target,
|
|
23
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabled
|
|
24
|
+
});
|
|
25
|
+
if (props === null || props === void 0 ? void 0 : props.type) {
|
|
26
|
+
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
27
|
+
this.ctrl.addStyleObj(td_link_style_1.$linkStateColors[props.type].disabled);
|
|
35
28
|
}
|
|
36
29
|
else {
|
|
37
|
-
this.addStyleObj(td_link_style_1.$linkStateColors[
|
|
30
|
+
this.ctrl.addStyleObj(td_link_style_1.$linkStateColors[props.type].default);
|
|
38
31
|
}
|
|
39
32
|
}
|
|
40
33
|
else {
|
|
41
|
-
this.addStyleObj(td_link_style_1.$linkStateColors.default.default);
|
|
34
|
+
this.ctrl.addStyleObj(td_link_style_1.$linkStateColors.default.default);
|
|
42
35
|
}
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
// 插入到前面
|
|
46
|
-
this.unshiftChild(config.icon);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this.addChild(config.icon);
|
|
50
|
-
}
|
|
36
|
+
if (props === null || props === void 0 ? void 0 : props.icon) {
|
|
37
|
+
this.unshiftChild(props.icon);
|
|
51
38
|
}
|
|
39
|
+
this.inner = new framework_1.Span({
|
|
40
|
+
name: 'inner',
|
|
41
|
+
styleObj: td_link_style_1.$linkInnerStyle
|
|
42
|
+
});
|
|
43
|
+
this.inner.addChild(this.getSlotNode());
|
|
44
|
+
this.addChild(this.inner);
|
|
52
45
|
}
|
|
53
46
|
initEvents() {
|
|
54
47
|
this.addEvents({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
click: (evt) => {
|
|
49
|
+
this.handleClick(evt);
|
|
50
|
+
},
|
|
51
|
+
mouseenter: () => {
|
|
52
|
+
if (this.props.type) {
|
|
53
|
+
if (this.props.disabled) {
|
|
54
|
+
this.ctrl.setStyleObj({
|
|
55
|
+
cursor: 'notAllowed'
|
|
61
56
|
});
|
|
62
57
|
}
|
|
63
58
|
else {
|
|
64
|
-
this.setStyleObj(td_link_style_1.$linkStateColors[
|
|
59
|
+
this.ctrl.setStyleObj(td_link_style_1.$linkStateColors[this.props.type].hover);
|
|
65
60
|
}
|
|
66
61
|
}
|
|
67
62
|
else {
|
|
68
|
-
this.setStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
63
|
+
this.ctrl.setStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
69
64
|
}
|
|
70
|
-
if (
|
|
71
|
-
|
|
65
|
+
if (this.props.underline === false) {
|
|
66
|
+
// 设置 false 的情况下,不显示下划线
|
|
67
|
+
this.ctrl.setStyleObj({
|
|
72
68
|
textDecoration: 'none'
|
|
73
69
|
});
|
|
74
70
|
}
|
|
75
71
|
else {
|
|
76
72
|
// 1. 默认显示下划线
|
|
77
73
|
// 2. 默认显示下划线,如果设置了 underline 为 true,则显示下划线
|
|
78
|
-
this.setStyleObj({
|
|
74
|
+
this.ctrl.setStyleObj({
|
|
79
75
|
textDecoration: 'underline'
|
|
80
76
|
});
|
|
81
77
|
}
|
|
82
78
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.setStyleObj({
|
|
79
|
+
mouseleave: (evt) => {
|
|
80
|
+
this.ctrl.setStyleObj({
|
|
86
81
|
textDecoration: 'none'
|
|
87
82
|
});
|
|
88
|
-
if (
|
|
89
|
-
this.removeStyleObj(td_link_style_1.$linkStateColors[
|
|
90
|
-
if (
|
|
83
|
+
if (this.props.type) {
|
|
84
|
+
this.ctrl.removeStyleObj(td_link_style_1.$linkStateColors[this.props.type].hover);
|
|
85
|
+
if (this.props.disabled) {
|
|
91
86
|
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
92
|
-
this.setStyleObj(td_link_style_1.$linkStateColors[
|
|
87
|
+
this.ctrl.setStyleObj(td_link_style_1.$linkStateColors[this.props.type].disabled);
|
|
93
88
|
}
|
|
94
89
|
else {
|
|
95
|
-
this.setStyleObj(td_link_style_1.$linkStateColors[
|
|
90
|
+
this.ctrl.setStyleObj(td_link_style_1.$linkStateColors[this.props.type].default);
|
|
96
91
|
}
|
|
97
92
|
}
|
|
98
93
|
else {
|
|
99
|
-
this.removeStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
94
|
+
this.ctrl.removeStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
100
95
|
}
|
|
101
96
|
}
|
|
102
97
|
});
|
|
103
98
|
}
|
|
99
|
+
handleClick(event) {
|
|
100
|
+
this.emit('click', event);
|
|
101
|
+
}
|
|
104
102
|
}
|
|
105
103
|
exports.TdLink = TdLink;
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
import { TdIcon } from '@type-dom/ui';
|
|
2
1
|
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { TdIcon } from '../td-icon/td-icon.class';
|
|
3
3
|
export interface ITdLink extends IUI {
|
|
4
4
|
className: 'TdLink';
|
|
5
5
|
}
|
|
6
|
+
export type ITdLinkType = 'default' | 'primary' | 'success' | 'warning' | 'info' | 'danger';
|
|
6
7
|
export interface ITdLinkConfig extends IUIConfig {
|
|
7
8
|
title?: string;
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @description type
|
|
11
|
+
* default: 'default',
|
|
12
|
+
*/
|
|
13
|
+
type?: ITdLinkType;
|
|
9
14
|
/**
|
|
10
15
|
* @description whether the component has underline
|
|
16
|
+
* default: true,
|
|
11
17
|
*/
|
|
12
18
|
underline?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* @description whether the component is disabled
|
|
21
|
+
* default: false
|
|
15
22
|
*/
|
|
16
23
|
disabled?: boolean;
|
|
17
24
|
/**
|
|
18
25
|
* @description same as native hyperlink's `href`
|
|
26
|
+
* default: ''
|
|
19
27
|
*/
|
|
20
28
|
href?: string;
|
|
21
29
|
/**
|
|
22
30
|
* @description same as native hyperlink's `target`
|
|
31
|
+
* default: '_self',
|
|
23
32
|
*/
|
|
24
33
|
target?: '_blank' | '_parent' | '_self' | '_top' | string;
|
|
25
34
|
/**
|
|
26
35
|
* @description icon component
|
|
27
36
|
*/
|
|
28
37
|
icon?: TdIcon;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
iconPosition?: 'left' | 'right';
|
|
38
|
+
emits?: {
|
|
39
|
+
click?: (event: MouseEvent) => void;
|
|
40
|
+
};
|
|
33
41
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import { IStyle } from '@type-dom/
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
2
|
import { IType } from '../../../styles/var';
|
|
3
|
-
|
|
4
|
-
export declare const $
|
|
3
|
+
import { ITdLinkConfig } from './td-link.interface';
|
|
4
|
+
export declare const $link: {
|
|
5
|
+
fontSize: string;
|
|
6
|
+
fontWeight: number;
|
|
7
|
+
textColor: string;
|
|
8
|
+
hoverTextColor: string;
|
|
9
|
+
disabledTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
export declare let $linkTextColor: string;
|
|
12
|
+
export declare function useType(config?: ITdLinkConfig): void;
|
|
13
|
+
export declare const $linkStyle: IStyle;
|
|
14
|
+
export declare const $linkInnerStyle: IStyle;
|
|
15
|
+
export declare const $linkStateColors: Record<IType, Record<string, IStyle<0 | (string & {}), string & {}>>>;
|
|
5
16
|
export declare function buttonVariant($type: IType): void;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buttonVariant = exports.$linkStateColors = exports.$
|
|
4
|
-
const framework_1 = require("@type-dom/framework");
|
|
3
|
+
exports.buttonVariant = exports.$linkStateColors = exports.$linkInnerStyle = exports.$linkStyle = exports.useType = exports.$linkTextColor = exports.$link = void 0;
|
|
5
4
|
const var_1 = require("../../../styles/var");
|
|
6
|
-
|
|
5
|
+
// Link
|
|
6
|
+
// css3 var in packages/theme-chalk/src/link.scss
|
|
7
|
+
exports.$link = {
|
|
8
|
+
// 'font-size': getCssVar('font-size-base'),
|
|
9
|
+
fontSize: var_1.$fontSizes.base,
|
|
10
|
+
// 'font-weight': getCssVar('font-weight-primary'),
|
|
11
|
+
fontWeight: var_1.$fontWeightPrimary,
|
|
12
|
+
// 'text-color': getCssVar('text-color-regular'),
|
|
13
|
+
textColor: var_1.$textColor.regular,
|
|
14
|
+
// 'hover-text-color': getCssVar('color-primary'),
|
|
15
|
+
hoverTextColor: var_1.$colors.primary.base,
|
|
16
|
+
// 'disabled-text-color': getCssVar('text-color-placeholder'),
|
|
17
|
+
disabledTextColor: var_1.$textColor.placeholder
|
|
18
|
+
};
|
|
19
|
+
function useType(config) {
|
|
20
|
+
exports.$link.textColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'default'].base;
|
|
21
|
+
exports.$link.hoverTextColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'default']['light-3'];
|
|
22
|
+
exports.$link.disabledTextColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'default']['light-5'];
|
|
23
|
+
buttonVariant((config === null || config === void 0 ? void 0 : config.type) || 'default');
|
|
24
|
+
}
|
|
25
|
+
exports.useType = useType;
|
|
26
|
+
exports.$linkStyle = {
|
|
7
27
|
display: 'inline-flex',
|
|
8
28
|
flexDirection: 'row',
|
|
9
29
|
alignItems: 'center',
|
|
@@ -12,8 +32,19 @@ exports.$baseLink = {
|
|
|
12
32
|
position: 'relative',
|
|
13
33
|
textDecoration: 'none',
|
|
14
34
|
outline: 'none',
|
|
15
|
-
cursor:
|
|
16
|
-
padding: '0'
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
padding: '0',
|
|
37
|
+
// font-size: getCssVar('link', 'font-size'),
|
|
38
|
+
fontSize: exports.$link.fontSize,
|
|
39
|
+
// font-weight: getCssVar('link', 'font-weight'),
|
|
40
|
+
fontWeight: exports.$link.fontWeight,
|
|
41
|
+
// color: getCssVar('link', 'text-color'),
|
|
42
|
+
color: exports.$link.textColor
|
|
43
|
+
};
|
|
44
|
+
exports.$linkInnerStyle = {
|
|
45
|
+
display: 'inline-flex',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
alignItems: 'center'
|
|
17
48
|
};
|
|
18
49
|
exports.$linkStateColors = {};
|
|
19
50
|
function buttonVariant($type) {
|
|
@@ -22,7 +53,9 @@ function buttonVariant($type) {
|
|
|
22
53
|
color: var_1.$colors[$type].base
|
|
23
54
|
},
|
|
24
55
|
hover: {
|
|
25
|
-
color: $type === 'default'
|
|
56
|
+
color: $type === 'default'
|
|
57
|
+
? var_1.$colors['primary'].base
|
|
58
|
+
: var_1.$colors[$type]['light-3'] // ['color', $type, 'light-3'],
|
|
26
59
|
// content: '',
|
|
27
60
|
// position: 'absolute',
|
|
28
61
|
// left: 0,
|
|
@@ -40,6 +73,3 @@ function buttonVariant($type) {
|
|
|
40
73
|
};
|
|
41
74
|
}
|
|
42
75
|
exports.buttonVariant = buttonVariant;
|
|
43
|
-
for (const $type of ['primary', 'success', 'warning', 'info', 'danger', 'default']) {
|
|
44
|
-
buttonVariant($type);
|
|
45
|
-
}
|
|
@@ -3,6 +3,7 @@ import { TdScrollbarThumb } from '../thumb/thumb.class';
|
|
|
3
3
|
import { ITdScrollbarBar, ITdScrollbarBarConfig } from './bar.interface';
|
|
4
4
|
export declare class TdScrollbarBar extends UI implements ITdScrollbarBar {
|
|
5
5
|
className: 'TdScrollbarBar';
|
|
6
|
+
props: ITdScrollbarBarConfig;
|
|
6
7
|
thumbs: [TdScrollbarThumb, TdScrollbarThumb];
|
|
7
|
-
constructor(
|
|
8
|
+
constructor(params?: ITdScrollbarBarConfig);
|
|
8
9
|
}
|
|
@@ -4,28 +4,29 @@ exports.TdScrollbarBar = void 0;
|
|
|
4
4
|
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
5
|
const thumb_class_1 = require("../thumb/thumb.class");
|
|
6
6
|
class TdScrollbarBar extends ui_abstract_1.UI {
|
|
7
|
-
constructor(
|
|
8
|
-
super();
|
|
7
|
+
constructor(params) {
|
|
8
|
+
super(params);
|
|
9
9
|
this.className = 'TdScrollbarBar';
|
|
10
|
-
this.addAttrName('td-scrollbar-bar');
|
|
11
|
-
this.addStyleObj({
|
|
10
|
+
this.ctrl.addAttrName('td-scrollbar-bar');
|
|
11
|
+
this.ctrl.addStyleObj({
|
|
12
12
|
position: 'absolute',
|
|
13
13
|
right: '2px',
|
|
14
14
|
bottom: '2px',
|
|
15
15
|
zIndex: 1,
|
|
16
|
-
borderRadius: '4px'
|
|
16
|
+
borderRadius: '4px'
|
|
17
17
|
});
|
|
18
18
|
// config?.minSize 20
|
|
19
19
|
this.thumbs = [
|
|
20
20
|
new thumb_class_1.TdScrollbarThumb({
|
|
21
21
|
vertical: false,
|
|
22
|
-
ratio: 1
|
|
22
|
+
ratio: 1
|
|
23
23
|
}),
|
|
24
24
|
new thumb_class_1.TdScrollbarThumb({
|
|
25
25
|
vertical: true,
|
|
26
|
-
ratio: 1
|
|
26
|
+
ratio: 1
|
|
27
27
|
})
|
|
28
28
|
];
|
|
29
|
+
this.props = this.setParams(params);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
exports.TdScrollbarBar = TdScrollbarBar;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ITdScrollbar, ITdScrollbarConfig } from './td-scrollbar.interface';
|
|
2
1
|
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdScrollbar, ITdScrollbarConfig } from './td-scrollbar.interface';
|
|
3
3
|
export declare class TdScrollbar extends UI implements ITdScrollbar {
|
|
4
4
|
className: 'TdScrollbar';
|
|
5
|
+
props: ITdScrollbarConfig;
|
|
5
6
|
private wrap;
|
|
6
7
|
private view;
|
|
7
|
-
constructor(
|
|
8
|
-
setConfig(config?: Partial<ITdScrollbarConfig>): void;
|
|
8
|
+
constructor(params?: ITdScrollbarConfig);
|
|
9
9
|
}
|
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdScrollbar = void 0;
|
|
4
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
6
|
const bar_class_1 = require("./bar/bar.class");
|
|
7
7
|
class TdScrollbar extends ui_abstract_1.UI {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
8
|
+
constructor(params) {
|
|
9
|
+
super(params, params === null || params === void 0 ? void 0 : params.tag);
|
|
10
10
|
this.className = 'TdScrollbar';
|
|
11
|
-
this.addAttrName('td-scrollbar');
|
|
12
|
-
this.addStyleObj({
|
|
11
|
+
this.ctrl.addAttrName('td-scrollbar');
|
|
12
|
+
this.ctrl.addStyleObj({
|
|
13
13
|
overflow: 'hidden',
|
|
14
14
|
position: 'relative',
|
|
15
|
-
height: '100%'
|
|
15
|
+
height: '100%'
|
|
16
16
|
});
|
|
17
17
|
this.wrap = new framework_1.Div({
|
|
18
18
|
name: 'td-scrollbar-wrap',
|
|
19
19
|
styleObj: {
|
|
20
20
|
overflow: 'auto',
|
|
21
|
-
height: (
|
|
21
|
+
height: (params === null || params === void 0 ? void 0 : params.height) || '100%'
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
this.view = new framework_1.Div({
|
|
25
|
+
// params?.tag 默认是div,简化处理,不加其它的tag标签了;
|
|
25
26
|
name: 'td-scrollbar-view'
|
|
26
27
|
});
|
|
27
|
-
if (
|
|
28
|
-
this.view.addStyleObj(
|
|
28
|
+
if (params === null || params === void 0 ? void 0 : params.viewStyle) {
|
|
29
|
+
this.view.ctrl.addStyleObj(params.viewStyle);
|
|
29
30
|
}
|
|
30
31
|
this.wrap.addChild(this.view);
|
|
31
|
-
if (
|
|
32
|
-
this.wrap.addStyleObj(
|
|
32
|
+
if (params === null || params === void 0 ? void 0 : params.wrapStyle) {
|
|
33
|
+
this.wrap.ctrl.addStyleObj(params.wrapStyle);
|
|
33
34
|
}
|
|
34
35
|
this.addChild(this.wrap);
|
|
35
|
-
if (!(
|
|
36
|
+
if (!(params === null || params === void 0 ? void 0 : params.native)) {
|
|
36
37
|
const bar = new bar_class_1.TdScrollbarBar({
|
|
37
|
-
always: (
|
|
38
|
-
minSize: (
|
|
38
|
+
always: (params === null || params === void 0 ? void 0 : params.always) || true,
|
|
39
|
+
minSize: (params === null || params === void 0 ? void 0 : params.minSize) || 20
|
|
39
40
|
});
|
|
40
41
|
this.addChildren(...bar.thumbs);
|
|
41
42
|
}
|
|
42
|
-
if (
|
|
43
|
-
this.view.addChildren(...
|
|
43
|
+
if (params === null || params === void 0 ? void 0 : params.contents) {
|
|
44
|
+
this.view.addChildren(...params.contents);
|
|
44
45
|
}
|
|
45
|
-
this.
|
|
46
|
-
}
|
|
47
|
-
setConfig(config) {
|
|
48
|
-
super.setConfig(config);
|
|
46
|
+
this.props = this.setParams(params);
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
exports.TdScrollbar = TdScrollbar;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeElement } from '@type-dom/framework';
|
|
2
|
+
import { IStyle } from '@type-dom/css-type';
|
|
2
3
|
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
4
|
export interface ITdScrollbar extends IUI {
|
|
4
5
|
className: 'TdScrollbar';
|
|
@@ -11,7 +12,7 @@ export interface ITdScrollbarConfig extends IUIConfig {
|
|
|
11
12
|
/**
|
|
12
13
|
* @description max height of scrollbar
|
|
13
14
|
*/
|
|
14
|
-
maxHeight
|
|
15
|
+
maxHeight?: number | string;
|
|
15
16
|
/**
|
|
16
17
|
* @description whether to use the native scrollbar
|
|
17
18
|
*/
|
|
@@ -2,6 +2,7 @@ import { UI } from '../../../../ui/ui.abstract';
|
|
|
2
2
|
import { ITdScrollbarThumb, ITdScrollbarThumbConfig } from './thumb.interface';
|
|
3
3
|
export declare class TdScrollbarThumb extends UI implements ITdScrollbarThumb {
|
|
4
4
|
className: 'TdScrollbarThumb';
|
|
5
|
+
props: ITdScrollbarThumbConfig;
|
|
5
6
|
private thumb;
|
|
6
|
-
constructor(
|
|
7
|
+
constructor(params?: ITdScrollbarThumbConfig);
|
|
7
8
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdScrollbarThumb = void 0;
|
|
4
|
-
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
4
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
-
const
|
|
5
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
6
|
+
const var_1 = require("../../../../styles/var");
|
|
7
7
|
class TdScrollbarThumb extends ui_abstract_1.UI {
|
|
8
|
-
constructor(
|
|
9
|
-
super();
|
|
8
|
+
constructor(params) {
|
|
9
|
+
super(params);
|
|
10
10
|
this.className = 'TdScrollbarThumb';
|
|
11
|
-
this.addAttrName('td-scrollbar-thumb');
|
|
12
|
-
this.addStyleObj({
|
|
11
|
+
this.ctrl.addAttrName('td-scrollbar-thumb');
|
|
12
|
+
this.ctrl.addStyleObj({
|
|
13
13
|
position: 'absolute',
|
|
14
14
|
right: '2px',
|
|
15
15
|
bottom: '2px',
|
|
16
16
|
zIndex: 1,
|
|
17
|
-
borderRadius: '4px'
|
|
17
|
+
borderRadius: '4px'
|
|
18
18
|
});
|
|
19
19
|
this.thumb = new framework_1.Div({
|
|
20
20
|
styleObj: {
|
|
@@ -22,24 +22,24 @@ class TdScrollbarThumb extends ui_abstract_1.UI {
|
|
|
22
22
|
display: 'block',
|
|
23
23
|
width: 0,
|
|
24
24
|
height: 0,
|
|
25
|
-
cursor:
|
|
25
|
+
cursor: 'pointer',
|
|
26
26
|
borderRadius: 'inherit',
|
|
27
27
|
// background-color: var(
|
|
28
28
|
// #{getCssVarName('scrollbar-bg-color')},
|
|
29
29
|
// map.get($scrollbar, 'bg-color')
|
|
30
30
|
// ),
|
|
31
|
-
backgroundColor:
|
|
31
|
+
backgroundColor: var_1.$scrollbar.bgColor,
|
|
32
32
|
// transition: getCssVar('transition-duration') background-color,
|
|
33
33
|
// transition: $transitionDuration + ' ' + $bgColor.default,
|
|
34
34
|
// opacity: var(
|
|
35
35
|
// #{getCssVarName('scrollbar-opacity')},
|
|
36
36
|
// map.get($scrollbar, 'opacity')
|
|
37
37
|
// ),
|
|
38
|
-
opacity:
|
|
39
|
-
}
|
|
38
|
+
opacity: var_1.$scrollbar.opacity
|
|
39
|
+
}
|
|
40
40
|
});
|
|
41
41
|
this.addChild(this.thumb);
|
|
42
|
-
this.
|
|
42
|
+
this.props = this.setParams(params);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
exports.TdScrollbarThumb = TdScrollbarThumb;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ITdSpace, ITdSpaceConfig } from './td-space.interface';
|
|
2
1
|
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { ITdSpace, ITdSpaceConfig } from './td-space.interface';
|
|
3
3
|
export declare class TdSpace extends UI implements ITdSpace {
|
|
4
4
|
className: 'TdSpace';
|
|
5
|
+
props: ITdSpaceConfig;
|
|
5
6
|
horizontalSize?: number;
|
|
6
7
|
verticalSize?: number;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
initSize(size?: number | string | [number, number]): void;
|
|
8
|
+
constructor(params?: ITdSpaceConfig);
|
|
9
|
+
setup(): void;
|
|
10
|
+
useSize(size?: number | string | [number, number]): void;
|
|
11
11
|
setSize(size: number | string | [number, number]): void;
|
|
12
12
|
}
|
|
@@ -3,52 +3,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdSpace = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
-
const td_space_const_1 = require("./td-space.const");
|
|
7
6
|
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
|
+
const td_space_const_1 = require("./td-space.const");
|
|
8
8
|
class TdSpace extends ui_abstract_1.UI {
|
|
9
|
-
constructor(
|
|
10
|
-
super();
|
|
9
|
+
constructor(params) {
|
|
10
|
+
super(params);
|
|
11
11
|
this.className = 'TdSpace';
|
|
12
|
-
this.
|
|
13
|
-
this.addStyleObj({
|
|
12
|
+
this.ctrl.addStyleObj({
|
|
14
13
|
display: 'inline-flex',
|
|
15
14
|
verticalAlign: 'top'
|
|
16
15
|
});
|
|
17
|
-
this.
|
|
16
|
+
this.addChild(this.getSlotNode());
|
|
17
|
+
this.props = this.setParams(params);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.children.forEach(item => {
|
|
19
|
+
setup() {
|
|
20
|
+
this.children.forEach((item) => {
|
|
22
21
|
if (item instanceof framework_1.TypeElement) {
|
|
23
|
-
item.addStyleObj({
|
|
22
|
+
item.ctrl.addStyleObj({
|
|
24
23
|
display: 'flex',
|
|
25
24
|
flexWrap: 'wrap'
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const props = this.props;
|
|
29
|
+
this.useSize(props === null || props === void 0 ? void 0 : props.size);
|
|
30
|
+
if (props === null || props === void 0 ? void 0 : props.wrap) {
|
|
31
|
+
this.ctrl.addStyle('flexWrap', 'wrap');
|
|
32
32
|
}
|
|
33
|
-
if (
|
|
34
|
-
this.addStyleObj({
|
|
33
|
+
if (props === null || props === void 0 ? void 0 : props.fill) {
|
|
34
|
+
this.ctrl.addStyleObj({
|
|
35
35
|
flexWrap: 'wrap',
|
|
36
36
|
flexGrow: 1,
|
|
37
|
-
minWidth: `${(
|
|
37
|
+
minWidth: `${(props === null || props === void 0 ? void 0 : props.fillRatio) || 100}%`
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
if ((
|
|
41
|
-
this.addStyle('flexDirection', 'row');
|
|
40
|
+
if ((props === null || props === void 0 ? void 0 : props.direction) === 'horizontal') {
|
|
41
|
+
this.ctrl.addStyle('flexDirection', 'row');
|
|
42
42
|
}
|
|
43
|
-
if ((
|
|
44
|
-
this.addStyle('flexDirection', 'column');
|
|
43
|
+
if ((props === null || props === void 0 ? void 0 : props.direction) === 'vertical') {
|
|
44
|
+
this.ctrl.addStyle('flexDirection', 'column');
|
|
45
45
|
}
|
|
46
|
-
if (
|
|
47
|
-
this.addStyle('alignItems',
|
|
46
|
+
if (props === null || props === void 0 ? void 0 : props.alignment) {
|
|
47
|
+
this.ctrl.addStyle('alignItems', props.alignment);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
const
|
|
50
|
+
useSize(size) {
|
|
51
|
+
const props = this.props;
|
|
52
52
|
if ((0, utils_1.isArray)(size)) {
|
|
53
53
|
this.horizontalSize = size[0];
|
|
54
54
|
this.verticalSize = size[1];
|
|
@@ -61,29 +61,31 @@ class TdSpace extends ui_abstract_1.UI {
|
|
|
61
61
|
else {
|
|
62
62
|
val = td_space_const_1.SIZE_MAP[size || 'small'] || td_space_const_1.SIZE_MAP.small;
|
|
63
63
|
}
|
|
64
|
-
if (((
|
|
64
|
+
if (((props === null || props === void 0 ? void 0 : props.wrap) || (props === null || props === void 0 ? void 0 : props.fill)) &&
|
|
65
|
+
(props === null || props === void 0 ? void 0 : props.direction) === 'horizontal') {
|
|
65
66
|
this.horizontalSize = this.verticalSize = val;
|
|
66
67
|
}
|
|
67
68
|
else {
|
|
68
|
-
if ((
|
|
69
|
+
if ((props === null || props === void 0 ? void 0 : props.direction) === 'vertical') {
|
|
69
70
|
this.verticalSize = val;
|
|
70
71
|
this.horizontalSize = 0;
|
|
71
72
|
}
|
|
72
|
-
else {
|
|
73
|
+
else {
|
|
74
|
+
// horizontal 默认
|
|
73
75
|
this.horizontalSize = val;
|
|
74
76
|
this.verticalSize = 0;
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
this.addStyleObj({
|
|
80
|
+
this.ctrl.addStyleObj({
|
|
79
81
|
rowGap: this.verticalSize + 'px',
|
|
80
82
|
columnGap: this.horizontalSize + 'px'
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
85
|
setSize(size) {
|
|
84
86
|
console.log('setSize size is ', size);
|
|
85
|
-
this.
|
|
86
|
-
this.setStyleObj({
|
|
87
|
+
this.useSize(size);
|
|
88
|
+
this.ctrl.setStyleObj({
|
|
87
89
|
rowGap: this.verticalSize + 'px',
|
|
88
90
|
columnGap: this.horizontalSize + 'px'
|
|
89
91
|
});
|