@type-dom/ui 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -44
- package/package.json +4 -10
- package/src/aria.d.ts +2 -2
- package/src/components/basic/td-button/td-button.abstract.d.ts +5 -5
- package/src/components/basic/td-button/td-button.abstract.js +46 -42
- package/src/components/basic/td-button/td-button.interface.d.ts +3 -6
- package/src/components/basic/td-button/td-button.style.d.ts +16 -5
- package/src/components/basic/td-button/td-button.style.js +43 -17
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +3 -2
- package/src/components/basic/td-button-group/td-button-group.class.js +34 -37
- package/src/components/basic/td-button-group/td-button-group.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +2 -2
- package/src/components/basic/td-container/td-aside/td-aside.class.js +6 -5
- package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-container.class.d.ts +2 -3
- package/src/components/basic/td-container/td-container.class.js +9 -7
- package/src/components/basic/td-container/td-container.interface.d.ts +3 -4
- package/src/components/basic/td-container/td-container.js +3 -2
- package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +2 -2
- package/src/components/basic/td-container/td-footer/td-footer.class.js +4 -3
- package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-header/td-header.class.d.ts +2 -2
- package/src/components/basic/td-container/td-header/td-header.class.js +3 -3
- package/src/components/basic/td-container/td-header/td-header.interface.d.ts +3 -3
- package/src/components/basic/td-container/td-main/td-main.class.d.ts +4 -2
- package/src/components/basic/td-container/td-main/td-main.class.js +8 -5
- package/src/components/basic/td-container/td-main/td-main.interface.d.ts +3 -3
- package/src/components/basic/td-icon/td-icon.class.d.ts +4 -6
- package/src/components/basic/td-icon/td-icon.class.js +32 -29
- package/src/components/basic/td-icon/td-icon.interface.d.ts +3 -4
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +2 -3
- package/src/components/basic/td-layout/td-col/td-col.class.js +4 -4
- package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +3 -3
- package/src/components/basic/td-layout/td-row/td-row.class.d.ts +2 -2
- package/src/components/basic/td-layout/td-row/td-row.class.js +5 -4
- package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +3 -3
- package/src/components/basic/td-link/td-link.class.d.ts +2 -2
- package/src/components/basic/td-link/td-link.class.js +6 -10
- package/src/components/basic/td-link/td-link.interface.d.ts +3 -3
- package/src/components/basic/td-link/td-link.style.js +1 -1
- package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +2 -2
- package/src/components/basic/td-scrollbar/bar/bar.class.js +4 -4
- package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +3 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +4 -2
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +4 -3
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +3 -4
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +1 -1
- package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +2 -2
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +2 -3
- package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +3 -3
- package/src/components/basic/td-space/td-space.class.d.ts +2 -2
- package/src/components/basic/td-space/td-space.class.js +11 -5
- package/src/components/basic/td-space/td-space.interface.d.ts +3 -4
- package/src/components/basic/td-text/td-text.class.d.ts +4 -2
- package/src/components/basic/td-text/td-text.class.js +6 -4
- package/src/components/basic/td-text/td-text.interface.d.ts +3 -3
- package/src/components/data/td-avatar/td-avatar.class.d.ts +2 -2
- package/src/components/data/td-avatar/td-avatar.class.js +19 -25
- package/src/components/data/td-avatar/td-avatar.interface.d.ts +3 -3
- package/src/components/data/td-avatar/td-avatar.style.d.ts +2 -0
- package/src/components/data/td-avatar/td-avatar.style.js +19 -1
- package/src/components/data/td-badge/td-badge.class.d.ts +2 -2
- package/src/components/data/td-badge/td-badge.class.js +4 -4
- package/src/components/data/td-badge/td-badge.interface.d.ts +3 -3
- package/src/components/data/td-card/td-card.class.d.ts +4 -5
- package/src/components/data/td-card/td-card.class.js +16 -30
- package/src/components/data/td-card/td-card.interface.d.ts +3 -3
- package/src/components/data/td-card/td-card.style.d.ts +3 -2
- package/src/components/data/td-card/td-card.style.js +17 -3
- package/src/components/data/td-check-tag/td-check-tag.class.d.ts +2 -2
- package/src/components/data/td-check-tag/td-check-tag.class.js +5 -5
- package/src/components/data/td-check-tag/td-check-tag.interface.d.ts +3 -3
- package/src/components/data/td-check-tag/td-check-tag.style.d.ts +2 -2
- package/src/components/data/td-check-tag/td-check-tag.style.js +3 -3
- package/src/components/data/td-collapse/td-collapse.class.d.ts +2 -2
- package/src/components/data/td-collapse/td-collapse.class.js +20 -20
- package/src/components/data/td-collapse/td-collapse.interface.d.ts +3 -3
- package/src/components/data/td-collapse/td-collapse.style.d.ts +2 -0
- package/src/components/data/td-collapse/td-collapse.style.js +9 -1
- package/src/components/data/td-collapse-item/td-collapse-item.class.d.ts +4 -5
- package/src/components/data/td-collapse-item/td-collapse-item.class.js +16 -16
- package/src/components/data/td-collapse-item/td-collapse-item.interface.d.ts +3 -3
- package/src/components/data/td-count-down/td-count-down.class.d.ts +1 -1
- package/src/components/data/td-count-down/td-count-down.class.js +1 -1
- package/src/components/data/td-descriptions/td-descriptions-row.d.ts +4 -5
- package/src/components/data/td-descriptions/td-descriptions-row.js +1 -1
- package/src/components/data/td-descriptions/td-descriptions.class.d.ts +3 -3
- package/src/components/data/td-descriptions/td-descriptions.class.js +2 -3
- package/src/components/data/td-descriptions/td-descriptions.interface.d.ts +3 -4
- package/src/components/data/td-descriptions/td-descritions-cell.d.ts +6 -5
- package/src/components/data/td-descriptions/td-descritions-cell.js +5 -4
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.d.ts +2 -3
- package/src/components/data/td-descriptions-item/td-descriptions-item.class.js +5 -4
- package/src/components/data/td-descriptions-item/td-descriptions-item.interface.d.ts +3 -4
- package/src/components/data/td-empty/td-empty.class.d.ts +2 -2
- package/src/components/data/td-empty/td-empty.class.js +2 -3
- package/src/components/data/td-empty/td-empty.interface.d.ts +3 -4
- package/src/components/data/td-image/td-image.class.d.ts +2 -3
- package/src/components/data/td-image/td-image.class.js +4 -22
- package/src/components/data/td-image/td-image.interface.d.ts +3 -3
- package/src/components/data/td-image/td-image.style.d.ts +2 -0
- package/src/components/data/td-image/td-image.style.js +19 -1
- package/src/components/data/td-image-viewer/td-image-viewer.class.d.ts +3 -5
- package/src/components/data/td-image-viewer/td-image-viewer.class.js +20 -17
- package/src/components/data/td-image-viewer/td-image-viewer.interface.d.ts +3 -3
- package/src/components/data/td-result/td-result.class.d.ts +2 -2
- package/src/components/data/td-result/td-result.class.js +4 -3
- package/src/components/data/td-result/td-result.interface.d.ts +3 -4
- package/src/components/data/td-segmented/td-segmented.class.d.ts +2 -3
- package/src/components/data/td-segmented/td-segmented.class.js +7 -8
- package/src/components/data/td-segmented/td-segmented.interface.d.ts +2 -3
- package/src/components/data/td-statistic/td-statistic.abstract.d.ts +3 -4
- package/src/components/data/td-statistic/td-statistic.abstract.js +15 -14
- package/src/components/data/td-statistic/td-statistic.class.js +1 -0
- package/src/components/data/td-statistic/td-statistic.interface.d.ts +3 -4
- package/src/components/data/td-tag/td-tag.class.d.ts +3 -4
- package/src/components/data/td-tag/td-tag.class.js +13 -13
- package/src/components/data/td-tag/td-tag.interface.d.ts +3 -3
- package/src/components/feedback/index.d.ts +4 -0
- package/src/components/feedback/index.js +5 -2
- package/src/components/feedback/td-alert/td-alert.class.d.ts +2 -3
- package/src/components/feedback/td-alert/td-alert.class.js +19 -17
- package/src/components/feedback/td-alert/td-alert.interface.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.class.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.class.js +25 -29
- package/src/components/feedback/td-dialog/td-dialog.interface.d.ts +3 -3
- package/src/components/feedback/td-dialog/td-dialog.interface.js +1 -1
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.d.ts +2 -3
- package/src/components/feedback/td-dialog-content/td-dialog-content.class.js +10 -7
- package/src/components/feedback/td-dialog-content/td-dialog-content.interface.d.ts +3 -4
- package/src/components/feedback/td-drawer/td-drawer.class.d.ts +3 -3
- package/src/components/feedback/td-drawer/td-drawer.class.js +5 -5
- package/src/components/feedback/td-drawer/td-drawer.interface.d.ts +2 -2
- package/src/components/feedback/td-focus-trap/focus-trap.d.ts +15 -0
- package/src/components/feedback/td-focus-trap/focus-trap.js +71 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -7
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +129 -129
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +3 -3
- package/src/components/feedback/td-loading/td-loading.class.d.ts +4 -3
- package/src/components/feedback/td-loading/td-loading.class.js +27 -17
- package/src/components/feedback/td-loading/td-loading.interface.d.ts +3 -4
- package/src/components/feedback/td-message/td-message.class.d.ts +4 -4
- package/src/components/feedback/td-message/td-message.class.js +31 -31
- package/src/components/feedback/td-message/td-message.interface.d.ts +3 -4
- package/src/components/feedback/td-message-box/td-message-box.class.d.ts +10 -12
- package/src/components/feedback/td-message-box/td-message-box.class.js +30 -52
- package/src/components/feedback/td-message-box/td-message-box.interface.d.ts +4 -5
- package/src/components/feedback/td-notification/td-notification.class.d.ts +4 -5
- package/src/components/feedback/td-notification/td-notification.class.js +17 -18
- package/src/components/feedback/td-notification/td-notification.interface.d.ts +3 -4
- package/src/components/feedback/td-notification/td-notification.style.js +6 -6
- package/src/components/feedback/td-only-child/td-only-child.class.d.ts +3 -3
- package/src/components/feedback/td-only-child/td-only-child.class.js +3 -3
- package/src/components/feedback/td-overlay/td-overlay.class.d.ts +2 -3
- package/src/components/feedback/td-overlay/td-overlay.class.js +6 -5
- package/src/components/feedback/td-overlay/td-overlay.interface.d.ts +3 -3
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +2 -2
- package/src/components/feedback/td-popper/arrow/arrow.class.js +7 -6
- package/src/components/feedback/td-popper/arrow/arrow.const.d.ts +3 -0
- package/src/components/feedback/td-popper/arrow/arrow.const.js +6 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +3 -4
- package/src/components/feedback/td-popper/constants.d.ts +25 -0
- package/src/components/feedback/td-popper/constants.js +5 -0
- package/src/components/feedback/td-popper/content/content.class.d.ts +2 -2
- package/src/components/feedback/td-popper/content/content.class.js +7 -13
- package/src/components/feedback/td-popper/content/content.const.d.ts +2 -2
- package/src/components/feedback/td-popper/content/content.const.js +3 -4
- package/src/components/feedback/td-popper/content/content.interface.d.ts +24 -11
- package/src/components/feedback/td-popper/content/content.interface.js +4 -0
- package/src/components/feedback/td-popper/td-popper.class.d.ts +3 -2
- package/src/components/feedback/td-popper/td-popper.class.js +9 -7
- package/src/components/feedback/td-popper/td-popper.const.d.ts +5 -20
- package/src/components/feedback/td-popper/td-popper.const.js +8 -3
- package/src/components/feedback/td-popper/td-popper.interface.d.ts +6 -4
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +2 -2
- package/src/components/feedback/td-popper/trigger/trigger.class.js +6 -6
- package/src/components/feedback/td-popper/trigger/trigger.const.d.ts +1 -0
- package/src/components/feedback/td-popper/trigger/trigger.const.js +4 -1
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +3 -3
- package/src/components/feedback/td-tooltip/content/content.class.d.ts +2 -2
- package/src/components/feedback/td-tooltip/content/content.class.js +4 -3
- package/src/components/feedback/td-tooltip/content/content.const.d.ts +55 -0
- package/src/components/feedback/td-tooltip/content/content.const.js +6 -0
- package/src/components/feedback/td-tooltip/content/content.interface.d.ts +19 -3
- package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +5 -3
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +84 -9
- package/src/components/feedback/td-tooltip/td-tooltip.const.d.ts +77 -0
- package/src/components/feedback/td-tooltip/td-tooltip.const.js +9 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +6 -3
- package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +3 -2
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +56 -3
- package/src/components/feedback/td-tooltip/trigger/trigger.const.d.ts +4 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.const.js +6 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +7 -2
- package/src/components/form/index.d.ts +17 -16
- package/src/components/form/index.js +19 -17
- package/src/components/form/td-checkbox/composables/use-checkbox-status.js +1 -1
- package/src/components/form/td-checkbox/composables/use-checkbox.js +1 -1
- package/src/components/form/td-checkbox/td-checkbox.class.d.ts +18 -3
- package/src/components/form/td-checkbox/td-checkbox.class.js +231 -9
- package/src/components/form/td-checkbox/td-checkbox.const.d.ts +63 -0
- package/src/components/form/td-checkbox/td-checkbox.const.js +88 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +5 -5
- package/src/components/form/td-checkbox/td-checkbox.style.d.ts +9 -0
- package/src/components/form/td-checkbox/td-checkbox.style.js +167 -14
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +9 -3
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +114 -26
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +2 -4
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.d.ts +8 -1
- package/src/components/form/td-checkbox-button/td-checkbox-button.style.js +89 -12
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +11 -3
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +118 -5
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +8 -5
- package/src/components/form/td-form/td-form.class.d.ts +4 -2
- package/src/components/form/td-form/td-form.class.js +9 -5
- package/src/components/form/td-form/td-form.interface.d.ts +7 -4
- package/src/components/form/td-form-item/td-form-item.class.d.ts +4 -5
- package/src/components/form/td-form-item/td-form-item.class.js +34 -27
- package/src/components/form/td-form-item/td-form-item.interface.d.ts +3 -3
- package/src/components/form/td-input/td-input.class.d.ts +3 -4
- package/src/components/form/td-input/td-input.class.js +30 -26
- package/src/components/form/td-input/td-input.interface.d.ts +3 -4
- package/src/components/form/td-input/widget/suffix.d.ts +1 -0
- package/src/components/form/td-input/widget/suffix.js +6 -1
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +5 -5
- package/src/components/form/td-input/widget/utils.js +8 -8
- package/src/components/form/td-option/td-option.class.d.ts +2 -2
- package/src/components/form/td-option/td-option.class.js +3 -3
- package/src/components/form/td-option/td-option.interface.d.ts +3 -3
- package/src/components/form/td-option-group/td-option-group.class.d.ts +2 -2
- package/src/components/form/td-option-group/td-option-group.class.js +2 -3
- package/src/components/form/td-option-group/td-option-group.interface.d.ts +3 -3
- package/src/components/form/td-radio/td-radio.class.d.ts +2 -3
- package/src/components/form/td-radio/td-radio.class.js +8 -5
- package/src/components/form/td-radio/td-radio.interface.d.ts +3 -3
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +2 -3
- package/src/components/form/td-radio-button/td-radio-button.class.js +9 -9
- package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +3 -3
- package/src/components/form/td-radio-group/td-radio-group.class.d.ts +2 -5
- package/src/components/form/td-radio-group/td-radio-group.class.js +14 -11
- package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +3 -4
- package/src/components/form/td-select/dropdown/dropdown.class.d.ts +2 -2
- package/src/components/form/td-select/dropdown/dropdown.class.js +2 -3
- package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +3 -4
- package/src/components/form/td-select/td-select.class.d.ts +4 -6
- package/src/components/form/td-select/td-select.class.js +4 -6
- package/src/components/form/td-select/td-select.interface.d.ts +13 -5
- package/src/components/form/td-select/td-select.style.d.ts +23 -0
- package/src/components/form/td-select/td-select.style.js +170 -1
- package/src/components/form/td-switch/td-switch.class.d.ts +2 -3
- package/src/components/form/td-switch/td-switch.class.js +2 -3
- package/src/components/form/td-switch/td-switch.interface.d.ts +3 -4
- package/src/components/form/td-switch/widget/td-switch-core.js +4 -4
- package/src/components/navigation/td-affix/td-affix.class.d.ts +2 -3
- package/src/components/navigation/td-affix/td-affix.class.js +2 -3
- package/src/components/navigation/td-affix/td-affix.interface.d.ts +3 -4
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.d.ts +2 -2
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.class.js +2 -3
- package/src/components/navigation/td-anchor/td-anchor-link/td-anchor-link.interface.d.ts +3 -4
- package/src/components/navigation/td-anchor/td-anchor.class.d.ts +2 -2
- package/src/components/navigation/td-anchor/td-anchor.class.js +6 -4
- package/src/components/navigation/td-anchor/td-anchor.function.js +1 -1
- package/src/components/navigation/td-anchor/td-anchor.interface.d.ts +3 -3
- package/src/components/navigation/td-backtop/td-backtop.class.d.ts +5 -6
- package/src/components/navigation/td-backtop/td-backtop.class.js +36 -59
- package/src/components/navigation/td-backtop/td-backtop.const.d.ts +18 -0
- package/src/components/navigation/td-backtop/td-backtop.const.js +21 -0
- package/src/components/navigation/td-backtop/td-backtop.interface.d.ts +3 -3
- package/src/components/navigation/td-backtop/td-backtop.style.d.ts +2 -0
- package/src/components/navigation/td-backtop/td-backtop.style.js +19 -1
- package/src/components/navigation/td-backtop/use-backtop.d.ts +2 -3
- package/src/components/navigation/td-backtop/use-backtop.js +2 -2
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.d.ts +3 -3
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.class.js +12 -8
- package/src/components/navigation/td-breadcrumb/td-breadcrumb.interface.d.ts +3 -4
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.d.ts +2 -2
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.class.js +2 -3
- package/src/components/navigation/td-breadcrumb-item/td-breadcrumb-item.interface.d.ts +3 -4
- package/src/components/navigation/td-menu/td-menu.class.d.ts +2 -2
- package/src/components/navigation/td-menu/td-menu.class.js +4 -3
- package/src/components/navigation/td-menu/td-menu.interface.d.ts +3 -4
- package/src/components/navigation/td-tabs/td-tab-bar.class.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tab-bar.class.js +3 -3
- package/src/components/navigation/td-tabs/td-tab-bar.interface.d.ts +3 -3
- package/src/components/navigation/td-tabs/td-tab-nav.class.d.ts +2 -3
- package/src/components/navigation/td-tabs/td-tab-nav.class.js +3 -4
- package/src/components/navigation/td-tabs/td-tab-nav.interface.d.ts +3 -3
- package/src/components/navigation/td-tabs/td-tab-pane.class.d.ts +2 -3
- package/src/components/navigation/td-tabs/td-tab-pane.class.js +12 -16
- package/src/components/navigation/td-tabs/td-tab-pane.interface.d.ts +3 -4
- package/src/components/navigation/td-tabs/td-tabs.class.d.ts +2 -2
- package/src/components/navigation/td-tabs/td-tabs.class.js +6 -4
- package/src/components/navigation/td-tabs/td-tabs.interface.d.ts +3 -3
- package/src/components/others/example/example-source-wrapper.js +2 -1
- package/src/components/others/td-divider/td-divider.class.d.ts +2 -2
- package/src/components/others/td-divider/td-divider.class.js +2 -3
- package/src/components/others/td-divider/td-divider.interface.d.ts +3 -3
- package/src/constants/aria.d.ts +17 -0
- package/src/constants/aria.js +20 -0
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/use-delayed-toggle.d.ts +23 -0
- package/src/hooks/use-delayed-toggle.js +52 -0
- package/src/styles/var.d.ts +2 -16
- package/src/styles/var.js +7 -17
- package/src/utils/dom/event.d.ts +6 -0
- package/src/utils/dom/event.js +17 -0
- package/src/ui/ui.abstract.d.ts +0 -18
- package/src/ui/ui.abstract.js +0 -50
- package/src/ui/ui.interface.d.ts +0 -12
- package/src/ui/ui.interface.js +0 -2
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdScrollbar = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const bar_class_1 = require("./bar/bar.class");
|
|
7
|
-
class TdScrollbar extends
|
|
6
|
+
class TdScrollbar extends framework_1.TypeHtml {
|
|
8
7
|
constructor(params = {}) {
|
|
9
|
-
super(
|
|
8
|
+
super();
|
|
10
9
|
this.className = 'TdScrollbar';
|
|
10
|
+
this.nodeName = params.tag || 'div';
|
|
11
|
+
this.dom = document.createElement(this.nodeName);
|
|
11
12
|
this.attr.addName('td-scrollbar');
|
|
12
13
|
this.style.addObj({
|
|
13
14
|
overflow: 'hidden',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TypeElement } from '@type-dom/framework';
|
|
2
1
|
import { IStyle } from '@type-dom/css-type';
|
|
3
|
-
import {
|
|
4
|
-
export interface ITdScrollbar extends
|
|
2
|
+
import { ITypeConfig, ITypeHtml, TypeElement } from '@type-dom/framework';
|
|
3
|
+
export interface ITdScrollbar extends ITypeHtml {
|
|
5
4
|
className: 'TdScrollbar';
|
|
6
5
|
}
|
|
7
|
-
export interface ITdScrollbarConfig extends
|
|
6
|
+
export interface ITdScrollbarConfig extends ITypeConfig {
|
|
8
7
|
/**
|
|
9
8
|
* @description height of scrollbar
|
|
10
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdScrollbarThumb, ITdScrollbarThumbConfig } from './thumb.interface';
|
|
3
|
-
export declare class TdScrollbarThumb extends
|
|
3
|
+
export declare class TdScrollbarThumb extends TypeDiv implements ITdScrollbarThumb {
|
|
4
4
|
className: 'TdScrollbarThumb';
|
|
5
5
|
props: ITdScrollbarThumbConfig;
|
|
6
6
|
private thumb;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdScrollbarThumb = 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
|
-
class TdScrollbarThumb extends
|
|
6
|
+
class TdScrollbarThumb extends framework_1.TypeDiv {
|
|
8
7
|
constructor(params = {}) {
|
|
9
|
-
super(
|
|
8
|
+
super();
|
|
10
9
|
this.className = 'TdScrollbarThumb';
|
|
11
10
|
this.attr.addName('td-scrollbar-thumb');
|
|
12
11
|
this.style.addObj({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdScrollbarThumb extends
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
|
+
export interface ITdScrollbarThumb extends ITypeDiv {
|
|
3
3
|
className: 'TdScrollbarThumb';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdScrollbarThumbConfig extends
|
|
5
|
+
export interface ITdScrollbarThumbConfig extends ITypeConfig {
|
|
6
6
|
vertical?: boolean;
|
|
7
7
|
size?: string;
|
|
8
8
|
move?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdSpace, ITdSpaceConfig } from './td-space.interface';
|
|
3
|
-
export declare class TdSpace extends
|
|
3
|
+
export declare class TdSpace extends TypeDiv implements ITdSpace {
|
|
4
4
|
className: 'TdSpace';
|
|
5
5
|
props: ITdSpaceConfig;
|
|
6
6
|
horizontalSize?: number;
|
|
@@ -3,27 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdSpace = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
6
|
const td_space_const_1 = require("./td-space.const");
|
|
8
|
-
class TdSpace extends
|
|
7
|
+
class TdSpace extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdSpace';
|
|
11
|
+
this.attr.addName('td-space');
|
|
12
12
|
this.style.addObj({
|
|
13
13
|
display: 'inline-flex',
|
|
14
14
|
verticalAlign: 'top'
|
|
15
15
|
});
|
|
16
|
-
this.
|
|
16
|
+
this.slotChild(params.slot);
|
|
17
17
|
this.props = this.useParams(params);
|
|
18
18
|
}
|
|
19
19
|
setup() {
|
|
20
20
|
this.children.forEach((item) => {
|
|
21
|
-
if (item instanceof framework_1.
|
|
21
|
+
if (item instanceof framework_1.TypeHtml) {
|
|
22
22
|
item.style.addObj({
|
|
23
23
|
display: 'flex',
|
|
24
24
|
flexWrap: 'wrap'
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
else if (item instanceof framework_1.TypeFragment) {
|
|
28
|
+
item.addStyleObj({
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexWrap: 'wrap'
|
|
31
|
+
});
|
|
32
|
+
}
|
|
27
33
|
});
|
|
28
34
|
const props = this.props;
|
|
29
35
|
this.useSize(props === null || props === void 0 ? void 0 : props.size);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { StyleAlignItems, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
-
|
|
3
|
-
export interface ITdSpace extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, StyleAlignItems, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
export interface ITdSpace extends ITypeDiv {
|
|
4
3
|
className: 'TdSpace';
|
|
5
4
|
horizontalSize?: number;
|
|
6
5
|
verticalSize?: number;
|
|
7
6
|
}
|
|
8
|
-
export interface ITdSpaceConfig extends
|
|
7
|
+
export interface ITdSpaceConfig extends ITypeConfig {
|
|
9
8
|
/**
|
|
10
9
|
* @description Placement direction 排列的方向
|
|
11
10
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeHtml } from '@type-dom/framework';
|
|
2
2
|
import { TdIcon } from '../td-icon/td-icon.class';
|
|
3
3
|
import { ITdText, ITdTextConfig } from './td-text.interface';
|
|
4
|
-
export declare class TdText extends
|
|
4
|
+
export declare class TdText extends TypeHtml implements ITdText {
|
|
5
5
|
className: 'TdText';
|
|
6
|
+
nodeName: string;
|
|
7
|
+
dom: HTMLElement;
|
|
6
8
|
props: ITdTextConfig;
|
|
7
9
|
icon?: TdIcon;
|
|
8
10
|
constructor(params?: ITdTextConfig);
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdText = void 0;
|
|
4
|
-
const
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const td_text_style_1 = require("./td-text.style");
|
|
6
|
-
class TdText extends
|
|
6
|
+
class TdText extends framework_1.TypeHtml {
|
|
7
7
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
8
|
+
super();
|
|
9
9
|
this.className = 'TdText';
|
|
10
|
+
this.nodeName = params.tag || 'span';
|
|
11
|
+
this.dom = document.createElement(this.nodeName);
|
|
10
12
|
this.style.addObj(td_text_style_1.$baseText);
|
|
11
|
-
this.props = this.useParams(params);
|
|
12
13
|
// this.addChild(this.getSlotNode());
|
|
13
14
|
if (params.slot) {
|
|
14
15
|
this.slotChild(params.slot);
|
|
15
16
|
}
|
|
17
|
+
this.props = this.useParams(params);
|
|
16
18
|
}
|
|
17
19
|
setup() {
|
|
18
20
|
const props = this.props;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITypeConfig, ITypeHtml } from '@type-dom/framework';
|
|
2
2
|
import { IType } from '../../../styles';
|
|
3
3
|
import { ISize } from '../../../styles/size';
|
|
4
|
-
export interface ITdText extends
|
|
4
|
+
export interface ITdText extends ITypeHtml {
|
|
5
5
|
className: 'TdText';
|
|
6
6
|
}
|
|
7
|
-
export interface ITdTextConfig extends
|
|
7
|
+
export interface ITdTextConfig extends ITypeConfig {
|
|
8
8
|
type?: IType;
|
|
9
9
|
size?: ISize;
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeSpan } from '@type-dom/framework';
|
|
2
2
|
import { ITdAvatar, ITdAvatarConfig } from './td-avatar.interface';
|
|
3
|
-
export declare class TdAvatar extends
|
|
3
|
+
export declare class TdAvatar extends TypeSpan implements ITdAvatar {
|
|
4
4
|
className: 'TdAvatar';
|
|
5
5
|
props: ITdAvatarConfig;
|
|
6
6
|
private img?;
|
|
@@ -1,38 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdAvatar = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
const framework_1 = require("@type-dom/framework");
|
|
6
6
|
const td_avatar_style_1 = require("./td-avatar.style");
|
|
7
|
-
|
|
8
|
-
class TdAvatar extends ui_abstract_1.UI {
|
|
7
|
+
class TdAvatar extends framework_1.TypeSpan {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdAvatar';
|
|
12
11
|
this.attr.addName('td-avatar');
|
|
13
|
-
this.style.addObj(
|
|
14
|
-
display: 'inline-flex',
|
|
15
|
-
justifyContent: 'center',
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
boxSizing: 'border-box',
|
|
18
|
-
textAlign: 'center',
|
|
19
|
-
overflow: 'hidden',
|
|
20
|
-
// color: getCssVar('avatar', 'text-color'),
|
|
21
|
-
color: td_avatar_style_1.$avatar.textColor,
|
|
22
|
-
// background: getCssVar('avatar', 'bg-color'),
|
|
23
|
-
background: td_avatar_style_1.$avatar.bgColor,
|
|
24
|
-
// width: getCssVar('avatar', 'size'),
|
|
25
|
-
width: td_avatar_style_1.$avatarSize.default,
|
|
26
|
-
// height: getCssVar('avatar', 'size'),
|
|
27
|
-
height: td_avatar_style_1.$avatarSize.default,
|
|
28
|
-
// font-size: getCssVar('avatar', 'text-size'),
|
|
29
|
-
fontSize: td_avatar_style_1.$avatar.textSize
|
|
30
|
-
});
|
|
12
|
+
this.style.addObj(td_avatar_style_1.$avatarStyle);
|
|
31
13
|
this.hasLoadError = false;
|
|
32
14
|
this.props = this.useParams(params);
|
|
33
15
|
}
|
|
34
16
|
setup() {
|
|
35
|
-
var _a, _b, _c;
|
|
17
|
+
var _a, _b, _c, _d;
|
|
36
18
|
const props = this.props;
|
|
37
19
|
if (((props === null || props === void 0 ? void 0 : props.src) || (props === null || props === void 0 ? void 0 : props.srcSet)) && !this.hasLoadError) {
|
|
38
20
|
this.img = new framework_1.Img({
|
|
@@ -77,12 +59,18 @@ class TdAvatar extends ui_abstract_1.UI {
|
|
|
77
59
|
width: (0, utils_1.addUnit)(size),
|
|
78
60
|
height: (0, utils_1.addUnit)(size)
|
|
79
61
|
});
|
|
80
|
-
if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.
|
|
62
|
+
if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeHtml) {
|
|
81
63
|
props.slot.style.addObj({
|
|
82
64
|
width: (0, utils_1.addUnit)(size),
|
|
83
65
|
height: (0, utils_1.addUnit)(size)
|
|
84
66
|
});
|
|
85
67
|
}
|
|
68
|
+
else if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeFragment) {
|
|
69
|
+
props.slot.addStyleObj({
|
|
70
|
+
width: (0, utils_1.addUnit)(size),
|
|
71
|
+
height: (0, utils_1.addUnit)(size)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
86
74
|
}
|
|
87
75
|
else {
|
|
88
76
|
this.style.addObj({
|
|
@@ -93,12 +81,18 @@ class TdAvatar extends ui_abstract_1.UI {
|
|
|
93
81
|
width: td_avatar_style_1.$avatarSize[size],
|
|
94
82
|
height: td_avatar_style_1.$avatarSize[size]
|
|
95
83
|
});
|
|
96
|
-
if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.
|
|
84
|
+
if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeHtml) {
|
|
97
85
|
props.slot.style.addObj({
|
|
98
86
|
width: td_avatar_style_1.$avatarSize[size],
|
|
99
87
|
height: td_avatar_style_1.$avatarSize[size]
|
|
100
88
|
});
|
|
101
89
|
}
|
|
90
|
+
else if ((props === null || props === void 0 ? void 0 : props.slot) instanceof framework_1.TypeFragment) {
|
|
91
|
+
(_d = props.slot) === null || _d === void 0 ? void 0 : _d.addStyleObj({
|
|
92
|
+
width: td_avatar_style_1.$avatarSize[size],
|
|
93
|
+
height: td_avatar_style_1.$avatarSize[size]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
102
96
|
}
|
|
103
97
|
}
|
|
104
98
|
// todo 监听 src 改变
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Globals } from '@type-dom/css-type';
|
|
2
|
-
import {
|
|
2
|
+
import { ITypeConfig, ITypeSpan } from '@type-dom/framework';
|
|
3
3
|
import { ISize } from '../../../styles/size';
|
|
4
4
|
import { TdIcon } from '../../basic/td-icon/td-icon.class';
|
|
5
|
-
export interface ITdAvatar extends
|
|
5
|
+
export interface ITdAvatar extends ITypeSpan {
|
|
6
6
|
className: 'TdAvatar';
|
|
7
7
|
}
|
|
8
|
-
export interface ITdAvatarConfig extends
|
|
8
|
+
export interface ITdAvatarConfig extends ITypeConfig {
|
|
9
9
|
/**
|
|
10
10
|
* @description avatar size.
|
|
11
11
|
* default: '',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/css-type';
|
|
1
2
|
export declare const $avatar: {
|
|
2
3
|
textColor: string;
|
|
3
4
|
bgColor: string;
|
|
@@ -10,4 +11,5 @@ export declare const $avatarSize: {
|
|
|
10
11
|
default: string;
|
|
11
12
|
small: string;
|
|
12
13
|
};
|
|
14
|
+
export declare const $avatarStyle: IStyle;
|
|
13
15
|
export declare const $avatarSizeDefault: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.$avatarSizeDefault = exports.$avatarSize = exports.$avatar = void 0;
|
|
3
|
+
exports.$avatarSizeDefault = exports.$avatarStyle = exports.$avatarSize = exports.$avatar = void 0;
|
|
4
4
|
const var_1 = require("../../../styles/var");
|
|
5
5
|
exports.$avatar = {
|
|
6
6
|
// 'text-color': getCssVar('color-white'),
|
|
@@ -17,4 +17,22 @@ exports.$avatarSize = {
|
|
|
17
17
|
default: '40px',
|
|
18
18
|
small: '24px'
|
|
19
19
|
};
|
|
20
|
+
exports.$avatarStyle = {
|
|
21
|
+
display: 'inline-flex',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
boxSizing: 'border-box',
|
|
25
|
+
textAlign: 'center',
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
// color: getCssVar('avatar', 'text-color'),
|
|
28
|
+
color: exports.$avatar.textColor,
|
|
29
|
+
// background: getCssVar('avatar', 'bg-color'),
|
|
30
|
+
background: exports.$avatar.bgColor,
|
|
31
|
+
// width: getCssVar('avatar', 'size'),
|
|
32
|
+
width: exports.$avatarSize.default,
|
|
33
|
+
// height: getCssVar('avatar', 'size'),
|
|
34
|
+
height: exports.$avatarSize.default,
|
|
35
|
+
// font-size: getCssVar('avatar', 'text-size'),
|
|
36
|
+
fontSize: exports.$avatar.textSize
|
|
37
|
+
};
|
|
20
38
|
exports.$avatarSizeDefault = exports.$avatarSize.default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import type { ITdBadge, ITdBadgeConfig } from './td-badge.interface';
|
|
3
|
-
export declare class TdBadge extends
|
|
3
|
+
export declare class TdBadge extends TypeDiv implements ITdBadge {
|
|
4
4
|
className: 'TdBadge';
|
|
5
5
|
props: ITdBadgeConfig;
|
|
6
6
|
private sup;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdBadge = 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 td_badge_style_1 = require("./td-badge.style");
|
|
9
|
-
class TdBadge extends
|
|
8
|
+
class TdBadge extends framework_1.TypeDiv {
|
|
10
9
|
constructor(params = {}) {
|
|
11
10
|
var _a, _b, _c, _d;
|
|
12
|
-
super(
|
|
11
|
+
super();
|
|
13
12
|
console.log('TdBadge constructor . ');
|
|
14
13
|
this.className = 'TdBadge';
|
|
15
14
|
this.attr.addName('td-badge');
|
|
@@ -44,7 +43,8 @@ class TdBadge extends ui_abstract_1.UI {
|
|
|
44
43
|
marginTop: (0, utils_1.addUnit)((_d = (_c = params === null || params === void 0 ? void 0 : params.offset) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : 0)
|
|
45
44
|
}
|
|
46
45
|
});
|
|
47
|
-
this.addChild(this.getSlotNode());
|
|
46
|
+
// this.addChild(this.getSlotNode());
|
|
47
|
+
this.slotChild(params.slot);
|
|
48
48
|
this.addChild(new framework_1.Transition({
|
|
49
49
|
name: 'td-badge',
|
|
50
50
|
parent: this,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
1
|
import { IStyle } from '@type-dom/css-type';
|
|
3
|
-
|
|
2
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
3
|
+
export interface ITdBadge extends ITypeDiv {
|
|
4
4
|
className: 'TdBadge';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdBadgeConfig extends
|
|
6
|
+
export interface ITdBadgeConfig extends ITypeConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description display value.
|
|
9
9
|
* default: '',
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { Div } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Div, TypeDiv } from '@type-dom/framework';
|
|
3
2
|
import { ITdCard, ITdCardConfig } from './td-card.interface';
|
|
4
|
-
export declare class TdCard extends
|
|
3
|
+
export declare class TdCard extends TypeDiv implements ITdCard {
|
|
5
4
|
className: 'TdCard';
|
|
6
5
|
props: ITdCardConfig;
|
|
7
6
|
body: Div;
|
|
8
7
|
header?: Div;
|
|
9
8
|
footer?: Div;
|
|
10
9
|
constructor(params?: ITdCardConfig);
|
|
11
|
-
addShadow(params
|
|
10
|
+
addShadow(params: ITdCardConfig): void;
|
|
12
11
|
addHeader(params?: ITdCardConfig): void;
|
|
13
|
-
addFooter(params
|
|
12
|
+
addFooter(params: ITdCardConfig): void;
|
|
14
13
|
}
|
|
@@ -2,28 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdCard = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
-
const transition_1 = require("../../../styles/transition");
|
|
7
5
|
const var_1 = require("../../../styles/var");
|
|
8
6
|
const td_card_style_1 = require("./td-card.style");
|
|
9
|
-
class TdCard extends
|
|
7
|
+
class TdCard extends framework_1.TypeDiv {
|
|
10
8
|
constructor(params = {}) {
|
|
11
|
-
super(
|
|
9
|
+
super();
|
|
12
10
|
this.className = 'TdCard';
|
|
13
11
|
this.attr.addName('td-card');
|
|
14
|
-
this.style.addObj(
|
|
15
|
-
// border-radius: getCssVar('card', 'border-radius'),
|
|
16
|
-
borderRadius: td_card_style_1.$card.borderRadius,
|
|
17
|
-
// border: 1px solid getCssVar('card', 'border-color'),
|
|
18
|
-
border: '1px solid ' + td_card_style_1.$card.borderColor,
|
|
19
|
-
// background-color: getCssVar('card', 'bg-color'),
|
|
20
|
-
backgroundColor: td_card_style_1.$card.bgColor,
|
|
21
|
-
overflow: 'hidden',
|
|
22
|
-
// color: getCssVar('text-color', 'primary'),
|
|
23
|
-
color: var_1.$textColor.primary,
|
|
24
|
-
// transition: getCssVar('transition-duration'),
|
|
25
|
-
transition: transition_1.$transitionDuration.default
|
|
26
|
-
});
|
|
12
|
+
this.style.addObj(td_card_style_1.$cardStyle);
|
|
27
13
|
this.addShadow(params);
|
|
28
14
|
this.addHeader(params);
|
|
29
15
|
this.body = new framework_1.Div({
|
|
@@ -32,13 +18,13 @@ class TdCard extends ui_abstract_1.UI {
|
|
|
32
18
|
padding: td_card_style_1.$card.padding
|
|
33
19
|
}
|
|
34
20
|
});
|
|
35
|
-
if (params
|
|
21
|
+
if (params.bodyStyle) {
|
|
36
22
|
this.body.style.addObj(params.bodyStyle);
|
|
37
23
|
}
|
|
38
|
-
if (params
|
|
24
|
+
if (params.bodyClass) {
|
|
39
25
|
this.body.attr.addClass(params.bodyClass);
|
|
40
26
|
}
|
|
41
|
-
if (params
|
|
27
|
+
if (params.slot) {
|
|
42
28
|
this.body.slotChild(params.slot);
|
|
43
29
|
}
|
|
44
30
|
this.addChild(this.body);
|
|
@@ -46,7 +32,7 @@ class TdCard extends ui_abstract_1.UI {
|
|
|
46
32
|
this.props = this.useParams(params);
|
|
47
33
|
}
|
|
48
34
|
addShadow(params) {
|
|
49
|
-
const shadow =
|
|
35
|
+
const shadow = params.shadow || 'always';
|
|
50
36
|
if (shadow === 'always') {
|
|
51
37
|
this.style.addObj({
|
|
52
38
|
boxShadow: var_1.$boxShadow.light
|
|
@@ -67,33 +53,33 @@ class TdCard extends ui_abstract_1.UI {
|
|
|
67
53
|
var _a;
|
|
68
54
|
if ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.header) {
|
|
69
55
|
this.header = new framework_1.Div({
|
|
70
|
-
styleObj: td_card_style_1.$
|
|
71
|
-
childNodes: [params.slots.header]
|
|
56
|
+
styleObj: td_card_style_1.$cardHeaderStyle
|
|
72
57
|
});
|
|
58
|
+
this.header.slotChild(params.slots.header);
|
|
73
59
|
this.addChild(this.header);
|
|
74
60
|
}
|
|
75
61
|
else if (params === null || params === void 0 ? void 0 : params.header) {
|
|
76
62
|
// 文本
|
|
77
63
|
this.header = new framework_1.Div({
|
|
78
64
|
text: params.header,
|
|
79
|
-
styleObj: td_card_style_1.$
|
|
65
|
+
styleObj: td_card_style_1.$cardHeaderStyle
|
|
80
66
|
});
|
|
81
67
|
this.addChild(this.header);
|
|
82
68
|
}
|
|
83
69
|
}
|
|
84
70
|
addFooter(params) {
|
|
85
71
|
var _a;
|
|
86
|
-
if ((_a = params
|
|
72
|
+
if ((_a = params.slots) === null || _a === void 0 ? void 0 : _a.footer) {
|
|
87
73
|
this.footer = new framework_1.Div({
|
|
88
|
-
styleObj: td_card_style_1.$
|
|
89
|
-
childNodes: [params.slots.footer]
|
|
74
|
+
styleObj: td_card_style_1.$cardFooterStyle
|
|
90
75
|
});
|
|
76
|
+
this.footer.slotChild(params.slots.footer);
|
|
91
77
|
this.addChild(this.footer);
|
|
92
78
|
}
|
|
93
|
-
else if (params
|
|
79
|
+
else if (params.footer) {
|
|
94
80
|
this.footer = new framework_1.Div({
|
|
95
|
-
|
|
96
|
-
styleObj: td_card_style_1.$
|
|
81
|
+
slot: params.footer,
|
|
82
|
+
styleObj: td_card_style_1.$cardFooterStyle
|
|
97
83
|
});
|
|
98
84
|
this.addChild(this.footer);
|
|
99
85
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
1
|
import { IStyle } from '@type-dom/css-type';
|
|
3
|
-
|
|
2
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
3
|
+
export interface ITdCard extends ITypeDiv {
|
|
4
4
|
className: 'TdCard';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdCardConfig extends
|
|
6
|
+
export interface ITdCardConfig extends ITypeConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description title of the card. Also accepts a DOM passed by `slot#header`
|
|
9
9
|
* default: '',
|
|
@@ -5,5 +5,6 @@ export declare const $card: {
|
|
|
5
5
|
padding: string;
|
|
6
6
|
bgColor: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const $
|
|
9
|
-
export declare const $
|
|
8
|
+
export declare const $cardStyle: IStyle;
|
|
9
|
+
export declare const $cardHeaderStyle: IStyle;
|
|
10
|
+
export declare const $cardFooterStyle: IStyle;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.$
|
|
3
|
+
exports.$cardFooterStyle = exports.$cardHeaderStyle = exports.$cardStyle = exports.$card = void 0;
|
|
4
4
|
const var_1 = require("../../../styles/var");
|
|
5
|
+
const transition_1 = require("../../../styles/transition");
|
|
5
6
|
exports.$card = {
|
|
6
7
|
// 'border-color': getCssVar('border-color', 'light'),
|
|
7
8
|
borderColor: var_1.$borderColor.light,
|
|
@@ -10,7 +11,20 @@ exports.$card = {
|
|
|
10
11
|
// 'bg-color': getCssVar('fill-color', 'blank'),
|
|
11
12
|
bgColor: var_1.$fillColor.blank
|
|
12
13
|
};
|
|
13
|
-
exports.$
|
|
14
|
+
exports.$cardStyle = {
|
|
15
|
+
// border-radius: getCssVar('card', 'border-radius'),
|
|
16
|
+
borderRadius: exports.$card.borderRadius,
|
|
17
|
+
// border: 1px solid getCssVar('card', 'border-color'),
|
|
18
|
+
border: '1px solid ' + exports.$card.borderColor,
|
|
19
|
+
// background-color: getCssVar('card', 'bg-color'),
|
|
20
|
+
backgroundColor: exports.$card.bgColor,
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
// color: getCssVar('text-color', 'primary'),
|
|
23
|
+
color: var_1.$textColor.primary,
|
|
24
|
+
// transition: getCssVar('transition-duration'),
|
|
25
|
+
transition: transition_1.$transitionDuration.default
|
|
26
|
+
};
|
|
27
|
+
exports.$cardHeaderStyle = {
|
|
14
28
|
// padding: calc(#{getCssVar('card', 'padding')} - 2px) getCssVar('card', 'padding'),
|
|
15
29
|
padding: `calc(${exports.$card.padding} - 2px) ${exports.$card.padding}`,
|
|
16
30
|
// border-bottom: 1px solid getCssVar('card', 'border-color'),
|
|
@@ -18,7 +32,7 @@ exports.$cardHeader = {
|
|
|
18
32
|
// box-sizing: border-box,
|
|
19
33
|
boxSizing: 'border-box'
|
|
20
34
|
};
|
|
21
|
-
exports.$
|
|
35
|
+
exports.$cardFooterStyle = {
|
|
22
36
|
// padding: calc(#{getCssVar('card', 'padding')} - 2px)
|
|
23
37
|
// getCssVar('card', 'padding'),
|
|
24
38
|
padding: `calc(${exports.$card.padding} - 2px) ${exports.$card.padding}`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeSpan } from '@type-dom/framework';
|
|
2
2
|
import { ITdCheckTag, ITdCheckTagConfig } from './td-check-tag.interface';
|
|
3
|
-
export declare class TdCheckTag extends
|
|
3
|
+
export declare class TdCheckTag extends TypeSpan implements ITdCheckTag {
|
|
4
4
|
className: 'TdCheckTag';
|
|
5
5
|
props: ITdCheckTagConfig;
|
|
6
6
|
checked?: boolean;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdCheckTag = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
4
5
|
const var_1 = require("../../../styles/var");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
6
|
const event_1 = require("../../../constants/event");
|
|
7
7
|
const td_check_tag_style_1 = require("./td-check-tag.style");
|
|
8
|
-
class TdCheckTag extends
|
|
8
|
+
class TdCheckTag extends framework_1.TypeSpan {
|
|
9
9
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
10
|
+
super();
|
|
11
11
|
this.className = 'TdCheckTag';
|
|
12
|
-
this.attr.addName('td-check-tag');
|
|
13
12
|
this.type = (params === null || params === void 0 ? void 0 : params.type) || 'primary';
|
|
14
13
|
(0, td_check_tag_style_1.useType)();
|
|
15
|
-
this.
|
|
14
|
+
this.attr.addName('td-check-tag');
|
|
15
|
+
this.style.addObj(td_check_tag_style_1.$checkTagStyle);
|
|
16
16
|
this.setChecked(params === null || params === void 0 ? void 0 : params.checked);
|
|
17
17
|
this.props = this.useParams(params);
|
|
18
18
|
this.addEvents({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { ITypeConfig, ITypeSpan } from '@type-dom/framework';
|
|
1
2
|
import { IType } from '../../../styles/var';
|
|
2
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
3
|
import { CHANGE_EVENT } from '../../../constants/event';
|
|
4
|
-
export interface ITdCheckTag extends
|
|
4
|
+
export interface ITdCheckTag extends ITypeSpan {
|
|
5
5
|
className: 'TdCheckTag';
|
|
6
6
|
}
|
|
7
|
-
export interface ITdCheckTagConfig extends
|
|
7
|
+
export interface ITdCheckTagConfig extends ITypeConfig {
|
|
8
8
|
/**
|
|
9
9
|
* @description is checked
|
|
10
10
|
* default: false,
|