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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
/*
|
|
10
|
+
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
11
|
+
* @Date: 2024-03-21 19:43:36
|
|
12
|
+
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
13
|
+
* @LastEditTime: 2024-03-21 19:46:23
|
|
14
|
+
* @FilePath: /tntd/packages/tntd/src/alert/alert.tsx
|
|
15
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
16
|
+
*/
|
|
17
|
+
import React, { forwardRef } from 'react';
|
|
18
|
+
import Icon from 'antd/es/icon';
|
|
19
|
+
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
20
|
+
import { default as AntdAlert } from 'antd/es/alert';
|
|
21
|
+
import classname from 'classnames';
|
|
22
|
+
export * from 'antd/es/alert';
|
|
23
|
+
const prefix = 'tnt-alert';
|
|
24
|
+
export const Alert = forwardRef((_a, ref) => {
|
|
25
|
+
var {
|
|
26
|
+
action,
|
|
27
|
+
message
|
|
28
|
+
} = _a,
|
|
29
|
+
rest = __rest(_a, ["action", "message"]);
|
|
30
|
+
const fragment = React.createElement(React.Fragment, null, message, !!action && React.createElement("span", {
|
|
31
|
+
className: "action-btn"
|
|
32
|
+
}, action));
|
|
33
|
+
const iconTheme = 'filled';
|
|
34
|
+
let iconType = 'default';
|
|
35
|
+
switch (rest === null || rest === void 0 ? void 0 : rest.type) {
|
|
36
|
+
case 'success':
|
|
37
|
+
iconType = 'check-circle';
|
|
38
|
+
break;
|
|
39
|
+
case 'info':
|
|
40
|
+
iconType = 'info-circle';
|
|
41
|
+
break;
|
|
42
|
+
case 'error':
|
|
43
|
+
iconType = 'close-circle';
|
|
44
|
+
break;
|
|
45
|
+
case 'warning':
|
|
46
|
+
iconType = 'exclamation-circle';
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
iconType = 'default';
|
|
50
|
+
}
|
|
51
|
+
const iconNode = rest.type ? React.createElement(Icon, {
|
|
52
|
+
className: `${prefix}-icon`,
|
|
53
|
+
type: iconType,
|
|
54
|
+
theme: iconTheme
|
|
55
|
+
}) : null;
|
|
56
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
57
|
+
getPrefixCls
|
|
58
|
+
}) => {
|
|
59
|
+
return React.createElement(AntdAlert, Object.assign({
|
|
60
|
+
ref: ref
|
|
61
|
+
}, rest, {
|
|
62
|
+
message: fragment,
|
|
63
|
+
icon: iconNode,
|
|
64
|
+
className: classname(rest === null || rest === void 0 ? void 0 : rest.className, 'tnt-alert', {
|
|
65
|
+
[`${prefix}-with-action`]: action
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
export default Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,IAAI,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,cAAc,eAAe,CAAA;AAS7B,MAAM,MAAM,GAAG,WAAW,CAAA;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAwB,CAAC,EAA4B,EAAE,GAAG,EAAE,EAAE;QAArC,EAAE,MAAM,EAAE,OAAO,OAAW,EAAN,IAAI,cAA1B,qBAA4B,CAAF;IAChF,MAAM,QAAQ,GAAG,CACf;QACG,OAAO;QACP,CAAC,CAAC,MAAM,IAAI,8BAAM,SAAS,EAAC,YAAY,IAAE,MAAM,CAAQ,CACxD,CACJ,CAAA;IAED,MAAM,SAAS,GAAc,QAAQ,CAAA;IACrC,IAAI,QAAQ,GAAG,SAAS,CAAA;IAExB,QAAQ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;QAClB,KAAK,SAAS;YACZ,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,MAAM;YACT,QAAQ,GAAG,aAAa,CAAA;YACxB,MAAK;QACP,KAAK,OAAO;YACV,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,SAAS;YACZ,QAAQ,GAAG,oBAAoB,CAAA;YAC/B,MAAK;QACP;YACE,QAAQ,GAAG,SAAS,CAAA;KACvB;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3B,oBAAC,IAAI,IAAC,SAAS,EAAE,GAAG,MAAM,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAI,CACxE,CAAC,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,oBAAC,SAAS,kBACR,GAAG,EAAE,GAAG,IACJ,IAAI,IACR,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,SAAS,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,WAAW,EAAE;gBACjD,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,MAAM;aAClC,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAmB,CAAA;AAEpB,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-21 19:43:36\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-21 19:46:23\n * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { AlertProps as AntdAlertProps } from 'antd/es/alert'\nimport type { ThemeType } from 'antd/es/icon'\nimport Icon from 'antd/es/icon'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdAlert } from 'antd/es/alert'\nimport classname from 'classnames'\nexport * from 'antd/es/alert'\n\nexport interface AlertProps extends AntdAlertProps {\n action: React.ReactNode\n}\n\ninterface AlertComponent\n extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {}\n\nconst prefix = 'tnt-alert'\n\nexport const Alert = forwardRef<AntdAlert, AlertProps>(({ action, message, ...rest }, ref) => {\n const fragment = (\n <>\n {message}\n {!!action && <span className=\"action-btn\">{action}</span>}\n </>\n )\n\n const iconTheme: ThemeType = 'filled'\n let iconType = 'default'\n\n switch (rest?.type) {\n case 'success':\n iconType = 'check-circle'\n break\n case 'info':\n iconType = 'info-circle'\n break\n case 'error':\n iconType = 'close-circle'\n break\n case 'warning':\n iconType = 'exclamation-circle'\n break\n default:\n iconType = 'default'\n }\n\n const iconNode = rest.type ? (\n <Icon className={`${prefix}-icon`} type={iconType} theme={iconTheme} />\n ) : null\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdAlert\n ref={ref}\n {...rest}\n message={fragment}\n icon={iconNode}\n className={classname(rest?.className, 'tnt-alert', {\n [`${prefix}-with-action`]: action,\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n}) as AlertComponent\n\nexport default Alert\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@alert-prefix-cls: ~'@{ant-prefix}-alert';
|
|
2
|
+
@alert-description-color: @text-color-secondary;
|
|
3
|
+
@tnt-alert-prefix-cls: ~'tnt-alert';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.@{tnt-alert-prefix-cls} {
|
|
7
|
+
|
|
8
|
+
&.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon.@{alert-prefix-cls}-closable {
|
|
9
|
+
padding-right: 30px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.@{tnt-alert-prefix-cls}-with-action {
|
|
13
|
+
.@{alert-prefix-cls}-message {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
> .action-btn {
|
|
17
|
+
flex: none;
|
|
18
|
+
margin-left: 36px;
|
|
19
|
+
margin-right: 12px;
|
|
20
|
+
font-size: @font-size-base;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.@{alert-prefix-cls} {
|
|
26
|
+
border-radius: @border-radius-lg;
|
|
27
|
+
padding: 8px 15px 8px 44px;
|
|
28
|
+
& .anticon {
|
|
29
|
+
left: 20px;
|
|
30
|
+
top: 11px; // 与文字对齐
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.@{alert-prefix-cls}-message {
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
color: @alert-description-color;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& .@{alert-prefix-cls}-close-icon {
|
|
41
|
+
font-size: @font-size-lg;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.@{alert-prefix-cls}-with-description {
|
|
45
|
+
padding: 16px 20px 16px 48px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon {
|
|
49
|
+
padding: 8px 20px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.@{alert-prefix-cls}-with-description.@{alert-prefix-cls}-no-icon {
|
|
53
|
+
padding: 16px 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.@{alert-prefix-cls}-with-description i.@{alert-prefix-cls}-icon {
|
|
57
|
+
top: 18px;
|
|
58
|
+
font-size: @font-size-xl;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
.@{alert-prefix-cls}-success {
|
|
64
|
+
.action-btn {
|
|
65
|
+
background-color: @alert-success-bg-color;
|
|
66
|
+
color: @green-6;
|
|
67
|
+
a {
|
|
68
|
+
color: @green-6;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.@{alert-prefix-cls}-close-icon {
|
|
72
|
+
.@{iconfont-css-prefix}-close {
|
|
73
|
+
color: @alert-success-icon-color;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.@{alert-prefix-cls}-info {
|
|
79
|
+
.action-btn {
|
|
80
|
+
background-color: @alert-info-bg-color;
|
|
81
|
+
color: @alert-info-icon-color;
|
|
82
|
+
a {
|
|
83
|
+
color: @alert-info-icon-color;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.@{alert-prefix-cls}-close-icon {
|
|
87
|
+
.@{iconfont-css-prefix}-close {
|
|
88
|
+
color: @alert-info-icon-color;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.@{alert-prefix-cls}-warning {
|
|
94
|
+
.action-btn {
|
|
95
|
+
background-color: @alert-warning-bg-color;
|
|
96
|
+
color: @gold-7;
|
|
97
|
+
a {
|
|
98
|
+
color: @gold-7;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.@{alert-prefix-cls}-close-icon {
|
|
102
|
+
.@{iconfont-css-prefix}-close {
|
|
103
|
+
color: @alert-warning-icon-color;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.@{alert-prefix-cls}-error {
|
|
109
|
+
.action-btn {
|
|
110
|
+
background-color: @alert-error-bg-color;
|
|
111
|
+
color: @red-6;
|
|
112
|
+
a {
|
|
113
|
+
color: @red-6;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.@{alert-prefix-cls}-close-icon {
|
|
117
|
+
.@{iconfont-css-prefix}-close {
|
|
118
|
+
color: @alert-error-icon-color;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.@{alert-prefix-cls} {
|
|
124
|
+
>
|
|
125
|
+
.@{alert-prefix-cls}-icon {
|
|
126
|
+
font-size: @font-size-lg;
|
|
127
|
+
}
|
|
128
|
+
}
|
package/es/alert/index.js
CHANGED
package/es/alert/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,OAAO,SAAS,CAAA;AAEhB,cAAc,eAAe,CAAA;AAE7B,eAAe,KAAK,CAAA","sourcesContent":["import Alert from './alert'\n\nimport './style'\n\nexport * from 'antd/es/alert'\n\nexport default Alert\n"]}
|
package/es/button/button.js
CHANGED
|
@@ -18,15 +18,19 @@ import React, { forwardRef } from 'react';
|
|
|
18
18
|
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
19
19
|
import { default as AntdButton } from 'antd/es/button';
|
|
20
20
|
import { titleCaseUpper } from '../utils/lang';
|
|
21
|
+
import classNames from 'classnames';
|
|
21
22
|
export * from 'antd/es/button';
|
|
22
|
-
|
|
23
|
+
const tntPrefixCls = 'tnt-btn';
|
|
23
24
|
export const Button = forwardRef((_a, ref) => {
|
|
24
25
|
var {
|
|
26
|
+
className,
|
|
27
|
+
size,
|
|
28
|
+
type,
|
|
25
29
|
children,
|
|
26
30
|
unUpperConverted,
|
|
27
31
|
upperCaseIgnore
|
|
28
32
|
} = _a,
|
|
29
|
-
rest = __rest(_a, ["children", "unUpperConverted", "upperCaseIgnore"]);
|
|
33
|
+
rest = __rest(_a, ["className", "size", "type", "children", "unUpperConverted", "upperCaseIgnore"]);
|
|
30
34
|
let newChildren = children;
|
|
31
35
|
if (!unUpperConverted && newChildren) {
|
|
32
36
|
if (typeof newChildren === 'string') {
|
|
@@ -39,9 +43,32 @@ export const Button = forwardRef((_a, ref) => {
|
|
|
39
43
|
getPrefixCls
|
|
40
44
|
}) => {
|
|
41
45
|
return React.createElement(AntdButton, Object.assign({}, rest, {
|
|
46
|
+
type: type === 'tertiary' ? undefined : type,
|
|
47
|
+
size: size === 'mini' ? undefined : size,
|
|
48
|
+
className: classNames(className, tntPrefixCls, {
|
|
49
|
+
[`${tntPrefixCls}-mini`]: size === 'mini',
|
|
50
|
+
[`${tntPrefixCls}-tertiary`]: type === 'tertiary'
|
|
51
|
+
}),
|
|
42
52
|
children: newChildren,
|
|
43
53
|
ref: ref
|
|
44
54
|
}));
|
|
45
55
|
});
|
|
46
56
|
});
|
|
47
|
-
|
|
57
|
+
const ButtonGroup = _a => {
|
|
58
|
+
var {
|
|
59
|
+
className,
|
|
60
|
+
size
|
|
61
|
+
} = _a,
|
|
62
|
+
rest = __rest(_a, ["className", "size"]);
|
|
63
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
64
|
+
getPrefixCls
|
|
65
|
+
}) => {
|
|
66
|
+
return React.createElement(AntdButton.Group, Object.assign({}, rest, {
|
|
67
|
+
size: size === 'mini' ? undefined : size,
|
|
68
|
+
className: classNames(className, {
|
|
69
|
+
[`${tntPrefixCls}-group-mini`]: size === 'mini'
|
|
70
|
+
})
|
|
71
|
+
}));
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
Button.Group = ButtonGroup;
|
package/es/button/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAMzC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,cAAc,gBAAgB,CAAA;AAkB9B,MAAM,YAAY,GAAG,SAAS,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CAAC,EAA+E,EAAE,GAAG,EAAE,EAAE;QAAxF,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,OAAW,EAAN,IAAI,cAA7E,gFAA+E,CAAF;IAC5E,IAAI,WAAW,GAAG,QAAQ,CAAA;IAC1B,IAAI,CAAC,gBAAgB,IAAI,WAAW,EAAE;QACpC,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,eAAe,CAAC,CAAA;SAC3D;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YACrC,WAAW,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;SAC5F;KACF;IACD,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,oBAAC,UAAU,oBACL,IAAI,IACR,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC5C,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EACxC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE;gBAC7C,CAAC,GAAG,YAAY,OAAO,CAAC,EAAE,IAAI,KAAK,MAAM;gBACzC,CAAC,GAAG,YAAY,WAAW,CAAC,EAAE,IAAI,KAAK,UAAU;aAClD,CAAC,EACF,QAAQ,EAAE,WAAW,EACrB,GAAG,EAAE,GAAG,IACR,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACiB,CAAA;AAEpB,MAAM,WAAW,GAA+B,CAAC,EAA4B,EAAE,EAAE;QAAhC,EAAE,SAAS,EAAE,IAAI,OAAW,EAAN,IAAI,cAA1B,qBAA4B,CAAF;IACzE,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,oBAAC,UAAU,CAAC,KAAK,oBACX,IAAI,IACR,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EACxC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE;gBAC/B,CAAC,GAAG,YAAY,aAAa,CAAC,EAAE,IAAI,KAAK,MAAM;aAChD,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,KAAK,GAAG,WAAW,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-10-26 09:46:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-10-31 09:59:35\n * @FilePath: /tntd/packages/tntd/src/button/button.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type {\n ButtonProps as AntdButtonProps,\n ButtonGroupProps as AntdButtonGroupProps,\n ButtonType,\n} from 'antd/es/button'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdButton } from 'antd/es/button'\nimport { titleCaseUpper } from '../utils/lang'\nimport classNames from 'classnames'\n\nexport * from 'antd/es/button'\n\nexport type TntButtonType = ButtonType | 'tertiary'\nexport interface ButtonProps extends Omit<AntdButtonProps, 'size' | 'type'> {\n upperCaseIgnore?: []\n unUpperConverted?: boolean\n size?: 'large' | 'default' | 'small' | 'mini'\n type?: 'default' | 'primary' | 'tertiary' | 'ghost' | 'dashed' | 'danger' | 'link'\n}\nexport interface ButtonGroupProps extends Omit<AntdButtonGroupProps, 'size'> {\n size?: 'large' | 'default' | 'small' | 'mini'\n}\n\ninterface ButtonComponent\n extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<AntdButton>> {\n Group: React.FC<ButtonGroupProps>\n}\n\nconst tntPrefixCls = 'tnt-btn'\n\nexport const Button = forwardRef<AntdButton, ButtonProps>(\n ({ className, size, type, children, unUpperConverted, upperCaseIgnore, ...rest }, ref) => {\n let newChildren = children\n if (!unUpperConverted && newChildren) {\n if (typeof newChildren === 'string') {\n newChildren = titleCaseUpper(newChildren, upperCaseIgnore)\n } else if (Array.isArray(newChildren)) {\n newChildren = [...newChildren].map((subChild) => titleCaseUpper(subChild, upperCaseIgnore))\n }\n }\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdButton\n {...rest}\n type={type === 'tertiary' ? undefined : type}\n size={size === 'mini' ? undefined : size}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-mini`]: size === 'mini',\n [`${tntPrefixCls}-tertiary`]: type === 'tertiary',\n })}\n children={newChildren}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as ButtonComponent\n\nconst ButtonGroup: React.FC<ButtonGroupProps> = ({ className, size, ...rest }) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdButton.Group\n {...rest}\n size={size === 'mini' ? undefined : size}\n className={classNames(className, {\n [`${tntPrefixCls}-group-mini`]: size === 'mini',\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nButton.Group = ButtonGroup\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@import './style/mixin.less';
|
|
2
|
+
@import '../style/mixins/size.less';
|
|
3
|
+
|
|
4
|
+
@btn-prefix-cls: ~'@{ant-prefix}-btn';
|
|
5
|
+
|
|
6
|
+
.tnt-btn {
|
|
7
|
+
&-tertiary {
|
|
8
|
+
.button-variant-tertiary(@btn-default-color, @primary-color, @btn-tertiary-bg);
|
|
9
|
+
}
|
|
10
|
+
&.@{btn-prefix-cls}-primary {
|
|
11
|
+
.button-disabled(@btn-primary-color, @blue-3, @blue-3);
|
|
12
|
+
}
|
|
13
|
+
&.@{btn-prefix-cls}-danger {
|
|
14
|
+
.button-disabled(@btn-primary-color, @red-3, @red-3);
|
|
15
|
+
}
|
|
16
|
+
&.@{btn-prefix-cls}-link {
|
|
17
|
+
.button-disabled(@blue-3, transparent, transparent);
|
|
18
|
+
}
|
|
19
|
+
&.tnt-btn-mini {
|
|
20
|
+
.button-size(@btn-height-mini; @btn-padding-mini; @btn-font-size-mini; @btn-border-radius-sm);
|
|
21
|
+
&.@{btn-prefix-cls}-icon-only {
|
|
22
|
+
.square(@btn-height-mini);
|
|
23
|
+
padding-right: 0;
|
|
24
|
+
padding-left: 0;
|
|
25
|
+
}
|
|
26
|
+
&.@{btn-prefix-cls}-circle {
|
|
27
|
+
min-width: @btn-height-mini;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
}
|
|
30
|
+
&.@{btn-prefix-cls}-round {
|
|
31
|
+
.button-size(@btn-circle-size-mini; 0 @btn-circle-size-mini / 2; @btn-font-size-mini; @btn-circle-size-mini);
|
|
32
|
+
&.@{btn-prefix-cls}-icon-only {
|
|
33
|
+
width: auto;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&-group-mini {
|
|
38
|
+
& > .@{btn-prefix-cls},
|
|
39
|
+
& > span > .@{btn-prefix-cls} {
|
|
40
|
+
.button-size(@btn-height-mini; @btn-padding-mini; @btn-font-size-mini; 0);
|
|
41
|
+
line-height: calc(@btn-height-mini - 2px);
|
|
42
|
+
}
|
|
43
|
+
& > .@{btn-prefix-cls}.@{btn-prefix-cls}-icon-only {
|
|
44
|
+
.square(@btn-height-mini);
|
|
45
|
+
padding-right: 0;
|
|
46
|
+
padding-left: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.button-variant-tertiary(@color; @hover-color; @background) {
|
|
52
|
+
.button-color(@color; @background; @background);
|
|
53
|
+
|
|
54
|
+
text-shadow: @btn-text-shadow;
|
|
55
|
+
box-shadow: @btn-primary-shadow;
|
|
56
|
+
|
|
57
|
+
&:hover,
|
|
58
|
+
&:focus {
|
|
59
|
+
.button-color(
|
|
60
|
+
@hover-color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active,
|
|
65
|
+
&.active {
|
|
66
|
+
.button-color(
|
|
67
|
+
@hover-color; ~`colorPalette('@{background}', 6) `; ~`colorPalette('@{background}', 6) `
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.button-disabled(@btn-disable-color; @btn-disable-bg; transparent);
|
|
72
|
+
}
|
package/es/button/index.js
CHANGED
package/es/button/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,cAAc,UAAU,CAAA;AAExB,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport { Button } from './button'\n\nexport * from './button'\n\nexport default Button\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,cAAc,UAAU,CAAA;AAExB,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport './button.less'\nimport { Button } from './button'\n\nexport * from './button'\n\nexport default Button\n"]}
|
|
Binary file
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
11
|
+
import AntdCheckbox from 'antd/es/checkbox';
|
|
12
|
+
import { connectReadonlyComponent } from '../connect';
|
|
13
|
+
import { PreviewText } from '../preview-text';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
export * from 'antd/es/checkbox';
|
|
16
|
+
const tntPrefixCls = 'tnt-checkbox';
|
|
17
|
+
const Checkbox = forwardRef((_a, ref) => {
|
|
18
|
+
var {
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
desc
|
|
22
|
+
} = _a,
|
|
23
|
+
rest = __rest(_a, ["className", "children", "desc"]);
|
|
24
|
+
return React.createElement(ConfigConsumer, null, () => {
|
|
25
|
+
return React.createElement(AntdCheckbox, Object.assign({}, rest, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: classNames(className, tntPrefixCls)
|
|
28
|
+
}), React.createElement("span", {
|
|
29
|
+
className: `${tntPrefixCls}-children`
|
|
30
|
+
}, React.createElement("span", null, children), !!desc && React.createElement("span", {
|
|
31
|
+
className: `${tntPrefixCls}-desc`
|
|
32
|
+
}, desc)));
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const CheckboxGroup = forwardRef((_a, ref) => {
|
|
36
|
+
var {
|
|
37
|
+
className
|
|
38
|
+
} = _a,
|
|
39
|
+
rest = __rest(_a, ["className"]);
|
|
40
|
+
return React.createElement(ConfigConsumer, null, () => {
|
|
41
|
+
return React.createElement(AntdCheckbox.Group, Object.assign({}, rest, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: classNames(className, `${tntPrefixCls}-group`)
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
Checkbox.Group = connectReadonlyComponent(CheckboxGroup, PreviewText.Select);
|
|
48
|
+
export default Checkbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,YAAY,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,cAAc,kBAAkB,CAAA;AAchC,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAsC,EAAE,GAAG,EAAE,EAAE;QAA/C,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,OAAW,EAAN,IAAI,cAApC,iCAAsC,CAAF;IACnC,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,YAAY,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC;YAC9E,8BAAM,SAAS,EAAE,GAAG,YAAY,WAAW;gBACzC,kCAAO,QAAQ,CAAQ;gBACtB,CAAC,CAAC,IAAI,IAAI,8BAAM,SAAS,EAAE,GAAG,YAAY,OAAO,IAAG,IAAI,CAAQ,CAC5D,CACM,CAChB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACmB,CAAA;AAEtB,MAAM,aAAa,GAAG,UAAU,CAC9B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,oBAAC,cAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,oBAAC,YAAY,CAAC,KAAK,oBACb,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,GAAG,YAAY,QAAQ,CAAC,IACzD,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACF,CAAA;AAED,QAAQ,CAAC,KAAK,GAAG,wBAAwB,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;AAE5E,eAAe,QAAQ,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport type {\n CheckboxProps as AntdCheckboxProps,\n CheckboxGroupProps as AntdCheckboxGroupProps,\n} from 'antd/es/checkbox'\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport AntdCheckbox from 'antd/es/checkbox'\nimport type AntdCheckboxGroup from 'antd/es/checkbox/Group'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\nimport classNames from 'classnames'\n\nexport * from 'antd/es/checkbox'\n\nexport type CheckboxProps = AntdCheckboxProps & {\n desc?: string | React.ReactNode\n}\nexport type CheckboxGroupProps = AntdCheckboxGroupProps & {\n readonly?: boolean\n}\n\ninterface CheckboxComponent\n extends React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<AntdCheckbox>> {\n Group: React.FC<CheckboxGroupProps>\n}\n\nconst tntPrefixCls = 'tnt-checkbox'\n\nconst Checkbox = forwardRef<AntdCheckbox, CheckboxProps>(\n ({ className, children, desc, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdCheckbox {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n <span className={`${tntPrefixCls}-children`}>\n <span>{children}</span>\n {!!desc && <span className={`${tntPrefixCls}-desc`}>{desc}</span>}\n </span>\n </AntdCheckbox>\n )\n }}\n </ConfigConsumer>\n )\n }\n) as CheckboxComponent\n\nconst CheckboxGroup = forwardRef<AntdCheckboxGroup, CheckboxGroupProps>(\n ({ className, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdCheckbox.Group\n {...rest}\n ref={ref}\n className={classNames(className, `${tntPrefixCls}-group`)}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n)\n\nCheckbox.Group = connectReadonlyComponent(CheckboxGroup, PreviewText.Select)\n\nexport default Checkbox\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@checkbox-prefix-cls: ~'@{ant-prefix}-checkbox';
|
|
2
|
+
@checkbox-inner-prefix-cls: ~'@{checkbox-prefix-cls}-inner';
|
|
3
|
+
|
|
4
|
+
.tnt-checkbox,
|
|
5
|
+
.tnt-checkbox-group {
|
|
6
|
+
.@{checkbox-prefix-cls}-indeterminate {
|
|
7
|
+
.@{checkbox-inner-prefix-cls} {
|
|
8
|
+
background-color: @checkbox-color;
|
|
9
|
+
border-color: @checkbox-color;
|
|
10
|
+
}
|
|
11
|
+
.@{checkbox-inner-prefix-cls}::after {
|
|
12
|
+
@indeterminate-width: calc(@checkbox-size - 8px);
|
|
13
|
+
@indeterminate-height: 1.4px;
|
|
14
|
+
|
|
15
|
+
width: @indeterminate-width;
|
|
16
|
+
height: @indeterminate-height;
|
|
17
|
+
background-color: @component-background;
|
|
18
|
+
border-radius: 2px;
|
|
19
|
+
transition: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.@{checkbox-prefix-cls}-disabled {
|
|
23
|
+
.@{checkbox-inner-prefix-cls} {
|
|
24
|
+
background: @checkbox-check-disabled-color;
|
|
25
|
+
border-color: @checkbox-check-disabled-color !important;
|
|
26
|
+
|
|
27
|
+
&::after {
|
|
28
|
+
background-color: #fff;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.@{checkbox-prefix-cls}-checked {
|
|
35
|
+
&.@{checkbox-prefix-cls}-disabled {
|
|
36
|
+
.@{checkbox-inner-prefix-cls} {
|
|
37
|
+
background: @checkbox-check-disabled-color;
|
|
38
|
+
border-color: @checkbox-check-disabled-color !important;
|
|
39
|
+
&::after {
|
|
40
|
+
border-color: #fff;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.@{checkbox-inner-prefix-cls}::after {
|
|
46
|
+
width: 16px;
|
|
47
|
+
height: 16px;
|
|
48
|
+
border-width: 0;
|
|
49
|
+
background-image: url(./check.png);
|
|
50
|
+
background-size: contain;
|
|
51
|
+
transform: translate(-25%, -50%);
|
|
52
|
+
transition: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tnt-checkbox {
|
|
58
|
+
& > span:nth-of-type(2) {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
}
|
|
61
|
+
&-children {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
}
|
|
65
|
+
&-desc {
|
|
66
|
+
font-size: @font-size-sm;
|
|
67
|
+
color: @bg-color-spotilight-tint-50;
|
|
68
|
+
}
|
|
69
|
+
}
|
package/es/checkbox/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import Checkbox from '
|
|
2
|
-
import CheckboxGroup from './checkbox-group';
|
|
1
|
+
import Checkbox from './checkbox';
|
|
3
2
|
import './style';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export * from './checkbox-group';
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
Checkbox.Group = CheckboxGroup;
|
|
3
|
+
import './checkbox.less';
|
|
4
|
+
export * from './checkbox';
|
|
9
5
|
export default Checkbox;
|
package/es/checkbox/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,SAAS,CAAA;AAChB,OAAO,iBAAiB,CAAA;AAExB,cAAc,YAAY,CAAA;AAE1B,eAAe,QAAQ,CAAA","sourcesContent":["import Checkbox from './checkbox'\nimport './style'\nimport './checkbox.less'\n\nexport * from './checkbox'\n\nexport default Checkbox\n"]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@import '../style/themes/index';
|
|
2
|
+
@import '../style/mixins/index';
|
|
3
|
+
|
|
1
4
|
@prefixCls: ~'tntd-color-picker';
|
|
2
5
|
|
|
3
6
|
.color-picker-size(@input-height, @input-padding-horizontal, @font-size) {
|
|
@@ -86,7 +89,7 @@
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
.@{prefixCls}-img {
|
|
89
|
-
border-left: 1px solid @border-color
|
|
92
|
+
border-left: 1px solid @select-border-color;
|
|
90
93
|
background: #fff;
|
|
91
94
|
text-align: center;
|
|
92
95
|
img {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import Icon from '../icon';
|
|
11
|
+
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
12
|
+
import AntdDatePicker from 'antd/es/date-picker';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
export * from 'antd/es/date-picker';
|
|
15
|
+
export * from 'antd/es/date-picker/interface';
|
|
16
|
+
const {
|
|
17
|
+
MonthPicker,
|
|
18
|
+
WeekPicker,
|
|
19
|
+
RangePicker
|
|
20
|
+
} = AntdDatePicker;
|
|
21
|
+
export const TntDatePicker = props => {
|
|
22
|
+
//theme样式类型 outline | fill 默认 outline
|
|
23
|
+
const {
|
|
24
|
+
theme = 'outline',
|
|
25
|
+
className,
|
|
26
|
+
suffixIcon
|
|
27
|
+
} = props,
|
|
28
|
+
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
29
|
+
const defaultIcon = React.createElement(Icon, {
|
|
30
|
+
type: "calendar-3"
|
|
31
|
+
});
|
|
32
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
33
|
+
getPrefixCls
|
|
34
|
+
}) => {
|
|
35
|
+
const prefixCls = getPrefixCls('date-picker');
|
|
36
|
+
return React.createElement(AntdDatePicker, Object.assign({
|
|
37
|
+
suffixIcon: suffixIcon || defaultIcon,
|
|
38
|
+
className: classNames(className, `${prefixCls}-${theme}`)
|
|
39
|
+
}, restProps));
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export const TntMonthPicker = props => {
|
|
43
|
+
const {
|
|
44
|
+
theme = 'outline',
|
|
45
|
+
className,
|
|
46
|
+
suffixIcon
|
|
47
|
+
} = props,
|
|
48
|
+
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
49
|
+
const defaultIcon = React.createElement(Icon, {
|
|
50
|
+
type: "calendar-3"
|
|
51
|
+
});
|
|
52
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
53
|
+
getPrefixCls
|
|
54
|
+
}) => {
|
|
55
|
+
const prefixCls = getPrefixCls('date-picker');
|
|
56
|
+
return React.createElement(MonthPicker, Object.assign({
|
|
57
|
+
suffixIcon: suffixIcon || defaultIcon,
|
|
58
|
+
className: classNames(className, `${prefixCls}-${theme}`)
|
|
59
|
+
}, restProps));
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export const TntWeekPicker = props => {
|
|
63
|
+
const {
|
|
64
|
+
theme = 'outline',
|
|
65
|
+
className,
|
|
66
|
+
suffixIcon
|
|
67
|
+
} = props,
|
|
68
|
+
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
69
|
+
const defaultIcon = React.createElement(Icon, {
|
|
70
|
+
type: "calendar-3"
|
|
71
|
+
});
|
|
72
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
73
|
+
getPrefixCls
|
|
74
|
+
}) => {
|
|
75
|
+
const prefixCls = getPrefixCls('date-picker');
|
|
76
|
+
return React.createElement(WeekPicker, Object.assign({
|
|
77
|
+
suffixIcon: suffixIcon || defaultIcon,
|
|
78
|
+
className: classNames(className, `${prefixCls}-${theme}`)
|
|
79
|
+
}, restProps));
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
export const TntRangePicker = props => {
|
|
83
|
+
const {
|
|
84
|
+
theme = 'outline',
|
|
85
|
+
className,
|
|
86
|
+
suffixIcon
|
|
87
|
+
} = props,
|
|
88
|
+
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
89
|
+
const defaultIcon = React.createElement(Icon, {
|
|
90
|
+
type: "calendar-3"
|
|
91
|
+
});
|
|
92
|
+
return React.createElement(ConfigConsumer, null, ({
|
|
93
|
+
getPrefixCls
|
|
94
|
+
}) => {
|
|
95
|
+
const prefixCls = getPrefixCls('date-picker');
|
|
96
|
+
return React.createElement(RangePicker, Object.assign({
|
|
97
|
+
suffixIcon: suffixIcon || defaultIcon,
|
|
98
|
+
className: classNames(className, `${prefixCls}-${theme}`)
|
|
99
|
+
}, restProps));
|
|
100
|
+
});
|
|
101
|
+
};
|