@type-dom/ui 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -44
- package/package.json +4 -10
- package/src/aria.d.ts +2 -2
- package/src/components/basic/td-button/td-button.abstract.d.ts +5 -5
- package/src/components/basic/td-button/td-button.abstract.js +46 -42
- package/src/components/basic/td-button/td-button.interface.d.ts +3 -6
- package/src/components/basic/td-button/td-button.style.d.ts +16 -5
- package/src/components/basic/td-button/td-button.style.js +43 -17
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +3 -2
- package/src/components/basic/td-button-group/td-button-group.class.js +34 -37
- package/src/components/basic/td-button-group/td-button-group.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +2 -2
- package/src/components/basic/td-container/td-aside/td-aside.class.js +6 -5
- package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-container.class.d.ts +2 -3
- package/src/components/basic/td-container/td-container.class.js +9 -7
- package/src/components/basic/td-container/td-container.interface.d.ts +3 -4
- 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 -2
- package/src/components/basic/td-container/td-footer/td-footer.class.js +4 -3
- package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +3 -3
- 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 +3 -3
- package/src/components/basic/td-container/td-header/td-header.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-main/td-main.class.d.ts +4 -2
- package/src/components/basic/td-container/td-main/td-main.class.js +8 -5
- package/src/components/basic/td-container/td-main/td-main.interface.d.ts +3 -3
- package/src/components/basic/td-icon/td-icon.class.d.ts +4 -6
- package/src/components/basic/td-icon/td-icon.class.js +32 -29
- package/src/components/basic/td-icon/td-icon.interface.d.ts +3 -4
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +2 -3
- package/src/components/basic/td-layout/td-col/td-col.class.js +4 -4
- package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +3 -3
- package/src/components/basic/td-layout/td-row/td-row.class.d.ts +2 -2
- package/src/components/basic/td-layout/td-row/td-row.class.js +5 -4
- package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +3 -3
- package/src/components/basic/td-link/td-link.class.d.ts +2 -2
- package/src/components/basic/td-link/td-link.class.js +6 -10
- package/src/components/basic/td-link/td-link.interface.d.ts +3 -3
- package/src/components/basic/td-link/td-link.style.js +1 -1
- package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +2 -2
- package/src/components/basic/td-scrollbar/bar/bar.class.js +4 -4
- package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +3 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +4 -2
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +4 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +3 -4
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +1 -1
- package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +2 -2
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +2 -3
- package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +3 -3
- package/src/components/basic/td-space/td-space.class.d.ts +2 -2
- package/src/components/basic/td-space/td-space.class.js +11 -5
- package/src/components/basic/td-space/td-space.interface.d.ts +3 -4
- package/src/components/basic/td-text/td-text.class.d.ts +4 -2
- package/src/components/basic/td-text/td-text.class.js +6 -4
- package/src/components/basic/td-text/td-text.interface.d.ts +3 -3
- package/src/components/data/td-avatar/td-avatar.class.d.ts +2 -2
- package/src/components/data/td-avatar/td-avatar.class.js +19 -25
- package/src/components/data/td-avatar/td-avatar.interface.d.ts +3 -3
- package/src/components/data/td-avatar/td-avatar.style.d.ts +2 -0
- package/src/components/data/td-avatar/td-avatar.style.js +19 -1
- package/src/components/data/td-badge/td-badge.class.d.ts +2 -2
- package/src/components/data/td-badge/td-badge.class.js +4 -4
- package/src/components/data/td-badge/td-badge.interface.d.ts +3 -3
- package/src/components/data/td-card/td-card.class.d.ts +4 -5
- package/src/components/data/td-card/td-card.class.js +16 -30
- package/src/components/data/td-card/td-card.interface.d.ts +3 -3
- package/src/components/data/td-card/td-card.style.d.ts +3 -2
- package/src/components/data/td-card/td-card.style.js +17 -3
- package/src/components/data/td-check-tag/td-check-tag.class.d.ts +2 -2
- package/src/components/data/td-check-tag/td-check-tag.class.js +5 -5
- package/src/components/data/td-check-tag/td-check-tag.interface.d.ts +3 -3
- package/src/components/data/td-check-tag/td-check-tag.style.d.ts +2 -2
- package/src/components/data/td-check-tag/td-check-tag.style.js +3 -3
- package/src/components/data/td-collapse/td-collapse.class.d.ts +2 -2
- package/src/components/data/td-collapse/td-collapse.class.js +20 -20
- package/src/components/data/td-collapse/td-collapse.interface.d.ts +3 -3
- package/src/components/data/td-collapse/td-collapse.style.d.ts +2 -0
- package/src/components/data/td-collapse/td-collapse.style.js +9 -1
- package/src/components/data/td-collapse-item/td-collapse-item.class.d.ts +4 -5
- package/src/components/data/td-collapse-item/td-collapse-item.class.js +16 -16
- package/src/components/data/td-collapse-item/td-collapse-item.interface.d.ts +3 -3
- package/src/components/data/td-count-down/td-count-down.class.d.ts +1 -1
- package/src/components/data/td-count-down/td-count-down.class.js +1 -1
- package/src/components/data/td-descriptions/td-descriptions-row.d.ts +4 -5
- package/src/components/data/td-descriptions/td-descriptions-row.js +1 -1
- package/src/components/data/td-descriptions/td-descriptions.class.d.ts +3 -3
- package/src/components/data/td-descriptions/td-descriptions.class.js +2 -3
- package/src/components/data/td-descriptions/td-descriptions.interface.d.ts +3 -4
- package/src/components/data/td-descriptions/td-descritions-cell.d.ts +6 -5
- package/src/components/data/td-descriptions/td-descritions-cell.js +5 -4
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.d.ts +2 -3
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +5 -4
- package/src/components/data/td-descriptions-item/td-descriptions-item.interface.d.ts +3 -4
- package/src/components/data/td-empty/td-empty.class.d.ts +2 -2
- package/src/components/data/td-empty/td-empty.class.js +2 -3
- package/src/components/data/td-empty/td-empty.interface.d.ts +3 -4
- package/src/components/data/td-image/td-image.class.d.ts +2 -3
- package/src/components/data/td-image/td-image.class.js +4 -22
- package/src/components/data/td-image/td-image.interface.d.ts +3 -3
- package/src/components/data/td-image/td-image.style.d.ts +2 -0
- package/src/components/data/td-image/td-image.style.js +19 -1
- package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +3 -5
- package/src/components/data/td-image-viewer/td-image-viewer.class.js +20 -17
- package/src/components/data/td-image-viewer/td-image-viewer.interface.d.ts +3 -3
- package/src/components/data/td-result/td-result.class.d.ts +2 -2
- package/src/components/data/td-result/td-result.class.js +4 -3
- package/src/components/data/td-result/td-result.interface.d.ts +3 -4
- package/src/components/data/td-segmented/td-segmented.class.d.ts +2 -3
- package/src/components/data/td-segmented/td-segmented.class.js +7 -8
- package/src/components/data/td-segmented/td-segmented.interface.d.ts +2 -3
- package/src/components/data/td-statistic/td-statistic.abstract.d.ts +3 -4
- package/src/components/data/td-statistic/td-statistic.abstract.js +15 -14
- package/src/components/data/td-statistic/td-statistic.class.js +1 -0
- package/src/components/data/td-statistic/td-statistic.interface.d.ts +3 -4
- package/src/components/data/td-tag/td-tag.class.d.ts +3 -4
- package/src/components/data/td-tag/td-tag.class.js +13 -13
- package/src/components/data/td-tag/td-tag.interface.d.ts +3 -3
- package/src/components/feedback/index.d.ts +4 -0
- package/src/components/feedback/index.js +5 -2
- package/src/components/feedback/td-alert/td-alert.class.d.ts +2 -3
- package/src/components/feedback/td-alert/td-alert.class.js +19 -17
- package/src/components/feedback/td-alert/td-alert.interface.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.class.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.class.js +25 -29
- package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.interface.js +1 -1
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.d.ts +2 -3
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +10 -7
- package/src/components/feedback/td-dialog-content/td-dialog-content.interface.d.ts +3 -4
- package/src/components/feedback/td-drawer/td-drawer.class.d.ts +3 -3
- package/src/components/feedback/td-drawer/td-drawer.class.js +5 -5
- package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +2 -2
- package/src/components/feedback/td-focus-trap/focus-trap.d.ts +15 -0
- package/src/components/feedback/td-focus-trap/focus-trap.js +71 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -7
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +129 -129
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +3 -3
- package/src/components/feedback/td-loading/td-loading.class.d.ts +4 -3
- package/src/components/feedback/td-loading/td-loading.class.js +27 -17
- package/src/components/feedback/td-loading/td-loading.interface.d.ts +3 -4
- package/src/components/feedback/td-message/td-message.class.d.ts +4 -4
- package/src/components/feedback/td-message/td-message.class.js +31 -31
- package/src/components/feedback/td-message/td-message.interface.d.ts +3 -4
- package/src/components/feedback/td-message-box/td-message-box.class.d.ts +10 -12
- package/src/components/feedback/td-message-box/td-message-box.class.js +30 -52
- package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +4 -5
- package/src/components/feedback/td-notification/td-notification.class.d.ts +4 -5
- package/src/components/feedback/td-notification/td-notification.class.js +17 -18
- package/src/components/feedback/td-notification/td-notification.interface.d.ts +3 -4
- package/src/components/feedback/td-notification/td-notification.style.js +6 -6
- package/src/components/feedback/td-only-child/td-only-child.class.d.ts +3 -3
- package/src/components/feedback/td-only-child/td-only-child.class.js +3 -3
- package/src/components/feedback/td-overlay/td-overlay.class.d.ts +2 -3
- package/src/components/feedback/td-overlay/td-overlay.class.js +6 -5
- package/src/components/feedback/td-overlay/td-overlay.interface.d.ts +3 -3
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +2 -2
- package/src/components/feedback/td-popper/arrow/arrow.class.js +7 -6
- package/src/components/feedback/td-popper/arrow/arrow.const.d.ts +3 -0
- package/src/components/feedback/td-popper/arrow/arrow.const.js +6 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +3 -4
- package/src/components/feedback/td-popper/constants.d.ts +25 -0
- package/src/components/feedback/td-popper/constants.js +5 -0
- package/src/components/feedback/td-popper/content/content.class.d.ts +2 -2
- package/src/components/feedback/td-popper/content/content.class.js +7 -13
- package/src/components/feedback/td-popper/content/content.const.d.ts +2 -2
- package/src/components/feedback/td-popper/content/content.const.js +3 -4
- package/src/components/feedback/td-popper/content/content.interface.d.ts +24 -11
- package/src/components/feedback/td-popper/content/content.interface.js +4 -0
- package/src/components/feedback/td-popper/td-popper.class.d.ts +3 -2
- package/src/components/feedback/td-popper/td-popper.class.js +9 -7
- package/src/components/feedback/td-popper/td-popper.const.d.ts +5 -20
- package/src/components/feedback/td-popper/td-popper.const.js +8 -3
- package/src/components/feedback/td-popper/td-popper.interface.d.ts +6 -4
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +2 -2
- package/src/components/feedback/td-popper/trigger/trigger.class.js +6 -6
- package/src/components/feedback/td-popper/trigger/trigger.const.d.ts +1 -0
- package/src/components/feedback/td-popper/trigger/trigger.const.js +4 -1
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +3 -3
- package/src/components/feedback/td-tooltip/content/content.class.d.ts +2 -2
- package/src/components/feedback/td-tooltip/content/content.class.js +4 -3
- package/src/components/feedback/td-tooltip/content/content.const.d.ts +55 -0
- package/src/components/feedback/td-tooltip/content/content.const.js +6 -0
- package/src/components/feedback/td-tooltip/content/content.interface.d.ts +19 -3
- package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +5 -3
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +84 -9
- package/src/components/feedback/td-tooltip/td-tooltip.const.d.ts +77 -0
- package/src/components/feedback/td-tooltip/td-tooltip.const.js +9 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +6 -3
- package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +3 -2
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +56 -3
- package/src/components/feedback/td-tooltip/trigger/trigger.const.d.ts +4 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.const.js +6 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +7 -2
- package/src/components/form/index.d.ts +17 -16
- package/src/components/form/index.js +19 -17
- package/src/components/form/td-checkbox/composables/use-checkbox-status.js +1 -1
- package/src/components/form/td-checkbox/composables/use-checkbox.js +1 -1
- package/src/components/form/td-checkbox/td-checkbox.class.d.ts +18 -3
- package/src/components/form/td-checkbox/td-checkbox.class.js +231 -9
- package/src/components/form/td-checkbox/td-checkbox.const.d.ts +63 -0
- package/src/components/form/td-checkbox/td-checkbox.const.js +88 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +5 -5
- package/src/components/form/td-checkbox/td-checkbox.style.d.ts +9 -0
- package/src/components/form/td-checkbox/td-checkbox.style.js +167 -14
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +9 -3
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +114 -26
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +2 -4
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.d.ts +8 -1
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.js +89 -12
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +11 -3
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +118 -5
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +8 -5
- package/src/components/form/td-form/td-form.class.d.ts +4 -2
- package/src/components/form/td-form/td-form.class.js +9 -5
- package/src/components/form/td-form/td-form.interface.d.ts +7 -4
- package/src/components/form/td-form-item/td-form-item.class.d.ts +4 -5
- package/src/components/form/td-form-item/td-form-item.class.js +34 -27
- package/src/components/form/td-form-item/td-form-item.interface.d.ts +3 -3
- package/src/components/form/td-input/td-input.class.d.ts +3 -4
- package/src/components/form/td-input/td-input.class.js +30 -26
- package/src/components/form/td-input/td-input.interface.d.ts +3 -4
- package/src/components/form/td-input/widget/suffix.d.ts +1 -0
- package/src/components/form/td-input/widget/suffix.js +6 -1
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +5 -5
- package/src/components/form/td-input/widget/utils.js +8 -8
- package/src/components/form/td-option/td-option.class.d.ts +2 -2
- package/src/components/form/td-option/td-option.class.js +3 -3
- package/src/components/form/td-option/td-option.interface.d.ts +3 -3
- package/src/components/form/td-option-group/td-option-group.class.d.ts +2 -2
- package/src/components/form/td-option-group/td-option-group.class.js +2 -3
- package/src/components/form/td-option-group/td-option-group.interface.d.ts +3 -3
- package/src/components/form/td-radio/td-radio.class.d.ts +2 -3
- package/src/components/form/td-radio/td-radio.class.js +8 -5
- package/src/components/form/td-radio/td-radio.interface.d.ts +3 -3
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +2 -3
- package/src/components/form/td-radio-button/td-radio-button.class.js +9 -9
- package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +3 -3
- package/src/components/form/td-radio-group/td-radio-group.class.d.ts +2 -5
- package/src/components/form/td-radio-group/td-radio-group.class.js +14 -11
- package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +3 -4
- package/src/components/form/td-select/dropdown/dropdown.class.d.ts +2 -2
- package/src/components/form/td-select/dropdown/dropdown.class.js +2 -3
- package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +3 -4
- package/src/components/form/td-select/td-select.class.d.ts +4 -6
- package/src/components/form/td-select/td-select.class.js +4 -6
- package/src/components/form/td-select/td-select.interface.d.ts +13 -5
- package/src/components/form/td-select/td-select.style.d.ts +23 -0
- package/src/components/form/td-select/td-select.style.js +170 -1
- package/src/components/form/td-switch/td-switch.class.d.ts +2 -3
- package/src/components/form/td-switch/td-switch.class.js +2 -3
- package/src/components/form/td-switch/td-switch.interface.d.ts +3 -4
- package/src/components/form/td-switch/widget/td-switch-core.js +4 -4
- package/src/components/navigation/td-affix/td-affix.class.d.ts +2 -3
- package/src/components/navigation/td-affix/td-affix.class.js +2 -3
- package/src/components/navigation/td-affix/td-affix.interface.d.ts +3 -4
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.d.ts +2 -2
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +2 -3
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.d.ts +3 -4
- package/src/components/navigation/td-anchor/td-anchor.class.d.ts +2 -2
- package/src/components/navigation/td-anchor/td-anchor.class.js +6 -4
- package/src/components/navigation/td-anchor/td-anchor.function.js +1 -1
- package/src/components/navigation/td-anchor/td-anchor.interface.d.ts +3 -3
- package/src/components/navigation/td-backtop/td-backtop.class.d.ts +5 -6
- package/src/components/navigation/td-backtop/td-backtop.class.js +36 -59
- package/src/components/navigation/td-backtop/td-backtop.const.d.ts +18 -0
- package/src/components/navigation/td-backtop/td-backtop.const.js +21 -0
- package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +3 -3
- package/src/components/navigation/td-backtop/td-backtop.style.d.ts +2 -0
- package/src/components/navigation/td-backtop/td-backtop.style.js +19 -1
- package/src/components/navigation/td-backtop/use-backtop.d.ts +2 -3
- package/src/components/navigation/td-backtop/use-backtop.js +2 -2
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.d.ts +3 -3
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +12 -8
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.d.ts +3 -4
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.d.ts +2 -2
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +2 -3
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.d.ts +3 -4
- package/src/components/navigation/td-menu/td-menu.class.d.ts +2 -2
- package/src/components/navigation/td-menu/td-menu.class.js +4 -3
- package/src/components/navigation/td-menu/td-menu.interface.d.ts +3 -4
- package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tab-bar.class.js +3 -3
- package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +3 -3
- package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +2 -3
- package/src/components/navigation/td-tabs/td-tab-nav.class.js +3 -4
- package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +3 -3
- package/src/components/navigation/td-tabs/td-tab-pane.class.d.ts +2 -3
- package/src/components/navigation/td-tabs/td-tab-pane.class.js +12 -16
- package/src/components/navigation/td-tabs/td-tab-pane.interface.d.ts +3 -4
- package/src/components/navigation/td-tabs/td-tabs.class.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tabs.class.js +6 -4
- package/src/components/navigation/td-tabs/td-tabs.interface.d.ts +3 -3
- package/src/components/others/example/example-source-wrapper.js +2 -1
- package/src/components/others/td-divider/td-divider.class.d.ts +2 -2
- package/src/components/others/td-divider/td-divider.class.js +2 -3
- package/src/components/others/td-divider/td-divider.interface.d.ts +3 -3
- package/src/constants/aria.d.ts +17 -0
- package/src/constants/aria.js +20 -0
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/use-delayed-toggle.d.ts +23 -0
- package/src/hooks/use-delayed-toggle.js +52 -0
- package/src/styles/var.d.ts +2 -16
- package/src/styles/var.js +7 -17
- package/src/utils/dom/event.d.ts +6 -0
- package/src/utils/dom/event.js +17 -0
- package/src/ui/ui.abstract.d.ts +0 -18
- package/src/ui/ui.abstract.js +0 -50
- package/src/ui/ui.interface.d.ts +0 -12
- package/src/ui/ui.interface.js +0 -2
|
@@ -4,74 +4,60 @@ exports.TdBackTop = void 0;
|
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const svgs_1 = require("@type-dom/svgs");
|
|
6
6
|
const utils_1 = require("@type-dom/utils");
|
|
7
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
8
|
-
const var_1 = require("../../../styles/var");
|
|
9
7
|
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
10
8
|
const td_backtop_style_1 = require("./td-backtop.style");
|
|
11
|
-
|
|
9
|
+
const td_backtop_const_1 = require("./td-backtop.const");
|
|
10
|
+
class TdBackTop extends framework_1.TypeFragment {
|
|
12
11
|
constructor(params = {}) {
|
|
13
|
-
super(params
|
|
12
|
+
super(); // 要传 params, 否则 el 无法定位。
|
|
14
13
|
this.visible = false;
|
|
15
14
|
this.throttleScroll = () => {
|
|
16
15
|
console.log('throttleScroll .');
|
|
17
16
|
return (0, utils_1.throttle)(this.handleScroll, 300)();
|
|
18
17
|
};
|
|
19
|
-
this.handleScroll = () => {
|
|
18
|
+
this.handleScroll = (target, event) => {
|
|
20
19
|
var _a;
|
|
21
|
-
console.error('handleScroll . ');
|
|
20
|
+
console.error('handleScroll . target is ', target);
|
|
22
21
|
// console.log('this.el', this.el);
|
|
23
|
-
if (this.
|
|
22
|
+
if (this.target) {
|
|
24
23
|
this.visible =
|
|
25
|
-
this.
|
|
24
|
+
this.target.scrollTop >= (((_a = this.props) === null || _a === void 0 ? void 0 : _a.visibilityHeight) || 200);
|
|
26
25
|
console.log('this.visible', this.visible);
|
|
27
26
|
// this.setStyleObj({
|
|
28
27
|
// display: this.visible ? 'flex' : 'none',
|
|
29
28
|
// })
|
|
30
|
-
this.
|
|
29
|
+
this.content.showSlot(this.visible);
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
32
|
this.className = 'TdBackTop';
|
|
33
|
+
this.assignProps(td_backtop_const_1.backtopProps);
|
|
34
34
|
this.division = new framework_1.Div({
|
|
35
|
-
name: 'td-back-top',
|
|
36
35
|
attrObj: {
|
|
36
|
+
name: 'td-back-top',
|
|
37
37
|
class: 'td-back-top'
|
|
38
38
|
},
|
|
39
|
-
styleObj:
|
|
40
|
-
right: (0, utils_1.addUnit)(params === null || params === void 0 ? void 0 : params.right) || '40px',
|
|
41
|
-
bottom: (0, utils_1.addUnit)(params === null || params === void 0 ? void 0 : params.bottom) || '40px',
|
|
42
|
-
position: 'fixed',
|
|
43
|
-
// backgroundColor: getCssVar('backtop', 'bg-color'),
|
|
44
|
-
// backgroundColor: $backtop.bgColor,
|
|
45
|
-
width: '40px',
|
|
46
|
-
height: '40px',
|
|
47
|
-
borderRadius: '50%',
|
|
48
|
-
// color: getCssVar('backtop', 'text-color'),
|
|
49
|
-
color: td_backtop_style_1.$backtop.textColor,
|
|
50
|
-
// display: this.visible ? 'flex' : 'none',
|
|
51
|
-
display: 'flex',
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
justifyContent: 'center',
|
|
54
|
-
fontSize: '20px',
|
|
55
|
-
// boxShadow: getCssVar('box-shadow', 'lighter'),
|
|
56
|
-
boxShadow: var_1.$boxShadow.lighter,
|
|
57
|
-
cursor: 'pointer',
|
|
58
|
-
zIndex: 999
|
|
59
|
-
},
|
|
39
|
+
styleObj: td_backtop_style_1.$backtopStyle,
|
|
60
40
|
events: {
|
|
61
|
-
click: () =>
|
|
62
|
-
this.handleClick();
|
|
63
|
-
}
|
|
41
|
+
click: (evt) => this.handleClick()
|
|
64
42
|
}
|
|
65
43
|
});
|
|
66
44
|
this.division.attr.addObj({
|
|
67
45
|
componentId: this.componentId
|
|
68
46
|
});
|
|
69
|
-
this.
|
|
47
|
+
this.content = new framework_1.Transition({
|
|
70
48
|
name: 'fade',
|
|
71
49
|
slot: this.division,
|
|
72
50
|
});
|
|
73
|
-
this.addChild(this.
|
|
74
|
-
|
|
51
|
+
this.addChild(this.content);
|
|
52
|
+
this.division.useStyle(params);
|
|
53
|
+
this.division.style.addObj({
|
|
54
|
+
right: (params.right || 40) + 'px',
|
|
55
|
+
bottom: (params.bottom || 40) + 'px',
|
|
56
|
+
});
|
|
57
|
+
this.division.useAttr(params);
|
|
58
|
+
// if (this.visible) {
|
|
59
|
+
// this.content.addChild(this.division);
|
|
60
|
+
// }
|
|
75
61
|
if (!TdBackTop.initCalled) {
|
|
76
62
|
TdBackTop.initCalled = true;
|
|
77
63
|
(0, framework_1.createClass)('td-back-top', {
|
|
@@ -84,7 +70,6 @@ class TdBackTop extends ui_abstract_1.UI {
|
|
|
84
70
|
// // color: getCssVar('backtop', 'text-color'),
|
|
85
71
|
// color: $backtop.textColor,
|
|
86
72
|
// display: 'flex',
|
|
87
|
-
// // display: 'flex',
|
|
88
73
|
// alignItems: 'center',
|
|
89
74
|
// justifyContent: 'center',
|
|
90
75
|
// fontSize: '20px',
|
|
@@ -100,6 +85,7 @@ class TdBackTop extends ui_abstract_1.UI {
|
|
|
100
85
|
this.division.addChild(this.getSlotNode());
|
|
101
86
|
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
102
87
|
// this.division.slotChild(params.slot);
|
|
88
|
+
this.getSlotNode().addSlot(params.slot);
|
|
103
89
|
}
|
|
104
90
|
else {
|
|
105
91
|
this.getSlotNode().resetSlot(new td_icon_class_1.TdIcon({
|
|
@@ -108,45 +94,36 @@ class TdBackTop extends ui_abstract_1.UI {
|
|
|
108
94
|
}));
|
|
109
95
|
}
|
|
110
96
|
this.container = document;
|
|
111
|
-
this.
|
|
112
|
-
this.buildProps({
|
|
113
|
-
visibilityHeight: 200,
|
|
114
|
-
right: 40,
|
|
115
|
-
bottom: 40,
|
|
116
|
-
});
|
|
97
|
+
this.target = document.documentElement; // todo 监听不生效 ????
|
|
117
98
|
this.props = this.useParams(params);
|
|
118
99
|
}
|
|
119
100
|
mounted() {
|
|
120
101
|
var _a;
|
|
121
102
|
console.log('TdBackTop mounted');
|
|
103
|
+
this.container = document; // this.el;
|
|
104
|
+
this.target = document.documentElement;
|
|
122
105
|
if ((_a = this.props) === null || _a === void 0 ? void 0 : _a.target) {
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
106
|
+
this.target = this.props.target;
|
|
107
|
+
if (!this.target) {
|
|
108
|
+
throw Error(`target does not exist: ${this.props.target}`);
|
|
109
|
+
}
|
|
127
110
|
}
|
|
128
|
-
// this.container = this.
|
|
111
|
+
// this.container = this.target;
|
|
129
112
|
// this.container.style.setProperty('over-flow', 'scroll');
|
|
113
|
+
// listener scroll
|
|
114
|
+
this.container.addEventListener('scroll', this.throttleScroll);
|
|
130
115
|
// Give visible an initial value, fix #13066
|
|
131
116
|
this.handleScroll();
|
|
132
|
-
this.container.addEventListener('scroll', this.throttleScroll);
|
|
133
|
-
// 监听 window 的滚动事件
|
|
134
|
-
window.addEventListener('scroll', () => {
|
|
135
|
-
console.log('Window scrolled:', window.scrollY);
|
|
136
|
-
});
|
|
137
|
-
// 监听 document 的滚动事件
|
|
138
|
-
document.addEventListener('scroll', () => {
|
|
139
|
-
console.log('Document scrolled:', document.documentElement.scrollTop || document.body.scrollTop);
|
|
140
|
-
});
|
|
141
117
|
}
|
|
142
118
|
destroy(root) {
|
|
119
|
+
console.log('TdBackTop destroy');
|
|
143
120
|
this.container.removeEventListener('scroll', this.throttleScroll);
|
|
144
121
|
super.destroy(root);
|
|
145
122
|
}
|
|
146
123
|
handleClick() {
|
|
147
124
|
var _a;
|
|
148
125
|
console.error('handleClick . ');
|
|
149
|
-
(_a = this.
|
|
126
|
+
(_a = this.target) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0, behavior: 'smooth' });
|
|
150
127
|
}
|
|
151
128
|
}
|
|
152
129
|
exports.TdBackTop = TdBackTop;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const backtopProps: {
|
|
2
|
+
/**
|
|
3
|
+
* @description the button will not show until the scroll height reaches this value.
|
|
4
|
+
*/
|
|
5
|
+
visibilityHeight: number;
|
|
6
|
+
/**
|
|
7
|
+
* @description the target to trigger scroll.
|
|
8
|
+
*/
|
|
9
|
+
target: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description right distance.
|
|
12
|
+
*/
|
|
13
|
+
right: number;
|
|
14
|
+
/**
|
|
15
|
+
* @description bottom distance.
|
|
16
|
+
*/
|
|
17
|
+
bottom: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.backtopProps = void 0;
|
|
4
|
+
exports.backtopProps = {
|
|
5
|
+
/**
|
|
6
|
+
* @description the button will not show until the scroll height reaches this value.
|
|
7
|
+
*/
|
|
8
|
+
visibilityHeight: 200,
|
|
9
|
+
/**
|
|
10
|
+
* @description the target to trigger scroll.
|
|
11
|
+
*/
|
|
12
|
+
target: '',
|
|
13
|
+
/**
|
|
14
|
+
* @description right distance.
|
|
15
|
+
*/
|
|
16
|
+
right: 40,
|
|
17
|
+
/**
|
|
18
|
+
* @description bottom distance.
|
|
19
|
+
*/
|
|
20
|
+
bottom: 40,
|
|
21
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdBackTop extends
|
|
1
|
+
import type { ITransitionConfig, ITypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ITdBackTop extends ITypeElement {
|
|
3
3
|
className: 'TdBackTop';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdBackTopConfig extends
|
|
5
|
+
export interface ITdBackTopConfig extends ITransitionConfig {
|
|
6
6
|
/**
|
|
7
7
|
* @description the button will not show until the scroll height reaches this value.
|
|
8
8
|
* default: 200,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.$backtop = void 0;
|
|
3
|
+
exports.$backtopStyle = exports.$backtop = void 0;
|
|
4
4
|
const var_1 = require("../../../styles/var");
|
|
5
5
|
exports.$backtop = {
|
|
6
6
|
// 'bg-color': getCssVar('bg-color', 'overlay'),
|
|
@@ -11,3 +11,21 @@ exports.$backtop = {
|
|
|
11
11
|
hoverBgColor: var_1.$borderColor.extraLight
|
|
12
12
|
// 'hover-text-color':
|
|
13
13
|
};
|
|
14
|
+
exports.$backtopStyle = {
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
// background-color: getCssVar('backtop', 'bg-color'),
|
|
17
|
+
backgroundColor: exports.$backtop.bgColor,
|
|
18
|
+
width: '40px',
|
|
19
|
+
height: '40px',
|
|
20
|
+
borderRadius: '50%',
|
|
21
|
+
// color: getCssVar('backtop', 'text-color'),
|
|
22
|
+
color: exports.$backtop.textColor,
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
fontSize: '20px',
|
|
27
|
+
// boxShadow: getCssVar('box-shadow', 'lighter'),
|
|
28
|
+
boxShadow: var_1.$boxShadow.lighter,
|
|
29
|
+
cursor: 'pointer',
|
|
30
|
+
zIndex: 15, // 5 会被遮挡
|
|
31
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AnyFn } from '@type-dom/framework';
|
|
2
1
|
import { ITdBackTopConfig } from './td-backtop.interface';
|
|
3
|
-
export declare const useBackTop: (props: ITdBackTopConfig, emit: (
|
|
2
|
+
export declare const useBackTop: (props: ITdBackTopConfig, emit: (eventName: string, event?: Event) => void, componentName: string) => {
|
|
4
3
|
visible: boolean;
|
|
5
|
-
handleClick: (
|
|
4
|
+
handleClick: (event: MouseEvent) => void;
|
|
6
5
|
mounted: () => void;
|
|
7
6
|
};
|
|
@@ -13,9 +13,9 @@ emit, componentName) => {
|
|
|
13
13
|
visible = el.scrollTop >= ((_a = props.visibilityHeight) !== null && _a !== void 0 ? _a : 0);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
const handleClick = (
|
|
16
|
+
const handleClick = (event) => {
|
|
17
17
|
el === null || el === void 0 ? void 0 : el.scrollTo({ top: 0, behavior: 'smooth' });
|
|
18
|
-
emit('click',
|
|
18
|
+
emit('click', event);
|
|
19
19
|
};
|
|
20
20
|
// const handleScrollThrottled = useThrottleFn(handleScroll, 300, true)
|
|
21
21
|
//
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { TdBreadcrumbItem } from '../td-breadcrumb-item/td-breadcrumb-item.class';
|
|
3
3
|
import { ITdBreadcrumb, ITdBreadcrumbConfig } from './td-breadcrumb.interface';
|
|
4
|
-
export declare class TdBreadcrumb extends
|
|
4
|
+
export declare class TdBreadcrumb extends TypeDiv implements ITdBreadcrumb {
|
|
5
5
|
className: 'TdBreadcrumb';
|
|
6
6
|
props: ITdBreadcrumbConfig;
|
|
7
7
|
childNodes: TdBreadcrumbItem[];
|
|
8
8
|
constructor(params?: ITdBreadcrumbConfig);
|
|
9
|
-
|
|
9
|
+
setup(): void;
|
|
10
10
|
mounted(): void;
|
|
11
11
|
}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdBreadcrumb = void 0;
|
|
4
|
-
const
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
// todo link 样式没有添加
|
|
6
|
-
class TdBreadcrumb extends
|
|
6
|
+
class TdBreadcrumb extends framework_1.TypeDiv {
|
|
7
7
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
8
|
+
super();
|
|
9
9
|
this.className = 'TdBreadcrumb';
|
|
10
|
-
this.attr.
|
|
11
|
-
|
|
10
|
+
this.attr.setObj({
|
|
11
|
+
name: 'td-breadcrumb',
|
|
12
|
+
'aria-label': 'Breadcrumb', // :aria-label="t('el.breadcrumb.label')"
|
|
13
|
+
role: 'navigation',
|
|
14
|
+
});
|
|
15
|
+
this.style.setObj({
|
|
12
16
|
fontSize: '14px',
|
|
13
17
|
lineHeight: 1
|
|
14
18
|
});
|
|
15
19
|
this.childNodes = [];
|
|
16
|
-
this.
|
|
20
|
+
this.slotChild(params.slot);
|
|
17
21
|
this.props = this.useParams(params);
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
console.log('TdBreadcrumb
|
|
23
|
+
setup() {
|
|
24
|
+
console.log('TdBreadcrumb setup . ');
|
|
21
25
|
this.childNodes.forEach((item, index) => {
|
|
22
26
|
if (index < this.childNodes.length - 1) {
|
|
23
27
|
item.addSeparator(this.props);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
-
|
|
3
|
-
export interface ITdBreadcrumb extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
export interface ITdBreadcrumb extends ITypeDiv {
|
|
4
3
|
className: 'TdBreadcrumb';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdBreadcrumbConfig extends
|
|
5
|
+
export interface ITdBreadcrumbConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description separator character
|
|
9
8
|
* default: '/',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeSpan } from '@type-dom/framework';
|
|
2
2
|
import { ITdBreadcrumbConfig } from '../td-breadcrumb/td-breadcrumb.interface';
|
|
3
3
|
import { ITdBreadcrumbItem, ITdBreadcrumbItemConfig } from './td-breadcrumb-item.interface';
|
|
4
|
-
export declare class TdBreadcrumbItem extends
|
|
4
|
+
export declare class TdBreadcrumbItem extends TypeSpan implements ITdBreadcrumbItem {
|
|
5
5
|
className: 'TdBreadcrumbItem';
|
|
6
6
|
constructor(params?: ITdBreadcrumbItemConfig);
|
|
7
7
|
addSeparator(breadcrumbConfig?: ITdBreadcrumbConfig): void;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdBreadcrumbItem = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const var_1 = require("../../../styles/var");
|
|
7
6
|
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
8
|
-
class TdBreadcrumbItem extends
|
|
7
|
+
class TdBreadcrumbItem extends framework_1.TypeSpan {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdBreadcrumbItem';
|
|
12
11
|
this.style.addObj({
|
|
13
12
|
float: 'left',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdBreadcrumbItem extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeSpan, Router } from '@type-dom/framework';
|
|
2
|
+
export interface ITdBreadcrumbItem extends ITypeSpan {
|
|
4
3
|
className: 'TdBreadcrumbItem';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdBreadcrumbItemConfig extends
|
|
5
|
+
export interface ITdBreadcrumbItemConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description target route of the link, same as `to` of `vue-router`
|
|
9
8
|
* default: '',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeUL } from '@type-dom/framework';
|
|
2
2
|
import { ITdMenu, ITdMenuConfig } from './td-menu.interface';
|
|
3
|
-
export declare class TdMenu extends
|
|
3
|
+
export declare class TdMenu extends TypeUL implements ITdMenu {
|
|
4
4
|
className: 'TdMenu';
|
|
5
5
|
props: ITdMenuConfig;
|
|
6
6
|
constructor(params?: ITdMenuConfig);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdMenu = void 0;
|
|
4
|
-
const
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const var_1 = require("../../../styles/var");
|
|
6
|
-
class TdMenu extends
|
|
6
|
+
class TdMenu extends framework_1.TypeUL {
|
|
7
7
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
8
|
+
super();
|
|
9
|
+
// this.useTag('ul');
|
|
9
10
|
this.className = 'TdMenu';
|
|
10
11
|
this.attr.addObj({
|
|
11
12
|
name: 'td-menu',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdMenu extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeUL, Router } from '@type-dom/framework';
|
|
2
|
+
export interface ITdMenu extends ITypeUL {
|
|
4
3
|
className: 'TdMenu';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdMenuConfig extends
|
|
5
|
+
export interface ITdMenuConfig extends ITypeConfig {
|
|
7
6
|
mode?: 'horizontal' | 'vertical';
|
|
8
7
|
defaultActive?: string;
|
|
9
8
|
uniqueOpened?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IStyle } from '@type-dom/css-type';
|
|
2
|
-
import {
|
|
2
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
3
3
|
import { ITdTabBar, ITdTabBarConfig } from './td-tab-bar.interface';
|
|
4
|
-
export declare class TdTabBar extends
|
|
4
|
+
export declare class TdTabBar extends TypeDiv implements ITdTabBar {
|
|
5
5
|
className: 'TdTabBar';
|
|
6
6
|
props: ITdTabBarConfig;
|
|
7
7
|
barStyle?: IStyle;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdTabBar = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
|
-
const
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
6
|
const td_tabs_style_1 = require("./td-tabs.style");
|
|
7
|
-
class TdTabBar extends
|
|
7
|
+
class TdTabBar extends framework_1.TypeDiv {
|
|
8
8
|
constructor(params) {
|
|
9
|
-
super(
|
|
9
|
+
super();
|
|
10
10
|
this.className = 'TdTabBar';
|
|
11
11
|
this.attr.addName('td-tab-bar');
|
|
12
12
|
this.style.addObj(td_tabs_style_1.$tabsActiveBarStyle);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdTabPaneConfig } from './td-tab-pane.interface';
|
|
3
3
|
import { TdTabs } from './td-tabs.class';
|
|
4
|
-
export interface ITdTabBar extends
|
|
4
|
+
export interface ITdTabBar extends ITypeDiv {
|
|
5
5
|
className: 'TdTabBar';
|
|
6
6
|
}
|
|
7
|
-
export interface ITdTabBarConfig extends
|
|
7
|
+
export interface ITdTabBarConfig extends ITypeConfig {
|
|
8
8
|
tabs?: ITdTabPaneConfig[];
|
|
9
9
|
rootTabs?: TdTabs;
|
|
10
10
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Div, Span, TypeElement } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Div, Span, TypeElement, TypeDiv } from '@type-dom/framework';
|
|
3
2
|
import { IScrollable, ITdTabNav, ITdTabNavConfig } from './td-tab-nav.interface';
|
|
4
|
-
export declare class TdTabNav extends
|
|
3
|
+
export declare class TdTabNav extends TypeDiv implements ITdTabNav {
|
|
5
4
|
className: 'TdTabNav';
|
|
6
5
|
props: ITdTabNavConfig;
|
|
7
6
|
scrollBtn?: Span[];
|
|
@@ -5,15 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const utils_1 = require("@type-dom/utils");
|
|
6
6
|
const framework_1 = require("@type-dom/framework");
|
|
7
7
|
const svgs_1 = require("@type-dom/svgs");
|
|
8
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
9
8
|
const var_1 = require("../../../styles/var");
|
|
9
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
10
10
|
const td_tabs_style_1 = require("./td-tabs.style");
|
|
11
11
|
const td_tab_bar_class_1 = require("./td-tab-bar.class");
|
|
12
|
-
|
|
13
|
-
class TdTabNav extends ui_abstract_1.UI {
|
|
12
|
+
class TdTabNav extends framework_1.TypeDiv {
|
|
14
13
|
constructor(params = {}) {
|
|
15
14
|
var _a, _b;
|
|
16
|
-
super(
|
|
15
|
+
super();
|
|
17
16
|
this.tabs = [];
|
|
18
17
|
this.className = 'TdTabNav';
|
|
19
18
|
this.attr.addName('td-tab-nav-wrap');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdTabPaneConfig } from './td-tab-pane.interface';
|
|
3
3
|
import { TdTabs } from './td-tabs.class';
|
|
4
4
|
import { ITabPaneName } from './td-tabs.interface';
|
|
5
|
-
export interface ITdTabNav extends
|
|
5
|
+
export interface ITdTabNav extends ITypeDiv {
|
|
6
6
|
className: 'TdTabNav';
|
|
7
7
|
}
|
|
8
|
-
export interface ITdTabNavConfig extends
|
|
8
|
+
export interface ITdTabNavConfig extends ITypeConfig {
|
|
9
9
|
rootTabs?: TdTabs;
|
|
10
10
|
panes?: ITdTabPaneConfig[];
|
|
11
11
|
currentName?: string | number;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdTabPane, ITdTabPaneConfig } from './td-tab-pane.interface';
|
|
3
|
-
export declare class TdTabPane extends
|
|
3
|
+
export declare class TdTabPane extends TypeDiv implements ITdTabPane {
|
|
4
4
|
className: 'TdTabPane';
|
|
5
5
|
props: ITdTabPaneConfig;
|
|
6
6
|
isClosable?: boolean;
|
|
7
7
|
active: boolean;
|
|
8
8
|
shouldBeRender: boolean;
|
|
9
|
-
private panel?;
|
|
10
9
|
private loaded;
|
|
11
10
|
constructor(params?: ITdTabPaneConfig);
|
|
12
11
|
setActive(active: boolean): void;
|
|
@@ -2,39 +2,35 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdTabPane = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
|
|
6
|
-
class TdTabPane extends ui_abstract_1.UI {
|
|
5
|
+
class TdTabPane extends framework_1.TypeDiv {
|
|
7
6
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
7
|
+
super();
|
|
8
|
+
// this.useTag('fragment');
|
|
9
9
|
this.className = 'TdTabPane';
|
|
10
10
|
this.isClosable = params === null || params === void 0 ? void 0 : params.closable;
|
|
11
11
|
this.active = false;
|
|
12
12
|
this.loaded = false; // params?.loaded;
|
|
13
13
|
this.shouldBeRender = !(params === null || params === void 0 ? void 0 : params.lazy) || this.loaded || this.active;
|
|
14
14
|
if (this.shouldBeRender) {
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
styleObj: {
|
|
21
|
-
display: !this.active ? 'block' : 'none',
|
|
22
|
-
},
|
|
15
|
+
this.attr.addObj({
|
|
16
|
+
role: 'tab-panel',
|
|
17
|
+
});
|
|
18
|
+
this.style.addObj({
|
|
19
|
+
display: !this.active ? 'block' : 'none',
|
|
23
20
|
});
|
|
24
21
|
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
25
|
-
this.
|
|
22
|
+
this.slotChild(params.slot);
|
|
26
23
|
}
|
|
27
|
-
this.addChild(this
|
|
24
|
+
// this.addChild(this);
|
|
28
25
|
}
|
|
29
26
|
this.props = this.useParams(params);
|
|
30
27
|
}
|
|
31
28
|
setActive(active) {
|
|
32
|
-
var _a, _b;
|
|
33
29
|
if (active) {
|
|
34
|
-
|
|
30
|
+
this === null || this === void 0 ? void 0 : this.style.show();
|
|
35
31
|
}
|
|
36
32
|
else {
|
|
37
|
-
|
|
33
|
+
this === null || this === void 0 ? void 0 : this.style.hide();
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdTabPane extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ITdTabPane extends ITypeDiv {
|
|
4
3
|
className: 'TdTabPane';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdTabPaneConfig extends
|
|
5
|
+
export interface ITdTabPaneConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description title of the tab
|
|
9
8
|
* default: '',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdTabPaneConfig } from './td-tab-pane.interface';
|
|
3
3
|
import { ITabPaneName, ITdTabs, ITdTabsConfig } from './td-tabs.interface';
|
|
4
4
|
import { TdTabNav } from './td-tab-nav.class';
|
|
5
|
-
export declare class TdTabs extends
|
|
5
|
+
export declare class TdTabs extends TypeDiv implements ITdTabs {
|
|
6
6
|
className: 'TdTabs';
|
|
7
7
|
props: ITdTabsConfig;
|
|
8
8
|
currentName: ITabPaneName;
|