@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@type-dom/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@type-dom/svgs": "*"
|
|
6
6
|
},
|
|
@@ -10,6 +10,5 @@
|
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/type-dom/ui.git"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/src/aria.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SlotNode, Span, TextNode } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { SlotNode, Span, TextNode, TypeHtml } from '@type-dom/framework';
|
|
3
2
|
import { TdIcon } from '../td-icon/td-icon.class';
|
|
4
3
|
import { ITdButtonAbstract, ITdButtonConfig } from './td-button.interface';
|
|
5
|
-
export declare abstract class TdButtonAbstract extends
|
|
4
|
+
export declare abstract class TdButtonAbstract extends TypeHtml implements ITdButtonAbstract {
|
|
6
5
|
abstract className: 'TdButton' | string;
|
|
7
|
-
childNodes: (Span | TdIcon)[];
|
|
8
6
|
textNode?: TextNode;
|
|
9
7
|
props: ITdButtonConfig;
|
|
8
|
+
nodeName: string;
|
|
9
|
+
dom: HTMLElement;
|
|
10
10
|
span?: Span;
|
|
11
|
+
icon?: TdIcon | SlotNode;
|
|
11
12
|
private type?;
|
|
12
13
|
private plain?;
|
|
13
14
|
private disabled?;
|
|
14
|
-
icon?: TdIcon | SlotNode;
|
|
15
15
|
protected constructor(params?: ITdButtonConfig);
|
|
16
16
|
setup(): void;
|
|
17
17
|
useType(params?: ITdButtonConfig): void;
|
|
@@ -3,28 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdButtonAbstract = 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 var_1 = require("../../../styles/var");
|
|
8
7
|
const td_input_style_1 = require("../../form/td-input/td-input.style");
|
|
9
8
|
// import { $iconLeft, $iconLoading, $iconRight } from '../td-icon/td-icon.style';
|
|
10
9
|
const td_icon_class_1 = require("../td-icon/td-icon.class");
|
|
11
10
|
const td_button_style_1 = require("./td-button.style");
|
|
12
|
-
|
|
13
|
-
class TdButtonAbstract extends ui_abstract_1.UI {
|
|
11
|
+
class TdButtonAbstract extends framework_1.TypeHtml {
|
|
14
12
|
constructor(params = {}) {
|
|
15
|
-
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
super();
|
|
15
|
+
// this.useTag(params.tag || 'button');
|
|
16
|
+
this.nodeName = params.tag || 'button';
|
|
17
|
+
this.dom = document.createElement(this.nodeName);
|
|
16
18
|
this.attr.addObj({
|
|
17
|
-
|
|
19
|
+
name: 'td-button',
|
|
20
|
+
type: 'button'
|
|
18
21
|
});
|
|
19
22
|
this.style.addObj(td_button_style_1.$tdButtonBase);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
setup() {
|
|
24
|
-
var _a, _b, _c;
|
|
25
|
-
const props = this.props;
|
|
26
|
-
if (props === null || props === void 0 ? void 0 : props.loading) {
|
|
27
|
-
if ((_a = props === null || props === void 0 ? void 0 : props.slots) === null || _a === void 0 ? void 0 : _a.loading) {
|
|
23
|
+
if (params === null || params === void 0 ? void 0 : params.loading) {
|
|
24
|
+
if ((_a = params === null || params === void 0 ? void 0 : params.slots) === null || _a === void 0 ? void 0 : _a.loading) {
|
|
28
25
|
// 如果插槽有 loading
|
|
29
26
|
// this.icon = props.slots.loading as TdIcon;
|
|
30
27
|
// this.loadingSlot = new SlotNode('loading', props.slots.loading);
|
|
@@ -40,23 +37,23 @@ class TdButtonAbstract extends ui_abstract_1.UI {
|
|
|
40
37
|
this.addChild(this.icon);
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
|
-
else if ((
|
|
40
|
+
else if ((params === null || params === void 0 ? void 0 : params.svgObj) || ((_b = params === null || params === void 0 ? void 0 : params.slots) === null || _b === void 0 ? void 0 : _b.icon)) {
|
|
44
41
|
this.icon = new td_icon_class_1.TdIcon({
|
|
45
42
|
name: 'icon-expand',
|
|
46
43
|
// svgObj: props.svgObj
|
|
47
44
|
});
|
|
48
|
-
if (
|
|
49
|
-
this.icon.
|
|
45
|
+
if (params.svgObj) {
|
|
46
|
+
this.icon.addChild(params.svgObj);
|
|
50
47
|
}
|
|
51
|
-
else if ((_c =
|
|
48
|
+
else if ((_c = params === null || params === void 0 ? void 0 : params.slots) === null || _c === void 0 ? void 0 : _c.icon) {
|
|
52
49
|
// this.icon = props.slots.icon;
|
|
53
50
|
// this.iconSlot = new SlotNode('icon', props.slots.icon);
|
|
54
|
-
this.icon.
|
|
51
|
+
this.icon.slotChild(params.slots.icon);
|
|
55
52
|
}
|
|
56
53
|
this.addChild(this.icon);
|
|
57
54
|
}
|
|
58
55
|
// this.useIcon(props);
|
|
59
|
-
if (
|
|
56
|
+
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
60
57
|
// this.defaultSlot = new SlotNode('default', props.slot);
|
|
61
58
|
// this.icon?.style.addObj($iconLeft);
|
|
62
59
|
// todo 会运行 2 次;
|
|
@@ -71,31 +68,10 @@ class TdButtonAbstract extends ui_abstract_1.UI {
|
|
|
71
68
|
},
|
|
72
69
|
childNodes: [this.getSlotNode()]
|
|
73
70
|
});
|
|
71
|
+
// 没有 this.useSlots,所以这里要手动添加 slot。
|
|
72
|
+
this.getSlotNode().addSlot(params.slot);
|
|
74
73
|
this.addChild(span);
|
|
75
74
|
}
|
|
76
|
-
this.useType(props);
|
|
77
|
-
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
78
|
-
this.disabled = props.disabled;
|
|
79
|
-
this.style.addObj({
|
|
80
|
-
// color: $button.disabled.textColor,
|
|
81
|
-
// backgroundColor: $button.disabled.bgColor,
|
|
82
|
-
// borderColor: $button.disabled.borderColor,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const size = (props === null || props === void 0 ? void 0 : props.size) ? props.size : 'default';
|
|
86
|
-
this.style.addObj(td_button_style_1.$sizeOpts[size]);
|
|
87
|
-
if (props === null || props === void 0 ? void 0 : props.round) {
|
|
88
|
-
this.style.addObj({
|
|
89
|
-
borderRadius: var_1.$borderRadius.round
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else if (props === null || props === void 0 ? void 0 : props.circle) {
|
|
93
|
-
this.style.addObj({
|
|
94
|
-
width: td_input_style_1.$inputHeight[props.size || 'default'], // map.get($input-height, 'default');
|
|
95
|
-
borderRadius: var_1.$borderRadius.circle,
|
|
96
|
-
padding: var_1.$paddingVerticalMap.default
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
75
|
// 悬浮、聚焦、激活状态样式
|
|
100
76
|
// console.log('then td-button add events . ');
|
|
101
77
|
this.addEvents({
|
|
@@ -145,6 +121,34 @@ class TdButtonAbstract extends ui_abstract_1.UI {
|
|
|
145
121
|
}
|
|
146
122
|
}
|
|
147
123
|
});
|
|
124
|
+
this.props = this.useParams(params); // 这里的config赋值是要替换掉上面的config的预置值的。
|
|
125
|
+
}
|
|
126
|
+
setup() {
|
|
127
|
+
console.log('td-button setup . ');
|
|
128
|
+
const props = this.props;
|
|
129
|
+
this.useType(props);
|
|
130
|
+
if (props.disabled) {
|
|
131
|
+
this.disabled = props.disabled;
|
|
132
|
+
this.style.addObj({
|
|
133
|
+
// color: $button.disabled.textColor,
|
|
134
|
+
// backgroundColor: $button.disabled.bgColor,
|
|
135
|
+
// borderColor: $button.disabled.borderColor,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
const size = props.size ? props.size : 'default';
|
|
139
|
+
this.style.addObj(td_button_style_1.$sizeOpts[size]);
|
|
140
|
+
if (props.round) {
|
|
141
|
+
this.style.addObj({
|
|
142
|
+
borderRadius: var_1.$borderRadius.round
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
else if (props.circle) {
|
|
146
|
+
this.style.addObj({
|
|
147
|
+
width: td_input_style_1.$inputHeight[props.size || 'default'], // map.get($input-height, 'default');
|
|
148
|
+
borderRadius: var_1.$borderRadius.circle,
|
|
149
|
+
padding: td_button_style_1.$buttonPaddingVertical.default
|
|
150
|
+
});
|
|
151
|
+
}
|
|
148
152
|
}
|
|
149
153
|
useType(params) {
|
|
150
154
|
// const type = params?.type ? params.type : 'default';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ITdIcon } from '../td-icon/td-icon.interface';
|
|
4
|
-
export interface ITdButtonAbstract extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeHtml, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
export interface ITdButtonAbstract extends ITypeHtml {
|
|
5
3
|
className: 'TdButton' | string;
|
|
6
|
-
childNodes: (ISpan | ITdIcon)[];
|
|
7
4
|
}
|
|
8
5
|
export interface ITdButton extends ITdButtonAbstract {
|
|
9
6
|
className: 'TdButton';
|
|
@@ -29,7 +26,7 @@ export type IButtonNativeType = 'button' | 'submit' | 'reset';
|
|
|
29
26
|
* color 自定义按钮的颜色。
|
|
30
27
|
* disabled 按钮是否为禁用状态
|
|
31
28
|
*/
|
|
32
|
-
export interface ITdButtonConfig extends
|
|
29
|
+
export interface ITdButtonConfig extends ITypeConfig {
|
|
33
30
|
size?: IButtonSize;
|
|
34
31
|
disabled?: boolean;
|
|
35
32
|
type?: IButtonType;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { IStyle } from '@type-dom/css-type';
|
|
2
2
|
import { IType } from '../../../styles/var';
|
|
3
|
+
export declare const $buttonBorderRadius: {
|
|
4
|
+
large: string;
|
|
5
|
+
default: string;
|
|
6
|
+
small: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const $buttonPaddingVertical: {
|
|
9
|
+
large: string;
|
|
10
|
+
default: string;
|
|
11
|
+
small: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const $buttonPaddingHorizontal: {
|
|
14
|
+
large: string;
|
|
15
|
+
default: string;
|
|
16
|
+
small: string;
|
|
17
|
+
};
|
|
3
18
|
export declare const $buttonIconSpanGap: {
|
|
4
19
|
large: string;
|
|
5
20
|
default: string;
|
|
@@ -12,8 +27,4 @@ export declare function buttonVariant($type: IType): void;
|
|
|
12
27
|
export declare const $buttonPlainColors: Record<string, Record<string, Partial<IStyle>>>;
|
|
13
28
|
export declare function buttonPlain($type: IType): void;
|
|
14
29
|
export declare const $borderRightColor = "rgba(255, 255, 255, .5)";
|
|
15
|
-
export declare
|
|
16
|
-
large: string;
|
|
17
|
-
default: string;
|
|
18
|
-
small: string;
|
|
19
|
-
};
|
|
30
|
+
export declare function buttonSize($paddingVertical: string, $paddingHorizontal: string, $fontSize: string, $borderRadius: string | number): IStyle;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.$
|
|
3
|
+
exports.$borderRightColor = exports.$buttonPlainColors = exports.$buttonStateColors = exports.$tdButtonBase = exports.$sizeOpts = exports.$buttonIconSpanGap = exports.$buttonPaddingHorizontal = exports.$buttonPaddingVertical = exports.$buttonBorderRadius = void 0;
|
|
4
4
|
exports.buttonVariant = buttonVariant;
|
|
5
5
|
exports.buttonPlain = buttonPlain;
|
|
6
|
+
exports.buttonSize = buttonSize;
|
|
6
7
|
const var_1 = require("../../../styles/var");
|
|
8
|
+
exports.$buttonBorderRadius = {
|
|
9
|
+
large: var_1.$borderRadius.base,
|
|
10
|
+
default: var_1.$borderRadius.base,
|
|
11
|
+
small: parseInt(var_1.$borderRadius.base, 10) - 1 + 'px',
|
|
12
|
+
};
|
|
13
|
+
exports.$buttonPaddingVertical = {
|
|
14
|
+
large: '13px',
|
|
15
|
+
default: '9px',
|
|
16
|
+
small: '6px',
|
|
17
|
+
};
|
|
18
|
+
exports.$buttonPaddingHorizontal = {
|
|
19
|
+
large: '20px',
|
|
20
|
+
default: '16px',
|
|
21
|
+
small: '12px',
|
|
22
|
+
};
|
|
7
23
|
exports.$buttonIconSpanGap = {
|
|
8
24
|
large: '8px',
|
|
9
25
|
default: '6px',
|
|
@@ -13,26 +29,26 @@ exports.$sizeOpts = {
|
|
|
13
29
|
// mini: {
|
|
14
30
|
// height: $commonComponentSize.small,
|
|
15
31
|
// fontSize: $fontSizeMap.small,
|
|
16
|
-
// padding: $
|
|
17
|
-
// borderRadius: $
|
|
32
|
+
// padding: $buttonPaddingVertical.small + ' ' + $buttonPaddingHorizontal.small,
|
|
33
|
+
// borderRadius: $buttonBorderRadius.small
|
|
18
34
|
// },
|
|
19
35
|
small: {
|
|
20
36
|
height: var_1.$commonComponentSize.small,
|
|
21
37
|
fontSize: var_1.$fontSizeMap.small,
|
|
22
|
-
padding:
|
|
23
|
-
borderRadius:
|
|
38
|
+
padding: exports.$buttonPaddingVertical.small + ' ' + exports.$buttonPaddingHorizontal.small,
|
|
39
|
+
borderRadius: exports.$buttonBorderRadius.small
|
|
24
40
|
},
|
|
25
41
|
default: {
|
|
26
42
|
height: var_1.$commonComponentSize.default,
|
|
27
43
|
fontSize: var_1.$fontSizeMap.default,
|
|
28
|
-
padding:
|
|
29
|
-
borderRadius:
|
|
44
|
+
padding: exports.$buttonPaddingVertical.default + ' ' + exports.$buttonPaddingHorizontal.default,
|
|
45
|
+
borderRadius: exports.$buttonBorderRadius.default
|
|
30
46
|
},
|
|
31
47
|
large: {
|
|
32
48
|
height: var_1.$commonComponentSize.large,
|
|
33
49
|
fontSize: var_1.$fontSizeMap.large,
|
|
34
|
-
padding:
|
|
35
|
-
borderRadius:
|
|
50
|
+
padding: exports.$buttonPaddingVertical.large + ' ' + exports.$buttonPaddingHorizontal.large,
|
|
51
|
+
borderRadius: exports.$buttonBorderRadius.large
|
|
36
52
|
}
|
|
37
53
|
};
|
|
38
54
|
exports.$tdButtonBase = {
|
|
@@ -55,9 +71,9 @@ exports.$tdButtonBase = {
|
|
|
55
71
|
appearance: 'none',
|
|
56
72
|
// '-webkit-appearance': 'none',
|
|
57
73
|
backgroundColor: var_1.$button.bgColor, // getCssVar('button', 'bg-color');
|
|
58
|
-
|
|
59
|
-
borderWidth:
|
|
60
|
-
borderStyle:
|
|
74
|
+
border: var_1.$border, // getCssVar('border'),
|
|
75
|
+
// borderWidth: $borderWidth,
|
|
76
|
+
// borderStyle: $borderStyle,
|
|
61
77
|
borderColor: var_1.$button.borderColor, // getCssVar('button', 'border-color');
|
|
62
78
|
padding: '8px 15px'
|
|
63
79
|
};
|
|
@@ -158,8 +174,18 @@ for (const $type of [
|
|
|
158
174
|
buttonPlain($type);
|
|
159
175
|
}
|
|
160
176
|
exports.$borderRightColor = 'rgba(255, 255, 255, .5)';
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
};
|
|
177
|
+
// export const $buttonBorderRadius = {
|
|
178
|
+
// large: $borderRadius.base,
|
|
179
|
+
// default: $borderRadius.base,
|
|
180
|
+
// small: parseInt($borderRadius.base) - 1 + 'px',
|
|
181
|
+
// };
|
|
182
|
+
function buttonSize($paddingVertical, $paddingHorizontal, $fontSize, $borderRadius) {
|
|
183
|
+
return {
|
|
184
|
+
padding: $paddingVertical + ' ' + $paddingHorizontal,
|
|
185
|
+
fontSize: $fontSize,
|
|
186
|
+
borderRadius: $borderRadius + '',
|
|
187
|
+
// &.is-round {
|
|
188
|
+
// padding: $padding-vertical $padding-horizontal;
|
|
189
|
+
// }
|
|
190
|
+
};
|
|
191
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { TdButton } from '../td-button/td-button.class';
|
|
3
3
|
import { ITdButtonGroup, ITdButtonGroupConfig } from './td-button-group.interface';
|
|
4
|
-
export declare class TdButtonGroup extends
|
|
4
|
+
export declare class TdButtonGroup extends TypeDiv implements ITdButtonGroup {
|
|
5
5
|
className: 'TdButtonGroup';
|
|
6
|
+
childNodes: TdButton[];
|
|
6
7
|
constructor(params: ITdButtonGroupConfig);
|
|
7
8
|
setup(): void;
|
|
8
9
|
addBtnStyle(btn: TdButton, index: number): void;
|
|
@@ -1,67 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdButtonGroup = void 0;
|
|
4
|
-
const
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const td_button_style_1 = require("../td-button/td-button.style");
|
|
6
|
-
|
|
7
|
-
class TdButtonGroup extends ui_abstract_1.UI {
|
|
6
|
+
class TdButtonGroup extends framework_1.TypeDiv {
|
|
8
7
|
constructor(params) {
|
|
9
|
-
super(
|
|
8
|
+
super();
|
|
10
9
|
this.className = 'TdButtonGroup';
|
|
10
|
+
this.attr.addName('td-button-group');
|
|
11
11
|
this.style.addObj({
|
|
12
12
|
display: 'inline-block',
|
|
13
|
-
verticalAlign: 'middle'
|
|
13
|
+
verticalAlign: 'middle',
|
|
14
14
|
});
|
|
15
|
+
this.childNodes = [];
|
|
15
16
|
if (params === null || params === void 0 ? void 0 : params.slot) {
|
|
16
17
|
this.slotChild(params.slot);
|
|
17
18
|
}
|
|
18
19
|
this.useParams(params);
|
|
19
20
|
}
|
|
20
21
|
setup() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
22
|
+
console.log('td-button-group setup . ');
|
|
23
|
+
this.childNodes.forEach((btn, index) => {
|
|
24
|
+
if (this.childNodes.length > 1) {
|
|
25
|
+
this.setBtnStyle(btn, index);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
if (this.children.length > 1) {
|
|
36
|
-
this.setBtnStyle(btn, index);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
mouseleave: () => {
|
|
40
|
-
btn.style.setObj({
|
|
41
|
-
zIndex: 1
|
|
42
|
-
});
|
|
43
|
-
if (this.children.length > 1) {
|
|
44
|
-
this.setBtnStyle(btn, index);
|
|
45
|
-
}
|
|
27
|
+
btn.addEvents({
|
|
28
|
+
mouseenter: () => {
|
|
29
|
+
btn.style.setObj({
|
|
30
|
+
zIndex: 1,
|
|
31
|
+
});
|
|
32
|
+
if (this.childNodes.length > 1) {
|
|
33
|
+
this.setBtnStyle(btn, index);
|
|
46
34
|
}
|
|
47
|
-
}
|
|
48
|
-
|
|
35
|
+
},
|
|
36
|
+
mouseleave: () => {
|
|
37
|
+
btn.style.setObj({
|
|
38
|
+
zIndex: 1,
|
|
39
|
+
});
|
|
40
|
+
if (this.childNodes.length > 1) {
|
|
41
|
+
this.setBtnStyle(btn, index);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
});
|
|
49
45
|
});
|
|
50
46
|
}
|
|
51
47
|
addBtnStyle(btn, index) {
|
|
48
|
+
console.log('td-button-group addBtnStyle . ');
|
|
52
49
|
if (index === 0) {
|
|
53
50
|
btn.style.addObj({
|
|
54
51
|
borderTopRightRadius: 0,
|
|
55
52
|
borderBottomRightRadius: 0,
|
|
56
53
|
marginRight: '-1px',
|
|
57
|
-
borderRightColor: td_button_style_1.$borderRightColor
|
|
54
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
58
55
|
});
|
|
59
56
|
}
|
|
60
57
|
else if (index === this.children.length - 1) {
|
|
61
58
|
btn.style.addObj({
|
|
62
59
|
borderTopLeftRadius: 0,
|
|
63
60
|
borderBottomLeftRadius: 0,
|
|
64
|
-
borderLeftColor: td_button_style_1.$borderRightColor
|
|
61
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
65
62
|
});
|
|
66
63
|
}
|
|
67
64
|
else {
|
|
@@ -71,7 +68,7 @@ class TdButtonGroup extends ui_abstract_1.UI {
|
|
|
71
68
|
borderBottomRightRadius: 0,
|
|
72
69
|
borderBottomLeftRadius: 0,
|
|
73
70
|
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
74
|
-
borderRightColor: td_button_style_1.$borderRightColor
|
|
71
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
75
72
|
});
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -81,14 +78,14 @@ class TdButtonGroup extends ui_abstract_1.UI {
|
|
|
81
78
|
borderTopRightRadius: 0,
|
|
82
79
|
borderBottomRightRadius: 0,
|
|
83
80
|
marginRight: '-1px',
|
|
84
|
-
borderRightColor: td_button_style_1.$borderRightColor
|
|
81
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
85
82
|
});
|
|
86
83
|
}
|
|
87
84
|
else if (index === this.children.length - 1) {
|
|
88
85
|
btn.style.setObj({
|
|
89
86
|
borderTopLeftRadius: 0,
|
|
90
87
|
borderBottomLeftRadius: 0,
|
|
91
|
-
borderLeftColor: td_button_style_1.$borderRightColor
|
|
88
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
92
89
|
});
|
|
93
90
|
}
|
|
94
91
|
else {
|
|
@@ -98,7 +95,7 @@ class TdButtonGroup extends ui_abstract_1.UI {
|
|
|
98
95
|
borderBottomRightRadius: 0,
|
|
99
96
|
borderBottomLeftRadius: 0,
|
|
100
97
|
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
101
|
-
borderRightColor: td_button_style_1.$borderRightColor
|
|
98
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
102
99
|
});
|
|
103
100
|
}
|
|
104
101
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { IButtonSize, IButtonType, ITdButtonConfig } from '../td-button/td-button.interface';
|
|
3
|
-
export interface ITdButtonGroup extends
|
|
3
|
+
export interface ITdButtonGroup extends ITypeDiv {
|
|
4
4
|
className: 'TdButtonGroup';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdButtonGroupConfig extends
|
|
6
|
+
export interface ITdButtonGroupConfig extends ITypeConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description control the size of buttons in this button-group
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
2
|
import { ITdAside, ITdAsideConfig } from './td-aside.interface';
|
|
3
|
-
export declare class TdAside extends
|
|
3
|
+
export declare class TdAside extends TypeDiv implements ITdAside {
|
|
4
4
|
className: 'TdAside';
|
|
5
5
|
props: ITdAsideConfig;
|
|
6
6
|
constructor(params?: ITdAsideConfig);
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdAside = void 0;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
|
-
const
|
|
6
|
-
class TdAside extends
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
class TdAside extends framework_1.TypeDiv {
|
|
7
7
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
8
|
+
super();
|
|
9
9
|
this.className = 'TdAside';
|
|
10
|
+
this.attr.addName('td-aside');
|
|
10
11
|
this.style.addObj({
|
|
11
12
|
overflow: 'auto',
|
|
12
13
|
boxSizing: 'border-box',
|
|
13
14
|
flexShrink: 0,
|
|
14
|
-
width: (params === null || params === void 0 ? void 0 : params.width) ? (0, utils_1.addUnit)(params.width) : '300px'
|
|
15
|
+
width: (params === null || params === void 0 ? void 0 : params.width) ? (0, utils_1.addUnit)(params.width) : '300px',
|
|
15
16
|
});
|
|
16
|
-
this.
|
|
17
|
+
this.slotChild(params.slot);
|
|
17
18
|
this.props = this.useParams(params);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdAside extends
|
|
1
|
+
import { ITypeConfig, ITypeDiv } from '@type-dom/framework';
|
|
2
|
+
export interface ITdAside extends ITypeDiv {
|
|
3
3
|
className: 'TdAside';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdAsideConfig extends
|
|
5
|
+
export interface ITdAsideConfig extends ITypeConfig {
|
|
6
6
|
width?: string | number;
|
|
7
7
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TypeElement } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { TypeElement, TypeSection } from '@type-dom/framework';
|
|
3
2
|
import { TdAside } from './td-aside/td-aside.class';
|
|
4
3
|
import { TdHeader } from './td-header/td-header.class';
|
|
5
4
|
import { TdMain } from './td-main/td-main.class';
|
|
6
5
|
import { ITdContainer, ITdContainerConfig } from './td-container.interface';
|
|
7
|
-
export declare class TdContainer extends
|
|
6
|
+
export declare class TdContainer extends TypeSection implements ITdContainer {
|
|
8
7
|
className: 'TdContainer';
|
|
9
8
|
props: ITdContainerConfig;
|
|
10
9
|
childNodes: (TdAside | TdHeader | TdMain | TdContainer | TypeElement)[];
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdContainer = void 0;
|
|
4
|
-
const
|
|
5
|
-
class TdContainer extends
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
class TdContainer extends framework_1.TypeSection {
|
|
6
6
|
constructor(params = {}) {
|
|
7
|
-
super(
|
|
7
|
+
super();
|
|
8
8
|
this.className = 'TdContainer';
|
|
9
|
-
this.
|
|
10
|
-
this.attr.
|
|
9
|
+
this.childNodes = [];
|
|
10
|
+
this.attr.addObj({
|
|
11
|
+
name: 'td-container',
|
|
12
|
+
class: 'td-container'
|
|
13
|
+
});
|
|
11
14
|
this.style.addObj({
|
|
12
15
|
display: 'flex',
|
|
13
16
|
flexDirection: 'row', // vertical ===> column
|
|
@@ -16,13 +19,12 @@ class TdContainer extends ui_abstract_1.UI {
|
|
|
16
19
|
boxSizing: 'border-box',
|
|
17
20
|
minWidth: 0
|
|
18
21
|
});
|
|
19
|
-
this.childNodes = [];
|
|
20
22
|
if (params === null || params === void 0 ? void 0 : params.vertical) {
|
|
21
23
|
this.style.addObj({
|
|
22
24
|
flexDirection: 'column'
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
|
-
this.
|
|
27
|
+
this.slotChild(params.slot);
|
|
26
28
|
this.props = this.useParams(params);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { TypeElement } from '@type-dom/framework';
|
|
2
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
1
|
+
import { ITypeConfig, ITypeSection, TypeElement } from '@type-dom/framework';
|
|
3
2
|
import { TdAside } from './td-aside/td-aside.class';
|
|
4
3
|
import { TdHeader } from './td-header/td-header.class';
|
|
5
4
|
import { TdMain } from './td-main/td-main.class';
|
|
6
5
|
import { TdContainer } from './td-container.class';
|
|
7
|
-
export interface ITdContainer extends
|
|
6
|
+
export interface ITdContainer extends ITypeSection {
|
|
8
7
|
className: 'TdContainer';
|
|
9
8
|
}
|
|
10
|
-
export interface ITdContainerConfig extends
|
|
9
|
+
export interface ITdContainerConfig extends ITypeConfig {
|
|
11
10
|
name?: string;
|
|
12
11
|
vertical?: boolean;
|
|
13
12
|
direction?: 'vertical' | 'horizontal';
|
|
@@ -10,8 +10,9 @@ class TdContainerComp extends HTMLElement {
|
|
|
10
10
|
connectedCallback() {
|
|
11
11
|
// 省去了监听document加载完毕
|
|
12
12
|
const title = 'td-container';
|
|
13
|
-
const container = new td_container_class_1.TdContainer(
|
|
14
|
-
|
|
13
|
+
const container = new td_container_class_1.TdContainer({
|
|
14
|
+
attrObj: { name: title },
|
|
15
|
+
});
|
|
15
16
|
// 渲染
|
|
16
17
|
container.mount();
|
|
17
18
|
console.log('container is ', container);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeFooter } from '@type-dom/framework';
|
|
2
2
|
import type { ITdFooter, ITdFooterConfig } from './td-footer.interface';
|
|
3
|
-
export declare class TdFooter extends
|
|
3
|
+
export declare class TdFooter extends TypeFooter implements ITdFooter {
|
|
4
4
|
className: 'TdFooter';
|
|
5
5
|
props: ITdFooterConfig;
|
|
6
6
|
constructor(params?: ITdFooterConfig);
|