@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
|
@@ -4,12 +4,11 @@ exports.TdImageViewer = void 0;
|
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const utils_1 = require("@type-dom/utils");
|
|
6
6
|
const svgs_1 = require("@type-dom/svgs");
|
|
7
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
8
7
|
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
9
8
|
const td_image_viewer_style_1 = require("./td-image-viewer.style");
|
|
10
|
-
class TdImageViewer extends
|
|
9
|
+
class TdImageViewer extends framework_1.TypeTransition {
|
|
11
10
|
constructor(params = {}) {
|
|
12
|
-
super(
|
|
11
|
+
super();
|
|
13
12
|
this.loading = false;
|
|
14
13
|
this.className = 'TdImageViewer';
|
|
15
14
|
this.transform = {
|
|
@@ -35,15 +34,17 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
35
34
|
})
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
|
-
this.
|
|
37
|
+
this.viewMode = this.modes.CONTAIN;
|
|
39
38
|
this.wrapper = new framework_1.Div();
|
|
40
|
-
this.transition =
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
// this.transition = new Transition({
|
|
40
|
+
// slot: this.wrapper,
|
|
41
|
+
// });
|
|
42
|
+
this.setContent(this.wrapper);
|
|
43
|
+
// this.teleport = new Teleport({
|
|
44
|
+
// to: document.body,
|
|
45
|
+
// });
|
|
46
|
+
// this.teleport.addChild(this.transition);
|
|
47
|
+
// this.addChild(this.transition);
|
|
47
48
|
// this.mount(document.body);
|
|
48
49
|
// this.attr.addName('wrapper');
|
|
49
50
|
// todo transition 如何设置样式 ??? developing ......
|
|
@@ -59,8 +60,9 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
59
60
|
name: 'mask',
|
|
60
61
|
events: {
|
|
61
62
|
click: (evt, element) => {
|
|
63
|
+
var _a;
|
|
62
64
|
//
|
|
63
|
-
element === null || element === void 0 ? void 0 : element.style.hide();
|
|
65
|
+
(_a = element === null || element === void 0 ? void 0 : element.style) === null || _a === void 0 ? void 0 : _a.hide();
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
}),
|
|
@@ -72,7 +74,8 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
72
74
|
top: '40px', right: '40px', width: '40px', height: '40px', fontSize: '40px' }),
|
|
73
75
|
events: {
|
|
74
76
|
click: (evt, element) => {
|
|
75
|
-
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = element === null || element === void 0 ? void 0 : element.style) === null || _a === void 0 ? void 0 : _a.hide();
|
|
76
79
|
}
|
|
77
80
|
},
|
|
78
81
|
childNodes: [
|
|
@@ -142,7 +145,7 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
142
145
|
new td_icon_class_1.TdIcon({
|
|
143
146
|
// ???
|
|
144
147
|
// svgObj: this.mode.icon,
|
|
145
|
-
slot: this.
|
|
148
|
+
slot: this.viewMode.icon,
|
|
146
149
|
events: {
|
|
147
150
|
click: (evt, ele) => {
|
|
148
151
|
this.toggleMode();
|
|
@@ -207,7 +210,7 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
207
210
|
transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
|
|
208
211
|
transition: enableTransition ? 'transform .3s' : ''
|
|
209
212
|
};
|
|
210
|
-
if (this.
|
|
213
|
+
if (this.viewMode.name === this.modes.CONTAIN.name) {
|
|
211
214
|
style.maxWidth = style.maxHeight = '100%';
|
|
212
215
|
}
|
|
213
216
|
return style;
|
|
@@ -217,10 +220,10 @@ class TdImageViewer extends ui_abstract_1.UI {
|
|
|
217
220
|
return;
|
|
218
221
|
const modeNames = (0, utils_1.keysOf)(this.modes);
|
|
219
222
|
const modeValues = Object.values(this.modes);
|
|
220
|
-
const currentMode = this.
|
|
223
|
+
const currentMode = this.viewMode.name;
|
|
221
224
|
const index = modeValues.findIndex((i) => i.name === currentMode);
|
|
222
225
|
const nextIndex = (index + 1) % modeNames.length;
|
|
223
|
-
this.
|
|
226
|
+
this.viewMode = this.modes[modeNames[nextIndex]];
|
|
224
227
|
this.reset();
|
|
225
228
|
}
|
|
226
229
|
reset() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
1
|
import { TdIcon } from '../../basic/td-icon/td-icon.class';
|
|
3
|
-
|
|
2
|
+
import { ITypeElement, ITypeTransitionConfig } from '@type-dom/framework';
|
|
3
|
+
export interface ITdImageViewer extends ITypeElement {
|
|
4
4
|
className: 'TdImageViewer';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdImageViewerConfig extends
|
|
6
|
+
export interface ITdImageViewerConfig extends ITypeTransitionConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description preview link list.
|
|
9
9
|
* default: () => mutable([] as const),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdResult, ITdResultConfig } from './td-result.interface';
|
|
3
|
-
export declare class TdResult extends
|
|
3
|
+
export declare class TdResult extends TypeDiv implements ITdResult {
|
|
4
4
|
className: 'TdResult';
|
|
5
5
|
props: ITdResultConfig;
|
|
6
6
|
constructor(params?: ITdResultConfig);
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdResult = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const td_result_style_1 = require("./td-result.style");
|
|
7
6
|
const td_result_constant_1 = require("./td-result.constant");
|
|
8
|
-
class TdResult extends
|
|
7
|
+
class TdResult extends framework_1.TypeDiv {
|
|
9
8
|
// private iconSlot?: SlotNode;
|
|
10
9
|
// private titleSlot?: SlotNode;
|
|
11
10
|
constructor(params = {}) {
|
|
12
11
|
var _a, _b, _c, _d, _e, _f;
|
|
13
|
-
super(
|
|
12
|
+
super();
|
|
14
13
|
this.className = 'TdResult';
|
|
15
14
|
this.attr.addName('td-result');
|
|
16
15
|
this.style.addObj({
|
|
@@ -24,6 +23,7 @@ class TdResult extends ui_abstract_1.UI {
|
|
|
24
23
|
padding: td_result_style_1.$result.padding
|
|
25
24
|
});
|
|
26
25
|
// this.iconSlot = new SlotNode('icon');
|
|
26
|
+
this.useSlots(params);
|
|
27
27
|
this.addChild(new framework_1.Div({
|
|
28
28
|
name: 'icon',
|
|
29
29
|
childNodes: [this.getSlotNode('icon')]
|
|
@@ -55,6 +55,7 @@ class TdResult extends ui_abstract_1.UI {
|
|
|
55
55
|
childNodes: [this.getSlotNode('subTitle')],
|
|
56
56
|
}));
|
|
57
57
|
if ((_e = params.slots) === null || _e === void 0 ? void 0 : _e.subTitle) {
|
|
58
|
+
//
|
|
58
59
|
}
|
|
59
60
|
else {
|
|
60
61
|
this.getSlotNode('subTitle').addSlot(new framework_1.P({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdResult extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ITdResult extends ITypeDiv {
|
|
4
3
|
className: 'TdResult';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdResultConfig extends
|
|
5
|
+
export interface ITdResultConfig extends ITypeConfig {
|
|
7
6
|
/**
|
|
8
7
|
* @description title of result
|
|
9
8
|
* default: '',
|
|
@@ -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 { ITdSegmented, ITdSegmentedConfig, Option } from './td-segmented.interface';
|
|
4
|
-
export declare class TdSegmented extends
|
|
3
|
+
export declare class TdSegmented extends TypeDiv implements ITdSegmented {
|
|
5
4
|
className: 'TdSegmented';
|
|
6
5
|
props: ITdSegmentedConfig;
|
|
7
6
|
private group;
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdSegmented = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const event_1 = require("../../../constants/event");
|
|
7
6
|
const td_segmented_style_1 = require("./td-segmented.style");
|
|
8
|
-
class TdSegmented extends
|
|
7
|
+
class TdSegmented extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdSegmented';
|
|
12
11
|
(0, td_segmented_style_1.useStyle)(params);
|
|
13
|
-
this.attr.addName('td-segmented');
|
|
14
|
-
this.style.addObj(td_segmented_style_1.$segmentedStyle);
|
|
15
12
|
this.attr.addObj({
|
|
13
|
+
name: 'td-segmented',
|
|
16
14
|
role: 'radiogroup',
|
|
17
15
|
ariaLabel: 'Segmented',
|
|
18
16
|
ariaLabelledby: 'Segmented'
|
|
19
17
|
});
|
|
18
|
+
this.style.addObj(td_segmented_style_1.$segmentedStyle);
|
|
20
19
|
this.modelValue = params === null || params === void 0 ? void 0 : params.modelValue;
|
|
21
20
|
this.disabled = params === null || params === void 0 ? void 0 : params.disabled; // todo form disabled
|
|
22
21
|
this.group = new framework_1.Div({
|
|
@@ -38,7 +37,7 @@ class TdSegmented extends ui_abstract_1.UI {
|
|
|
38
37
|
const options = (params === null || params === void 0 ? void 0 : params.options) || [];
|
|
39
38
|
const labels = [];
|
|
40
39
|
options.forEach((option, index) => {
|
|
41
|
-
var _a;
|
|
40
|
+
var _a, _b;
|
|
42
41
|
const label = new framework_1.Label({
|
|
43
42
|
name: 'td-segmented-item',
|
|
44
43
|
styleObj: td_segmented_style_1.$segmentedItemStyle,
|
|
@@ -62,13 +61,13 @@ class TdSegmented extends ui_abstract_1.UI {
|
|
|
62
61
|
});
|
|
63
62
|
if (typeof option === 'object' && option.slot) {
|
|
64
63
|
label.addChild(option.slot);
|
|
65
|
-
option.slot.style.addObj({
|
|
64
|
+
(_a = option.slot.style) === null || _a === void 0 ? void 0 : _a.addObj({
|
|
66
65
|
zIndex: 1 // todo ????? 否则显示不出来
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
68
|
else {
|
|
70
69
|
label.addChild(new framework_1.Div({
|
|
71
|
-
text: (
|
|
70
|
+
text: (_b = this.getLabel(option)) === null || _b === void 0 ? void 0 : _b.toString(),
|
|
72
71
|
name: 'item-label',
|
|
73
72
|
styleObj: td_segmented_style_1.$segmentedItemLabelStyle
|
|
74
73
|
}));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TypeElement } from '@type-dom/framework';
|
|
2
|
-
import { IUI } from '../../../ui/ui.interface';
|
|
1
|
+
import { ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
3
2
|
import { IAriaConfig } from '../../../aria';
|
|
4
3
|
import { ISize } from '../../../styles/size';
|
|
5
|
-
export interface ITdSegmented extends
|
|
4
|
+
export interface ITdSegmented extends ITypeDiv {
|
|
6
5
|
className: 'TdSegmented';
|
|
7
6
|
}
|
|
8
7
|
export type Option = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Div, Span, TypeElement } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Div, Span, TypeDiv, TypeElement } from '@type-dom/framework';
|
|
3
2
|
import { ITdStatisticConfig, ITdStatisticAbstract } from './td-statistic.interface';
|
|
4
3
|
import { Dayjs } from 'dayjs';
|
|
5
|
-
export declare abstract class TdStatisticAbstract extends
|
|
4
|
+
export declare abstract class TdStatisticAbstract extends TypeDiv implements ITdStatisticAbstract {
|
|
6
5
|
abstract className: 'TdStatistic' | 'TdCountDown';
|
|
7
6
|
head?: Div;
|
|
8
|
-
|
|
7
|
+
mainContent: Div;
|
|
9
8
|
prefix?: TypeElement;
|
|
10
9
|
number: Span;
|
|
11
10
|
suffix?: TypeElement;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdStatisticAbstract = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const utils_1 = require("@type-dom/utils");
|
|
6
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
6
|
const td_statistic_style_1 = require("./td-statistic.style");
|
|
8
|
-
class TdStatisticAbstract extends
|
|
7
|
+
class TdStatisticAbstract extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
9
|
var _a, _b, _c, _d;
|
|
11
|
-
super(
|
|
12
|
-
|
|
10
|
+
super();
|
|
11
|
+
console.warn('TdStatisticAbstract constructor . ');
|
|
12
|
+
if ((params === null || params === void 0 ? void 0 : params.title) || ((_a = params.slots) === null || _a === void 0 ? void 0 : _a.title)) {
|
|
13
13
|
this.head = new framework_1.Div({
|
|
14
14
|
name: 'head',
|
|
15
15
|
styleObj: {
|
|
@@ -26,12 +26,13 @@ class TdStatisticAbstract extends ui_abstract_1.UI {
|
|
|
26
26
|
if (params === null || params === void 0 ? void 0 : params.title) {
|
|
27
27
|
this.head.addChild(new framework_1.TextNode(params.title));
|
|
28
28
|
}
|
|
29
|
-
if ((
|
|
30
|
-
|
|
29
|
+
else if ((_b = params.slots) === null || _b === void 0 ? void 0 : _b.title) {
|
|
30
|
+
console.warn('params.slots.title is ', params.slots.title);
|
|
31
|
+
this.head.addChild(params.slots.title);
|
|
31
32
|
}
|
|
32
33
|
this.addChild(this.head);
|
|
33
34
|
}
|
|
34
|
-
this.
|
|
35
|
+
this.mainContent = new framework_1.Div({
|
|
35
36
|
name: 'content',
|
|
36
37
|
styleObj: {
|
|
37
38
|
// font-weight: getCssVar('statistic-content-font-weight');
|
|
@@ -42,10 +43,10 @@ class TdStatisticAbstract extends ui_abstract_1.UI {
|
|
|
42
43
|
color: td_statistic_style_1.$statistic.contentColor
|
|
43
44
|
}
|
|
44
45
|
});
|
|
46
|
+
this.addChild(this.mainContent);
|
|
45
47
|
if (params === null || params === void 0 ? void 0 : params.valueStyle) {
|
|
46
|
-
this.
|
|
48
|
+
this.mainContent.style.addObj(params.valueStyle);
|
|
47
49
|
}
|
|
48
|
-
this.addChild(this.content);
|
|
49
50
|
if (params === null || params === void 0 ? void 0 : params.prefix) {
|
|
50
51
|
this.prefix = new framework_1.Div({
|
|
51
52
|
name: 'prefix',
|
|
@@ -59,11 +60,11 @@ class TdStatisticAbstract extends ui_abstract_1.UI {
|
|
|
59
60
|
})
|
|
60
61
|
]
|
|
61
62
|
});
|
|
62
|
-
this.
|
|
63
|
+
this.mainContent.addChild(this.prefix);
|
|
63
64
|
}
|
|
64
65
|
if ((_c = params === null || params === void 0 ? void 0 : params.slots) === null || _c === void 0 ? void 0 : _c.prefix) {
|
|
65
66
|
this.prefix = params.slots.prefix;
|
|
66
|
-
this.
|
|
67
|
+
this.mainContent.addChild(params.slots.prefix);
|
|
67
68
|
}
|
|
68
69
|
this.number = new framework_1.Span({
|
|
69
70
|
text: this.formatValue((params === null || params === void 0 ? void 0 : params.value) || 0),
|
|
@@ -71,7 +72,7 @@ class TdStatisticAbstract extends ui_abstract_1.UI {
|
|
|
71
72
|
display: 'inline-block'
|
|
72
73
|
}
|
|
73
74
|
});
|
|
74
|
-
this.
|
|
75
|
+
this.mainContent.addChild(this.number);
|
|
75
76
|
if (params === null || params === void 0 ? void 0 : params.suffix) {
|
|
76
77
|
this.suffix = new framework_1.Div({
|
|
77
78
|
name: 'suffix',
|
|
@@ -85,11 +86,11 @@ class TdStatisticAbstract extends ui_abstract_1.UI {
|
|
|
85
86
|
})
|
|
86
87
|
]
|
|
87
88
|
});
|
|
88
|
-
this.
|
|
89
|
+
this.mainContent.addChild(this.suffix);
|
|
89
90
|
}
|
|
90
91
|
if ((_d = params === null || params === void 0 ? void 0 : params.slots) === null || _d === void 0 ? void 0 : _d.suffix) {
|
|
91
92
|
this.suffix = params.slots.suffix;
|
|
92
|
-
this.
|
|
93
|
+
this.mainContent.addChild(params.slots.suffix);
|
|
93
94
|
}
|
|
94
95
|
this.props = this.useParams(params);
|
|
95
96
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { TypeElement } from '@type-dom/framework';
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
2
|
import { IStyle } from '@type-dom/css-type';
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
|
-
|
|
5
|
-
export interface ITdStatisticAbstract extends IUI {
|
|
4
|
+
export interface ITdStatisticAbstract extends ITypeDiv {
|
|
6
5
|
className: 'TdStatistic' | 'TdCountDown';
|
|
7
6
|
}
|
|
8
7
|
export interface ITdStatistic extends ITdStatisticAbstract {
|
|
9
8
|
className: 'TdStatistic';
|
|
10
9
|
}
|
|
11
|
-
export interface ITdStatisticConfig extends
|
|
10
|
+
export interface ITdStatisticConfig extends ITypeConfig {
|
|
12
11
|
/**
|
|
13
12
|
* @description Setting the decimal point
|
|
14
13
|
* default: '.',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeSpan } from '@type-dom/framework';
|
|
2
2
|
import { ITdTag, ITdTagConfig } from './td-tag.interface';
|
|
3
|
-
export declare class TdTag extends
|
|
3
|
+
export declare class TdTag extends TypeSpan implements ITdTag {
|
|
4
4
|
className: 'TdTag';
|
|
5
5
|
props: ITdTagConfig;
|
|
6
|
-
private content;
|
|
7
6
|
private closeIcon?;
|
|
8
|
-
private
|
|
7
|
+
private tagContent;
|
|
9
8
|
constructor(params?: ITdTagConfig);
|
|
10
9
|
handleClose(): void;
|
|
11
10
|
handleClick(): void;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdTag = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const svgs_1 = require("@type-dom/svgs");
|
|
6
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
|
-
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
8
6
|
const var_1 = require("../../../styles/var");
|
|
7
|
+
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
9
8
|
const td_tag_style_1 = require("./td-tag.style");
|
|
10
|
-
class TdTag extends
|
|
9
|
+
class TdTag extends framework_1.TypeSpan {
|
|
11
10
|
constructor(params = {}) {
|
|
12
|
-
super(
|
|
11
|
+
super();
|
|
13
12
|
this.className = 'TdTag';
|
|
14
13
|
this.attr.addName('td-tag');
|
|
15
14
|
(0, td_tag_style_1.useType)();
|
|
@@ -58,15 +57,14 @@ class TdTag extends ui_abstract_1.UI {
|
|
|
58
57
|
// padding-right: map.get($tag-icon-span-gap, 'default') - $border-width; // isClosable
|
|
59
58
|
// paddingRight: params?.closable ? parseFloat($tagIconSpanGap.default) - parseFloat($borderWidth) + 'px' : ''
|
|
60
59
|
});
|
|
61
|
-
this.
|
|
60
|
+
this.tagContent = new framework_1.Span({
|
|
62
61
|
// add content slot
|
|
63
62
|
name: 'content'
|
|
64
63
|
});
|
|
65
|
-
this.addChild(this.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
64
|
+
this.addChild(this.tagContent);
|
|
65
|
+
// this.useSlots(params);
|
|
66
|
+
// this.tagContent.addChild(this.getSlotNode());
|
|
67
|
+
this.tagContent.slotChild(params === null || params === void 0 ? void 0 : params.slot);
|
|
70
68
|
// style样式应该在 style类中处理, useConfig useType useSize ....
|
|
71
69
|
if (params === null || params === void 0 ? void 0 : params.hit) {
|
|
72
70
|
this.style.addObj({
|
|
@@ -91,7 +89,7 @@ class TdTag extends ui_abstract_1.UI {
|
|
|
91
89
|
paddingRight: parseFloat(td_tag_style_1.$tagIconSpanGap.default) - parseFloat(var_1.$borderWidth) + 'px'
|
|
92
90
|
});
|
|
93
91
|
this.closeIcon = new td_icon_class_1.TdIcon({
|
|
94
|
-
|
|
92
|
+
slot: new svgs_1.ElCloseSvg(),
|
|
95
93
|
styleObj: {
|
|
96
94
|
flexShrink: 0,
|
|
97
95
|
// color: getCssVar('tag', 'text-color'),
|
|
@@ -108,17 +106,19 @@ class TdTag extends ui_abstract_1.UI {
|
|
|
108
106
|
},
|
|
109
107
|
events: {
|
|
110
108
|
mouseenter: (evt, element) => {
|
|
109
|
+
var _a;
|
|
111
110
|
// console.log('mouseenter . ');
|
|
112
111
|
evt === null || evt === void 0 ? void 0 : evt.stopPropagation();
|
|
113
|
-
element === null || element === void 0 ? void 0 : element.style.setObj({
|
|
112
|
+
(_a = element === null || element === void 0 ? void 0 : element.style) === null || _a === void 0 ? void 0 : _a.setObj({
|
|
114
113
|
backgroundColor: td_tag_style_1.$tagTypes[type].hoverColor,
|
|
115
114
|
color: var_1.$colorWhite
|
|
116
115
|
});
|
|
117
116
|
},
|
|
118
117
|
mouseleave: (evt, element) => {
|
|
118
|
+
var _a;
|
|
119
119
|
// console.log('mouseleave . ');
|
|
120
120
|
evt === null || evt === void 0 ? void 0 : evt.stopPropagation();
|
|
121
|
-
element === null || element === void 0 ? void 0 : element.style.setObj({
|
|
121
|
+
(_a = element === null || element === void 0 ? void 0 : element.style) === null || _a === void 0 ? void 0 : _a.setObj({
|
|
122
122
|
backgroundColor: td_tag_style_1.$tagTypes[type].bgColor,
|
|
123
123
|
color: td_tag_style_1.$tagTypes[type].textColor
|
|
124
124
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITypeConfig, ITypeSpan } from '@type-dom/framework';
|
|
2
2
|
import { ISize } from '../../../styles/size';
|
|
3
3
|
import { IType } from '../../../styles';
|
|
4
|
-
export interface ITdTag extends
|
|
4
|
+
export interface ITdTag extends ITypeSpan {
|
|
5
5
|
className: 'TdTag';
|
|
6
6
|
}
|
|
7
|
-
export interface ITdTagConfig extends
|
|
7
|
+
export interface ITdTagConfig extends ITypeConfig {
|
|
8
8
|
/**
|
|
9
9
|
* @description type of Tag
|
|
10
10
|
* default: 'primary',
|
|
@@ -11,3 +11,5 @@ export { TdNotification } from './td-notification/td-notification.class';
|
|
|
11
11
|
export type * from './td-notification/td-notification.interface';
|
|
12
12
|
export { TdLoading } from './td-loading/td-loading.class';
|
|
13
13
|
export type * from './td-loading/td-loading.interface';
|
|
14
|
+
export { TdTooltip } from './td-tooltip/td-tooltip.class';
|
|
15
|
+
export type * from './td-tooltip/td-tooltip.interface';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// export { Dialog } from './dialog/dialog.class';
|
|
3
3
|
// export { MessageBox } from './message-box/message-box';
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.TdLoading = exports.TdNotification = exports.TdMessageBox = exports.TdMessage = exports.TdDialog = exports.TdAlert = void 0;
|
|
5
|
+
exports.TdTooltip = exports.TdLoading = exports.TdNotification = exports.TdMessageBox = exports.TdMessage = exports.TdDialog = exports.TdAlert = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
var td_alert_class_1 = require("./td-alert/td-alert.class");
|
|
8
8
|
Object.defineProperty(exports, "TdAlert", { enumerable: true, get: function () { return td_alert_class_1.TdAlert; } });
|
|
@@ -18,3 +18,5 @@ var td_notification_class_1 = require("./td-notification/td-notification.class")
|
|
|
18
18
|
Object.defineProperty(exports, "TdNotification", { enumerable: true, get: function () { return td_notification_class_1.TdNotification; } });
|
|
19
19
|
var td_loading_class_1 = require("./td-loading/td-loading.class");
|
|
20
20
|
Object.defineProperty(exports, "TdLoading", { enumerable: true, get: function () { return td_loading_class_1.TdLoading; } });
|
|
21
|
+
var td_tooltip_class_1 = require("./td-tooltip/td-tooltip.class");
|
|
22
|
+
Object.defineProperty(exports, "TdTooltip", { enumerable: true, get: function () { return td_tooltip_class_1.TdTooltip; } });
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeTransition } from '@type-dom/framework';
|
|
2
2
|
import { ITdAlert, ITdAlertConfig } from './td-alert.interface';
|
|
3
|
-
export declare class TdAlert extends
|
|
3
|
+
export declare class TdAlert extends TypeTransition implements ITdAlert {
|
|
4
4
|
className: 'TdAlert';
|
|
5
5
|
props: ITdAlertConfig;
|
|
6
|
-
private transition;
|
|
7
6
|
private alertDiv;
|
|
8
7
|
private alertContent;
|
|
9
8
|
private alertTitle?;
|
|
@@ -3,37 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdAlert = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const svgs_1 = require("@type-dom/svgs");
|
|
6
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
6
|
const td_icon_class_1 = require("../../basic/td-icon/td-icon.class");
|
|
8
7
|
const td_alert_style_1 = require("./td-alert.style");
|
|
9
|
-
class TdAlert extends
|
|
8
|
+
class TdAlert extends framework_1.TypeTransition {
|
|
10
9
|
constructor(params = {}) {
|
|
11
|
-
super(
|
|
10
|
+
super();
|
|
12
11
|
this.className = 'TdAlert';
|
|
13
12
|
(0, td_alert_style_1.useStyle)(params);
|
|
14
13
|
this.alertDiv = new framework_1.Div({
|
|
15
14
|
attrObj: {
|
|
16
|
-
role: 'alert'
|
|
15
|
+
role: 'alert',
|
|
17
16
|
},
|
|
18
17
|
styleObj: td_alert_style_1.$alertStyle,
|
|
19
18
|
});
|
|
20
19
|
if (params === null || params === void 0 ? void 0 : params.styleObj) {
|
|
21
20
|
this.alertDiv.style.addObj(params.styleObj);
|
|
22
21
|
}
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
this.addChild(this.
|
|
22
|
+
// this.content = new Transition({
|
|
23
|
+
// name: 'td-alert-fade',
|
|
24
|
+
// slot: this.alertDiv,
|
|
25
|
+
// });
|
|
26
|
+
// this.addChild(this.content);
|
|
27
|
+
this.setContent(this.alertDiv);
|
|
28
28
|
const IconComponent = svgs_1.TypeComponentsMap[(params === null || params === void 0 ? void 0 : params.type) || 'info'];
|
|
29
29
|
if ((params === null || params === void 0 ? void 0 : params.showIcon) && IconComponent) {
|
|
30
30
|
this.alertDiv.addChild(new td_icon_class_1.TdIcon({
|
|
31
31
|
styleObj: td_alert_style_1.$alertIconStyle,
|
|
32
|
-
svgObj: new IconComponent()
|
|
32
|
+
svgObj: new IconComponent(),
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
35
|
this.alertContent = new framework_1.Div({
|
|
36
|
-
styleObj: td_alert_style_1.$alertContentStyle
|
|
36
|
+
styleObj: td_alert_style_1.$alertContentStyle,
|
|
37
37
|
});
|
|
38
38
|
this.alertDiv.addChild(this.alertContent);
|
|
39
39
|
this.addTitle(params);
|
|
@@ -45,7 +45,7 @@ class TdAlert extends ui_abstract_1.UI {
|
|
|
45
45
|
var _a, _b;
|
|
46
46
|
if ((params === null || params === void 0 ? void 0 : params.title) || ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.title)) {
|
|
47
47
|
this.alertTitle = new framework_1.Span({
|
|
48
|
-
styleObj: td_alert_style_1.$alertTitleStyle
|
|
48
|
+
styleObj: td_alert_style_1.$alertTitleStyle,
|
|
49
49
|
});
|
|
50
50
|
this.alertContent.addChild(this.alertTitle);
|
|
51
51
|
if ((_b = params.slots) === null || _b === void 0 ? void 0 : _b.title) {
|
|
@@ -60,7 +60,7 @@ class TdAlert extends ui_abstract_1.UI {
|
|
|
60
60
|
if ((params === null || params === void 0 ? void 0 : params.slot) || (params === null || params === void 0 ? void 0 : params.description)) {
|
|
61
61
|
this.alertDescription = new framework_1.P({
|
|
62
62
|
name: 'alert-description',
|
|
63
|
-
styleObj: td_alert_style_1.$alertDescriptionStyle
|
|
63
|
+
styleObj: td_alert_style_1.$alertDescriptionStyle,
|
|
64
64
|
});
|
|
65
65
|
this.alertContent.addChild(this.alertDescription);
|
|
66
66
|
if (params.slot) {
|
|
@@ -82,12 +82,13 @@ class TdAlert extends ui_abstract_1.UI {
|
|
|
82
82
|
events: {
|
|
83
83
|
click: () => {
|
|
84
84
|
var _a;
|
|
85
|
+
console.log('close text click . ');
|
|
85
86
|
if ((_a = params.emits) === null || _a === void 0 ? void 0 : _a.close) {
|
|
86
87
|
params.emits.close();
|
|
87
88
|
}
|
|
88
89
|
this.alertDiv.style.hide();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
},
|
|
91
92
|
}));
|
|
92
93
|
}
|
|
93
94
|
else {
|
|
@@ -97,12 +98,13 @@ class TdAlert extends ui_abstract_1.UI {
|
|
|
97
98
|
events: {
|
|
98
99
|
click: () => {
|
|
99
100
|
var _a;
|
|
101
|
+
console.log('close icon click . ');
|
|
100
102
|
if ((_a = params === null || params === void 0 ? void 0 : params.emits) === null || _a === void 0 ? void 0 : _a.close) {
|
|
101
103
|
params.emits.close();
|
|
102
104
|
}
|
|
103
105
|
this.alertDiv.style.hide();
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
+
},
|
|
107
|
+
},
|
|
106
108
|
}));
|
|
107
109
|
}
|
|
108
110
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdAlert extends
|
|
1
|
+
import { ITypeElement, ITypeTransitionConfig } from '@type-dom/framework';
|
|
2
|
+
export interface ITdAlert extends ITypeElement {
|
|
3
3
|
className: 'TdAlert';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdAlertConfig extends
|
|
5
|
+
export interface ITdAlertConfig extends ITypeTransitionConfig {
|
|
6
6
|
/**
|
|
7
7
|
* @description alert title.
|
|
8
8
|
* default: ''
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transition, TypeFragment } from '@type-dom/framework';
|
|
2
2
|
import { ITdDialog, ITdDialogConfig } from './td-dialog.interface';
|
|
3
|
-
export declare class TdDialog extends
|
|
3
|
+
export declare class TdDialog extends TypeFragment implements ITdDialog {
|
|
4
4
|
className: 'TdDialog';
|
|
5
|
+
content: Transition;
|
|
5
6
|
props: ITdDialogConfig;
|
|
6
|
-
private teleport;
|
|
7
7
|
private dialogContent;
|
|
8
8
|
private overlay;
|
|
9
9
|
constructor(params?: ITdDialogConfig);
|