@type-dom/ui 0.0.2 → 0.0.4
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 +45 -11
- package/package.json +7 -1
- package/src/aria.d.ts +17 -0
- package/src/aria.js +20 -0
- package/src/{basic → components/basic}/index.d.ts +14 -0
- package/src/components/basic/index.js +55 -0
- package/src/{basic → components/basic}/td-button/td-button.class.d.ts +7 -5
- package/src/components/basic/td-button/td-button.class.js +179 -0
- package/src/{basic → components/basic}/td-button/td-button.interface.d.ts +21 -21
- package/src/{basic → components/basic}/td-button/td-button.style.d.ts +2 -1
- package/src/{basic → components/basic}/td-button/td-button.style.js +34 -30
- package/src/components/basic/td-button-group/td-button-group.class.d.ts +11 -0
- package/src/components/basic/td-button-group/td-button-group.class.js +105 -0
- package/src/components/basic/td-button-group/td-button-group.interface.d.ts +16 -0
- package/src/components/basic/td-container/td-aside/td-aside.class.d.ts +6 -0
- package/src/{basic → components/basic}/td-container/td-aside/td-aside.class.js +4 -4
- package/src/components/basic/td-container/td-aside/td-aside.interface.d.ts +7 -0
- package/src/components/basic/td-container/td-container.class.d.ts +11 -0
- package/src/{basic → components/basic}/td-container/td-container.class.js +4 -4
- package/src/components/basic/td-container/td-container.interface.d.ts +15 -0
- package/src/components/basic/td-container/td-footer/td-footer.class.d.ts +8 -0
- package/src/components/basic/td-container/td-footer/td-footer.class.js +24 -0
- package/src/components/basic/td-container/td-footer/td-footer.interface.d.ts +8 -0
- package/src/components/basic/td-container/td-header/td-header.class.d.ts +9 -0
- package/src/components/basic/td-container/td-header/td-header.class.js +25 -0
- package/src/components/basic/td-container/td-header/td-header.interface.d.ts +8 -0
- package/src/{basic → components/basic}/td-container/td-main/td-main.class.d.ts +2 -2
- package/src/{basic → components/basic}/td-container/td-main/td-main.class.js +5 -8
- package/src/components/basic/td-container/td-main/td-main.interface.d.ts +7 -0
- package/src/{basic → components/basic}/td-icon/td-icon.class.d.ts +7 -3
- package/src/{basic → components/basic}/td-icon/td-icon.class.js +37 -11
- package/src/components/basic/td-icon/td-icon.interface.d.ts +13 -0
- package/src/{basic → components/basic}/td-icon/td-icon.style.d.ts +1 -0
- package/src/{basic → components/basic}/td-icon/td-icon.style.js +4 -3
- package/src/components/basic/td-layout/td-col/td-col.class.d.ts +13 -0
- package/src/components/basic/td-layout/td-col/td-col.class.js +128 -0
- package/src/components/basic/td-layout/td-col/td-col.interface.d.ts +46 -0
- package/src/components/basic/td-layout/td-row/td-row.class.d.ts +10 -0
- package/src/components/basic/td-layout/td-row/td-row.class.js +101 -0
- package/src/components/basic/td-layout/td-row/td-row.interface.d.ts +18 -0
- package/src/components/basic/td-layout/td-row/td-row.interface.js +12 -0
- package/src/components/basic/td-layout/td-row/td-row.style.d.ts +1 -0
- package/src/components/basic/td-layout/td-row/td-row.style.js +8 -0
- package/src/components/basic/td-link/td-link.class.d.ts +11 -0
- package/src/components/basic/td-link/td-link.class.js +105 -0
- package/src/components/basic/td-link/td-link.interface.d.ts +33 -0
- package/src/components/basic/td-link/td-link.style.d.ts +5 -0
- package/src/components/basic/td-link/td-link.style.js +45 -0
- package/src/components/basic/td-scrollbar/bar/bar.class.d.ts +8 -0
- package/src/components/basic/td-scrollbar/bar/bar.class.js +31 -0
- package/src/components/basic/td-scrollbar/bar/bar.interface.d.ts +8 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.class.d.ts +9 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.class.js +51 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.d.ts +63 -0
- package/src/components/basic/td-scrollbar/td-scrollbar.interface.js +5 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.class.d.ts +7 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.class.js +45 -0
- package/src/components/basic/td-scrollbar/thumb/thumb.interface.d.ts +11 -0
- package/src/components/basic/td-space/td-space.class.d.ts +12 -0
- package/src/components/basic/td-space/td-space.class.js +92 -0
- package/src/components/basic/td-space/td-space.const.d.ts +3 -0
- package/src/components/basic/td-space/td-space.const.js +8 -0
- package/src/components/basic/td-space/td-space.interface.d.ts +39 -0
- package/src/components/basic/td-text/td-text.class.d.ts +10 -0
- package/src/components/basic/td-text/td-text.class.js +47 -0
- package/src/components/basic/td-text/td-text.interface.d.ts +21 -0
- package/src/components/basic/td-text/td-text.style.d.ts +6 -0
- package/src/components/basic/td-text/td-text.style.js +59 -0
- package/src/{feedback/dialog/dialog.d.ts → components/feedback/dialog/dialog.class.d.ts} +2 -3
- package/src/{feedback/dialog/dialog.js → components/feedback/dialog/dialog.class.js} +9 -2
- package/src/components/feedback/dialog/dialog.interface.d.ts +5 -0
- package/src/{feedback → components/feedback}/index.d.ts +1 -1
- package/src/{feedback → components/feedback}/index.js +2 -2
- package/src/{feedback → components/feedback}/message-box/message-box.d.ts +2 -3
- package/src/components/feedback/message-box/message-box.interface.d.ts +4 -0
- package/src/{feedback → components/feedback}/message-box/message-box.js +11 -2
- package/src/{feedback → components/feedback}/overlay/container/body/body.js +7 -9
- package/src/{feedback → components/feedback}/overlay/container/container.js +12 -14
- package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.js +2 -2
- package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.js +9 -11
- package/src/{feedback → components/feedback}/overlay/container/footer/footer.js +4 -4
- package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.js +15 -17
- package/src/{feedback → components/feedback}/overlay/container/header/header.js +2 -2
- package/src/{feedback → components/feedback}/overlay/container/header/title/title.d.ts +1 -1
- package/src/{feedback → components/feedback}/overlay/container/header/title/title.js +9 -11
- package/src/{feedback → components/feedback}/overlay/overlay.abstract.d.ts +0 -3
- package/src/{feedback → components/feedback}/overlay/overlay.abstract.js +5 -11
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.d.ts +8 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.class.js +81 -0
- package/src/components/feedback/td-focus-trap/td-focus-trap.interface.d.ts +10 -0
- package/src/components/feedback/td-focus-trap/tokens.d.ts +7 -0
- package/src/components/feedback/td-focus-trap/tokens.js +23 -0
- package/src/components/feedback/td-focus-trap/utils.d.ts +25 -0
- package/src/components/feedback/td-focus-trap/utils.js +153 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.d.ts +6 -0
- package/src/components/feedback/td-popper/arrow/arrow.class.js +32 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.d.ts +11 -0
- package/src/components/feedback/td-popper/arrow/arrow.interface.js +2 -0
- package/src/components/feedback/td-popper/content/content.class.d.ts +7 -0
- package/src/components/feedback/td-popper/content/content.class.js +25 -0
- package/src/components/feedback/td-popper/content/content.interface.d.ts +37 -0
- package/src/components/feedback/td-popper/content/content.interface.js +2 -0
- package/src/components/feedback/td-popper/td-popper.class.d.ts +6 -0
- package/src/components/feedback/td-popper/td-popper.class.js +12 -0
- package/src/components/feedback/td-popper/td-popper.interface.d.ts +12 -0
- package/src/components/feedback/td-popper/td-popper.interface.js +13 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.d.ts +6 -0
- package/src/components/feedback/td-popper/trigger/trigger.class.js +11 -0
- package/src/components/feedback/td-popper/trigger/trigger.interface.d.ts +8 -0
- package/src/components/feedback/td-popper/trigger/trigger.interface.js +2 -0
- package/src/components/feedback/td-tooltip/content/content.class.d.ts +6 -0
- package/src/components/feedback/td-tooltip/content/content.class.js +12 -0
- package/src/components/feedback/td-tooltip/content/content.interface.d.ts +42 -0
- package/src/components/feedback/td-tooltip/content/content.interface.js +2 -0
- package/src/components/feedback/td-tooltip/td-tooltip.class.d.ts +8 -0
- package/src/components/feedback/td-tooltip/td-tooltip.class.js +30 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.d.ts +10 -0
- package/src/components/feedback/td-tooltip/td-tooltip.interface.js +2 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.class.d.ts +6 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.class.js +12 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.d.ts +16 -0
- package/src/components/feedback/td-tooltip/trigger/trigger.interface.js +2 -0
- package/src/{form → components/form}/checkbox-group/checkbox-group.class.d.ts +2 -3
- package/src/{form → components/form}/checkbox-group/checkbox-group.class.js +2 -2
- package/src/components/form/checkbox-group/checkbox-group.interface.js +2 -0
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.d.ts +2 -2
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.class.js +7 -7
- package/src/{form → components/form}/checkbox-group/checkbox-option/checkbox-option.interface.d.ts +0 -5
- package/src/components/form/checkbox-group/checkbox-option/checkbox-option.interface.js +2 -0
- package/src/components/form/field-item/cascade/field-cascade.abstract.d.ts +22 -0
- package/src/{form → components/form}/field-item/cascade/field-cascade.abstract.js +38 -42
- package/src/components/form/field-item/field-item.abstract.d.ts +10 -0
- package/src/{form → components/form}/field-item/field-item.abstract.js +5 -10
- package/src/components/form/field-item/field-item.interface.d.ts +5 -0
- package/src/components/form/field-item/field-item.interface.js +2 -0
- package/src/{form → components/form}/field-item/field-item.style.d.ts +1 -1
- package/src/{form → components/form}/field-item/field-item.style.js +2 -2
- package/src/{form → components/form}/field-item/input/field-input.abstract.js +6 -8
- package/src/components/form/field-item/options/field-options.abstract.d.ts +21 -0
- package/src/{form → components/form}/field-item/options/field-options.abstract.js +55 -55
- package/src/{form → components/form}/field-item/radio/field-radio.abstract.d.ts +6 -7
- package/src/{form → components/form}/field-item/radio/field-radio.abstract.js +10 -10
- package/src/{form → components/form}/field-item/select/field-select.abstract.js +7 -9
- package/src/{form → components/form}/field-item/span/field-span.abstract.d.ts +1 -1
- package/src/components/form/field-item/span/field-span.abstract.js +52 -0
- package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.js +8 -8
- package/src/components/form/field-select/field-select.class.d.ts +12 -0
- package/src/{basic/td-select/td-select.class.js → components/form/field-select/field-select.class.js} +7 -7
- package/src/{basic/td-select/td-select.interface.d.ts → components/form/field-select/field-select.interface.d.ts} +2 -2
- package/src/components/form/field-select/field-select.interface.js +2 -0
- package/src/{basic/td-select → components/form/field-select}/option/option.class.d.ts +3 -5
- package/src/{basic/td-select → components/form/field-select}/option/option.class.js +3 -5
- package/src/components/form/field-select/option/option.interface.js +2 -0
- package/src/components/form/index.d.ts +26 -0
- package/src/{form → components/form}/index.js +17 -1
- package/src/{form → components/form}/radio-group/radio-group.class.d.ts +5 -6
- package/src/{form → components/form}/radio-group/radio-group.class.js +11 -4
- package/src/components/form/radio-group/radio-group.interface.d.ts +11 -0
- package/src/components/form/radio-group/radio-group.interface.js +2 -0
- package/src/{form → components/form}/radio-group/radio-option/radio-option.class.d.ts +5 -4
- package/src/components/form/radio-group/radio-option/radio-option.class.js +46 -0
- package/src/components/form/radio-group/radio-option/radio-option.interface.d.ts +10 -0
- package/src/components/form/radio-group/radio-option/radio-option.interface.js +2 -0
- package/src/{form → components/form}/select/select.class.d.ts +4 -5
- package/src/{form → components/form}/select/select.class.js +5 -5
- package/src/components/form/select/select.interface.d.ts +4 -0
- package/src/components/form/select/select.interface.js +2 -0
- package/src/components/form/td-checkbox/td-checkbox.class.d.ts +7 -0
- package/src/components/form/td-checkbox/td-checkbox.class.js +104 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.d.ts +78 -0
- package/src/components/form/td-checkbox/td-checkbox.interface.js +2 -0
- package/src/components/form/td-checkbox/td-checkbox.style.d.ts +14 -0
- package/src/components/form/td-checkbox/td-checkbox.style.js +18 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.d.ts +7 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.class.js +15 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.d.ts +6 -0
- package/src/components/form/td-checkbox-button/td-checkbox-button.interface.js +2 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.d.ts +7 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.class.js +20 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.d.ts +50 -0
- package/src/components/form/td-checkbox-group/td-checkbox-group.interface.js +2 -0
- package/src/components/form/td-form/td-form.class.d.ts +22 -0
- package/src/components/form/td-form/td-form.class.js +52 -0
- package/src/components/form/td-form/td-form.interface.d.ts +92 -0
- package/src/components/form/td-form/td-form.interface.js +2 -0
- package/src/components/form/td-form/td-form.style.d.ts +4 -0
- package/src/components/form/td-form/td-form.style.js +8 -0
- package/src/components/form/td-form-item/td-form-item.class.d.ts +17 -0
- package/src/components/form/td-form-item/td-form-item.class.js +145 -0
- package/src/components/form/td-form-item/td-form-item.interface.d.ts +57 -0
- package/src/components/form/td-form-item/td-form-item.interface.js +9 -0
- package/src/components/form/td-form-item/td-form-item.style.d.ts +29 -0
- package/src/components/form/td-form-item/td-form-item.style.js +34 -0
- package/src/components/form/td-input/td-input-field.class.d.ts +7 -0
- package/src/{form/td-input/td-input.class.js → components/form/td-input/td-input-field.class.js} +8 -8
- package/src/{form/td-input/td-input.interface.d.ts → components/form/td-input/td-input-field.interface.d.ts} +3 -3
- package/src/components/form/td-input/td-input-field.interface.js +2 -0
- package/src/components/form/td-input/td-input.class.d.ts +21 -0
- package/src/components/form/td-input/td-input.class.js +177 -0
- package/src/components/form/td-input/td-input.interface.d.ts +133 -0
- package/src/components/form/td-input/td-input.interface.js +2 -0
- package/src/components/form/td-input/td-input.style.d.ts +53 -0
- package/src/components/form/td-input/td-input.style.js +66 -0
- package/src/components/form/td-input/widget/prefix.d.ts +10 -0
- package/src/components/form/td-input/widget/prefix.js +63 -0
- package/src/components/form/td-input/widget/suffix.d.ts +13 -0
- package/src/components/form/td-input/widget/suffix.js +120 -0
- package/src/components/form/td-input/widget/td-input-wrapper.class.d.ts +33 -0
- package/src/components/form/td-input/widget/td-input-wrapper.class.js +286 -0
- package/src/components/form/td-input/widget/td-input-wrapper.interface.d.ts +4 -0
- package/src/components/form/td-input/widget/td-input-wrapper.interface.js +2 -0
- package/src/components/form/td-input/widget/td-textarea-wrapper.d.ts +13 -0
- package/src/components/form/td-input/widget/td-textarea-wrapper.js +123 -0
- package/src/components/form/td-input/widget/utils.d.ts +6 -0
- package/src/components/form/td-input/widget/utils.js +81 -0
- package/src/components/form/td-radio/td-radio.class.d.ts +17 -0
- package/src/components/form/td-radio/td-radio.class.js +232 -0
- package/src/components/form/td-radio/td-radio.interface.d.ts +38 -0
- package/src/components/form/td-radio/td-radio.interface.js +2 -0
- package/src/components/form/td-radio-button/td-radio-button.class.d.ts +15 -0
- package/src/components/form/td-radio-button/td-radio-button.class.js +195 -0
- package/src/components/form/td-radio-button/td-radio-button.interface.d.ts +34 -0
- package/src/components/form/td-radio-button/td-radio-button.interface.js +2 -0
- package/src/components/form/td-radio-button/td-radio-button.style.d.ts +1 -0
- package/src/components/form/td-radio-button/td-radio-button.style.js +9 -0
- package/src/components/form/td-radio-group/td-radio-group.class.d.ts +16 -0
- package/src/components/form/td-radio-group/td-radio-group.class.js +105 -0
- package/src/components/form/td-radio-group/td-radio-group.interface.d.ts +47 -0
- package/src/components/form/td-radio-group/td-radio-group.interface.js +2 -0
- package/src/components/form/td-select/dropdown/dropdown.class.d.ts +9 -0
- package/src/components/form/td-select/dropdown/dropdown.class.js +48 -0
- package/src/components/form/td-select/dropdown/dropdown.interface.d.ts +9 -0
- package/src/components/form/td-select/dropdown/dropdown.interface.js +2 -0
- package/src/components/form/td-select/option/option.class.d.ts +6 -0
- package/src/components/form/td-select/option/option.class.js +36 -0
- package/src/components/form/td-select/option/option.interface.d.ts +20 -0
- package/src/components/form/td-select/option/option.interface.js +2 -0
- package/src/components/form/td-select/option-group/option-group.class.d.ts +6 -0
- package/src/components/form/td-select/option-group/option-group.class.js +50 -0
- package/src/components/form/td-select/option-group/option-group.interface.d.ts +14 -0
- package/src/components/form/td-select/option-group/option-group.interface.js +2 -0
- package/src/components/form/td-select/td-select.class.d.ts +6 -0
- package/src/components/form/td-select/td-select.class.js +32 -0
- package/src/components/form/td-select/td-select.interface.d.ts +172 -0
- package/src/components/form/td-select/td-select.interface.js +2 -0
- package/src/components/form/td-select/td-select.style.d.ts +53 -0
- package/src/components/form/td-select/td-select.style.js +76 -0
- package/src/components/form/td-switch/td-switch.class.d.ts +20 -0
- package/src/components/form/td-switch/td-switch.class.js +225 -0
- package/src/components/form/td-switch/td-switch.interface.d.ts +97 -0
- package/src/components/form/td-switch/td-switch.interface.js +2 -0
- package/src/components/form/td-switch/td-switch.style.d.ts +47 -0
- package/src/components/form/td-switch/td-switch.style.js +57 -0
- package/src/components/form/td-switch/widget/td-switch-core.d.ts +17 -0
- package/src/components/form/td-switch/widget/td-switch-core.js +212 -0
- package/src/components/form/td-switch/widget/td-switch-left.d.ts +7 -0
- package/src/components/form/td-switch/widget/td-switch-left.js +26 -0
- package/src/components/form/td-switch/widget/td-switch-right.d.ts +7 -0
- package/src/components/form/td-switch/widget/td-switch-right.js +25 -0
- package/src/components/navigation/index.d.ts +2 -0
- package/src/components/navigation/index.js +5 -0
- package/src/components/navigation/td-menu/td-menu.class.d.ts +7 -0
- package/src/components/navigation/td-menu/td-menu.class.js +42 -0
- package/src/components/navigation/td-menu/td-menu.interface.d.ts +23 -0
- package/src/components/navigation/td-menu/td-menu.interface.js +2 -0
- package/src/{others → components/others}/collapsible-box/collapsible-box.js +10 -11
- package/src/{others → components/others}/collapsible-box/contents/contents.js +9 -11
- package/src/{others → components/others}/collapsible-box/heading/expand-heading.js +28 -26
- package/src/{others → components/others}/index.d.ts +2 -0
- package/src/{others → components/others}/index.js +3 -1
- package/src/components/others/td-divider/td-divider.class.d.ts +6 -0
- package/src/components/others/td-divider/td-divider.class.js +80 -0
- package/src/components/others/td-divider/td-divider.interface.d.ts +18 -0
- package/src/components/others/td-divider/td-divider.interface.js +2 -0
- package/src/index.d.ts +6 -4
- package/src/index.js +7 -5
- package/src/styles/color-scheme.js +12 -12
- package/src/styles/index.d.ts +1 -0
- package/src/styles/index.js +4 -0
- package/src/styles/size.d.ts +7 -0
- package/src/styles/size.js +9 -0
- package/src/styles/var.d.ts +28 -10
- package/src/styles/var.js +59 -28
- package/src/ui/ui.abstract.d.ts +8 -0
- package/src/ui/ui.abstract.js +22 -0
- package/src/ui/ui.interface.d.ts +8 -0
- package/src/ui/ui.interface.js +2 -0
- package/src/basic/index.js +0 -19
- package/src/basic/td-button/td-button.class.js +0 -149
- package/src/basic/td-container/td-aside/td-aside.class.d.ts +0 -6
- package/src/basic/td-container/td-aside/td-aside.interface.d.ts +0 -8
- package/src/basic/td-container/td-container.class.d.ts +0 -10
- package/src/basic/td-container/td-container.interface.d.ts +0 -14
- package/src/basic/td-container/td-footer/td-footer.class.d.ts +0 -6
- package/src/basic/td-container/td-footer/td-footer.class.js +0 -30
- package/src/basic/td-container/td-footer/td-footer.interface.d.ts +0 -11
- package/src/basic/td-container/td-header/td-header.class.d.ts +0 -9
- package/src/basic/td-container/td-header/td-header.class.js +0 -23
- package/src/basic/td-container/td-header/td-header.interface.d.ts +0 -10
- package/src/basic/td-container/td-main/td-main.interface.d.ts +0 -7
- package/src/basic/td-icon/td-icon.interface.d.ts +0 -12
- package/src/basic/td-select/td-select.class.d.ts +0 -14
- package/src/form/field-item/cascade/field-cascade.abstract.d.ts +0 -22
- package/src/form/field-item/field-item.abstract.d.ts +0 -11
- package/src/form/field-item/field-item.interface.d.ts +0 -12
- package/src/form/field-item/options/field-options.abstract.d.ts +0 -22
- package/src/form/field-item/span/field-span.abstract.js +0 -54
- package/src/form/index.d.ts +0 -11
- package/src/form/input-number/td-input-number.class.d.ts +0 -9
- package/src/form/input-number/td-input-number.class.js +0 -55
- package/src/form/input-number/td-input-number.interface.d.ts +0 -9
- package/src/form/radio-group/radio-group.interface.d.ts +0 -6
- package/src/form/radio-group/radio-option/radio-option.class.js +0 -33
- package/src/form/radio-group/radio-option/radio-option.interface.d.ts +0 -5
- package/src/form/select/select.interface.d.ts +0 -10
- package/src/form/td-input/td-input.class.d.ts +0 -9
- /package/src/{basic/td-container/td-aside/td-aside.interface.js → components/basic/td-button/td-button.interface.js} +0 -0
- /package/src/{basic/td-button/td-button.interface.js → components/basic/td-button-group/td-button-group.interface.js} +0 -0
- /package/src/{basic/td-container/td-container.interface.js → components/basic/td-container/td-aside/td-aside.interface.js} +0 -0
- /package/src/{basic → components/basic}/td-container/td-container.d.ts +0 -0
- /package/src/{basic/td-container/td-footer/td-footer.interface.js → components/basic/td-container/td-container.interface.js} +0 -0
- /package/src/{basic → components/basic}/td-container/td-container.js +0 -0
- /package/src/{basic/td-container/td-header/td-header.interface.js → components/basic/td-container/td-footer/td-footer.interface.js} +0 -0
- /package/src/{basic/td-container/td-main/td-main.interface.js → components/basic/td-container/td-header/td-header.interface.js} +0 -0
- /package/src/{basic/td-icon/td-icon.interface.js → components/basic/td-container/td-main/td-main.interface.js} +0 -0
- /package/src/{basic/td-select/option/option.interface.js → components/basic/td-icon/td-icon.interface.js} +0 -0
- /package/src/{basic/td-select/td-select.interface.js → components/basic/td-layout/td-col/td-col.interface.js} +0 -0
- /package/src/{form/checkbox-group/checkbox-group.interface.js → components/basic/td-link/td-link.interface.js} +0 -0
- /package/src/{form/checkbox-group/checkbox-option/checkbox-option.interface.js → components/basic/td-scrollbar/bar/bar.interface.js} +0 -0
- /package/src/{form/field-item/field-item.interface.js → components/basic/td-scrollbar/thumb/thumb.interface.js} +0 -0
- /package/src/{form/input-number/td-input-number.interface.js → components/basic/td-space/td-space.interface.js} +0 -0
- /package/src/{form/radio-group/radio-group.interface.js → components/basic/td-text/td-text.interface.js} +0 -0
- /package/src/{data → components/data}/index.d.ts +0 -0
- /package/src/{data → components/data}/index.js +0 -0
- /package/src/{form/radio-group/radio-option/radio-option.interface.js → components/feedback/dialog/dialog.interface.js} +0 -0
- /package/src/{form/select/select.interface.js → components/feedback/message-box/message-box.interface.js} +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/body/body.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/container.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/confirm-button/confirm-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/footer/footer.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.d.ts +0 -0
- /package/src/{feedback → components/feedback}/overlay/container/header/header.d.ts +0 -0
- /package/src/{form/td-input/td-input.interface.js → components/feedback/td-focus-trap/td-focus-trap.interface.js} +0 -0
- /package/src/{form → components/form}/checkbox-group/checkbox-group.interface.d.ts +0 -0
- /package/src/{form → components/form}/field-item/input/field-input.abstract.d.ts +0 -0
- /package/src/{form → components/form}/field-item/select/field-select.abstract.d.ts +0 -0
- /package/src/{form → components/form}/field-item/textarea/field-textarea.abstract.d.ts +0 -0
- /package/src/{basic/td-select → components/form/field-select}/option/option.interface.d.ts +0 -0
- /package/src/{navigation/index.d.ts → components/navigation/td-menu/td-menu.style.d.ts} +0 -0
- /package/src/{navigation/index.js → components/navigation/td-menu/td-menu.style.js} +0 -0
- /package/src/{others → components/others}/collapsible-box/collapsible-box.d.ts +0 -0
- /package/src/{others → components/others}/collapsible-box/contents/contents.d.ts +0 -0
- /package/src/{others → components/others}/collapsible-box/heading/expand-heading.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITdSpace, ITdSpaceConfig } from './td-space.interface';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
export declare class TdSpace extends UI implements ITdSpace {
|
|
4
|
+
className: 'TdSpace';
|
|
5
|
+
horizontalSize?: number;
|
|
6
|
+
verticalSize?: number;
|
|
7
|
+
config?: ITdSpaceConfig;
|
|
8
|
+
constructor(config?: ITdSpaceConfig);
|
|
9
|
+
setConfig(config?: Partial<ITdSpaceConfig>): void;
|
|
10
|
+
initSize(size?: number | string | [number, number]): void;
|
|
11
|
+
setSize(size: number | string | [number, number]): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdSpace = void 0;
|
|
4
|
+
const utils_1 = require("@type-dom/utils");
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const td_space_const_1 = require("./td-space.const");
|
|
7
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
8
|
+
class TdSpace extends ui_abstract_1.UI {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
super();
|
|
11
|
+
this.className = 'TdSpace';
|
|
12
|
+
this.config = config;
|
|
13
|
+
this.addStyleObj({
|
|
14
|
+
display: 'inline-flex',
|
|
15
|
+
verticalAlign: 'top'
|
|
16
|
+
});
|
|
17
|
+
this.setConfig(config);
|
|
18
|
+
}
|
|
19
|
+
setConfig(config) {
|
|
20
|
+
super.setConfig(config);
|
|
21
|
+
this.children.forEach(item => {
|
|
22
|
+
if (item instanceof framework_1.TypeElement) {
|
|
23
|
+
item.addStyleObj({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexWrap: 'wrap'
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
this.initSize(config === null || config === void 0 ? void 0 : config.size);
|
|
30
|
+
if (config === null || config === void 0 ? void 0 : config.wrap) {
|
|
31
|
+
this.addStyle('flexWrap', 'wrap');
|
|
32
|
+
}
|
|
33
|
+
if (config === null || config === void 0 ? void 0 : config.fill) {
|
|
34
|
+
this.addStyleObj({
|
|
35
|
+
flexWrap: 'wrap',
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
minWidth: `${(config === null || config === void 0 ? void 0 : config.fillRatio) || 100}%`
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if ((config === null || config === void 0 ? void 0 : config.direction) === 'horizontal') {
|
|
41
|
+
this.addStyle('flexDirection', 'row');
|
|
42
|
+
}
|
|
43
|
+
if ((config === null || config === void 0 ? void 0 : config.direction) === 'vertical') {
|
|
44
|
+
this.addStyle('flexDirection', 'column');
|
|
45
|
+
}
|
|
46
|
+
if (config === null || config === void 0 ? void 0 : config.alignment) {
|
|
47
|
+
this.addStyle('alignItems', config.alignment);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
initSize(size) {
|
|
51
|
+
const config = this.config;
|
|
52
|
+
if ((0, utils_1.isArray)(size)) {
|
|
53
|
+
this.horizontalSize = size[0];
|
|
54
|
+
this.verticalSize = size[1];
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
let val;
|
|
58
|
+
if ((0, utils_1.isNumber)(size)) {
|
|
59
|
+
val = size;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
val = td_space_const_1.SIZE_MAP[size || 'small'] || td_space_const_1.SIZE_MAP.small;
|
|
63
|
+
}
|
|
64
|
+
if (((config === null || config === void 0 ? void 0 : config.wrap) || (config === null || config === void 0 ? void 0 : config.fill)) && (config === null || config === void 0 ? void 0 : config.direction) === 'horizontal') {
|
|
65
|
+
this.horizontalSize = this.verticalSize = val;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
if ((config === null || config === void 0 ? void 0 : config.direction) === 'vertical') {
|
|
69
|
+
this.verticalSize = val;
|
|
70
|
+
this.horizontalSize = 0;
|
|
71
|
+
}
|
|
72
|
+
else { // horizontal 默认
|
|
73
|
+
this.horizontalSize = val;
|
|
74
|
+
this.verticalSize = 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
this.addStyleObj({
|
|
79
|
+
rowGap: this.verticalSize + 'px',
|
|
80
|
+
columnGap: this.horizontalSize + 'px'
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
setSize(size) {
|
|
84
|
+
console.log('setSize size is ', size);
|
|
85
|
+
this.initSize(size);
|
|
86
|
+
this.setStyleObj({
|
|
87
|
+
rowGap: this.verticalSize + 'px',
|
|
88
|
+
columnGap: this.horizontalSize + 'px'
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.TdSpace = TdSpace;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StyleAlignItems, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
export interface ITdSpace extends IUI {
|
|
4
|
+
className: 'TdSpace';
|
|
5
|
+
horizontalSize?: number;
|
|
6
|
+
verticalSize?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ITdSpaceConfig extends IUIConfig {
|
|
9
|
+
/**
|
|
10
|
+
* @description Placement direction 排列的方向
|
|
11
|
+
*/
|
|
12
|
+
direction?: 'horizontal' | 'vertical';
|
|
13
|
+
/**
|
|
14
|
+
* @description Controls the alignment of items 对齐方式
|
|
15
|
+
*/
|
|
16
|
+
alignment?: StyleAlignItems;
|
|
17
|
+
/**
|
|
18
|
+
* @description Spacer 间隔符
|
|
19
|
+
*/
|
|
20
|
+
spacer?: string | number | TypeSvgSvg;
|
|
21
|
+
/**
|
|
22
|
+
* @description Auto wrapping 设置是否自动折行 default: false
|
|
23
|
+
*/
|
|
24
|
+
wrap?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description Whether to fill the container 是否填充剩余空间 default: false
|
|
27
|
+
*/
|
|
28
|
+
fill?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @description Ratio of fill
|
|
31
|
+
*/
|
|
32
|
+
fillRatio?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the space between each element.
|
|
35
|
+
* 间隔大小
|
|
36
|
+
* 元组:[水平间隔,垂直间隔];
|
|
37
|
+
*/
|
|
38
|
+
size?: number | string | [h: number, v: number];
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { TdIcon } from '../td-icon/td-icon.class';
|
|
3
|
+
import { ITdText, ITdTextConfig } from './td-text.interface';
|
|
4
|
+
export declare class TdText extends UI implements ITdText {
|
|
5
|
+
className: 'TdText';
|
|
6
|
+
config?: ITdTextConfig;
|
|
7
|
+
icon?: TdIcon;
|
|
8
|
+
constructor(config?: ITdTextConfig);
|
|
9
|
+
setConfig(config?: Partial<ITdTextConfig>): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdText = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
const td_text_style_1 = require("./td-text.style");
|
|
6
|
+
class TdText extends ui_abstract_1.UI {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super({ tag: (config === null || config === void 0 ? void 0 : config.tag) || 'span' });
|
|
9
|
+
this.className = 'TdText';
|
|
10
|
+
this.addStyleObj(td_text_style_1.$baseText);
|
|
11
|
+
this.setConfig(config);
|
|
12
|
+
}
|
|
13
|
+
setConfig(config) {
|
|
14
|
+
super.setConfig(config);
|
|
15
|
+
if (config === null || config === void 0 ? void 0 : config.type) {
|
|
16
|
+
this.addStyleObj(td_text_style_1.$textStateColors[config.type].default);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.addStyleObj(td_text_style_1.$textStateColors.default.default);
|
|
20
|
+
}
|
|
21
|
+
if (config === null || config === void 0 ? void 0 : config.size) {
|
|
22
|
+
this.addStyleObj(td_text_style_1.sizeOpts[config === null || config === void 0 ? void 0 : config.size]);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.addStyleObj(td_text_style_1.sizeOpts.default);
|
|
26
|
+
}
|
|
27
|
+
if ((config === null || config === void 0 ? void 0 : config.truncated) && (config === null || config === void 0 ? void 0 : config.width)) {
|
|
28
|
+
this.addStyleObj({
|
|
29
|
+
display: 'inline-block',
|
|
30
|
+
maxWidth: '100%',
|
|
31
|
+
textOverflow: 'ellipsis',
|
|
32
|
+
whiteSpace: 'nowrap',
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
width: config === null || config === void 0 ? void 0 : config.width
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (config === null || config === void 0 ? void 0 : config.lineClamp) {
|
|
38
|
+
this.addStyleObj({
|
|
39
|
+
'-webkit-line-clamp': config === null || config === void 0 ? void 0 : config.lineClamp,
|
|
40
|
+
display: '-webkit-inline-box',
|
|
41
|
+
'-webkit-box-orient': 'vertical',
|
|
42
|
+
overflow: 'hidden'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.TdText = TdText;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
export interface ITdText extends IUI {
|
|
3
|
+
className: 'TdText';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdTextConfig extends IUIConfig {
|
|
6
|
+
type?: 'primary' | 'success' | 'info' | 'warning' | 'danger' | '';
|
|
7
|
+
size?: '' | 'default' | 'small' | 'large';
|
|
8
|
+
/**
|
|
9
|
+
* @description render ellipsis
|
|
10
|
+
*/
|
|
11
|
+
truncated?: boolean;
|
|
12
|
+
width?: number | string;
|
|
13
|
+
/**
|
|
14
|
+
* @description maximum lines
|
|
15
|
+
*/
|
|
16
|
+
lineClamp?: number | string;
|
|
17
|
+
/**
|
|
18
|
+
* @description custom element tag
|
|
19
|
+
*/
|
|
20
|
+
tag?: 'span' | string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IStyle } from '@type-dom/framework';
|
|
2
|
+
import { IType } from '../../../styles/var';
|
|
3
|
+
export declare const $baseText: Partial<IStyle>;
|
|
4
|
+
export declare const sizeOpts: Record<string, Partial<IStyle>>;
|
|
5
|
+
export declare const $textStateColors: Record<string, any>;
|
|
6
|
+
export declare function buttonVariant($type: IType): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buttonVariant = exports.$textStateColors = exports.sizeOpts = exports.$baseText = void 0;
|
|
4
|
+
const var_1 = require("../../../styles/var");
|
|
5
|
+
exports.$baseText = {
|
|
6
|
+
alignSelf: 'center',
|
|
7
|
+
margin: '0',
|
|
8
|
+
padding: '0',
|
|
9
|
+
fontSize: var_1.$fontSizeMap.default,
|
|
10
|
+
color: var_1.$colors.default.base,
|
|
11
|
+
overflowWrap: 'break-word'
|
|
12
|
+
};
|
|
13
|
+
exports.sizeOpts = {
|
|
14
|
+
// mini: {
|
|
15
|
+
// height: $commonComponentSize.small,
|
|
16
|
+
// fontSize: $fontSizeMap.small,
|
|
17
|
+
// padding: $paddingVerticalMap.small + ' ' + $paddingHorizontalMap.small,
|
|
18
|
+
// },
|
|
19
|
+
small: {
|
|
20
|
+
height: var_1.$commonComponentSize.small,
|
|
21
|
+
fontSize: var_1.$fontSizes.extraSmall
|
|
22
|
+
},
|
|
23
|
+
default: {
|
|
24
|
+
height: var_1.$commonComponentSize.default,
|
|
25
|
+
fontSize: var_1.$fontSizes.base
|
|
26
|
+
},
|
|
27
|
+
large: {
|
|
28
|
+
height: var_1.$commonComponentSize.large,
|
|
29
|
+
fontSize: var_1.$fontSizes.medium
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.$textStateColors = {};
|
|
33
|
+
function buttonVariant($type) {
|
|
34
|
+
exports.$textStateColors[$type] = {
|
|
35
|
+
default: {
|
|
36
|
+
color: var_1.$colors[$type].base
|
|
37
|
+
},
|
|
38
|
+
hover: {
|
|
39
|
+
color: $type === 'default' ? var_1.$colors['primary'].base : var_1.$colors[$type]['light-3'] // ['color', $type, 'light-3'],
|
|
40
|
+
// content: '',
|
|
41
|
+
// position: 'absolute',
|
|
42
|
+
// left: 0,
|
|
43
|
+
// right: 0,
|
|
44
|
+
// height: 0,
|
|
45
|
+
// bottom: 0,
|
|
46
|
+
// borderBottom: '1px solid ' + ($type === 'default' ? $colors['primary'].base : $colors[$type]['light-3']),
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
color: var_1.$colors[$type]['dark-2'] // ['color', $type, 'dark-2'],
|
|
50
|
+
},
|
|
51
|
+
disabled: {
|
|
52
|
+
color: var_1.$colors[$type]['light-5'] // ['color', $type, 'light-5'],
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.buttonVariant = buttonVariant;
|
|
57
|
+
for (const $type of ['primary', 'success', 'warning', 'info', 'danger', 'default']) {
|
|
58
|
+
buttonVariant($type);
|
|
59
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TypeRoot } from '@type-dom/framework';
|
|
2
1
|
import { Overlay } from '../overlay/overlay.abstract';
|
|
2
|
+
import { IDialogConfig } from './dialog.interface';
|
|
3
3
|
export declare class Dialog extends Overlay {
|
|
4
4
|
className: 'Dialog';
|
|
5
|
-
|
|
6
|
-
constructor();
|
|
5
|
+
constructor(config?: Partial<IDialogConfig>);
|
|
7
6
|
}
|
|
@@ -3,12 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Dialog = void 0;
|
|
4
4
|
const overlay_abstract_1 = require("../overlay/overlay.abstract");
|
|
5
5
|
class Dialog extends overlay_abstract_1.Overlay {
|
|
6
|
-
constructor() {
|
|
6
|
+
constructor(config) {
|
|
7
7
|
super();
|
|
8
8
|
this.className = 'Dialog';
|
|
9
9
|
this.addAttrObj({
|
|
10
|
-
name: 'dialog'
|
|
10
|
+
name: 'dialog'
|
|
11
11
|
});
|
|
12
|
+
this.setConfig(config);
|
|
13
|
+
if (config === null || config === void 0 ? void 0 : config.el) {
|
|
14
|
+
this.mount(config.el);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
this.mount(document.body);
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
}
|
|
14
21
|
exports.Dialog = Dialog;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Dialog } from './dialog/dialog';
|
|
1
|
+
export { Dialog } from './dialog/dialog.class';
|
|
2
2
|
export { MessageBox } from './message-box/message-box';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageBox = exports.Dialog = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return
|
|
4
|
+
var dialog_class_1 = require("./dialog/dialog.class");
|
|
5
|
+
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return dialog_class_1.Dialog; } });
|
|
6
6
|
var message_box_1 = require("./message-box/message-box");
|
|
7
7
|
Object.defineProperty(exports, "MessageBox", { enumerable: true, get: function () { return message_box_1.MessageBox; } });
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { TypeRoot } from '@type-dom/framework';
|
|
2
1
|
import { Overlay } from '../overlay/overlay.abstract';
|
|
2
|
+
import { IMessageBoxConfig } from './message-box.interface';
|
|
3
3
|
export declare class MessageBox extends Overlay {
|
|
4
4
|
className: 'MessageBox';
|
|
5
|
-
|
|
6
|
-
constructor();
|
|
5
|
+
constructor(config?: IMessageBoxConfig);
|
|
7
6
|
toast(title: string, message: string): void;
|
|
8
7
|
confirm(title: string, message: string): void;
|
|
9
8
|
}
|
|
@@ -3,12 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MessageBox = void 0;
|
|
4
4
|
const overlay_abstract_1 = require("../overlay/overlay.abstract");
|
|
5
5
|
class MessageBox extends overlay_abstract_1.Overlay {
|
|
6
|
-
constructor() {
|
|
6
|
+
constructor(config) {
|
|
7
7
|
super();
|
|
8
8
|
this.className = 'MessageBox';
|
|
9
9
|
this.addAttrObj({
|
|
10
|
-
name: 'message-box'
|
|
10
|
+
name: 'message-box'
|
|
11
11
|
});
|
|
12
|
+
this.setConfig(config);
|
|
13
|
+
if (config === null || config === void 0 ? void 0 : config.el) {
|
|
14
|
+
this.mount(config.el);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
// 默认挂载到body上;
|
|
18
|
+
// todo 挂载到body上,需要能清理掉,否则会重复挂载
|
|
19
|
+
this.mount(document.body);
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
toast(title, message) {
|
|
14
23
|
// this.clear();
|
|
@@ -6,15 +6,13 @@ class OverlayBody extends framework_1.TypeDiv {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
this.className = 'OverlayBody';
|
|
9
|
-
this.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
name: 'overlay-body',
|
|
17
|
-
}
|
|
9
|
+
this.styleObj = {
|
|
10
|
+
padding: '30px 20px',
|
|
11
|
+
fontSize: '14px',
|
|
12
|
+
wordBreak: 'break-all'
|
|
13
|
+
};
|
|
14
|
+
this.attrObj = {
|
|
15
|
+
name: 'overlay-body'
|
|
18
16
|
};
|
|
19
17
|
}
|
|
20
18
|
}
|
|
@@ -10,19 +10,17 @@ class OverlayContainer extends framework_1.TypeDiv {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
12
|
this.className = 'OverlayContainer';
|
|
13
|
-
this.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
name: 'overlay-container'
|
|
25
|
-
}
|
|
13
|
+
this.styleObj = {
|
|
14
|
+
position: framework_1.StylePosition.relative,
|
|
15
|
+
margin: '15vh auto 50px',
|
|
16
|
+
width: '50%',
|
|
17
|
+
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.3)',
|
|
18
|
+
borderRadius: '4px',
|
|
19
|
+
backgroundColor: '#FFF',
|
|
20
|
+
padding: '20px'
|
|
21
|
+
};
|
|
22
|
+
this.attrObj = {
|
|
23
|
+
name: 'overlay-container'
|
|
26
24
|
};
|
|
27
25
|
this.header = new header_1.OverlayHeader();
|
|
28
26
|
this.header.parent = this;
|
|
@@ -33,7 +31,7 @@ class OverlayContainer extends framework_1.TypeDiv {
|
|
|
33
31
|
this.childNodes = [this.header, this.body, this.footer];
|
|
34
32
|
}
|
|
35
33
|
initEvents() {
|
|
36
|
-
this.
|
|
34
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.dom, 'click').subscribe((e) => {
|
|
37
35
|
e.stopPropagation();
|
|
38
36
|
}));
|
|
39
37
|
}
|
package/src/{feedback → components/feedback}/overlay/container/footer/cancel-button/cancel-button.js
RENAMED
|
@@ -10,7 +10,7 @@ class CancelButton extends framework_1.TypeButton {
|
|
|
10
10
|
this.addStyleObj({
|
|
11
11
|
// backgroundColor: '#f00',
|
|
12
12
|
// color: '#FFF',
|
|
13
|
-
margin: 'auto 10px'
|
|
13
|
+
margin: 'auto 10px'
|
|
14
14
|
// outline: 'none',
|
|
15
15
|
// border: '1px solid #f00',
|
|
16
16
|
});
|
|
@@ -22,7 +22,7 @@ class CancelButton extends framework_1.TypeButton {
|
|
|
22
22
|
if (!((_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent)) {
|
|
23
23
|
console.error('this.parent?.parent?.parent is undefined . ');
|
|
24
24
|
}
|
|
25
|
-
this.
|
|
25
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.dom, 'click').subscribe(() => {
|
|
26
26
|
var _a, _b, _c;
|
|
27
27
|
(_c = (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) === null || _c === void 0 ? void 0 : _c.hide();
|
|
28
28
|
}));
|
|
@@ -7,16 +7,14 @@ class ConfirmButton extends framework_1.TypeButton {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.className = 'ConfirmButton';
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
name: 'confirm-button',
|
|
19
|
-
}
|
|
10
|
+
this.styleObj = {
|
|
11
|
+
backgroundColor: '#1890ff',
|
|
12
|
+
color: '#fff',
|
|
13
|
+
borderColor: '#1890ff',
|
|
14
|
+
margin: 'auto 10px'
|
|
15
|
+
};
|
|
16
|
+
this.attrObj = {
|
|
17
|
+
name: 'confirm-button'
|
|
20
18
|
};
|
|
21
19
|
this.setTitle('确认');
|
|
22
20
|
this.childNodes = [this.textNode];
|
|
@@ -26,7 +24,7 @@ class ConfirmButton extends framework_1.TypeButton {
|
|
|
26
24
|
if (!((_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent)) {
|
|
27
25
|
console.error('this.parent?.parent?.parent is undefined . ');
|
|
28
26
|
}
|
|
29
|
-
this.
|
|
27
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.dom, 'click').subscribe(() => {
|
|
30
28
|
var _a, _b, _c;
|
|
31
29
|
(_c = (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) === null || _c === void 0 ? void 0 : _c.hide();
|
|
32
30
|
}));
|
|
@@ -14,12 +14,12 @@ class OverlayFooter extends framework_1.TypeDiv {
|
|
|
14
14
|
padding: '20px',
|
|
15
15
|
paddingTop: '10px',
|
|
16
16
|
textAlign: 'right',
|
|
17
|
-
boxSizing: 'border-box'
|
|
17
|
+
boxSizing: 'border-box'
|
|
18
18
|
});
|
|
19
19
|
this.addAttrName('overlay-foot');
|
|
20
20
|
// this.cancelBtn = new CancelButton(this);
|
|
21
21
|
this.cancelBtn = new td_button_class_1.TdButton({
|
|
22
|
-
title: '取消'
|
|
22
|
+
title: '取消'
|
|
23
23
|
});
|
|
24
24
|
// cancelBtn.hide();
|
|
25
25
|
// this.cancelBtn.setTitle('取消');
|
|
@@ -29,13 +29,13 @@ class OverlayFooter extends framework_1.TypeDiv {
|
|
|
29
29
|
});
|
|
30
30
|
this.confirmBtn.parent = this;
|
|
31
31
|
this.confirmBtn.addStyleObj({
|
|
32
|
-
marginLeft: '10px'
|
|
32
|
+
marginLeft: '10px'
|
|
33
33
|
});
|
|
34
34
|
// this.confirmBtn.setTitle('确定');
|
|
35
35
|
this.childNodes = [this.cancelBtn, this.confirmBtn];
|
|
36
36
|
}
|
|
37
37
|
initEvents() {
|
|
38
|
-
this.
|
|
38
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.cancelBtn.dom, 'click').subscribe(() => {
|
|
39
39
|
var _a, _b;
|
|
40
40
|
console.log('cancelBtn click . ');
|
|
41
41
|
(_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.hide();
|
package/src/{feedback → components/feedback}/overlay/container/header/close-button/close-button.js
RENAMED
|
@@ -8,27 +8,25 @@ class CloseButton extends framework_1.TypeButton {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.className = 'CloseButton';
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fontSize: '16px',
|
|
22
|
-
},
|
|
23
|
-
attrObj: {
|
|
24
|
-
name: 'close-button',
|
|
25
|
-
}
|
|
11
|
+
this.styleObj = {
|
|
12
|
+
cursor: framework_1.StyleCursor.pointer,
|
|
13
|
+
position: framework_1.StylePosition.absolute,
|
|
14
|
+
top: '20px',
|
|
15
|
+
right: '20px',
|
|
16
|
+
padding: '0',
|
|
17
|
+
background: 'transparent',
|
|
18
|
+
border: 'none',
|
|
19
|
+
outline: 'none',
|
|
20
|
+
fontSize: '16px'
|
|
26
21
|
};
|
|
27
|
-
this.
|
|
22
|
+
this.attrObj = {
|
|
23
|
+
name: 'close-button'
|
|
24
|
+
};
|
|
25
|
+
this.svg = new svgs_1.TdCloseSvg({ parent: this });
|
|
28
26
|
this.childNodes = [this.svg];
|
|
29
27
|
}
|
|
30
28
|
initEvents() {
|
|
31
|
-
this.
|
|
29
|
+
this.subscriptions.push((0, rxjs_1.fromEvent)(this.dom, 'click').subscribe(() => {
|
|
32
30
|
var _a, _b, _c;
|
|
33
31
|
(_c = (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) === null || _c === void 0 ? void 0 : _c.hide();
|
|
34
32
|
}));
|
|
@@ -11,10 +11,10 @@ class OverlayHeader extends framework_1.TypeDiv {
|
|
|
11
11
|
this.addStyleObj({
|
|
12
12
|
padding: '20px',
|
|
13
13
|
paddingBottom: '10px',
|
|
14
|
-
boxSizing: 'border-box'
|
|
14
|
+
boxSizing: 'border-box'
|
|
15
15
|
});
|
|
16
16
|
this.addAttrObj({
|
|
17
|
-
name: 'overlay-header'
|
|
17
|
+
name: 'overlay-header'
|
|
18
18
|
});
|
|
19
19
|
this.title = new title_1.OverlayTitle();
|
|
20
20
|
this.closeBtn = new close_button_1.CloseButton();
|