tntd 2.7.34 → 2.8.0-beta.10
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/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 +40 -26
- package/es/descriptions/descriptions.js.map +1 -1
- package/es/descriptions/descriptions.less +104 -16
- 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 +144 -0
- package/es/divider/index.js +1 -1
- package/es/divider/index.js.map +1 -1
- package/es/divider/style/index.js +2 -0
- package/es/divider/style/index.js.map +1 -0
- package/es/divider/style/index.less +109 -0
- package/es/drawer/drawer.js +102 -13
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/drawer.less +1 -1
- package/es/drawer/index.js +2 -2
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/index.less +157 -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 +3 -5
- package/es/form/form.js.map +1 -1
- package/es/form/index.js +1 -1
- package/es/form/index.js.map +1 -1
- package/es/form/style/index.js +4 -0
- package/es/form/style/index.js.map +1 -0
- package/es/form/style/index.less +653 -0
- package/es/form/style/mixin.less +126 -0
- package/es/grid/index.js +3 -13
- package/es/grid/index.js.map +1 -1
- package/es/grid/style/index.js +1 -1
- package/es/grid/style/index.js.map +1 -1
- package/es/grid/style/index.less +24 -26
- package/es/grid/style/mixin.less +63 -19
- package/es/grid-v4/RowContext.js.map +1 -0
- package/es/grid-v4/col.js.map +1 -0
- package/es/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/es/grid-v4/index.js +14 -0
- package/es/grid-v4/index.js.map +1 -0
- package/{lib/grid → es/grid-v4}/row.js.map +1 -1
- package/es/grid-v4/style/index.js +2 -0
- package/es/grid-v4/style/index.js.map +1 -0
- package/es/grid-v4/style/index.less +124 -0
- package/es/grid-v4/style/mixin.less +57 -0
- package/es/icon/IconFont.js +52 -0
- package/es/icon/IconFont.js.map +1 -0
- package/es/icon/components/Icon.js +106 -0
- package/es/icon/components/Icon.js.map +1 -0
- package/es/icon/components/index.js +1 -0
- package/es/icon/components/index.js.map +1 -0
- package/es/icon/components/utils.js +79 -0
- package/es/icon/components/utils.js.map +1 -0
- package/es/icon/index.js +115 -3
- 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/twoTonePrimaryColor.js +10 -0
- package/es/icon/twoTonePrimaryColor.js.map +1 -0
- package/es/icon/utils.js +64 -0
- package/es/icon/utils.js.map +1 -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 +7 -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/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 +8 -1
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +8 -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 +96 -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 +169 -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/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/index.js +1 -1
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.js +10 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/style/index.less +800 -0
- package/es/table/style/size.less +179 -0
- package/es/table/table.js +1 -3
- package/es/table/table.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 +43 -0
- package/es/tag/index.js +12 -3
- package/es/tag/index.js.map +1 -1
- package/es/tag/style/index.js +2 -0
- package/es/tag/style/index.js.map +1 -0
- package/es/tag/style/index.less +106 -0
- package/es/tag/tag.js +171 -0
- package/es/tag/tag.js.map +1 -0
- package/es/tag/tag.less +193 -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/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 +1 -1
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/es/tntd-form/FormItemInput.js +1 -1
- package/es/tntd-form/FormItemInput.js.map +1 -1
- package/es/tntd-form/FormItemLabel.js +1 -1
- package/es/tntd-form/FormItemLabel.js.map +1 -1
- package/es/tntd-form/context.js.map +1 -1
- package/es/tntd-form/style/index.js +1 -1
- package/es/tntd-form/style/index.js.map +1 -1
- package/es/tntd-form/style/index.less +1 -1
- package/es/tntd-form/style/rtl.less +3 -3
- package/es/tntd-layout/index.js +0 -1
- package/es/tntd-rc-select/_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 +0 -1
- package/es/tooltip/index.js +1 -1
- package/es/tooltip/index.js.map +1 -1
- 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/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/icon.d.ts +3 -2
- package/lib/array-input/icon.d.ts.map +1 -1
- package/lib/array-input/icon.js +3 -5
- package/lib/array-input/index.d.ts +2 -1
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +8 -10
- package/lib/auth-context/index.js +2 -3
- package/lib/auto-complete/index.d.ts +1 -1
- package/lib/auto-complete/index.d.ts.map +1 -1
- package/lib/auto-complete/index.js +5 -6
- package/lib/auto-complete/index.js.map +1 -1
- package/lib/auto-complete/style/index.d.ts +5 -0
- package/lib/auto-complete/style/index.d.ts.map +1 -0
- package/lib/auto-complete/style/index.js +6 -0
- package/lib/auto-complete/style/index.js.map +1 -0
- package/lib/auto-complete/style/index.less +92 -0
- package/lib/avatar/index.d.ts +1 -1
- package/lib/avatar/index.d.ts.map +1 -1
- package/lib/avatar/index.js +5 -6
- package/lib/avatar/index.js.map +1 -1
- package/lib/avatar/style/index.d.ts +3 -0
- package/lib/avatar/style/index.d.ts.map +1 -0
- package/lib/avatar/style/index.js +4 -0
- package/lib/avatar/style/index.js.map +1 -0
- package/lib/avatar/style/index.less +59 -0
- package/lib/back-top/index.d.ts +1 -1
- package/lib/back-top/index.d.ts.map +1 -1
- package/lib/back-top/index.js +5 -6
- package/lib/back-top/index.js.map +1 -1
- package/lib/back-top/style/index.d.ts +3 -0
- package/lib/back-top/style/index.d.ts.map +1 -0
- package/lib/back-top/style/index.js +4 -0
- package/lib/back-top/style/index.js.map +1 -0
- package/lib/back-top/style/index.less +42 -0
- package/lib/back-top/style/responsive.less +11 -0
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.d.ts.map +1 -1
- package/lib/badge/index.js +5 -6
- package/lib/badge/index.js.map +1 -1
- package/lib/badge/style/index.d.ts +3 -0
- package/lib/badge/style/index.d.ts.map +1 -0
- package/lib/badge/style/index.js +4 -0
- package/lib/badge/style/index.js.map +1 -0
- package/lib/badge/style/index.less +190 -0
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts.map +1 -1
- package/lib/breadcrumb/index.js +5 -6
- package/lib/breadcrumb/index.js.map +1 -1
- package/lib/breadcrumb/style/index.d.ts +5 -0
- package/lib/breadcrumb/style/index.d.ts.map +1 -0
- package/lib/breadcrumb/style/index.js +6 -0
- package/lib/breadcrumb/style/index.js.map +1 -0
- package/lib/breadcrumb/style/index.less +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 +10 -4
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +41 -30
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/descriptions.less +104 -16
- 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 +144 -0
- package/lib/development-login/LoginModal.d.ts +2 -1
- package/lib/development-login/LoginModal.d.ts.map +1 -1
- package/lib/development-login/LoginModal.js +9 -10
- package/lib/development-login/index.d.ts +2 -1
- package/lib/development-login/index.d.ts.map +1 -1
- package/lib/development-login/index.js +9 -8
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.d.ts.map +1 -1
- package/lib/divider/index.js +5 -6
- package/lib/divider/index.js.map +1 -1
- package/lib/divider/style/index.d.ts +3 -0
- package/lib/divider/style/index.d.ts.map +1 -0
- package/lib/divider/style/index.js +4 -0
- package/lib/divider/style/index.js.map +1 -0
- package/lib/divider/style/index.less +109 -0
- package/lib/drawer/drawer.d.ts +25 -2
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +115 -22
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/drawer.less +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 +157 -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.js +10 -15
- package/lib/form/form.js.map +1 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.d.ts.map +1 -1
- package/lib/form/index.js +2 -3
- package/lib/form/index.js.map +1 -1
- package/lib/form/style/index.d.ts +4 -0
- package/lib/form/style/index.d.ts.map +1 -0
- package/lib/form/style/index.js +5 -0
- package/lib/form/style/index.js.map +1 -0
- package/lib/form/style/index.less +653 -0
- package/lib/form/style/mixin.less +126 -0
- package/lib/grid/index.d.ts +3 -10
- package/lib/grid/index.d.ts.map +1 -1
- package/lib/grid/index.js +17 -24
- package/lib/grid/index.js.map +1 -1
- package/lib/grid/style/index.d.ts +1 -0
- package/lib/grid/style/index.d.ts.map +1 -1
- package/lib/grid/style/index.js +1 -0
- package/lib/grid/style/index.js.map +1 -1
- package/lib/grid/style/index.less +24 -26
- package/lib/grid/style/mixin.less +63 -19
- package/lib/grid-v4/RowContext.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/RowContext.js +1 -2
- package/lib/grid-v4/RowContext.js.map +1 -0
- package/lib/grid-v4/col.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/col.js +9 -14
- package/lib/grid-v4/col.js.map +1 -0
- package/lib/grid-v4/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/hooks/useBreakpoint.js +1 -2
- package/lib/grid-v4/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid-v4/index.d.ts +12 -0
- package/lib/grid-v4/index.d.ts.map +1 -0
- package/lib/grid-v4/index.js +30 -0
- package/lib/grid-v4/index.js.map +1 -0
- package/lib/grid-v4/row.d.ts.map +1 -0
- package/lib/{grid → grid-v4}/row.js +10 -14
- package/lib/grid-v4/row.js.map +1 -0
- package/lib/grid-v4/style/index.d.ts +2 -0
- package/lib/grid-v4/style/index.d.ts.map +1 -0
- package/lib/grid-v4/style/index.js +3 -0
- package/lib/grid-v4/style/index.js.map +1 -0
- package/lib/grid-v4/style/index.less +124 -0
- package/lib/grid-v4/style/mixin.less +57 -0
- package/lib/handle/index.d.ts +2 -1
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +6 -9
- package/lib/icon/IconFont.d.ts +10 -0
- package/lib/icon/IconFont.d.ts.map +1 -0
- package/lib/icon/IconFont.js +60 -0
- package/lib/icon/IconFont.js.map +1 -0
- package/lib/icon/components/Icon.d.ts +31 -0
- package/lib/icon/components/Icon.d.ts.map +1 -0
- package/lib/icon/components/Icon.js +143 -0
- package/lib/icon/components/Icon.js.map +1 -0
- package/lib/icon/components/index.d.ts +2 -0
- package/lib/icon/components/index.d.ts.map +1 -0
- package/lib/icon/components/index.js +13 -0
- package/lib/icon/components/index.js.map +1 -0
- package/lib/icon/components/utils.d.ts +22 -0
- package/lib/icon/components/utils.d.ts.map +1 -0
- package/lib/icon/components/utils.js +118 -0
- package/lib/icon/components/utils.js.map +1 -0
- package/lib/icon/index.d.ts +46 -3
- package/lib/icon/index.d.ts.map +1 -1
- package/lib/icon/index.js +120 -17
- 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/twoTonePrimaryColor.d.ts +3 -0
- package/lib/icon/twoTonePrimaryColor.d.ts.map +1 -0
- package/lib/icon/twoTonePrimaryColor.js +18 -0
- package/lib/icon/twoTonePrimaryColor.js.map +1 -0
- package/lib/icon/utils.d.ts +13 -0
- package/lib/icon/utils.d.ts.map +1 -0
- package/lib/icon/utils.js +75 -0
- package/lib/icon/utils.js.map +1 -0
- 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 +7 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +38 -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 +8 -12
- 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 +7 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -2
- package/lib/locale/en_US.d.ts +7 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +9 -3
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +7 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +9 -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 +96 -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 +169 -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.js +8 -12
- 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/hooks/use-column-setting.js +4 -5
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +2 -3
- package/lib/table/index.js.map +1 -1
- package/lib/table/style/index.d.ts +9 -0
- package/lib/table/style/index.d.ts.map +1 -0
- package/lib/table/style/index.js +10 -0
- package/lib/table/style/index.js.map +1 -0
- package/lib/table/style/index.less +800 -0
- package/lib/table/style/size.less +179 -0
- package/lib/table/table.d.ts +2 -2
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +11 -17
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.stories.js +5 -10
- package/lib/table/total-shower.d.ts +2 -2
- package/lib/table/total-shower.d.ts.map +1 -1
- package/lib/table/total-shower.js +2 -3
- package/lib/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 +43 -0
- package/lib/tag/index.d.ts +4 -3
- package/lib/tag/index.d.ts.map +1 -1
- package/lib/tag/index.js +15 -10
- package/lib/tag/index.js.map +1 -1
- package/lib/tag/style/index.d.ts +3 -0
- package/lib/tag/style/index.d.ts.map +1 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/tag/style/index.js.map +1 -0
- package/lib/tag/style/index.less +106 -0
- package/lib/tag/tag.d.ts +41 -0
- package/lib/tag/tag.d.ts.map +1 -0
- package/lib/tag/tag.js +183 -0
- package/lib/tag/tag.js.map +1 -0
- package/lib/tag/tag.less +193 -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 +1 -1
- package/lib/title/index.js +3 -6
- 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 +11 -14
- package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/lib/tntd-form/FormItem/index.js +14 -14
- package/lib/tntd-form/FormItemInput.d.ts +1 -1
- package/lib/tntd-form/FormItemInput.d.ts.map +1 -1
- package/lib/tntd-form/FormItemInput.js +5 -6
- package/lib/tntd-form/FormItemInput.js.map +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts.map +1 -1
- package/lib/tntd-form/FormItemLabel.js +9 -13
- package/lib/tntd-form/FormItemLabel.js.map +1 -1
- package/lib/tntd-form/FormList.js +5 -8
- package/lib/tntd-form/context.d.ts +1 -1
- package/lib/tntd-form/context.d.ts.map +1 -1
- package/lib/tntd-form/context.js +14 -19
- package/lib/tntd-form/context.js.map +1 -1
- package/lib/tntd-form/hooks/useDebounce.js +5 -5
- package/lib/tntd-form/hooks/useForm.js +5 -5
- package/lib/tntd-form/hooks/useFormItemStatus.js +1 -2
- package/lib/tntd-form/hooks/useFrameState.js +10 -9
- package/lib/tntd-form/hooks/useItemRef.js +3 -3
- package/lib/tntd-form/index.js +4 -5
- package/lib/tntd-form/style/index.d.ts +1 -1
- package/lib/tntd-form/style/index.d.ts.map +1 -1
- package/lib/tntd-form/style/index.js +1 -1
- package/lib/tntd-form/style/index.js.map +1 -1
- package/lib/tntd-form/style/index.less +1 -1
- package/lib/tntd-form/style/rtl.less +3 -3
- package/lib/tntd-form/validateMessagesContext.js +1 -2
- package/lib/tntd-icon/index.d.ts +2 -1
- package/lib/tntd-icon/index.d.ts.map +1 -1
- package/lib/tntd-icon/index.js +3 -6
- package/lib/tntd-layout/ActionsContext.js +1 -2
- package/lib/tntd-layout/AppList.js +7 -8
- package/lib/tntd-layout/Application.d.ts +2 -1
- package/lib/tntd-layout/Application.d.ts.map +1 -1
- package/lib/tntd-layout/Application.js +7 -8
- package/lib/tntd-layout/Avatar.d.ts +2 -1
- package/lib/tntd-layout/Avatar.d.ts.map +1 -1
- package/lib/tntd-layout/Avatar.js +5 -6
- package/lib/tntd-layout/CompatibleLanguage.d.ts +2 -1
- package/lib/tntd-layout/CompatibleLanguage.d.ts.map +1 -1
- package/lib/tntd-layout/CompatibleLanguage.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/Avatar.d.ts +2 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.d.ts.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +5 -6
- package/lib/tntd-layout/EnterpriseLayout/Language.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/Theme.d.ts +2 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.d.ts.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +7 -8
- package/lib/tntd-layout/EnterpriseLayout/index.js +2 -3
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.d.ts +2 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.d.ts.map +1 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +7 -8
- package/lib/tntd-layout/GlobalNavigation/index.js +7 -8
- package/lib/tntd-layout/Header.js +9 -6
- package/lib/tntd-layout/HeaderActions.js +18 -21
- package/lib/tntd-layout/HeaderNavs.js +8 -12
- package/lib/tntd-layout/HeaderTabs.js +10 -14
- package/lib/tntd-layout/Iconfont.d.ts +2 -1
- package/lib/tntd-layout/Iconfont.d.ts.map +1 -1
- package/lib/tntd-layout/Iconfont.js +2 -3
- package/lib/tntd-layout/Language.js +7 -8
- package/lib/tntd-layout/Layout.js +7 -8
- package/lib/tntd-layout/Logo.js +9 -6
- package/lib/tntd-layout/OrgAppList.js +7 -8
- package/lib/tntd-layout/SideMenu.js +8 -11
- package/lib/tntd-layout/Theme.d.ts +2 -1
- package/lib/tntd-layout/Theme.d.ts.map +1 -1
- package/lib/tntd-layout/Theme.js +7 -8
- package/lib/tntd-layout/createActions.js +2 -3
- package/lib/tntd-layout/images/index.js +4 -7
- package/lib/tntd-layout/index.d.ts +3 -2
- package/lib/tntd-layout/index.d.ts.map +1 -1
- package/lib/tntd-layout/index.js +6 -11
- package/lib/tntd-layout/paaslayout/CompactSideMenu.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +7 -8
- package/lib/tntd-layout/paaslayout/Header.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/Header.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/Header.js +9 -6
- package/lib/tntd-layout/paaslayout/Logo.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/Logo.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/Logo.js +6 -3
- package/lib/tntd-layout/paaslayout/SideMenu.d.ts +2 -1
- package/lib/tntd-layout/paaslayout/SideMenu.d.ts.map +1 -1
- package/lib/tntd-layout/paaslayout/SideMenu.js +7 -8
- package/lib/tntd-layout/paaslayout/index.js +7 -8
- package/lib/tntd-layout/storage.js +14 -27
- package/lib/tntd-modal/index.d.ts +2 -1
- package/lib/tntd-modal/index.d.ts.map +1 -1
- package/lib/tntd-modal/index.js +11 -15
- package/lib/tntd-rc-select/_util/DisabledContext.js +5 -7
- package/lib/tntd-rc-select/_util/FormItemInputContext.js +4 -5
- package/lib/tntd-rc-select/_util/PurePanel.d.ts +2 -2
- package/lib/tntd-rc-select/_util/PurePanel.d.ts.map +1 -1
- package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
- package/lib/tntd-rc-select/_util/SizeContext.js +4 -5
- package/lib/tntd-rc-select/_util/context.js +3 -6
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.d.ts +2 -2
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.d.ts.map +1 -1
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +4 -5
- package/lib/tntd-rc-select/_util/getIcons.d.ts +2 -2
- package/lib/tntd-rc-select/_util/getIcons.js +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 +44 -47
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.d.ts.map +1 -1
- package/lib/tooltip/index.js +5 -6
- package/lib/tooltip/index.js.map +1 -1
- 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/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 +5 -3
- 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 +34 -24
- package/themes/default/variablesVar.less +675 -0
- package/themes/utils/colorPalette.less +11 -0
- 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/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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// @import '../../style/mixins/index';
|
|
2
|
+
@tnt-prefix: tnt;
|
|
3
|
+
|
|
4
|
+
@row-prefix-cls: ~'@{tnt-prefix}-row';
|
|
5
|
+
@col-prefix-cls: ~'@{tnt-prefix}-col';
|
|
6
|
+
|
|
7
|
+
// mixins for grid system
|
|
8
|
+
// ------------------------
|
|
9
|
+
|
|
10
|
+
.loop-grid-columns(@index, @class) when (@index > 0) {
|
|
11
|
+
.@{col-prefix-cls}@{class}-@{index} {
|
|
12
|
+
display: block;
|
|
13
|
+
flex: 0 0 percentage((@index / @grid-columns));
|
|
14
|
+
max-width: percentage((@index / @grid-columns));
|
|
15
|
+
}
|
|
16
|
+
.@{col-prefix-cls}@{class}-push-@{index} {
|
|
17
|
+
left: percentage((@index / @grid-columns));
|
|
18
|
+
}
|
|
19
|
+
.@{col-prefix-cls}@{class}-pull-@{index} {
|
|
20
|
+
right: percentage((@index / @grid-columns));
|
|
21
|
+
}
|
|
22
|
+
.@{col-prefix-cls}@{class}-offset-@{index} {
|
|
23
|
+
margin-left: percentage((@index / @grid-columns));
|
|
24
|
+
}
|
|
25
|
+
.@{col-prefix-cls}@{class}-order-@{index} {
|
|
26
|
+
order: @index;
|
|
27
|
+
}
|
|
28
|
+
.loop-grid-columns((@index - 1), @class);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.loop-grid-columns(@index, @class) when (@index = 0) {
|
|
32
|
+
.@{col-prefix-cls}@{class}-@{index} {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
.@{col-prefix-cls}-push-@{index} {
|
|
36
|
+
left: auto;
|
|
37
|
+
}
|
|
38
|
+
.@{col-prefix-cls}-pull-@{index} {
|
|
39
|
+
right: auto;
|
|
40
|
+
}
|
|
41
|
+
.@{col-prefix-cls}@{class}-push-@{index} {
|
|
42
|
+
left: auto;
|
|
43
|
+
}
|
|
44
|
+
.@{col-prefix-cls}@{class}-pull-@{index} {
|
|
45
|
+
right: auto;
|
|
46
|
+
}
|
|
47
|
+
.@{col-prefix-cls}@{class}-offset-@{index} {
|
|
48
|
+
margin-left: 0;
|
|
49
|
+
}
|
|
50
|
+
.@{col-prefix-cls}@{class}-order-@{index} {
|
|
51
|
+
order: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.make-grid(@class: ~'') {
|
|
56
|
+
.loop-grid-columns(@grid-columns, @class);
|
|
57
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import Icon from './index';
|
|
11
|
+
const customCache = new Set();
|
|
12
|
+
export default function create(options = {}) {
|
|
13
|
+
const {
|
|
14
|
+
scriptUrl,
|
|
15
|
+
extraCommonProps = {}
|
|
16
|
+
} = options;
|
|
17
|
+
/**
|
|
18
|
+
* DOM API required.
|
|
19
|
+
* Make sure in browser environment.
|
|
20
|
+
* The Custom Icon will create a <script/>
|
|
21
|
+
* that loads SVG symbols and insert the SVG Element into the document body.
|
|
22
|
+
*/
|
|
23
|
+
if (typeof document !== 'undefined' && typeof window !== 'undefined' && typeof document.createElement === 'function' && typeof scriptUrl === 'string' && scriptUrl.length && !customCache.has(scriptUrl)) {
|
|
24
|
+
const script = document.createElement('script');
|
|
25
|
+
script.setAttribute('src', scriptUrl);
|
|
26
|
+
script.setAttribute('data-namespace', scriptUrl);
|
|
27
|
+
customCache.add(scriptUrl);
|
|
28
|
+
document.body.appendChild(script);
|
|
29
|
+
}
|
|
30
|
+
const Iconfont = props => {
|
|
31
|
+
const {
|
|
32
|
+
type,
|
|
33
|
+
children
|
|
34
|
+
} = props,
|
|
35
|
+
restProps = __rest(props
|
|
36
|
+
// component > children > type
|
|
37
|
+
, ["type", "children"]);
|
|
38
|
+
// component > children > type
|
|
39
|
+
let content = null;
|
|
40
|
+
if (props.type) {
|
|
41
|
+
content = React.createElement("use", {
|
|
42
|
+
xlinkHref: `#${type}`
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (children) {
|
|
46
|
+
content = children;
|
|
47
|
+
}
|
|
48
|
+
return React.createElement(Icon, Object.assign({}, extraCommonProps, restProps), content);
|
|
49
|
+
};
|
|
50
|
+
Iconfont.displayName = 'Iconfont';
|
|
51
|
+
return Iconfont;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconFont.js","sourceRoot":"","sources":["../../src/icon/IconFont.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAmB,MAAM,SAAS,CAAA;AAEzC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAA;AAOrC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,UAA6B,EAAE;IAC5D,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;IAEpD;;;;;OAKG;IACH,IACE,OAAO,QAAQ,KAAK,WAAW;QAC/B,OAAO,MAAM,KAAK,WAAW;QAC7B,OAAO,QAAQ,CAAC,aAAa,KAAK,UAAU;QAC5C,OAAO,SAAS,KAAK,QAAQ;QAC7B,SAAS,CAAC,MAAM;QAChB,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAC3B;QACA,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;QAC/C,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;QACrC,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;QAChD,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QAC1B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;KAClC;IAED,MAAM,QAAQ,GAAyB,CAAC,KAAK,EAAE,EAAE;QAC/C,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK;QAE9C,8BAA8B;UAFxB,oBAAgC,CAAQ,CAAA;QAE9C,8BAA8B;QAC9B,IAAI,OAAO,GAAG,IAAI,CAAA;QAClB,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,OAAO,GAAG,6BAAK,SAAS,EAAE,IAAI,IAAI,EAAE,GAAI,CAAA;SACzC;QACD,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAA;SACnB;QACD,OAAO,CACL,oBAAC,IAAI,oBAAK,gBAAgB,EAAM,SAAS,GACtC,OAAO,CACH,CACR,CAAA;IACH,CAAC,CAAA;IAED,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;IAEjC,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["import * as React from 'react'\nimport Icon, { IconProps } from './index'\n\nconst customCache = new Set<string>()\n\nexport interface CustomIconOptions {\n scriptUrl?: string\n extraCommonProps?: { [key: string]: any }\n}\n\nexport default function create(options: CustomIconOptions = {}): React.SFC<IconProps> {\n const { scriptUrl, extraCommonProps = {} } = options\n\n /**\n * DOM API required.\n * Make sure in browser environment.\n * The Custom Icon will create a <script/>\n * that loads SVG symbols and insert the SVG Element into the document body.\n */\n if (\n typeof document !== 'undefined' &&\n typeof window !== 'undefined' &&\n typeof document.createElement === 'function' &&\n typeof scriptUrl === 'string' &&\n scriptUrl.length &&\n !customCache.has(scriptUrl)\n ) {\n const script = document.createElement('script')\n script.setAttribute('src', scriptUrl)\n script.setAttribute('data-namespace', scriptUrl)\n customCache.add(scriptUrl)\n document.body.appendChild(script)\n }\n\n const Iconfont: React.SFC<IconProps> = (props) => {\n const { type, children, ...restProps } = props\n\n // component > children > type\n let content = null\n if (props.type) {\n content = <use xlinkHref={`#${type}`} />\n }\n if (children) {\n content = children\n }\n return (\n <Icon {...extraCommonProps} {...restProps}>\n {content}\n </Icon>\n )\n }\n\n Iconfont.displayName = 'Iconfont'\n\n return Iconfont\n}\n"]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { generate, getSecondaryColor, isIconDefinition, log, MiniMap, withSuffix } from './utils';
|
|
11
|
+
const twoToneColorPalette = {
|
|
12
|
+
primaryColor: '#333',
|
|
13
|
+
secondaryColor: '#E6E6E6'
|
|
14
|
+
};
|
|
15
|
+
class Icon extends React.Component {
|
|
16
|
+
static add(...icons) {
|
|
17
|
+
icons.forEach(icon => {
|
|
18
|
+
this.definitions.set(withSuffix(icon.name, icon.theme), icon);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
static clear() {
|
|
22
|
+
this.definitions.clear();
|
|
23
|
+
}
|
|
24
|
+
static get(key, colors = twoToneColorPalette) {
|
|
25
|
+
if (key) {
|
|
26
|
+
let target = this.definitions.get(key);
|
|
27
|
+
if (target && typeof target.icon === 'function') {
|
|
28
|
+
target = Object.assign(Object.assign({}, target), {
|
|
29
|
+
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static setTwoToneColors({
|
|
36
|
+
primaryColor,
|
|
37
|
+
secondaryColor
|
|
38
|
+
}) {
|
|
39
|
+
twoToneColorPalette.primaryColor = primaryColor;
|
|
40
|
+
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
|
|
41
|
+
}
|
|
42
|
+
static getTwoToneColors() {
|
|
43
|
+
return Object.assign({}, twoToneColorPalette);
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const _a = this.props,
|
|
47
|
+
{
|
|
48
|
+
type,
|
|
49
|
+
className,
|
|
50
|
+
onClick,
|
|
51
|
+
style,
|
|
52
|
+
primaryColor,
|
|
53
|
+
secondaryColor
|
|
54
|
+
} = _a,
|
|
55
|
+
rest = __rest(_a, ["type", "className", "onClick", "style", "primaryColor", "secondaryColor"]);
|
|
56
|
+
let target;
|
|
57
|
+
let colors = twoToneColorPalette;
|
|
58
|
+
if (primaryColor) {
|
|
59
|
+
colors = {
|
|
60
|
+
primaryColor,
|
|
61
|
+
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (isIconDefinition(type)) {
|
|
65
|
+
target = type;
|
|
66
|
+
} else if (typeof type === 'string') {
|
|
67
|
+
target = Icon.get(type, colors);
|
|
68
|
+
if (!target) {
|
|
69
|
+
// log(`Could not find icon: ${type}`);
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (!target) {
|
|
74
|
+
log(`type should be string or icon definiton, but got ${type}`);
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
if (target && typeof target.icon === 'function') {
|
|
78
|
+
target = Object.assign(Object.assign({}, target), {
|
|
79
|
+
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return generate(target.icon, `svg-${target.name}`, Object.assign({
|
|
83
|
+
className,
|
|
84
|
+
onClick,
|
|
85
|
+
style,
|
|
86
|
+
['data-icon']: target.name,
|
|
87
|
+
width: '1em',
|
|
88
|
+
height: '1em',
|
|
89
|
+
fill: 'currentColor',
|
|
90
|
+
['aria-hidden']: 'true'
|
|
91
|
+
}, rest));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
Object.defineProperty(Icon, "displayName", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
configurable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
value: 'IconReact'
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(Icon, "definitions", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
configurable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
value: new MiniMap()
|
|
105
|
+
});
|
|
106
|
+
export default Icon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/icon/components/Icon.tsx"],"names":[],"mappings":"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","sourcesContent":["import type { AbstractNode, IconDefinition } from '@tntd/icons/lib/types'\nimport * as React from 'react'\nimport { generate, getSecondaryColor, isIconDefinition, log, MiniMap, withSuffix } from './utils'\n\nexport interface IconProps {\n type: string | IconDefinition\n className?: string\n onClick?: React.MouseEventHandler<SVGSVGElement>\n style?: React.CSSProperties\n primaryColor?: string // only for two-tone\n secondaryColor?: string // only for two-tone\n focusable?: string\n}\n\nexport interface TwoToneColorPaletteSetter {\n primaryColor: string\n secondaryColor?: string\n}\n\nexport interface TwoToneColorPalette extends TwoToneColorPaletteSetter {\n secondaryColor: string\n}\n\nconst twoToneColorPalette: TwoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n}\n\nclass Icon extends React.Component<IconProps> {\n static displayName = 'IconReact'\n static definitions = new MiniMap<IconDefinition>()\n static add(...icons: IconDefinition[]) {\n icons.forEach((icon) => {\n this.definitions.set(withSuffix(icon.name, icon.theme), icon)\n })\n }\n static clear() {\n this.definitions.clear()\n }\n\n static get(key?: string, colors: TwoToneColorPalette = twoToneColorPalette) {\n if (key) {\n let target = this.definitions.get(key)\n if (target && typeof target.icon === 'function') {\n target = {\n ...target,\n icon: target.icon(colors.primaryColor, colors.secondaryColor),\n }\n }\n return target\n }\n }\n\n static setTwoToneColors({ primaryColor, secondaryColor }: TwoToneColorPaletteSetter) {\n twoToneColorPalette.primaryColor = primaryColor\n twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor)\n }\n\n static getTwoToneColors(): TwoToneColorPalette {\n return {\n ...twoToneColorPalette,\n }\n }\n\n render() {\n const { type, className, onClick, style, primaryColor, secondaryColor, ...rest } = this.props\n\n let target: IconDefinition | undefined\n let colors: TwoToneColorPalette = twoToneColorPalette\n if (primaryColor) {\n colors = {\n primaryColor,\n secondaryColor: secondaryColor || getSecondaryColor(primaryColor),\n }\n }\n if (isIconDefinition(type)) {\n target = type\n } else if (typeof type === 'string') {\n target = Icon.get(type, colors)\n if (!target) {\n // log(`Could not find icon: ${type}`);\n return null\n }\n }\n if (!target) {\n log(`type should be string or icon definiton, but got ${type}`)\n return null\n }\n if (target && typeof target.icon === 'function') {\n target = {\n ...target,\n icon: target.icon(colors.primaryColor, colors.secondaryColor),\n }\n }\n return generate(target.icon as AbstractNode, `svg-${target.name}`, {\n className,\n onClick,\n style,\n ['data-icon']: target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n ['aria-hidden']: 'true',\n ...rest,\n })\n }\n}\n\nexport default Icon\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA6D,MAAM,QAAQ,CAAA","sourcesContent":["export { default, IconProps, TwoToneColorPaletteSetter, TwoToneColorPalette } from './Icon'\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { generate as generateColor } from '@ant-design/colors';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export function log(message) {
|
|
4
|
+
if (!(process && process.env && process.env.NODE_ENV === 'production')) {
|
|
5
|
+
console.error(`[@ant-design/icons-react]: ${message}.`);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export function isIconDefinition(target) {
|
|
9
|
+
return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');
|
|
10
|
+
}
|
|
11
|
+
export function normalizeAttrs(attrs = {}) {
|
|
12
|
+
return Object.keys(attrs).reduce((acc, key) => {
|
|
13
|
+
const val = attrs[key];
|
|
14
|
+
switch (key) {
|
|
15
|
+
case 'class':
|
|
16
|
+
acc.className = val;
|
|
17
|
+
delete acc.class;
|
|
18
|
+
break;
|
|
19
|
+
default:
|
|
20
|
+
acc[key] = val;
|
|
21
|
+
}
|
|
22
|
+
return acc;
|
|
23
|
+
}, {});
|
|
24
|
+
}
|
|
25
|
+
export class MiniMap {
|
|
26
|
+
constructor() {
|
|
27
|
+
Object.defineProperty(this, "collection", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: {}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
get size() {
|
|
35
|
+
return Object.keys(this.collection).length;
|
|
36
|
+
}
|
|
37
|
+
clear() {
|
|
38
|
+
this.collection = {};
|
|
39
|
+
}
|
|
40
|
+
delete(key) {
|
|
41
|
+
return delete this.collection[key];
|
|
42
|
+
}
|
|
43
|
+
get(key) {
|
|
44
|
+
return this.collection[key];
|
|
45
|
+
}
|
|
46
|
+
has(key) {
|
|
47
|
+
return Boolean(this.collection[key]);
|
|
48
|
+
}
|
|
49
|
+
set(key, value) {
|
|
50
|
+
this.collection[key] = value;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function generate(node, key, rootProps) {
|
|
55
|
+
if (!rootProps) {
|
|
56
|
+
return React.createElement(node.tag, Object.assign({
|
|
57
|
+
key
|
|
58
|
+
}, normalizeAttrs(node.attrs)), (node.children || []).map((child, index) => generate(child, `${key}-${node.tag}-${index}`)));
|
|
59
|
+
}
|
|
60
|
+
return React.createElement(node.tag, Object.assign(Object.assign({
|
|
61
|
+
key
|
|
62
|
+
}, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map((child, index) => generate(child, `${key}-${node.tag}-${index}`)));
|
|
63
|
+
}
|
|
64
|
+
export function getSecondaryColor(primaryColor) {
|
|
65
|
+
// choose the second color
|
|
66
|
+
return generateColor(primaryColor)[0];
|
|
67
|
+
}
|
|
68
|
+
export function withSuffix(name, theme) {
|
|
69
|
+
switch (theme) {
|
|
70
|
+
case 'fill':
|
|
71
|
+
return `${name}-fill`;
|
|
72
|
+
case 'outline':
|
|
73
|
+
return `${name}-o`;
|
|
74
|
+
case 'twotone':
|
|
75
|
+
return `${name}-twotone`;
|
|
76
|
+
default:
|
|
77
|
+
throw new TypeError(`Unknown theme type: ${theme}, name: ${name}`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/icon/components/utils.ts"],"names":[],"mappings":"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","sourcesContent":["// @ts-nocheck\nimport type { AbstractNode, IconDefinition } from '@tntd/icons/lib/types'\nimport { generate as generateColor } from '@ant-design/colors'\nimport * as React from 'react'\n\nexport function log(message: string) {\n if (!(process && process.env && process.env.NODE_ENV === 'production')) {\n console.error(`[@ant-design/icons-react]: ${message}.`)\n }\n}\n\nexport function isIconDefinition(target: any): target is IconDefinition {\n return (\n typeof target === 'object' &&\n typeof target.name === 'string' &&\n typeof target.theme === 'string' &&\n (typeof target.icon === 'object' || typeof target.icon === 'function')\n )\n}\n\nexport function normalizeAttrs(attrs: Attrs = {}): Attrs {\n return Object.keys(attrs).reduce((acc: Attrs, key) => {\n const val = attrs[key]\n switch (key) {\n case 'class':\n acc.className = val\n delete acc.class\n break\n default:\n acc[key] = val\n }\n return acc\n }, {})\n}\n\nexport interface Attrs {\n [key: string]: string\n}\n\nexport class MiniMap<V> {\n get size() {\n return Object.keys(this.collection).length\n }\n private collection: { [key: string]: V } = {}\n clear(): void {\n this.collection = {}\n }\n delete(key: string): boolean {\n return delete this.collection[key]\n }\n get(key: string): V | undefined {\n return this.collection[key]\n }\n has(key: string): boolean {\n return Boolean(this.collection[key])\n }\n set(key: string, value: V): this {\n this.collection[key] = value\n return this\n }\n}\n\nexport function generate(\n node: AbstractNode,\n key: string,\n rootProps?: { [key: string]: any } | false\n): any {\n if (!rootProps) {\n return React.createElement(\n node.tag,\n { key, ...normalizeAttrs(node.attrs) },\n (node.children || []).map((child: any, index: any) =>\n generate(child, `${key}-${node.tag}-${index}`)\n )\n )\n }\n return React.createElement(\n node.tag,\n {\n key,\n ...normalizeAttrs(node.attrs),\n ...rootProps,\n },\n (node.children || []).map((child: any, index: number) =>\n generate(child, `${key}-${node.tag}-${index}`)\n )\n )\n}\n\nexport function getSecondaryColor(primaryColor: string): string {\n // choose the second color\n return generateColor(primaryColor)[0]\n}\n\nexport function withSuffix(name: string, theme: 'fill' | 'outline' | 'twotone') {\n switch (theme) {\n case 'fill':\n return `${name}-fill`\n case 'outline':\n return `${name}-o`\n case 'twotone':\n return `${name}-twotone`\n default:\n throw new TypeError(`Unknown theme type: ${theme}, name: ${name}`)\n }\n}\n"]}
|
package/es/icon/index.js
CHANGED
|
@@ -1,4 +1,116 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import * as allIcons from '@tntd/icons/lib/dist';
|
|
13
|
+
import ReactIcon from './components';
|
|
14
|
+
import createFromIconfontCN from './IconFont';
|
|
15
|
+
import { svgBaseProps, withThemeSuffix, removeTypeTheme, getThemeFromTypeName, alias } from './utils';
|
|
16
|
+
import warning from '../_util/warning';
|
|
17
|
+
import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
|
|
18
|
+
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
|
|
19
|
+
import './style';
|
|
20
|
+
// Initial setting
|
|
21
|
+
ReactIcon.add(...Object.keys(allIcons).map(key => allIcons[key]));
|
|
22
|
+
setTwoToneColor('#1890ff');
|
|
23
|
+
let defaultTheme = 'outlined';
|
|
24
|
+
let dangerousTheme;
|
|
25
|
+
function unstable_ChangeThemeOfIconsDangerously(theme) {
|
|
26
|
+
warning(false, 'Icon', `You are using the unstable method 'Icon.unstable_ChangeThemeOfAllIconsDangerously', ` + `make sure that all the icons with theme '${theme}' display correctly.`);
|
|
27
|
+
dangerousTheme = theme;
|
|
28
|
+
}
|
|
29
|
+
function unstable_ChangeDefaultThemeOfIcons(theme) {
|
|
30
|
+
warning(false, 'Icon', `You are using the unstable method 'Icon.unstable_ChangeDefaultThemeOfIcons', ` + `make sure that all the icons with theme '${theme}' display correctly.`);
|
|
31
|
+
defaultTheme = theme;
|
|
32
|
+
}
|
|
33
|
+
const Icon = props => {
|
|
34
|
+
const {
|
|
35
|
+
// affect outter <i>...</i>
|
|
36
|
+
className,
|
|
37
|
+
// affect inner <svg>...</svg>
|
|
38
|
+
type,
|
|
39
|
+
component: Component,
|
|
40
|
+
viewBox,
|
|
41
|
+
spin,
|
|
42
|
+
rotate,
|
|
43
|
+
tabIndex,
|
|
44
|
+
onClick,
|
|
45
|
+
// children
|
|
46
|
+
children,
|
|
47
|
+
// other
|
|
48
|
+
theme,
|
|
49
|
+
// default to outlined
|
|
50
|
+
twoToneColor
|
|
51
|
+
} = props,
|
|
52
|
+
restProps = __rest(props, ["className", "type", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children", "theme", "twoToneColor"]);
|
|
53
|
+
warning(Boolean(type || Component || children), 'Icon', 'Should have `type` prop or `component` prop or `children`.');
|
|
54
|
+
const classString = classNames('tntd-anticon', {
|
|
55
|
+
[`anticon`]: true,
|
|
56
|
+
[`anticon-${type}`]: Boolean(type)
|
|
57
|
+
}, className);
|
|
58
|
+
const svgClassString = classNames({
|
|
59
|
+
[`anticon-spin`]: !!spin || type === 'loading'
|
|
60
|
+
});
|
|
61
|
+
const svgStyle = rotate ? {
|
|
62
|
+
msTransform: `rotate(${rotate}deg)`,
|
|
63
|
+
transform: `rotate(${rotate}deg)`
|
|
64
|
+
} : undefined;
|
|
65
|
+
const innerSvgProps = Object.assign(Object.assign({}, svgBaseProps), {
|
|
66
|
+
className: svgClassString,
|
|
67
|
+
style: svgStyle,
|
|
68
|
+
viewBox
|
|
69
|
+
});
|
|
70
|
+
if (!viewBox) {
|
|
71
|
+
delete innerSvgProps.viewBox;
|
|
72
|
+
}
|
|
73
|
+
const renderInnerNode = () => {
|
|
74
|
+
// component > children > type
|
|
75
|
+
if (Component) {
|
|
76
|
+
return React.createElement(Component, Object.assign({}, innerSvgProps), children);
|
|
77
|
+
}
|
|
78
|
+
if (children) {
|
|
79
|
+
warning(Boolean(viewBox) || React.Children.count(children) === 1 && React.isValidElement(children) && React.Children.only(children).type === 'use', 'Icon', 'Make sure that you provide correct `viewBox`' + ' prop (default `0 0 1024 1024`) to the icon.');
|
|
80
|
+
return React.createElement("svg", Object.assign({}, innerSvgProps, {
|
|
81
|
+
viewBox: viewBox
|
|
82
|
+
}), children);
|
|
83
|
+
}
|
|
84
|
+
if (typeof type === 'string') {
|
|
85
|
+
let computedType = type;
|
|
86
|
+
if (theme) {
|
|
87
|
+
const themeInName = getThemeFromTypeName(type);
|
|
88
|
+
warning(!themeInName || theme === themeInName, 'Icon', `The icon name '${type}' already specify a theme '${themeInName}',` + ` the 'theme' prop '${theme}' will be ignored.`);
|
|
89
|
+
}
|
|
90
|
+
computedType = withThemeSuffix(removeTypeTheme(alias(computedType)), dangerousTheme || theme || defaultTheme);
|
|
91
|
+
return React.createElement(ReactIcon, {
|
|
92
|
+
className: svgClassString,
|
|
93
|
+
type: computedType,
|
|
94
|
+
primaryColor: twoToneColor,
|
|
95
|
+
style: svgStyle
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
let iconTabIndex = tabIndex;
|
|
100
|
+
if (iconTabIndex === undefined && onClick) {
|
|
101
|
+
iconTabIndex = -1;
|
|
102
|
+
}
|
|
103
|
+
return React.createElement(LocaleReceiver, {
|
|
104
|
+
componentName: "Icon"
|
|
105
|
+
}, locale => React.createElement("i", Object.assign({
|
|
106
|
+
"aria-label": type && `${locale.icon}: ${type}`
|
|
107
|
+
}, restProps, {
|
|
108
|
+
tabIndex: iconTabIndex,
|
|
109
|
+
onClick: onClick,
|
|
110
|
+
className: classString
|
|
111
|
+
}), renderInnerNode()));
|
|
112
|
+
};
|
|
113
|
+
Icon.createFromIconfontCN = createFromIconfontCN;
|
|
114
|
+
Icon.getTwoToneColor = getTwoToneColor;
|
|
115
|
+
Icon.setTwoToneColor = setTwoToneColor;
|
|
4
116
|
export default Icon;
|
package/es/icon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,8BAA8B;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAA;AAChD,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,oBAAoB,MAAM,YAAY,CAAA;AAC7C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,OAAO,MAAM,kBAAkB,CAAA;AACtC,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,SAAS,CAAA;AAEhB,kBAAkB;AAClB,SAAS,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,QAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AAC5E,eAAe,CAAC,SAAS,CAAC,CAAA;AAC1B,IAAI,YAAY,GAAc,UAAU,CAAA;AACxC,IAAI,cAAqC,CAAA;AAEzC,SAAS,sCAAsC,CAAC,KAAiB;IAC/D,OAAO,CACL,KAAK,EACL,MAAM,EACN,sFAAsF;QACpF,4CAA4C,KAAK,sBAAsB,CAC1E,CAAA;IACD,cAAc,GAAG,KAAK,CAAA;AACxB,CAAC;AAED,SAAS,kCAAkC,CAAC,KAAgB;IAC1D,OAAO,CACL,KAAK,EACL,MAAM,EACN,+EAA+E;QAC7E,4CAA4C,KAAK,sBAAsB,CAC1E,CAAA;IACD,YAAY,GAAG,KAAK,CAAA;AACtB,CAAC;AA8CD,MAAM,IAAI,GAA6B,CAAC,KAAK,EAAE,EAAE;IAC/C,MAAM;IACJ,2BAA2B;IAC3B,SAAS;IAET,8BAA8B;IAC9B,IAAI,EACJ,SAAS,EAAE,SAAS,EACpB,OAAO,EACP,IAAI,EACJ,MAAM,EAEN,QAAQ,EACR,OAAO;IAEP,WAAW;IACX,QAAQ;IAER,QAAQ;IACR,KAAK,EAAE,sBAAsB;IAC7B,YAAY,KAGV,KAAK,EADJ,SAAS,UACV,KAAK,EAtBH,2HAsBL,CAAQ,CAAA;IAET,OAAO,CACL,OAAO,CAAC,IAAI,IAAI,SAAS,IAAI,QAAQ,CAAC,EACtC,MAAM,EACN,4DAA4D,CAC7D,CAAA;IAED,MAAM,WAAW,GAAG,UAAU,CAC5B,cAAc,EACd;QACE,CAAC,SAAS,CAAC,EAAE,IAAI;QACjB,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC;KACnC,EACD,SAAS,CACV,CAAA;IAED,MAAM,cAAc,GAAG,UAAU,CAAC;QAChC,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS;KAC/C,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,MAAM;QACrB,CAAC,CAAC;YACE,WAAW,EAAE,UAAU,MAAM,MAAM;YACnC,SAAS,EAAE,UAAU,MAAM,MAAM;SAClC;QACH,CAAC,CAAC,SAAS,CAAA;IAEb,MAAM,aAAa,mCACd,YAAY,KACf,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,QAAQ,EACf,OAAO,GACR,CAAA;IAED,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,aAAa,CAAC,OAAO,CAAA;KAC7B;IAED,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,8BAA8B;QAC9B,IAAI,SAAS,EAAE;YACb,OAAO,oBAAC,SAAS,oBAAK,aAAa,GAAG,QAAQ,CAAa,CAAA;SAC5D;QAED,IAAI,QAAQ,EAAE;YACZ,OAAO,CACL,OAAO,CAAC,OAAO,CAAC;gBACd,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;oBACnC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAC9B,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,EACjD,MAAM,EACN,8CAA8C;gBAC5C,8CAA8C,CACjD,CAAA;YACD,OAAO,CACL,6CAAS,aAAa,IAAE,OAAO,EAAE,OAAO,KACrC,QAAQ,CACL,CACP,CAAA;SACF;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,YAAY,GAAG,IAAI,CAAA;YACvB,IAAI,KAAK,EAAE;gBACT,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAA;gBAC9C,OAAO,CACL,CAAC,WAAW,IAAI,KAAK,KAAK,WAAW,EACrC,MAAM,EACN,kBAAkB,IAAI,8BAA8B,WAAW,IAAI;oBACjE,sBAAsB,KAAK,oBAAoB,CAClD,CAAA;aACF;YACD,YAAY,GAAG,eAAe,CAC5B,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EACpC,cAAc,IAAI,KAAK,IAAI,YAAY,CACxC,CAAA;YAED,OAAO,CACL,oBAAC,SAAS,IACR,SAAS,EAAE,cAAc,EACzB,IAAI,EAAE,YAAY,EAClB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,QAAQ,GACf,CACH,CAAA;SACF;IACH,CAAC,CAAA;IAED,IAAI,YAAY,GAAG,QAAQ,CAAA;IAC3B,IAAI,YAAY,KAAK,SAAS,IAAI,OAAO,EAAE;QACzC,YAAY,GAAG,CAAC,CAAC,CAAA;KAClB;IAED,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,MAAM,IACjC,CAAC,MAAM,EAAE,EAAE,CAAC,CACX,uDACc,IAAI,IAAI,GAAI,MAAiC,CAAC,IAAI,KAAK,IAAI,EAAE,IACrE,SAAS,IACb,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,WAAW,KAErB,eAAe,EAAE,CAChB,CACL,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;AAChD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;AACtC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;AAEtC,eAAe,IAAI,CAAA","sourcesContent":["/* eslint-disable camelcase */\nimport * as React from 'react'\nimport classNames from 'classnames'\nimport * as allIcons from '@tntd/icons/lib/dist'\nimport ReactIcon from './components'\nimport createFromIconfontCN from './IconFont'\nimport {\n svgBaseProps,\n withThemeSuffix,\n removeTypeTheme,\n getThemeFromTypeName,\n alias,\n} from './utils'\nimport warning from '../_util/warning'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor'\nimport './style'\n\n// Initial setting\nReactIcon.add(...Object.keys(allIcons).map((key) => (allIcons as any)[key]))\nsetTwoToneColor('#1890ff')\nlet defaultTheme: ThemeType = 'outlined'\nlet dangerousTheme: ThemeType | undefined\n\nfunction unstable_ChangeThemeOfIconsDangerously(theme?: ThemeType) {\n warning(\n false,\n 'Icon',\n `You are using the unstable method 'Icon.unstable_ChangeThemeOfAllIconsDangerously', ` +\n `make sure that all the icons with theme '${theme}' display correctly.`\n )\n dangerousTheme = theme\n}\n\nfunction unstable_ChangeDefaultThemeOfIcons(theme: ThemeType) {\n warning(\n false,\n 'Icon',\n `You are using the unstable method 'Icon.unstable_ChangeDefaultThemeOfIcons', ` +\n `make sure that all the icons with theme '${theme}' display correctly.`\n )\n defaultTheme = theme\n}\n\nexport interface TransferLocale {\n icon: string\n}\n\nexport interface CustomIconComponentProps {\n width: string | number\n height: string | number\n fill: string\n viewBox?: string\n className?: string\n style?: React.CSSProperties\n spin?: boolean\n rotate?: number\n ['aria-hidden']?: React.AriaAttributes['aria-hidden']\n}\n\nexport type ThemeType = 'filled' | 'outlined' | 'twoTone'\n\nexport interface IconProps {\n tabIndex?: number\n type?: string\n className?: string\n theme?: ThemeType\n title?: string\n onKeyUp?: React.KeyboardEventHandler<HTMLElement>\n onClick?: React.MouseEventHandler<HTMLElement>\n component?: React.ComponentType<CustomIconComponentProps | React.SVGProps<SVGSVGElement>>\n twoToneColor?: string\n viewBox?: string\n spin?: boolean\n rotate?: number\n style?: React.CSSProperties\n prefixCls?: string\n role?: string\n}\n\nexport interface IconComponent<P> extends React.SFC<P> {\n createFromIconfontCN: typeof createFromIconfontCN\n getTwoToneColor: typeof getTwoToneColor\n setTwoToneColor: typeof setTwoToneColor\n unstable_ChangeThemeOfIconsDangerously?: typeof unstable_ChangeThemeOfIconsDangerously\n unstable_ChangeDefaultThemeOfIcons?: typeof unstable_ChangeDefaultThemeOfIcons\n}\n\nconst Icon: IconComponent<IconProps> = (props) => {\n const {\n // affect outter <i>...</i>\n className,\n\n // affect inner <svg>...</svg>\n type,\n component: Component,\n viewBox,\n spin,\n rotate,\n\n tabIndex,\n onClick,\n\n // children\n children,\n\n // other\n theme, // default to outlined\n twoToneColor,\n\n ...restProps\n } = props\n\n warning(\n Boolean(type || Component || children),\n 'Icon',\n 'Should have `type` prop or `component` prop or `children`.'\n )\n\n const classString = classNames(\n 'tntd-anticon',\n {\n [`anticon`]: true,\n [`anticon-${type}`]: Boolean(type),\n },\n className\n )\n\n const svgClassString = classNames({\n [`anticon-spin`]: !!spin || type === 'loading',\n })\n\n const svgStyle = rotate\n ? {\n msTransform: `rotate(${rotate}deg)`,\n transform: `rotate(${rotate}deg)`,\n }\n : undefined\n\n const innerSvgProps: CustomIconComponentProps = {\n ...svgBaseProps,\n className: svgClassString,\n style: svgStyle,\n viewBox,\n }\n\n if (!viewBox) {\n delete innerSvgProps.viewBox\n }\n\n const renderInnerNode = () => {\n // component > children > type\n if (Component) {\n return <Component {...innerSvgProps}>{children}</Component>\n }\n\n if (children) {\n warning(\n Boolean(viewBox) ||\n (React.Children.count(children) === 1 &&\n React.isValidElement(children) &&\n React.Children.only(children).type === 'use'),\n 'Icon',\n 'Make sure that you provide correct `viewBox`' +\n ' prop (default `0 0 1024 1024`) to the icon.'\n )\n return (\n <svg {...innerSvgProps} viewBox={viewBox}>\n {children}\n </svg>\n )\n }\n\n if (typeof type === 'string') {\n let computedType = type\n if (theme) {\n const themeInName = getThemeFromTypeName(type)\n warning(\n !themeInName || theme === themeInName,\n 'Icon',\n `The icon name '${type}' already specify a theme '${themeInName}',` +\n ` the 'theme' prop '${theme}' will be ignored.`\n )\n }\n computedType = withThemeSuffix(\n removeTypeTheme(alias(computedType)),\n dangerousTheme || theme || defaultTheme\n )\n\n return (\n <ReactIcon\n className={svgClassString}\n type={computedType}\n primaryColor={twoToneColor}\n style={svgStyle}\n />\n )\n }\n }\n\n let iconTabIndex = tabIndex\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1\n }\n\n return (\n <LocaleReceiver componentName=\"Icon\">\n {(locale) => (\n <i\n aria-label={type && `${(locale as Record<'icon', object>).icon}: ${type}`}\n {...restProps}\n tabIndex={iconTabIndex}\n onClick={onClick}\n className={classString}\n >\n {renderInnerNode()}\n </i>\n )}\n </LocaleReceiver>\n )\n}\n\nIcon.createFromIconfontCN = createFromIconfontCN\nIcon.getTwoToneColor = getTwoToneColor\nIcon.setTwoToneColor = setTwoToneColor\n\nexport default Icon\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA;AACrB,OAAO,cAAc,CAAA","sourcesContent":["import '../../style/index.less'\nimport './index.less'\nimport './style.less'\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ReactIcon from './components';
|
|
2
|
+
export function setTwoToneColor(primaryColor) {
|
|
3
|
+
return ReactIcon.setTwoToneColors({
|
|
4
|
+
primaryColor
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
export function getTwoToneColor() {
|
|
8
|
+
const colors = ReactIcon.getTwoToneColors();
|
|
9
|
+
return colors.primaryColor;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twoTonePrimaryColor.js","sourceRoot":"","sources":["../../src/icon/twoTonePrimaryColor.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,MAAM,UAAU,eAAe,CAAC,YAAoB;IAClD,OAAO,SAAS,CAAC,gBAAgB,CAAC;QAChC,YAAY;KACb,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAA;IAC3C,OAAO,MAAM,CAAC,YAAY,CAAA;AAC5B,CAAC","sourcesContent":["import ReactIcon from './components'\n\nexport function setTwoToneColor(primaryColor: string): void {\n return ReactIcon.setTwoToneColors({\n primaryColor,\n })\n}\n\nexport function getTwoToneColor(): string {\n const colors = ReactIcon.getTwoToneColors()\n return colors.primaryColor\n}\n"]}
|
package/es/icon/utils.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import warning from '../_util/warning';
|
|
2
|
+
// These props make sure that the SVG behaviours like general text.
|
|
3
|
+
// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
|
|
4
|
+
export const svgBaseProps = {
|
|
5
|
+
width: '1em',
|
|
6
|
+
height: '1em',
|
|
7
|
+
fill: 'currentColor',
|
|
8
|
+
'aria-hidden': true,
|
|
9
|
+
focusable: 'false'
|
|
10
|
+
};
|
|
11
|
+
const fillTester = /-fill$/;
|
|
12
|
+
const outlineTester = /-o$/;
|
|
13
|
+
const twoToneTester = /-twotone$/;
|
|
14
|
+
export function getThemeFromTypeName(type) {
|
|
15
|
+
let result = null;
|
|
16
|
+
if (fillTester.test(type)) {
|
|
17
|
+
result = 'filled';
|
|
18
|
+
} else if (outlineTester.test(type)) {
|
|
19
|
+
result = 'outlined';
|
|
20
|
+
} else if (twoToneTester.test(type)) {
|
|
21
|
+
result = 'twoTone';
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
export function removeTypeTheme(type) {
|
|
26
|
+
return type.replace(fillTester, '').replace(outlineTester, '').replace(twoToneTester, '');
|
|
27
|
+
}
|
|
28
|
+
export function withThemeSuffix(type, theme) {
|
|
29
|
+
let result = type;
|
|
30
|
+
if (theme === 'filled') {
|
|
31
|
+
result += '-fill';
|
|
32
|
+
} else if (theme === 'outlined') {
|
|
33
|
+
result += '-o';
|
|
34
|
+
} else if (theme === 'twoTone') {
|
|
35
|
+
result += '-twotone';
|
|
36
|
+
} else {
|
|
37
|
+
warning(false, 'Icon', `This icon '${type}' has unknown theme '${theme}'`);
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
// For alias or compatibility
|
|
42
|
+
export function alias(type) {
|
|
43
|
+
let newType = type;
|
|
44
|
+
switch (type) {
|
|
45
|
+
case 'cross':
|
|
46
|
+
newType = 'close';
|
|
47
|
+
break;
|
|
48
|
+
// https://github.com/ant-design/ant-design/issues/13007
|
|
49
|
+
case 'interation':
|
|
50
|
+
newType = 'interaction';
|
|
51
|
+
break;
|
|
52
|
+
// https://github.com/ant-design/ant-design/issues/16810
|
|
53
|
+
case 'canlendar':
|
|
54
|
+
newType = 'calendar';
|
|
55
|
+
break;
|
|
56
|
+
// https://github.com/ant-design/ant-design/issues/17448
|
|
57
|
+
case 'colum-height':
|
|
58
|
+
newType = 'column-height';
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
}
|
|
62
|
+
warning(newType === type, 'Icon', `Icon '${type}' was a typo and is now deprecated, please use '${newType}' instead.`);
|
|
63
|
+
return newType;
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/icon/utils.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,mEAAmE;AACnE,0GAA0G;AAC1G,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,OAAO;CACnB,CAAA;AAED,MAAM,UAAU,GAAG,QAAQ,CAAA;AAC3B,MAAM,aAAa,GAAG,KAAK,CAAA;AAC3B,MAAM,aAAa,GAAG,WAAW,CAAA;AAEjC,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,IAAI,MAAM,GAAqB,IAAI,CAAA;IACnC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,GAAG,QAAQ,CAAA;KAClB;SAAM,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACnC,MAAM,GAAG,UAAU,CAAA;KACpB;SAAM,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACnC,MAAM,GAAG,SAAS,CAAA;KACnB;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;AAC3F,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,KAAgB;IAC5D,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,KAAK,KAAK,QAAQ,EAAE;QACtB,MAAM,IAAI,OAAO,CAAA;KAClB;SAAM,IAAI,KAAK,KAAK,UAAU,EAAE;QAC/B,MAAM,IAAI,IAAI,CAAA;KACf;SAAM,IAAI,KAAK,KAAK,SAAS,EAAE;QAC9B,MAAM,IAAI,UAAU,CAAA;KACrB;SAAM;QACL,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,IAAI,wBAAwB,KAAK,GAAG,CAAC,CAAA;KAC3E;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,6BAA6B;AAC7B,MAAM,UAAU,KAAK,CAAC,IAAY;IAChC,IAAI,OAAO,GAAG,IAAI,CAAA;IAClB,QAAQ,IAAI,EAAE;QACZ,KAAK,OAAO;YACV,OAAO,GAAG,OAAO,CAAA;YACjB,MAAK;QACP,wDAAwD;QACxD,KAAK,YAAY;YACf,OAAO,GAAG,aAAa,CAAA;YACvB,MAAK;QACP,wDAAwD;QACxD,KAAK,WAAW;YACd,OAAO,GAAG,UAAU,CAAA;YACpB,MAAK;QACP,wDAAwD;QACxD,KAAK,cAAc;YACjB,OAAO,GAAG,eAAe,CAAA;YACzB,MAAK;QACP,QAAQ;KACT;IACD,OAAO,CACL,OAAO,KAAK,IAAI,EAChB,MAAM,EACN,SAAS,IAAI,mDAAmD,OAAO,YAAY,CACpF,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC","sourcesContent":["import type { ThemeType } from './index'\nimport warning from '../_util/warning'\n\n// These props make sure that the SVG behaviours like general text.\n// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\nexport const svgBaseProps = {\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': true,\n focusable: 'false',\n}\n\nconst fillTester = /-fill$/\nconst outlineTester = /-o$/\nconst twoToneTester = /-twotone$/\n\nexport function getThemeFromTypeName(type: string): ThemeType | null {\n let result: ThemeType | null = null\n if (fillTester.test(type)) {\n result = 'filled'\n } else if (outlineTester.test(type)) {\n result = 'outlined'\n } else if (twoToneTester.test(type)) {\n result = 'twoTone'\n }\n return result\n}\n\nexport function removeTypeTheme(type: string) {\n return type.replace(fillTester, '').replace(outlineTester, '').replace(twoToneTester, '')\n}\n\nexport function withThemeSuffix(type: string, theme: ThemeType) {\n let result = type\n if (theme === 'filled') {\n result += '-fill'\n } else if (theme === 'outlined') {\n result += '-o'\n } else if (theme === 'twoTone') {\n result += '-twotone'\n } else {\n warning(false, 'Icon', `This icon '${type}' has unknown theme '${theme}'`)\n }\n return result\n}\n\n// For alias or compatibility\nexport function alias(type: string) {\n let newType = type\n switch (type) {\n case 'cross':\n newType = 'close'\n break\n // https://github.com/ant-design/ant-design/issues/13007\n case 'interation':\n newType = 'interaction'\n break\n // https://github.com/ant-design/ant-design/issues/16810\n case 'canlendar':\n newType = 'calendar'\n break\n // https://github.com/ant-design/ant-design/issues/17448\n case 'colum-height':\n newType = 'column-height'\n break\n default:\n }\n warning(\n newType === type,\n 'Icon',\n `Icon '${type}' was a typo and is now deprecated, please use '${newType}' instead.`\n )\n return newType\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon-old/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAA;AAE/B,OAAO,SAAS,CAAA;AAEhB,cAAc,cAAc,CAAA;AAE5B,eAAe,IAAI,CAAA","sourcesContent":["import Icon from 'antd/es/icon'\n\nimport './style'\n\nexport * from 'antd/es/icon'\n\nexport default Icon\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-old/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA","sourcesContent":["import '../../style/index.less'\nimport './index.less'\n"]}
|
package/es/index.js
CHANGED
|
@@ -95,7 +95,12 @@ export { default as Exception } from './exception';
|
|
|
95
95
|
export { default as TntdCascader } from './tntd-cascader';
|
|
96
96
|
export { default as TntdSecondPage } from './tntd-second-page';
|
|
97
97
|
export { default as TntdForm } from './tntd-form';
|
|
98
|
-
export {
|
|
99
|
-
export {
|
|
98
|
+
export { default as TntdAction } from './tntd-action';
|
|
99
|
+
export { default as TableContainer } from './table-container';
|
|
100
|
+
export { default as TabsContainer } from './tabs-container';
|
|
101
|
+
export { default as PageLoading } from './page-loading';
|
|
102
|
+
export { default as PageContainer } from './page-container';
|
|
103
|
+
export { Col as TntdCol } from './grid-v4';
|
|
104
|
+
export { Row as TntdRow } from './grid-v4';
|
|
100
105
|
export { default as Label } from './label';
|
|
101
106
|
import './index.less';
|