@type-dom/ui 0.0.1 → 0.0.3
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 +12 -0
- package/src/components/basic/index.js +48 -0
- package/src/{basic → components/basic}/td-button/td-button.class.d.ts +7 -6
- 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 -20
- 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 +40 -36
- 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/components/basic/td-container/td-aside/td-aside.class.js +29 -0
- 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 +7 -6
- 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/{basic → components/basic}/td-container/td-header/td-header.class.d.ts +4 -3
- 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/components/basic/td-container/td-main/td-main.class.d.ts +6 -0
- package/src/{basic → components/basic}/td-container/td-main/td-main.class.js +7 -6
- package/src/components/basic/td-container/td-main/td-main.interface.d.ts +7 -0
- package/src/components/basic/td-icon/td-icon.class.d.ts +15 -0
- package/src/{basic → components/basic}/td-icon/td-icon.class.js +44 -13
- 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 +5 -4
- 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 +15 -19
- 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 +3 -4
- 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 +8 -8
- 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 +7 -12
- 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 +7 -9
- 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 +58 -60
- 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 +11 -11
- 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 +9 -9
- 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} +8 -9
- 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 +12 -6
- 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 +7 -8
- 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 +62 -31
- 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 -140
- package/src/basic/td-container/td-aside/td-aside.class.d.ts +0 -6
- package/src/basic/td-container/td-aside/td-aside.class.js +0 -17
- package/src/basic/td-container/td-aside/td-aside.interface.d.ts +0 -7
- package/src/basic/td-container/td-container.class.d.ts +0 -7
- package/src/basic/td-container/td-container.interface.d.ts +0 -8
- 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 -18
- package/src/basic/td-container/td-footer/td-footer.interface.d.ts +0 -7
- package/src/basic/td-container/td-header/td-header.class.js +0 -18
- package/src/basic/td-container/td-header/td-header.interface.d.ts +0 -7
- package/src/basic/td-container/td-main/td-main.class.d.ts +0 -6
- package/src/basic/td-container/td-main/td-main.interface.d.ts +0 -6
- package/src/basic/td-icon/td-icon.class.d.ts +0 -11
- package/src/basic/td-icon/td-icon.interface.d.ts +0 -11
- 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,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdButtonGroup = void 0;
|
|
4
|
+
const ui_1 = require("@type-dom/ui");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
+
const td_button_style_1 = require("../td-button/td-button.style");
|
|
7
|
+
class TdButtonGroup extends ui_abstract_1.UI {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super();
|
|
10
|
+
this.className = 'TdButtonGroup';
|
|
11
|
+
this.addStyleObj({
|
|
12
|
+
display: 'inline-block',
|
|
13
|
+
verticalAlign: 'middle',
|
|
14
|
+
});
|
|
15
|
+
this.setConfig(config);
|
|
16
|
+
}
|
|
17
|
+
created() {
|
|
18
|
+
this.children.forEach((btn, index) => {
|
|
19
|
+
if (btn instanceof ui_1.TdButton) {
|
|
20
|
+
if (this.children.length > 1) {
|
|
21
|
+
this.addBtnStyle(btn, index);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
mounted() {
|
|
27
|
+
this.children.forEach((btn, index) => {
|
|
28
|
+
if (btn instanceof ui_1.TdButton) {
|
|
29
|
+
btn.addEvents({
|
|
30
|
+
mouseover: () => {
|
|
31
|
+
btn.setStyleObj({
|
|
32
|
+
zIndex: 1,
|
|
33
|
+
});
|
|
34
|
+
if (this.children.length > 1) {
|
|
35
|
+
this.setBtnStyle(btn, index);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
mouseout: () => {
|
|
39
|
+
btn.setStyleObj({
|
|
40
|
+
zIndex: 1,
|
|
41
|
+
});
|
|
42
|
+
if (this.children.length > 1) {
|
|
43
|
+
this.setBtnStyle(btn, index);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
addBtnStyle(btn, index) {
|
|
51
|
+
if (index === 0) {
|
|
52
|
+
btn.addStyleObj({
|
|
53
|
+
borderTopRightRadius: 0,
|
|
54
|
+
borderBottomRightRadius: 0,
|
|
55
|
+
marginRight: '-1px',
|
|
56
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else if (index === this.children.length - 1) {
|
|
60
|
+
btn.addStyleObj({
|
|
61
|
+
borderTopLeftRadius: 0,
|
|
62
|
+
borderBottomLeftRadius: 0,
|
|
63
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
btn.addStyleObj({
|
|
68
|
+
borderTopRightRadius: 0,
|
|
69
|
+
borderTopLeftRadius: 0,
|
|
70
|
+
borderBottomRightRadius: 0,
|
|
71
|
+
borderBottomLeftRadius: 0,
|
|
72
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
73
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
setBtnStyle(btn, index) {
|
|
78
|
+
if (index === 0) {
|
|
79
|
+
btn.setStyleObj({
|
|
80
|
+
borderTopRightRadius: 0,
|
|
81
|
+
borderBottomRightRadius: 0,
|
|
82
|
+
marginRight: '-1px',
|
|
83
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else if (index === this.children.length - 1) {
|
|
87
|
+
btn.setStyleObj({
|
|
88
|
+
borderTopLeftRadius: 0,
|
|
89
|
+
borderBottomLeftRadius: 0,
|
|
90
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
btn.setStyleObj({
|
|
95
|
+
borderTopRightRadius: 0,
|
|
96
|
+
borderTopLeftRadius: 0,
|
|
97
|
+
borderBottomRightRadius: 0,
|
|
98
|
+
borderBottomLeftRadius: 0,
|
|
99
|
+
borderLeftColor: td_button_style_1.$borderRightColor,
|
|
100
|
+
borderRightColor: td_button_style_1.$borderRightColor,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.TdButtonGroup = TdButtonGroup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { IButtonSize, IButtonType, ITdButtonConfig } from '../td-button/td-button.interface';
|
|
3
|
+
export interface ITdButtonGroup extends IUI {
|
|
4
|
+
className: 'TdButtonGroup';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdButtonGroupConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description control the size of buttons in this button-group
|
|
9
|
+
*/
|
|
10
|
+
size?: IButtonSize;
|
|
11
|
+
/**
|
|
12
|
+
* @description control the type of buttons in this button-group
|
|
13
|
+
*/
|
|
14
|
+
type?: IButtonType;
|
|
15
|
+
options?: ITdButtonConfig[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdAside = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
class TdAside extends ui_abstract_1.UI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super();
|
|
8
|
+
this.className = 'TdAside';
|
|
9
|
+
this.addStyleObj({
|
|
10
|
+
overflow: 'auto',
|
|
11
|
+
boxSizing: 'border-box',
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
width: '300px'
|
|
14
|
+
});
|
|
15
|
+
if (config === null || config === void 0 ? void 0 : config.width) {
|
|
16
|
+
if (typeof config.width !== 'number') {
|
|
17
|
+
console.warn('TdAside: width should be a number');
|
|
18
|
+
this.addStyleObj({
|
|
19
|
+
width: config.width
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
this.addStyleObj({
|
|
23
|
+
width: config.width + 'px'
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
this.setConfig(config);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.TdAside = TdAside;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TypeElement } from '@type-dom/framework';
|
|
2
|
+
import { ITdContainer, ITdContainerConfig } from './td-container.interface';
|
|
3
|
+
import { TdAside } from './td-aside/td-aside.class';
|
|
4
|
+
import { TdHeader } from './td-header/td-header.class';
|
|
5
|
+
import { TdMain } from './td-main/td-main.class';
|
|
6
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
7
|
+
export declare class TdContainer extends UI implements ITdContainer {
|
|
8
|
+
className: 'TdContainer';
|
|
9
|
+
childNodes: (TdAside | TdHeader | TdMain | TdContainer | TypeElement)[];
|
|
10
|
+
constructor(config?: ITdContainerConfig);
|
|
11
|
+
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdContainer = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
class TdContainer extends framework_1.TypeSection {
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
class TdContainer extends ui_abstract_1.UI {
|
|
7
6
|
constructor(config) {
|
|
8
|
-
super();
|
|
7
|
+
super({ tag: 'section' });
|
|
9
8
|
this.className = 'TdContainer';
|
|
10
9
|
this.addAttrName('td-container');
|
|
11
10
|
this.addAttrClass('td-container');
|
|
12
11
|
this.addStyleObj({
|
|
13
12
|
display: 'flex',
|
|
14
|
-
flexDirection: 'row',
|
|
13
|
+
flexDirection: 'row', // vertical ===> column
|
|
15
14
|
flex: 1,
|
|
16
15
|
flexBasis: 'auto',
|
|
17
16
|
boxSizing: 'border-box',
|
|
18
|
-
minWidth: 0
|
|
17
|
+
minWidth: 0
|
|
19
18
|
});
|
|
19
|
+
this.childNodes = [];
|
|
20
20
|
if (config === null || config === void 0 ? void 0 : config.vertical) {
|
|
21
21
|
this.addStyleObj({
|
|
22
22
|
flexDirection: 'column'
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
+
this.setConfig(config);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
exports.TdContainer = TdContainer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TextNode, TypeElement } from '@type-dom/framework';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
import { TdAside } from './td-aside/td-aside.class';
|
|
4
|
+
import { TdHeader } from './td-header/td-header.class';
|
|
5
|
+
import { TdMain } from './td-main/td-main.class';
|
|
6
|
+
import { TdContainer } from './td-container.class';
|
|
7
|
+
export interface ITdContainer extends IUI {
|
|
8
|
+
className: 'TdContainer';
|
|
9
|
+
}
|
|
10
|
+
export interface ITdContainerConfig extends IUIConfig {
|
|
11
|
+
name?: string;
|
|
12
|
+
vertical?: boolean;
|
|
13
|
+
direction?: 'vertical' | 'horizontal';
|
|
14
|
+
childNodes?: (TdAside | TdHeader | TdMain | TdContainer | TypeElement | TextNode)[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
2
|
+
import type { ITdHeaderConfig } from '../td-header/td-header.interface';
|
|
3
|
+
import type { ITdFooter, ITdFooterConfig } from './td-footer.interface';
|
|
4
|
+
export declare class TdFooter extends UI implements ITdFooter {
|
|
5
|
+
className: 'TdFooter';
|
|
6
|
+
constructor(config?: Partial<ITdFooterConfig>);
|
|
7
|
+
setConfig(config?: Partial<ITdHeaderConfig>): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdFooter = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
class TdFooter extends ui_abstract_1.UI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super({ tag: 'footer' });
|
|
8
|
+
this.className = 'TdFooter';
|
|
9
|
+
this.addStyleObj({
|
|
10
|
+
padding: '0 20px',
|
|
11
|
+
height: (config === null || config === void 0 ? void 0 : config.height) || '60px',
|
|
12
|
+
boxSizing: 'border-box',
|
|
13
|
+
flexShrink: 0,
|
|
14
|
+
backgroundColor: '#a0cfff'
|
|
15
|
+
});
|
|
16
|
+
this.setConfig(config);
|
|
17
|
+
}
|
|
18
|
+
setConfig(config) {
|
|
19
|
+
super.setConfig(config);
|
|
20
|
+
this.addHeight((config === null || config === void 0 ? void 0 : config.height) || '60px');
|
|
21
|
+
this.addBackgroundColor((config === null || config === void 0 ? void 0 : config.backgroundColor) || 'fff');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.TdFooter = TdFooter;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ITdHeader, ITdHeaderConfig } from './td-header.interface';
|
|
1
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
3
2
|
import { TdContainer } from '../td-container.class';
|
|
4
|
-
|
|
3
|
+
import type { ITdHeader, ITdHeaderConfig } from './td-header.interface';
|
|
4
|
+
export declare class TdHeader extends UI implements ITdHeader {
|
|
5
5
|
className: 'TdHeader';
|
|
6
6
|
parent?: TdContainer;
|
|
7
7
|
constructor(config?: ITdHeaderConfig);
|
|
8
|
+
setConfig(config?: ITdHeaderConfig): void;
|
|
8
9
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdHeader = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
class TdHeader extends ui_abstract_1.UI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super({ tag: 'header' });
|
|
8
|
+
this.className = 'TdHeader';
|
|
9
|
+
this.addAttrName('td-header');
|
|
10
|
+
this.addStyleObj({
|
|
11
|
+
display: 'flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
padding: '0 20px',
|
|
14
|
+
boxSizing: 'border-box',
|
|
15
|
+
flexShrink: 0
|
|
16
|
+
});
|
|
17
|
+
this.setConfig(config);
|
|
18
|
+
}
|
|
19
|
+
setConfig(config) {
|
|
20
|
+
super.setConfig(config);
|
|
21
|
+
this.addHeight((config === null || config === void 0 ? void 0 : config.height) || '60px');
|
|
22
|
+
this.addBackgroundColor((config === null || config === void 0 ? void 0 : config.backgroundColor) || 'fff');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.TdHeader = TdHeader;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdMain = void 0;
|
|
4
|
-
const
|
|
5
|
-
class TdMain extends
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
class TdMain extends ui_abstract_1.UI {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super({ tag: 'main' });
|
|
8
8
|
this.className = 'TdMain';
|
|
9
9
|
this.addStyleObj({
|
|
10
10
|
display: 'block',
|
|
11
11
|
flex: 1,
|
|
12
12
|
flexBasis: 'auto',
|
|
13
13
|
overflow: 'auto',
|
|
14
|
-
boxSizing: 'border-box'
|
|
15
|
-
padding: '20px',
|
|
14
|
+
boxSizing: 'border-box'
|
|
15
|
+
// padding: '20px',
|
|
16
16
|
});
|
|
17
|
+
this.setConfig(config);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
exports.TdMain = TdMain;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TypeHtml, TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
import { ITdIcon, ITdIconConfig } from './td-icon.interface';
|
|
4
|
+
export declare class TdIcon extends UI implements ITdIcon {
|
|
5
|
+
className: 'TdIcon';
|
|
6
|
+
svg?: TypeSvgSvg;
|
|
7
|
+
parent?: TypeHtml;
|
|
8
|
+
config?: ITdIconConfig;
|
|
9
|
+
constructor(config?: Partial<ITdIconConfig>);
|
|
10
|
+
createSvg(className: string): void;
|
|
11
|
+
resetConfig(config?: Partial<ITdIconConfig>): void;
|
|
12
|
+
created(): void;
|
|
13
|
+
replaceSvg(svg: TypeSvgSvg): void;
|
|
14
|
+
mounted(): void;
|
|
15
|
+
}
|
|
@@ -2,45 +2,51 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TdIcon = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
6
|
const td_icon_style_1 = require("./td-icon.style");
|
|
6
|
-
class TdIcon extends
|
|
7
|
+
class TdIcon extends ui_abstract_1.UI {
|
|
7
8
|
constructor(config) {
|
|
8
|
-
super();
|
|
9
|
+
super({ tag: 'i' });
|
|
9
10
|
this.className = 'TdIcon';
|
|
10
|
-
const slot = new framework_1.Slot(this);
|
|
11
|
+
const slot = new framework_1.Slot({ parent: this });
|
|
11
12
|
this.childNodes = [slot];
|
|
13
|
+
this.addStyleObj(td_icon_style_1.$tdIcon);
|
|
12
14
|
this.setConfig(config);
|
|
15
|
+
this.resetConfig(config);
|
|
13
16
|
}
|
|
14
17
|
// todo
|
|
15
18
|
createSvg(className) {
|
|
16
19
|
return;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
this.addStyleObj(td_icon_style_1.$tdIcon);
|
|
21
|
+
resetConfig(config) {
|
|
20
22
|
if (config === null || config === void 0 ? void 0 : config.SvgClass) {
|
|
23
|
+
// todo 直接作为 childNodes的子元素更合理;
|
|
21
24
|
const svg = new config.SvgClass(this);
|
|
22
25
|
// svg.resetSize('1em', '1em');
|
|
23
26
|
this.addChild(svg);
|
|
24
27
|
this.svg = svg;
|
|
25
28
|
}
|
|
29
|
+
if (config === null || config === void 0 ? void 0 : config.svgObj) {
|
|
30
|
+
// 直接作为 childNodes的子元素更合理;
|
|
31
|
+
this.addChild(config.svgObj);
|
|
32
|
+
this.svg = config.svgObj;
|
|
33
|
+
}
|
|
26
34
|
if (config === null || config === void 0 ? void 0 : config.color) {
|
|
27
35
|
this.addStyleObj({
|
|
28
|
-
color: config.color
|
|
36
|
+
color: config.color
|
|
29
37
|
});
|
|
30
38
|
}
|
|
31
39
|
if (config === null || config === void 0 ? void 0 : config.size) {
|
|
32
40
|
this.addStyleObj({
|
|
33
|
-
fontSize: config.size
|
|
41
|
+
fontSize: config.size
|
|
34
42
|
});
|
|
35
43
|
}
|
|
36
|
-
if (config === null || config === void 0 ? void 0 : config.
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
if ((config === null || config === void 0 ? void 0 : config.position) === 'right') { // 位置应该是引用的对象中设置,自身应该不需要设置。
|
|
44
|
+
if ((config === null || config === void 0 ? void 0 : config.position) === 'right') {
|
|
45
|
+
// 位置应该是引用的对象中设置,自身应该不需要设置。
|
|
40
46
|
this.addStyleObj(td_icon_style_1.$iconRight);
|
|
41
47
|
}
|
|
42
|
-
else {
|
|
43
|
-
|
|
48
|
+
else if ((config === null || config === void 0 ? void 0 : config.position) === 'left') {
|
|
49
|
+
this.addStyleObj(td_icon_style_1.$iconLeft);
|
|
44
50
|
}
|
|
45
51
|
// this.addStyleObj(sizeOpts[size]);
|
|
46
52
|
// this.addAttrObj({
|
|
@@ -48,10 +54,35 @@ class TdIcon extends framework_1.TypeI {
|
|
|
48
54
|
// size: 'middle' // small middle, large
|
|
49
55
|
// });
|
|
50
56
|
}
|
|
57
|
+
created() {
|
|
58
|
+
var _a;
|
|
59
|
+
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.loading) {
|
|
60
|
+
this.addStyleObj(td_icon_style_1.$iconLoading);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
51
63
|
replaceSvg(svg) {
|
|
52
64
|
this.childNodes.splice(1, 1, svg);
|
|
53
65
|
svg.parent = this;
|
|
54
66
|
this.render();
|
|
55
67
|
}
|
|
68
|
+
mounted() {
|
|
69
|
+
/**
|
|
70
|
+
* loading 效果
|
|
71
|
+
* todo css 中配置 @keyframes rotating {
|
|
72
|
+
* 0% {
|
|
73
|
+
* transform: rotateZ(0deg);
|
|
74
|
+
* }
|
|
75
|
+
* 100% {
|
|
76
|
+
* transform: rotateZ(360deg);
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
* 现在配置的不生效 ???? shadowRoot 会隔离了样式。
|
|
80
|
+
* 而打包时,样式会在最外层的项目中生成,导致样式失效。
|
|
81
|
+
*/
|
|
82
|
+
// if (this.config?.loading) {
|
|
83
|
+
// const a = createRotatableElement(this.dom, 0, 60);
|
|
84
|
+
// a.start();
|
|
85
|
+
// }
|
|
86
|
+
}
|
|
56
87
|
}
|
|
57
88
|
exports.TdIcon = TdIcon;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TypeSvgSvg } from '@type-dom/framework';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
export interface ITdIcon extends IUI {
|
|
4
|
+
className: 'TdIcon';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdIconConfig extends IUIConfig {
|
|
7
|
+
SvgClass: any;
|
|
8
|
+
svgObj: TypeSvgSvg;
|
|
9
|
+
size: string;
|
|
10
|
+
color: string;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
position: 'left' | 'right';
|
|
13
|
+
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.$iconLeft = exports.$iconRight = exports.$iconLoading = exports.$tdIcon = void 0;
|
|
4
4
|
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
require("./icon.scss");
|
|
5
6
|
exports.$tdIcon = {
|
|
6
|
-
height: '1em',
|
|
7
|
+
// height: '1em',
|
|
7
8
|
width: '1em',
|
|
8
9
|
lineHeight: '1em',
|
|
9
10
|
display: framework_1.StyleDisplay.inlineFlex,
|
|
@@ -12,16 +13,16 @@ exports.$tdIcon = {
|
|
|
12
13
|
position: framework_1.StylePosition.relative,
|
|
13
14
|
fill: 'currentColor',
|
|
14
15
|
// color: var(--color),
|
|
15
|
-
fontSize: 'inherit'
|
|
16
|
+
fontSize: 'inherit'
|
|
16
17
|
};
|
|
17
18
|
exports.$iconLoading = {
|
|
18
19
|
animation: 'rotating 2s linear infinite'
|
|
19
20
|
};
|
|
20
21
|
exports.$iconRight = {
|
|
21
22
|
marginLeft: '5px',
|
|
22
|
-
float: 'right'
|
|
23
|
+
float: 'right'
|
|
23
24
|
};
|
|
24
25
|
exports.$iconLeft = {
|
|
25
26
|
marginRight: '5px',
|
|
26
|
-
float: 'left'
|
|
27
|
+
float: 'left'
|
|
27
28
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TdRow } from '../td-row/td-row.class';
|
|
2
|
+
import { ITdCol, ITdColConfig } from './td-col.interface';
|
|
3
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
4
|
+
export declare class TdCol extends UI implements ITdCol {
|
|
5
|
+
className: 'TdCol';
|
|
6
|
+
config?: ITdColConfig;
|
|
7
|
+
parent?: TdRow;
|
|
8
|
+
constructor(config?: ITdColConfig);
|
|
9
|
+
get screenWidth(): number;
|
|
10
|
+
setConfig(config?: ITdColConfig): void;
|
|
11
|
+
resize(): void;
|
|
12
|
+
initEvents(): void;
|
|
13
|
+
}
|