@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
|
@@ -3,24 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdInput = 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_input_wrapper_class_1 = require("./widget/td-input-wrapper.class");
|
|
9
8
|
const td_input_style_1 = require("./td-input.style");
|
|
10
9
|
const td_textarea_wrapper_1 = require("./widget/td-textarea-wrapper");
|
|
11
|
-
class TdInput extends
|
|
10
|
+
class TdInput extends framework_1.TypeDiv {
|
|
12
11
|
constructor(params = {}) {
|
|
13
|
-
super(
|
|
12
|
+
super();
|
|
14
13
|
console.log('TdInput constructor . ');
|
|
15
14
|
this.className = 'TdInput';
|
|
16
|
-
this.attr.addName('td-input');
|
|
17
15
|
this.attr.addObj({
|
|
16
|
+
name: 'td-input',
|
|
18
17
|
tabIndex: 0
|
|
19
18
|
});
|
|
20
19
|
this.style.addObj({
|
|
21
20
|
position: 'relative',
|
|
22
21
|
display: 'inline-flex',
|
|
23
22
|
width: '100%',
|
|
23
|
+
// width: '95%',
|
|
24
24
|
boxSizing: 'border-box',
|
|
25
25
|
verticalAlign: 'middle',
|
|
26
26
|
// fontSize: var(--el-font-size-base),
|
|
@@ -33,35 +33,27 @@ class TdInput extends ui_abstract_1.UI {
|
|
|
33
33
|
if (params === null || params === void 0 ? void 0 : params.modelValue) {
|
|
34
34
|
this.modelValue = params.modelValue;
|
|
35
35
|
}
|
|
36
|
-
this.props = this.useParams(params);
|
|
37
|
-
}
|
|
38
|
-
get value() {
|
|
39
|
-
return this.panel.inner.value;
|
|
40
|
-
}
|
|
41
|
-
setup() {
|
|
42
|
-
const props = this.props;
|
|
43
|
-
if (props === null || props === void 0 ? void 0 : props.width) {
|
|
44
|
-
this.style.addWidth(props.width);
|
|
45
|
-
}
|
|
46
36
|
// todo
|
|
47
|
-
if ((
|
|
48
|
-
|
|
49
|
-
this.panel = new td_textarea_wrapper_1.TdTextareaWrapper(
|
|
37
|
+
if ((params === null || params === void 0 ? void 0 : params.type) === 'textarea') {
|
|
38
|
+
params.parent = this;
|
|
39
|
+
this.panel = new td_textarea_wrapper_1.TdTextareaWrapper(params);
|
|
50
40
|
// this.textareaWrapper = new TdTextareaWrapper(props);
|
|
51
41
|
}
|
|
52
42
|
else {
|
|
53
|
-
this.panel = new td_input_wrapper_class_1.TdInputWrapper(
|
|
43
|
+
this.panel = new td_input_wrapper_class_1.TdInputWrapper(params);
|
|
54
44
|
}
|
|
55
|
-
if (
|
|
56
|
-
this.placeholder =
|
|
45
|
+
if (params === null || params === void 0 ? void 0 : params.placeholder) {
|
|
46
|
+
this.placeholder = params.placeholder;
|
|
57
47
|
}
|
|
58
|
-
this.panel.setParent(this);
|
|
59
48
|
this.addChild(this.panel);
|
|
60
|
-
if (
|
|
49
|
+
if (params === null || params === void 0 ? void 0 : params.width) {
|
|
50
|
+
this.style.addWidth(params.width);
|
|
51
|
+
}
|
|
52
|
+
if (!(params === null || params === void 0 ? void 0 : params.formatter) && (params === null || params === void 0 ? void 0 : params.parser)) {
|
|
61
53
|
throw new Error('If you set the parser, you also need to set the formatter');
|
|
62
54
|
}
|
|
63
|
-
if (
|
|
64
|
-
|
|
55
|
+
if (params.disabled) {
|
|
56
|
+
// this.panel.setDisabled(true);
|
|
65
57
|
}
|
|
66
58
|
this.addEvents({
|
|
67
59
|
mouseleave: (evt) => {
|
|
@@ -138,9 +130,13 @@ class TdInput extends ui_abstract_1.UI {
|
|
|
138
130
|
this.emit('keydown', evt, element);
|
|
139
131
|
}
|
|
140
132
|
});
|
|
141
|
-
if (
|
|
142
|
-
|
|
133
|
+
if (params.type === 'textarea') {
|
|
134
|
+
// ????
|
|
143
135
|
}
|
|
136
|
+
this.props = this.useParams(params);
|
|
137
|
+
}
|
|
138
|
+
get value() {
|
|
139
|
+
return this.panel.inner.value;
|
|
144
140
|
}
|
|
145
141
|
setModelValue(value) {
|
|
146
142
|
console.log('setModelValue . value is ', value);
|
|
@@ -197,6 +193,14 @@ class TdInput extends ui_abstract_1.UI {
|
|
|
197
193
|
});
|
|
198
194
|
}
|
|
199
195
|
}
|
|
196
|
+
setShow(show, display = 'inline-flex') {
|
|
197
|
+
this.style.setObj({
|
|
198
|
+
display: show ? display : 'none'
|
|
199
|
+
});
|
|
200
|
+
this.panel.style.setObj({
|
|
201
|
+
display: show ? display : 'none'
|
|
202
|
+
});
|
|
203
|
+
}
|
|
200
204
|
created() {
|
|
201
205
|
// 注: 绑定变量要渲染前处理,而不是创建对象时处理
|
|
202
206
|
if (this.props.modelValue) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IJsonDataProp, InputEnum, IObDataProp, Span, TypeSvgSvg } from '@type-dom/framework';
|
|
1
|
+
import { IJsonDataProp, InputEnum, IObDataProp, ITypeConfig, ITypeDiv, Span, TypeSvgSvg } from '@type-dom/framework';
|
|
2
2
|
import { ISize } from '../../../styles/size';
|
|
3
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
4
3
|
import { TdInput } from './td-input.class';
|
|
5
|
-
export interface ITdInput extends
|
|
4
|
+
export interface ITdInput extends ITypeDiv {
|
|
6
5
|
className: 'TdInput';
|
|
7
6
|
}
|
|
8
|
-
export interface ITdInputConfig extends
|
|
7
|
+
export interface ITdInputConfig extends ITypeConfig {
|
|
9
8
|
parent?: TdInput;
|
|
10
9
|
/**
|
|
11
10
|
* @description native input id
|
|
@@ -11,7 +11,7 @@ class TdInputSuffix extends framework_1.TypeSpan {
|
|
|
11
11
|
this.parent = parent;
|
|
12
12
|
this.className = 'TdInputSuffix';
|
|
13
13
|
this.style.addObj({
|
|
14
|
-
display:
|
|
14
|
+
display: 'inline-flex',
|
|
15
15
|
whiteSpace: 'nowrap',
|
|
16
16
|
flexShrink: 0,
|
|
17
17
|
flexWrap: 'nowrap',
|
|
@@ -116,5 +116,10 @@ class TdInputSuffix extends framework_1.TypeSpan {
|
|
|
116
116
|
this.suffixInner.addChild(this.suffixIcon);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
setup() {
|
|
120
|
+
this.style.addObj({
|
|
121
|
+
display: this.parent.suffixVisible ? 'inline-flex' : 'none' // constructor 中this.parent.suffixVisible是undefined
|
|
122
|
+
});
|
|
123
|
+
}
|
|
119
124
|
}
|
|
120
125
|
exports.TdInputSuffix = TdInputSuffix;
|
|
@@ -182,7 +182,7 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
182
182
|
color: var_1.$textColor.disabled,
|
|
183
183
|
// -webkit-text-fill-color: var(--el-disabled-text-color),
|
|
184
184
|
WebkitTextFillColor: var_1.$textColor.disabled,
|
|
185
|
-
cursor: '
|
|
185
|
+
cursor: 'not-allowed'
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
@@ -226,14 +226,14 @@ class TdInputWrapper extends framework_1.TypeDiv {
|
|
|
226
226
|
// }
|
|
227
227
|
// }
|
|
228
228
|
setShowClear(showClear) {
|
|
229
|
-
var _a;
|
|
229
|
+
var _a, _b, _c;
|
|
230
230
|
console.log('setShowClear . showClear is ', showClear);
|
|
231
231
|
this.suffix.style.show(this.suffixVisible ? 'inline-flex' : 'none');
|
|
232
|
-
(_a = this.suffix
|
|
232
|
+
(_c = (_b = (_a = this.suffix) === null || _a === void 0 ? void 0 : _a.clearIcon) === null || _b === void 0 ? void 0 : _b.style) === null || _c === void 0 ? void 0 : _c.show(showClear ? 'inline-flex' : 'none');
|
|
233
233
|
}
|
|
234
234
|
setShowPassword(showPassword) {
|
|
235
|
-
var _a;
|
|
236
|
-
(_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.style.show(showPassword ? 'inline-flex' : 'none');
|
|
235
|
+
var _a, _b;
|
|
236
|
+
(_b = (_a = this.suffix.passwordIcon) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.show(showPassword ? 'inline-flex' : 'none');
|
|
237
237
|
}
|
|
238
238
|
setNativeInputValue() {
|
|
239
239
|
console.log('setNativeInputValue . ');
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.calcTextareaHeight = calcTextareaHeight;
|
|
4
4
|
const utils_1 = require("@type-dom/utils");
|
|
5
5
|
let hiddenTextarea = undefined;
|
|
6
|
-
const HIDDEN_STYLE = `
|
|
7
|
-
height:0 !important;
|
|
8
|
-
visibility:hidden !important;
|
|
9
|
-
${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
|
|
10
|
-
position:absolute !important;
|
|
11
|
-
z-index:-1000 !important;
|
|
12
|
-
top:0 !important;
|
|
13
|
-
right:0 !important;
|
|
6
|
+
const HIDDEN_STYLE = `
|
|
7
|
+
height:0 !important;
|
|
8
|
+
visibility:hidden !important;
|
|
9
|
+
${utils_1.isFireFox ? '' : 'overflow:hidden !important;'}
|
|
10
|
+
position:absolute !important;
|
|
11
|
+
z-index:-1000 !important;
|
|
12
|
+
top:0 !important;
|
|
13
|
+
right:0 !important;
|
|
14
14
|
`;
|
|
15
15
|
const CONTEXT_STYLE = [
|
|
16
16
|
'letter-spacing',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
2
1
|
import { ITdOption, ITdOptionConfig } from './td-option.interface';
|
|
3
|
-
|
|
2
|
+
import { TypeLI } from '@type-dom/framework';
|
|
3
|
+
export declare class TdOption extends TypeLI implements ITdOption {
|
|
4
4
|
className: 'TdOption';
|
|
5
5
|
props: ITdOptionConfig;
|
|
6
6
|
constructor(params?: ITdOptionConfig);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdOption = void 0;
|
|
4
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
4
|
const td_select_style_1 = require("../td-select/td-select.style");
|
|
6
|
-
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
class TdOption extends framework_1.TypeLI {
|
|
7
7
|
constructor(params = {}) {
|
|
8
|
-
super(
|
|
8
|
+
super();
|
|
9
9
|
this.className = 'TdOption';
|
|
10
10
|
this.attr.addObj({
|
|
11
11
|
name: 'td-option',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdOption extends
|
|
1
|
+
import { ITypeConfig, ITypeLI } from '@type-dom/framework';
|
|
2
|
+
export interface ITdOption extends ITypeLI {
|
|
3
3
|
className: 'TdOption';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdOptionConfig extends
|
|
5
|
+
export interface ITdOptionConfig extends ITypeConfig {
|
|
6
6
|
/**
|
|
7
7
|
* @description value of option
|
|
8
8
|
* required: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeUL } from '@type-dom/framework';
|
|
2
2
|
import { ITdOptionGroup, ITdOptionGroupConfig } from './td-option-group.interface';
|
|
3
|
-
export declare class TdOptionGroup extends
|
|
3
|
+
export declare class TdOptionGroup extends TypeUL implements ITdOptionGroup {
|
|
4
4
|
className: 'TdOptionGroup';
|
|
5
5
|
props: ITdOptionGroupConfig;
|
|
6
6
|
constructor(params?: ITdOptionGroupConfig);
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdOptionGroup = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const td_select_style_1 = require("../td-select/td-select.style");
|
|
7
|
-
class TdOptionGroup extends
|
|
6
|
+
class TdOptionGroup extends framework_1.TypeUL {
|
|
8
7
|
constructor(params = {}) {
|
|
9
|
-
super(
|
|
8
|
+
super();
|
|
10
9
|
this.className = 'TdOptionGroup';
|
|
11
10
|
this.attr.addObj({
|
|
12
11
|
name: 'option-group-wrap'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ITdOptionGroup extends
|
|
1
|
+
import { ITypeConfig, ITypeUL } from '@type-dom/framework';
|
|
2
|
+
export interface ITdOptionGroup extends ITypeUL {
|
|
3
3
|
className: 'TdOptionGroup';
|
|
4
4
|
}
|
|
5
|
-
export interface ITdOptionGroupConfig extends
|
|
5
|
+
export interface ITdOptionGroupConfig extends ITypeConfig {
|
|
6
6
|
/**
|
|
7
7
|
* @description name of the group
|
|
8
8
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Input, Span } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Input, Span, TypeLabel } from '@type-dom/framework';
|
|
3
2
|
import { ITdRadio, ITdRadioConfig } from './td-radio.interface';
|
|
4
|
-
export declare class TdRadio extends
|
|
3
|
+
export declare class TdRadio extends TypeLabel implements ITdRadio {
|
|
5
4
|
className: 'TdRadio';
|
|
6
5
|
props: ITdRadioConfig;
|
|
7
6
|
inputOriginal: Input;
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdRadio = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const var_1 = require("../../../styles/var");
|
|
7
6
|
const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
|
|
8
|
-
class TdRadio extends
|
|
7
|
+
class TdRadio extends framework_1.TypeLabel {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
10
|
+
// this.useTag('label');
|
|
11
11
|
this.className = 'TdRadio';
|
|
12
|
+
this.attr.addObj({
|
|
13
|
+
name: 'td-radio'
|
|
14
|
+
});
|
|
12
15
|
this.style.addObj({
|
|
13
16
|
color: var_1.$textColor.regular,
|
|
14
17
|
fontWeight: var_1.$fontWeightPrimary,
|
|
@@ -160,7 +163,7 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
160
163
|
this.disabled = disabled;
|
|
161
164
|
if (disabled) {
|
|
162
165
|
this.style.setObj({
|
|
163
|
-
cursor: '
|
|
166
|
+
cursor: 'not-allowed',
|
|
164
167
|
opacity: 0.5
|
|
165
168
|
// 禁用事件
|
|
166
169
|
// pointerEvents: 'none',
|
|
@@ -170,7 +173,7 @@ class TdRadio extends ui_abstract_1.UI {
|
|
|
170
173
|
});
|
|
171
174
|
this.inputOriginal.attr.setObj({ disabled: true });
|
|
172
175
|
this.inputInner.style.setObj({
|
|
173
|
-
cursor: '
|
|
176
|
+
cursor: 'not-allowed',
|
|
174
177
|
// color: $colors.default.base,
|
|
175
178
|
// borderWidth: '1px',
|
|
176
179
|
// borderStyle: 'solid',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ITypeConfig, ITypeLabel } from '@type-dom/framework';
|
|
1
2
|
import { ISize } from '../../../styles/size';
|
|
2
|
-
|
|
3
|
-
export interface ITdRadio extends IUI {
|
|
3
|
+
export interface ITdRadio extends ITypeLabel {
|
|
4
4
|
className: 'TdRadio';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdRadioConfig extends
|
|
6
|
+
export interface ITdRadioConfig extends ITypeConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description binding value
|
|
9
9
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Input, Span } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
1
|
+
import { Input, Span, TypeLabel } from '@type-dom/framework';
|
|
3
2
|
import { ITdRadioButton, ITdRadioButtonConfig } from './td-radio-button.interface';
|
|
4
|
-
export declare class TdRadioButton extends
|
|
3
|
+
export declare class TdRadioButton extends TypeLabel implements ITdRadioButton {
|
|
5
4
|
className: 'TdRadioButton';
|
|
6
5
|
inputOriginal: Input;
|
|
7
6
|
radioLabel: Span;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TdRadioButton = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
5
|
const var_1 = require("../../../styles/var");
|
|
6
|
-
const
|
|
6
|
+
const td_button_style_1 = require("../../basic/td-button/td-button.style");
|
|
7
7
|
const td_radio_group_class_1 = require("../td-radio-group/td-radio-group.class");
|
|
8
|
-
class TdRadioButton extends
|
|
8
|
+
class TdRadioButton extends framework_1.TypeLabel {
|
|
9
9
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
10
|
+
super();
|
|
11
11
|
this.className = 'TdRadioButton';
|
|
12
12
|
this.attr.addName('radio-button');
|
|
13
13
|
this.style.addObj({
|
|
@@ -61,7 +61,7 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
61
61
|
// color: $buttonTextColor.default,
|
|
62
62
|
// transition: getCssVar('transition-all'),
|
|
63
63
|
fontSize: var_1.$fontSizes.base,
|
|
64
|
-
padding:
|
|
64
|
+
padding: td_button_style_1.$buttonPaddingVertical.default + ' ' + td_button_style_1.$buttonPaddingHorizontal.default
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
this.addChildren(this.inputOriginal, this.radioLabel);
|
|
@@ -93,11 +93,11 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
93
93
|
height: var_1.$commonComponentSize[size]
|
|
94
94
|
});
|
|
95
95
|
this.radioLabel.style.addObj({
|
|
96
|
-
padding:
|
|
96
|
+
padding: td_button_style_1.$buttonPaddingVertical[size] + ' ' + td_button_style_1.$buttonPaddingHorizontal[size],
|
|
97
97
|
fontSize: var_1.$fontSizes[size]
|
|
98
98
|
});
|
|
99
99
|
if (props === null || props === void 0 ? void 0 : props.isFirst) {
|
|
100
|
-
const radius =
|
|
100
|
+
const radius = td_button_style_1.$buttonBorderRadius[size];
|
|
101
101
|
this.radioLabel.style.addObj({
|
|
102
102
|
borderRadius: radius + ' 0 0 ' + radius
|
|
103
103
|
});
|
|
@@ -108,13 +108,13 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
if (props === null || props === void 0 ? void 0 : props.isLast) {
|
|
111
|
-
const radius =
|
|
111
|
+
const radius = td_button_style_1.$buttonBorderRadius[size];
|
|
112
112
|
this.radioLabel.style.addObj({
|
|
113
113
|
borderRadius: '0 ' + radius + ' ' + radius + ' 0'
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
if (props === null || props === void 0 ? void 0 : props.checked) {
|
|
117
|
-
this.setChecked(props === null || props === void 0 ? void 0 : props.checked);
|
|
117
|
+
this.setChecked(!!(props === null || props === void 0 ? void 0 : props.checked));
|
|
118
118
|
}
|
|
119
119
|
if (props === null || props === void 0 ? void 0 : props.disabled) {
|
|
120
120
|
this.setDisabled(props === null || props === void 0 ? void 0 : props.disabled);
|
|
@@ -149,7 +149,7 @@ class TdRadioButton extends ui_abstract_1.UI {
|
|
|
149
149
|
this.disabled = disabled;
|
|
150
150
|
if (disabled) {
|
|
151
151
|
this.style.setObj({
|
|
152
|
-
cursor: '
|
|
152
|
+
cursor: 'not-allowed',
|
|
153
153
|
opacity: 0.5
|
|
154
154
|
// 禁用事件
|
|
155
155
|
// pointerEvents: 'none',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ITypeConfig, ITypeLabel } from '@type-dom/framework';
|
|
1
2
|
import { ISize } from '../../../styles/size';
|
|
2
|
-
|
|
3
|
-
export interface ITdRadioButton extends IUI {
|
|
3
|
+
export interface ITdRadioButton extends ITypeLabel {
|
|
4
4
|
className: 'TdRadioButton';
|
|
5
5
|
}
|
|
6
|
-
export interface ITdRadioButtonConfig extends
|
|
6
|
+
export interface ITdRadioButtonConfig extends ITypeConfig {
|
|
7
7
|
/**
|
|
8
8
|
* @description binding value
|
|
9
9
|
*/
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { IJsonData, IJsonDataProp, IPrimitive } from '@type-dom/framework';
|
|
2
|
-
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
-
import { TdRadio } from '../td-radio/td-radio.class';
|
|
1
|
+
import { IJsonData, IJsonDataProp, IPrimitive, TypeDiv } from '@type-dom/framework';
|
|
4
2
|
import { ITdRadioConfig } from '../td-radio/td-radio.interface';
|
|
5
3
|
import { ITdRadioGroup, ITdRadioGroupConfig } from './td-radio-group.interface';
|
|
6
|
-
export declare class TdRadioGroup extends
|
|
4
|
+
export declare class TdRadioGroup extends TypeDiv implements ITdRadioGroup {
|
|
7
5
|
className: 'TdRadioGroup';
|
|
8
6
|
disabled?: boolean;
|
|
9
|
-
childNodes: TdRadio[];
|
|
10
7
|
props: ITdRadioGroupConfig;
|
|
11
8
|
constructor(params?: ITdRadioGroupConfig);
|
|
12
9
|
get resultValue(): IPrimitive | IJsonData | IJsonDataProp[];
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdRadioGroup = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const td_radio_class_1 = require("../td-radio/td-radio.class");
|
|
7
6
|
const td_radio_button_class_1 = require("../td-radio-button/td-radio-button.class");
|
|
8
|
-
class TdRadioGroup extends
|
|
7
|
+
class TdRadioGroup extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdRadioGroup';
|
|
11
|
+
this.attr.addObj({
|
|
12
|
+
name: 'td-radio-group'
|
|
13
|
+
});
|
|
12
14
|
this.style.addObj({
|
|
13
15
|
display: 'inline-flex',
|
|
14
16
|
alignItems: 'center',
|
|
@@ -16,7 +18,6 @@ class TdRadioGroup extends ui_abstract_1.UI {
|
|
|
16
18
|
fontSize: '0',
|
|
17
19
|
marginRight: '12px',
|
|
18
20
|
});
|
|
19
|
-
this.childNodes = [];
|
|
20
21
|
this.props = this.useParams(params);
|
|
21
22
|
}
|
|
22
23
|
get resultValue() {
|
|
@@ -92,13 +93,15 @@ class TdRadioGroup extends ui_abstract_1.UI {
|
|
|
92
93
|
}
|
|
93
94
|
// console.error('value is ', value);
|
|
94
95
|
this.childNodes.forEach((opt) => {
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
if (opt instanceof td_radio_class_1.TdRadio) {
|
|
97
|
+
if (String(opt.inputOriginal.attr.get('value')) === String(value)) {
|
|
98
|
+
// 设置选中样式
|
|
99
|
+
opt.setChecked(true);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
// 设置非选中样式
|
|
103
|
+
opt.setChecked(false);
|
|
104
|
+
}
|
|
102
105
|
}
|
|
103
106
|
});
|
|
104
107
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { IJsonData, IPrimitive, ITypeConfig, ITypeDiv, XProxy } from '@type-dom/framework';
|
|
1
2
|
import { ISize } from '../../../styles/size';
|
|
2
|
-
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
3
|
import { ITdRadioConfig } from '../td-radio/td-radio.interface';
|
|
4
|
-
|
|
5
|
-
export interface ITdRadioGroup extends IUI {
|
|
4
|
+
export interface ITdRadioGroup extends ITypeDiv {
|
|
6
5
|
className: 'TdRadioGroup';
|
|
7
6
|
}
|
|
8
|
-
export interface ITdRadioGroupConfig extends
|
|
7
|
+
export interface ITdRadioGroupConfig extends ITypeConfig {
|
|
9
8
|
isButton?: boolean;
|
|
10
9
|
options?: ITdRadioConfig[];
|
|
11
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UI } from '../../../../ui/ui.abstract';
|
|
2
1
|
import { ITdSelectDropdown, ITdSelectDropdownConfig } from './dropdown.interface';
|
|
3
|
-
|
|
2
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
3
|
+
export declare class TdSelectDropDown extends TypeDiv implements ITdSelectDropdown {
|
|
4
4
|
className: 'TdSelectDropdown';
|
|
5
5
|
props: ITdSelectDropdownConfig;
|
|
6
6
|
private header?;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdSelectDropDown = void 0;
|
|
4
4
|
const var_1 = require("../../../../styles/var");
|
|
5
|
-
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
6
5
|
const framework_1 = require("@type-dom/framework");
|
|
7
6
|
const td_select_style_1 = require("../td-select.style");
|
|
8
|
-
class TdSelectDropDown extends
|
|
7
|
+
class TdSelectDropDown extends framework_1.TypeDiv {
|
|
9
8
|
constructor(params = {}) {
|
|
10
|
-
super(
|
|
9
|
+
super();
|
|
11
10
|
this.className = 'TdSelectDropdown';
|
|
12
11
|
this.style.addObj({
|
|
13
12
|
// z-index: calc(#{getCssVar('index-top')} + 1);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ITdSelectDropdown extends IUI {
|
|
1
|
+
import { ITypeConfig, ITypeDiv, TypeElement } from '@type-dom/framework';
|
|
2
|
+
export interface ITdSelectDropdown extends ITypeDiv {
|
|
4
3
|
className: 'TdSelectDropdown';
|
|
5
4
|
}
|
|
6
|
-
export interface ITdSelectDropdownConfig extends
|
|
5
|
+
export interface ITdSelectDropdownConfig extends ITypeConfig {
|
|
7
6
|
header?: TypeElement;
|
|
8
7
|
footer?: TypeElement;
|
|
9
8
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare class TdSelect extends UI implements ITdSelect {
|
|
1
|
+
import { TypeDiv } from '@type-dom/framework';
|
|
2
|
+
import { ITdSelect, ITdSelectConfig } from './td-select.interface';
|
|
3
|
+
export declare class TdSelect extends TypeDiv implements ITdSelect {
|
|
5
4
|
className: 'TdSelect';
|
|
6
|
-
|
|
7
|
-
constructor(params?: IUIConfig);
|
|
5
|
+
constructor(params?: ITdSelectConfig);
|
|
8
6
|
}
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdSelect = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
-
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
5
|
const td_tooltip_class_1 = require("../../feedback/td-tooltip/td-tooltip.class");
|
|
7
6
|
const dropdown_class_1 = require("./dropdown/dropdown.class");
|
|
8
|
-
|
|
9
|
-
class TdSelect extends ui_abstract_1.UI {
|
|
7
|
+
class TdSelect extends framework_1.TypeDiv {
|
|
10
8
|
constructor(params = {}) {
|
|
11
|
-
super(
|
|
9
|
+
super();
|
|
12
10
|
this.className = 'TdSelect';
|
|
13
|
-
this.style.addObj(
|
|
11
|
+
// this.style.addObj($select); // todo 应该是 $selectStyle
|
|
14
12
|
this.addChild(new td_tooltip_class_1.TdTooltip({
|
|
15
13
|
slot: [
|
|
16
14
|
new framework_1.Div({
|
|
@@ -20,7 +18,7 @@ class TdSelect extends ui_abstract_1.UI {
|
|
|
20
18
|
name: 'content',
|
|
21
19
|
childNodes: [
|
|
22
20
|
new dropdown_class_1.TdSelectDropDown({
|
|
23
|
-
name: 'content-inner'
|
|
21
|
+
name: 'content-inner'
|
|
24
22
|
})
|
|
25
23
|
]
|
|
26
24
|
})
|