@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,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdForm = void 0;
|
|
4
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
5
|
+
const td_form_item_class_1 = require("../td-form-item/td-form-item.class");
|
|
6
|
+
/**
|
|
7
|
+
* TdForm类继承自UI抽象类,实现ITdForm接口,用于创建和管理表单。
|
|
8
|
+
* 提交表单时,应该要获取所有子元素 form-item 里的 如 TdInput 这些可输入的组件的值。
|
|
9
|
+
* 表单提交地址也应该是可以配置的。
|
|
10
|
+
*/
|
|
11
|
+
class TdForm extends ui_abstract_1.UI {
|
|
12
|
+
/**
|
|
13
|
+
* 构造函数,初始化表单配置。
|
|
14
|
+
* @param {ITdFormConfig} config? 可选的表单配置对象。
|
|
15
|
+
*/
|
|
16
|
+
constructor(config) {
|
|
17
|
+
super({ tag: 'form' });
|
|
18
|
+
this.className = 'TdForm';
|
|
19
|
+
this.addAttrName('td-form');
|
|
20
|
+
this.setConfig(config);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 设置表单配置,包括模型和样式配置,并应用到子元素。
|
|
24
|
+
* @param {ITdFormConfig} config? 可选的表单配置对象。
|
|
25
|
+
*/
|
|
26
|
+
setConfig(config) {
|
|
27
|
+
super.setConfig(config);
|
|
28
|
+
// 应用模型数据
|
|
29
|
+
if (config === null || config === void 0 ? void 0 : config.model) {
|
|
30
|
+
this.model = config.model;
|
|
31
|
+
}
|
|
32
|
+
// 待实现:设置子元素的labelWidth
|
|
33
|
+
if (config === null || config === void 0 ? void 0 : config.labelWidth) {
|
|
34
|
+
// todo 设置子元素的labelWidth
|
|
35
|
+
}
|
|
36
|
+
// 遍历子元素,应用样式和配置
|
|
37
|
+
this.children.forEach((child) => {
|
|
38
|
+
var _a, _b, _c, _d, _e;
|
|
39
|
+
if (child instanceof td_form_item_class_1.TdFormItem) {
|
|
40
|
+
child.addStyleObj({
|
|
41
|
+
display: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.inline) ? 'inline-flex' : 'flex',
|
|
42
|
+
verticalAlign: 'middle',
|
|
43
|
+
marginRight: ((_b = this.config) === null || _b === void 0 ? void 0 : _b.inline) ? '32px' : (_c = child.styleObj) === null || _c === void 0 ? void 0 : _c.marginRight,
|
|
44
|
+
// justifyContent: justifyContent,
|
|
45
|
+
});
|
|
46
|
+
child.setLabelPosition((_d = this.config) === null || _d === void 0 ? void 0 : _d.labelPosition);
|
|
47
|
+
child.setSize((_e = this.config) === null || _e === void 0 ? void 0 : _e.size);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.TdForm = TdForm;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { ISize } from '../../../styles/size';
|
|
3
|
+
import { ITdFormItemConfig } from '../td-form-item/td-form-item.interface';
|
|
4
|
+
export interface ITdForm extends IUI {
|
|
5
|
+
className: 'TdForm';
|
|
6
|
+
}
|
|
7
|
+
export interface IFormRule {
|
|
8
|
+
required?: boolean;
|
|
9
|
+
validator?: (rule: any, value: any, callback: any) => boolean;
|
|
10
|
+
trigger?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
max?: number;
|
|
13
|
+
min?: number;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
minLength?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IFormRules {
|
|
18
|
+
[propName: string]: IFormRule[];
|
|
19
|
+
}
|
|
20
|
+
export interface ITdFormConfig extends IUIConfig {
|
|
21
|
+
/**
|
|
22
|
+
* @description Control the size of components in this form.
|
|
23
|
+
*/
|
|
24
|
+
size?: ISize;
|
|
25
|
+
/**
|
|
26
|
+
* @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @description Data of form component.
|
|
31
|
+
*/
|
|
32
|
+
model?: object;
|
|
33
|
+
/**
|
|
34
|
+
* @description Validation rules of form.
|
|
35
|
+
*/
|
|
36
|
+
rules?: IFormRules;
|
|
37
|
+
/**
|
|
38
|
+
* @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.
|
|
39
|
+
* default: 'right',
|
|
40
|
+
*/
|
|
41
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
42
|
+
/**
|
|
43
|
+
* @description Position of asterisk.
|
|
44
|
+
* default: 'left'
|
|
45
|
+
*/
|
|
46
|
+
requireAsteriskPosition?: 'left' | 'right';
|
|
47
|
+
/**
|
|
48
|
+
* @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.
|
|
49
|
+
* default: '',
|
|
50
|
+
*/
|
|
51
|
+
labelWidth?: string | number;
|
|
52
|
+
/**
|
|
53
|
+
* @description Suffix of the label.
|
|
54
|
+
* default: '',
|
|
55
|
+
*/
|
|
56
|
+
labelSuffix?: string;
|
|
57
|
+
/**
|
|
58
|
+
* @description Whether the form is inline.
|
|
59
|
+
*/
|
|
60
|
+
inline?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @description Whether to display the error message inline with the form item.
|
|
63
|
+
*/
|
|
64
|
+
inlineMessage?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* @description Whether to display an icon indicating the validation result.
|
|
67
|
+
*/
|
|
68
|
+
statusIcon?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* @description Whether to show the error message.
|
|
71
|
+
* default: true,
|
|
72
|
+
*/
|
|
73
|
+
showMessage?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @description Whether to trigger validation when the `rules` prop is changed.
|
|
76
|
+
* default: true,
|
|
77
|
+
*/
|
|
78
|
+
validateOnRuleChange?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @description Whether to hide required fields should have a red asterisk (star) beside their labels.
|
|
81
|
+
*/
|
|
82
|
+
hideRequiredAsterisk?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* @description When validation fails, scroll to the first error form entry.
|
|
85
|
+
*/
|
|
86
|
+
scrollToError?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.
|
|
89
|
+
*/
|
|
90
|
+
scrollIntoViewOptions?: object | boolean;
|
|
91
|
+
options?: Array<ITdFormItemConfig>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Label } from '@type-dom/framework';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
import { TdForm } from '../td-form/td-form.class';
|
|
4
|
+
import { ILabelPosition, ITdFormItem, ITdFormItemConfig } from './td-form-item.interface';
|
|
5
|
+
import { ISize } from '../../../styles/size';
|
|
6
|
+
export declare class TdFormItem extends UI implements ITdFormItem {
|
|
7
|
+
className: 'TdFormItem';
|
|
8
|
+
parent?: TdForm;
|
|
9
|
+
private labelWrap?;
|
|
10
|
+
label?: Label;
|
|
11
|
+
private content;
|
|
12
|
+
private error?;
|
|
13
|
+
constructor(config?: ITdFormItemConfig);
|
|
14
|
+
setConfig(config?: ITdFormItemConfig): void;
|
|
15
|
+
setLabelPosition(position?: ILabelPosition): void;
|
|
16
|
+
setSize(size?: ISize): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TdFormItem = void 0;
|
|
4
|
+
const utils_1 = require("@type-dom/utils");
|
|
5
|
+
const framework_1 = require("@type-dom/framework");
|
|
6
|
+
const ui_abstract_1 = require("../../../ui/ui.abstract");
|
|
7
|
+
const var_1 = require("../../../styles/var");
|
|
8
|
+
const td_form_item_style_1 = require("./td-form-item.style");
|
|
9
|
+
class TdFormItem extends ui_abstract_1.UI {
|
|
10
|
+
constructor(config) {
|
|
11
|
+
super();
|
|
12
|
+
this.className = 'TdFormItem';
|
|
13
|
+
this.addAttrName('td-form-item');
|
|
14
|
+
this.addStyleObj({
|
|
15
|
+
display: 'flex',
|
|
16
|
+
// --font-size: 14px,
|
|
17
|
+
fontSize: var_1.$fontSizes[(config === null || config === void 0 ? void 0 : config.size) || 'base'],
|
|
18
|
+
marginBottom: td_form_item_style_1.$formItemMarginBottom[(config === null || config === void 0 ? void 0 : config.size) || 'default']
|
|
19
|
+
});
|
|
20
|
+
this.labelWrap = new framework_1.Div({
|
|
21
|
+
attrObj: {
|
|
22
|
+
name: 'td-form-item-label-wrap'
|
|
23
|
+
},
|
|
24
|
+
styleObj: {
|
|
25
|
+
display: 'flex'
|
|
26
|
+
// marginLeft: '11px', // 这个是动态计算的
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (config === null || config === void 0 ? void 0 : config.label) {
|
|
30
|
+
this.addChild(this.labelWrap);
|
|
31
|
+
}
|
|
32
|
+
this.content = new framework_1.Div({
|
|
33
|
+
attrObj: {
|
|
34
|
+
name: 'td-form-item-content'
|
|
35
|
+
},
|
|
36
|
+
styleObj: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexWrap: 'wrap',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
flex: 1,
|
|
41
|
+
justifyContent: (config === null || config === void 0 ? void 0 : config.contentAlign) || 'left',
|
|
42
|
+
lineHeight: '32px',
|
|
43
|
+
position: 'relative',
|
|
44
|
+
// font-size: var(--font-size),
|
|
45
|
+
fontSize: var_1.$fontSizes.base,
|
|
46
|
+
minWidth: 0
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
this.error = new framework_1.Div({
|
|
50
|
+
text: 'Please input the ... ',
|
|
51
|
+
attrObj: {
|
|
52
|
+
name: 'td-form-item-error'
|
|
53
|
+
},
|
|
54
|
+
styleObj: {
|
|
55
|
+
// color: getCssVar('color-danger');
|
|
56
|
+
color: var_1.$colors.danger.base,
|
|
57
|
+
fontSize: '12px',
|
|
58
|
+
lineHeight: '1',
|
|
59
|
+
// padding-top: #{map.get($form-item-error-padding-top, 'default')},
|
|
60
|
+
paddingTop: td_form_item_style_1.$formItemErrorPaddingTop[(config === null || config === void 0 ? void 0 : config.size) || 'default'],
|
|
61
|
+
position: 'absolute',
|
|
62
|
+
top: '100%',
|
|
63
|
+
left: '0'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
// todo 动态加载
|
|
67
|
+
// this.content.addChild(this.error);
|
|
68
|
+
this.addChild(this.content);
|
|
69
|
+
if (config === null || config === void 0 ? void 0 : config.contents) {
|
|
70
|
+
this.content.addChildren(...config.contents);
|
|
71
|
+
}
|
|
72
|
+
// this.childNodes = [this.labelWrap, this.content];
|
|
73
|
+
this.setConfig(config);
|
|
74
|
+
}
|
|
75
|
+
setConfig(config) {
|
|
76
|
+
var _a, _b, _c, _d, _e, _f;
|
|
77
|
+
super.setConfig(config);
|
|
78
|
+
if (config === null || config === void 0 ? void 0 : config.label) {
|
|
79
|
+
this.label = new framework_1.Label({
|
|
80
|
+
text: config.label,
|
|
81
|
+
styleObj: {
|
|
82
|
+
display: 'inline-flex',
|
|
83
|
+
justifyContent: 'flex-end',
|
|
84
|
+
alignItems: 'flex-start',
|
|
85
|
+
flex: '0 0 auto',
|
|
86
|
+
// font-size: var(--el-form-label-font-size),
|
|
87
|
+
fontSize: var_1.$fontSizes[(config === null || config === void 0 ? void 0 : config.size) || 'base'],
|
|
88
|
+
// color: var(--el-text-color-regular),
|
|
89
|
+
color: var_1.$textColor.regular,
|
|
90
|
+
height: '32px',
|
|
91
|
+
lineHeight: '32px',
|
|
92
|
+
padding: '0 12px 0 0',
|
|
93
|
+
boxSizing: 'border-box'
|
|
94
|
+
// width: config?.labelWidth || this.parent?.config?.labelWidth || '',
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
if (((_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.labelPosition) === 'top') {
|
|
98
|
+
// todo
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const labelWidth = (0, utils_1.addUnit)(config.labelWidth || ((_d = (_c = this.parent) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.labelWidth) || '120px');
|
|
102
|
+
if (labelWidth) {
|
|
103
|
+
this.label.addStyleObj({
|
|
104
|
+
width: labelWidth
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (config.required) {
|
|
109
|
+
(_e = this.label) === null || _e === void 0 ? void 0 : _e.unshiftChild(new framework_1.Span({
|
|
110
|
+
text: '*',
|
|
111
|
+
styleObj: {
|
|
112
|
+
color: var_1.$colors.danger.base,
|
|
113
|
+
marginRight: '4px'
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
(_f = this.labelWrap) === null || _f === void 0 ? void 0 : _f.addChild(this.label);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
setLabelPosition(position) {
|
|
121
|
+
var _a;
|
|
122
|
+
// todo top 怎么处理 ?
|
|
123
|
+
(_a = this.label) === null || _a === void 0 ? void 0 : _a.setStyleObj({
|
|
124
|
+
justifyContent: position === 'left' ? 'flex-start' : 'flex-end'
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
setSize(size = 'default') {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
this.setStyleObj({
|
|
130
|
+
fontSize: var_1.$fontSizes[size],
|
|
131
|
+
marginBottom: td_form_item_style_1.$formItemMarginBottom[size]
|
|
132
|
+
});
|
|
133
|
+
(_a = this.label) === null || _a === void 0 ? void 0 : _a.setStyleObj({
|
|
134
|
+
height: td_form_item_style_1.$formItemLineHeight[size],
|
|
135
|
+
lineHeight: td_form_item_style_1.$formItemLineHeight[size]
|
|
136
|
+
});
|
|
137
|
+
this.content.setStyleObj({
|
|
138
|
+
lineHeight: td_form_item_style_1.$formItemLineHeight[size]
|
|
139
|
+
});
|
|
140
|
+
(_b = this.error) === null || _b === void 0 ? void 0 : _b.setStyleObj({
|
|
141
|
+
paddingTop: td_form_item_style_1.$formItemErrorPaddingTop[size]
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.TdFormItem = TdFormItem;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IUI, IUIConfig } from '../../../ui/ui.interface';
|
|
2
|
+
import { ISize } from '../../../styles/size';
|
|
3
|
+
import { TypeNode } from '@type-dom/framework';
|
|
4
|
+
export declare const formItemValidateStates: readonly ["", "error", "validating", "success"];
|
|
5
|
+
export type IFormItemValidateState = typeof formItemValidateStates[number];
|
|
6
|
+
export interface ITdFormItem extends IUI {
|
|
7
|
+
className: 'TdFormItem';
|
|
8
|
+
}
|
|
9
|
+
export interface ITdFormItemConfig extends IUIConfig {
|
|
10
|
+
/**
|
|
11
|
+
* @description Label text.
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description Width of label, e.g. `'50px'`. `'auto'` is supported.
|
|
16
|
+
*/
|
|
17
|
+
labelWidth?: string | number;
|
|
18
|
+
/**
|
|
19
|
+
* @description A key of `model`. It could be an array of property paths (e.g `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @description Whether the field is required or not, will be determined by validation rules if omitted.
|
|
23
|
+
*/
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator).
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @description Field error message, set its value and the field will validate error and show this message immediately.
|
|
30
|
+
*/
|
|
31
|
+
error?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @description Validation state of formItem.
|
|
34
|
+
*/
|
|
35
|
+
validateStatus?: IFormItemValidateState;
|
|
36
|
+
/**
|
|
37
|
+
* @description Same as for in native label.
|
|
38
|
+
*/
|
|
39
|
+
for?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @description Inline style validate message.
|
|
42
|
+
*/
|
|
43
|
+
inlineMessage?: string | boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @description Whether to show the error message.
|
|
46
|
+
* default: true,
|
|
47
|
+
*/
|
|
48
|
+
showMessage?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* @description Control the size of components in this form-item.
|
|
51
|
+
*/
|
|
52
|
+
size?: ISize;
|
|
53
|
+
contents?: TypeNode[];
|
|
54
|
+
contentAlign?: 'left' | 'right' | 'center';
|
|
55
|
+
labelPosition?: ILabelPosition;
|
|
56
|
+
}
|
|
57
|
+
export type ILabelPosition = 'left' | 'right' | 'top';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const $formItem: {
|
|
2
|
+
display: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const $formItemLabel: {};
|
|
5
|
+
export declare const $formItemMarginBottom: {
|
|
6
|
+
large: string;
|
|
7
|
+
default: string;
|
|
8
|
+
small: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const $formItemLineHeight: {
|
|
11
|
+
large: string;
|
|
12
|
+
default: string;
|
|
13
|
+
small: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const $formItemErrorPaddingTop: {
|
|
16
|
+
large: string;
|
|
17
|
+
default: string;
|
|
18
|
+
small: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const $formItemLabelTopLineHeight: {
|
|
21
|
+
large: string;
|
|
22
|
+
default: string;
|
|
23
|
+
small: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const $formItemLabelTopMarginBottom: {
|
|
26
|
+
large: string;
|
|
27
|
+
default: string;
|
|
28
|
+
small: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.$formItemLabelTopMarginBottom = exports.$formItemLabelTopLineHeight = exports.$formItemErrorPaddingTop = exports.$formItemLineHeight = exports.$formItemMarginBottom = exports.$formItemLabel = exports.$formItem = void 0;
|
|
4
|
+
exports.$formItem = {
|
|
5
|
+
display: 'flex'
|
|
6
|
+
// --font-size: #{map.get($input-font-size, 'default')};
|
|
7
|
+
// margin-bottom: #{map.get($form-item-margin-bottom, 'default')};
|
|
8
|
+
};
|
|
9
|
+
exports.$formItemLabel = {};
|
|
10
|
+
exports.$formItemMarginBottom = {
|
|
11
|
+
'large': '22px',
|
|
12
|
+
'default': '18px',
|
|
13
|
+
'small': '18px'
|
|
14
|
+
};
|
|
15
|
+
exports.$formItemLineHeight = {
|
|
16
|
+
'large': '40px',
|
|
17
|
+
'default': '32px',
|
|
18
|
+
'small': '24px'
|
|
19
|
+
};
|
|
20
|
+
exports.$formItemErrorPaddingTop = {
|
|
21
|
+
'large': '4px',
|
|
22
|
+
'default': '2px',
|
|
23
|
+
'small': '2px'
|
|
24
|
+
};
|
|
25
|
+
exports.$formItemLabelTopLineHeight = {
|
|
26
|
+
'large': '22px',
|
|
27
|
+
'default': '22px',
|
|
28
|
+
'small': '20px'
|
|
29
|
+
};
|
|
30
|
+
exports.$formItemLabelTopMarginBottom = {
|
|
31
|
+
'large': '12px',
|
|
32
|
+
'default': '8px',
|
|
33
|
+
'small': '4px'
|
|
34
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldInput } from '../field-item/input/field-input.abstract';
|
|
2
|
+
import { ITdInputField, ITdInputFieldConfig } from './td-input-field.interface';
|
|
3
|
+
export declare class TdInputField extends FieldInput implements ITdInputField {
|
|
4
|
+
className: 'TdInputField';
|
|
5
|
+
constructor(config: Partial<ITdInputFieldConfig>);
|
|
6
|
+
reset(value?: string): void;
|
|
7
|
+
}
|
package/src/{form/td-input/td-input.class.js → components/form/td-input/td-input-field.class.js}
RENAMED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TdInputField = void 0;
|
|
4
4
|
const field_input_abstract_1 = require("../field-item/input/field-input.abstract");
|
|
5
5
|
// 标题属性
|
|
6
|
-
class
|
|
6
|
+
class TdInputField extends field_input_abstract_1.FieldInput {
|
|
7
7
|
constructor(config) {
|
|
8
8
|
super(config.labelTitle, config.placeholder);
|
|
9
9
|
console.log('InputItem constructor . ');
|
|
10
|
-
this.className = '
|
|
10
|
+
this.className = 'TdInputField';
|
|
11
11
|
this.addStyleObj({
|
|
12
|
-
padding: '2px 10px 2px 0'
|
|
12
|
+
padding: '2px 10px 2px 0'
|
|
13
13
|
});
|
|
14
14
|
this.addAttrName('input-item');
|
|
15
15
|
this.label.addStyleObj({
|
|
16
16
|
fontSize: '16px',
|
|
17
|
-
width: config.labelWidth || '150px'
|
|
17
|
+
width: config.labelWidth || '150px'
|
|
18
18
|
});
|
|
19
19
|
this.content.addAttrObj({
|
|
20
|
-
type: (config === null || config === void 0 ? void 0 : config.type) || 'text'
|
|
20
|
+
type: (config === null || config === void 0 ? void 0 : config.type) || 'text'
|
|
21
21
|
});
|
|
22
22
|
// todo 有后缀时才需要这样
|
|
23
23
|
// this.content.addStyleObj({
|
|
@@ -25,7 +25,7 @@ class TdInput extends field_input_abstract_1.FieldInput {
|
|
|
25
25
|
// });
|
|
26
26
|
if (config.readonly) {
|
|
27
27
|
this.content.addAttrObj({
|
|
28
|
-
disabled: true
|
|
28
|
+
disabled: true
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
// this.button.setStyleObj({
|
|
@@ -52,4 +52,4 @@ class TdInput extends field_input_abstract_1.FieldInput {
|
|
|
52
52
|
// }
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
exports.
|
|
55
|
+
exports.TdInputField = TdInputField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypeComponent } from '@type-dom/framework';
|
|
2
|
-
export interface
|
|
3
|
-
className: '
|
|
2
|
+
export interface ITdInputField extends TypeComponent {
|
|
3
|
+
className: 'TdInputField';
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface ITdInputFieldConfig {
|
|
6
6
|
labelTitle?: string;
|
|
7
7
|
labelWidth?: string;
|
|
8
8
|
placeholder?: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IJsonDataProp } from '@type-dom/framework';
|
|
2
|
+
import { UI } from '../../../ui/ui.abstract';
|
|
3
|
+
import { TdInputWrapper } from './widget/td-input-wrapper.class';
|
|
4
|
+
import { TdTextareaWrapper } from './widget/td-textarea-wrapper';
|
|
5
|
+
import { ITdInput, ITdInputConfig } from './td-input.interface';
|
|
6
|
+
export declare class TdInput extends UI implements ITdInput {
|
|
7
|
+
className: 'TdInput';
|
|
8
|
+
config?: ITdInputConfig;
|
|
9
|
+
private isWordLimitVisible?;
|
|
10
|
+
hovering?: boolean;
|
|
11
|
+
isFocused?: boolean;
|
|
12
|
+
panel: TdInputWrapper | TdTextareaWrapper;
|
|
13
|
+
private placeholder?;
|
|
14
|
+
constructor(config?: ITdInputConfig);
|
|
15
|
+
setConfig(config?: ITdInputConfig): void;
|
|
16
|
+
initEvents(): void;
|
|
17
|
+
setModelValue(value: IJsonDataProp): void;
|
|
18
|
+
setHovering(hovering: boolean): void;
|
|
19
|
+
setFocus(isFocused: boolean): void;
|
|
20
|
+
created(): void;
|
|
21
|
+
}
|