tntd 2.8.0-beta.3 → 3.0.0-beta
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/es/alert/alert.js +70 -0
- package/es/alert/alert.js.map +1 -0
- package/es/alert/alert.less +128 -0
- package/es/alert/index.js +1 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.less +1 -0
- package/es/button/button.js +30 -3
- package/es/button/button.js.map +1 -1
- package/es/button/button.less +72 -0
- package/es/button/index.js +1 -0
- package/es/button/index.js.map +1 -1
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +48 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/checkbox/checkbox.less +69 -0
- package/es/checkbox/index.js +3 -7
- package/es/checkbox/index.js.map +1 -1
- package/es/color-picker/index.less +4 -1
- package/es/date-picker/DatePicker.js +101 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.js +6 -12
- package/es/date-picker/index.js.map +1 -1
- package/es/date-picker/index.less +294 -0
- package/es/date-picker/style/RangePicker.less +3 -3
- package/es/descriptions/descriptions.js +64 -21
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +57 -60
- package/es/descriptions/index.js +2 -2
- package/es/descriptions/index.js.map +1 -1
- package/es/drawer/drawer.js +98 -13
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.js +1 -1
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/index.less +154 -0
- package/es/drawer/style/drawer.less +18 -3
- package/es/drawer/style/index.js +2 -1
- package/es/drawer/style/index.js.map +1 -1
- package/es/form/form.js +3 -0
- package/es/form/form.js.map +1 -1
- package/es/form/form.less +36 -0
- package/es/icon/index.js +2 -0
- package/es/icon/index.js.map +1 -1
- package/es/icon/style/style.less +4 -0
- package/es/input/index.js +1 -1
- package/es/input/index.js.map +1 -1
- package/es/input/input.js +21 -30
- package/es/input/input.js.map +1 -1
- package/es/input/input.less +123 -20
- package/es/input-number/index.js +4 -5
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/inputNumber.js +29 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/input-number/inputNumber.less +12 -0
- package/es/locale/en_US.js +12 -1
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +12 -1
- package/es/locale/zh_CN.js.map +1 -1
- package/es/message/message.less +2 -1
- package/es/modal/index.js +2 -3
- package/es/modal/index.js.map +1 -1
- package/es/modal/index.less +36 -0
- package/es/modal/modal.js +104 -17
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/index.js +2 -1
- package/es/modal/style/index.js.map +1 -1
- package/es/notification/assets/index.js +2 -0
- package/es/notification/assets/index.js.map +1 -0
- package/es/notification/assets/svg-error-tip.js +145 -0
- package/es/notification/assets/svg-error-tip.js.map +1 -0
- package/es/notification/assets/svg-success-tip.js +162 -0
- package/es/notification/assets/svg-success-tip.js.map +1 -0
- package/es/notification/index.js +1 -1
- package/es/notification/index.js.map +1 -1
- package/es/notification/notification.js +80 -0
- package/es/notification/notification.js.map +1 -0
- package/es/notification/notification.less +59 -0
- package/es/notification/style/index.less +2 -0
- package/es/popconfirm/index.js +2 -2
- package/es/popconfirm/index.js.map +1 -1
- package/es/popconfirm/index.less +26 -0
- package/es/popconfirm/popconfirm.js +40 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popconfirm/style/index.js +2 -1
- package/es/popconfirm/style/index.js.map +1 -1
- package/es/popover/index.js +2 -2
- package/es/popover/index.js.map +1 -1
- package/es/popover/index.less +51 -0
- package/es/popover/popover.js +33 -0
- package/es/popover/popover.js.map +1 -0
- package/es/popover/style/index.js +1 -0
- package/es/popover/style/index.js.map +1 -1
- package/es/preview-text/index.js.map +1 -1
- package/es/progress/index.js +2 -2
- package/es/progress/index.js.map +1 -1
- package/es/progress/progress.js +132 -0
- package/es/progress/progress.js.map +1 -0
- package/es/progress/progress.less +82 -0
- package/es/query-form/Field/Composition/FieldPopover.js +284 -0
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form/Field/Composition/Select.js +108 -0
- package/es/query-form/Field/Composition/Select.js.map +1 -0
- package/es/query-form/Field/Composition/index.js +282 -0
- package/es/query-form/Field/Composition/index.js.map +1 -0
- package/es/query-form/Field/Composition/index.less +106 -0
- package/es/query-form/Field/Composition/utils.js +19 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -0
- package/es/query-form/index.js +109 -125
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +12 -9
- package/es/query-list-scene/index.less +4 -4
- package/es/radio/index.js +3 -5
- package/es/radio/index.js.map +1 -1
- package/es/radio/radio.js +57 -0
- package/es/radio/radio.js.map +1 -0
- package/es/radio/radio.less +43 -0
- package/es/segmented/index.less +126 -112
- package/es/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +5 -6
- package/es/select/select.js.map +1 -1
- package/es/select/select.less +83 -9
- package/es/steps/assets/background_left.svg +12 -0
- package/es/steps/assets/background_right.svg +12 -0
- package/es/steps/assets/horizontal_line.svg +3 -0
- package/es/steps/assets/vertical_line.svg +3 -0
- package/es/steps/index.js +9 -2
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/index.less +173 -8
- package/es/steps/stepStyle/nav.less +51 -259
- package/es/steps/stepStyle/progress-dot.less +10 -0
- package/es/steps/stepStyle/variables.less +8 -0
- package/es/steps/stepStyle/vertical.less +41 -0
- package/es/steps/steps.js +53 -27
- package/es/steps/steps.js.map +1 -1
- package/es/steps/style/index.js +8 -0
- package/es/steps/style/index.js.map +1 -1
- package/es/style/themes/default.less +3 -2
- package/es/switch/index.less +46 -0
- package/es/switch/style/index.js +2 -1
- package/es/switch/style/index.js.map +1 -1
- package/es/switch/switch.js +40 -2
- package/es/switch/switch.js.map +1 -1
- package/es/table/style/index.less +51 -7
- package/es/table/style/size.less +5 -5
- package/es/table/table.js +37 -6
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +33 -5
- package/es/tabs/index.js +1 -0
- package/es/tabs/index.js.map +1 -1
- package/es/tabs/style/index.js.map +1 -1
- package/es/tabs/style/index.less +1 -0
- package/es/tabs/tabs.js +22 -4
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs/tabs.less +114 -0
- package/es/tag/color.less +43 -0
- package/es/tag/index.js +11 -2
- package/es/tag/index.js.map +1 -1
- package/es/tag/tag.js +171 -0
- package/es/tag/tag.js.map +1 -0
- package/es/tag/tag.less +192 -0
- package/es/time-picker/TimePicker.js +36 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/time-picker/index.js +2 -2
- package/es/time-picker/index.js.map +1 -1
- package/es/time-picker/index.less +38 -0
- package/es/tntd-action/Action.js +66 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.js +64 -6
- package/es/tntd-action/index.js.map +1 -1
- package/es/tntd-action/index.less +36 -0
- package/es/tntd-cascader/AntdCascader/index.less +28 -27
- package/es/tooltip/index.js +2 -2
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/index.less +24 -0
- package/es/tooltip/style/index.js +2 -1
- package/es/tooltip/style/index.js.map +1 -1
- package/es/tooltip/tooltip.js +32 -0
- package/es/tooltip/tooltip.js.map +1 -0
- package/es/utils/lang.js +8 -2
- package/es/utils/lang.js.map +1 -1
- package/lib/alert/alert.d.ts +12 -0
- package/lib/alert/alert.d.ts.map +1 -0
- package/lib/alert/alert.js +92 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/alert/alert.less +128 -0
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +7 -8
- package/lib/alert/index.js.map +1 -1
- package/lib/alert/style/index.less +1 -0
- package/lib/button/button.d.ts +9 -4
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +27 -3
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +72 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.d.ts.map +1 -1
- package/lib/button/index.js +6 -5
- package/lib/button/index.js.map +1 -1
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +16 -0
- package/lib/checkbox/checkbox.d.ts.map +1 -0
- package/lib/checkbox/checkbox.js +65 -0
- package/lib/checkbox/checkbox.js.map +1 -0
- package/lib/checkbox/checkbox.less +69 -0
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +2 -17
- package/lib/checkbox/index.js.map +1 -1
- package/lib/color-picker/index.less +4 -1
- package/lib/date-picker/DatePicker.d.ts +21 -0
- package/lib/date-picker/DatePicker.d.ts.map +1 -0
- package/lib/date-picker/DatePicker.js +128 -0
- package/lib/date-picker/DatePicker.js.map +1 -0
- package/lib/date-picker/index.d.ts +2 -6
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +6 -37
- package/lib/date-picker/index.js.map +1 -1
- package/lib/date-picker/index.less +294 -0
- package/lib/date-picker/style/RangePicker.less +3 -3
- package/lib/descriptions/descriptions.d.ts +11 -6
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +68 -26
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +57 -60
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +7 -7
- package/lib/descriptions/index.js.map +1 -1
- package/lib/drawer/drawer.d.ts +22 -2
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +104 -13
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.d.ts +1 -1
- package/lib/drawer/index.d.ts.map +1 -1
- package/lib/drawer/index.js +5 -5
- package/lib/drawer/index.js.map +1 -1
- package/lib/drawer/index.less +154 -0
- package/lib/drawer/style/drawer.less +18 -3
- package/lib/drawer/style/index.d.ts +1 -0
- package/lib/drawer/style/index.d.ts.map +1 -1
- package/lib/drawer/style/index.js +2 -1
- package/lib/drawer/style/index.js.map +1 -1
- package/lib/form/form.d.ts +1 -0
- package/lib/form/form.d.ts.map +1 -1
- package/lib/form/form.js +4 -0
- package/lib/form/form.js.map +1 -1
- package/lib/form/form.less +36 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.d.ts.map +1 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/index.js.map +1 -1
- package/lib/icon/style/style.less +4 -0
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +7 -7
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +5 -5
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +11 -20
- package/lib/input/input.js.map +1 -1
- package/lib/input/input.less +123 -20
- package/lib/input-number/index.d.ts +4 -8
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +3 -5
- package/lib/input-number/index.js.map +1 -1
- package/lib/input-number/inputNumber.d.ts +10 -0
- package/lib/input-number/inputNumber.d.ts.map +1 -0
- package/lib/input-number/inputNumber.js +48 -0
- package/lib/input-number/inputNumber.js.map +1 -0
- package/lib/input-number/inputNumber.less +12 -0
- package/lib/locale/default.d.ts +11 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/en_US.d.ts +11 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +12 -1
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +11 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +12 -1
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/message/message.less +2 -1
- package/lib/modal/index.d.ts +0 -1
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +2 -3
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/index.less +36 -0
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +91 -16
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/index.d.ts +1 -0
- package/lib/modal/style/index.d.ts.map +1 -1
- package/lib/modal/style/index.js +2 -1
- package/lib/modal/style/index.js.map +1 -1
- package/lib/notification/assets/index.d.ts +3 -0
- package/lib/notification/assets/index.d.ts.map +1 -0
- package/lib/notification/assets/index.js +20 -0
- package/lib/notification/assets/index.js.map +1 -0
- package/lib/notification/assets/svg-error-tip.d.ts +4 -0
- package/lib/notification/assets/svg-error-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-error-tip.js +154 -0
- package/lib/notification/assets/svg-error-tip.js.map +1 -0
- package/lib/notification/assets/svg-success-tip.d.ts +4 -0
- package/lib/notification/assets/svg-success-tip.d.ts.map +1 -0
- package/lib/notification/assets/svg-success-tip.js +171 -0
- package/lib/notification/assets/svg-success-tip.js.map +1 -0
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/index.d.ts.map +1 -1
- package/lib/notification/index.js +7 -8
- package/lib/notification/index.js.map +1 -1
- package/lib/notification/notification.d.ts +9 -0
- package/lib/notification/notification.d.ts.map +1 -0
- package/lib/notification/notification.js +105 -0
- package/lib/notification/notification.js.map +1 -0
- package/lib/notification/notification.less +59 -0
- package/lib/notification/style/index.less +2 -0
- package/lib/popconfirm/index.d.ts +2 -2
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +1 -1
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popconfirm/index.less +26 -0
- package/lib/popconfirm/popconfirm.d.ts +6 -0
- package/lib/popconfirm/popconfirm.d.ts.map +1 -0
- package/lib/popconfirm/popconfirm.js +58 -0
- package/lib/popconfirm/popconfirm.js.map +1 -0
- package/lib/popconfirm/style/index.d.ts +1 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -1
- package/lib/popconfirm/style/index.js +2 -1
- package/lib/popconfirm/style/index.js.map +1 -1
- package/lib/popover/index.d.ts +2 -2
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/popover/index.js.map +1 -1
- package/lib/popover/index.less +51 -0
- package/lib/popover/popover.d.ts +13 -0
- package/lib/popover/popover.d.ts.map +1 -0
- package/lib/popover/popover.js +53 -0
- package/lib/popover/popover.js.map +1 -0
- package/lib/popover/style/index.d.ts +1 -0
- package/lib/popover/style/index.d.ts.map +1 -1
- package/lib/popover/style/index.js +2 -1
- package/lib/popover/style/index.js.map +1 -1
- package/lib/preview-text/index.d.ts +1 -1
- package/lib/preview-text/index.d.ts.map +1 -1
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/index.js.map +1 -1
- package/lib/progress/progress.d.ts +12 -0
- package/lib/progress/progress.d.ts.map +1 -0
- package/lib/progress/progress.js +148 -0
- package/lib/progress/progress.js.map +1 -0
- package/lib/progress/progress.less +82 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +17 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.js +319 -0
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/Select.js +132 -0
- package/lib/query-form/Field/Composition/Select.js.map +1 -0
- package/lib/query-form/Field/Composition/index.d.ts +14 -0
- package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/index.js +337 -0
- package/lib/query-form/Field/Composition/index.js.map +1 -0
- package/lib/query-form/Field/Composition/index.less +106 -0
- package/lib/query-form/Field/Composition/utils.d.ts +6 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/utils.js +27 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -0
- package/lib/query-form/index.d.ts +4 -7
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +137 -149
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +12 -9
- package/lib/query-list-scene/index.less +4 -4
- package/lib/radio/index.d.ts +3 -2
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +2 -5
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio.d.ts +17 -0
- package/lib/radio/radio.d.ts.map +1 -0
- package/lib/radio/radio.js +75 -0
- package/lib/radio/radio.js.map +1 -0
- package/lib/radio/radio.less +43 -0
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.less +126 -112
- package/lib/select/index.d.ts +1 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +6 -6
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +3 -4
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +83 -9
- package/lib/steps/assets/background_left.svg +12 -0
- package/lib/steps/assets/background_right.svg +12 -0
- package/lib/steps/assets/horizontal_line.svg +3 -0
- package/lib/steps/assets/vertical_line.svg +3 -0
- package/lib/steps/index.d.ts +1 -2
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +9 -2
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/index.less +173 -8
- package/lib/steps/stepStyle/nav.less +51 -259
- package/lib/steps/stepStyle/progress-dot.less +10 -0
- package/lib/steps/stepStyle/variables.less +8 -0
- package/lib/steps/stepStyle/vertical.less +41 -0
- package/lib/steps/steps.d.ts +10 -2
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +50 -22
- package/lib/steps/steps.js.map +1 -1
- package/lib/steps/style/index.d.ts.map +1 -1
- package/lib/steps/style/index.js.map +1 -1
- package/lib/style/themes/default.less +3 -2
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/switch/index.less +46 -0
- package/lib/switch/style/index.d.ts +1 -0
- package/lib/switch/style/index.d.ts.map +1 -1
- package/lib/switch/style/index.js +2 -1
- package/lib/switch/style/index.js.map +1 -1
- package/lib/switch/switch.d.ts +8 -0
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +40 -5
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/style/index.less +51 -7
- package/lib/table/style/size.less +5 -5
- package/lib/table/table.d.ts +2 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +35 -4
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +33 -5
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +6 -5
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/style/index.js.map +1 -1
- package/lib/tabs/style/index.less +1 -0
- package/lib/tabs/tabs.d.ts +3 -2
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +24 -3
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs/tabs.less +114 -0
- package/lib/tag/color.less +43 -0
- package/lib/tag/index.d.ts +3 -2
- package/lib/tag/index.d.ts.map +1 -1
- package/lib/tag/index.js +15 -9
- package/lib/tag/index.js.map +1 -1
- package/lib/tag/tag.d.ts +41 -0
- package/lib/tag/tag.d.ts.map +1 -0
- package/lib/tag/tag.js +183 -0
- package/lib/tag/tag.js.map +1 -0
- package/lib/tag/tag.less +192 -0
- package/lib/time-picker/TimePicker.d.ts +9 -0
- package/lib/time-picker/TimePicker.d.ts.map +1 -0
- package/lib/time-picker/TimePicker.js +55 -0
- package/lib/time-picker/TimePicker.js.map +1 -0
- package/lib/time-picker/index.d.ts +7 -6
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +4 -17
- package/lib/time-picker/index.js.map +1 -1
- package/lib/time-picker/index.less +38 -0
- package/lib/tntd-action/Action.d.ts +6 -0
- package/lib/tntd-action/Action.d.ts.map +1 -0
- package/lib/tntd-action/Action.js +86 -0
- package/lib/tntd-action/Action.js.map +1 -0
- package/lib/tntd-action/index.d.ts +4 -2
- package/lib/tntd-action/index.d.ts.map +1 -1
- package/lib/tntd-action/index.js +76 -5
- package/lib/tntd-action/index.js.map +1 -1
- package/lib/tntd-action/index.less +36 -0
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/index.less +28 -27
- package/lib/tntd-rc-select/_util/PurePanel.d.ts +1 -1
- package/lib/tooltip/index.d.ts +2 -2
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +2 -2
- package/lib/tooltip/index.js.map +1 -1
- package/lib/tooltip/index.less +24 -0
- package/lib/tooltip/style/index.d.ts +1 -0
- package/lib/tooltip/style/index.d.ts.map +1 -1
- package/lib/tooltip/style/index.js +2 -1
- package/lib/tooltip/style/index.js.map +1 -1
- package/lib/tooltip/tooltip.d.ts +8 -0
- package/lib/tooltip/tooltip.d.ts.map +1 -0
- package/lib/tooltip/tooltip.js +51 -0
- package/lib/tooltip/tooltip.js.map +1 -0
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +8 -2
- package/lib/utils/lang.js.map +1 -1
- package/package.json +3 -2
- package/themes/common/index.less +29 -27
- package/themes/default/colors.less +1 -1
- package/themes/default/lessVars2.x.less +2 -1
- package/themes/default/lessVars3.x.less +1 -0
- package/themes/default/variables.less +60 -36
- package/es/checkbox/checkbox-group.js +0 -5
- package/es/checkbox/checkbox-group.js.map +0 -1
- package/es/drawer/drawer.less +0 -20
- package/es/modal/modal.less +0 -18
- package/es/radio/radio-group.js +0 -5
- package/es/radio/radio-group.js.map +0 -1
- package/es/steps/stepStyle/small.less +0 -5
- package/lib/checkbox/checkbox-group.d.ts +0 -8
- package/lib/checkbox/checkbox-group.d.ts.map +0 -1
- package/lib/checkbox/checkbox-group.js +0 -12
- package/lib/checkbox/checkbox-group.js.map +0 -1
- package/lib/drawer/drawer.less +0 -20
- package/lib/modal/modal.less +0 -18
- package/lib/radio/radio-group.d.ts +0 -8
- package/lib/radio/radio-group.d.ts.map +0 -1
- package/lib/radio/radio-group.js +0 -12
- package/lib/radio/radio-group.js.map +0 -1
- package/lib/steps/stepStyle/small.less +0 -5
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
height: 100%;
|
|
14
14
|
transition: transform @animation-duration-slow @ease-base-out,
|
|
15
15
|
height 0s ease @animation-duration-slow, width 0s ease @animation-duration-slow;
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
>* {
|
|
17
18
|
transition: transform @animation-duration-slow @ease-base-out,
|
|
18
19
|
box-shadow @animation-duration-slow @ease-base-out;
|
|
19
20
|
}
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
&-content-wrapper {
|
|
22
23
|
position: absolute;
|
|
23
24
|
}
|
|
25
|
+
|
|
24
26
|
.@{drawer-prefix-cls}-content {
|
|
25
27
|
width: 100%;
|
|
26
28
|
height: 100%;
|
|
@@ -31,13 +33,16 @@
|
|
|
31
33
|
top: 0;
|
|
32
34
|
width: 0%;
|
|
33
35
|
height: 100%;
|
|
36
|
+
|
|
34
37
|
.@{drawer-prefix-cls}-content-wrapper {
|
|
35
38
|
height: 100%;
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
&.@{drawer-prefix-cls}-open {
|
|
38
42
|
width: 100%;
|
|
39
43
|
transition: transform @animation-duration-slow @ease-base-out;
|
|
40
44
|
}
|
|
45
|
+
|
|
41
46
|
&.@{drawer-prefix-cls}-open.no-mask {
|
|
42
47
|
width: 0%;
|
|
43
48
|
}
|
|
@@ -59,10 +64,12 @@
|
|
|
59
64
|
right: 0;
|
|
60
65
|
}
|
|
61
66
|
}
|
|
67
|
+
|
|
62
68
|
&.@{drawer-prefix-cls}-open {
|
|
63
69
|
.@{drawer-prefix-cls}-content-wrapper {
|
|
64
70
|
box-shadow: @shadow-1-left;
|
|
65
71
|
}
|
|
72
|
+
|
|
66
73
|
// https://github.com/ant-design/ant-design/issues/18607, Avoid edge alignment bug.
|
|
67
74
|
&.no-mask {
|
|
68
75
|
right: 1px;
|
|
@@ -80,10 +87,12 @@
|
|
|
80
87
|
.@{drawer-prefix-cls}-content-wrapper {
|
|
81
88
|
width: 100%;
|
|
82
89
|
}
|
|
90
|
+
|
|
83
91
|
&.@{drawer-prefix-cls}-open {
|
|
84
92
|
height: 100%;
|
|
85
93
|
transition: transform @animation-duration-slow @ease-base-out;
|
|
86
94
|
}
|
|
95
|
+
|
|
87
96
|
&.@{drawer-prefix-cls}-open.no-mask {
|
|
88
97
|
height: 0%;
|
|
89
98
|
}
|
|
@@ -107,10 +116,12 @@
|
|
|
107
116
|
bottom: 0;
|
|
108
117
|
}
|
|
109
118
|
}
|
|
119
|
+
|
|
110
120
|
&.@{drawer-prefix-cls}-open {
|
|
111
121
|
.@{drawer-prefix-cls}-content-wrapper {
|
|
112
122
|
box-shadow: @shadow-1-up;
|
|
113
123
|
}
|
|
124
|
+
|
|
114
125
|
&.no-mask {
|
|
115
126
|
bottom: 1px;
|
|
116
127
|
transform: translateY(1px);
|
|
@@ -197,6 +208,7 @@
|
|
|
197
208
|
line-height: @line-height-base;
|
|
198
209
|
word-wrap: break-word;
|
|
199
210
|
}
|
|
211
|
+
|
|
200
212
|
&-wrapper-body {
|
|
201
213
|
height: 100%;
|
|
202
214
|
overflow: auto;
|
|
@@ -210,9 +222,11 @@
|
|
|
210
222
|
height: 0;
|
|
211
223
|
background-color: @modal-mask-bg;
|
|
212
224
|
opacity: 0;
|
|
213
|
-
filter: ~'alpha(opacity=45)';
|
|
214
225
|
transition: opacity @animation-duration-slow linear, height 0s ease @animation-duration-slow;
|
|
226
|
+
filter: ~'alpha(opacity=45)';
|
|
227
|
+
|
|
215
228
|
}
|
|
229
|
+
|
|
216
230
|
&-open {
|
|
217
231
|
&-content {
|
|
218
232
|
box-shadow: @shadow-2;
|
|
@@ -224,7 +238,8 @@
|
|
|
224
238
|
0% {
|
|
225
239
|
opacity: 0;
|
|
226
240
|
}
|
|
241
|
+
|
|
227
242
|
100% {
|
|
228
243
|
opacity: 1;
|
|
229
244
|
}
|
|
230
|
-
}
|
|
245
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drawer/style/index.tsx"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/drawer/style/index.tsx"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA;AACrB,OAAO,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/style/index.tsx"],"names":[],"mappings":";;AAAA,wBAAwB;AACxB,kCAA+B;AAC/B,wBAAqB","sourcesContent":["// deps-lint-skip: empty\nimport '../../style/index.less'\nimport './index.less'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/style/index.tsx"],"names":[],"mappings":";;AAAA,wBAAwB;AACxB,kCAA+B;AAC/B,wBAAqB;AACrB,yBAAsB","sourcesContent":["// deps-lint-skip: empty\nimport '../../style/index.less'\nimport './index.less'\nimport '../index.less'\n"]}
|
package/lib/form/form.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { FormItemProps as AntdFormItemProps, FormProps as AntdFormProps } f
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { default as AntdForm } from 'antd/lib/form';
|
|
4
4
|
import type AntdFormItem from 'antd/lib/form/FormItem';
|
|
5
|
+
import './form.less';
|
|
5
6
|
export * from 'antd/lib/form';
|
|
6
7
|
interface FormItemComponent extends React.ForwardRefExoticComponent<AntdFormItemProps & React.RefAttributes<AntdFormItem>> {
|
|
7
8
|
}
|
package/lib/form/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAG3B,MAAM,cAAc,CAAA;AACrB,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAG3B,MAAM,cAAc,CAAA;AACrB,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AAGrD,OAAO,aAAa,CAAA;AAEpB,cAAc,cAAc,CAAA;AAE5B,UAAU,iBACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;CAAG;AACnG,UAAU,aACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtF,IAAI,EAAE,iBAAiB,CAAA;IACvB,MAAM,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAA;IAC9B,eAAe,EAAE,OAAO,QAAQ,CAAC,eAAe,CAAA;CACjD;AAED,eAAO,MAAM,IAAI,eAQE,CAAA"}
|
package/lib/form/form.js
CHANGED
|
@@ -22,6 +22,9 @@ Object.keys(_form).forEach(function (key) {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
var _utils = require("../utils");
|
|
25
|
+
require("./form.less");
|
|
26
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
30
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -41,6 +44,7 @@ var Form = exports.Form = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
41
44
|
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
42
45
|
var getPrefixCls = _ref.getPrefixCls;
|
|
43
46
|
return _react["default"].createElement(_form["default"], Object.assign({}, rest, {
|
|
47
|
+
className: (0, _classnames["default"])(rest.className, 'tnt-form'),
|
|
44
48
|
ref: ref
|
|
45
49
|
}));
|
|
46
50
|
});
|
package/lib/form/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,+CAAyC;AAEzC,6DAAwD;AAExD,wDAAkD;AAGlD,oCAAuC;
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/form/form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,+CAAyC;AAEzC,6DAAwD;AAExD,wDAAkD;AAGlD,oCAAuC;AACvC,uBAAoB;AACpB,4DAAmC;AACnC,+CAA4B;AAWf,QAAA,IAAI,GAAG,IAAA,kBAAU,EAA0B,CAAC,EAAW,EAAE,GAAG,EAAE,EAAE;QAAf,IAAI,cAAT,EAAW,CAAF;IAChE,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,8BAAC,cAAQ,oBAAK,IAAI,IAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAC5F,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAkB,CAAA;AAEnB,YAAI,CAAC,IAAI,GAAG,IAAA,kBAAU,EAAkC,CAAC,EAAkB,EAAE,GAAG,EAAE,EA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OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;oBACzB,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;wBAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;4BACnB,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;yBAC9B,CAAC,CAAA;qBACH;gBACH,CAAC,CAAC,CAAA;aACH;YACD,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,EAAE;gBACrC,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,CAAC,CAAA;aACxD;QACH,CAAC,IACD,CAAC,iBAAiB,CAAC,CAAA;AACvB,CAAC,CAAA;AAED,YAAI,CAAC,eAAe,GAAG,cAAQ,CAAC,eAAe,CAAA;AAC/C,YAAI,CAAC,MAAM,GAAG,MAAM,CAAA","sourcesContent":["import type {\n FormItemProps as AntdFormItemProps,\n FormProps as AntdFormProps,\n FormComponentProps,\n FormCreateOption,\n} from 'antd/lib/form'\nimport React, { forwardRef } from 'react'\n\nimport { ConfigConsumer } from 'antd/lib/config-provider'\n\nimport { default as AntdForm } from 'antd/lib/form'\nimport type AntdFormItem from 'antd/lib/form/FormItem'\n\nimport { doUpperTitle } from '../utils'\nimport './form.less'\nimport classNames from 'classnames'\nexport * from 'antd/lib/form'\n\ninterface FormItemComponent\n extends React.ForwardRefExoticComponent<AntdFormItemProps & React.RefAttributes<AntdFormItem>> {}\ninterface FormComponent\n extends React.ForwardRefExoticComponent<AntdFormProps & React.RefAttributes<AntdForm>> {\n Item: FormItemComponent\n create: typeof AntdForm.create\n createFormField: typeof AntdForm.createFormField\n}\n\nexport const Form = forwardRef<AntdForm, AntdFormProps>(({ ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm {...rest} className={classNames(rest.className, 'tnt-form')} ref={ref} />\n }}\n </ConfigConsumer>\n )\n}) as FormComponent\n\nForm.Item = forwardRef<AntdFormItem, AntdFormItemProps>(({ label, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdForm.Item {...rest} label={doUpperTitle(label)} ref={ref} />\n }}\n </ConfigConsumer>\n )\n})\n\n// 定义 create 函数的类型\ntype CreateFunction = <TOwnProps extends FormComponentProps<any>>(\n options?: FormCreateOption<TOwnProps>\n) => any\n\nconst Create: CreateFunction = (options: any) => (WrappedComponent: any) => {\n const validateSubmitMap: any = {}\n const CustomFormWrapper = (props: any) => {\n const getFieldDecorator = props.form.getFieldDecorator\n props.form.getFieldDecorator = (name: any, options: any) => {\n let opt = options || {}\n if (opt.validateSubmit) {\n opt = {\n ...options,\n validateTrigger: 'noEvent',\n }\n validateSubmitMap[name] = true\n }\n return getFieldDecorator(name, opt)\n }\n return <WrappedComponent {...props} />\n }\n\n return AntdForm.create({\n ...options,\n onValuesChange: (props: any, changedValues: any, allValues: any) => {\n const keys = Object.keys(changedValues)\n if (keys.length === 1) {\n keys.forEach((name: any) => {\n if (validateSubmitMap[name]) {\n props.form.setFields({\n [name]: { errors: undefined },\n })\n }\n })\n }\n if (options && options.onValuesChange) {\n options.onValuesChange(props, changedValues, allValues)\n }\n },\n })(CustomFormWrapper)\n}\n\nForm.createFormField = AntdForm.createFormField\nForm.create = Create\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@form-prefix-cls: ~'@{ant-prefix}-form';
|
|
2
|
+
|
|
3
|
+
.tnt-form{
|
|
4
|
+
.@{form-prefix-cls}-item{
|
|
5
|
+
min-height: @input-height-base;
|
|
6
|
+
|
|
7
|
+
.@{form-prefix-cls}-item-required::before {
|
|
8
|
+
top: 2px;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-with-help {
|
|
13
|
+
margin-bottom: @form-item-margin-bottom;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-control {
|
|
17
|
+
line-height: 1;
|
|
18
|
+
min-height: @input-height-base;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-label {
|
|
22
|
+
line-height: @input-height-base;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-children{
|
|
26
|
+
line-height: calc(@input-height-base - 2px);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.@{form-prefix-cls}-explain,
|
|
31
|
+
.@{form-prefix-cls}-extra {
|
|
32
|
+
margin-top: 4px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import createFromIconfontCN from './IconFont';
|
|
3
3
|
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
|
|
4
|
+
import './style/style.less';
|
|
4
5
|
declare function unstable_ChangeThemeOfIconsDangerously(theme?: ThemeType): void;
|
|
5
6
|
declare function unstable_ChangeDefaultThemeOfIcons(theme: ThemeType): void;
|
|
6
7
|
export interface TransferLocale {
|
package/lib/icon/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icon/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,oBAAoB,MAAM,YAAY,CAAA;AAU7C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icon/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,oBAAoB,MAAM,YAAY,CAAA;AAU7C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,oBAAoB,CAAA;AAO3B,iBAAS,sCAAsC,CAAC,KAAK,CAAC,EAAE,SAAS,QAQhE;AAED,iB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,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,oBAAoB,EAAE,OAAO,oBAAoB,CAAA;IACjD,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,sCAAsC,CAAC,EAAE,OAAO,sCAAsC,CAAA;IACtF,kCAAkC,CAAC,EAAE,OAAO,kCAAkC,CAAA;CAC/E;AAED,QAAA,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,CAoIlC,CAAA;AAMD,eAAe,IAAI,CAAA"}
|
package/lib/icon/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var _utils = require("./utils");
|
|
|
14
14
|
var _warning = _interopRequireDefault(require("../_util/warning"));
|
|
15
15
|
var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
|
|
16
16
|
var _twoTonePrimaryColor = require("./twoTonePrimaryColor");
|
|
17
|
+
require("./style/style.less");
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -65,7 +66,7 @@ var Icon = function Icon(props) {
|
|
|
65
66
|
twoToneColor = props.twoToneColor,
|
|
66
67
|
restProps = __rest(props, ["className", "type", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children", "theme", "twoToneColor"]);
|
|
67
68
|
(0, _warning["default"])(Boolean(type || Component || children), 'Icon', 'Should have `type` prop or `component` prop or `children`.');
|
|
68
|
-
var classString = (0, _classnames["default"])(_defineProperty(_defineProperty({}, "anticon", true), "anticon-".concat(type), Boolean(type)), className);
|
|
69
|
+
var classString = (0, _classnames["default"])(_defineProperty(_defineProperty(_defineProperty({}, "tntd-anticon", true), "anticon", true), "anticon-".concat(type), Boolean(type)), className);
|
|
69
70
|
var svgClassString = (0, _classnames["default"])(_defineProperty({}, "anticon-spin", !!spin || type === 'loading'));
|
|
70
71
|
var svgStyle = rotate ? {
|
|
71
72
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
package/lib/icon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,6CAA8B;AAC9B,4DAAmC;AACnC,+DAAgD;AAChD,8DAAoC;AACpC,0DAA6C;AAC7C,mCAMgB;AAChB,+DAAsC;AACtC,4FAAmE;AACnE,+DAAwE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,6CAA8B;AAC9B,4DAAmC;AACnC,+DAAgD;AAChD,8DAAoC;AACpC,0DAA6C;AAC7C,mCAMgB;AAChB,+DAAsC;AACtC,4FAAmE;AACnE,+DAAwE;AACxE,8BAA2B;AAC3B,kBAAkB;AAClB,oBAAS,CAAC,GAAG,CAAC,GAAG,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C,WAAW,IAAI,KAAK,KAAK,WAAW,EACrC,MAAM,EACN,kBAAkB,IAAI,8BAA8B,WAAW,IAAI;oBACjE,sBAAsB,KAAK,oBAAoB,CAClD,CAAA;aACF;YACD,YAAY,GAAG,IAAA,uBAAe,EAC5B,IAAA,uBAAe,EAAC,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC,EACpC,cAAc,IAAI,KAAK,IAAI,YAAY,CACxC,CAAA;YAED,OAAO,CACL,oBAAC,oBAAS,IACR,SAAS,EAAE,cAAc,EACzB,IAAI,EAAE,YAAY,EAClB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,QAAQ,GACf,CACH,CAAA;SACF;IACH,CAAC,CAAA;IAED,IAAI,YAAY,GAAG,QAAQ,CAAA;IAC3B,IAAI,YAAY,KAAK,SAAS,IAAI,OAAO,EAAE;QACzC,YAAY,GAAG,CAAC,CAAC,CAAA;KAClB;IAED,OAAO,CACL,oBAAC,wBAAc,IAAC,aAAa,EAAC,MAAM,IACjC,CAAC,MAAM,EAAE,EAAE,CAAC,CACX,uDACc,IAAI,IAAI,GAAI,MAAiC,CAAC,IAAI,KAAK,IAAI,EAAE,IACrE,SAAS,IACb,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,KAErB,eAAe,EAAE,CAChB,CACL,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,IAAI,CAAC,oBAAoB,GAAG,kBAAoB,CAAA;AAChD,IAAI,CAAC,eAAe,GAAG,qCAAe,CAAA;AACtC,IAAI,CAAC,eAAe,GAAG,qCAAe,CAAA;AAEtC,kBAAe,IAAI,CAAA","sourcesContent":["/* eslint-disable camelcase */\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport * as allIcons from '@tntd/icons/lib/dist'\nimport ReactIcon from './components'\nimport createFromIconfontCN from './IconFont'\nimport {\n svgBaseProps,\n withThemeSuffix,\n removeTypeTheme,\n getThemeFromTypeName,\n alias,\n} from './utils'\nimport warning from '../_util/warning'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor'\nimport './style/style.less'\n// Initial setting\nReactIcon.add(...Object.keys(allIcons).map((key) => (allIcons as any)[key]))\nsetTwoToneColor('#1890ff')\nlet defaultTheme: ThemeType = 'outlined'\nlet dangerousTheme: ThemeType | undefined\n\nfunction unstable_ChangeThemeOfIconsDangerously(theme?: ThemeType) {\n warning(\n false,\n 'Icon',\n `You are using the unstable method 'Icon.unstable_ChangeThemeOfAllIconsDangerously', ` +\n `make sure that all the icons with theme '${theme}' display correctly.`\n )\n dangerousTheme = theme\n}\n\nfunction unstable_ChangeDefaultThemeOfIcons(theme: ThemeType) {\n warning(\n false,\n 'Icon',\n `You are using the unstable method 'Icon.unstable_ChangeDefaultThemeOfIcons', ` +\n `make sure that all the icons with theme '${theme}' display correctly.`\n )\n defaultTheme = theme\n}\n\nexport interface TransferLocale {\n icon: string\n}\n\nexport interface CustomIconComponentProps {\n width: string | number\n height: string | number\n fill: string\n viewBox?: string\n className?: string\n style?: React.CSSProperties\n spin?: boolean\n rotate?: number\n ['aria-hidden']?: React.AriaAttributes['aria-hidden']\n}\n\nexport type ThemeType = 'filled' | 'outlined' | 'twoTone'\n\nexport interface IconProps {\n tabIndex?: number\n type?: string\n className?: string\n theme?: ThemeType\n title?: string\n onKeyUp?: React.KeyboardEventHandler<HTMLElement>\n onClick?: React.MouseEventHandler<HTMLElement>\n component?: React.ComponentType<CustomIconComponentProps | React.SVGProps<SVGSVGElement>>\n twoToneColor?: string\n viewBox?: string\n spin?: boolean\n rotate?: number\n style?: React.CSSProperties\n prefixCls?: string\n role?: string\n}\n\nexport interface IconComponent<P> extends React.SFC<P> {\n createFromIconfontCN: typeof createFromIconfontCN\n getTwoToneColor: typeof getTwoToneColor\n setTwoToneColor: typeof setTwoToneColor\n unstable_ChangeThemeOfIconsDangerously?: typeof unstable_ChangeThemeOfIconsDangerously\n unstable_ChangeDefaultThemeOfIcons?: typeof unstable_ChangeDefaultThemeOfIcons\n}\n\nconst Icon: IconComponent<IconProps> = (props) => {\n const {\n // affect outter <i>...</i>\n className,\n\n // affect inner <svg>...</svg>\n type,\n component: Component,\n viewBox,\n spin,\n rotate,\n\n tabIndex,\n onClick,\n\n // children\n children,\n\n // other\n theme, // default to outlined\n twoToneColor,\n\n ...restProps\n } = props\n\n warning(\n Boolean(type || Component || children),\n 'Icon',\n 'Should have `type` prop or `component` prop or `children`.'\n )\n\n const classString = classNames(\n {\n [`tntd-anticon`]: true,\n [`anticon`]: true,\n [`anticon-${type}`]: Boolean(type),\n },\n className\n )\n\n const svgClassString = classNames({\n [`anticon-spin`]: !!spin || type === 'loading',\n })\n\n const svgStyle = rotate\n ? {\n msTransform: `rotate(${rotate}deg)`,\n transform: `rotate(${rotate}deg)`,\n }\n : undefined\n\n const innerSvgProps: CustomIconComponentProps = {\n ...svgBaseProps,\n className: svgClassString,\n style: svgStyle,\n viewBox,\n }\n\n if (!viewBox) {\n delete innerSvgProps.viewBox\n }\n\n const renderInnerNode = () => {\n // component > children > type\n if (Component) {\n return <Component {...innerSvgProps}>{children}</Component>\n }\n\n if (children) {\n warning(\n Boolean(viewBox) ||\n (React.Children.count(children) === 1 &&\n React.isValidElement(children) &&\n React.Children.only(children).type === 'use'),\n 'Icon',\n 'Make sure that you provide correct `viewBox`' +\n ' prop (default `0 0 1024 1024`) to the icon.'\n )\n return (\n <svg {...innerSvgProps} viewBox={viewBox}>\n {children}\n </svg>\n )\n }\n\n if (typeof type === 'string') {\n let computedType = type\n if (theme) {\n const themeInName = getThemeFromTypeName(type)\n warning(\n !themeInName || theme === themeInName,\n 'Icon',\n `The icon name '${type}' already specify a theme '${themeInName}',` +\n ` the 'theme' prop '${theme}' will be ignored.`\n )\n }\n computedType = withThemeSuffix(\n removeTypeTheme(alias(computedType)),\n dangerousTheme || theme || defaultTheme\n )\n\n return (\n <ReactIcon\n className={svgClassString}\n type={computedType}\n primaryColor={twoToneColor}\n style={svgStyle}\n />\n )\n }\n }\n\n let iconTabIndex = tabIndex\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1\n }\n\n return (\n <LocaleReceiver componentName=\"Icon\">\n {(locale) => (\n <i\n aria-label={type && `${(locale as Record<'icon', object>).icon}: ${type}`}\n {...restProps}\n tabIndex={iconTabIndex}\n onClick={onClick}\n className={classString}\n >\n {renderInnerNode()}\n </i>\n )}\n </LocaleReceiver>\n )\n}\n\nIcon.createFromIconfontCN = createFromIconfontCN\nIcon.getTwoToneColor = getTwoToneColor\nIcon.setTwoToneColor = setTwoToneColor\n\nexport default Icon\n"]}
|
package/lib/input/index.d.ts
CHANGED
package/lib/input/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,SAAS,CAAA;AAChB,OAAO,cAAc,CAAA;AAErB,cAAc,SAAS,CAAA;AAEvB,eAAe,KAAK,CAAA"}
|
package/lib/input/index.js
CHANGED
|
@@ -5,18 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {};
|
|
7
7
|
exports["default"] = void 0;
|
|
8
|
-
require("./
|
|
9
|
-
|
|
10
|
-
var _input2 = require("./input");
|
|
11
|
-
Object.keys(_input2).forEach(function (key) {
|
|
8
|
+
var _input = require("./input");
|
|
9
|
+
Object.keys(_input).forEach(function (key) {
|
|
12
10
|
if (key === "default" || key === "__esModule") return;
|
|
13
11
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
|
-
if (key in exports && exports[key] ===
|
|
12
|
+
if (key in exports && exports[key] === _input[key]) return;
|
|
15
13
|
Object.defineProperty(exports, key, {
|
|
16
14
|
enumerable: true,
|
|
17
15
|
get: function get() {
|
|
18
|
-
return
|
|
16
|
+
return _input[key];
|
|
19
17
|
}
|
|
20
18
|
});
|
|
21
19
|
});
|
|
22
|
-
|
|
20
|
+
require("./style");
|
|
21
|
+
require("./input.less");
|
|
22
|
+
var _default = exports["default"] = _input.Input;
|
package/lib/input/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,wBAAqB;AAErB,0CAAuB;AAEvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,mBAAgB;AAChB,wBAAqB;AAErB,0CAAuB;AAEvB,kBAAe,aAAK,CAAA","sourcesContent":["import { Input } from './input'\nimport './style'\nimport './input.less'\n\nexport * from './input'\n\nexport default Input\n"]}
|
package/lib/input/input.d.ts
CHANGED
|
@@ -5,22 +5,22 @@ import type { default as AntdSearch } from 'antd/lib/input/Search';
|
|
|
5
5
|
import { default as AntdInput } from 'antd/lib/input';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
export interface InputProps extends AntdInputProps {
|
|
8
|
-
borderStyle?: 'outline';
|
|
8
|
+
borderStyle?: 'outline' | 'fill';
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface GroupProps extends AntdGroupProps {
|
|
12
|
-
borderStyle?: 'outline';
|
|
12
|
+
borderStyle?: 'outline' | 'fill';
|
|
13
13
|
}
|
|
14
14
|
export interface TextAreaProps extends AntdTextAreaProps {
|
|
15
|
-
borderStyle?: 'outline';
|
|
15
|
+
borderStyle?: 'outline' | 'fill';
|
|
16
16
|
readonly?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface PasswordProps extends AntdPasswordProps {
|
|
19
|
-
borderStyle?: 'outline';
|
|
19
|
+
borderStyle?: 'outline' | 'fill';
|
|
20
20
|
readonly?: boolean;
|
|
21
21
|
}
|
|
22
22
|
export interface SearchProps extends AntdSearchProps {
|
|
23
|
-
borderStyle?: 'outline';
|
|
23
|
+
borderStyle?: 'outline' | 'fill';
|
|
24
24
|
readonly?: boolean;
|
|
25
25
|
}
|
|
26
26
|
declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<React.StatelessComponent<AntdGroupProps>>>;
|
package/lib/input/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,EAC5B,aAAa,IAAI,iBAAiB,EAClC,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC/B,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErE,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAIpD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAGzC,MAAM,WAAW,UAAW,SAAQ,cAAc;IAEhD,WAAW,CAAC,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,EAC5B,aAAa,IAAI,iBAAiB,EAClC,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,E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AA;IACnB,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,MAAM,EAAE,OAAO,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,aAAa,gBAoBP,CAAA;AAEnB,eAAO,MAAM,KAAK,gBAA+E,CAAA"}
|
package/lib/input/input.js
CHANGED
|
@@ -26,15 +26,14 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
26
26
|
}
|
|
27
27
|
return t;
|
|
28
28
|
};
|
|
29
|
+
var tntPrefixCls = 'tnt-input';
|
|
29
30
|
var Group = (0, _react.forwardRef)(function (_a, ref) {
|
|
30
31
|
var className = _a.className,
|
|
31
32
|
borderStyle = _a.borderStyle,
|
|
32
33
|
props = __rest(_a, ["className", "borderStyle"]);
|
|
33
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (
|
|
34
|
-
var getPrefixCls = _ref.getPrefixCls;
|
|
35
|
-
var prefixCls = getPrefixCls('input');
|
|
34
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
36
35
|
return _react["default"].createElement(_input["default"].Group, Object.assign({}, props, {
|
|
37
|
-
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(
|
|
36
|
+
className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-outline"), borderStyle === 'outline'), "".concat(tntPrefixCls, "-fill"), borderStyle === 'fill')),
|
|
38
37
|
// @ts-ignore
|
|
39
38
|
ref: ref
|
|
40
39
|
}));
|
|
@@ -45,12 +44,10 @@ var Search = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
45
44
|
borderStyle = _a.borderStyle,
|
|
46
45
|
readonly = _a.readonly,
|
|
47
46
|
props = __rest(_a, ["className", "borderStyle", "readonly"]);
|
|
48
|
-
return readonly ? _react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function (
|
|
49
|
-
var getPrefixCls = _ref2.getPrefixCls;
|
|
50
|
-
var prefixCls = getPrefixCls('input');
|
|
47
|
+
return readonly ? _react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
51
48
|
return _react["default"].createElement(_input["default"].Search, Object.assign({}, props, {
|
|
52
49
|
placeholder: (0, _utils.capitalizeFirstLetter)(props === null || props === void 0 ? void 0 : props.placeholder, props === null || props === void 0 ? void 0 : props.capitalize),
|
|
53
|
-
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(
|
|
50
|
+
className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-outline"), borderStyle === 'outline'), "".concat(tntPrefixCls, "-fill"), borderStyle === 'fill')),
|
|
54
51
|
ref: ref
|
|
55
52
|
}));
|
|
56
53
|
});
|
|
@@ -62,12 +59,10 @@ var TextArea = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
62
59
|
props = __rest(_a, ["className", "borderStyle", "readonly"]);
|
|
63
60
|
return readonly ?
|
|
64
61
|
// @ts-ignore
|
|
65
|
-
_react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function (
|
|
66
|
-
var getPrefixCls = _ref3.getPrefixCls;
|
|
67
|
-
var prefixCls = getPrefixCls('input');
|
|
62
|
+
_react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
68
63
|
return _react["default"].createElement(_input["default"].TextArea, Object.assign({}, props, {
|
|
69
64
|
placeholder: (0, _utils.capitalizeFirstLetter)(props === null || props === void 0 ? void 0 : props.placeholder, props === null || props === void 0 ? void 0 : props.capitalize),
|
|
70
|
-
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(
|
|
65
|
+
className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-outline"), borderStyle === 'outline'), "".concat(tntPrefixCls, "-fill"), borderStyle === 'fill')),
|
|
71
66
|
ref: ref
|
|
72
67
|
}));
|
|
73
68
|
});
|
|
@@ -77,13 +72,11 @@ var Password = (0, _react.forwardRef)(function (_a, ref) {
|
|
|
77
72
|
borderStyle = _a.borderStyle,
|
|
78
73
|
readonly = _a.readonly,
|
|
79
74
|
props = __rest(_a, ["className", "borderStyle", "readonly"]);
|
|
80
|
-
return readonly ? _react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function (
|
|
81
|
-
var getPrefixCls = _ref4.getPrefixCls;
|
|
82
|
-
var prefixCls = getPrefixCls('input');
|
|
75
|
+
return readonly ? _react["default"].createElement(_previewText["default"].Input, Object.assign({}, props)) : _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
83
76
|
return _react["default"].createElement(_input["default"].Password, Object.assign({}, props, {
|
|
84
77
|
placeholder: (0, _utils.capitalizeFirstLetter)(props === null || props === void 0 ? void 0 : props.placeholder, props === null || props === void 0 ? void 0 : props.capitalize),
|
|
85
78
|
ref: ref,
|
|
86
|
-
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(
|
|
79
|
+
className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-outline"), borderStyle === 'outline'), "".concat(tntPrefixCls, "-fill"), borderStyle === 'fill'))
|
|
87
80
|
}));
|
|
88
81
|
});
|
|
89
82
|
});
|
|
@@ -91,13 +84,11 @@ var InternalInput = exports.InternalInput = (0, _react.forwardRef)(function (_a,
|
|
|
91
84
|
var className = _a.className,
|
|
92
85
|
borderStyle = _a.borderStyle,
|
|
93
86
|
props = __rest(_a, ["className", "borderStyle"]);
|
|
94
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (
|
|
95
|
-
var getPrefixCls = _ref5.getPrefixCls;
|
|
96
|
-
var prefixCls = getPrefixCls('input');
|
|
87
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
97
88
|
return _react["default"].createElement(_input["default"], Object.assign({}, props, {
|
|
98
89
|
placeholder: (0, _utils.capitalizeFirstLetter)(props === null || props === void 0 ? void 0 : props.placeholder, props === null || props === void 0 ? void 0 : props.capitalize),
|
|
99
90
|
ref: ref,
|
|
100
|
-
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(
|
|
91
|
+
className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-outline"), borderStyle === 'outline'), "".concat(tntPrefixCls, "-fill"), borderStyle === 'fill'))
|
|
101
92
|
}));
|
|
102
93
|
});
|
|
103
94
|
});
|
package/lib/input/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/input/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAwD;AAYxD,0DAAoD;AACpD,4DAAmC;AACnC,wCAAqD;AACrD,oCAAgD;AAChD,+CAAyC;AACzC,mEAAyC;AA+BzC,MAAM,KAAK,GAAG,IAAA,kBAAU,EACtB,CAAC,EAAoC,EAAE,GAAG,EAAE,EAAE;QAA7C,EAAE,SAAS,EAAE,WAAW,OAAY,EAAP,KAAK,cAAlC,4BAAoC,CAAF;IAAY,OAAA,CAC7C,8BAAC,gCAAc,QACZ,
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/input/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAwD;AAYxD,0DAAoD;AACpD,4DAAmC;AACnC,wCAAqD;AACrD,oCAAgD;AAChD,+CAAyC;AACzC,mEAAyC;AA+BzC,MAAM,YAAY,GAAG,WAAW,CAAA;AAEhC,MAAM,KAAK,GAAG,IAAA,kBAAU,EACtB,CAAC,EAAo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,KAAK,CAAA;AACnB,aAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACzB,aAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;AACzB,aAAK,CAAC,MAAM,GAAG,MAAM,CAAA","sourcesContent":["import { ConfigConsumer } from 'antd/lib/config-provider'\nimport type {\n GroupProps as AntdGroupProps,\n InputProps as AntdInputProps,\n TextAreaProps as AntdTextAreaProps,\n PasswordProps as AntdPasswordProps,\n SearchProps as AntdSearchProps,\n} from 'antd/lib/input'\nimport type { default as AntdPassword } from 'antd/lib/input/Password'\nimport type { default as AntdTextArea } from 'antd/lib/input/TextArea'\nimport type { default as AntdGroup } from 'antd/lib/input/Group'\nimport type { default as AntdSearch } from 'antd/lib/input/Search'\nimport { default as AntdInput } from 'antd/lib/input'\nimport classNames from 'classnames'\nimport { connectReadonlyComponent } from '../connect'\nimport { capitalizeFirstLetter } from '../utils'\nimport React, { forwardRef } from 'react'\nimport PreviewText from '../preview-text'\n\nexport interface InputProps extends AntdInputProps {\n // 线框风格\n borderStyle?: 'outline' | 'fill'\n readonly?: boolean\n}\n\nexport interface GroupProps extends AntdGroupProps {\n // 线框风格\n borderStyle?: 'outline' | 'fill'\n}\n\nexport interface TextAreaProps extends AntdTextAreaProps {\n // 线框风格\n borderStyle?: 'outline' | 'fill'\n readonly?: boolean\n}\n\nexport interface PasswordProps extends AntdPasswordProps {\n // 线框风格\n borderStyle?: 'outline' | 'fill'\n readonly?: boolean\n}\n\nexport interface SearchProps extends AntdSearchProps {\n // 线框风格\n borderStyle?: 'outline' | 'fill'\n readonly?: boolean\n}\n\nconst tntPrefixCls = 'tnt-input'\n\nconst Group = forwardRef<typeof AntdGroup, GroupProps>(\n ({ className, borderStyle, ...props }, ref) => (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInput.Group\n {...props}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-outline`]: borderStyle === 'outline',\n [`${tntPrefixCls}-fill`]: borderStyle === 'fill',\n })}\n // @ts-ignore\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n)\n\nconst Search = forwardRef<AntdSearch, SearchProps & { capitalize?: boolean }>(\n ({ className, borderStyle, readonly, ...props }, ref) =>\n readonly ? (\n <PreviewText.Input {...props} />\n ) : (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInput.Search\n {...props}\n placeholder={capitalizeFirstLetter(props?.placeholder, props?.capitalize)}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-outline`]: borderStyle === 'outline',\n [`${tntPrefixCls}-fill`]: borderStyle === 'fill',\n })}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n)\n\nconst TextArea = forwardRef<AntdTextArea, TextAreaProps & { capitalize?: boolean }>(\n ({ className, borderStyle, readonly, ...props }, ref) =>\n readonly ? (\n // @ts-ignore\n <PreviewText.Input {...props} />\n ) : (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInput.TextArea\n {...props}\n placeholder={capitalizeFirstLetter(props?.placeholder, props?.capitalize)}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-outline`]: borderStyle === 'outline',\n [`${tntPrefixCls}-fill`]: borderStyle === 'fill',\n })}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n)\n\nconst Password = forwardRef<AntdPassword, PasswordProps & { capitalize?: boolean }>(\n ({ className, borderStyle, readonly, ...props }, ref) =>\n readonly ? (\n <PreviewText.Input {...props} />\n ) : (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInput.Password\n {...props}\n placeholder={capitalizeFirstLetter(props?.placeholder, props?.capitalize)}\n ref={ref}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-outline`]: borderStyle === 'outline',\n [`${tntPrefixCls}-fill`]: borderStyle === 'fill',\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n)\n\ninterface InputComponent\n extends React.ForwardRefExoticComponent<InputProps & React.RefAttributes<AntdInput>> {\n Group: typeof Group\n TextArea: typeof TextArea\n Password: typeof Password\n Search: typeof Search\n}\n\nexport const InternalInput = forwardRef<AntdInput, InputProps & { capitalize?: boolean }>(\n ({ className, borderStyle, ...props }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdInput\n {...props}\n placeholder={capitalizeFirstLetter(props?.placeholder, props?.capitalize)}\n ref={ref}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-outline`]: borderStyle === 'outline',\n [`${tntPrefixCls}-fill`]: borderStyle === 'fill',\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as InputComponent\n\nexport const Input = connectReadonlyComponent(InternalInput, PreviewText.Input) as InputComponent\n\nInput.displayName = 'Input'\n\nInput.Group = Group\nInput.TextArea = TextArea\nInput.Password = Password\nInput.Search = Search\n"]}
|