@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,46 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../../ui/ui.interface';
|
|
2
|
+
export interface ITdCol extends IUI {
|
|
3
|
+
className: 'TdCol';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdColConfig extends IUIConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @description custom element tag
|
|
8
|
+
*/
|
|
9
|
+
tag?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description number of column the grid spans
|
|
12
|
+
*/
|
|
13
|
+
span?: number;
|
|
14
|
+
/**
|
|
15
|
+
* @description number of spacing on the left side of the grid
|
|
16
|
+
*/
|
|
17
|
+
offset?: number;
|
|
18
|
+
/**
|
|
19
|
+
* @description number of columns that grid moves to the left
|
|
20
|
+
*/
|
|
21
|
+
pull?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @description number of columns that grid moves to the right
|
|
24
|
+
*/
|
|
25
|
+
push?: number;
|
|
26
|
+
/**
|
|
27
|
+
* @description `<768px` Responsive columns or column props object
|
|
28
|
+
*/
|
|
29
|
+
xs?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @description `≥768px` Responsive columns or column props object
|
|
32
|
+
*/
|
|
33
|
+
sm?: number;
|
|
34
|
+
/**
|
|
35
|
+
* @description `≥992px` Responsive columns or column props object
|
|
36
|
+
*/
|
|
37
|
+
md?: number;
|
|
38
|
+
/**
|
|
39
|
+
* @description `≥1200px` Responsive columns or column props object
|
|
40
|
+
*/
|
|
41
|
+
lg?: number;
|
|
42
|
+
/**
|
|
43
|
+
* @description `≥1920px` Responsive columns or column props object
|
|
44
|
+
*/
|
|
45
|
+
xl?: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ITdRow, ITdRowConfig } from './td-row.interface';
|
|
2
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
3
|
+
import { TdCol } from '../td-col/td-col.class';
|
|
4
|
+
export declare class TdRow extends UI implements ITdRow {
|
|
5
|
+
className: 'TdRow';
|
|
6
|
+
childNodes: TdCol[];
|
|
7
|
+
gutter?: number;
|
|
8
|
+
constructor(config?: ITdRowConfig);
|
|
9
|
+
setConfig(config?: ITdRowConfig): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdRow = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
const td_col_class_1 = require("../td-col/td-col.class");
|
|
6
|
+
class TdRow extends ui_abstract_1.UI {
|
|
7
|
+
// justify: string = 'start';
|
|
8
|
+
// align: string = 'top';
|
|
9
|
+
// tag: string = 'div';
|
|
10
|
+
constructor(config) {
|
|
11
|
+
super();
|
|
12
|
+
this.className = 'TdRow';
|
|
13
|
+
this.addStyleObj({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexWrap: 'wrap',
|
|
16
|
+
position: 'relative',
|
|
17
|
+
boxSizing: 'border-box'
|
|
18
|
+
});
|
|
19
|
+
this.childNodes = [];
|
|
20
|
+
this.setConfig(config);
|
|
21
|
+
}
|
|
22
|
+
setConfig(config) {
|
|
23
|
+
super.setConfig(config);
|
|
24
|
+
if (config === null || config === void 0 ? void 0 : config.gutter) {
|
|
25
|
+
this.gutter = config.gutter;
|
|
26
|
+
this.addStyleObj({
|
|
27
|
+
marginLeft: `-${config.gutter / 2}px`,
|
|
28
|
+
marginRight: `-${config.gutter / 2}px`
|
|
29
|
+
});
|
|
30
|
+
this.children.forEach((child) => {
|
|
31
|
+
if (child instanceof td_col_class_1.TdCol) {
|
|
32
|
+
if (config.gutter) {
|
|
33
|
+
child.addStyleObj({
|
|
34
|
+
boxSizing: 'border-box',
|
|
35
|
+
paddingLeft: `${config.gutter / 2}px`,
|
|
36
|
+
paddingRight: `${config.gutter / 2}px`
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (config === null || config === void 0 ? void 0 : config.justify) {
|
|
43
|
+
// this.setJustify(config.justify);
|
|
44
|
+
switch (config.justify) {
|
|
45
|
+
case 'center':
|
|
46
|
+
this.addStyleObj({
|
|
47
|
+
justifyContent: 'center'
|
|
48
|
+
});
|
|
49
|
+
break;
|
|
50
|
+
case 'end':
|
|
51
|
+
this.addStyleObj({
|
|
52
|
+
justifyContent: 'flex-end'
|
|
53
|
+
});
|
|
54
|
+
break;
|
|
55
|
+
case 'space-between':
|
|
56
|
+
this.addStyleObj({
|
|
57
|
+
justifyContent: 'space-between'
|
|
58
|
+
});
|
|
59
|
+
break;
|
|
60
|
+
case 'space-around':
|
|
61
|
+
this.addStyleObj({
|
|
62
|
+
justifyContent: 'space-around'
|
|
63
|
+
});
|
|
64
|
+
break;
|
|
65
|
+
case 'space-evenly':
|
|
66
|
+
this.addStyleObj({
|
|
67
|
+
justifyContent: 'space-evenly'
|
|
68
|
+
});
|
|
69
|
+
break;
|
|
70
|
+
default:
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (config === null || config === void 0 ? void 0 : config.align) {
|
|
75
|
+
// this.setAlign(config.align);
|
|
76
|
+
switch (config.align) {
|
|
77
|
+
case 'top':
|
|
78
|
+
this.addStyleObj({
|
|
79
|
+
alignItems: 'flex-start'
|
|
80
|
+
});
|
|
81
|
+
break;
|
|
82
|
+
case 'middle':
|
|
83
|
+
this.addStyleObj({
|
|
84
|
+
alignItems: 'center'
|
|
85
|
+
});
|
|
86
|
+
break;
|
|
87
|
+
case 'bottom':
|
|
88
|
+
this.addStyleObj({
|
|
89
|
+
alignItems: 'flex-end'
|
|
90
|
+
});
|
|
91
|
+
break;
|
|
92
|
+
case 'stretch':
|
|
93
|
+
this.addStyleObj({
|
|
94
|
+
alignItems: 'stretch'
|
|
95
|
+
});
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.TdRow = TdRow;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../../ui/ui.interface';
|
|
2
|
+
export interface ITdRow extends IUI {
|
|
3
|
+
className: 'TdRow';
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* gutter: number = 0;
|
|
7
|
+
* justify: string = 'start';
|
|
8
|
+
* align: string = 'top';
|
|
9
|
+
* tag: string = 'div';
|
|
10
|
+
*/
|
|
11
|
+
export interface ITdRowConfig extends IUIConfig {
|
|
12
|
+
gutter?: number;
|
|
13
|
+
justify?: string;
|
|
14
|
+
align?: string;
|
|
15
|
+
tag?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const RowJustify: readonly ["start", "center", "end", "space-around", "space-between", "space-evenly"];
|
|
18
|
+
export declare const RowAlign: readonly ["top", "middle", "bottom"];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RowAlign = exports.RowJustify = void 0;
|
|
4
|
+
exports.RowJustify = [
|
|
5
|
+
'start',
|
|
6
|
+
'center',
|
|
7
|
+
'end',
|
|
8
|
+
'space-around',
|
|
9
|
+
'space-between',
|
|
10
|
+
'space-evenly'
|
|
11
|
+
];
|
|
12
|
+
exports.RowAlign = ['top', 'middle', 'bottom'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
2
|
+
import { TdIcon } from '../td-icon/td-icon.class';
|
|
3
|
+
import { ITdLink, ITdLinkConfig } from './td-link.interface';
|
|
4
|
+
export declare class TdLink extends UI implements ITdLink {
|
|
5
|
+
className: 'TdLink';
|
|
6
|
+
config?: ITdLinkConfig;
|
|
7
|
+
icon?: TdIcon;
|
|
8
|
+
constructor(configs: ITdLinkConfig);
|
|
9
|
+
setConfig(config?: Partial<ITdLinkConfig>): void;
|
|
10
|
+
initEvents(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdLink = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
6
|
+
const td_link_style_1 = require("../td-link/td-link.style");
|
|
7
|
+
class TdLink extends ui_abstract_1.UI {
|
|
8
|
+
constructor(configs) {
|
|
9
|
+
super({ tag: 'a' });
|
|
10
|
+
this.className = 'TdLink';
|
|
11
|
+
this.addStyleObj(td_link_style_1.$baseLink);
|
|
12
|
+
this.setConfig(configs);
|
|
13
|
+
}
|
|
14
|
+
setConfig(config) {
|
|
15
|
+
super.setConfig(config);
|
|
16
|
+
this.config = config;
|
|
17
|
+
if (config === null || config === void 0 ? void 0 : config.href) {
|
|
18
|
+
this.addAttrObj({
|
|
19
|
+
href: config.href
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (config === null || config === void 0 ? void 0 : config.target) {
|
|
23
|
+
this.addAttrObj({
|
|
24
|
+
target: config.target
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (config === null || config === void 0 ? void 0 : config.disabled) {
|
|
28
|
+
this.addAttrObj({
|
|
29
|
+
disabled: config.disabled
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (config === null || config === void 0 ? void 0 : config.type) {
|
|
33
|
+
if (config === null || config === void 0 ? void 0 : config.disabled) {
|
|
34
|
+
this.addStyleObj(td_link_style_1.$linkStateColors[config.type].disabled);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.addStyleObj(td_link_style_1.$linkStateColors[config.type].default);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.addStyleObj(td_link_style_1.$linkStateColors.default.default);
|
|
42
|
+
}
|
|
43
|
+
if (config === null || config === void 0 ? void 0 : config.icon) {
|
|
44
|
+
if ((config === null || config === void 0 ? void 0 : config.iconPosition) === 'left') {
|
|
45
|
+
// 插入到前面
|
|
46
|
+
this.unshiftChild(config.icon);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.addChild(config.icon);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
initEvents() {
|
|
54
|
+
this.addEvents({
|
|
55
|
+
mouseover: () => {
|
|
56
|
+
var _a, _b, _c, _d;
|
|
57
|
+
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.type) {
|
|
58
|
+
if ((_b = this.config) === null || _b === void 0 ? void 0 : _b.disabled) {
|
|
59
|
+
this.setStyleObj({
|
|
60
|
+
cursor: framework_1.StyleCursor.notAllowed
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this.setStyleObj(td_link_style_1.$linkStateColors[(_c = this.config) === null || _c === void 0 ? void 0 : _c.type].hover);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.setStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
69
|
+
}
|
|
70
|
+
if (((_d = this.config) === null || _d === void 0 ? void 0 : _d.underline) === false) { // 设置 false 的情况下,不显示下划线
|
|
71
|
+
this.setStyleObj({
|
|
72
|
+
textDecoration: 'none'
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// 1. 默认显示下划线
|
|
77
|
+
// 2. 默认显示下划线,如果设置了 underline 为 true,则显示下划线
|
|
78
|
+
this.setStyleObj({
|
|
79
|
+
textDecoration: 'underline'
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
mouseout: (evt) => {
|
|
84
|
+
var _a, _b, _c, _d, _e;
|
|
85
|
+
this.setStyleObj({
|
|
86
|
+
textDecoration: 'none'
|
|
87
|
+
});
|
|
88
|
+
if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.type) {
|
|
89
|
+
this.removeStyleObj(td_link_style_1.$linkStateColors[(_b = this.config) === null || _b === void 0 ? void 0 : _b.type].hover);
|
|
90
|
+
if ((_c = this.config) === null || _c === void 0 ? void 0 : _c.disabled) {
|
|
91
|
+
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
92
|
+
this.setStyleObj(td_link_style_1.$linkStateColors[(_d = this.config) === null || _d === void 0 ? void 0 : _d.type].disabled);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.setStyleObj(td_link_style_1.$linkStateColors[(_e = this.config) === null || _e === void 0 ? void 0 : _e.type].default);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.removeStyleObj(td_link_style_1.$linkStateColors.default.hover);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.TdLink = TdLink;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TdIcon } from '@type-dom/ui';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
export interface ITdLink extends IUI {
|
|
4
|
+
className: 'TdLink';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdLinkConfig extends IUIConfig {
|
|
7
|
+
title?: string;
|
|
8
|
+
type?: 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'default';
|
|
9
|
+
/**
|
|
10
|
+
* @description whether the component has underline
|
|
11
|
+
*/
|
|
12
|
+
underline?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @description whether the component is disabled
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @description same as native hyperlink's `href`
|
|
19
|
+
*/
|
|
20
|
+
href?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @description same as native hyperlink's `target`
|
|
23
|
+
*/
|
|
24
|
+
target?: '_blank' | '_parent' | '_self' | '_top' | string;
|
|
25
|
+
/**
|
|
26
|
+
* @description icon component
|
|
27
|
+
*/
|
|
28
|
+
icon?: TdIcon;
|
|
29
|
+
/**
|
|
30
|
+
* @description icon position 默认 right
|
|
31
|
+
*/
|
|
32
|
+
iconPosition?: 'left' | 'right';
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buttonVariant = exports.$linkStateColors = exports.$baseLink = void 0;
|
|
4
|
+
const framework_1 = require("@type-dom/framework");
|
|
5
|
+
const var_1 = require("../../../styles/var");
|
|
6
|
+
exports.$baseLink = {
|
|
7
|
+
display: 'inline-flex',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
verticalAlign: 'middle',
|
|
12
|
+
position: 'relative',
|
|
13
|
+
textDecoration: 'none',
|
|
14
|
+
outline: 'none',
|
|
15
|
+
cursor: framework_1.StyleCursor.pointer,
|
|
16
|
+
padding: '0'
|
|
17
|
+
};
|
|
18
|
+
exports.$linkStateColors = {};
|
|
19
|
+
function buttonVariant($type) {
|
|
20
|
+
exports.$linkStateColors[$type] = {
|
|
21
|
+
default: {
|
|
22
|
+
color: var_1.$colors[$type].base
|
|
23
|
+
},
|
|
24
|
+
hover: {
|
|
25
|
+
color: $type === 'default' ? var_1.$colors['primary'].base : var_1.$colors[$type]['light-3'] // ['color', $type, 'light-3'],
|
|
26
|
+
// content: '',
|
|
27
|
+
// position: 'absolute',
|
|
28
|
+
// left: 0,
|
|
29
|
+
// right: 0,
|
|
30
|
+
// height: 0,
|
|
31
|
+
// bottom: 0,
|
|
32
|
+
// borderBottom: '1px solid ' + ($type === 'default' ? $colors['primary'].base : $colors[$type]['light-3']),
|
|
33
|
+
},
|
|
34
|
+
active: {
|
|
35
|
+
color: var_1.$colors[$type]['dark-2'] // ['color', $type, 'dark-2'],
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
color: var_1.$colors[$type]['light-5'] // ['color', $type, 'light-5'],
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.buttonVariant = buttonVariant;
|
|
43
|
+
for (const $type of ['primary', 'success', 'warning', 'info', 'danger', 'default']) {
|
|
44
|
+
buttonVariant($type);
|
|
45
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
2
|
+
import { TdScrollbarThumb } from '../thumb/thumb.class';
|
|
3
|
+
import { ITdScrollbarBar, ITdScrollbarBarConfig } from './bar.interface';
|
|
4
|
+
export declare class TdScrollbarBar extends UI implements ITdScrollbarBar {
|
|
5
|
+
className: 'TdScrollbarBar';
|
|
6
|
+
thumbs: [TdScrollbarThumb, TdScrollbarThumb];
|
|
7
|
+
constructor(config?: ITdScrollbarBarConfig);
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdScrollbarBar = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
const thumb_class_1 = require("../thumb/thumb.class");
|
|
6
|
+
class TdScrollbarBar extends ui_abstract_1.UI {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
super();
|
|
9
|
+
this.className = 'TdScrollbarBar';
|
|
10
|
+
this.addAttrName('td-scrollbar-bar');
|
|
11
|
+
this.addStyleObj({
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
right: '2px',
|
|
14
|
+
bottom: '2px',
|
|
15
|
+
zIndex: 1,
|
|
16
|
+
borderRadius: '4px',
|
|
17
|
+
});
|
|
18
|
+
// config?.minSize 20
|
|
19
|
+
this.thumbs = [
|
|
20
|
+
new thumb_class_1.TdScrollbarThumb({
|
|
21
|
+
vertical: false,
|
|
22
|
+
ratio: 1,
|
|
23
|
+
}),
|
|
24
|
+
new thumb_class_1.TdScrollbarThumb({
|
|
25
|
+
vertical: true,
|
|
26
|
+
ratio: 1,
|
|
27
|
+
})
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TdScrollbarBar = TdScrollbarBar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ITdScrollbar, ITdScrollbarConfig } from './td-scrollbar.interface';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
export declare class TdScrollbar extends UI implements ITdScrollbar {
|
|
4
|
+
className: 'TdScrollbar';
|
|
5
|
+
private wrap;
|
|
6
|
+
private view;
|
|
7
|
+
constructor(config?: Partial<ITdScrollbarConfig>);
|
|
8
|
+
setConfig(config?: Partial<ITdScrollbarConfig>): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdScrollbar = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const bar_class_1 = require("./bar/bar.class");
|
|
7
|
+
class TdScrollbar extends ui_abstract_1.UI {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super(config);
|
|
10
|
+
this.className = 'TdScrollbar';
|
|
11
|
+
this.addAttrName('td-scrollbar');
|
|
12
|
+
this.addStyleObj({
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
position: 'relative',
|
|
15
|
+
height: '100%',
|
|
16
|
+
});
|
|
17
|
+
this.wrap = new framework_1.Div({
|
|
18
|
+
name: 'td-scrollbar-wrap',
|
|
19
|
+
styleObj: {
|
|
20
|
+
overflow: 'auto',
|
|
21
|
+
height: (config === null || config === void 0 ? void 0 : config.height) || '100%',
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
this.view = new framework_1.Div({
|
|
25
|
+
name: 'td-scrollbar-view'
|
|
26
|
+
});
|
|
27
|
+
if (config === null || config === void 0 ? void 0 : config.viewStyle) {
|
|
28
|
+
this.view.addStyleObj(config.viewStyle);
|
|
29
|
+
}
|
|
30
|
+
this.wrap.addChild(this.view);
|
|
31
|
+
if (config === null || config === void 0 ? void 0 : config.wrapStyle) {
|
|
32
|
+
this.wrap.addStyleObj(config.wrapStyle);
|
|
33
|
+
}
|
|
34
|
+
this.addChild(this.wrap);
|
|
35
|
+
if (!(config === null || config === void 0 ? void 0 : config.native)) {
|
|
36
|
+
const bar = new bar_class_1.TdScrollbarBar({
|
|
37
|
+
always: (config === null || config === void 0 ? void 0 : config.always) || true,
|
|
38
|
+
minSize: (config === null || config === void 0 ? void 0 : config.minSize) || 20,
|
|
39
|
+
});
|
|
40
|
+
this.addChildren(...bar.thumbs);
|
|
41
|
+
}
|
|
42
|
+
if (config === null || config === void 0 ? void 0 : config.contents) {
|
|
43
|
+
this.view.addChildren(...config.contents);
|
|
44
|
+
}
|
|
45
|
+
this.setConfig(config);
|
|
46
|
+
}
|
|
47
|
+
setConfig(config) {
|
|
48
|
+
super.setConfig(config);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.TdScrollbar = TdScrollbar;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IStyle, TypeElement } from '@type-dom/framework';
|
|
2
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
3
|
+
export interface ITdScrollbar extends IUI {
|
|
4
|
+
className: 'TdScrollbar';
|
|
5
|
+
}
|
|
6
|
+
export interface ITdScrollbarConfig extends IUIConfig {
|
|
7
|
+
/**
|
|
8
|
+
* @description height of scrollbar
|
|
9
|
+
*/
|
|
10
|
+
height?: number | string;
|
|
11
|
+
/**
|
|
12
|
+
* @description max height of scrollbar
|
|
13
|
+
*/
|
|
14
|
+
maxHeight: number | string;
|
|
15
|
+
/**
|
|
16
|
+
* @description whether to use the native scrollbar
|
|
17
|
+
*/
|
|
18
|
+
native?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description style of wrap
|
|
21
|
+
*/
|
|
22
|
+
wrapStyle?: Partial<IStyle>;
|
|
23
|
+
/**
|
|
24
|
+
* @description class of view
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* @description style of view
|
|
28
|
+
*/
|
|
29
|
+
viewStyle?: Partial<IStyle>;
|
|
30
|
+
/**
|
|
31
|
+
* @description element tag of the view
|
|
32
|
+
* default: div
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance
|
|
36
|
+
*/
|
|
37
|
+
noresize?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @description always show
|
|
40
|
+
*/
|
|
41
|
+
always?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @description minimum size of scrollbar
|
|
44
|
+
*/
|
|
45
|
+
minSize?: number;
|
|
46
|
+
/**
|
|
47
|
+
* @description id of view
|
|
48
|
+
*/
|
|
49
|
+
id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* @description role of view
|
|
52
|
+
*/
|
|
53
|
+
role?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @description aria-label of view
|
|
56
|
+
*/
|
|
57
|
+
ariaLabel?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @description aria-orientation of view
|
|
60
|
+
*/
|
|
61
|
+
ariaOrientation?: 'horizontal' | 'vertical';
|
|
62
|
+
contents?: TypeElement[];
|
|
63
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UI } from '../../../../ui/ui.abstract';
|
|
2
|
+
import { ITdScrollbarThumb, ITdScrollbarThumbConfig } from './thumb.interface';
|
|
3
|
+
export declare class TdScrollbarThumb extends UI implements ITdScrollbarThumb {
|
|
4
|
+
className: 'TdScrollbarThumb';
|
|
5
|
+
private thumb;
|
|
6
|
+
constructor(config?: ITdScrollbarThumbConfig);
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdScrollbarThumb = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../../ui/ui.abstract");
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const ui_1 = require("@type-dom/ui");
|
|
7
|
+
class TdScrollbarThumb extends ui_abstract_1.UI {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super();
|
|
10
|
+
this.className = 'TdScrollbarThumb';
|
|
11
|
+
this.addAttrName('td-scrollbar-thumb');
|
|
12
|
+
this.addStyleObj({
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
right: '2px',
|
|
15
|
+
bottom: '2px',
|
|
16
|
+
zIndex: 1,
|
|
17
|
+
borderRadius: '4px',
|
|
18
|
+
});
|
|
19
|
+
this.thumb = new framework_1.Div({
|
|
20
|
+
styleObj: {
|
|
21
|
+
position: 'relative',
|
|
22
|
+
display: 'block',
|
|
23
|
+
width: 0,
|
|
24
|
+
height: 0,
|
|
25
|
+
cursor: framework_1.StyleCursor.pointer,
|
|
26
|
+
borderRadius: 'inherit',
|
|
27
|
+
// background-color: var(
|
|
28
|
+
// #{getCssVarName('scrollbar-bg-color')},
|
|
29
|
+
// map.get($scrollbar, 'bg-color')
|
|
30
|
+
// ),
|
|
31
|
+
backgroundColor: ui_1.$scrollbar.bgColor,
|
|
32
|
+
// transition: getCssVar('transition-duration') background-color,
|
|
33
|
+
// transition: $transitionDuration + ' ' + $bgColor.default,
|
|
34
|
+
// opacity: var(
|
|
35
|
+
// #{getCssVarName('scrollbar-opacity')},
|
|
36
|
+
// map.get($scrollbar, 'opacity')
|
|
37
|
+
// ),
|
|
38
|
+
opacity: ui_1.$scrollbar.opacity,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
this.addChild(this.thumb);
|
|
42
|
+
this.setConfig(config);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.TdScrollbarThumb = TdScrollbarThumb;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../../ui/ui.interface';
|
|
2
|
+
export interface ITdScrollbarThumb extends IUI {
|
|
3
|
+
className: 'TdScrollbarThumb';
|
|
4
|
+
}
|
|
5
|
+
export interface ITdScrollbarThumbConfig extends IUIConfig {
|
|
6
|
+
vertical?: boolean;
|
|
7
|
+
size?: string;
|
|
8
|
+
move?: number;
|
|
9
|
+
ratio: number;
|
|
10
|
+
always?: boolean;
|
|
11
|
+
}
|