@type-dom/ui 0.0.10 → 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/package.json +3 -4
- 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 +21 -18
- 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 +8 -7
- 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 +2 -0
- package/src/components/feedback/index.js +3 -1
- 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 +2 -3
- package/src/components/feedback/td-loading/td-loading.class.js +21 -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-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 +165 -12
- 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-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/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 +1 -15
- package/src/styles/var.js +6 -16
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Input } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Input, TypeDiv } from '@type-dom/framework';
|
|
3
2
|
import { ITdSwitch, ITdSwitchConfig } from './td-switch.interface';
|
|
4
|
-
export declare class TdSwitch extends
|
|
3
|
+
export declare class TdSwitch extends TypeDiv implements ITdSwitch {
|
|
5
4
|
className: 'TdSwitch';
|
|
6
5
|
props: ITdSwitchConfig;
|
|
7
6
|
input: Input;
|
|
@@ -3,17 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdSwitch = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
6
|
const var_1 = require("../../../styles/var");
|
|
8
7
|
const event_1 = require("../../../constants/event");
|
|
9
8
|
const td_switch_core_1 = require("./widget/td-switch-core");
|
|
10
9
|
const td_switch_left_1 = require("./widget/td-switch-left");
|
|
11
10
|
const td_switch_right_1 = require("./widget/td-switch-right");
|
|
12
11
|
const td_switch_style_1 = require("./td-switch.style");
|
|
13
|
-
class TdSwitch extends
|
|
12
|
+
class TdSwitch extends framework_1.TypeDiv {
|
|
14
13
|
constructor(params = {}) {
|
|
15
14
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
16
|
-
super(
|
|
15
|
+
super();
|
|
17
16
|
this.className = 'TdSwitch';
|
|
18
17
|
this.style.addObj({
|
|
19
18
|
display: 'inline-flex',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeSvgSvg } from '@type-dom/framework';
|
|
3
2
|
import { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event';
|
|
4
|
-
export interface ITdSwitch extends
|
|
3
|
+
export interface ITdSwitch extends ITypeDiv {
|
|
5
4
|
className: 'TdSwitch';
|
|
6
5
|
}
|
|
7
|
-
export interface ITdSwitchConfig extends
|
|
6
|
+
export interface ITdSwitchConfig extends ITypeConfig {
|
|
8
7
|
/**
|
|
9
8
|
* @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type
|
|
10
9
|
* default: false
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TypeNode } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { TypeDiv, TypeNode } from '@type-dom/framework';
|
|
3
2
|
import { ITdAffix, ITdAffixConfig } from './td-affix.interface';
|
|
4
3
|
import { IStyle } from '@type-dom/css-type';
|
|
5
|
-
export declare class TdAffix extends
|
|
4
|
+
export declare class TdAffix extends TypeDiv implements ITdAffix {
|
|
6
5
|
className: 'TdAffix';
|
|
7
6
|
props: ITdAffixConfig;
|
|
8
7
|
private affix;
|
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdAffix = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
-
|
|
7
|
-
class TdAffix extends ui_abstract_1.UI {
|
|
6
|
+
class TdAffix extends framework_1.TypeDiv {
|
|
8
7
|
constructor(params = {}) {
|
|
9
|
-
super(
|
|
8
|
+
super();
|
|
10
9
|
this.onScroll = () => {
|
|
11
10
|
console.log('this.scrollContainer scroll . ');
|
|
12
11
|
// if (this.fixed) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdAffix extends IUI {
|
|
1
|
+
import { IJsonData, ITypeConfig, ITypeDiv, XProxy } from '@type-dom/framework';
|
|
2
|
+
export interface ITdAffix extends ITypeDiv {
|
|
4
3
|
className: 'TdAffix';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdAffixConfig extends
|
|
5
|
+
export interface ITdAffixConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description affix element zIndex value
|
|
9
8
|
* default: 100,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdAnchorLink, ITdAnchorLinkConfig } from './td-anchor-link.interface';
|
|
3
|
-
export declare class TdAnchorLink extends
|
|
3
|
+
export declare class TdAnchorLink extends TypeDiv implements ITdAnchorLink {
|
|
4
4
|
className: 'TdAnchorLink';
|
|
5
5
|
private href;
|
|
6
6
|
private list?;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdAnchorLink = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
|
|
6
|
-
class TdAnchorLink extends ui_abstract_1.UI {
|
|
5
|
+
class TdAnchorLink extends framework_1.TypeDiv {
|
|
7
6
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
7
|
+
super();
|
|
9
8
|
this.className = 'TdAnchorLink';
|
|
10
9
|
this.href = new framework_1.A({
|
|
11
10
|
text: (params === null || params === void 0 ? void 0 : params.title) || '',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdAnchorLink extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ITdAnchorLink extends ITypeDiv {
|
|
4
3
|
className: 'TdAnchorLink';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdAnchorLinkConfig extends
|
|
5
|
+
export interface ITdAnchorLinkConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description the text content of the anchor link
|
|
9
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdAnchor, ITdAnchorConfig } from './td-anchor.interface';
|
|
3
|
-
export declare class TdAnchor extends
|
|
3
|
+
export declare class TdAnchor extends TypeDiv implements ITdAnchor {
|
|
4
4
|
className: 'TdAnchor';
|
|
5
5
|
props: ITdAnchorConfig;
|
|
6
6
|
private marker?;
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdAnchor = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const td_anchor_style_1 = require("./td-anchor.style");
|
|
7
6
|
const td_anchor_function_1 = require("./td-anchor.function");
|
|
8
|
-
class TdAnchor extends
|
|
7
|
+
class TdAnchor extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
9
|
var _a, _b, _c, _d;
|
|
11
|
-
super(
|
|
10
|
+
super();
|
|
12
11
|
this.className = 'TdAnchor';
|
|
13
|
-
this.
|
|
12
|
+
this.attr.setObj({
|
|
13
|
+
name: 'td-anchor'
|
|
14
|
+
});
|
|
15
|
+
this.style.setObj({
|
|
14
16
|
position: 'relative',
|
|
15
17
|
// background-color: getCssVar('anchor-bg-color')
|
|
16
18
|
backgroundColor: td_anchor_style_1.$anchor.bgColor.default
|
|
@@ -7,7 +7,7 @@ const currentAnchor = (0, framework_1.createProxy)(null);
|
|
|
7
7
|
const containerEl = (0, framework_1.createProxy)(null); // ref<HTMLElement | Window>()
|
|
8
8
|
const links = {};
|
|
9
9
|
let isScrolling = false;
|
|
10
|
-
|
|
10
|
+
const currentScrollTop = 0;
|
|
11
11
|
const addLink = (state) => {
|
|
12
12
|
links[state.href] = state.el;
|
|
13
13
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdAnchor extends
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
|
+
export interface ITdAnchor extends ITypeDiv {
|
|
3
3
|
className: 'TdAnchor';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdAnchorConfig extends
|
|
5
|
+
export interface ITdAnchorConfig extends ITypeConfig {
|
|
6
6
|
/**
|
|
7
7
|
* @description scroll container
|
|
8
8
|
*/
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { TypeNode } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Transition, TypeFragment, TypeNode } from '@type-dom/framework';
|
|
3
2
|
import { ITdBackTop, ITdBackTopConfig } from './td-backtop.interface';
|
|
4
|
-
export declare class TdBackTop extends
|
|
3
|
+
export declare class TdBackTop extends TypeFragment implements ITdBackTop {
|
|
5
4
|
className: 'TdBackTop';
|
|
5
|
+
content: Transition;
|
|
6
6
|
props: ITdBackTopConfig;
|
|
7
7
|
static initCalled: boolean;
|
|
8
8
|
private container;
|
|
9
|
-
private
|
|
9
|
+
private target;
|
|
10
10
|
private visible;
|
|
11
|
-
private transition;
|
|
12
11
|
private division;
|
|
13
12
|
constructor(params?: ITdBackTopConfig);
|
|
14
13
|
mounted(): void;
|
|
15
14
|
destroy(root?: TypeNode): void;
|
|
16
15
|
throttleScroll: () => void;
|
|
17
|
-
handleScroll: () => void;
|
|
16
|
+
handleScroll: (target?: any, event?: MouseEvent) => void;
|
|
18
17
|
handleClick(): void;
|
|
19
18
|
}
|
|
@@ -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',
|