@rockshin/tao-ui 0.0.60 → 0.1.0
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/README.md +5 -1
- package/component-manifest.json +1 -1
- package/dist/components/affix/affix.css +1 -1
- package/dist/components/affix/affix.d.ts +1 -0
- package/dist/components/affix/affix.js +18 -17
- package/dist/components/alert/alert.css +123 -119
- package/dist/components/alert/alert.js +78 -188
- package/dist/components/app/app-modals.js +49 -98
- package/dist/components/app/app-notices.d.ts +2 -2
- package/dist/components/app/app-notices.js +294 -243
- package/dist/components/app/app-types.d.ts +6 -3
- package/dist/components/app/app.css +185 -183
- package/dist/components/app/app.js +1 -1
- package/dist/components/auto-complete/auto-complete.css +30 -28
- package/dist/components/auto-complete/auto-complete.d.ts +3 -1
- package/dist/components/auto-complete/auto-complete.js +2 -1
- package/dist/components/badge/badge.js +42 -127
- package/dist/components/border-beam/border-beam.css +1 -1
- package/dist/components/border-beam/border-beam.d.ts +1 -0
- package/dist/components/border-beam/border-beam.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.css +123 -120
- package/dist/components/breadcrumb/breadcrumb.js +160 -265
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +52 -151
- package/dist/components/calendar/calendar.js +28 -27
- package/dist/components/card/card-tabs.d.ts +56 -5
- package/dist/components/card/card-tabs.js +214 -468
- package/dist/components/card/card.d.ts +1 -2
- package/dist/components/card/card.js +64 -226
- package/dist/components/carousel/carousel.css +1 -1
- package/dist/components/carousel/carousel.d.ts +59 -4
- package/dist/components/carousel/carousel.js +299 -243
- package/dist/components/cascader/cascader.css +186 -184
- package/dist/components/cascader/cascader.d.ts +3 -1
- package/dist/components/cascader/cascader.js +28 -34
- package/dist/components/checkbox/checkbox.css +93 -90
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +171 -499
- package/dist/components/collapse/collapse-panels.js +145 -400
- package/dist/components/collapse/collapse.css +172 -170
- package/dist/components/collapse/collapse.d.ts +1 -1
- package/dist/components/collapse/collapse.js +62 -181
- package/dist/components/color-picker/color-picker.js +418 -982
- package/dist/components/context-menu/context-menu.css +4 -4
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +52 -138
- package/dist/components/date-picker/calendar/calendar-grid.js +41 -41
- package/dist/components/date-picker/calendar/calendar-header.js +171 -337
- package/dist/components/date-picker/calendar/month-grid.js +33 -103
- package/dist/components/date-picker/calendar/time-panel.js +81 -210
- package/dist/components/date-picker/calendar/year-grid.js +36 -105
- package/dist/components/date-picker/date-localization.js +1 -1
- package/dist/components/date-picker/date-picker.css +599 -642
- package/dist/components/date-picker/date-picker.d.ts +2 -1
- package/dist/components/date-picker/date-picker.js +93 -104
- package/dist/components/date-picker/presets.js +12 -37
- package/dist/components/date-picker/range-picker.d.ts +2 -1
- package/dist/components/date-picker/range-picker.js +217 -252
- package/dist/components/date-picker/types.d.ts +2 -1
- package/dist/components/descriptions/descriptions.css +1 -1
- package/dist/components/descriptions/descriptions.js +30 -39
- package/dist/components/drawer/drawer.css +202 -200
- package/dist/components/drawer/drawer.js +28 -34
- package/dist/components/dropdown/dropdown-core.d.ts +32 -0
- package/dist/components/dropdown/dropdown-core.js +156 -0
- package/dist/components/dropdown/dropdown.css +38 -36
- package/dist/components/dropdown/dropdown.d.ts +4 -31
- package/dist/components/dropdown/dropdown.js +90 -276
- package/dist/components/empty/empty.css +30 -28
- package/dist/components/empty/empty.js +81 -236
- package/dist/components/float-button/float-button.css +1 -1
- package/dist/components/float-button/float-button.js +36 -47
- package/dist/components/form/field-control.js +2 -3
- package/dist/components/form/form-item.js +67 -129
- package/dist/components/form/form.css +36 -34
- package/dist/components/form/form.d.ts +1 -1
- package/dist/components/form/form.js +29 -100
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/use-form.js +48 -67
- package/dist/components/form-actions/form-actions.d.ts +1 -0
- package/dist/components/form-actions/form-actions.js +10 -36
- package/dist/components/form-field/form-field-view.d.ts +1 -0
- package/dist/components/form-field/form-field-view.js +81 -288
- package/dist/components/form-field/form-field.js +13 -31
- package/dist/components/form-field/form.css +74 -72
- package/dist/components/form-section/form-section.d.ts +1 -0
- package/dist/components/form-section/form-section.js +38 -91
- package/dist/components/image/image-icons.js +16 -31
- package/dist/components/image/image.css +1 -1
- package/dist/components/image/image.js +298 -911
- package/dist/components/input/base-input.d.ts +3 -1
- package/dist/components/input/base-input.js +8 -7
- package/dist/components/input/input-shared.css +62 -60
- package/dist/components/input/input-shared.d.ts +1 -1
- package/dist/components/input/input-shared.js +56 -100
- package/dist/components/input/input.css +222 -220
- package/dist/components/input/otp.d.ts +2 -1
- package/dist/components/input/otp.js +143 -324
- package/dist/components/input/password.js +12 -67
- package/dist/components/input/search.js +13 -13
- package/dist/components/input-number/input-number.d.ts +2 -1
- package/dist/components/input-number/input-number.js +30 -152
- package/dist/components/list/list-pagination.css +107 -105
- package/dist/components/list/list-pagination.d.ts +56 -5
- package/dist/components/list/list-pagination.js +249 -316
- package/dist/components/list/list.css +179 -177
- package/dist/components/list/list.js +170 -604
- package/dist/components/listy/listy.css +55 -53
- package/dist/components/listy/listy.d.ts +43 -4
- package/dist/components/listy/listy.js +198 -216
- package/dist/components/masonry/masonry.css +1 -1
- package/dist/components/masonry/masonry.d.ts +1 -0
- package/dist/components/masonry/masonry.js +90 -244
- package/dist/components/mentions/mentions.css +153 -151
- package/dist/components/mentions/mentions.d.ts +53 -11
- package/dist/components/mentions/mentions.js +288 -73
- package/dist/components/menu/menu-render.d.ts +2 -1
- package/dist/components/menu/menu-render.js +149 -307
- package/dist/components/menu/menu.css +142 -140
- package/dist/components/modal/confirm-dialog.js +8 -18
- package/dist/components/modal/modal.css +165 -162
- package/dist/components/modal/modal.js +285 -731
- package/dist/components/modal/use-modal.js +25 -25
- package/dist/components/pagination/pagination.css +134 -131
- package/dist/components/pagination/pagination.d.ts +1 -1
- package/dist/components/pagination/pagination.js +137 -290
- package/dist/components/popconfirm/popconfirm.css +38 -36
- package/dist/components/popconfirm/popconfirm.js +105 -288
- package/dist/components/popover/popover.css +89 -87
- package/dist/components/popover/popover.js +168 -275
- package/dist/components/progress/progress.css +153 -151
- package/dist/components/progress/progress.js +34 -43
- package/dist/components/qr-code/qr-code.css +36 -34
- package/dist/components/qr-code/qr-code.js +83 -277
- package/dist/components/radio/radio.css +95 -92
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +114 -376
- package/dist/components/rate/rate.css +80 -78
- package/dist/components/rate/rate.d.ts +34 -6
- package/dist/components/rate/rate.js +160 -244
- package/dist/components/result/result.css +59 -57
- package/dist/components/result/result.d.ts +1 -0
- package/dist/components/result/result.js +118 -291
- package/dist/components/scroll-area/scroll-area.css +160 -148
- package/dist/components/scroll-area/scroll-area.js +284 -488
- package/dist/components/segmented/segmented.css +1 -1
- package/dist/components/segmented/segmented.js +59 -58
- package/dist/components/select/mobile-select.css +166 -164
- package/dist/components/select/mobile-select.js +48 -131
- package/dist/components/select/select-icons.js +59 -128
- package/dist/components/select/select-searchable-list.js +19 -19
- package/dist/components/select/select-tags.js +70 -156
- package/dist/components/select/select-types.d.ts +2 -1
- package/dist/components/select/select.css +509 -506
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +67 -65
- package/dist/components/select/use-select-selection.js +181 -269
- package/dist/components/skeleton/skeleton.css +105 -103
- package/dist/components/skeleton/skeleton.js +140 -399
- package/dist/components/slider/slider.css +160 -158
- package/dist/components/slider/slider.d.ts +45 -6
- package/dist/components/slider/slider.js +359 -74
- package/dist/components/sonner/index.d.ts +1 -1
- package/dist/components/sonner/sonner.css +190 -182
- package/dist/components/sonner/sonner.js +12 -11
- package/dist/components/spinner/spinner.css +80 -76
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/spinner/spinner.js +75 -219
- package/dist/components/splitter/splitter.css +157 -154
- package/dist/components/splitter/splitter.js +271 -448
- package/dist/components/statistic/statistic.css +1 -1
- package/dist/components/statistic/statistic.js +121 -413
- package/dist/components/status-icon/status-icon.js +14 -26
- package/dist/components/steps/steps-icons.js +63 -100
- package/dist/components/steps/steps.css +817 -807
- package/dist/components/steps/steps.d.ts +1 -1
- package/dist/components/steps/steps.js +38 -94
- package/dist/components/steps/use-display-steps.js +21 -54
- package/dist/components/switch/switch-touch.css +17 -15
- package/dist/components/switch/switch.css +192 -190
- package/dist/components/switch/switch.js +63 -196
- package/dist/components/table/table-filter.d.ts +1 -1
- package/dist/components/table/table-filter.js +68 -155
- package/dist/components/table/table-icons.js +77 -152
- package/dist/components/table/table-summary.js +30 -77
- package/dist/components/table/table-types.d.ts +2 -1
- package/dist/components/table/table.css +468 -465
- package/dist/components/table/table.js +85 -84
- package/dist/components/table/use-table-data.js +137 -248
- package/dist/components/tabs/tabs.css +123 -120
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.js +156 -331
- package/dist/components/tag/tag.css +231 -221
- package/dist/components/tag/tag.js +110 -248
- package/dist/components/textarea/textarea.css +2 -1
- package/dist/components/textarea/textarea.d.ts +3 -1
- package/dist/components/textarea/textarea.js +16 -15
- package/dist/components/time-picker/time-picker.d.ts +1 -0
- package/dist/components/time-picker/time-picker.js +88 -220
- package/dist/components/timeline/timeline.css +1 -1
- package/dist/components/timeline/timeline.js +17 -17
- package/dist/components/tooltip/tooltip.css +79 -77
- package/dist/components/tooltip/tooltip.js +105 -215
- package/dist/components/tour/tour.css +1 -1
- package/dist/components/tour/tour.d.ts +59 -6
- package/dist/components/tour/tour.js +343 -622
- package/dist/components/transfer/transfer-list.js +19 -19
- package/dist/components/transfer/transfer-parts.js +63 -139
- package/dist/components/transfer/transfer.css +192 -190
- package/dist/components/transfer/transfer.js +57 -56
- package/dist/components/tree/tree-check.js +25 -32
- package/dist/components/tree/tree-keyboard.js +1 -1
- package/dist/components/tree/tree.css +204 -200
- package/dist/components/tree/tree.js +139 -277
- package/dist/components/tree-select/select-engine.css +200 -197
- package/dist/components/tree-select/select-engine.js +11 -38
- package/dist/components/tree-select/tree-select.css +21 -19
- package/dist/components/tree-select/tree-select.d.ts +3 -1
- package/dist/components/tree-select/tree-select.js +11 -10
- package/dist/components/upload/upload.js +193 -308
- package/dist/components/watermark/watermark-context.js +8 -14
- package/dist/components/watermark/watermark.css +1 -1
- package/dist/components/watermark/watermark.js +209 -400
- package/dist/docs/components/stack.doc.js +1 -1
- package/dist/docs/components/table.doc.js +1 -1
- package/dist/entries/affix.d.ts +0 -2
- package/dist/entries/affix.js +0 -2
- package/dist/entries/alert.d.ts +0 -2
- package/dist/entries/alert.js +0 -2
- package/dist/entries/app.d.ts +0 -2
- package/dist/entries/app.js +0 -2
- package/dist/entries/auto-complete.d.ts +0 -2
- package/dist/entries/auto-complete.js +0 -2
- package/dist/entries/avatar.d.ts +0 -2
- package/dist/entries/avatar.js +0 -2
- package/dist/entries/badge.d.ts +0 -2
- package/dist/entries/badge.js +0 -2
- package/dist/entries/border-beam.d.ts +0 -2
- package/dist/entries/border-beam.js +0 -2
- package/dist/entries/breadcrumb.d.ts +0 -2
- package/dist/entries/breadcrumb.js +0 -2
- package/dist/entries/button.d.ts +0 -2
- package/dist/entries/button.js +0 -2
- package/dist/entries/calendar.d.ts +0 -2
- package/dist/entries/calendar.js +0 -2
- package/dist/entries/card.d.ts +0 -2
- package/dist/entries/card.js +0 -2
- package/dist/entries/carousel.d.ts +0 -2
- package/dist/entries/carousel.js +0 -2
- package/dist/entries/cascader.d.ts +0 -2
- package/dist/entries/cascader.js +0 -2
- package/dist/entries/checkbox.d.ts +0 -2
- package/dist/entries/checkbox.js +0 -2
- package/dist/entries/collapse.d.ts +0 -2
- package/dist/entries/collapse.js +0 -2
- package/dist/entries/color-picker.d.ts +0 -2
- package/dist/entries/color-picker.js +0 -2
- package/dist/entries/context-menu.d.ts +0 -2
- package/dist/entries/context-menu.js +0 -2
- package/dist/entries/date-picker.d.ts +0 -2
- package/dist/entries/date-picker.js +0 -2
- package/dist/entries/descriptions.d.ts +0 -2
- package/dist/entries/descriptions.js +0 -2
- package/dist/entries/divider.d.ts +0 -2
- package/dist/entries/divider.js +0 -2
- package/dist/entries/drawer.d.ts +0 -2
- package/dist/entries/drawer.js +0 -2
- package/dist/entries/dropdown.d.ts +0 -2
- package/dist/entries/dropdown.js +0 -2
- package/dist/entries/empty.d.ts +0 -2
- package/dist/entries/empty.js +0 -2
- package/dist/entries/float-button.d.ts +0 -2
- package/dist/entries/float-button.js +0 -2
- package/dist/entries/form-actions.d.ts +0 -2
- package/dist/entries/form-actions.js +0 -2
- package/dist/entries/form-field.d.ts +0 -2
- package/dist/entries/form-field.js +0 -2
- package/dist/entries/form-layout.d.ts +0 -2
- package/dist/entries/form-layout.js +0 -2
- package/dist/entries/form-section.d.ts +0 -2
- package/dist/entries/form-section.js +0 -2
- package/dist/entries/form.d.ts +1 -3
- package/dist/entries/form.js +0 -2
- package/dist/entries/image.d.ts +0 -2
- package/dist/entries/image.js +0 -2
- package/dist/entries/input-number.d.ts +0 -2
- package/dist/entries/input-number.js +0 -2
- package/dist/entries/input.d.ts +1 -3
- package/dist/entries/input.js +0 -2
- package/dist/entries/list.d.ts +0 -2
- package/dist/entries/list.js +0 -2
- package/dist/entries/listy.d.ts +0 -2
- package/dist/entries/listy.js +0 -2
- package/dist/entries/masonry.d.ts +0 -2
- package/dist/entries/masonry.js +0 -2
- package/dist/entries/mentions.d.ts +0 -2
- package/dist/entries/mentions.js +0 -2
- package/dist/entries/modal.d.ts +0 -2
- package/dist/entries/modal.js +0 -2
- package/dist/entries/number-input.d.ts +0 -2
- package/dist/entries/number-input.js +0 -2
- package/dist/entries/pagination.d.ts +0 -2
- package/dist/entries/pagination.js +0 -2
- package/dist/entries/popconfirm.d.ts +0 -2
- package/dist/entries/popconfirm.js +0 -2
- package/dist/entries/popover.d.ts +0 -2
- package/dist/entries/popover.js +0 -2
- package/dist/entries/progress.d.ts +0 -2
- package/dist/entries/progress.js +0 -2
- package/dist/entries/provider.d.ts +1 -3
- package/dist/entries/provider.js +1 -3
- package/dist/entries/qr-code.d.ts +0 -2
- package/dist/entries/qr-code.js +0 -2
- package/dist/entries/radio.d.ts +0 -2
- package/dist/entries/radio.js +0 -2
- package/dist/entries/range-picker.d.ts +0 -2
- package/dist/entries/range-picker.js +0 -2
- package/dist/entries/rate.d.ts +0 -2
- package/dist/entries/rate.js +0 -2
- package/dist/entries/result.d.ts +0 -2
- package/dist/entries/result.js +0 -2
- package/dist/entries/scroll-area.d.ts +0 -2
- package/dist/entries/scroll-area.js +0 -2
- package/dist/entries/segmented.d.ts +0 -2
- package/dist/entries/segmented.js +0 -2
- package/dist/entries/select.d.ts +0 -2
- package/dist/entries/select.js +0 -2
- package/dist/entries/skeleton.d.ts +0 -2
- package/dist/entries/skeleton.js +0 -2
- package/dist/entries/slider.d.ts +0 -2
- package/dist/entries/slider.js +0 -2
- package/dist/entries/sonner.d.ts +0 -2
- package/dist/entries/sonner.js +0 -2
- package/dist/entries/spinner.d.ts +0 -2
- package/dist/entries/spinner.js +0 -2
- package/dist/entries/splitter.d.ts +0 -2
- package/dist/entries/splitter.js +0 -2
- package/dist/entries/stack.d.ts +0 -2
- package/dist/entries/stack.js +0 -2
- package/dist/entries/statistic.d.ts +0 -2
- package/dist/entries/statistic.js +0 -2
- package/dist/entries/steps.d.ts +0 -2
- package/dist/entries/steps.js +0 -2
- package/dist/entries/switch.d.ts +0 -2
- package/dist/entries/switch.js +0 -2
- package/dist/entries/table.d.ts +0 -2
- package/dist/entries/table.js +0 -2
- package/dist/entries/tabs.d.ts +0 -2
- package/dist/entries/tabs.js +0 -2
- package/dist/entries/tag.d.ts +0 -2
- package/dist/entries/tag.js +0 -2
- package/dist/entries/textarea.d.ts +0 -2
- package/dist/entries/textarea.js +0 -2
- package/dist/entries/time-picker.d.ts +0 -2
- package/dist/entries/time-picker.js +0 -2
- package/dist/entries/timeline.d.ts +0 -2
- package/dist/entries/timeline.js +0 -2
- package/dist/entries/tooltip.d.ts +0 -2
- package/dist/entries/tooltip.js +0 -2
- package/dist/entries/tour.d.ts +0 -2
- package/dist/entries/tour.js +0 -2
- package/dist/entries/transfer.d.ts +0 -2
- package/dist/entries/transfer.js +0 -2
- package/dist/entries/tree-select.d.ts +0 -2
- package/dist/entries/tree-select.js +0 -2
- package/dist/entries/tree.d.ts +0 -2
- package/dist/entries/tree.js +0 -2
- package/dist/entries/upload.d.ts +0 -2
- package/dist/entries/upload.js +0 -2
- package/dist/entries/watermark.d.ts +0 -2
- package/dist/entries/watermark.js +0 -2
- package/dist/index.d.ts +5 -7
- package/dist/index.js +2 -4
- package/dist/layouts/form-layout/form-layout.d.ts +1 -0
- package/dist/layouts/form-layout/form-layout.js +10 -36
- package/dist/layouts/stack/layout.css +46 -44
- package/dist/layouts/stack/stack.d.ts +1 -0
- package/dist/layouts/stack/stack.js +16 -69
- package/dist/locales/ar-EG.js +25 -2
- package/dist/locales/create-locale.d.ts +1 -2
- package/dist/locales/create-locale.js +0 -28
- package/dist/locales/de-DE.js +25 -2
- package/dist/locales/en-US.js +24 -1
- package/dist/locales/es-ES.js +25 -2
- package/dist/locales/fr-FR.js +25 -2
- package/dist/locales/hi-IN.js +25 -2
- package/dist/locales/id-ID.js +25 -2
- package/dist/locales/index.d.ts +10 -10
- package/dist/locales/index.js +9 -9
- package/dist/locales/it-IT.js +25 -2
- package/dist/locales/ja-JP.js +25 -2
- package/dist/locales/ko-KR.js +25 -2
- package/dist/locales/pt-BR.js +25 -2
- package/dist/locales/ru-RU.js +25 -2
- package/dist/locales/th-TH.js +25 -2
- package/dist/locales/tr-TR.js +25 -2
- package/dist/locales/vi-VN.js +25 -2
- package/dist/locales/zh-CN.js +25 -2
- package/dist/locales/zh-TW.js +25 -2
- package/dist/number-input/number-input.js +24 -81
- package/dist/number-input/use-number-input.js +42 -42
- package/dist/provider/locale.d.ts +1 -1
- package/dist/provider/tao-context.d.ts +38 -0
- package/dist/provider/tao-context.js +92 -0
- package/dist/provider/tao-portal-scope.d.ts +14 -0
- package/dist/provider/tao-portal-scope.js +54 -0
- package/dist/provider/tao-provider.d.ts +5 -55
- package/dist/provider/tao-provider.js +94 -378
- package/dist/theme/control.css +106 -126
- package/dist/theme/theme.css +2 -0
- package/dist/utils/dialog-content.js +55 -210
- package/dist/utils/overlay.js +15 -30
- package/dist/utils/rc-compat.d.ts +13 -0
- package/dist/utils/rc-compat.js +48 -0
- package/dist/utils/refs.js +5 -19
- package/package.json +10 -16
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
3
|
import { groupInteger, localizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
|
|
5
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
5
|
import { cx } from "../../utils/semantic.js";
|
|
@@ -37,293 +36,96 @@ function formattedNumber(value, precision, options) {
|
|
|
37
36
|
}
|
|
38
37
|
const hasContent = (node)=>null != node && 'boolean' != typeof node;
|
|
39
38
|
const StatisticRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
40
|
-
const
|
|
41
|
-
let className;
|
|
42
|
-
let classNames;
|
|
43
|
-
let decimalSeparator;
|
|
44
|
-
let formatter;
|
|
45
|
-
let groupSeparator;
|
|
46
|
-
let localeProp;
|
|
47
|
-
let precision;
|
|
48
|
-
let prefix;
|
|
49
|
-
let prefixCls;
|
|
50
|
-
let rest;
|
|
51
|
-
let rootClassName;
|
|
52
|
-
let style;
|
|
53
|
-
let styles;
|
|
54
|
-
let suffix;
|
|
55
|
-
let t0;
|
|
56
|
-
let t1;
|
|
57
|
-
let title;
|
|
58
|
-
let valueRender;
|
|
59
|
-
let valueStyle;
|
|
60
|
-
if ($[0] !== props) {
|
|
61
|
-
({ prefixCls, rootClassName, value: t0, valueStyle, valueRender, title, prefix, suffix, loading: t1, formatter, locale: localeProp, decimalSeparator, groupSeparator, precision, classNames, styles, className, style, ...rest } = props);
|
|
62
|
-
$[0] = props;
|
|
63
|
-
$[1] = className;
|
|
64
|
-
$[2] = classNames;
|
|
65
|
-
$[3] = decimalSeparator;
|
|
66
|
-
$[4] = formatter;
|
|
67
|
-
$[5] = groupSeparator;
|
|
68
|
-
$[6] = localeProp;
|
|
69
|
-
$[7] = precision;
|
|
70
|
-
$[8] = prefix;
|
|
71
|
-
$[9] = prefixCls;
|
|
72
|
-
$[10] = rest;
|
|
73
|
-
$[11] = rootClassName;
|
|
74
|
-
$[12] = style;
|
|
75
|
-
$[13] = styles;
|
|
76
|
-
$[14] = suffix;
|
|
77
|
-
$[15] = t0;
|
|
78
|
-
$[16] = t1;
|
|
79
|
-
$[17] = title;
|
|
80
|
-
$[18] = valueRender;
|
|
81
|
-
$[19] = valueStyle;
|
|
82
|
-
} else {
|
|
83
|
-
className = $[1];
|
|
84
|
-
classNames = $[2];
|
|
85
|
-
decimalSeparator = $[3];
|
|
86
|
-
formatter = $[4];
|
|
87
|
-
groupSeparator = $[5];
|
|
88
|
-
localeProp = $[6];
|
|
89
|
-
precision = $[7];
|
|
90
|
-
prefix = $[8];
|
|
91
|
-
prefixCls = $[9];
|
|
92
|
-
rest = $[10];
|
|
93
|
-
rootClassName = $[11];
|
|
94
|
-
style = $[12];
|
|
95
|
-
styles = $[13];
|
|
96
|
-
suffix = $[14];
|
|
97
|
-
t0 = $[15];
|
|
98
|
-
t1 = $[16];
|
|
99
|
-
title = $[17];
|
|
100
|
-
valueRender = $[18];
|
|
101
|
-
valueStyle = $[19];
|
|
102
|
-
}
|
|
103
|
-
const value = void 0 === t0 ? 0 : t0;
|
|
104
|
-
const loading = void 0 === t1 ? false : t1;
|
|
39
|
+
const { prefixCls, rootClassName, value = 0, valueStyle, valueRender, title, prefix, suffix, loading = false, formatter, locale: localeProp, decimalSeparator, groupSeparator, precision, classNames, styles, className, style, ...rest } = props;
|
|
105
40
|
const config = useTaoConfig();
|
|
106
41
|
const locale = localeProp ?? config.locale.numberLocale;
|
|
107
|
-
|
|
108
|
-
if ($[20] !== decimalSeparator || $[21] !== groupSeparator || $[22] !== locale) {
|
|
109
|
-
t2 = resolveNumberFormat(locale, {
|
|
42
|
+
const numberFormat = useMemo(()=>resolveNumberFormat(locale, {
|
|
110
43
|
decimalSeparator,
|
|
111
44
|
thousandsSeparator: groupSeparator
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
props: merged
|
|
131
|
-
}) : classNames;
|
|
132
|
-
t3 = "function" == typeof styles ? styles({
|
|
133
|
-
props: merged
|
|
134
|
-
}) : styles;
|
|
135
|
-
$[24] = classNames;
|
|
136
|
-
$[25] = loading;
|
|
137
|
-
$[26] = numberFormat.decimalSeparator;
|
|
138
|
-
$[27] = numberFormat.thousandsSeparator;
|
|
139
|
-
$[28] = props;
|
|
140
|
-
$[29] = styles;
|
|
141
|
-
$[30] = value;
|
|
142
|
-
$[31] = classes;
|
|
143
|
-
$[32] = t3;
|
|
144
|
-
} else {
|
|
145
|
-
classes = $[31];
|
|
146
|
-
t3 = $[32];
|
|
147
|
-
}
|
|
148
|
-
const slots = t3;
|
|
45
|
+
}), [
|
|
46
|
+
locale,
|
|
47
|
+
decimalSeparator,
|
|
48
|
+
groupSeparator
|
|
49
|
+
]);
|
|
50
|
+
const merged = {
|
|
51
|
+
...props,
|
|
52
|
+
value,
|
|
53
|
+
loading,
|
|
54
|
+
decimalSeparator: numberFormat.decimalSeparator,
|
|
55
|
+
groupSeparator: numberFormat.thousandsSeparator
|
|
56
|
+
};
|
|
57
|
+
const classes = 'function' == typeof classNames ? classNames({
|
|
58
|
+
props: merged
|
|
59
|
+
}) : classNames;
|
|
60
|
+
const slots = 'function' == typeof styles ? styles({
|
|
61
|
+
props: merged
|
|
62
|
+
}) : styles;
|
|
149
63
|
const node = useRef(null);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const t5 = classes?.value;
|
|
159
|
-
const t6 = slots?.value;
|
|
160
|
-
let t7;
|
|
161
|
-
if ($[34] !== formatter || $[35] !== locale || $[36] !== numberFormat || $[37] !== precision || $[38] !== value) {
|
|
162
|
-
t7 = "function" == typeof formatter ? formatter(value, {
|
|
64
|
+
useImperativeHandle(ref, ()=>({
|
|
65
|
+
nativeElement: node.current
|
|
66
|
+
}));
|
|
67
|
+
const formatted = /*#__PURE__*/ jsx("span", {
|
|
68
|
+
"data-tao-statistic-value": "",
|
|
69
|
+
className: classes?.value,
|
|
70
|
+
style: slots?.value,
|
|
71
|
+
children: 'function' == typeof formatter ? formatter(value, {
|
|
163
72
|
locale,
|
|
164
73
|
precision,
|
|
165
74
|
decimalSeparator: numberFormat.decimalSeparator,
|
|
166
75
|
groupSeparator: numberFormat.thousandsSeparator
|
|
167
|
-
}) : false === formatter ? value : formattedNumber(value, precision, numberFormat)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if ($[40] !== t5 || $[41] !== t6 || $[42] !== t7) {
|
|
177
|
-
t8 = /*#__PURE__*/ jsx("span", {
|
|
178
|
-
"data-tao-statistic-value": "",
|
|
179
|
-
className: t5,
|
|
180
|
-
style: t6,
|
|
181
|
-
children: t7
|
|
182
|
-
});
|
|
183
|
-
$[40] = t5;
|
|
184
|
-
$[41] = t6;
|
|
185
|
-
$[42] = t7;
|
|
186
|
-
$[43] = t8;
|
|
187
|
-
} else t8 = $[43];
|
|
188
|
-
const formatted = t8;
|
|
189
|
-
const t9 = classes?.root;
|
|
190
|
-
let t10;
|
|
191
|
-
if ($[44] !== className || $[45] !== prefixCls || $[46] !== rootClassName || $[47] !== t9) {
|
|
192
|
-
t10 = cx(prefixCls, t9, className, rootClassName);
|
|
193
|
-
$[44] = className;
|
|
194
|
-
$[45] = prefixCls;
|
|
195
|
-
$[46] = rootClassName;
|
|
196
|
-
$[47] = t9;
|
|
197
|
-
$[48] = t10;
|
|
198
|
-
} else t10 = $[48];
|
|
199
|
-
const t11 = slots?.root;
|
|
200
|
-
let t12;
|
|
201
|
-
if ($[49] !== style || $[50] !== t11) {
|
|
202
|
-
t12 = {
|
|
203
|
-
...t11,
|
|
76
|
+
}) : false === formatter ? value : formattedNumber(value, precision, numberFormat)
|
|
77
|
+
});
|
|
78
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
79
|
+
...rest,
|
|
80
|
+
ref: node,
|
|
81
|
+
"data-tao-statistic": "",
|
|
82
|
+
className: cx(prefixCls, classes?.root, className, rootClassName),
|
|
83
|
+
style: {
|
|
84
|
+
...slots?.root,
|
|
204
85
|
...style
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
hasContent(title) && /*#__PURE__*/ jsx("div", {
|
|
89
|
+
"data-tao-statistic-header": "",
|
|
90
|
+
className: classes?.header,
|
|
91
|
+
style: slots?.header,
|
|
92
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
93
|
+
"data-tao-statistic-title": "",
|
|
94
|
+
className: classes?.title,
|
|
95
|
+
style: slots?.title,
|
|
96
|
+
children: title
|
|
97
|
+
})
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
100
|
+
loading: loading,
|
|
101
|
+
paragraph: false,
|
|
102
|
+
active: true,
|
|
103
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
104
|
+
"data-tao-statistic-content": "",
|
|
105
|
+
className: classes?.content,
|
|
106
|
+
style: {
|
|
107
|
+
...valueStyle,
|
|
108
|
+
...slots?.content
|
|
109
|
+
},
|
|
110
|
+
children: [
|
|
111
|
+
hasContent(prefix) && /*#__PURE__*/ jsx("span", {
|
|
112
|
+
"data-tao-statistic-prefix": "",
|
|
113
|
+
className: classes?.prefix,
|
|
114
|
+
style: slots?.prefix,
|
|
115
|
+
children: prefix
|
|
116
|
+
}),
|
|
117
|
+
valueRender ? valueRender(formatted) : formatted,
|
|
118
|
+
hasContent(suffix) && /*#__PURE__*/ jsx("span", {
|
|
119
|
+
"data-tao-statistic-suffix": "",
|
|
120
|
+
className: classes?.suffix,
|
|
121
|
+
style: slots?.suffix,
|
|
122
|
+
children: suffix
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
})
|
|
221
126
|
})
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
$[53] = classes?.title;
|
|
225
|
-
$[54] = slots?.header;
|
|
226
|
-
$[55] = slots?.title;
|
|
227
|
-
$[56] = title;
|
|
228
|
-
$[57] = t13;
|
|
229
|
-
} else t13 = $[57];
|
|
230
|
-
const t14 = classes?.content;
|
|
231
|
-
const t15 = slots?.content;
|
|
232
|
-
let t16;
|
|
233
|
-
if ($[58] !== t15 || $[59] !== valueStyle) {
|
|
234
|
-
t16 = {
|
|
235
|
-
...valueStyle,
|
|
236
|
-
...t15
|
|
237
|
-
};
|
|
238
|
-
$[58] = t15;
|
|
239
|
-
$[59] = valueStyle;
|
|
240
|
-
$[60] = t16;
|
|
241
|
-
} else t16 = $[60];
|
|
242
|
-
let t17;
|
|
243
|
-
if ($[61] !== classes?.prefix || $[62] !== prefix || $[63] !== slots?.prefix) {
|
|
244
|
-
t17 = hasContent(prefix) && /*#__PURE__*/ jsx("span", {
|
|
245
|
-
"data-tao-statistic-prefix": "",
|
|
246
|
-
className: classes?.prefix,
|
|
247
|
-
style: slots?.prefix,
|
|
248
|
-
children: prefix
|
|
249
|
-
});
|
|
250
|
-
$[61] = classes?.prefix;
|
|
251
|
-
$[62] = prefix;
|
|
252
|
-
$[63] = slots?.prefix;
|
|
253
|
-
$[64] = t17;
|
|
254
|
-
} else t17 = $[64];
|
|
255
|
-
let t18;
|
|
256
|
-
if ($[65] !== formatted || $[66] !== valueRender) {
|
|
257
|
-
t18 = valueRender ? valueRender(formatted) : formatted;
|
|
258
|
-
$[65] = formatted;
|
|
259
|
-
$[66] = valueRender;
|
|
260
|
-
$[67] = t18;
|
|
261
|
-
} else t18 = $[67];
|
|
262
|
-
let t19;
|
|
263
|
-
if ($[68] !== classes?.suffix || $[69] !== slots?.suffix || $[70] !== suffix) {
|
|
264
|
-
t19 = hasContent(suffix) && /*#__PURE__*/ jsx("span", {
|
|
265
|
-
"data-tao-statistic-suffix": "",
|
|
266
|
-
className: classes?.suffix,
|
|
267
|
-
style: slots?.suffix,
|
|
268
|
-
children: suffix
|
|
269
|
-
});
|
|
270
|
-
$[68] = classes?.suffix;
|
|
271
|
-
$[69] = slots?.suffix;
|
|
272
|
-
$[70] = suffix;
|
|
273
|
-
$[71] = t19;
|
|
274
|
-
} else t19 = $[71];
|
|
275
|
-
let t20;
|
|
276
|
-
if ($[72] !== t14 || $[73] !== t16 || $[74] !== t17 || $[75] !== t18 || $[76] !== t19) {
|
|
277
|
-
t20 = /*#__PURE__*/ jsxs("div", {
|
|
278
|
-
"data-tao-statistic-content": "",
|
|
279
|
-
className: t14,
|
|
280
|
-
style: t16,
|
|
281
|
-
children: [
|
|
282
|
-
t17,
|
|
283
|
-
t18,
|
|
284
|
-
t19
|
|
285
|
-
]
|
|
286
|
-
});
|
|
287
|
-
$[72] = t14;
|
|
288
|
-
$[73] = t16;
|
|
289
|
-
$[74] = t17;
|
|
290
|
-
$[75] = t18;
|
|
291
|
-
$[76] = t19;
|
|
292
|
-
$[77] = t20;
|
|
293
|
-
} else t20 = $[77];
|
|
294
|
-
let t21;
|
|
295
|
-
if ($[78] !== loading || $[79] !== t20) {
|
|
296
|
-
t21 = /*#__PURE__*/ jsx(Skeleton, {
|
|
297
|
-
loading: loading,
|
|
298
|
-
paragraph: false,
|
|
299
|
-
active: true,
|
|
300
|
-
children: t20
|
|
301
|
-
});
|
|
302
|
-
$[78] = loading;
|
|
303
|
-
$[79] = t20;
|
|
304
|
-
$[80] = t21;
|
|
305
|
-
} else t21 = $[80];
|
|
306
|
-
let t22;
|
|
307
|
-
if ($[81] !== rest || $[82] !== t10 || $[83] !== t12 || $[84] !== t13 || $[85] !== t21) {
|
|
308
|
-
t22 = /*#__PURE__*/ jsxs("div", {
|
|
309
|
-
...rest,
|
|
310
|
-
ref: node,
|
|
311
|
-
"data-tao-statistic": "",
|
|
312
|
-
className: t10,
|
|
313
|
-
style: t12,
|
|
314
|
-
children: [
|
|
315
|
-
t13,
|
|
316
|
-
t21
|
|
317
|
-
]
|
|
318
|
-
});
|
|
319
|
-
$[81] = rest;
|
|
320
|
-
$[82] = t10;
|
|
321
|
-
$[83] = t12;
|
|
322
|
-
$[84] = t13;
|
|
323
|
-
$[85] = t21;
|
|
324
|
-
$[86] = t22;
|
|
325
|
-
} else t22 = $[86];
|
|
326
|
-
return t22;
|
|
127
|
+
]
|
|
128
|
+
});
|
|
327
129
|
});
|
|
328
130
|
StatisticRoot.displayName = 'Statistic';
|
|
329
131
|
const units = [
|
|
@@ -372,147 +174,53 @@ function formatDuration(duration, format) {
|
|
|
372
174
|
let index = 0;
|
|
373
175
|
return output.replace(/\0/g, ()=>literals[index++]);
|
|
374
176
|
}
|
|
375
|
-
function StatisticTimer(
|
|
376
|
-
const $ = c(31);
|
|
377
|
-
let onChange;
|
|
378
|
-
let onFinish;
|
|
379
|
-
let rest;
|
|
380
|
-
let t1;
|
|
381
|
-
let type;
|
|
382
|
-
let value;
|
|
383
|
-
if ($[0] !== t0) {
|
|
384
|
-
({ value, format: t1, onChange, onFinish, type, ...rest } = t0);
|
|
385
|
-
$[0] = t0;
|
|
386
|
-
$[1] = onChange;
|
|
387
|
-
$[2] = onFinish;
|
|
388
|
-
$[3] = rest;
|
|
389
|
-
$[4] = t1;
|
|
390
|
-
$[5] = type;
|
|
391
|
-
$[6] = value;
|
|
392
|
-
} else {
|
|
393
|
-
onChange = $[1];
|
|
394
|
-
onFinish = $[2];
|
|
395
|
-
rest = $[3];
|
|
396
|
-
t1 = $[4];
|
|
397
|
-
type = $[5];
|
|
398
|
-
value = $[6];
|
|
399
|
-
}
|
|
400
|
-
const format = void 0 === t1 ? "HH:mm:ss" : t1;
|
|
177
|
+
function StatisticTimer({ value, format = 'HH:mm:ss', onChange, onFinish, type, ...rest }) {
|
|
401
178
|
const [now, setNow] = useState();
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
$[7] = onChange;
|
|
409
|
-
$[8] = onFinish;
|
|
410
|
-
$[9] = t2;
|
|
411
|
-
} else t2 = $[9];
|
|
412
|
-
const callbacks = useRef(t2);
|
|
413
|
-
let t3;
|
|
414
|
-
let t4;
|
|
415
|
-
if ($[10] !== onChange || $[11] !== onFinish) {
|
|
416
|
-
t3 = ()=>{
|
|
417
|
-
callbacks.current = {
|
|
418
|
-
onChange,
|
|
419
|
-
onFinish
|
|
420
|
-
};
|
|
421
|
-
};
|
|
422
|
-
t4 = [
|
|
179
|
+
const callbacks = useRef({
|
|
180
|
+
onChange,
|
|
181
|
+
onFinish
|
|
182
|
+
});
|
|
183
|
+
useLayoutEffect(()=>{
|
|
184
|
+
callbacks.current = {
|
|
423
185
|
onChange,
|
|
424
186
|
onFinish
|
|
425
|
-
];
|
|
426
|
-
$[10] = onChange;
|
|
427
|
-
$[11] = onFinish;
|
|
428
|
-
$[12] = t3;
|
|
429
|
-
$[13] = t4;
|
|
430
|
-
} else {
|
|
431
|
-
t3 = $[12];
|
|
432
|
-
t4 = $[13];
|
|
433
|
-
}
|
|
434
|
-
useLayoutEffect(t3, t4);
|
|
435
|
-
let t5;
|
|
436
|
-
if ($[14] !== value) {
|
|
437
|
-
t5 = "string" == typeof value && "" !== value.trim() && Number.isFinite(Number(value)) ? Number(value) : value;
|
|
438
|
-
$[14] = value;
|
|
439
|
-
$[15] = t5;
|
|
440
|
-
} else t5 = $[15];
|
|
441
|
-
const normalized = t5;
|
|
442
|
-
let t6;
|
|
443
|
-
if ($[16] !== normalized) {
|
|
444
|
-
const timestamp = void 0 === normalized ? 0 / 0 : new Date(normalized).getTime();
|
|
445
|
-
t6 = Number.isNaN(timestamp) ? void 0 : timestamp;
|
|
446
|
-
$[16] = normalized;
|
|
447
|
-
$[17] = t6;
|
|
448
|
-
} else t6 = $[17];
|
|
449
|
-
const target = t6;
|
|
450
|
-
let t7;
|
|
451
|
-
let t8;
|
|
452
|
-
if ($[18] !== target || $[19] !== type) {
|
|
453
|
-
t7 = ()=>{
|
|
454
|
-
if (void 0 === target) return void setNow(void 0);
|
|
455
|
-
setNow(Date.now());
|
|
456
|
-
const timer = setInterval(()=>{
|
|
457
|
-
const current = Date.now();
|
|
458
|
-
const difference = Math.max(0, "countdown" === type ? target - current : current - target);
|
|
459
|
-
setNow(current);
|
|
460
|
-
callbacks.current.onChange?.(difference);
|
|
461
|
-
if ("countdown" === type && current >= target) {
|
|
462
|
-
clearInterval(timer);
|
|
463
|
-
callbacks.current.onFinish?.();
|
|
464
|
-
}
|
|
465
|
-
}, 16.666666666666668);
|
|
466
|
-
return ()=>clearInterval(timer);
|
|
467
187
|
};
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
$[28] = t9;
|
|
499
|
-
$[29] = value;
|
|
500
|
-
$[30] = t10;
|
|
501
|
-
} else t10 = $[30];
|
|
502
|
-
return t10;
|
|
188
|
+
}, [
|
|
189
|
+
onChange,
|
|
190
|
+
onFinish
|
|
191
|
+
]);
|
|
192
|
+
const normalized = 'string' == typeof value && '' !== value.trim() && Number.isFinite(Number(value)) ? Number(value) : value;
|
|
193
|
+
const timestamp = void 0 === normalized ? 0 / 0 : new Date(normalized).getTime();
|
|
194
|
+
const target = Number.isNaN(timestamp) ? void 0 : timestamp;
|
|
195
|
+
useEffect(()=>{
|
|
196
|
+
if (void 0 === target) return void setNow(void 0);
|
|
197
|
+
setNow(Date.now());
|
|
198
|
+
const timer = setInterval(()=>{
|
|
199
|
+
const current = Date.now();
|
|
200
|
+
const difference = Math.max(0, 'countdown' === type ? target - current : current - target);
|
|
201
|
+
setNow(current);
|
|
202
|
+
callbacks.current.onChange?.(difference);
|
|
203
|
+
if ('countdown' === type && current >= target) {
|
|
204
|
+
clearInterval(timer);
|
|
205
|
+
callbacks.current.onFinish?.();
|
|
206
|
+
}
|
|
207
|
+
}, 1000 / 60);
|
|
208
|
+
return ()=>clearInterval(timer);
|
|
209
|
+
}, [
|
|
210
|
+
target,
|
|
211
|
+
type
|
|
212
|
+
]);
|
|
213
|
+
return /*#__PURE__*/ jsx(StatisticRoot, {
|
|
214
|
+
...rest,
|
|
215
|
+
value: value,
|
|
216
|
+
formatter: ()=>void 0 === now || void 0 === target ? '-' : formatDuration('countdown' === type ? target - now : now - target, format)
|
|
217
|
+
});
|
|
503
218
|
}
|
|
504
219
|
function Countdown(props) {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
...props,
|
|
510
|
-
type: "countdown"
|
|
511
|
-
});
|
|
512
|
-
$[0] = props;
|
|
513
|
-
$[1] = t0;
|
|
514
|
-
} else t0 = $[1];
|
|
515
|
-
return t0;
|
|
220
|
+
return /*#__PURE__*/ jsx(StatisticTimer, {
|
|
221
|
+
...props,
|
|
222
|
+
type: "countdown"
|
|
223
|
+
});
|
|
516
224
|
}
|
|
517
225
|
const Statistic = Object.assign(StatisticRoot, {
|
|
518
226
|
Timer: StatisticTimer,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
2
|
const STATUS_PATHS = {
|
|
4
3
|
success: /*#__PURE__*/ jsxs(Fragment, {
|
|
5
4
|
children: [
|
|
@@ -48,30 +47,19 @@ const STATUS_PATHS = {
|
|
|
48
47
|
]
|
|
49
48
|
})
|
|
50
49
|
};
|
|
51
|
-
function StatusIcon(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
strokeLinecap: "round",
|
|
66
|
-
strokeLinejoin: "round",
|
|
67
|
-
"aria-hidden": "true",
|
|
68
|
-
focusable: "false",
|
|
69
|
-
children: t2
|
|
70
|
-
});
|
|
71
|
-
$[0] = size;
|
|
72
|
-
$[1] = t2;
|
|
73
|
-
$[2] = t3;
|
|
74
|
-
} else t3 = $[2];
|
|
75
|
-
return t3;
|
|
50
|
+
function StatusIcon({ type, size = '1em' }) {
|
|
51
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
52
|
+
width: size,
|
|
53
|
+
height: size,
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
fill: "none",
|
|
56
|
+
stroke: "currentColor",
|
|
57
|
+
strokeWidth: 2,
|
|
58
|
+
strokeLinecap: "round",
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
focusable: "false",
|
|
62
|
+
children: STATUS_PATHS[type]
|
|
63
|
+
});
|
|
76
64
|
}
|
|
77
65
|
export { StatusIcon };
|