tntd 2.8.0-beta.2 → 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/affix/index.js +1 -1
- package/es/affix/index.js.map +1 -1
- package/es/affix/style/index.js +2 -0
- package/es/affix/style/index.js.map +1 -0
- package/es/affix/style/index.less +6 -0
- 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 +2 -2
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.js +2 -0
- package/es/alert/style/index.js.map +1 -0
- package/es/alert/style/index.less +189 -0
- package/es/anchor/index.js +1 -1
- package/es/anchor/index.js.map +1 -1
- package/es/anchor/style/index.js +4 -0
- package/es/anchor/style/index.js.map +1 -0
- package/es/anchor/style/index.less +82 -0
- package/es/auto-complete/index.js +1 -1
- package/es/auto-complete/index.js.map +1 -1
- package/es/auto-complete/style/index.js +5 -0
- package/es/auto-complete/style/index.js.map +1 -0
- package/es/auto-complete/style/index.less +92 -0
- package/es/avatar/index.js +1 -1
- package/es/avatar/index.js.map +1 -1
- package/es/avatar/style/index.js +2 -0
- package/es/avatar/style/index.js.map +1 -0
- package/es/avatar/style/index.less +59 -0
- package/es/back-top/index.js +1 -1
- package/es/back-top/index.js.map +1 -1
- package/es/back-top/style/index.js +2 -0
- package/es/back-top/style/index.js.map +1 -0
- package/es/back-top/style/index.less +42 -0
- package/es/back-top/style/responsive.less +11 -0
- package/es/badge/index.js +1 -1
- package/es/badge/index.js.map +1 -1
- package/es/badge/style/index.js +2 -0
- package/es/badge/style/index.js.map +1 -0
- package/es/badge/style/index.less +190 -0
- package/es/breadcrumb/index.js +1 -1
- package/es/breadcrumb/index.js.map +1 -1
- package/es/breadcrumb/style/index.js +4 -0
- package/es/breadcrumb/style/index.js.map +1 -0
- package/es/breadcrumb/style/index.less +51 -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 +2 -1
- package/es/button/index.js.map +1 -1
- package/es/button/style/index.js +2 -0
- package/es/button/style/index.js.map +1 -0
- package/es/button/style/index.less +224 -0
- package/es/button/style/mixin.less +357 -0
- package/es/calendar/index.js +1 -1
- package/es/calendar/index.js.map +1 -1
- package/es/calendar/style/index.js +5 -0
- package/es/calendar/style/index.js.map +1 -0
- package/es/calendar/style/index.less +278 -0
- package/es/card/index.js +1 -1
- package/es/card/index.js.map +1 -1
- package/es/card/style/index.js +6 -0
- package/es/card/style/index.js.map +1 -0
- package/es/card/style/index.less +263 -0
- package/es/card/style/size.less +25 -0
- package/es/carousel/index.js +1 -1
- package/es/carousel/index.js.map +1 -1
- package/es/carousel/style/index.js +2 -0
- package/es/carousel/style/index.js.map +1 -0
- package/es/carousel/style/index.less +238 -0
- package/es/cascader/index.js +1 -1
- package/es/cascader/index.js.map +1 -1
- package/es/cascader/style/index.js +5 -0
- package/es/cascader/style/index.js.map +1 -0
- package/es/cascader/style/index.less +227 -0
- 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 +4 -8
- package/es/checkbox/index.js.map +1 -1
- package/es/checkbox/style/index.js +2 -0
- package/es/checkbox/style/index.js.map +1 -0
- package/es/checkbox/style/index.less +4 -0
- package/es/checkbox/style/mixin.less +220 -0
- package/es/col/index.js +1 -1
- package/es/col/index.js.map +1 -1
- package/es/col/style/index.js +4 -0
- package/es/col/style/index.js.map +1 -0
- package/es/collapse/index.js +1 -1
- package/es/collapse/index.js.map +1 -1
- package/es/collapse/style/index.js +2 -0
- package/es/collapse/style/index.js.map +1 -0
- package/es/collapse/style/index.less +134 -0
- package/es/color-picker/ColorPicker.js +4 -2
- package/es/color-picker/ColorPicker.js.map +1 -1
- package/es/color-picker/index.less +25 -8
- package/es/comment/index.js +1 -1
- package/es/comment/index.js.map +1 -1
- package/es/comment/style/index.js +2 -0
- package/es/comment/style/index.js.map +1 -0
- package/es/comment/style/index.less +93 -0
- package/es/config-provider/index.js +1 -1
- package/es/config-provider/index.js.map +1 -1
- package/es/config-provider/style/index.js +1 -0
- package/es/config-provider/style/index.js.map +1 -0
- package/es/config-provider/style/index.less +2 -0
- package/es/date-picker/DatePicker.js +101 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.js +7 -13
- package/es/date-picker/index.js.map +1 -1
- package/es/date-picker/index.less +294 -0
- package/es/date-picker/style/Calendar.less +402 -0
- package/es/date-picker/style/DecadePanel.less +81 -0
- package/es/date-picker/style/MonthPanel.less +86 -0
- package/es/date-picker/style/MonthPicker.less +11 -0
- package/es/date-picker/style/Picker.less +113 -0
- package/es/date-picker/style/RangePicker.less +248 -0
- package/es/date-picker/style/TimePicker.less +151 -0
- package/es/date-picker/style/WeekPicker.less +21 -0
- package/es/date-picker/style/YearPanel.less +85 -0
- package/es/date-picker/style/index.js +7 -0
- package/es/date-picker/style/index.js.map +1 -0
- package/es/date-picker/style/index.less +17 -0
- package/es/descriptions/descriptions.js +82 -25
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +107 -22
- package/es/descriptions/index.js +3 -3
- package/es/descriptions/index.js.map +1 -1
- package/es/descriptions/style/index.js +2 -0
- package/es/descriptions/style/index.js.map +1 -0
- package/es/descriptions/style/index.less +144 -0
- package/es/divider/index.js +1 -1
- package/es/divider/index.js.map +1 -1
- package/es/divider/style/index.js +2 -0
- package/es/divider/style/index.js.map +1 -0
- package/es/divider/style/index.less +109 -0
- package/es/drawer/drawer.js +98 -13
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.js +2 -2
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/index.less +154 -0
- package/es/drawer/style/drawer.less +245 -0
- package/es/drawer/style/index.js +4 -0
- package/es/drawer/style/index.js.map +1 -0
- package/es/drawer/style/index.less +3 -0
- package/es/dropdown/index.js +1 -1
- package/es/dropdown/index.js.map +1 -1
- package/es/dropdown/style/index.js +4 -0
- package/es/dropdown/style/index.js.map +1 -0
- package/es/dropdown/style/index.less +282 -0
- package/es/empty/index.js +1 -1
- package/es/empty/index.js.map +1 -1
- package/es/empty/style/index.js +2 -0
- package/es/empty/style/index.js.map +1 -0
- package/es/empty/style/index.less +52 -0
- package/es/form/form.js +3 -0
- package/es/form/form.js.map +1 -1
- package/es/form/form.less +36 -0
- package/es/form/index.js +1 -1
- package/es/form/index.js.map +1 -1
- package/es/form/style/index.js +4 -0
- package/es/form/style/index.js.map +1 -0
- package/es/form/style/index.less +653 -0
- package/es/form/style/mixin.less +126 -0
- package/es/grid/index.js +3 -13
- package/es/grid/index.js.map +1 -1
- package/es/grid/style/index.js +1 -1
- package/es/grid/style/index.js.map +1 -1
- package/es/grid/style/index.less +24 -26
- package/es/grid/style/mixin.less +63 -19
- package/es/grid-v4/RowContext.js.map +1 -0
- package/es/grid-v4/col.js.map +1 -0
- package/es/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/es/grid-v4/index.js +14 -0
- package/es/grid-v4/index.js.map +1 -0
- package/{lib/grid → es/grid-v4}/row.js.map +1 -1
- package/es/grid-v4/style/index.js +2 -0
- package/es/grid-v4/style/index.js.map +1 -0
- package/es/grid-v4/style/index.less +124 -0
- package/es/grid-v4/style/mixin.less +57 -0
- package/es/icon/index.js +2 -0
- package/es/icon/index.js.map +1 -1
- package/es/icon/style/index.js +2 -0
- package/es/icon/style/index.js.map +1 -0
- package/es/icon/style/index.less +4 -0
- package/es/icon/style/style.less +4 -0
- package/es/icon-old/index.js +4 -0
- package/es/icon-old/index.js.map +1 -0
- package/es/icon-old/style/index.js +2 -0
- package/es/icon-old/style/index.js.map +1 -0
- package/es/icon-old/style/index.less +4 -0
- package/es/index.js +3 -2
- package/es/index.js.map +1 -1
- package/es/input/index.js +2 -2
- 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/style/index.js +4 -0
- package/es/input/style/index.js.map +1 -0
- package/es/input/style/index.less +57 -0
- package/es/input/style/mixin.less +449 -0
- package/es/input/style/search-input.less +34 -0
- package/es/input-number/index.js +5 -6
- 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/input-number/style/index.js +2 -0
- package/es/input-number/style/index.js.map +1 -0
- package/es/input-number/style/index.less +179 -0
- package/es/layout/index.js +1 -1
- package/es/layout/index.js.map +1 -1
- package/es/layout/style/index.js +2 -0
- package/es/layout/style/index.js.map +1 -0
- package/es/layout/style/index.less +124 -0
- package/es/layout/style/light.less +15 -0
- package/es/list/index.js +1 -1
- package/es/list/index.js.map +1 -1
- package/es/list/style/bordered.less +41 -0
- package/es/list/style/index.js +7 -0
- package/es/list/style/index.js.map +1 -0
- package/es/list/style/index.less +234 -0
- package/es/list/style/responsive.less +40 -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/locale-provider/index.js +1 -1
- package/es/locale-provider/index.js.map +1 -1
- package/es/locale-provider/style/index.js +1 -0
- package/es/locale-provider/style/index.js.map +1 -0
- package/es/locale-provider/style/index.less +2 -0
- package/es/mentions/index.js +1 -1
- package/es/mentions/index.js.map +1 -1
- package/es/mentions/style/index.js +4 -0
- package/es/mentions/style/index.js.map +1 -0
- package/es/mentions/style/index.less +164 -0
- package/es/menu/index.js +1 -1
- package/es/menu/index.js.map +1 -1
- package/es/menu/style/dark.less +139 -0
- package/es/menu/style/index.js +5 -0
- package/es/menu/style/index.js.map +1 -0
- package/es/menu/style/index.less +515 -0
- package/es/message/index.js +1 -1
- package/es/message/index.js.map +1 -1
- package/es/message/message.less +2 -1
- package/es/message/style/index.js +2 -0
- package/es/message/style/index.js.map +1 -0
- package/es/message/style/index.less +75 -0
- package/es/modal/index.js +3 -4
- package/es/modal/index.js.map +1 -1
- package/es/modal/index.less +36 -0
- package/es/modal/modal.js +141 -12
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/confirm.less +96 -0
- package/es/modal/style/index.js +5 -0
- package/es/modal/style/index.js.map +1 -0
- package/es/modal/style/index.less +4 -0
- package/es/modal/style/modal.less +165 -0
- 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 +2 -2
- 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.js +2 -0
- package/es/notification/style/index.js.map +1 -0
- package/es/notification/style/index.less +201 -0
- package/es/page/index.js +0 -1
- package/es/page-header/index.js +1 -1
- package/es/page-header/index.js.map +1 -1
- package/es/page-header/style/index.js +4 -0
- package/es/page-header/style/index.js.map +1 -0
- package/es/page-header/style/index.less +119 -0
- package/es/pagination/index.js +1 -1
- package/es/pagination/index.js.map +1 -1
- package/es/pagination/style/index.js +4 -0
- package/es/pagination/style/index.js.map +1 -0
- package/es/pagination/style/index.less +400 -0
- package/es/popconfirm/index.js +3 -3
- 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 +6 -0
- package/es/popconfirm/style/index.js.map +1 -0
- package/es/popover/index.js +3 -3
- 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 +5 -0
- package/es/popover/style/index.js.map +1 -0
- package/es/popover/style/index.less +205 -0
- package/es/preview-text/index.js.map +1 -1
- package/es/progress/index.js +3 -3
- 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/progress/style/index.js +2 -0
- package/es/progress/style/index.js.map +1 -0
- package/es/progress/style/index.less +182 -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 +4 -6
- 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/radio/style/index.js +2 -0
- package/es/radio/style/index.js.map +1 -0
- package/es/radio/style/index.less +327 -0
- package/es/rate/index.js +1 -1
- package/es/rate/index.js.map +1 -1
- package/es/rate/style/index.js +4 -0
- package/es/rate/style/index.js.map +1 -0
- package/es/rate/style/index.less +85 -0
- package/es/result/index.js +1 -1
- package/es/result/index.js.map +1 -1
- package/es/result/style/index.js +2 -0
- package/es/result/style/index.js.map +1 -0
- package/es/result/style/index.less +71 -0
- package/es/row/index.js +1 -1
- package/es/row/index.js.map +1 -1
- package/es/row/style/index.js +4 -0
- package/es/row/style/index.js.map +1 -0
- package/es/segmented/index.less +126 -112
- package/es/select/index.js +2 -2
- 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/select/style/index.js +4 -0
- package/es/select/style/index.js.map +1 -0
- package/es/select/style/index.less +604 -0
- package/es/skeleton/index.js +1 -1
- package/es/skeleton/index.js.map +1 -1
- package/es/skeleton/style/index.js +2 -0
- package/es/skeleton/style/index.js.map +1 -0
- package/es/skeleton/style/index.less +130 -0
- package/es/slider/index.js +1 -1
- package/es/slider/index.js.map +1 -1
- package/es/slider/style/index.js +4 -0
- package/es/slider/style/index.js.map +1 -0
- package/es/slider/style/index.less +197 -0
- package/es/spin/index.js +1 -1
- package/es/spin/index.js.map +1 -1
- package/es/spin/style/index.js +2 -0
- package/es/spin/style/index.js.map +1 -0
- package/es/spin/style/index.less +214 -0
- package/es/statistic/index.js +1 -1
- package/es/statistic/index.js.map +1 -1
- package/es/statistic/style/index.js +2 -0
- package/es/statistic/style/index.js.map +1 -0
- package/es/statistic/style/index.less +40 -0
- 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 +10 -2
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/index.less +177 -0
- package/es/steps/stepStyle/nav.less +73 -0
- 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/compatibility.less +50 -0
- package/es/steps/style/custom-icon.less +31 -0
- package/es/steps/style/index.js +10 -0
- package/es/steps/style/index.js.map +1 -0
- package/es/steps/style/index.less +241 -6
- package/es/steps/style/label-placement.less +38 -0
- package/es/steps/style/nav.less +96 -247
- package/es/steps/style/progress-dot.less +80 -0
- package/es/steps/style/small.less +43 -3
- package/es/steps/style/vertical.less +74 -0
- package/es/style/color/bezierEasing.less +110 -0
- package/es/style/color/colorPalette.less +75 -0
- package/es/style/color/colors.less +149 -0
- package/es/style/color/tinyColor.less +1184 -0
- package/es/style/core/base.less +510 -0
- package/es/style/core/iconfont.less +19 -0
- package/es/style/core/index.less +4 -0
- package/es/style/core/motion/fade.less +31 -0
- package/es/style/core/motion/move.less +120 -0
- package/es/style/core/motion/other.less +40 -0
- package/es/style/core/motion/slide.less +120 -0
- package/es/style/core/motion/swing.less +34 -0
- package/es/style/core/motion/zoom.less +162 -0
- package/es/style/core/motion.less +20 -0
- package/es/style/index.js +1 -0
- package/es/style/index.js.map +1 -0
- package/es/style/index.less +2 -0
- package/es/style/mixins/clearfix.less +13 -0
- package/es/style/mixins/compatibility.less +22 -0
- package/es/style/mixins/iconfont.less +43 -0
- package/es/style/mixins/index.less +10 -0
- package/es/style/mixins/motion.less +35 -0
- package/es/style/mixins/operation-unit.less +18 -0
- package/es/style/mixins/reset.less +13 -0
- package/es/style/mixins/size.less +10 -0
- package/es/style/mixins/typography.less +49 -0
- package/es/style/themes/default.less +700 -0
- package/es/style/themes/index.less +1 -0
- package/es/style/v2-compatible-reset.js +1 -0
- package/es/style/v2-compatible-reset.js.map +1 -0
- package/es/style/v2-compatible-reset.less +51 -0
- package/es/switch/index.less +46 -0
- package/es/switch/style/index.js +3 -0
- package/es/switch/style/index.js.map +1 -0
- package/es/switch/style/index.less +178 -0
- package/es/switch/switch.js +41 -3
- package/es/switch/switch.js.map +1 -1
- package/es/table/index.js +1 -1
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.js +10 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/style/index.less +844 -0
- package/es/table/style/size.less +179 -0
- package/es/table/table.js +37 -7
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +33 -5
- package/es/tabs/index.js +2 -1
- package/es/tabs/index.js.map +1 -1
- package/es/tabs/style/card-style.less +186 -0
- package/es/tabs/style/index.js +2 -0
- package/es/tabs/style/index.js.map +1 -0
- package/es/tabs/style/index.less +437 -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 +12 -3
- package/es/tag/index.js.map +1 -1
- package/es/tag/style/index.js +2 -0
- package/es/tag/style/index.js.map +1 -0
- package/es/tag/style/index.less +106 -0
- 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 +3 -3
- package/es/time-picker/index.js.map +1 -1
- package/es/time-picker/index.less +38 -0
- package/es/time-picker/style/index.js +2 -0
- package/es/time-picker/style/index.js.map +1 -0
- package/es/time-picker/style/index.less +246 -0
- package/es/timeline/index.js +1 -1
- package/es/timeline/index.js.map +1 -1
- package/es/timeline/style/index.js +2 -0
- package/es/timeline/style/index.js.map +1 -0
- package/es/timeline/style/index.less +167 -0
- package/es/tntd-action/Action.js +66 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.js +65 -0
- package/es/tntd-action/index.js.map +1 -0
- package/es/tntd-action/index.less +36 -0
- package/es/tntd-cascader/AntdCascader/index.less +28 -27
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +0 -1
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +0 -1
- package/es/tntd-form/Form.js.map +1 -1
- package/es/tntd-form/FormItem/ItemHolder.js +1 -1
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/es/tntd-form/FormItemInput.js +1 -1
- package/es/tntd-form/FormItemInput.js.map +1 -1
- package/es/tntd-form/FormItemLabel.js +1 -1
- package/es/tntd-form/FormItemLabel.js.map +1 -1
- package/es/tntd-form/context.js.map +1 -1
- package/es/tntd-form/style/index.js +1 -1
- package/es/tntd-form/style/index.js.map +1 -1
- package/es/tntd-form/style/index.less +1 -1
- package/es/tntd-form/style/rtl.less +3 -3
- package/es/tntd-layout/index.js +0 -1
- package/es/tntd-rc-select/style/index.less +844 -740
- package/es/tntd-select/index.js +0 -1
- package/es/tooltip/index.js +3 -3
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/index.less +24 -0
- package/es/tooltip/style/index.js +3 -0
- package/es/tooltip/style/index.js.map +1 -0
- package/es/tooltip/style/index.less +187 -0
- package/es/tooltip/tooltip.js +32 -0
- package/es/tooltip/tooltip.js.map +1 -0
- package/es/transfer/index.js +1 -1
- package/es/transfer/index.js.map +1 -1
- package/es/transfer/style/customize.less +62 -0
- package/es/transfer/style/index.js +7 -0
- package/es/transfer/style/index.js.map +1 -0
- package/es/transfer/style/index.less +191 -0
- package/es/tree/index.js +1 -1
- package/es/tree/index.js.map +1 -1
- package/es/tree/style/directory.less +95 -0
- package/es/tree/style/index.js +2 -0
- package/es/tree/style/index.js.map +1 -0
- package/es/tree/style/index.less +280 -0
- package/es/tree/style/mixin.less +29 -0
- package/es/tree-select/index.js +1 -1
- package/es/tree-select/index.js.map +1 -1
- package/es/tree-select/style/index.js +6 -0
- package/es/tree-select/style/index.js.map +1 -0
- package/es/tree-select/style/index.less +191 -0
- package/es/typography/index.js +1 -1
- package/es/typography/index.js.map +1 -1
- package/es/typography/style/index.js +5 -0
- package/es/typography/style/index.js.map +1 -0
- package/es/typography/style/index.less +204 -0
- package/es/upload/index.js +1 -1
- package/es/upload/index.js.map +1 -1
- package/es/upload/style/index.js +5 -0
- package/es/upload/style/index.js.map +1 -0
- package/es/upload/style/index.less +542 -0
- package/es/utils/lang.js +8 -2
- package/es/utils/lang.js.map +1 -1
- package/es/version/index.js +1 -1
- package/es/version/index.js.map +1 -1
- package/es/version/style/index.js +2 -0
- package/es/version/style/index.js.map +1 -0
- package/lib/_util/context.js +3 -6
- package/lib/_util/defaultRenderEmpty.d.ts +2 -2
- package/lib/_util/defaultRenderEmpty.d.ts.map +1 -1
- package/lib/_util/defaultRenderEmpty.js +4 -5
- package/lib/_util/hooks/useFlexGapSupport.js +7 -8
- package/lib/_util/hooks/useForceUpdate.js +5 -5
- package/lib/_util/motion.js +3 -6
- package/lib/_util/reactNode.js +4 -5
- package/lib/_util/responsiveObserve.js +6 -9
- package/lib/_util/styleChecker.js +3 -5
- package/lib/_util/type.js +3 -5
- package/lib/_util/warning.js +5 -6
- package/lib/actions/index.js +1 -2
- package/lib/affix/index.d.ts +1 -1
- package/lib/affix/index.d.ts.map +1 -1
- package/lib/affix/index.js +5 -6
- package/lib/affix/index.js.map +1 -1
- package/lib/affix/style/index.d.ts +3 -0
- package/lib/affix/style/index.d.ts.map +1 -0
- package/lib/affix/style/index.js +4 -0
- package/lib/affix/style/index.js.map +1 -0
- package/lib/affix/style/index.less +6 -0
- 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 +2 -2
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +8 -10
- package/lib/alert/index.js.map +1 -1
- package/lib/alert/style/index.d.ts +3 -0
- package/lib/alert/style/index.d.ts.map +1 -0
- package/lib/alert/style/index.js +4 -0
- package/lib/alert/style/index.js.map +1 -0
- package/lib/alert/style/index.less +189 -0
- package/lib/anchor/index.d.ts +1 -1
- package/lib/anchor/index.d.ts.map +1 -1
- package/lib/anchor/index.js +5 -6
- package/lib/anchor/index.js.map +1 -1
- package/lib/anchor/style/index.d.ts +4 -0
- package/lib/anchor/style/index.d.ts.map +1 -0
- package/lib/anchor/style/index.js +5 -0
- package/lib/anchor/style/index.js.map +1 -0
- package/lib/anchor/style/index.less +82 -0
- package/lib/array-input/icon.d.ts +3 -2
- package/lib/array-input/icon.d.ts.map +1 -1
- package/lib/array-input/icon.js +3 -5
- package/lib/array-input/index.d.ts +2 -1
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +8 -10
- package/lib/auth-context/index.js +2 -3
- package/lib/auto-complete/index.d.ts +1 -1
- package/lib/auto-complete/index.d.ts.map +1 -1
- package/lib/auto-complete/index.js +5 -6
- package/lib/auto-complete/index.js.map +1 -1
- package/lib/auto-complete/style/index.d.ts +5 -0
- package/lib/auto-complete/style/index.d.ts.map +1 -0
- package/lib/auto-complete/style/index.js +6 -0
- package/lib/auto-complete/style/index.js.map +1 -0
- package/lib/auto-complete/style/index.less +92 -0
- package/lib/avatar/index.d.ts +1 -1
- package/lib/avatar/index.d.ts.map +1 -1
- package/lib/avatar/index.js +5 -6
- package/lib/avatar/index.js.map +1 -1
- package/lib/avatar/style/index.d.ts +3 -0
- package/lib/avatar/style/index.d.ts.map +1 -0
- package/lib/avatar/style/index.js +4 -0
- package/lib/avatar/style/index.js.map +1 -0
- package/lib/avatar/style/index.less +59 -0
- package/lib/back-top/index.d.ts +1 -1
- package/lib/back-top/index.d.ts.map +1 -1
- package/lib/back-top/index.js +5 -6
- package/lib/back-top/index.js.map +1 -1
- package/lib/back-top/style/index.d.ts +3 -0
- package/lib/back-top/style/index.d.ts.map +1 -0
- package/lib/back-top/style/index.js +4 -0
- package/lib/back-top/style/index.js.map +1 -0
- package/lib/back-top/style/index.less +42 -0
- package/lib/back-top/style/responsive.less +11 -0
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.d.ts.map +1 -1
- package/lib/badge/index.js +5 -6
- package/lib/badge/index.js.map +1 -1
- package/lib/badge/style/index.d.ts +3 -0
- package/lib/badge/style/index.d.ts.map +1 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/index.js.map +1 -0
- package/lib/badge/style/index.less +190 -0
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts.map +1 -1
- package/lib/breadcrumb/index.js +5 -6
- package/lib/breadcrumb/index.js.map +1 -1
- package/lib/breadcrumb/style/index.d.ts +5 -0
- package/lib/breadcrumb/style/index.d.ts.map +1 -0
- package/lib/breadcrumb/style/index.js +6 -0
- package/lib/breadcrumb/style/index.js.map +1 -0
- package/lib/breadcrumb/style/index.less +51 -0
- package/lib/button/button.d.ts +9 -4
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +33 -12
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +72 -0
- package/lib/button/index.d.ts +2 -1
- package/lib/button/index.d.ts.map +1 -1
- package/lib/button/index.js +7 -7
- package/lib/button/index.js.map +1 -1
- package/lib/button/style/index.d.ts +3 -0
- package/lib/button/style/index.d.ts.map +1 -0
- package/lib/button/style/index.js +4 -0
- package/lib/button/style/index.js.map +1 -0
- package/lib/button/style/index.less +224 -0
- package/lib/button/style/mixin.less +357 -0
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar/index.d.ts.map +1 -1
- package/lib/calendar/index.js +5 -6
- package/lib/calendar/index.js.map +1 -1
- package/lib/calendar/style/index.d.ts +5 -0
- package/lib/calendar/style/index.d.ts.map +1 -0
- package/lib/calendar/style/index.js +6 -0
- package/lib/calendar/style/index.js.map +1 -0
- package/lib/calendar/style/index.less +278 -0
- package/lib/card/card.js +5 -8
- package/lib/card/index.d.ts +1 -1
- package/lib/card/index.d.ts.map +1 -1
- package/lib/card/index.js +2 -3
- package/lib/card/index.js.map +1 -1
- package/lib/card/style/index.d.ts +6 -0
- package/lib/card/style/index.d.ts.map +1 -0
- package/lib/card/style/index.js +7 -0
- package/lib/card/style/index.js.map +1 -0
- package/lib/card/style/index.less +263 -0
- package/lib/card/style/size.less +25 -0
- package/lib/carousel/index.d.ts +1 -1
- package/lib/carousel/index.d.ts.map +1 -1
- package/lib/carousel/index.js +5 -6
- package/lib/carousel/index.js.map +1 -1
- package/lib/carousel/style/index.d.ts +3 -0
- package/lib/carousel/style/index.d.ts.map +1 -0
- package/lib/carousel/style/index.js +4 -0
- package/lib/carousel/style/index.js.map +1 -0
- package/lib/carousel/style/index.less +238 -0
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/index.d.ts.map +1 -1
- package/lib/cascader/index.js +6 -8
- package/lib/cascader/index.js.map +1 -1
- package/lib/cascader/style/index.d.ts +5 -0
- package/lib/cascader/style/index.d.ts.map +1 -0
- package/lib/cascader/style/index.js +6 -0
- package/lib/cascader/style/index.js.map +1 -0
- package/lib/cascader/style/index.less +227 -0
- package/lib/check-card/group.js +9 -14
- package/lib/check-card/index.js +10 -14
- 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 +4 -4
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +7 -23
- package/lib/checkbox/index.js.map +1 -1
- package/lib/checkbox/style/index.d.ts +3 -0
- package/lib/checkbox/style/index.d.ts.map +1 -0
- package/lib/checkbox/style/index.js +4 -0
- package/lib/checkbox/style/index.js.map +1 -0
- package/lib/checkbox/style/index.less +4 -0
- package/lib/checkbox/style/mixin.less +220 -0
- package/lib/col/index.d.ts +1 -1
- package/lib/col/index.d.ts.map +1 -1
- package/lib/col/index.js +5 -6
- package/lib/col/index.js.map +1 -1
- package/lib/col/style/index.d.ts +3 -0
- package/lib/col/style/index.d.ts.map +1 -0
- package/lib/col/style/index.js +4 -0
- package/lib/col/style/index.js.map +1 -0
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse/index.d.ts.map +1 -1
- package/lib/collapse/index.js +5 -6
- package/lib/collapse/index.js.map +1 -1
- package/lib/collapse/style/index.d.ts +3 -0
- package/lib/collapse/style/index.d.ts.map +1 -0
- package/lib/collapse/style/index.js +4 -0
- package/lib/collapse/style/index.js.map +1 -0
- package/lib/collapse/style/index.less +134 -0
- package/lib/color-picker/ColorPicker.d.ts +4 -2
- package/lib/color-picker/ColorPicker.d.ts.map +1 -1
- package/lib/color-picker/ColorPicker.js +11 -13
- package/lib/color-picker/ColorPicker.js.map +1 -1
- package/lib/color-picker/index.d.ts +2 -1
- package/lib/color-picker/index.d.ts.map +1 -1
- package/lib/color-picker/index.less +25 -8
- package/lib/columns/index.d.ts +3 -2
- package/lib/columns/index.d.ts.map +1 -1
- package/lib/columns/index.js +3 -7
- package/lib/comment/index.d.ts +1 -1
- package/lib/comment/index.d.ts.map +1 -1
- package/lib/comment/index.js +5 -6
- package/lib/comment/index.js.map +1 -1
- package/lib/comment/style/index.d.ts +3 -0
- package/lib/comment/style/index.d.ts.map +1 -0
- package/lib/comment/style/index.js +4 -0
- package/lib/comment/style/index.js.map +1 -0
- package/lib/comment/style/index.less +93 -0
- package/lib/config-provider/DisabledContext.js +5 -7
- package/lib/config-provider/SizeContext.js +5 -7
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.d.ts.map +1 -1
- package/lib/config-provider/index.js +5 -6
- package/lib/config-provider/index.js.map +1 -1
- package/lib/config-provider/style/index.d.ts +2 -0
- package/lib/config-provider/style/index.d.ts.map +1 -0
- package/lib/config-provider/style/index.js +3 -0
- package/lib/config-provider/style/index.js.map +1 -0
- package/lib/config-provider/style/index.less +2 -0
- package/lib/connect/index.js +5 -11
- 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 +3 -7
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +8 -41
- package/lib/date-picker/index.js.map +1 -1
- package/lib/date-picker/index.less +294 -0
- package/lib/date-picker/style/Calendar.less +402 -0
- package/lib/date-picker/style/DecadePanel.less +81 -0
- package/lib/date-picker/style/MonthPanel.less +86 -0
- package/lib/date-picker/style/MonthPicker.less +11 -0
- package/lib/date-picker/style/Picker.less +113 -0
- package/lib/date-picker/style/RangePicker.less +248 -0
- package/lib/date-picker/style/TimePicker.less +151 -0
- package/lib/date-picker/style/WeekPicker.less +21 -0
- package/lib/date-picker/style/YearPanel.less +85 -0
- package/lib/date-picker/style/index.d.ts +6 -0
- package/lib/date-picker/style/index.d.ts.map +1 -0
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/style/index.js.map +1 -0
- package/lib/date-picker/style/index.less +17 -0
- package/lib/descriptions/descriptions.d.ts +17 -6
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +87 -34
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +107 -22
- package/lib/descriptions/index.d.ts +2 -2
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +8 -9
- package/lib/descriptions/index.js.map +1 -1
- package/lib/descriptions/style/index.d.ts +3 -0
- package/lib/descriptions/style/index.d.ts.map +1 -0
- package/lib/descriptions/style/index.js +4 -0
- package/lib/descriptions/style/index.js.map +1 -0
- package/lib/descriptions/style/index.less +144 -0
- package/lib/development-login/LoginModal.d.ts +2 -1
- package/lib/development-login/LoginModal.d.ts.map +1 -1
- package/lib/development-login/LoginModal.js +9 -10
- package/lib/development-login/index.d.ts +2 -1
- package/lib/development-login/index.d.ts.map +1 -1
- package/lib/development-login/index.js +9 -8
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.d.ts.map +1 -1
- package/lib/divider/index.js +5 -6
- package/lib/divider/index.js.map +1 -1
- package/lib/divider/style/index.d.ts +3 -0
- package/lib/divider/style/index.d.ts.map +1 -0
- package/lib/divider/style/index.js +4 -0
- package/lib/divider/style/index.js.map +1 -0
- package/lib/divider/style/index.less +109 -0
- package/lib/drawer/drawer.d.ts +22 -2
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +110 -22
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.d.ts +2 -2
- package/lib/drawer/index.d.ts.map +1 -1
- package/lib/drawer/index.js +7 -8
- package/lib/drawer/index.js.map +1 -1
- package/lib/drawer/index.less +154 -0
- package/lib/drawer/style/drawer.less +245 -0
- package/lib/drawer/style/index.d.ts +4 -0
- package/lib/drawer/style/index.d.ts.map +1 -0
- package/lib/drawer/style/index.js +5 -0
- package/lib/drawer/style/index.js.map +1 -0
- package/lib/drawer/style/index.less +3 -0
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/dropdown/index.d.ts.map +1 -1
- package/lib/dropdown/index.js +5 -6
- package/lib/dropdown/index.js.map +1 -1
- package/lib/dropdown/style/index.d.ts +4 -0
- package/lib/dropdown/style/index.d.ts.map +1 -0
- package/lib/dropdown/style/index.js +5 -0
- package/lib/dropdown/style/index.js.map +1 -0
- package/lib/dropdown/style/index.less +282 -0
- package/lib/ellipsis/Svg/CopySVG.d.ts +2 -1
- package/lib/ellipsis/Svg/CopySVG.d.ts.map +1 -1
- package/lib/ellipsis/Svg/CopySVG.js +2 -3
- package/lib/ellipsis/Svg/TickSVG.d.ts +2 -1
- package/lib/ellipsis/Svg/TickSVG.d.ts.map +1 -1
- package/lib/ellipsis/Svg/TickSVG.js +2 -3
- package/lib/ellipsis/index.d.ts +2 -1
- package/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +12 -9
- package/lib/empty/empty.d.ts +2 -2
- package/lib/empty/empty.d.ts.map +1 -1
- package/lib/empty/empty.js +8 -12
- package/lib/empty/empty.stories.js +2 -4
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.d.ts.map +1 -1
- package/lib/empty/index.js +2 -3
- package/lib/empty/index.js.map +1 -1
- package/lib/empty/style/index.d.ts +3 -0
- package/lib/empty/style/index.d.ts.map +1 -0
- package/lib/empty/style/index.js +4 -0
- package/lib/empty/style/index.js.map +1 -0
- package/lib/empty/style/index.less +52 -0
- package/lib/exception/exception.js +1 -2
- package/lib/exception/index.js +1 -2
- package/lib/form/form.d.ts +1 -0
- package/lib/form/form.d.ts.map +1 -1
- package/lib/form/form.js +11 -10
- package/lib/form/form.js.map +1 -1
- package/lib/form/form.less +36 -0
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.d.ts.map +1 -1
- package/lib/form/index.js +2 -3
- package/lib/form/index.js.map +1 -1
- package/lib/form/style/index.d.ts +4 -0
- package/lib/form/style/index.d.ts.map +1 -0
- package/lib/form/style/index.js +5 -0
- package/lib/form/style/index.js.map +1 -0
- package/lib/form/style/index.less +653 -0
- package/lib/form/style/mixin.less +126 -0
- package/lib/grid/index.d.ts +3 -10
- package/lib/grid/index.d.ts.map +1 -1
- package/lib/grid/index.js +17 -24
- package/lib/grid/index.js.map +1 -1
- package/lib/grid/style/index.d.ts +1 -0
- package/lib/grid/style/index.d.ts.map +1 -1
- package/lib/grid/style/index.js +1 -0
- package/lib/grid/style/index.js.map +1 -1
- package/lib/grid/style/index.less +24 -26
- package/lib/grid/style/mixin.less +63 -19
- package/lib/grid-v4/RowContext.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/RowContext.js +1 -2
- package/lib/grid-v4/RowContext.js.map +1 -0
- package/lib/grid-v4/col.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/col.js +9 -14
- package/lib/grid-v4/col.js.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/hooks/useBreakpoint.js +1 -2
- package/lib/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid-v4/index.d.ts +12 -0
- package/lib/grid-v4/index.d.ts.map +1 -0
- package/lib/grid-v4/index.js +30 -0
- package/lib/grid-v4/index.js.map +1 -0
- package/lib/grid-v4/row.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/row.js +10 -14
- package/lib/grid-v4/row.js.map +1 -0
- package/lib/grid-v4/style/index.d.ts +2 -0
- package/lib/grid-v4/style/index.d.ts.map +1 -0
- package/lib/grid-v4/style/index.js +3 -0
- package/lib/grid-v4/style/index.js.map +1 -0
- package/lib/grid-v4/style/index.less +124 -0
- package/lib/grid-v4/style/mixin.less +57 -0
- package/lib/handle/index.d.ts +2 -1
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +6 -9
- package/lib/icon/IconFont.js +4 -6
- package/lib/icon/components/Icon.js +16 -22
- package/lib/icon/components/utils.js +7 -9
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.d.ts.map +1 -1
- package/lib/icon/index.js +10 -13
- package/lib/icon/index.js.map +1 -1
- package/lib/icon/style/index.d.ts +3 -0
- package/lib/icon/style/index.d.ts.map +1 -0
- package/lib/icon/style/index.js +4 -0
- package/lib/icon/style/index.js.map +1 -0
- package/lib/icon/style/index.less +4 -0
- package/lib/icon/style/style.less +4 -0
- package/lib/icon/utils.js +1 -2
- package/lib/icon-list/index.js +1 -2
- package/lib/icon-old/index.d.ts +5 -0
- package/lib/icon-old/index.d.ts.map +1 -0
- package/lib/icon-old/index.js +24 -0
- package/lib/icon-old/index.js.map +1 -0
- package/lib/icon-old/style/index.d.ts +3 -0
- package/lib/icon-old/style/index.d.ts.map +1 -0
- package/lib/icon-old/style/index.js +4 -0
- package/lib/icon-old/style/index.js.map +1 -0
- package/lib/icon-old/style/index.less +4 -0
- package/lib/img/Contain.d.ts +2 -1
- package/lib/img/Contain.d.ts.map +1 -1
- package/lib/img/Contain.js +3 -6
- package/lib/img/Cover.d.ts +2 -1
- package/lib/img/Cover.d.ts.map +1 -1
- package/lib/img/Cover.js +8 -11
- package/lib/img/index.d.ts +2 -1
- package/lib/img/index.d.ts.map +1 -1
- package/lib/img/index.js +8 -11
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -3
- package/lib/index.js.map +1 -1
- package/lib/input/index.d.ts +2 -2
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +7 -8
- 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 +19 -32
- package/lib/input/input.js.map +1 -1
- package/lib/input/input.less +123 -20
- package/lib/input/style/index.d.ts +4 -0
- package/lib/input/style/index.d.ts.map +1 -0
- package/lib/input/style/index.js +5 -0
- package/lib/input/style/index.js.map +1 -0
- package/lib/input/style/index.less +57 -0
- package/lib/input/style/mixin.less +449 -0
- package/lib/input/style/search-input.less +34 -0
- package/lib/input-number/index.d.ts +5 -9
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +7 -10
- 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/input-number/style/index.d.ts +3 -0
- package/lib/input-number/style/index.d.ts.map +1 -0
- package/lib/input-number/style/index.js +4 -0
- package/lib/input-number/style/index.js.map +1 -0
- package/lib/input-number/style/index.less +179 -0
- package/lib/label/index.d.ts +2 -2
- package/lib/label/index.d.ts.map +1 -1
- package/lib/label/index.js +10 -17
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/index.d.ts.map +1 -1
- package/lib/layout/index.js +5 -6
- package/lib/layout/index.js.map +1 -1
- package/lib/layout/style/index.d.ts +3 -0
- package/lib/layout/style/index.d.ts.map +1 -0
- package/lib/layout/style/index.js +4 -0
- package/lib/layout/style/index.js.map +1 -0
- package/lib/layout/style/index.less +124 -0
- package/lib/layout/style/light.less +15 -0
- package/lib/list/index.d.ts +1 -1
- package/lib/list/index.d.ts.map +1 -1
- package/lib/list/index.js +5 -6
- package/lib/list/index.js.map +1 -1
- package/lib/list/style/bordered.less +41 -0
- package/lib/list/style/index.d.ts +7 -0
- package/lib/list/style/index.d.ts.map +1 -0
- package/lib/list/style/index.js +8 -0
- package/lib/list/style/index.js.map +1 -0
- package/lib/list/style/index.less +234 -0
- package/lib/list/style/responsive.less +40 -0
- package/lib/loading-button/index.d.ts +2 -1
- package/lib/loading-button/index.d.ts.map +1 -1
- package/lib/loading-button/index.js +8 -11
- package/lib/locale/default.d.ts +11 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -2
- 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 +13 -3
- 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 +13 -3
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/locale-provider/index.d.ts +1 -1
- package/lib/locale-provider/index.d.ts.map +1 -1
- package/lib/locale-provider/index.js +5 -6
- package/lib/locale-provider/index.js.map +1 -1
- package/lib/locale-provider/style/index.d.ts +2 -0
- package/lib/locale-provider/style/index.d.ts.map +1 -0
- package/lib/locale-provider/style/index.js +3 -0
- package/lib/locale-provider/style/index.js.map +1 -0
- package/lib/locale-provider/style/index.less +2 -0
- package/lib/mentions/index.d.ts +1 -1
- package/lib/mentions/index.d.ts.map +1 -1
- package/lib/mentions/index.js +5 -6
- package/lib/mentions/index.js.map +1 -1
- package/lib/mentions/style/index.d.ts +4 -0
- package/lib/mentions/style/index.d.ts.map +1 -0
- package/lib/mentions/style/index.js +5 -0
- package/lib/mentions/style/index.js.map +1 -0
- package/lib/mentions/style/index.less +164 -0
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/index.d.ts.map +1 -1
- package/lib/menu/index.js +5 -6
- package/lib/menu/index.js.map +1 -1
- package/lib/menu/style/dark.less +139 -0
- package/lib/menu/style/index.d.ts +4 -0
- package/lib/menu/style/index.d.ts.map +1 -0
- package/lib/menu/style/index.js +5 -0
- package/lib/menu/style/index.js.map +1 -0
- package/lib/menu/style/index.less +515 -0
- package/lib/message/index.d.ts +1 -1
- package/lib/message/index.d.ts.map +1 -1
- package/lib/message/index.js +5 -6
- package/lib/message/index.js.map +1 -1
- package/lib/message/message.less +2 -1
- package/lib/message/style/index.d.ts +3 -0
- package/lib/message/style/index.d.ts.map +1 -0
- package/lib/message/style/index.js +4 -0
- package/lib/message/style/index.js.map +1 -0
- package/lib/message/style/index.less +75 -0
- package/lib/modal/index.d.ts +1 -2
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +4 -6
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/index.less +36 -0
- package/lib/modal/modal.d.ts +1 -1
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +133 -19
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/confirm.less +96 -0
- package/lib/modal/style/index.d.ts +5 -0
- package/lib/modal/style/index.d.ts.map +1 -0
- package/lib/modal/style/index.js +6 -0
- package/lib/modal/style/index.js.map +1 -0
- package/lib/modal/style/index.less +4 -0
- package/lib/modal/style/modal.less +165 -0
- 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 +2 -2
- package/lib/notification/index.d.ts.map +1 -1
- package/lib/notification/index.js +8 -10
- 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.d.ts +3 -0
- package/lib/notification/style/index.d.ts.map +1 -0
- package/lib/notification/style/index.js +4 -0
- package/lib/notification/style/index.js.map +1 -0
- package/lib/notification/style/index.less +201 -0
- package/lib/page/Box.d.ts +2 -1
- package/lib/page/Box.d.ts.map +1 -1
- package/lib/page/Box.js +2 -5
- package/lib/page/index.d.ts +2 -1
- package/lib/page/index.d.ts.map +1 -1
- package/lib/page/index.js +7 -12
- package/lib/page/utils.js +4 -7
- package/lib/page-header/index.d.ts +1 -1
- package/lib/page-header/index.d.ts.map +1 -1
- package/lib/page-header/index.js +5 -6
- package/lib/page-header/index.js.map +1 -1
- package/lib/page-header/style/index.d.ts +4 -0
- package/lib/page-header/style/index.d.ts.map +1 -0
- package/lib/page-header/style/index.js +5 -0
- package/lib/page-header/style/index.js.map +1 -0
- package/lib/page-header/style/index.less +119 -0
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/index.d.ts.map +1 -1
- package/lib/pagination/index.js +5 -6
- package/lib/pagination/index.js.map +1 -1
- package/lib/pagination/style/index.d.ts +4 -0
- package/lib/pagination/style/index.d.ts.map +1 -0
- package/lib/pagination/style/index.js +5 -0
- package/lib/pagination/style/index.js.map +1 -0
- package/lib/pagination/style/index.less +400 -0
- package/lib/popconfirm/index.d.ts +3 -3
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +6 -7
- 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 +5 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -0
- package/lib/popconfirm/style/index.js +6 -0
- package/lib/popconfirm/style/index.js.map +1 -0
- package/lib/popover/index.d.ts +3 -3
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +6 -7
- 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 +4 -0
- package/lib/popover/style/index.d.ts.map +1 -0
- package/lib/popover/style/index.js +5 -0
- package/lib/popover/style/index.js.map +1 -0
- package/lib/popover/style/index.less +205 -0
- package/lib/prev-locale.js +6 -11
- 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 +5 -7
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +3 -3
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +6 -7
- 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/progress/style/index.d.ts +3 -0
- package/lib/progress/style/index.d.ts.map +1 -0
- package/lib/progress/style/index.js +4 -0
- package/lib/progress/style/index.js.map +1 -0
- package/lib/progress/style/index.less +182 -0
- package/lib/query-form/Field/Checkbox.d.ts +2 -1
- package/lib/query-form/Field/Checkbox.d.ts.map +1 -1
- package/lib/query-form/Field/Checkbox.js +3 -6
- 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/Field/Select.d.ts +2 -1
- package/lib/query-form/Field/Select.d.ts.map +1 -1
- package/lib/query-form/Field/Select.js +10 -13
- package/lib/query-form/Field/SelectInput.d.ts +2 -1
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +10 -13
- package/lib/query-form/Field/fieldsMap.js +4 -7
- package/lib/query-form/Field/index.d.ts +1 -1
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +19 -24
- package/lib/query-form/createActions.js +2 -3
- package/lib/query-form/index.d.ts +5 -8
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +156 -171
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +12 -9
- package/lib/query-list-scene/List.d.ts +1 -1
- package/lib/query-list-scene/List.d.ts.map +1 -1
- package/lib/query-list-scene/List.js +24 -29
- package/lib/query-list-scene/QueryForm.d.ts +1 -1
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryForm.js +17 -22
- package/lib/query-list-scene/QueryListScene.d.ts +1 -1
- package/lib/query-list-scene/QueryListScene.d.ts.map +1 -1
- package/lib/query-list-scene/QueryListScene.js +14 -18
- package/lib/query-list-scene/Title.d.ts +2 -1
- package/lib/query-list-scene/Title.d.ts.map +1 -1
- package/lib/query-list-scene/Title.js +2 -3
- package/lib/query-list-scene/Toolbar.d.ts +2 -1
- package/lib/query-list-scene/Toolbar.d.ts.map +1 -1
- package/lib/query-list-scene/Toolbar.js +6 -9
- package/lib/query-list-scene/createActions.js +2 -3
- package/lib/query-list-scene/index.js +4 -8
- package/lib/query-list-scene/index.less +4 -4
- package/lib/radio/index.d.ts +4 -3
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +7 -11
- 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/radio/style/index.d.ts +3 -0
- package/lib/radio/style/index.d.ts.map +1 -0
- package/lib/radio/style/index.js +4 -0
- package/lib/radio/style/index.js.map +1 -0
- package/lib/radio/style/index.less +327 -0
- package/lib/rate/index.d.ts +1 -1
- package/lib/rate/index.d.ts.map +1 -1
- package/lib/rate/index.js +5 -6
- package/lib/rate/index.js.map +1 -1
- package/lib/rate/style/index.d.ts +4 -0
- package/lib/rate/style/index.d.ts.map +1 -0
- package/lib/rate/style/index.js +5 -0
- package/lib/rate/style/index.js.map +1 -0
- package/lib/rate/style/index.less +85 -0
- package/lib/render-empty/index.js +1 -2
- package/lib/render-empty/render-empty.js +2 -3
- package/lib/result/index.d.ts +1 -1
- package/lib/result/index.d.ts.map +1 -1
- package/lib/result/index.js +5 -6
- package/lib/result/index.js.map +1 -1
- package/lib/result/style/index.d.ts +3 -0
- package/lib/result/style/index.d.ts.map +1 -0
- package/lib/result/style/index.js +4 -0
- package/lib/result/style/index.js.map +1 -0
- package/lib/result/style/index.less +71 -0
- package/lib/row/index.d.ts +1 -1
- package/lib/row/index.d.ts.map +1 -1
- package/lib/row/index.js +5 -6
- package/lib/row/index.js.map +1 -1
- package/lib/row/style/index.d.ts +3 -0
- package/lib/row/style/index.d.ts.map +1 -0
- package/lib/row/style/index.js +4 -0
- package/lib/row/style/index.js.map +1 -0
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.d.ts.map +1 -1
- package/lib/segmented/index.js +8 -12
- package/lib/segmented/index.less +126 -112
- package/lib/select/index.d.ts +2 -2
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +7 -8
- 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 +11 -16
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +83 -9
- package/lib/select/style/index.d.ts +4 -0
- package/lib/select/style/index.d.ts.map +1 -0
- package/lib/select/style/index.js +5 -0
- package/lib/select/style/index.js.map +1 -0
- package/lib/select/style/index.less +604 -0
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.d.ts.map +1 -1
- package/lib/skeleton/index.js +5 -6
- package/lib/skeleton/index.js.map +1 -1
- package/lib/skeleton/style/index.d.ts +3 -0
- package/lib/skeleton/style/index.d.ts.map +1 -0
- package/lib/skeleton/style/index.js +4 -0
- package/lib/skeleton/style/index.js.map +1 -0
- package/lib/skeleton/style/index.less +130 -0
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.d.ts.map +1 -1
- package/lib/slider/index.js +5 -6
- package/lib/slider/index.js.map +1 -1
- package/lib/slider/style/index.d.ts +4 -0
- package/lib/slider/style/index.d.ts.map +1 -0
- package/lib/slider/style/index.js +5 -0
- package/lib/slider/style/index.js.map +1 -0
- package/lib/slider/style/index.less +197 -0
- package/lib/spin/index.d.ts +1 -1
- package/lib/spin/index.d.ts.map +1 -1
- package/lib/spin/index.js +5 -6
- package/lib/spin/index.js.map +1 -1
- package/lib/spin/style/index.d.ts +3 -0
- package/lib/spin/style/index.d.ts.map +1 -0
- package/lib/spin/style/index.js +4 -0
- package/lib/spin/style/index.js.map +1 -0
- package/lib/spin/style/index.less +214 -0
- package/lib/statistic/index.d.ts +1 -1
- package/lib/statistic/index.d.ts.map +1 -1
- package/lib/statistic/index.js +5 -6
- package/lib/statistic/index.js.map +1 -1
- package/lib/statistic/style/index.d.ts +3 -0
- package/lib/statistic/style/index.d.ts.map +1 -0
- package/lib/statistic/style/index.js +4 -0
- package/lib/statistic/style/index.js.map +1 -0
- package/lib/statistic/style/index.less +40 -0
- 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 +2 -2
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +11 -4
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/index.less +177 -0
- package/lib/steps/stepStyle/nav.less +73 -0
- 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 +56 -31
- package/lib/steps/steps.js.map +1 -1
- package/lib/steps/style/compatibility.less +50 -0
- package/lib/steps/style/custom-icon.less +31 -0
- package/lib/steps/style/index.d.ts +3 -0
- package/lib/steps/style/index.d.ts.map +1 -0
- package/lib/steps/style/index.js +4 -0
- package/lib/steps/style/index.js.map +1 -0
- package/lib/steps/style/index.less +241 -6
- package/lib/steps/style/label-placement.less +38 -0
- package/lib/steps/style/nav.less +96 -247
- package/lib/steps/style/progress-dot.less +80 -0
- package/lib/steps/style/small.less +43 -3
- package/lib/steps/style/vertical.less +74 -0
- package/lib/style/color/bezierEasing.less +110 -0
- package/lib/style/color/colorPalette.less +75 -0
- package/lib/style/color/colors.less +149 -0
- package/lib/style/color/tinyColor.less +1184 -0
- package/lib/style/core/base.less +510 -0
- package/lib/style/core/iconfont.less +19 -0
- package/lib/style/core/index.less +4 -0
- package/lib/style/core/motion/fade.less +31 -0
- package/lib/style/core/motion/move.less +120 -0
- package/lib/style/core/motion/other.less +40 -0
- package/lib/style/core/motion/slide.less +120 -0
- package/lib/style/core/motion/swing.less +34 -0
- package/lib/style/core/motion/zoom.less +162 -0
- package/lib/style/core/motion.less +20 -0
- package/lib/style/index.d.ts +2 -0
- package/lib/style/index.d.ts.map +1 -0
- package/lib/style/index.js +3 -0
- package/lib/style/index.js.map +1 -0
- package/lib/style/index.less +2 -0
- package/lib/style/mixins/clearfix.less +13 -0
- package/lib/style/mixins/compatibility.less +22 -0
- package/lib/style/mixins/iconfont.less +43 -0
- package/lib/style/mixins/index.less +10 -0
- package/lib/style/mixins/motion.less +35 -0
- package/lib/style/mixins/operation-unit.less +18 -0
- package/lib/style/mixins/reset.less +13 -0
- package/lib/style/mixins/size.less +10 -0
- package/lib/style/mixins/typography.less +49 -0
- package/lib/style/themes/default.less +700 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/v2-compatible-reset.d.ts +2 -0
- package/lib/style/v2-compatible-reset.d.ts.map +1 -0
- package/lib/style/v2-compatible-reset.js +3 -0
- package/lib/style/v2-compatible-reset.js.map +1 -0
- package/lib/style/v2-compatible-reset.less +51 -0
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-403.js +4 -5
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-404.js +4 -5
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-500.js +4 -5
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-empty.js +4 -5
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-failure.js +4 -5
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.js +4 -5
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.js +4 -5
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.js +4 -5
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-offline.js +4 -5
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/svg-components/illustration-success.js +4 -5
- package/lib/switch/index.js +4 -5
- package/lib/switch/index.less +46 -0
- package/lib/switch/style/index.d.ts +4 -0
- package/lib/switch/style/index.d.ts.map +1 -0
- package/lib/switch/style/index.js +5 -0
- package/lib/switch/style/index.js.map +1 -0
- package/lib/switch/style/index.less +178 -0
- package/lib/switch/switch.d.ts +9 -1
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +45 -12
- 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-background.js +4 -5
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/assets/image-loading.js +4 -5
- package/lib/table/constants.js +1 -2
- package/lib/table/context.js +1 -2
- package/lib/table/hooks/use-column-setting.js +4 -5
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +2 -3
- package/lib/table/index.js.map +1 -1
- package/lib/table/style/index.d.ts +9 -0
- package/lib/table/style/index.d.ts.map +1 -0
- package/lib/table/style/index.js +10 -0
- package/lib/table/style/index.js.map +1 -0
- package/lib/table/style/index.less +844 -0
- package/lib/table/style/size.less +179 -0
- package/lib/table/table.d.ts +3 -2
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +44 -18
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +33 -5
- package/lib/table/table.stories.js +5 -10
- package/lib/table/total-shower.d.ts +2 -2
- package/lib/table/total-shower.d.ts.map +1 -1
- package/lib/table/total-shower.js +2 -3
- package/lib/tabs/index.d.ts +2 -1
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +7 -7
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/style/card-style.less +186 -0
- package/lib/tabs/style/index.d.ts +3 -0
- package/lib/tabs/style/index.d.ts.map +1 -0
- package/lib/tabs/style/index.js +4 -0
- package/lib/tabs/style/index.js.map +1 -0
- package/lib/tabs/style/index.less +437 -0
- package/lib/tabs/tabs.d.ts +3 -2
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +28 -10
- 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 +4 -3
- package/lib/tag/index.d.ts.map +1 -1
- package/lib/tag/index.js +15 -10
- package/lib/tag/index.js.map +1 -1
- package/lib/tag/style/index.d.ts +3 -0
- package/lib/tag/style/index.d.ts.map +1 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/index.js.map +1 -0
- package/lib/tag/style/index.less +106 -0
- 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 +8 -7
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +5 -19
- package/lib/time-picker/index.js.map +1 -1
- package/lib/time-picker/index.less +38 -0
- package/lib/time-picker/style/index.d.ts +3 -0
- package/lib/time-picker/style/index.d.ts.map +1 -0
- package/lib/time-picker/style/index.js +4 -0
- package/lib/time-picker/style/index.js.map +1 -0
- package/lib/time-picker/style/index.less +246 -0
- package/lib/timeline/index.d.ts +1 -1
- package/lib/timeline/index.d.ts.map +1 -1
- package/lib/timeline/index.js +5 -6
- package/lib/timeline/index.js.map +1 -1
- package/lib/timeline/style/index.d.ts +3 -0
- package/lib/timeline/style/index.d.ts.map +1 -0
- package/lib/timeline/style/index.js +4 -0
- package/lib/timeline/style/index.js.map +1 -0
- package/lib/timeline/style/index.less +167 -0
- package/lib/title/index.d.ts +1 -1
- package/lib/title/index.js +3 -6
- 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 +6 -0
- package/lib/tntd-action/index.d.ts.map +1 -0
- package/lib/tntd-action/index.js +83 -0
- package/lib/tntd-action/index.js.map +1 -0
- package/lib/tntd-action/index.less +36 -0
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +5 -7
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +4 -5
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +4 -5
- package/lib/tntd-cascader/AntdCascader/component/context.js +3 -6
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.d.ts +2 -2
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.d.ts.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +4 -5
- package/lib/tntd-cascader/AntdCascader/component/getIcons.d.ts +2 -2
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +9 -12
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/config/utils.js +8 -12
- package/lib/tntd-cascader/AntdCascader/config/warning.js +4 -5
- package/lib/tntd-cascader/AntdCascader/index.js +13 -16
- package/lib/tntd-cascader/AntdCascader/index.less +28 -27
- package/lib/tntd-cascader/AntdCascader/interface.js +1 -2
- package/lib/tntd-cascader/rc-cascader/Cascader.js +7 -10
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.d.ts +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.d.ts.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +6 -7
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.d.ts.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +8 -10
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +14 -17
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +8 -10
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +11 -13
- package/lib/tntd-cascader/rc-cascader/context.js +4 -5
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +6 -7
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -6
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +5 -6
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +3 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +10 -13
- package/lib/tntd-cascader/rc-cascader/index.js +1 -2
- package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +3 -6
- package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +2 -2
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +1 -2
- package/lib/tntd-form/ErrorList.d.ts +1 -1
- package/lib/tntd-form/ErrorList.d.ts.map +1 -1
- package/lib/tntd-form/ErrorList.js +6 -6
- package/lib/tntd-form/Form.d.ts +1 -1
- package/lib/tntd-form/Form.d.ts.map +1 -1
- package/lib/tntd-form/Form.js +15 -18
- package/lib/tntd-form/Form.js.map +1 -1
- package/lib/tntd-form/FormItem/ItemHolder.d.ts +1 -1
- package/lib/tntd-form/FormItem/ItemHolder.d.ts.map +1 -1
- package/lib/tntd-form/FormItem/ItemHolder.js +11 -14
- package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/lib/tntd-form/FormItem/index.js +14 -14
- package/lib/tntd-form/FormItemInput.d.ts +1 -1
- package/lib/tntd-form/FormItemInput.d.ts.map +1 -1
- package/lib/tntd-form/FormItemInput.js +5 -6
- package/lib/tntd-form/FormItemInput.js.map +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts.map +1 -1
- package/lib/tntd-form/FormItemLabel.js +9 -13
- package/lib/tntd-form/FormItemLabel.js.map +1 -1
- package/lib/tntd-form/FormList.js +5 -8
- package/lib/tntd-form/context.d.ts +1 -1
- package/lib/tntd-form/context.d.ts.map +1 -1
- package/lib/tntd-form/context.js +14 -19
- package/lib/tntd-form/context.js.map +1 -1
- package/lib/tntd-form/hooks/useDebounce.js +5 -5
- package/lib/tntd-form/hooks/useForm.js +5 -5
- package/lib/tntd-form/hooks/useFormItemStatus.js +1 -2
- package/lib/tntd-form/hooks/useFrameState.js +10 -9
- package/lib/tntd-form/hooks/useItemRef.js +3 -3
- package/lib/tntd-form/index.js +4 -5
- package/lib/tntd-form/style/index.d.ts +1 -1
- package/lib/tntd-form/style/index.d.ts.map +1 -1
- package/lib/tntd-form/style/index.js +1 -1
- package/lib/tntd-form/style/index.js.map +1 -1
- package/lib/tntd-form/style/index.less +1 -1
- package/lib/tntd-form/style/rtl.less +3 -3
- package/lib/tntd-form/validateMessagesContext.js +1 -2
- package/lib/tntd-icon/index.d.ts +2 -1
- package/lib/tntd-icon/index.d.ts.map +1 -1
- package/lib/tntd-icon/index.js +3 -6
- package/lib/tntd-layout/ActionsContext.js +1 -2
- package/lib/tntd-layout/AppList.js +7 -8
- package/lib/tntd-layout/Application.d.ts +2 -1
- package/lib/tntd-layout/Application.d.ts.map +1 -1
- package/lib/tntd-layout/Application.js +7 -8
- package/lib/tntd-layout/Avatar.d.ts +2 -1
- package/lib/tntd-layout/Avatar.d.ts.map +1 -1
- package/lib/tntd-layout/Avatar.js +5 -6
- package/lib/tntd-layout/CompatibleLanguage.d.ts +2 -1
- package/lib/tntd-layout/CompatibleLanguage.d.ts.map +1 -1
- package/lib/tntd-layout/CompatibleLanguage.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/Avatar.d.ts +2 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.d.ts.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +5 -6
- package/lib/tntd-layout/EnterpriseLayout/Language.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/Theme.d.ts +2 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.d.ts.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/index.js +2 -3
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.d.ts +2 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.d.ts.map +1 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +7 -8
- package/lib/tntd-layout/GlobalNavigation/index.js +7 -8
- package/lib/tntd-layout/Header.js +9 -6
- package/lib/tntd-layout/HeaderActions.js +18 -21
- package/lib/tntd-layout/HeaderNavs.js +8 -12
- package/lib/tntd-layout/HeaderTabs.js +10 -14
- package/lib/tntd-layout/Iconfont.d.ts +2 -1
- package/lib/tntd-layout/Iconfont.d.ts.map +1 -1
- package/lib/tntd-layout/Iconfont.js +2 -3
- package/lib/tntd-layout/Language.js +7 -8
- package/lib/tntd-layout/Layout.js +7 -8
- package/lib/tntd-layout/Logo.js +9 -6
- package/lib/tntd-layout/OrgAppList.js +7 -8
- package/lib/tntd-layout/SideMenu.js +8 -11
- package/lib/tntd-layout/Theme.d.ts +2 -1
- package/lib/tntd-layout/Theme.d.ts.map +1 -1
- package/lib/tntd-layout/Theme.js +7 -8
- package/lib/tntd-layout/createActions.js +2 -3
- package/lib/tntd-layout/images/index.js +4 -7
- package/lib/tntd-layout/index.d.ts +3 -2
- package/lib/tntd-layout/index.d.ts.map +1 -1
- package/lib/tntd-layout/index.js +6 -11
- package/lib/tntd-layout/paaslayout/CompactSideMenu.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +7 -8
- package/lib/tntd-layout/paaslayout/Header.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/Header.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/Header.js +9 -6
- package/lib/tntd-layout/paaslayout/Logo.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/Logo.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/Logo.js +6 -3
- package/lib/tntd-layout/paaslayout/SideMenu.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/SideMenu.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/SideMenu.js +7 -8
- package/lib/tntd-layout/paaslayout/index.js +7 -8
- package/lib/tntd-layout/storage.js +14 -27
- package/lib/tntd-modal/index.d.ts +2 -1
- package/lib/tntd-modal/index.d.ts.map +1 -1
- package/lib/tntd-modal/index.js +11 -15
- package/lib/tntd-rc-select/_util/DisabledContext.js +5 -7
- package/lib/tntd-rc-select/_util/FormItemInputContext.js +4 -5
- package/lib/tntd-rc-select/_util/PurePanel.d.ts +2 -2
- package/lib/tntd-rc-select/_util/PurePanel.d.ts.map +1 -1
- package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
- package/lib/tntd-rc-select/_util/SizeContext.js +4 -5
- package/lib/tntd-rc-select/_util/context.js +3 -6
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.d.ts +2 -2
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.d.ts.map +1 -1
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +4 -5
- package/lib/tntd-rc-select/_util/getIcons.d.ts +2 -2
- package/lib/tntd-rc-select/_util/getIcons.js +3 -3
- package/lib/tntd-rc-select/_util/interface.js +1 -2
- package/lib/tntd-rc-select/_util/motion.js +3 -6
- package/lib/tntd-rc-select/_util/type.js +3 -5
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +9 -12
- package/lib/tntd-rc-select/_util/warning.js +4 -5
- package/lib/tntd-rc-select/index.js +11 -14
- package/lib/tntd-rc-select/style/index.less +844 -740
- package/lib/tntd-select/DropDownWrap.js +16 -19
- package/lib/tntd-select/index.d.ts +1 -1
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js +44 -47
- package/lib/tooltip/index.d.ts +3 -3
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +6 -7
- package/lib/tooltip/index.js.map +1 -1
- package/lib/tooltip/index.less +24 -0
- package/lib/tooltip/style/index.d.ts +4 -0
- package/lib/tooltip/style/index.d.ts.map +1 -0
- package/lib/tooltip/style/index.js +5 -0
- package/lib/tooltip/style/index.js.map +1 -0
- package/lib/tooltip/style/index.less +187 -0
- 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/transfer/index.d.ts +1 -1
- package/lib/transfer/index.d.ts.map +1 -1
- package/lib/transfer/index.js +5 -6
- package/lib/transfer/index.js.map +1 -1
- package/lib/transfer/style/customize.less +62 -0
- package/lib/transfer/style/index.d.ts +7 -0
- package/lib/transfer/style/index.d.ts.map +1 -0
- package/lib/transfer/style/index.js +8 -0
- package/lib/transfer/style/index.js.map +1 -0
- package/lib/transfer/style/index.less +191 -0
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/index.d.ts.map +1 -1
- package/lib/tree/index.js +5 -6
- package/lib/tree/index.js.map +1 -1
- package/lib/tree/style/directory.less +95 -0
- package/lib/tree/style/index.d.ts +3 -0
- package/lib/tree/style/index.d.ts.map +1 -0
- package/lib/tree/style/index.js +4 -0
- package/lib/tree/style/index.js.map +1 -0
- package/lib/tree/style/index.less +280 -0
- package/lib/tree/style/mixin.less +29 -0
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/index.d.ts.map +1 -1
- package/lib/tree-select/index.js +6 -8
- package/lib/tree-select/index.js.map +1 -1
- package/lib/tree-select/style/index.d.ts +5 -0
- package/lib/tree-select/style/index.d.ts.map +1 -0
- package/lib/tree-select/style/index.js +6 -0
- package/lib/tree-select/style/index.js.map +1 -0
- package/lib/tree-select/style/index.less +191 -0
- package/lib/typography/index.d.ts +1 -1
- package/lib/typography/index.d.ts.map +1 -1
- package/lib/typography/index.js +5 -6
- package/lib/typography/index.js.map +1 -1
- package/lib/typography/style/index.d.ts +5 -0
- package/lib/typography/style/index.d.ts.map +1 -0
- package/lib/typography/style/index.js +6 -0
- package/lib/typography/style/index.js.map +1 -0
- package/lib/typography/style/index.less +204 -0
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/index.d.ts.map +1 -1
- package/lib/upload/index.js +5 -6
- package/lib/upload/index.js.map +1 -1
- package/lib/upload/style/index.d.ts +5 -0
- package/lib/upload/style/index.d.ts.map +1 -0
- package/lib/upload/style/index.js +6 -0
- package/lib/upload/style/index.js.map +1 -0
- package/lib/upload/style/index.less +542 -0
- package/lib/utils/checkAuth.js +2 -4
- package/lib/utils/findMenuInfoByPath.js +2 -4
- package/lib/utils/index.js +10 -18
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +14 -13
- package/lib/utils/lang.js.map +1 -1
- package/lib/version/index.d.ts +1 -1
- package/lib/version/index.d.ts.map +1 -1
- package/lib/version/index.js +5 -6
- package/lib/version/index.js.map +1 -1
- package/lib/version/style/index.d.ts +2 -0
- package/lib/version/style/index.d.ts.map +1 -0
- package/lib/version/style/index.js +3 -0
- package/lib/version/style/index.js.map +1 -0
- package/lib/water-mark/index.js +7 -9
- package/package.json +3 -2
- package/themes/common/css2.x.css +154 -0
- package/themes/common/css3.x.css +154 -0
- package/themes/common/index.less +30 -26
- package/themes/default/colors.less +13 -5
- package/themes/default/colorsVar.less +160 -0
- package/themes/default/lessToCssVar.less +127 -0
- package/themes/default/lessVars2.x.less +34 -0
- package/themes/default/lessVars3.x.less +36 -0
- package/themes/default/variables.less +91 -59
- package/themes/default/variablesVar.less +673 -0
- package/themes/utils/colorPalette.less +11 -0
- 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/grid/RowContext.js.map +0 -1
- package/es/grid/col.js.map +0 -1
- package/es/grid/hooks/useBreakpoint.js.map +0 -1
- package/es/grid/row.js.map +0 -1
- package/es/modal/modal.less +0 -37
- package/es/radio/radio-group.js +0 -5
- package/es/radio/radio-group.js.map +0 -1
- 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 -13
- package/lib/checkbox/checkbox-group.js.map +0 -1
- package/lib/drawer/drawer.less +0 -20
- package/lib/grid/RowContext.d.ts.map +0 -1
- package/lib/grid/RowContext.js.map +0 -1
- package/lib/grid/col.d.ts.map +0 -1
- package/lib/grid/col.js.map +0 -1
- package/lib/grid/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/grid/hooks/useBreakpoint.js.map +0 -1
- package/lib/grid/row.d.ts.map +0 -1
- package/lib/modal/modal.less +0 -37
- 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 -13
- package/lib/radio/radio-group.js.map +0 -1
- /package/es/{grid → grid-v4}/RowContext.js +0 -0
- /package/es/{grid → grid-v4}/col.js +0 -0
- /package/es/{grid → grid-v4}/hooks/useBreakpoint.js +0 -0
- /package/es/{grid → grid-v4}/row.js +0 -0
- /package/es/{grid → grid-v4}/style/rtl.less +0 -0
- /package/lib/{grid → grid-v4}/RowContext.d.ts +0 -0
- /package/lib/{grid → grid-v4}/col.d.ts +0 -0
- /package/lib/{grid → grid-v4}/hooks/useBreakpoint.d.ts +0 -0
- /package/lib/{grid → grid-v4}/row.d.ts +0 -0
- /package/lib/{grid → grid-v4}/style/rtl.less +0 -0
package/lib/query-form/index.js
CHANGED
|
@@ -1,63 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
9
|
-
var
|
|
9
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
12
12
|
var _Field = _interopRequireDefault(require("./Field"));
|
|
13
|
+
var _Composition = _interopRequireDefault(require("./Field/Composition"));
|
|
13
14
|
var _useForm = _interopRequireDefault(require("./useForm"));
|
|
14
|
-
var _badge = _interopRequireDefault(require("../badge"));
|
|
15
15
|
var _button = _interopRequireDefault(require("../button"));
|
|
16
|
-
var _drawer = _interopRequireDefault(require("../drawer"));
|
|
17
16
|
var _form = _interopRequireDefault(require("../form"));
|
|
18
17
|
var _prevLocale = require("../prev-locale");
|
|
19
|
-
var _tntdIcon = _interopRequireDefault(require("../tntd-icon"));
|
|
20
18
|
require("./index.less");
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
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); }
|
|
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; }
|
|
23
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
24
22
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
23
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
24
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
27
25
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
28
|
-
function _toPropertyKey(
|
|
29
|
-
function _toPrimitive(
|
|
30
|
-
function
|
|
31
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
33
29
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
34
30
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
-
function _isNativeReflectConstruct() {
|
|
31
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
36
32
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
35
|
var clsPrefix = 'tnt-queryform';
|
|
38
36
|
var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
39
|
-
_inherits(QueryForm, _React$PureComponent);
|
|
40
|
-
var _super = _createSuper(QueryForm);
|
|
41
37
|
function QueryForm(props) {
|
|
42
38
|
var _this;
|
|
43
39
|
_classCallCheck(this, QueryForm);
|
|
44
|
-
_this =
|
|
45
|
-
Object.defineProperty(
|
|
40
|
+
_this = _callSuper(this, QueryForm, [props]);
|
|
41
|
+
Object.defineProperty(_this, "onWindowResize", {
|
|
46
42
|
enumerable: true,
|
|
47
43
|
configurable: true,
|
|
48
44
|
writable: true,
|
|
49
45
|
value: (0, _debounce2["default"])(function () {
|
|
50
|
-
|
|
51
|
-
if (current) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
46
|
+
// const { current } = this.fieldsRef
|
|
47
|
+
// if (current) {
|
|
48
|
+
// setTimeout(() => {
|
|
49
|
+
// this.setState({
|
|
50
|
+
// showMore: this.isFieldsWidthOverflow(),
|
|
51
|
+
// })
|
|
52
|
+
// }, 25)
|
|
53
|
+
// }
|
|
58
54
|
}, 50)
|
|
59
55
|
});
|
|
60
|
-
Object.defineProperty(
|
|
56
|
+
Object.defineProperty(_this, "search", {
|
|
61
57
|
enumerable: true,
|
|
62
58
|
configurable: true,
|
|
63
59
|
writable: true,
|
|
@@ -65,7 +61,7 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
65
61
|
_this.props.onSearch(Object.assign(Object.assign({}, _this.form.getValues()), params));
|
|
66
62
|
}
|
|
67
63
|
});
|
|
68
|
-
Object.defineProperty(
|
|
64
|
+
Object.defineProperty(_this, "onSearch", {
|
|
69
65
|
enumerable: true,
|
|
70
66
|
configurable: true,
|
|
71
67
|
writable: true,
|
|
@@ -74,7 +70,7 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
74
70
|
(_b = (_a = _this.props).onSearch) === null || _b === void 0 ? void 0 : _b.call(_a, _this.form.getValues());
|
|
75
71
|
}
|
|
76
72
|
});
|
|
77
|
-
Object.defineProperty(
|
|
73
|
+
Object.defineProperty(_this, "onReset", {
|
|
78
74
|
enumerable: true,
|
|
79
75
|
configurable: true,
|
|
80
76
|
writable: true,
|
|
@@ -83,33 +79,10 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
79
|
initialValues = _this$props.initialValues,
|
|
84
80
|
onReset = _this$props.onReset;
|
|
85
81
|
_this.form.setValues(Object.assign({}, initialValues));
|
|
86
|
-
_this.updateDrawerFieldsValueCount();
|
|
87
82
|
onReset === null || onReset === void 0 ? void 0 : onReset(initialValues);
|
|
88
83
|
}
|
|
89
84
|
});
|
|
90
|
-
Object.defineProperty(
|
|
91
|
-
enumerable: true,
|
|
92
|
-
configurable: true,
|
|
93
|
-
writable: true,
|
|
94
|
-
value: function value() {
|
|
95
|
-
var _a, _b;
|
|
96
|
-
_this.setState({
|
|
97
|
-
expanded: !_this.state.expanded
|
|
98
|
-
});
|
|
99
|
-
(_b = (_a = _this.props).onToggleExpand) === null || _b === void 0 ? void 0 : _b.call(_a, !_this.state.expanded);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(_assertThisInitialized(_this), "onShowDrawer", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
configurable: true,
|
|
105
|
-
writable: true,
|
|
106
|
-
value: function value() {
|
|
107
|
-
_this.setState({
|
|
108
|
-
drawerVisible: true
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(_assertThisInitialized(_this), "onFieldChange", {
|
|
85
|
+
Object.defineProperty(_this, "onFieldChange", {
|
|
113
86
|
enumerable: true,
|
|
114
87
|
configurable: true,
|
|
115
88
|
writable: true,
|
|
@@ -127,35 +100,43 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
127
100
|
rest[_key - 2] = arguments[_key];
|
|
128
101
|
}
|
|
129
102
|
onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
130
|
-
_this.updateDrawerFieldsValueCount(newValues);
|
|
131
103
|
}
|
|
132
104
|
});
|
|
133
|
-
Object.defineProperty(
|
|
105
|
+
Object.defineProperty(_this, "onCompositionFieldChange", {
|
|
134
106
|
enumerable: true,
|
|
135
107
|
configurable: true,
|
|
136
108
|
writable: true,
|
|
137
|
-
value: function value() {
|
|
109
|
+
value: function value(_value2, deleteKeys) {
|
|
110
|
+
for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
111
|
+
rest[_key2 - 2] = arguments[_key2];
|
|
112
|
+
}
|
|
113
|
+
var _a;
|
|
138
114
|
var values = _this.form.getValues();
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
var _a;
|
|
145
|
-
if (index >= showFieldCount && (values === null || values === void 0 ? void 0 : values[(_a = cur === null || cur === void 0 ? void 0 : cur.props) === null || _a === void 0 ? void 0 : _a.name])) {
|
|
146
|
-
acc++;
|
|
115
|
+
var newValues = Object.assign(Object.assign({}, values), _value2);
|
|
116
|
+
if (deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.length) {
|
|
117
|
+
deleteKeys === null || deleteKeys === void 0 ? void 0 : deleteKeys.forEach(function (key) {
|
|
118
|
+
if (values === null || values === void 0 ? void 0 : values[key]) {
|
|
119
|
+
delete newValues[key];
|
|
147
120
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_this.form.setData('values', newValues);
|
|
124
|
+
var onChange = _this.props.onChange;
|
|
125
|
+
if (onChange) {
|
|
126
|
+
(_a = Object.keys(values)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {
|
|
127
|
+
if (JSON.stringify(_value2[key]) !== JSON.stringify(values[key] || '')) {
|
|
128
|
+
var changedInfo = {
|
|
129
|
+
name: key,
|
|
130
|
+
value: _value2[key],
|
|
131
|
+
preValue: values === null || values === void 0 ? void 0 : values[key]
|
|
132
|
+
};
|
|
133
|
+
onChange.apply(void 0, [newValues, changedInfo].concat(rest));
|
|
134
|
+
}
|
|
135
|
+
});
|
|
155
136
|
}
|
|
156
137
|
}
|
|
157
138
|
});
|
|
158
|
-
Object.defineProperty(
|
|
139
|
+
Object.defineProperty(_this, "addResizeListener", {
|
|
159
140
|
enumerable: true,
|
|
160
141
|
configurable: true,
|
|
161
142
|
writable: true,
|
|
@@ -181,118 +162,71 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
181
162
|
initialValues = props.initialValues,
|
|
182
163
|
_props$showExpand = props.showExpand,
|
|
183
164
|
showExpand = _props$showExpand === void 0 ? true : _props$showExpand,
|
|
184
|
-
renderActions = props.renderActions
|
|
185
|
-
defaultExpanded = props.defaultExpanded;
|
|
165
|
+
renderActions = props.renderActions;
|
|
186
166
|
_this.state = {
|
|
187
|
-
|
|
188
|
-
expanded: defaultExpanded || !showExpand || renderActions ? true : false,
|
|
189
|
-
drawerVisible: false,
|
|
190
|
-
drawerFieldsValueCount: 0
|
|
167
|
+
actionWidth: 0
|
|
191
168
|
};
|
|
192
169
|
_this.fieldsRef = (0, _react.createRef)();
|
|
193
170
|
_this.formBoxRef = (0, _react.createRef)();
|
|
171
|
+
_this.actionRef = (0, _react.createRef)();
|
|
194
172
|
_this.form = form || (0, _createActions["default"])();
|
|
195
173
|
_this.form.setData('initialValues', initialValues);
|
|
196
174
|
_this.form.setData('values', Object.assign({}, initialValues));
|
|
197
175
|
return _this;
|
|
198
176
|
}
|
|
199
|
-
|
|
177
|
+
_inherits(QueryForm, _React$PureComponent);
|
|
178
|
+
return _createClass(QueryForm, [{
|
|
200
179
|
key: "render",
|
|
201
180
|
value: function render() {
|
|
202
181
|
var _this2 = this;
|
|
203
|
-
var _this$
|
|
204
|
-
children = _this$
|
|
205
|
-
_this$
|
|
206
|
-
className = _this$
|
|
207
|
-
_this$
|
|
208
|
-
initialValues = _this$
|
|
209
|
-
renderActions = _this$
|
|
210
|
-
_this$
|
|
211
|
-
showSearch = _this$
|
|
212
|
-
_this$
|
|
213
|
-
showReset = _this$
|
|
214
|
-
|
|
215
|
-
_this$
|
|
216
|
-
|
|
217
|
-
|
|
182
|
+
var _this$props2 = this.props,
|
|
183
|
+
children = _this$props2.children,
|
|
184
|
+
_this$props2$classNam = _this$props2.className,
|
|
185
|
+
className = _this$props2$classNam === void 0 ? '' : _this$props2$classNam,
|
|
186
|
+
_this$props2$initialV = _this$props2.initialValues,
|
|
187
|
+
initialValues = _this$props2$initialV === void 0 ? {} : _this$props2$initialV,
|
|
188
|
+
renderActions = _this$props2.renderActions,
|
|
189
|
+
_this$props2$showSear = _this$props2.showSearch,
|
|
190
|
+
showSearch = _this$props2$showSear === void 0 ? true : _this$props2$showSear,
|
|
191
|
+
_this$props2$showRese = _this$props2.showReset,
|
|
192
|
+
showReset = _this$props2$showRese === void 0 ? true : _this$props2$showRese,
|
|
193
|
+
_this$props2$showFiel = _this$props2.showFieldCount,
|
|
194
|
+
showFieldCount = _this$props2$showFiel === void 0 ? 3 : _this$props2$showFiel,
|
|
195
|
+
_this$props2$drawerPr = _this$props2.drawerProps,
|
|
196
|
+
drawerProps = _this$props2$drawerPr === void 0 ? {} : _this$props2$drawerPr,
|
|
197
|
+
size = _this$props2.size;
|
|
218
198
|
var extraActions = this.props.extraActions;
|
|
219
|
-
var
|
|
220
|
-
expanded = _this$state.expanded,
|
|
221
|
-
showMore = _this$state.showMore,
|
|
222
|
-
drawerVisible = _this$state.drawerVisible,
|
|
223
|
-
drawerFieldsValueCount = _this$state.drawerFieldsValueCount;
|
|
199
|
+
var actionWidth = this.state.actionWidth;
|
|
224
200
|
var renderFormActions = renderActions || function () {
|
|
225
|
-
return _react["default"].createElement(_react["default"].Fragment, null,
|
|
226
|
-
count: drawerFieldsValueCount
|
|
227
|
-
}, _react["default"].createElement(_button["default"], {
|
|
228
|
-
onClick: _this2.onShowDrawer
|
|
229
|
-
}, _react["default"].createElement(_tntdIcon["default"], {
|
|
230
|
-
type: "filter"
|
|
231
|
-
}), _this2.getText('moreFiltering'))), showSearch && _react["default"].createElement(_button["default"], {
|
|
201
|
+
return _react["default"].createElement(_react["default"].Fragment, null, showSearch && _react["default"].createElement(_button["default"], {
|
|
232
202
|
type: "primary",
|
|
233
203
|
onClick: _this2.onSearch
|
|
234
204
|
}, _this2.getText('search')), showReset && _react["default"].createElement(_button["default"], {
|
|
235
205
|
onClick: _this2.onReset
|
|
236
|
-
}, _this2.getText('reset')),
|
|
237
|
-
className: "expand-link",
|
|
238
|
-
type: "link",
|
|
239
|
-
onClick: _this2.onToggleExpand
|
|
240
|
-
}, _this2.getText(expanded ? 'collapse' : 'expand')), _react["default"].Children.map(children, function (child) {
|
|
206
|
+
}, _this2.getText('reset')), _react["default"].Children.map(children, function (child) {
|
|
241
207
|
var _a;
|
|
242
208
|
return child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) === 'right' && _react["default"].cloneElement(child);
|
|
243
209
|
}));
|
|
244
210
|
};
|
|
245
211
|
return _react["default"].createElement("div", {
|
|
246
212
|
ref: this.formBoxRef,
|
|
247
|
-
className: (0,
|
|
213
|
+
className: (0, _classnames2["default"])(clsPrefix, _defineProperty({}, className, className))
|
|
248
214
|
}, _react["default"].createElement(_form["default"], {
|
|
249
215
|
layout: "inline",
|
|
250
|
-
className: (0,
|
|
251
|
-
expanded:
|
|
252
|
-
showMore: showMore
|
|
216
|
+
className: (0, _classnames2["default"])({
|
|
217
|
+
expanded: true
|
|
253
218
|
})
|
|
254
219
|
}, _react["default"].createElement("div", {
|
|
255
|
-
ref: this.fieldsRef
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
onChange: _this2.onFieldChange
|
|
262
|
-
});
|
|
263
|
-
})), _react["default"].createElement("div", {
|
|
220
|
+
ref: this.fieldsRef,
|
|
221
|
+
style: {
|
|
222
|
+
width: '100%'
|
|
223
|
+
}
|
|
224
|
+
}, this.renderFields(children, initialValues, showFieldCount, actionWidth)), _react["default"].createElement("div", {
|
|
225
|
+
ref: this.actionRef,
|
|
264
226
|
className: "".concat(clsPrefix, "-actions")
|
|
265
|
-
}, renderFormActions()
|
|
266
|
-
title: this.getText('moreFiltering'),
|
|
267
|
-
visible: drawerVisible,
|
|
268
|
-
onClose: function onClose() {
|
|
269
|
-
return _this2.setState({
|
|
270
|
-
drawerVisible: false
|
|
271
|
-
});
|
|
272
|
-
},
|
|
273
|
-
width: 300,
|
|
274
|
-
size: size,
|
|
275
|
-
getContainer: false
|
|
276
|
-
}, drawerProps, {
|
|
277
|
-
className: (0, _classnames3["default"])("".concat(clsPrefix, "-drawer"), _defineProperty({
|
|
278
|
-
'large-size': size === 'large'
|
|
279
|
-
}, className, className))
|
|
280
|
-
}), _react["default"].Children.map(children, function (child, index) {
|
|
281
|
-
return child && index >= showFieldCount && _react["default"].cloneElement(child, {
|
|
282
|
-
form: _this2.form,
|
|
283
|
-
isFieldInDrawer: true,
|
|
284
|
-
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[child.props.name],
|
|
285
|
-
onChange: _this2.onFieldChange,
|
|
286
|
-
onSearch: _this2.onSearch
|
|
287
|
-
});
|
|
288
|
-
}), _react["default"].createElement(_button["default"], {
|
|
289
|
-
type: "primary",
|
|
290
|
-
onClick: this.onSearch
|
|
291
|
-
}, this.getText('search')), _react["default"].createElement(_button["default"], {
|
|
292
|
-
onClick: this.onReset
|
|
293
|
-
}, this.getText('reset')))), extraActions && _react["default"].createElement("div", {
|
|
227
|
+
}, renderFormActions(), extraActions && _react["default"].createElement("div", {
|
|
294
228
|
className: "".concat(clsPrefix, "-extra")
|
|
295
|
-
}, extraActions));
|
|
229
|
+
}, extraActions))));
|
|
296
230
|
}
|
|
297
231
|
}, {
|
|
298
232
|
key: "getText",
|
|
@@ -351,10 +285,16 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
351
285
|
key: "componentDidMount",
|
|
352
286
|
value: function componentDidMount() {
|
|
353
287
|
var current = this.fieldsRef.current;
|
|
354
|
-
var _this$
|
|
355
|
-
showFieldCount = _this$
|
|
356
|
-
_this$
|
|
357
|
-
showExpand = _this$
|
|
288
|
+
var _this$props3 = this.props,
|
|
289
|
+
showFieldCount = _this$props3.showFieldCount,
|
|
290
|
+
_this$props3$showExpa = _this$props3.showExpand,
|
|
291
|
+
showExpand = _this$props3$showExpa === void 0 ? true : _this$props3$showExpa;
|
|
292
|
+
// 获取节点宽度
|
|
293
|
+
var width = this.actionRef.current.offsetWidth;
|
|
294
|
+
// 更新state
|
|
295
|
+
this.setState({
|
|
296
|
+
actionWidth: width
|
|
297
|
+
});
|
|
358
298
|
this.updateFieldHeight();
|
|
359
299
|
this.form.on('search', this.search);
|
|
360
300
|
// 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑
|
|
@@ -363,16 +303,7 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
363
303
|
return;
|
|
364
304
|
}
|
|
365
305
|
if (!showFieldCount) {
|
|
366
|
-
if (current && this.isFieldsWidthOverflow()) {
|
|
367
|
-
this.setState({
|
|
368
|
-
showMore: true
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
306
|
this.removeResizeListener = this.addResizeListener();
|
|
372
|
-
} else {
|
|
373
|
-
this.updateDrawerFieldsValueCount();
|
|
374
|
-
this.form.on('setValues', this.updateDrawerFieldsValueCount);
|
|
375
|
-
this.form.on('setValue', this.updateDrawerFieldsValueCount);
|
|
376
307
|
}
|
|
377
308
|
}
|
|
378
309
|
}, {
|
|
@@ -380,15 +311,69 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
380
311
|
value: function componentWillUnmount() {
|
|
381
312
|
var _a;
|
|
382
313
|
(_a = this.removeResizeListener) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
383
|
-
this.form.off('setValues', this.updateDrawerFieldsValueCount)
|
|
384
|
-
this.form.off('setValue', this.updateDrawerFieldsValueCount)
|
|
314
|
+
// this.form.off('setValues', this.updateDrawerFieldsValueCount)
|
|
315
|
+
// this.form.off('setValue', this.updateDrawerFieldsValueCount)
|
|
385
316
|
this.form.off('search', this.search);
|
|
386
317
|
}
|
|
318
|
+
}, {
|
|
319
|
+
key: "renderFields",
|
|
320
|
+
value: function renderFields(children, initialValues, showFieldCount, actionWidth) {
|
|
321
|
+
var _this3 = this;
|
|
322
|
+
var rest = [];
|
|
323
|
+
var size = _react["default"].Children.count(children);
|
|
324
|
+
var fields = null;
|
|
325
|
+
if (size <= showFieldCount) {
|
|
326
|
+
// 过滤器不超过3个
|
|
327
|
+
fields = _react["default"].Children.map(children, function (child, index) {
|
|
328
|
+
var _a, _b;
|
|
329
|
+
if (child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) !== 'right') {
|
|
330
|
+
return _react["default"].cloneElement(child, {
|
|
331
|
+
form: _this3.form,
|
|
332
|
+
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[(_b = child.props) === null || _b === void 0 ? void 0 : _b.name],
|
|
333
|
+
onChange: _this3.onFieldChange
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return;
|
|
337
|
+
});
|
|
338
|
+
} else {
|
|
339
|
+
fields = _react["default"].Children.map(children, function (child, index) {
|
|
340
|
+
var _a, _b;
|
|
341
|
+
if (child && ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.align) !== 'right') {
|
|
342
|
+
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
|
343
|
+
_ref$isGroup = _ref.isGroup,
|
|
344
|
+
isGroup = _ref$isGroup === void 0 ? true : _ref$isGroup;
|
|
345
|
+
if (!isGroup) {
|
|
346
|
+
return _react["default"].cloneElement(child, {
|
|
347
|
+
form: _this3.form,
|
|
348
|
+
initialValue: initialValues === null || initialValues === void 0 ? void 0 : initialValues[(_b = child.props) === null || _b === void 0 ? void 0 : _b.name],
|
|
349
|
+
onChange: _this3.onFieldChange
|
|
350
|
+
});
|
|
351
|
+
} else {
|
|
352
|
+
rest.push(child);
|
|
353
|
+
console.log('child', index, child);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
return _react["default"].createElement("div", {
|
|
360
|
+
style: {
|
|
361
|
+
marginRight: actionWidth
|
|
362
|
+
}
|
|
363
|
+
}, fields, !!(rest === null || rest === void 0 ? void 0 : rest.length) && _react["default"].createElement(_Composition["default"], {
|
|
364
|
+
clsPrefix: clsPrefix,
|
|
365
|
+
data: rest,
|
|
366
|
+
initialValues: initialValues,
|
|
367
|
+
onChange: this.onCompositionFieldChange,
|
|
368
|
+
form: this.form,
|
|
369
|
+
style: {
|
|
370
|
+
marginRight: (fields === null || fields === void 0 ? void 0 : fields.length) > 0 ? 10 - actionWidth : 10
|
|
371
|
+
}
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
387
374
|
}]);
|
|
388
|
-
return QueryForm;
|
|
389
375
|
}(_react["default"].PureComponent);
|
|
390
376
|
QueryForm.Field = _Field["default"];
|
|
391
377
|
QueryForm.useForm = _useForm["default"];
|
|
392
378
|
QueryForm.createForm = _createActions["default"];
|
|
393
|
-
var _default = QueryForm;
|
|
394
|
-
exports["default"] = _default;
|
|
379
|
+
var _default = exports["default"] = QueryForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAmC;AACnC,mCAAiC;AACjC,+CAAwC;AACxC,oEAA2C;AAC3C,oDAA2B;AAC3B,wDAA+B;AAE/B,qDAA4B;AAC5B,uDAA8B;AAC9B,uDAA8B;AAC9B,mDAA0B;AAC1B,gDAAqD;AACrD,6DAA+B;AAE/B,wBAAqB;AAErB,MAAM,SAAS,GAAG,eAAe,CAAA;AAEjC,MAAM,SAAU,SAAQ,eAAK,CAAC,aAAa;IACzC,YAAY,KAAK;QACf,KAAK,CAAC,K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AEpC,kBAAe,SAAS,CAAA","sourcesContent":["import classnames from 'classnames'\nimport { debounce } from 'lodash'\nimport React, { createRef } from 'react'\nimport createActions from './createActions'\nimport Field from './Field'\nimport useForm from './useForm'\n\nimport Badge from '../badge'\nimport Button from '../button'\nimport Drawer from '../drawer'\nimport Form from '../form'\nimport { getLanguage, getText } from '../prev-locale'\nimport Icon from '../tntd-icon'\n\nimport './index.less'\n\nconst clsPrefix = 'tnt-queryform'\n\nclass QueryForm extends React.PureComponent {\n constructor(props) {\n super(props)\n const { form, initialValues, showExpand = true, renderActions, defaultExpanded } = props\n this.state = {\n showMore: false,\n expanded: defaultExpanded || !showExpand || renderActions ? true : false,\n drawerVisible: false,\n drawerFieldsValueCount: 0,\n }\n this.fieldsRef = createRef()\n this.formBoxRef = createRef()\n\n this.form = form || createActions()\n this.form.setData('initialValues', initialValues)\n this.form.setData('values', { ...initialValues })\n }\n\n render() {\n const {\n children,\n className = '',\n initialValues = {},\n renderActions,\n showSearch = true,\n showReset = true,\n showFieldCount,\n drawerProps = {},\n size,\n } = this.props\n const extraActions = this.props.extraActions\n const { expanded, showMore, drawerVisible, drawerFieldsValueCount } = this.state\n const renderFormActions =\n renderActions ||\n (() => (\n <>\n {showFieldCount && (\n <Badge count={drawerFieldsValueCount}>\n <Button onClick={this.onShowDrawer}>\n <Icon type=\"filter\" />\n {this.getText('moreFiltering')}\n </Button>\n </Badge>\n )}\n {showSearch && (\n <Button type=\"primary\" onClick={this.onSearch}>\n {this.getText('search')}\n </Button>\n )}\n {showReset && <Button onClick={this.onReset}>{this.getText('reset')}</Button>}\n {showMore && !showFieldCount && (\n <Button className=\"expand-link\" type=\"link\" onClick={this.onToggleExpand}>\n {this.getText(expanded ? 'collapse' : 'expand')}\n </Button>\n )}\n {React.Children.map(\n children,\n (child) => child && child?.props?.align === 'right' && React.cloneElement(child)\n )}\n </>\n ))\n\n return (\n <div ref={this.formBoxRef} className={classnames(clsPrefix, { [className]: className })}>\n <Form layout=\"inline\" className={classnames({ expanded: !showMore || expanded, showMore })}>\n <div ref={this.fieldsRef}>\n {React.Children.map(\n children,\n (child, index) =>\n child &&\n child?.props?.align !== 'right' &&\n (!showFieldCount || showFieldCount > index) &&\n React.cloneElement(child, {\n form: this.form,\n initialValue: initialValues?.[child.props?.name],\n onChange: this.onFieldChange,\n })\n )}\n </div>\n <div className={`${clsPrefix}-actions`}>{renderFormActions()}</div>\n {showFieldCount && (\n <Drawer\n title={this.getText('moreFiltering')}\n visible={drawerVisible}\n onClose={() => this.setState({ drawerVisible: false })}\n width={300}\n size={size}\n getContainer={false}\n {...drawerProps}\n className={classnames(`${clsPrefix}-drawer`, {\n 'large-size': size === 'large',\n [className]: className,\n })}\n >\n {React.Children.map(\n children,\n (child, index) =>\n child &&\n index >= showFieldCount &&\n React.cloneElement(child, {\n form: this.form,\n isFieldInDrawer: true,\n initialValue: initialValues?.[child.props.name],\n onChange: this.onFieldChange,\n onSearch: this.onSearch,\n })\n )}\n <Button type=\"primary\" onClick={this.onSearch}>\n {this.getText('search')}\n </Button>\n <Button onClick={this.onReset}>{this.getText('reset')}</Button>\n </Drawer>\n )}\n </Form>\n {extraActions && <div className={`${clsPrefix}-extra`}>{extraActions}</div>}\n </div>\n )\n }\n\n getText(key) {\n return getText(key, this.props.language || getLanguage())\n }\n\n isFieldsWidthOverflow() {\n const { current } = this.fieldsRef\n\n if (current) {\n return (\n parseFloat(window.getComputedStyle(current).width, 10) <\n [].reduce.call(\n current.children,\n (acc, cur) => {\n const { margin, width } = window.getComputedStyle(cur)\n const marginArray = margin.split(' ').map((str) => parseFloat(str, 10))\n acc += parseFloat(width, 10) + marginArray[1]\n return acc\n },\n 0\n )\n )\n }\n\n return false\n }\n\n updateFieldHeight() {\n const { formBoxRef, fieldsRef } = this\n const getFieldHeight = () => {\n const { current } = fieldsRef\n let height = '32px'\n\n if (current && current.children?.[0]) {\n height = window.getComputedStyle(current.children[0]).height\n }\n\n return height\n }\n const queryFormActionsDom = formBoxRef?.current?.querySelector(`.${clsPrefix}-actions`)\n const queryFormExtraDom = formBoxRef?.current?.querySelector(`.${clsPrefix}-extra`)\n const formItemsDomList = fieldsRef?.current?.querySelectorAll('.ant-form-item-control')\n const fieldHeight = getFieldHeight()\n\n fieldsRef.current.style.height = fieldHeight\n ;[queryFormActionsDom, queryFormExtraDom].forEach((item) => {\n item &&\n Object.assign(item.style, {\n height: fieldHeight,\n lineHeight: fieldHeight,\n })\n })\n ;[].forEach.call(formItemsDomList, (item) => {\n item.style.lineHeight = fieldHeight\n })\n }\n\n onWindowResize = debounce(() => {\n const { current } = this.fieldsRef\n\n if (current) {\n setTimeout(() => {\n this.setState({\n showMore: this.isFieldsWidthOverflow(),\n })\n }, 25)\n }\n }, 50)\n\n search = (params) => {\n this.props.onSearch({\n ...this.form.getValues(),\n ...params,\n })\n }\n\n onSearch = () => {\n this.props.onSearch?.(this.form.getValues())\n }\n\n onReset = () => {\n const { initialValues, onReset } = this.props\n\n this.form.setValues({ ...initialValues })\n this.updateDrawerFieldsValueCount()\n onReset?.(initialValues)\n }\n\n onToggleExpand = () => {\n this.setState({\n expanded: !this.state.expanded,\n })\n this.props.onToggleExpand?.(!this.state.expanded)\n }\n\n onShowDrawer = () => {\n this.setState({ drawerVisible: true })\n }\n\n onFieldChange = (name, value, ...rest) => {\n const values = this.form.getValues()\n const newValues = {\n ...values,\n [name]: value,\n }\n const changedInfo = { name, value, preValue: values?.[name] }\n const { onChange } = this.props\n\n this.form.setData('values', newValues)\n\n onChange && onChange(newValues, changedInfo, ...rest)\n this.updateDrawerFieldsValueCount(newValues)\n }\n\n updateDrawerFieldsValueCount = () => {\n const values = this.form.getValues()\n const { showFieldCount, children } = this.props\n\n if (showFieldCount) {\n const drawerFieldsValueCount = children.reduce((acc, cur, index) => {\n if (index >= showFieldCount && values?.[cur?.props?.name]) {\n acc++\n }\n return acc\n }, 0)\n\n if (drawerFieldsValueCount !== this.state.drawerFieldsValueCount) {\n this.setState({\n drawerFieldsValueCount,\n })\n }\n }\n }\n\n addResizeListener = () => {\n if ('ResizeObserver' in window) {\n const { current } = this.fieldsRef;\n if (current) {\n const observer = new ResizeObserver(this.onWindowResize);\n\n observer.observe(current)\n\n return () => observer.disconnect()\n }\n } else {\n window.addEventListener('resize', this.onWindowResize)\n return () => window.removeEventListener('resize', this.onWindowResize)\n }\n }\n\n componentDidMount() {\n const { current } = this.fieldsRef\n const { showFieldCount, showExpand = true } = this.props\n\n this.updateFieldHeight()\n\n this.form.on('search', this.search)\n\n // 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑\n // || renderActions\n if (!showFieldCount && !showExpand) {\n return\n }\n\n if (!showFieldCount) {\n if (current && this.isFieldsWidthOverflow()) {\n this.setState({\n showMore: true,\n })\n }\n\n this.removeResizeListener = this.addResizeListener()\n } else {\n this.updateDrawerFieldsValueCount()\n this.form.on('setValues', this.updateDrawerFieldsValueCount)\n this.form.on('setValue', this.updateDrawerFieldsValueCount)\n }\n }\n\n componentWillUnmount() {\n this.removeResizeListener?.()\n this.form.off('setValues', this.updateDrawerFieldsValueCount)\n this.form.off('setValue', this.updateDrawerFieldsValueCount)\n this.form.off('search', this.search)\n }\n}\n\nQueryForm.Field = Field\nQueryForm.useForm = useForm\nQueryForm.createForm = createActions\n\nexport default QueryForm\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/query-form/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAmC;AACnC,mCAAiC;AACjC,+CAAwC;AACxC,oEAA2C;AAC3C,oDAA2B;AAC3B,sEAA6C;AAC7C,wDAA+B;AAE/B,uDAA8B;AAC9B,mDAA0B;AAC1B,gDAAqD;AAErD,wBAAqB;AAErB,MAAM,SAAS,GAAG,eAAe,CAAA;AAEjC,MAAM,SAAU,SAAQ,eAAK,CAAC,aAAa;IACzC,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAA;QAqHd;;;;mB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OAAM;YACR,CAAC,CAAC,CAAA;SACH;QAED,OAAO,CACL,uCAAK,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE;YACrC,MAAM;YACN,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,IAAI,CACjB,8BAAC,qBAAW,IACV,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,IAAI,CAAC,wBAAwB,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,EAAE,WAAW,EAAE,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,GAClE,CACH,CACG,CACP,CAAA;IACH,CAAC;CACF;AAED,SAAS,CAAC,KAAK,GAAG,eAAK,CAAA;AACvB,SAAS,CAAC,OAAO,GAAG,iBAAO,CAAA;AAC3B,SAAS,CAAC,UAAU,GAAG,uBAAa,CAAA;AAEpC,kBAAe,SAAS,CAAA","sourcesContent":["import classnames from 'classnames'\nimport { debounce } from 'lodash'\nimport React, { createRef } from 'react'\nimport createActions from './createActions'\nimport Field from './Field'\nimport Composition from './Field/Composition'\nimport useForm from './useForm'\n\nimport Button from '../button'\nimport Form from '../form'\nimport { getLanguage, getText } from '../prev-locale'\n\nimport './index.less'\n\nconst clsPrefix = 'tnt-queryform'\n\nclass QueryForm extends React.PureComponent {\n constructor(props) {\n super(props)\n const { form, initialValues, showExpand = true, renderActions } = props\n this.state = {\n actionWidth: 0,\n }\n this.fieldsRef = createRef()\n this.formBoxRef = createRef()\n this.actionRef = createRef()\n\n this.form = form || createActions()\n this.form.setData('initialValues', initialValues)\n this.form.setData('values', { ...initialValues })\n }\n\n render() {\n const {\n children,\n className = '',\n initialValues = {},\n renderActions,\n showSearch = true,\n showReset = true,\n showFieldCount = 3,\n drawerProps = {},\n size,\n } = this.props\n const extraActions = this.props.extraActions\n const { actionWidth } = this.state\n const renderFormActions =\n renderActions ||\n (() => (\n <>\n {showSearch && (\n <Button type=\"primary\" onClick={this.onSearch}>\n {this.getText('search')}\n </Button>\n )}\n {showReset && <Button onClick={this.onReset}>{this.getText('reset')}</Button>}\n\n {React.Children.map(\n children,\n (child) => child && child?.props?.align === 'right' && React.cloneElement(child)\n )}\n </>\n ))\n\n return (\n <div ref={this.formBoxRef} className={classnames(clsPrefix, { [className]: className })}>\n <Form layout=\"inline\" className={classnames({ expanded: true })}>\n <div ref={this.fieldsRef} style={{ width: '100%' }}>\n {this.renderFields(children, initialValues, showFieldCount, actionWidth)}\n </div>\n <div ref={this.actionRef} className={`${clsPrefix}-actions`}>\n {renderFormActions()}\n {extraActions && <div className={`${clsPrefix}-extra`}>{extraActions}</div>}\n </div>\n </Form>\n </div>\n )\n }\n\n getText(key) {\n return getText(key, this.props.language || getLanguage())\n }\n\n isFieldsWidthOverflow() {\n const { current } = this.fieldsRef\n\n if (current) {\n return (\n parseFloat(window.getComputedStyle(current).width, 10) <\n [].reduce.call(\n current.children,\n (acc, cur) => {\n const { margin, width } = window.getComputedStyle(cur)\n const marginArray = margin.split(' ').map((str) => parseFloat(str, 10))\n acc += parseFloat(width, 10) + marginArray[1]\n return acc\n },\n 0\n )\n )\n }\n\n return false\n }\n\n updateFieldHeight() {\n const { formBoxRef, fieldsRef } = this\n const getFieldHeight = () => {\n const { current } = fieldsRef\n let height = '32px'\n\n if (current && current.children?.[0]) {\n height = window.getComputedStyle(current.children[0]).height\n }\n\n return height\n }\n const queryFormActionsDom = formBoxRef?.current?.querySelector(`.${clsPrefix}-actions`)\n const queryFormExtraDom = formBoxRef?.current?.querySelector(`.${clsPrefix}-extra`)\n const formItemsDomList = fieldsRef?.current?.querySelectorAll('.ant-form-item-control')\n const fieldHeight = getFieldHeight()\n\n fieldsRef.current.style.height = fieldHeight\n ;[queryFormActionsDom, queryFormExtraDom].forEach((item) => {\n item &&\n Object.assign(item.style, {\n height: fieldHeight,\n lineHeight: fieldHeight,\n })\n })\n ;[].forEach.call(formItemsDomList, (item) => {\n item.style.lineHeight = fieldHeight\n })\n }\n\n onWindowResize = debounce(() => {\n // const { current } = this.fieldsRef\n // if (current) {\n // setTimeout(() => {\n // this.setState({\n // showMore: this.isFieldsWidthOverflow(),\n // })\n // }, 25)\n // }\n }, 50)\n\n search = (params) => {\n this.props.onSearch({\n ...this.form.getValues(),\n ...params,\n })\n }\n\n onSearch = () => {\n this.props.onSearch?.(this.form.getValues())\n }\n\n onReset = () => {\n const { initialValues, onReset } = this.props\n\n this.form.setValues({ ...initialValues })\n onReset?.(initialValues)\n }\n\n onFieldChange = (name, value, ...rest) => {\n const values = this.form.getValues()\n const newValues = {\n ...values,\n [name]: value,\n }\n const changedInfo = { name, value, preValue: values?.[name] }\n const { onChange } = this.props\n\n this.form.setData('values', newValues)\n\n onChange && onChange(newValues, changedInfo, ...rest)\n }\n onCompositionFieldChange = (value, deleteKeys, ...rest) => {\n const values = this.form.getValues()\n const newValues = {\n ...values,\n ...value,\n }\n if (deleteKeys?.length) {\n deleteKeys?.forEach((key) => {\n if (values?.[key]) {\n delete newValues[key]\n }\n })\n }\n this.form.setData('values', newValues)\n const { onChange } = this.props\n if (onChange) {\n Object.keys(values)?.forEach((key) => {\n if (JSON.stringify(value[key]) !== JSON.stringify(values[key] || '')) {\n const changedInfo = { name: key, value: value[key], preValue: values?.[key] }\n onChange(newValues, changedInfo, ...rest)\n }\n })\n }\n }\n\n addResizeListener = () => {\n if ('ResizeObserver' in window) {\n const { current } = this.fieldsRef\n if (current) {\n const observer = new ResizeObserver(this.onWindowResize)\n\n observer.observe(current)\n\n return () => observer.disconnect()\n }\n } else {\n window.addEventListener('resize', this.onWindowResize)\n return () => window.removeEventListener('resize', this.onWindowResize)\n }\n }\n\n componentDidMount() {\n const { current } = this.fieldsRef\n const { showFieldCount, showExpand = true } = this.props\n // 获取节点宽度\n const width = this.actionRef.current.offsetWidth\n // 更新state\n this.setState({ actionWidth: width })\n this.updateFieldHeight()\n\n this.form.on('search', this.search)\n\n // 未设置第一行显示数量且禁止了展开操作 或 自定义了操作区域,则不需要处理展开计算逻辑\n // || renderActions\n if (!showFieldCount && !showExpand) {\n return\n }\n\n if (!showFieldCount) {\n this.removeResizeListener = this.addResizeListener()\n }\n }\n\n componentWillUnmount() {\n this.removeResizeListener?.()\n // this.form.off('setValues', this.updateDrawerFieldsValueCount)\n // this.form.off('setValue', this.updateDrawerFieldsValueCount)\n this.form.off('search', this.search)\n }\n\n renderFields(children, initialValues, showFieldCount, actionWidth) {\n const rest = []\n const size = React.Children.count(children)\n let fields = null\n if (size <= showFieldCount) {\n // 过滤器不超过3个\n fields = React.Children.map(children, (child, index) => {\n if (child && child?.props?.align !== 'right') {\n return React.cloneElement(child, {\n form: this.form,\n initialValue: initialValues?.[child.props?.name],\n onChange: this.onFieldChange,\n })\n }\n return\n })\n } else {\n fields = React.Children.map(children, (child, index) => {\n if (child && child?.props?.align !== 'right') {\n const { isGroup = true } = child?.props\n if (!isGroup) {\n return React.cloneElement(child, {\n form: this.form,\n initialValue: initialValues?.[child.props?.name],\n onChange: this.onFieldChange,\n })\n } else {\n rest.push(child)\n console.log('child', index, child)\n }\n }\n return\n })\n }\n\n return (\n <div style={{ marginRight: actionWidth }}>\n {fields}\n {!!rest?.length && (\n <Composition\n clsPrefix={clsPrefix}\n data={rest}\n initialValues={initialValues}\n onChange={this.onCompositionFieldChange}\n form={this.form}\n style={{ marginRight: fields?.length > 0 ? 10 - actionWidth : 10 }}\n />\n )}\n </div>\n )\n }\n}\n\nQueryForm.Field = Field\nQueryForm.useForm = useForm\nQueryForm.createForm = createActions\n\nexport default QueryForm\n"]}
|