tntd 2.8.0-beta.2 → 2.8.0-beta.21
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/index.js +1 -1
- 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 +188 -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/array-input/index.js +57 -42
- package/es/array-input/index.js.map +1 -1
- package/es/array-input/index.less +4 -1
- 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 +52 -0
- package/es/button/button.less +7 -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/check-card/index.js +2 -3
- package/es/check-card/index.js.map +1 -1
- package/es/checkbox/index.js +1 -1
- 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/collapse.less +3 -3
- 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 +135 -0
- package/es/color-picker/ColorPicker.js +8 -8
- 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/index.js +1 -1
- package/es/date-picker/index.js.map +1 -1
- 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 +114 -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 +101 -26
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +111 -22
- package/es/descriptions/index.js +1 -1
- 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 +145 -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 +108 -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 +151 -0
- package/es/drawer/style/drawer.less +230 -0
- package/es/drawer/style/index.js +3 -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 +283 -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 +8 -3
- package/es/form/form.js.map +1 -1
- package/es/form/form.less +42 -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/handle-icon/index.js +201 -0
- package/es/handle-icon/index.js.map +1 -0
- package/es/handle-icon/index.less +53 -0
- package/es/icon/index.js +2 -1
- package/es/icon/index.js.map +1 -1
- package/es/icon/style/index.js +3 -0
- package/es/icon/style/index.js.map +1 -0
- package/es/icon/style/index.less +4 -0
- package/es/icon/style/style.less +6 -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 +8 -2
- package/es/index.js.map +1 -1
- package/es/input/index.js +1 -1
- package/es/input/index.js.map +1 -1
- package/es/input/input.js +10 -6
- package/es/input/input.js.map +1 -1
- 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 +448 -0
- package/es/input/style/search-input.less +34 -0
- package/es/input-number/index.js +1 -1
- package/es/input-number/index.js.map +1 -1
- 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 +11 -1
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +11 -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/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 +1 -1
- package/es/modal/index.js.map +1 -1
- package/es/modal/modal.js +51 -9
- package/es/modal/modal.js.map +1 -1
- package/es/modal/modal.less +13 -32
- package/es/modal/style/confirm.less +92 -0
- package/es/modal/style/index.js +4 -0
- package/es/modal/style/index.js.map +1 -0
- package/es/modal/style/index.less +4 -0
- package/es/modal/style/modal.less +171 -0
- package/es/notification/index.js +1 -1
- package/es/notification/index.js.map +1 -1
- 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-container/index.js +13 -0
- package/es/page-container/index.js.map +1 -0
- package/es/page-container/index.less +38 -0
- 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/page-loading/index.js +29 -0
- package/es/page-loading/index.js.map +1 -0
- package/es/page-loading/index.less +38 -0
- package/es/page-loading/loading.gif +0 -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 +1 -1
- package/es/popconfirm/index.js.map +1 -1
- package/es/popconfirm/style/index.js +5 -0
- package/es/popconfirm/style/index.js.map +1 -0
- package/es/popover/index.js +1 -1
- package/es/popover/index.js.map +1 -1
- package/es/popover/style/index.js +4 -0
- package/es/popover/style/index.js.map +1 -0
- package/es/popover/style/index.less +206 -0
- package/es/progress/index.js +1 -1
- package/es/progress/index.js.map +1 -1
- 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/radio/index.js +1 -1
- package/es/radio/index.js.map +1 -1
- 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/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +5 -3
- package/es/select/select.js.map +1 -1
- package/es/select/style/index.js +4 -0
- package/es/select/style/index.js.map +1 -0
- package/es/select/style/index.less +605 -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/index.js +2 -1
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/index.less +12 -0
- package/es/steps/stepStyle/nav.less +281 -0
- package/es/steps/stepStyle/small.less +5 -0
- package/es/steps/steps.js +6 -6
- 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 +2 -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 +44 -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/style/index.js +2 -0
- package/es/switch/style/index.js.map +1 -0
- package/es/switch/style/index.less +178 -0
- package/es/switch/switch.js +1 -1
- package/es/switch/switch.js.map +1 -1
- package/es/table/expand.less +49 -0
- package/es/table/hooks/index.js +2 -1
- package/es/table/hooks/index.js.map +1 -1
- package/es/table/hooks/use-expand-fixed.js +78 -0
- package/es/table/hooks/use-expand-fixed.js.map +1 -0
- package/es/table/index.js +2 -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 +838 -0
- package/es/table/style/size.less +180 -0
- package/es/table/table.js +44 -11
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +5 -5
- package/es/table/table.stories.js +413 -2
- package/es/table/table.stories.js.map +1 -1
- package/es/table/utils.js +11 -0
- package/es/table/utils.js.map +1 -1
- package/es/table-container/index.js +12 -0
- package/es/table-container/index.js.map +1 -0
- package/es/table-container/index.less +13 -0
- package/es/tabs/index.js +1 -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 +436 -0
- package/es/tabs/tabs.js +4 -2
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs-container/index.js +13 -0
- package/es/tabs-container/index.js.map +1 -0
- package/es/tabs-container/index.less +51 -0
- package/es/tag/color.less +53 -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 +228 -0
- package/es/time-picker/index.js +1 -1
- package/es/time-picker/index.js.map +1 -1
- 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 +247 -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/title/index.js +4 -3
- package/es/title/index.js.map +1 -1
- package/es/tntd-action/index.js +7 -0
- package/es/tntd-action/index.js.map +1 -0
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +7 -8
- package/es/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/index.js +4 -5
- package/es/tntd-cascader/AntdCascader/index.js.map +1 -1
- 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 +2 -7
- 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/_util/getIcons.js +7 -8
- package/es/tntd-rc-select/_util/getIcons.js.map +1 -1
- package/es/tntd-rc-select/style/index.less +844 -740
- package/es/tntd-select/index.js +5 -4
- package/es/tntd-select/index.js.map +1 -1
- package/es/tooltip/index.js +4 -3
- package/es/tooltip/index.js.map +1 -1
- package/es/tooltip/index.less +29 -0
- package/es/tooltip/style/index.js +2 -0
- package/es/tooltip/style/index.js.map +1 -0
- package/es/tooltip/style/index.less +187 -0
- package/es/tooltip/tooltip.js +33 -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/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/index.d.ts +1 -1
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +5 -6
- 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 +188 -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/index.d.ts +2 -12
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +70 -65
- package/lib/array-input/index.js.map +1 -1
- package/lib/array-input/index.less +4 -1
- 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 +52 -0
- package/lib/button/button.js +6 -9
- package/lib/button/button.less +7 -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 +11 -16
- package/lib/check-card/index.js.map +1 -1
- package/lib/checkbox/checkbox-group.js +1 -2
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +5 -6
- 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/collapse.less +3 -3
- 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 +135 -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 +13 -17
- 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/index.d.ts +1 -1
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +6 -8
- package/lib/date-picker/index.js.map +1 -1
- 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 +114 -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 +107 -35
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +111 -22
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +2 -3
- 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 +145 -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 +27 -2
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +121 -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 +151 -0
- package/lib/drawer/style/drawer.less +230 -0
- package/lib/drawer/style/index.d.ts +3 -0
- package/lib/drawer/style/index.d.ts.map +1 -0
- package/lib/drawer/style/index.js +4 -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 +283 -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 +16 -13
- package/lib/form/form.js.map +1 -1
- package/lib/form/form.less +42 -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/handle-icon/index.d.ts +7 -0
- package/lib/handle-icon/index.d.ts.map +1 -0
- package/lib/handle-icon/index.js +221 -0
- package/lib/handle-icon/index.js.map +1 -0
- package/lib/handle-icon/index.less +53 -0
- 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 +4 -0
- package/lib/icon/style/index.d.ts.map +1 -0
- package/lib/icon/style/index.js +5 -0
- package/lib/icon/style/index.js.map +1 -0
- package/lib/icon/style/index.less +4 -0
- package/lib/icon/style/style.less +6 -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 +8 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +45 -3
- package/lib/index.js.map +1 -1
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +2 -3
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.js +16 -16
- package/lib/input/input.js.map +1 -1
- 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 +448 -0
- package/lib/input/style/search-input.less +34 -0
- package/lib/input-number/index.d.ts +1 -1
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +5 -6
- package/lib/input-number/index.js.map +1 -1
- 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 +10 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -2
- package/lib/locale/en_US.d.ts +10 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +12 -3
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +10 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +12 -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/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 -1
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +2 -3
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/modal.d.ts +1 -1
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +56 -17
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/modal.less +13 -32
- package/lib/modal/style/confirm.less +92 -0
- package/lib/modal/style/index.d.ts +4 -0
- package/lib/modal/style/index.d.ts.map +1 -0
- package/lib/modal/style/index.js +5 -0
- package/lib/modal/style/index.js.map +1 -0
- package/lib/modal/style/index.less +4 -0
- package/lib/modal/style/modal.less +171 -0
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/index.d.ts.map +1 -1
- package/lib/notification/index.js +5 -6
- package/lib/notification/index.js.map +1 -1
- 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-container/index.d.ts +4 -0
- package/lib/page-container/index.d.ts.map +1 -0
- package/lib/page-container/index.js +22 -0
- package/lib/page-container/index.js.map +1 -0
- package/lib/page-container/index.less +38 -0
- 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/page-loading/index.d.ts +4 -0
- package/lib/page-loading/index.d.ts.map +1 -0
- package/lib/page-loading/index.js +34 -0
- package/lib/page-loading/index.js.map +1 -0
- package/lib/page-loading/index.less +38 -0
- package/lib/page-loading/loading.gif +0 -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 +1 -1
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +5 -6
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popconfirm/style/index.d.ts +4 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -0
- package/lib/popconfirm/style/index.js +5 -0
- package/lib/popconfirm/style/index.js.map +1 -0
- package/lib/popover/index.d.ts +1 -1
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +5 -6
- package/lib/popover/index.js.map +1 -1
- package/lib/popover/style/index.d.ts +3 -0
- package/lib/popover/style/index.d.ts.map +1 -0
- package/lib/popover/style/index.js +4 -0
- package/lib/popover/style/index.js.map +1 -0
- package/lib/popover/style/index.less +206 -0
- package/lib/prev-locale.js +6 -11
- package/lib/preview-text/index.js +5 -7
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +5 -6
- package/lib/progress/index.js.map +1 -1
- 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/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 +1 -1
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +22 -25
- 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/radio/index.d.ts +1 -1
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +5 -6
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio-group.js +1 -2
- 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/select/index.d.ts +1 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +2 -3
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +12 -14
- package/lib/select/select.js.map +1 -1
- 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 +605 -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/index.d.ts +2 -1
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +3 -3
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/index.less +12 -0
- package/lib/steps/stepStyle/nav.less +281 -0
- package/lib/steps/stepStyle/small.less +5 -0
- package/lib/steps/steps.d.ts +2 -2
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +9 -12
- 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 +44 -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/style/index.d.ts +3 -0
- package/lib/switch/style/index.d.ts.map +1 -0
- package/lib/switch/style/index.js +4 -0
- package/lib/switch/style/index.js.map +1 -0
- package/lib/switch/style/index.less +178 -0
- package/lib/switch/switch.d.ts +1 -1
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +6 -8
- 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/expand.less +49 -0
- package/lib/table/hooks/index.d.ts +1 -0
- package/lib/table/hooks/index.d.ts.map +1 -1
- package/lib/table/hooks/index.js +11 -0
- package/lib/table/hooks/index.js.map +1 -1
- package/lib/table/hooks/use-column-setting.js +4 -5
- package/lib/table/hooks/use-expand-fixed.d.ts +4 -0
- package/lib/table/hooks/use-expand-fixed.d.ts.map +1 -0
- package/lib/table/hooks/use-expand-fixed.js +108 -0
- package/lib/table/hooks/use-expand-fixed.js.map +1 -0
- package/lib/table/index.d.ts +2 -1
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +3 -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 +838 -0
- package/lib/table/style/size.less +180 -0
- package/lib/table/table.d.ts +4 -2
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +53 -20
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +5 -5
- package/lib/table/table.stories.d.ts +106 -29
- package/lib/table/table.stories.d.ts.map +1 -1
- package/lib/table/table.stories.js +431 -13
- package/lib/table/table.stories.js.map +1 -1
- 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/table/utils.d.ts +1 -0
- package/lib/table/utils.d.ts.map +1 -1
- package/lib/table/utils.js +13 -0
- package/lib/table/utils.js.map +1 -1
- package/lib/table-container/index.d.ts +3 -0
- package/lib/table-container/index.d.ts.map +1 -0
- package/lib/table-container/index.js +21 -0
- package/lib/table-container/index.js.map +1 -0
- package/lib/table-container/index.less +13 -0
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +2 -3
- 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 +436 -0
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +8 -9
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs-container/index.d.ts +4 -0
- package/lib/tabs-container/index.d.ts.map +1 -0
- package/lib/tabs-container/index.js +22 -0
- package/lib/tabs-container/index.js.map +1 -0
- package/lib/tabs-container/index.less +51 -0
- package/lib/tag/color.less +53 -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 +228 -0
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +5 -6
- package/lib/time-picker/index.js.map +1 -1
- 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 +247 -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 +2 -1
- package/lib/title/index.d.ts.map +1 -1
- package/lib/title/index.js +6 -8
- package/lib/title/index.js.map +1 -1
- package/lib/tntd-action/index.d.ts +4 -0
- package/lib/tntd-action/index.d.ts.map +1 -0
- package/lib/tntd-action/index.js +12 -0
- package/lib/tntd-action/index.js.map +1 -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 +4 -5
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- 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.d.ts.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.js +14 -18
- package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
- 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 +12 -20
- 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 +4 -5
- package/lib/tntd-rc-select/_util/getIcons.js.map +1 -1
- 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 +48 -49
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tooltip/index.d.ts +4 -3
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +7 -7
- package/lib/tooltip/index.js.map +1 -1
- package/lib/tooltip/index.less +29 -0
- package/lib/tooltip/style/index.d.ts +3 -0
- package/lib/tooltip/style/index.d.ts.map +1 -0
- package/lib/tooltip/style/index.js +4 -0
- package/lib/tooltip/style/index.js.map +1 -0
- package/lib/tooltip/style/index.less +187 -0
- package/lib/tooltip/tooltip.d.ts +9 -0
- package/lib/tooltip/tooltip.d.ts.map +1 -0
- package/lib/tooltip/tooltip.js +53 -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.js +6 -11
- 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 +6 -5
- package/themes/common/css2.x.css +154 -0
- package/themes/common/css3.x.css +154 -0
- package/themes/common/index.less +2 -0
- package/themes/default/colors.less +12 -4
- package/themes/default/colorsVar.less +160 -0
- package/themes/default/lessToCssVar.less +127 -0
- package/themes/default/lessVars2.x.less +33 -0
- package/themes/default/lessVars3.x.less +35 -0
- package/themes/default/variables.less +35 -25
- package/themes/default/variablesVar.less +675 -0
- package/themes/utils/colorPalette.less +11 -0
- package/es/array-input/icon.js +0 -25
- package/es/array-input/icon.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/lib/array-input/icon.d.ts +0 -3
- package/lib/array-input/icon.d.ts.map +0 -1
- package/lib/array-input/icon.js +0 -34
- package/lib/array-input/icon.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/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
|
@@ -1,13 +1,13 @@
|
|
|
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"] = useRefFunc;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
11
|
// @ts-nocheck
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -7,9 +7,9 @@ exports["default"] = useSearchConfig;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
12
|
-
function _typeof(
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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); } // @ts-nocheck
|
|
13
13
|
// Convert `showSearch` to unique config
|
|
14
14
|
function useSearchConfig(showSearch) {
|
|
15
15
|
return React.useMemo(function () {
|
|
@@ -1,24 +1,23 @@
|
|
|
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"] = exports.SEARCH_MARK = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
11
|
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; }
|
|
12
|
-
function _toPropertyKey(
|
|
13
|
-
function _toPrimitive(
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
|
+
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); }
|
|
14
14
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
15
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
16
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
17
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
18
18
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
20
|
-
var SEARCH_MARK = '__rc_cascader_search_mark__';
|
|
21
|
-
exports.SEARCH_MARK = SEARCH_MARK;
|
|
19
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
|
+
var SEARCH_MARK = exports.SEARCH_MARK = '__rc_cascader_search_mark__';
|
|
22
21
|
var defaultFilter = function defaultFilter(search, options, _ref) {
|
|
23
22
|
var label = _ref.label;
|
|
24
23
|
return options.some(function (opt) {
|
|
@@ -30,7 +29,7 @@ var defaultRender = function defaultRender(inputValue, path, prefixCls, fieldNam
|
|
|
30
29
|
return opt[fieldNames.label];
|
|
31
30
|
}).join(' / ');
|
|
32
31
|
};
|
|
33
|
-
var _default = function _default(search, options, fieldNames, prefixCls, config, changeOnSelect) {
|
|
32
|
+
var _default = exports["default"] = function _default(search, options, fieldNames, prefixCls, config, changeOnSelect) {
|
|
34
33
|
var _config$filter = config.filter,
|
|
35
34
|
filter = _config$filter === void 0 ? defaultFilter : _config$filter,
|
|
36
35
|
_config$render = config.render,
|
|
@@ -60,8 +59,7 @@ var _default = function _default(search, options, fieldNames, prefixCls, config,
|
|
|
60
59
|
if (filter(search, connectedPathOptions, {
|
|
61
60
|
label: fieldNames.label
|
|
62
61
|
})) {
|
|
63
|
-
|
|
64
|
-
filteredOptions.push(Object.assign(Object.assign({}, option), (_Object$assign = {}, _defineProperty(_Object$assign, fieldNames.label, render(search, connectedPathOptions, prefixCls, fieldNames)), _defineProperty(_Object$assign, SEARCH_MARK, connectedPathOptions), _Object$assign)));
|
|
62
|
+
filteredOptions.push(Object.assign(Object.assign({}, option), _defineProperty(_defineProperty({}, fieldNames.label, render(search, connectedPathOptions, prefixCls, fieldNames)), SEARCH_MARK, connectedPathOptions)));
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
if (children) {
|
|
@@ -78,5 +76,4 @@ var _default = function _default(search, options, fieldNames, prefixCls, config,
|
|
|
78
76
|
}
|
|
79
77
|
return limit > 0 ? filteredOptions.slice(0, limit) : filteredOptions;
|
|
80
78
|
}, [search, options, fieldNames, prefixCls, render, changeOnSelect, filter, sort, limit]);
|
|
81
|
-
};
|
|
82
|
-
exports["default"] = _default;
|
|
79
|
+
};
|
|
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _Cascader = _interopRequireDefault(require("./Cascader"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
var _default = _Cascader["default"];
|
|
10
|
-
exports["default"] = _default;
|
|
9
|
+
var _default = exports["default"] = _Cascader["default"];
|
|
@@ -10,12 +10,9 @@ exports.scrollIntoParentView = scrollIntoParentView;
|
|
|
10
10
|
exports.toPathKey = toPathKey;
|
|
11
11
|
exports.toPathKeys = toPathKeys;
|
|
12
12
|
exports.toPathValueStr = toPathValueStr;
|
|
13
|
-
var VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
|
|
14
|
-
exports.
|
|
15
|
-
var
|
|
16
|
-
exports.SHOW_PARENT = SHOW_PARENT;
|
|
17
|
-
var SHOW_CHILD = 'SHOW_CHILD';
|
|
18
|
-
exports.SHOW_CHILD = SHOW_CHILD;
|
|
13
|
+
var VALUE_SPLIT = exports.VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
|
|
14
|
+
var SHOW_PARENT = exports.SHOW_PARENT = 'SHOW_PARENT';
|
|
15
|
+
var SHOW_CHILD = exports.SHOW_CHILD = 'SHOW_CHILD';
|
|
19
16
|
function toPathKey(value) {
|
|
20
17
|
return value.join(VALUE_SPLIT);
|
|
21
18
|
}
|
|
@@ -23,7 +23,7 @@ function toPathOptions(valueCells, options, fieldNames) {
|
|
|
23
23
|
var _a;
|
|
24
24
|
var currentList = options;
|
|
25
25
|
var valueOptions = [];
|
|
26
|
-
var _loop = function _loop(
|
|
26
|
+
var _loop = function _loop() {
|
|
27
27
|
var valueCell = valueCells[i];
|
|
28
28
|
var foundIndex = currentList === null || currentList === void 0 ? void 0 : currentList.findIndex(function (option) {
|
|
29
29
|
var val = option[fieldNames.value];
|
|
@@ -39,7 +39,7 @@ function toPathOptions(valueCells, options, fieldNames) {
|
|
|
39
39
|
currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];
|
|
40
40
|
};
|
|
41
41
|
for (var i = 0; i < valueCells.length; i += 1) {
|
|
42
|
-
_loop(
|
|
42
|
+
_loop();
|
|
43
43
|
}
|
|
44
44
|
return valueOptions;
|
|
45
45
|
}
|
|
@@ -9,5 +9,5 @@ export interface ErrorListProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
onVisibleChanged?: (visible: boolean) => void;
|
|
11
11
|
}
|
|
12
|
-
export default function ErrorList({ help, helpStatus, errors, warnings, className: rootClassName, fieldId, onVisibleChanged, }: ErrorListProps): JSX.Element;
|
|
12
|
+
export default function ErrorList({ help, helpStatus, errors, warnings, className: rootClassName, fieldId, onVisibleChanged, }: ErrorListProps): React.JSX.Element;
|
|
13
13
|
//# sourceMappingURL=ErrorList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorList.d.ts","sourceRoot":"","sources":["../../src/tntd-form/ErrorList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAuBhD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,UAAU,EACV,MAAmB,EACnB,QAAqB,EACrB,SAAS,EAAE,aAAa,EACxB,OAAO,EACP,gBAAgB,GACjB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"ErrorList.d.ts","sourceRoot":"","sources":["../../src/tntd-form/ErrorList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAuBhD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,UAAU,EACV,MAAmB,EACnB,QAAqB,EACrB,SAAS,EAAE,aAAa,EACxB,OAAO,EACP,gBAAgB,GACjB,EAAE,cAAc,qBAqFhB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
});
|
|
@@ -12,18 +12,18 @@ var _configProvider = require("../config-provider");
|
|
|
12
12
|
var _motion = _interopRequireDefault(require("../_util/motion"));
|
|
13
13
|
var _context = require("./context");
|
|
14
14
|
var _useDebounce = _interopRequireDefault(require("./hooks/useDebounce"));
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
18
|
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; }
|
|
19
|
-
function _toPropertyKey(
|
|
20
|
-
function _toPrimitive(
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); }
|
|
21
21
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
22
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
23
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
24
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
25
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
27
27
|
var EMPTY_LIST = [];
|
|
28
28
|
function toErrorEntity(error, errorStatus, prefix) {
|
|
29
29
|
var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
package/lib/tntd-form/Form.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import type { Options } from 'scroll-into-view-if-needed';
|
|
5
5
|
import type { SizeType } from '../config-provider/SizeContext';
|
|
6
|
-
import type { ColProps } from '../col';
|
|
6
|
+
import type { ColProps } from '../grid-v4/col';
|
|
7
7
|
import useForm, { FormInstance } from './hooks/useForm';
|
|
8
8
|
import type { FormLabelAlign } from './interface';
|
|
9
9
|
export declare type RequiredMark = boolean | 'optional';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/tntd-form/Form.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AAE9D,OAAO,KAAK,EAAE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AQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IACtC,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAyJD,QAAA,MAAM,IAAI;;;;MAEL,MAAM,YAAY,CAAA;AAEvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AAEhD,eAAe,IAAI,CAAA"}
|
package/lib/tntd-form/Form.js
CHANGED
|
@@ -24,38 +24,36 @@ Object.defineProperty(exports, "useWatch", {
|
|
|
24
24
|
});
|
|
25
25
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
26
26
|
var _rcFieldForm = _interopRequireWildcard(require("rc-field-form"));
|
|
27
|
-
var
|
|
27
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
28
|
+
var React = _react;
|
|
28
29
|
var _configProvider = require("../config-provider");
|
|
29
30
|
var _DisabledContext = _interopRequireWildcard(require("../config-provider/DisabledContext"));
|
|
30
31
|
var _SizeContext = _interopRequireWildcard(require("../config-provider/SizeContext"));
|
|
31
32
|
var _context = require("./context");
|
|
32
33
|
var _validateMessagesContext = _interopRequireDefault(require("./validateMessagesContext"));
|
|
33
34
|
var _useForm3 = _interopRequireDefault(require("./hooks/useForm"));
|
|
34
|
-
function _getRequireWildcardCache(
|
|
35
|
-
function _interopRequireWildcard(
|
|
35
|
+
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); }
|
|
36
|
+
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; }
|
|
36
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
-
function _typeof(
|
|
38
|
+
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); }
|
|
38
39
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
40
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
41
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
42
|
-
function _iterableToArrayLimit(
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
43
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
43
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
45
|
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; }
|
|
45
|
-
function _toPropertyKey(
|
|
46
|
-
function _toPrimitive(
|
|
46
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
47
|
+
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); }
|
|
47
48
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
48
49
|
var t = {};
|
|
49
|
-
for (var p in s)
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
51
|
-
}
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
52
51
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
52
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
54
53
|
}
|
|
55
54
|
return t;
|
|
56
55
|
};
|
|
57
56
|
var InternalForm = function InternalForm(props, ref) {
|
|
58
|
-
var _classNames;
|
|
59
57
|
var contextSize = React.useContext(_SizeContext["default"]);
|
|
60
58
|
var contextDisabled = React.useContext(_DisabledContext["default"]);
|
|
61
59
|
// TODO
|
|
@@ -87,7 +85,7 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
87
85
|
readonly = props.readonly,
|
|
88
86
|
restFormProps = __rest(props, ["prefixCls", "className", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "readonly"]);
|
|
89
87
|
var contextValidateMessages = React.useContext(_validateMessagesContext["default"]);
|
|
90
|
-
var mergedRequiredMark = (0,
|
|
88
|
+
var mergedRequiredMark = (0, _react.useMemo)(function () {
|
|
91
89
|
if (requiredMark !== undefined) {
|
|
92
90
|
return requiredMark;
|
|
93
91
|
}
|
|
@@ -101,13 +99,13 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
101
99
|
}, [hideRequiredMark, requiredMark, contextForm]);
|
|
102
100
|
var mergedColon = colon !== null && colon !== void 0 ? colon : contextForm === null || contextForm === void 0 ? void 0 : contextForm.colon;
|
|
103
101
|
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
104
|
-
var formClassName = (0, _classnames["default"])(prefixCls, (
|
|
102
|
+
var formClassName = (0, _classnames["default"])(prefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-tntd"), true), "".concat(prefixCls, "-").concat(layout), true), "".concat(prefixCls, "-hide-required-mark"), mergedRequiredMark === false), "".concat(prefixCls, "-rtl"), direction === 'rtl'), "".concat(prefixCls, "-").concat(size), size), className);
|
|
105
103
|
var _useForm = (0, _useForm3["default"])(form),
|
|
106
104
|
_useForm2 = _slicedToArray(_useForm, 1),
|
|
107
105
|
wrapForm = _useForm2[0];
|
|
108
106
|
var __INTERNAL__ = wrapForm.__INTERNAL__;
|
|
109
107
|
__INTERNAL__.name = name;
|
|
110
|
-
var formContextValue = (0,
|
|
108
|
+
var formContextValue = (0, _react.useMemo)(function () {
|
|
111
109
|
return {
|
|
112
110
|
name: name,
|
|
113
111
|
labelAlign: labelAlign,
|
|
@@ -137,7 +135,7 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
137
135
|
wrapForm.scrollToField(errorInfo.errorFields[0].name, defaultScrollToFirstError);
|
|
138
136
|
}
|
|
139
137
|
};
|
|
140
|
-
(0,
|
|
138
|
+
(0, _react.useEffect)(function () {
|
|
141
139
|
// set initial values
|
|
142
140
|
if (restFormProps.initialValues) {
|
|
143
141
|
form === null || form === void 0 ? void 0 : form.setFieldsValue(restFormProps.initialValues);
|
|
@@ -170,5 +168,4 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
170
168
|
}))))));
|
|
171
169
|
};
|
|
172
170
|
var Form = React.forwardRef(InternalForm);
|
|
173
|
-
var _default = Form;
|
|
174
|
-
exports["default"] = _default;
|
|
171
|
+
var _default = exports["default"] = Form;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/tntd-form/Form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAmC;AACnC,+DAAyD;AAkMvC,qFAlME,oBAAI,OAkMF;AAAgB,yFAlMZ,wBAAQ,OAkMY;AA/L9C,6CAA8B;AAC9B,iCAA0C;AAE1C,wDAAkD;AAClD,sFAA6F;AAE7F,8EAAiF;AAGjF,uCAAqD;AACrD,wFAA+D;AAC/D,8DAAuD;AAoL9C,kBApLF,iBAAO,CAoLE;AA3JhB,MAAM,YAAY,GAA4D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3F,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAW,CAAC,CAAA;IACjD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,yBAAe,CAAC,CAAA;IACzD,OAAO;IACP,aAAa;IACb,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,I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e,IAAI,CAAA","sourcesContent":["import classNames from 'classnames'\nimport FieldForm, { List, useWatch } from 'rc-field-form'\nimport type { FormProps as RcFormProps } from 'rc-field-form/lib/Form'\nimport type { ValidateErrorEntity } from 'rc-field-form/lib/interface'\nimport * as React from 'react'\nimport { useMemo, useEffect } from 'react'\nimport type { Options } from 'scroll-into-view-if-needed'\nimport { ConfigContext } from '../config-provider'\nimport DisabledContext, { DisabledContextProvider } from '../config-provider/DisabledContext'\nimport type { SizeType } from '../config-provider/SizeContext'\nimport SizeContext, { SizeContextProvider } from '../config-provider/SizeContext'\nimport type { ColProps } from '../col'\nimport type { FormContextProps } from './context'\nimport { FormContext, FormProvider } from './context'\nimport ValidateMessagesContext from './validateMessagesContext'\nimport useForm, { FormInstance } from './hooks/useForm'\nimport type { FormLabelAlign } from './interface'\n\nexport type RequiredMark = boolean | 'optional'\nexport type FormLayout = 'horizontal' | 'inline' | 'vertical'\n\nexport interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form'> {\n prefixCls?: string\n colon?: boolean\n name?: string\n layout?: FormLayout\n labelAlign?: FormLabelAlign\n labelWrap?: boolean\n labelCol?: ColProps\n wrapperCol?: ColProps\n form?: FormInstance<Values>\n size?: SizeType\n disabled?: boolean\n readonly?: boolean\n scrollToFirstError?: Options | boolean\n requiredMark?: RequiredMark\n /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */\n hideRequiredMark?: boolean\n}\n\nconst InternalForm: React.ForwardRefRenderFunction<FormInstance, FormProps> = (props, ref) => {\n const contextSize = React.useContext(SizeContext)\n const contextDisabled = React.useContext(DisabledContext)\n // TODO\n // @ts-ignore\n const { getPrefixCls, direction, form: contextForm } = React.useContext(ConfigContext)\n\n const {\n prefixCls: customizePrefixCls,\n className = '',\n size = contextSize,\n disabled = contextDisabled,\n form,\n colon,\n labelAlign,\n labelWrap,\n labelCol,\n wrapperCol,\n hideRequiredMark,\n layout = 'horizontal',\n scrollToFirstError,\n requiredMark,\n onFinishFailed,\n name,\n readonly,\n ...restFormProps\n } = props\n\n const contextValidateMessages = React.useContext(ValidateMessagesContext)\n\n const mergedRequiredMark = useMemo(() => {\n if (requiredMark !== undefined) {\n return requiredMark\n }\n\n if (contextForm && contextForm.requiredMark !== undefined) {\n return contextForm.requiredMark\n }\n\n if (hideRequiredMark) {\n return false\n }\n\n return true\n }, [hideRequiredMark, requiredMark, contextForm])\n\n const mergedColon = colon ?? contextForm?.colon\n\n const prefixCls = getPrefixCls('form', customizePrefixCls)\n\n const formClassName = classNames(\n prefixCls,\n {\n [`${prefixCls}-tntd`]: true,\n [`${prefixCls}-${layout}`]: true,\n [`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${size}`]: size,\n },\n className\n )\n\n const [wrapForm] = useForm(form)\n const { __INTERNAL__ } = wrapForm\n __INTERNAL__.name = name\n\n const formContextValue = useMemo<FormContextProps>(\n () => ({\n name,\n labelAlign,\n labelCol,\n labelWrap,\n wrapperCol,\n vertical: layout === 'vertical',\n colon: mergedColon,\n requiredMark: mergedRequiredMark,\n itemRef: __INTERNAL__.itemRef,\n form: wrapForm,\n readonly,\n }),\n [\n name,\n labelAlign,\n labelCol,\n labelWrap,\n wrapperCol,\n layout,\n mergedColon,\n mergedRequiredMark,\n wrapForm,\n readonly,\n ]\n )\n\n React.useImperativeHandle(ref, () => wrapForm)\n\n const onInternalFinishFailed = (errorInfo: ValidateErrorEntity) => {\n onFinishFailed?.(errorInfo)\n\n let defaultScrollToFirstError: Options = { block: 'nearest' }\n\n if (scrollToFirstError && errorInfo.errorFields.length) {\n if (typeof scrollToFirstError === 'object') {\n defaultScrollToFirstError = scrollToFirstError\n }\n wrapForm.scrollToField(errorInfo.errorFields[0].name, defaultScrollToFirstError)\n }\n }\n\n useEffect(() => {\n // set initial values\n if (restFormProps.initialValues) {\n form?.setFieldsValue(restFormProps.initialValues)\n }\n\n // clear form fields value after unmount\n return () =>\n form?.setFieldsValue(\n Object.keys(form?.getFieldsValue() || {}).reduce((acc: any, cur: string) => {\n acc[cur] = undefined\n return acc\n }, {})\n )\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return (\n <DisabledContextProvider disabled={disabled}>\n <SizeContextProvider size={size}>\n <FormProvider\n {...{\n // This is not list in API, we pass with spread\n validateMessages: contextValidateMessages,\n }}\n >\n <FormContext.Provider value={formContextValue}>\n <FieldForm\n id={name}\n {...restFormProps}\n name={name}\n onFinishFailed={onInternalFinishFailed}\n form={wrapForm}\n className={formClassName}\n />\n </FormContext.Provider>\n </FormProvider>\n </SizeContextProvider>\n </DisabledContextProvider>\n )\n}\n\nconst Form = React.forwardRef<FormInstance, FormProps>(InternalForm) as <Values = any>(\n props: React.PropsWithChildren<FormProps<Values>> & { ref?: React.Ref<FormInstance<Values>> }\n) => React.ReactElement\n\nexport { useForm, List, FormInstance, useWatch }\n\nexport default Form\n"]}
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/tntd-form/Form.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAmC;AACnC,+DAAyD;AAkMvC,qFAlME,oBAAI,OAkMF;AAAgB,yFAlMZ,wBAAQ,OAkMY;AA/L9C,6CAA8B;AAC9B,iCAA0C;AAE1C,wDAAkD;AAClD,sFAA6F;AAE7F,8EAAiF;AAGjF,uCAAqD;AACrD,wFAA+D;AAC/D,8DAAuD;AAoL9C,kBApLF,iBAAO,CAoLE;AA3JhB,MAAM,YAAY,GAA4D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3F,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAW,CAAC,CAAA;IACjD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,yBAAe,CAAC,CAAA;IACzD,OAAO;IACP,aAAa;IACb,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,WAA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sourcesContent":["import classNames from 'classnames'\nimport FieldForm, { List, useWatch } from 'rc-field-form'\nimport type { FormProps as RcFormProps } from 'rc-field-form/lib/Form'\nimport type { ValidateErrorEntity } from 'rc-field-form/lib/interface'\nimport * as React from 'react'\nimport { useMemo, useEffect } from 'react'\nimport type { Options } from 'scroll-into-view-if-needed'\nimport { ConfigContext } from '../config-provider'\nimport DisabledContext, { DisabledContextProvider } from '../config-provider/DisabledContext'\nimport type { SizeType } from '../config-provider/SizeContext'\nimport SizeContext, { SizeContextProvider } from '../config-provider/SizeContext'\nimport type { ColProps } from '../grid-v4/col'\nimport type { FormContextProps } from './context'\nimport { FormContext, FormProvider } from './context'\nimport ValidateMessagesContext from './validateMessagesContext'\nimport useForm, { FormInstance } from './hooks/useForm'\nimport type { FormLabelAlign } from './interface'\n\nexport type RequiredMark = boolean | 'optional'\nexport type FormLayout = 'horizontal' | 'inline' | 'vertical'\n\nexport interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form'> {\n prefixCls?: string\n colon?: boolean\n name?: string\n layout?: FormLayout\n labelAlign?: FormLabelAlign\n labelWrap?: boolean\n labelCol?: ColProps\n wrapperCol?: ColProps\n form?: FormInstance<Values>\n size?: SizeType\n disabled?: boolean\n readonly?: boolean\n scrollToFirstError?: Options | boolean\n requiredMark?: RequiredMark\n /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */\n hideRequiredMark?: boolean\n}\n\nconst InternalForm: React.ForwardRefRenderFunction<FormInstance, FormProps> = (props, ref) => {\n const contextSize = React.useContext(SizeContext)\n const contextDisabled = React.useContext(DisabledContext)\n // TODO\n // @ts-ignore\n const { getPrefixCls, direction, form: contextForm } = React.useContext(ConfigContext)\n\n const {\n prefixCls: customizePrefixCls,\n className = '',\n size = contextSize,\n disabled = contextDisabled,\n form,\n colon,\n labelAlign,\n labelWrap,\n labelCol,\n wrapperCol,\n hideRequiredMark,\n layout = 'horizontal',\n scrollToFirstError,\n requiredMark,\n onFinishFailed,\n name,\n readonly,\n ...restFormProps\n } = props\n\n const contextValidateMessages = React.useContext(ValidateMessagesContext)\n\n const mergedRequiredMark = useMemo(() => {\n if (requiredMark !== undefined) {\n return requiredMark\n }\n\n if (contextForm && contextForm.requiredMark !== undefined) {\n return contextForm.requiredMark\n }\n\n if (hideRequiredMark) {\n return false\n }\n\n return true\n }, [hideRequiredMark, requiredMark, contextForm])\n\n const mergedColon = colon ?? contextForm?.colon\n\n const prefixCls = getPrefixCls('form', customizePrefixCls)\n\n const formClassName = classNames(\n prefixCls,\n {\n [`${prefixCls}-tntd`]: true,\n [`${prefixCls}-${layout}`]: true,\n [`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${size}`]: size,\n },\n className\n )\n\n const [wrapForm] = useForm(form)\n const { __INTERNAL__ } = wrapForm\n __INTERNAL__.name = name\n\n const formContextValue = useMemo<FormContextProps>(\n () => ({\n name,\n labelAlign,\n labelCol,\n labelWrap,\n wrapperCol,\n vertical: layout === 'vertical',\n colon: mergedColon,\n requiredMark: mergedRequiredMark,\n itemRef: __INTERNAL__.itemRef,\n form: wrapForm,\n readonly,\n }),\n [\n name,\n labelAlign,\n labelCol,\n labelWrap,\n wrapperCol,\n layout,\n mergedColon,\n mergedRequiredMark,\n wrapForm,\n readonly,\n ]\n )\n\n React.useImperativeHandle(ref, () => wrapForm)\n\n const onInternalFinishFailed = (errorInfo: ValidateErrorEntity) => {\n onFinishFailed?.(errorInfo)\n\n let defaultScrollToFirstError: Options = { block: 'nearest' }\n\n if (scrollToFirstError && errorInfo.errorFields.length) {\n if (typeof scrollToFirstError === 'object') {\n defaultScrollToFirstError = scrollToFirstError\n }\n wrapForm.scrollToField(errorInfo.errorFields[0].name, defaultScrollToFirstError)\n }\n }\n\n useEffect(() => {\n // set initial values\n if (restFormProps.initialValues) {\n form?.setFieldsValue(restFormProps.initialValues)\n }\n\n // clear form fields value after unmount\n return () =>\n form?.setFieldsValue(\n Object.keys(form?.getFieldsValue() || {}).reduce((acc: any, cur: string) => {\n acc[cur] = undefined\n return acc\n }, {})\n )\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return (\n <DisabledContextProvider disabled={disabled}>\n <SizeContextProvider size={size}>\n <FormProvider\n {...{\n // This is not list in API, we pass with spread\n validateMessages: contextValidateMessages,\n }}\n >\n <FormContext.Provider value={formContextValue}>\n <FieldForm\n id={name}\n {...restFormProps}\n name={name}\n onFinishFailed={onInternalFinishFailed}\n form={wrapForm}\n className={formClassName}\n />\n </FormContext.Provider>\n </FormProvider>\n </SizeContextProvider>\n </DisabledContextProvider>\n )\n}\n\nconst Form = React.forwardRef<FormInstance, FormProps>(InternalForm) as <Values = any>(\n props: React.PropsWithChildren<FormProps<Values>> & { ref?: React.Ref<FormInstance<Values>> }\n) => React.ReactElement\n\nexport { useForm, List, FormInstance, useWatch }\n\nexport default Form\n"]}
|
|
@@ -14,5 +14,5 @@ export interface ItemHolderProps extends FormItemProps {
|
|
|
14
14
|
isRequired?: boolean;
|
|
15
15
|
onSubItemMetaChange: ReportMetaChange;
|
|
16
16
|
}
|
|
17
|
-
export default function ItemHolder(props: ItemHolderProps): JSX.Element;
|
|
17
|
+
export default function ItemHolder(props: ItemHolderProps): React.JSX.Element;
|
|
18
18
|
//# sourceMappingURL=ItemHolder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemHolder.d.ts","sourceRoot":"","sources":["../../../src/tntd-form/FormItem/ItemHolder.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAIvD,OAAO,KAAK,EAA8B,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,GAAG,CAAA;AAWtD,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,SAAS,EA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OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,qBA2KxD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
});
|
|
@@ -9,29 +9,27 @@ var _useLayoutEffect = _interopRequireDefault(require("rc-util/lib/hooks/useLayo
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _omit = _interopRequireDefault(require("rc-util/lib/omit"));
|
|
12
|
-
var
|
|
12
|
+
var _gridV = require("../../grid-v4");
|
|
13
13
|
var _FormItemLabel = _interopRequireDefault(require("../FormItemLabel"));
|
|
14
14
|
var _FormItemInput = _interopRequireDefault(require("../FormItemInput"));
|
|
15
15
|
var _context = require("../context");
|
|
16
16
|
var _useDebounce = _interopRequireDefault(require("../hooks/useDebounce"));
|
|
17
17
|
var _icon = _interopRequireDefault(require("../../icon"));
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
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; }
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
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; }
|
|
22
|
-
function _toPropertyKey(
|
|
23
|
-
function _toPrimitive(
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
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); }
|
|
24
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
25
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
26
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
28
|
-
function _iterableToArrayLimit(
|
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
28
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
29
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
30
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
31
31
|
var t = {};
|
|
32
|
-
for (var p in s)
|
|
33
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
34
|
-
}
|
|
32
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
35
33
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
36
34
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
37
35
|
}
|
|
@@ -60,7 +58,6 @@ var iconMap = {
|
|
|
60
58
|
}
|
|
61
59
|
};
|
|
62
60
|
function ItemHolder(props) {
|
|
63
|
-
var _itemClassName;
|
|
64
61
|
var prefixCls = props.prefixCls,
|
|
65
62
|
className = props.className,
|
|
66
63
|
style = props.style,
|
|
@@ -129,12 +126,12 @@ function ItemHolder(props) {
|
|
|
129
126
|
};
|
|
130
127
|
}, [mergedValidateStatus, hasFeedback]);
|
|
131
128
|
// ======================== Render ========================
|
|
132
|
-
var itemClassName = (
|
|
129
|
+
var itemClassName = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, itemPrefixCls, true), "".concat(itemPrefixCls, "-with-help"), hasHelp || debounceErrors.length || debounceWarnings.length), "".concat(className), !!className), "".concat(itemPrefixCls, "-has-feedback has-feedback"), mergedValidateStatus && hasFeedback), "".concat(itemPrefixCls, "-has-success has-success"), mergedValidateStatus === 'success'), "".concat(itemPrefixCls, "-has-warning has-warning"), mergedValidateStatus === 'warning'), "".concat(itemPrefixCls, "-has-error has-error"), mergedValidateStatus === 'error'), "".concat(itemPrefixCls, "-is-validating is-validating"), mergedValidateStatus === 'validating'), "".concat(itemPrefixCls, "-hidden hidden"), hidden);
|
|
133
130
|
return React.createElement("div", {
|
|
134
131
|
className: (0, _classnames["default"])(itemClassName),
|
|
135
132
|
style: style,
|
|
136
133
|
ref: itemRef
|
|
137
|
-
}, React.createElement(
|
|
134
|
+
}, React.createElement(_gridV.Row, Object.assign({
|
|
138
135
|
className: "".concat(itemPrefixCls, "-row")
|
|
139
136
|
}, (0, _omit["default"])(restProps, ['_internalItemRender', 'colon', 'dependencies', 'extra', 'fieldKey', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id', 'initialValue', 'isListField', 'label', 'labelAlign', 'labelCol', 'labelWrap', 'messageVariables', 'name', 'normalize', 'noStyle', 'preserve', 'required', 'requiredMark', 'rules', 'shouldUpdate', 'trigger', 'tooltip', 'validateFirst', 'validateTrigger', 'valuePropName', 'wrapperCol'])), React.createElement(_FormItemLabel["default"], Object.assign({
|
|
140
137
|
htmlFor: fieldId,
|
|
@@ -154,10 +151,5 @@ function ItemHolder(props) {
|
|
|
154
151
|
value: onSubItemMetaChange
|
|
155
152
|
}, React.createElement(_context.FormItemInputContext.Provider, {
|
|
156
153
|
value: formItemStatusContext
|
|
157
|
-
}, children))))
|
|
158
|
-
className: "".concat(itemPrefixCls, "-margin-offset"),
|
|
159
|
-
style: {
|
|
160
|
-
marginBottom: -marginBottom
|
|
161
|
-
}
|
|
162
|
-
}));
|
|
154
|
+
}, children)))));
|
|
163
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemHolder.js","sourceRoot":"","sources":["../../../src/tntd-form/FormItem/ItemHolder.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA+D;AAC/D,4DAAmC;AACnC,6CAA8B;AAC9B,4DAAmC;AAEnC,qCAAgC;AAChC,qEAA4C;AAC5C,qEAA4C;AAE5C,wCAAkF;AAElF,uEAA8C;AAC9C,sDAA6B;AAE7B,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,cAAc,GAAG;IAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,oBAAoB,GAAG;IACjD,KAAK,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,cAAc,GAAG;IACzC,UAAU,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,SAAS,GAAG;CAC1C,CAAA;AAeD,SAAwB,UAAU,CAAC,KAAsB;IACvD,MAAM,EACJ,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,WAAW,EACX,MAAM,EACN,QAAQ,EACR,OAAO,EACP,UAAU,EACV,mBAAmB,KAEjB,KAAK,EADJ,SAAS,UACV,KAAK,EAhBH,gLAgBL,CAAQ,CAAA;IAET,MAAM,aAAa,GAAG,GAAG,SAAS,OAAO,CAAA;IACzC,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAW,CAAC,CAAA;IAEtD,2DAA2D;IAC3D,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAiB,IAA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Y;aAC5B,GACD,CACH,CACG,CACP,CAAA;AACH,CAAC;AA3KD,6BA2KC","sourcesContent":["import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect'\nimport classNames from 'classnames'\nimport * as React from 'react'\nimport omit from 'rc-util/lib/omit'\nimport type { Meta } from 'rc-field-form/lib/interface'\nimport { Row } from '../../grid'\nimport FormItemLabel from '../FormItemLabel'\nimport FormItemInput from '../FormItemInput'\nimport type { FormItemStatusContextProps, ReportMetaChange } from '../context'\nimport { FormContext, FormItemInputContext, NoStyleItemContext } from '../context'\nimport type { FormItemProps, ValidateStatus } from '.'\nimport useDebounce from '../hooks/useDebounce'\nimport Icon from '../../icon'\n\nconst iconMap = {\n success: () => <Icon type=\"check-circle\" />,\n warning: () => <Icon type=\"exclamation-circle\" />,\n error: () => <Icon type=\"close-circle\" />,\n validating: () => <Icon type=\"loading\" />,\n}\n\nexport interface ItemHolderProps extends FormItemProps {\n prefixCls: string\n className?: string\n style?: React.CSSProperties\n errors: React.ReactNode[]\n warnings: React.ReactNode[]\n meta: Meta\n children?: React.ReactNode\n fieldId?: string\n isRequired?: boolean\n onSubItemMetaChange: ReportMetaChange\n}\n\nexport default function ItemHolder(props: ItemHolderProps) {\n const {\n prefixCls,\n className,\n style,\n help,\n errors,\n warnings,\n validateStatus,\n meta,\n hasFeedback,\n hidden,\n children,\n fieldId,\n isRequired,\n onSubItemMetaChange,\n ...restProps\n } = props\n\n const itemPrefixCls = `${prefixCls}-item`\n const { requiredMark } = React.useContext(FormContext)\n\n // ======================== Margin ========================\n const itemRef = React.useRef<HTMLDivElement>(null)\n const debounceErrors = useDebounce(errors)\n const debounceWarnings = useDebounce(warnings)\n const hasHelp = help !== undefined && help !== null\n const hasError = !!(hasHelp || errors.length || warnings.length)\n const [marginBottom, setMarginBottom] = React.useState<number | null>(null)\n\n useLayoutEffect(() => {\n if (hasError && itemRef.current) {\n const itemStyle = getComputedStyle(itemRef.current)\n setMarginBottom(parseInt(itemStyle.marginBottom, 10))\n }\n }, [hasError])\n\n const onErrorVisibleChanged = (nextVisible: boolean) => {\n if (!nextVisible) {\n setMarginBottom(null)\n }\n }\n\n // ======================== Status ========================\n let mergedValidateStatus: ValidateStatus = ''\n if (validateStatus !== undefined) {\n mergedValidateStatus = validateStatus\n } else if (meta.validating) {\n mergedValidateStatus = 'validating'\n } else if (debounceErrors.length) {\n mergedValidateStatus = 'error'\n } else if (debounceWarnings.length) {\n mergedValidateStatus = 'warning'\n } else if (meta.touched) {\n mergedValidateStatus = 'success'\n }\n\n const formItemStatusContext = React.useMemo<FormItemStatusContextProps>(() => {\n let feedbackIcon: React.ReactNode\n if (hasFeedback) {\n const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus]\n feedbackIcon = IconNode ? (\n <span\n className={classNames(\n `${itemPrefixCls}-feedback-icon`,\n `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`\n )}\n >\n <IconNode />\n </span>\n ) : null\n }\n\n return {\n status: mergedValidateStatus,\n hasFeedback,\n feedbackIcon,\n isFormItemInput: true,\n }\n }, [mergedValidateStatus, hasFeedback])\n\n // ======================== Render ========================\n const itemClassName = {\n [itemPrefixCls]: true,\n [`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,\n [`${className}`]: !!className,\n\n // Status\n [`${itemPrefixCls}-has-feedback has-feedback`]: mergedValidateStatus && hasFeedback,\n [`${itemPrefixCls}-has-success has-success`]: mergedValidateStatus === 'success',\n [`${itemPrefixCls}-has-warning has-warning`]: mergedValidateStatus === 'warning',\n [`${itemPrefixCls}-has-error has-error`]: mergedValidateStatus === 'error',\n [`${itemPrefixCls}-is-validating is-validating`]: mergedValidateStatus === 'validating',\n [`${itemPrefixCls}-hidden hidden`]: hidden,\n }\n\n return (\n <div className={classNames(itemClassName)} style={style} ref={itemRef}>\n <Row\n className={`${itemPrefixCls}-row`}\n {...omit(restProps, [\n '_internalItemRender' as any,\n 'colon',\n 'dependencies',\n 'extra',\n 'fieldKey',\n 'getValueFromEvent',\n 'getValueProps',\n 'htmlFor',\n 'id', // It is deprecated because `htmlFor` is its replacement.\n 'initialValue',\n 'isListField',\n 'label',\n 'labelAlign',\n 'labelCol',\n 'labelWrap',\n 'messageVariables',\n 'name',\n 'normalize',\n 'noStyle',\n 'preserve',\n 'required',\n 'requiredMark',\n 'rules',\n 'shouldUpdate',\n 'trigger',\n 'tooltip',\n 'validateFirst',\n 'validateTrigger',\n 'valuePropName',\n 'wrapperCol',\n ])}\n >\n {/* Label */}\n <FormItemLabel\n htmlFor={fieldId}\n required={isRequired}\n requiredMark={requiredMark}\n {...props}\n prefixCls={prefixCls}\n />\n {/* Input Group */}\n <FormItemInput\n {...props}\n {...meta}\n errors={debounceErrors}\n warnings={debounceWarnings}\n prefixCls={prefixCls}\n status={mergedValidateStatus}\n help={help}\n marginBottom={marginBottom}\n onErrorVisibleChanged={onErrorVisibleChanged}\n >\n <NoStyleItemContext.Provider value={onSubItemMetaChange}>\n <FormItemInputContext.Provider value={formItemStatusContext}>\n {children}\n </FormItemInputContext.Provider>\n </NoStyleItemContext.Provider>\n </FormItemInput>\n </Row>\n\n {!!marginBottom && (\n <div\n className={`${itemPrefixCls}-margin-offset`}\n style={{\n marginBottom: -marginBottom,\n }}\n />\n )}\n </div>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ItemHolder.js","sourceRoot":"","sources":["../../../src/tntd-form/FormItem/ItemHolder.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA+D;AAC/D,4DAAmC;AACnC,6CAA8B;AAC9B,4DAAmC;AAEnC,2CAAmC;AACnC,qEAA4C;AAC5C,qEAA4C;AAE5C,wCAAkF;AAElF,uEAA8C;AAC9C,sDAA6B;AAE7B,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAI,IAAC,IAAI,EAAC,cAAc,GAAG;IAC3C,OAAO,EAAE,GAAG,EAAE,CAA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BAAiB;YACjB,eAAe;YACf,YAAY;SACb,CAAC;YAGF,oBAAC,uBAAa,kBACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,YAAY,IACtB,KAAK,IACT,SAAS,EAAE,SAAS,IACpB;YAEF,oBAAC,uBAAa,oBACR,KAAK,EACL,IAAI,IACR,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,oBAAoB,EAC5B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,qBAAqB,EAAE,qBAAqB;gBAE5C,oBAAC,4BAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,mBAAmB;oBACrD,oBAAC,8BAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,qBAAqB,IACxD,QAAQ,CACqB,CACJ,CAChB,CACZ,CAUF,CACP,CAAA;AACH,CAAC;AA3KD,6BA2KC","sourcesContent":["import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect'\nimport classNames from 'classnames'\nimport * as React from 'react'\nimport omit from 'rc-util/lib/omit'\nimport type { Meta } from 'rc-field-form/lib/interface'\nimport { Row } from '../../grid-v4'\nimport FormItemLabel from '../FormItemLabel'\nimport FormItemInput from '../FormItemInput'\nimport type { FormItemStatusContextProps, ReportMetaChange } from '../context'\nimport { FormContext, FormItemInputContext, NoStyleItemContext } from '../context'\nimport type { FormItemProps, ValidateStatus } from '.'\nimport useDebounce from '../hooks/useDebounce'\nimport Icon from '../../icon'\n\nconst iconMap = {\n success: () => <Icon type=\"check-circle\" />,\n warning: () => <Icon type=\"exclamation-circle\" />,\n error: () => <Icon type=\"close-circle\" />,\n validating: () => <Icon type=\"loading\" />,\n}\n\nexport interface ItemHolderProps extends FormItemProps {\n prefixCls: string\n className?: string\n style?: React.CSSProperties\n errors: React.ReactNode[]\n warnings: React.ReactNode[]\n meta: Meta\n children?: React.ReactNode\n fieldId?: string\n isRequired?: boolean\n onSubItemMetaChange: ReportMetaChange\n}\n\nexport default function ItemHolder(props: ItemHolderProps) {\n const {\n prefixCls,\n className,\n style,\n help,\n errors,\n warnings,\n validateStatus,\n meta,\n hasFeedback,\n hidden,\n children,\n fieldId,\n isRequired,\n onSubItemMetaChange,\n ...restProps\n } = props\n\n const itemPrefixCls = `${prefixCls}-item`\n const { requiredMark } = React.useContext(FormContext)\n\n // ======================== Margin ========================\n const itemRef = React.useRef<HTMLDivElement>(null)\n const debounceErrors = useDebounce(errors)\n const debounceWarnings = useDebounce(warnings)\n const hasHelp = help !== undefined && help !== null\n const hasError = !!(hasHelp || errors.length || warnings.length)\n const [marginBottom, setMarginBottom] = React.useState<number | null>(null)\n\n useLayoutEffect(() => {\n if (hasError && itemRef.current) {\n const itemStyle = getComputedStyle(itemRef.current)\n setMarginBottom(parseInt(itemStyle.marginBottom, 10))\n }\n }, [hasError])\n\n const onErrorVisibleChanged = (nextVisible: boolean) => {\n if (!nextVisible) {\n setMarginBottom(null)\n }\n }\n\n // ======================== Status ========================\n let mergedValidateStatus: ValidateStatus = ''\n if (validateStatus !== undefined) {\n mergedValidateStatus = validateStatus\n } else if (meta.validating) {\n mergedValidateStatus = 'validating'\n } else if (debounceErrors.length) {\n mergedValidateStatus = 'error'\n } else if (debounceWarnings.length) {\n mergedValidateStatus = 'warning'\n } else if (meta.touched) {\n mergedValidateStatus = 'success'\n }\n\n const formItemStatusContext = React.useMemo<FormItemStatusContextProps>(() => {\n let feedbackIcon: React.ReactNode\n if (hasFeedback) {\n const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus]\n feedbackIcon = IconNode ? (\n <span\n className={classNames(\n `${itemPrefixCls}-feedback-icon`,\n `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`\n )}\n >\n <IconNode />\n </span>\n ) : null\n }\n\n return {\n status: mergedValidateStatus,\n hasFeedback,\n feedbackIcon,\n isFormItemInput: true,\n }\n }, [mergedValidateStatus, hasFeedback])\n\n // ======================== Render ========================\n const itemClassName = {\n [itemPrefixCls]: true,\n [`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,\n [`${className}`]: !!className,\n\n // Status\n [`${itemPrefixCls}-has-feedback has-feedback`]: mergedValidateStatus && hasFeedback,\n [`${itemPrefixCls}-has-success has-success`]: mergedValidateStatus === 'success',\n [`${itemPrefixCls}-has-warning has-warning`]: mergedValidateStatus === 'warning',\n [`${itemPrefixCls}-has-error has-error`]: mergedValidateStatus === 'error',\n [`${itemPrefixCls}-is-validating is-validating`]: mergedValidateStatus === 'validating',\n [`${itemPrefixCls}-hidden hidden`]: hidden,\n }\n\n return (\n <div className={classNames(itemClassName)} style={style} ref={itemRef}>\n <Row\n className={`${itemPrefixCls}-row`}\n {...omit(restProps, [\n '_internalItemRender' as any,\n 'colon',\n 'dependencies',\n 'extra',\n 'fieldKey',\n 'getValueFromEvent',\n 'getValueProps',\n 'htmlFor',\n 'id', // It is deprecated because `htmlFor` is its replacement.\n 'initialValue',\n 'isListField',\n 'label',\n 'labelAlign',\n 'labelCol',\n 'labelWrap',\n 'messageVariables',\n 'name',\n 'normalize',\n 'noStyle',\n 'preserve',\n 'required',\n 'requiredMark',\n 'rules',\n 'shouldUpdate',\n 'trigger',\n 'tooltip',\n 'validateFirst',\n 'validateTrigger',\n 'valuePropName',\n 'wrapperCol',\n ])}\n >\n {/* Label */}\n <FormItemLabel\n htmlFor={fieldId}\n required={isRequired}\n requiredMark={requiredMark}\n {...props}\n prefixCls={prefixCls}\n />\n {/* Input Group */}\n <FormItemInput\n {...props}\n {...meta}\n errors={debounceErrors}\n warnings={debounceWarnings}\n prefixCls={prefixCls}\n status={mergedValidateStatus}\n help={help}\n marginBottom={marginBottom}\n onErrorVisibleChanged={onErrorVisibleChanged}\n >\n <NoStyleItemContext.Provider value={onSubItemMetaChange}>\n <FormItemInputContext.Provider value={formItemStatusContext}>\n {children}\n </FormItemInputContext.Provider>\n </NoStyleItemContext.Provider>\n </FormItemInput>\n </Row>\n\n {/* {!!marginBottom && (\n <div\n className={`${itemPrefixCls}-margin-offset`}\n style={{\n marginBottom: -marginBottom,\n }}\n />\n )} */}\n </div>\n )\n}\n"]}
|