@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,280 +1,169 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState } from "react";
|
|
1
|
+
import { useMemo, useState } from "react";
|
|
3
2
|
import { getColKey, nextSortOrder } from "./table-model.js";
|
|
4
|
-
function useTableData(
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
order: null
|
|
14
|
-
} : {
|
|
15
|
-
key: getColKey(configuredColumns[index], index),
|
|
16
|
-
order: configuredColumns[index].defaultSortOrder ?? null
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
$[0] = configuredColumns;
|
|
20
|
-
$[1] = t1;
|
|
21
|
-
} else t1 = $[1];
|
|
22
|
-
const [sort, setSort] = useState(t1);
|
|
23
|
-
let t2;
|
|
24
|
-
if ($[2] !== configuredColumns) {
|
|
25
|
-
t2 = ()=>{
|
|
26
|
-
const values = Object.create(null);
|
|
27
|
-
configuredColumns.forEach((column_0, index_0)=>{
|
|
28
|
-
if (column_0.filters) values[getColKey(column_0, index_0)] = column_0.filteredValue ?? [];
|
|
29
|
-
});
|
|
30
|
-
return values;
|
|
3
|
+
function useTableData({ columns, configuredColumns, dataSource, pagination: paginationProp, onChange }) {
|
|
4
|
+
const [sort, setSort] = useState(()=>{
|
|
5
|
+
const index = configuredColumns.findIndex((column)=>column.defaultSortOrder);
|
|
6
|
+
return index < 0 ? {
|
|
7
|
+
key: null,
|
|
8
|
+
order: null
|
|
9
|
+
} : {
|
|
10
|
+
key: getColKey(configuredColumns[index], index),
|
|
11
|
+
order: configuredColumns[index].defaultSortOrder ?? null
|
|
31
12
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
});
|
|
14
|
+
const [filters, setFilters] = useState(()=>{
|
|
15
|
+
const values = Object.create(null);
|
|
16
|
+
configuredColumns.forEach((column, index)=>{
|
|
17
|
+
if (column.filters) values[getColKey(column, index)] = column.filteredValue ?? [];
|
|
18
|
+
});
|
|
19
|
+
return values;
|
|
20
|
+
});
|
|
36
21
|
const paginationConfig = false === paginationProp ? void 0 : paginationProp;
|
|
37
22
|
const [internalPage, setPage] = useState(paginationConfig?.defaultCurrent ?? 1);
|
|
38
23
|
const [internalPageSize, setPageSize] = useState(paginationConfig?.defaultPageSize ?? paginationConfig?.pageSize ?? 10);
|
|
39
24
|
const pageSize = paginationConfig?.pageSize ?? internalPageSize;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
let t6;
|
|
59
|
-
if ($[15] !== columnKeys || $[16] !== filters || $[17] !== hasControlledSort || $[18] !== sort) {
|
|
60
|
-
t6 = (column_4, index_3)=>{
|
|
61
|
-
const key = columnKeys[index_3];
|
|
62
|
-
return {
|
|
63
|
-
column: column_4,
|
|
64
|
-
key,
|
|
65
|
-
order: column_4.sorter ? void 0 !== column_4.sortOrder ? column_4.sortOrder : hasControlledSort || sort.key !== key ? null : sort.order : null,
|
|
66
|
-
values: column_4.filteredValue ?? (Object.hasOwn(filters, key) ? filters[key] : [])
|
|
67
|
-
};
|
|
25
|
+
const hasControlledSort = columns.some((column)=>column.sorter && column.sortOrder);
|
|
26
|
+
const columnKeys = useMemo(()=>{
|
|
27
|
+
const configuredIndexes = new Map(configuredColumns.map((column, index)=>[
|
|
28
|
+
column,
|
|
29
|
+
index
|
|
30
|
+
]));
|
|
31
|
+
return columns.map((column, index)=>getColKey(column, configuredIndexes.get(column) ?? index));
|
|
32
|
+
}, [
|
|
33
|
+
columns,
|
|
34
|
+
configuredColumns
|
|
35
|
+
]);
|
|
36
|
+
const columnStates = useMemo(()=>columns.map((column, index)=>{
|
|
37
|
+
const key = columnKeys[index];
|
|
38
|
+
return {
|
|
39
|
+
column,
|
|
40
|
+
key,
|
|
41
|
+
order: column.sorter ? void 0 !== column.sortOrder ? column.sortOrder : hasControlledSort || sort.key !== key ? null : sort.order : null,
|
|
42
|
+
values: column.filteredValue ?? (Object.hasOwn(filters, key) ? filters[key] : [])
|
|
68
43
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
$[20] = columnStates;
|
|
91
|
-
$[21] = t6;
|
|
92
|
-
} else t6 = $[21];
|
|
93
|
-
const resolvedSort = t6;
|
|
94
|
-
let values_0;
|
|
95
|
-
if ($[22] !== columnStates || $[23] !== filters) {
|
|
96
|
-
values_0 = Object.assign(Object.create(null), filters);
|
|
97
|
-
for (const state_0 of columnStates)if (void 0 !== state_0.column.filteredValue) values_0[state_0.key] = state_0.values;
|
|
98
|
-
$[22] = columnStates;
|
|
99
|
-
$[23] = filters;
|
|
100
|
-
$[24] = values_0;
|
|
101
|
-
} else values_0 = $[24];
|
|
102
|
-
const resolvedFilters = values_0;
|
|
103
|
-
let data;
|
|
104
|
-
if ($[25] !== columnStates || $[26] !== dataSource) {
|
|
105
|
-
data = [
|
|
44
|
+
}), [
|
|
45
|
+
columns,
|
|
46
|
+
columnKeys,
|
|
47
|
+
sort,
|
|
48
|
+
filters,
|
|
49
|
+
hasControlledSort
|
|
50
|
+
]);
|
|
51
|
+
const resolvedSort = columnStates.find((state)=>state.order) ?? {
|
|
52
|
+
key: null,
|
|
53
|
+
order: null
|
|
54
|
+
};
|
|
55
|
+
const resolvedFilters = useMemo(()=>{
|
|
56
|
+
const values = Object.assign(Object.create(null), filters);
|
|
57
|
+
for (const state of columnStates)if (void 0 !== state.column.filteredValue) values[state.key] = state.values;
|
|
58
|
+
return values;
|
|
59
|
+
}, [
|
|
60
|
+
columnStates,
|
|
61
|
+
filters
|
|
62
|
+
]);
|
|
63
|
+
const processedData = useMemo(()=>{
|
|
64
|
+
let data = [
|
|
106
65
|
...dataSource
|
|
107
66
|
];
|
|
108
|
-
for (const { column
|
|
109
|
-
const activeSort = columnStates.find(
|
|
110
|
-
if (activeSort &&
|
|
67
|
+
for (const { column, values } of columnStates)if (column.filters && column.onFilter && values.length > 0) data = data.filter((record)=>values.some((v)=>column.onFilter(v, record)));
|
|
68
|
+
const activeSort = columnStates.find(({ column, order })=>null !== order && 'function' == typeof column.sorter);
|
|
69
|
+
if (activeSort && 'function' == typeof activeSort.column.sorter) {
|
|
111
70
|
const compare = activeSort.column.sorter;
|
|
112
71
|
data.sort((a, b)=>{
|
|
113
72
|
const result = compare.call(activeSort.column, a, b);
|
|
114
|
-
return
|
|
73
|
+
return 'descend' === activeSort.order ? -result : result;
|
|
115
74
|
});
|
|
116
75
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
76
|
+
return data;
|
|
77
|
+
}, [
|
|
78
|
+
dataSource,
|
|
79
|
+
columnStates
|
|
80
|
+
]);
|
|
122
81
|
const total = paginationConfig?.total ?? processedData.length;
|
|
123
82
|
const lastPage = Math.max(1, Math.ceil(total / pageSize));
|
|
124
83
|
const boundedPage = Math.min(Math.max(1, internalPage), lastPage);
|
|
125
84
|
if (false !== paginationProp && paginationConfig?.current === void 0 && boundedPage !== internalPage) setPage(boundedPage);
|
|
126
85
|
const currentPage = paginationConfig?.current ?? internalPage;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (false === paginationProp || processedData.length < total) {
|
|
130
|
-
t7 = processedData;
|
|
131
|
-
break bb0;
|
|
132
|
-
}
|
|
86
|
+
const rows = useMemo(()=>{
|
|
87
|
+
if (false === paginationProp || processedData.length < total) return processedData;
|
|
133
88
|
const start = (currentPage - 1) * pageSize;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
89
|
+
return processedData.slice(start, start + pageSize);
|
|
90
|
+
}, [
|
|
91
|
+
processedData,
|
|
92
|
+
paginationProp,
|
|
93
|
+
total,
|
|
94
|
+
currentPage,
|
|
95
|
+
pageSize
|
|
96
|
+
]);
|
|
97
|
+
function notifyChange(page, size, nextSort = resolvedSort, nextFilters = resolvedFilters) {
|
|
98
|
+
const filterEntries = [];
|
|
99
|
+
for (const { column, key } of columnStates){
|
|
100
|
+
if (!column.filters) continue;
|
|
101
|
+
const values = Object.hasOwn(nextFilters, key) ? nextFilters[key] : void 0;
|
|
102
|
+
filterEntries.push([
|
|
103
|
+
key,
|
|
104
|
+
values?.length ? [
|
|
105
|
+
...values
|
|
106
|
+
] : null
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
const column = null === nextSort.key ? void 0 : columnStates.find((state)=>state.key === nextSort.key)?.column;
|
|
110
|
+
onChange?.({
|
|
111
|
+
current: page,
|
|
112
|
+
pageSize: size
|
|
113
|
+
}, Object.fromEntries(filterEntries), null !== nextSort.key && nextSort.order ? {
|
|
114
|
+
column,
|
|
115
|
+
order: nextSort.order,
|
|
116
|
+
field: column?.dataIndex
|
|
117
|
+
} : {
|
|
118
|
+
order: null
|
|
119
|
+
});
|
|
143
120
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
121
|
+
function getColumnState(index) {
|
|
122
|
+
const { column, key, order, values } = columnStates[index];
|
|
123
|
+
return {
|
|
124
|
+
sortOrder: order,
|
|
125
|
+
filteredValue: values,
|
|
126
|
+
onSort () {
|
|
127
|
+
const controlled = void 0 !== column.sortOrder;
|
|
128
|
+
const nextOrder = nextSortOrder(order);
|
|
129
|
+
const next = {
|
|
130
|
+
key: nextOrder ? key : null,
|
|
131
|
+
order: nextOrder
|
|
132
|
+
};
|
|
133
|
+
if (!controlled) setSort(next);
|
|
134
|
+
notifyChange(currentPage, pageSize, next);
|
|
135
|
+
},
|
|
136
|
+
onFilter (nextValues) {
|
|
137
|
+
const next = {
|
|
138
|
+
...resolvedFilters,
|
|
139
|
+
[key]: nextValues
|
|
140
|
+
};
|
|
141
|
+
if (void 0 === column.filteredValue) setFilters((previous)=>({
|
|
142
|
+
...previous,
|
|
143
|
+
[key]: nextValues
|
|
144
|
+
}));
|
|
145
|
+
setPage(1);
|
|
146
|
+
notifyChange(1, pageSize, resolvedSort, next);
|
|
160
147
|
}
|
|
161
|
-
const column_8 = null === nextSort.key ? void 0 : columnStates.find((state_1)=>state_1.key === nextSort.key)?.column;
|
|
162
|
-
onChange?.({
|
|
163
|
-
current: page,
|
|
164
|
-
pageSize: size
|
|
165
|
-
}, Object.fromEntries(filterEntries), null !== nextSort.key && nextSort.order ? {
|
|
166
|
-
column: column_8,
|
|
167
|
-
order: nextSort.order,
|
|
168
|
-
field: column_8?.dataIndex
|
|
169
|
-
} : {
|
|
170
|
-
order: null
|
|
171
|
-
});
|
|
172
148
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const notifyChange = t8;
|
|
180
|
-
let t9;
|
|
181
|
-
if ($[37] !== columnStates || $[38] !== currentPage || $[39] !== notifyChange || $[40] !== pageSize || $[41] !== resolvedFilters || $[42] !== resolvedSort) {
|
|
182
|
-
t9 = function(index_4) {
|
|
183
|
-
const { column: column_9, key: key_1, order: order_0, values: values_3 } = columnStates[index_4];
|
|
184
|
-
return {
|
|
185
|
-
sortOrder: order_0,
|
|
186
|
-
filteredValue: values_3,
|
|
187
|
-
onSort () {
|
|
188
|
-
const controlled = void 0 !== column_9.sortOrder;
|
|
189
|
-
const nextOrder = nextSortOrder(order_0);
|
|
190
|
-
const next = {
|
|
191
|
-
key: nextOrder ? key_1 : null,
|
|
192
|
-
order: nextOrder
|
|
193
|
-
};
|
|
194
|
-
if (!controlled) setSort(next);
|
|
195
|
-
notifyChange(currentPage, pageSize, next);
|
|
196
|
-
},
|
|
197
|
-
onFilter (nextValues) {
|
|
198
|
-
const next_0 = {
|
|
199
|
-
...resolvedFilters,
|
|
200
|
-
[key_1]: nextValues
|
|
201
|
-
};
|
|
202
|
-
if (void 0 === column_9.filteredValue) setFilters((previous)=>({
|
|
203
|
-
...previous,
|
|
204
|
-
[key_1]: nextValues
|
|
205
|
-
}));
|
|
206
|
-
setPage(1);
|
|
207
|
-
notifyChange(1, pageSize, resolvedSort, next_0);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
$[37] = columnStates;
|
|
212
|
-
$[38] = currentPage;
|
|
213
|
-
$[39] = notifyChange;
|
|
214
|
-
$[40] = pageSize;
|
|
215
|
-
$[41] = resolvedFilters;
|
|
216
|
-
$[42] = resolvedSort;
|
|
217
|
-
$[43] = t9;
|
|
218
|
-
} else t9 = $[43];
|
|
219
|
-
const getColumnState = t9;
|
|
220
|
-
let t10;
|
|
221
|
-
if ($[44] !== currentPage || $[45] !== notifyChange || $[46] !== pageSize || $[47] !== paginationConfig?.pageSizeOptions || $[48] !== paginationConfig?.showSizeChanger || $[49] !== paginationConfig?.showTotal || $[50] !== paginationProp || $[51] !== total) {
|
|
222
|
-
t10 = false === paginationProp ? null : {
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
rows,
|
|
152
|
+
columnKeys,
|
|
153
|
+
getColumnState,
|
|
154
|
+
pagination: false === paginationProp ? null : {
|
|
223
155
|
current: currentPage,
|
|
224
156
|
pageSize,
|
|
225
157
|
total,
|
|
226
158
|
showSizeChanger: paginationConfig?.showSizeChanger,
|
|
227
159
|
pageSizeOptions: paginationConfig?.pageSizeOptions,
|
|
228
160
|
showTotal: paginationConfig?.showTotal,
|
|
229
|
-
onChange (
|
|
230
|
-
setPage(
|
|
231
|
-
setPageSize(
|
|
232
|
-
notifyChange(
|
|
161
|
+
onChange (page, size) {
|
|
162
|
+
setPage(page);
|
|
163
|
+
setPageSize(size);
|
|
164
|
+
notifyChange(page, size);
|
|
233
165
|
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
$[45] = notifyChange;
|
|
237
|
-
$[46] = pageSize;
|
|
238
|
-
$[47] = paginationConfig?.pageSizeOptions;
|
|
239
|
-
$[48] = paginationConfig?.showSizeChanger;
|
|
240
|
-
$[49] = paginationConfig?.showTotal;
|
|
241
|
-
$[50] = paginationProp;
|
|
242
|
-
$[51] = total;
|
|
243
|
-
$[52] = t10;
|
|
244
|
-
} else t10 = $[52];
|
|
245
|
-
let t11;
|
|
246
|
-
if ($[53] !== columnKeys || $[54] !== getColumnState || $[55] !== rows || $[56] !== t10) {
|
|
247
|
-
t11 = {
|
|
248
|
-
rows,
|
|
249
|
-
columnKeys,
|
|
250
|
-
getColumnState,
|
|
251
|
-
pagination: t10
|
|
252
|
-
};
|
|
253
|
-
$[53] = columnKeys;
|
|
254
|
-
$[54] = getColumnState;
|
|
255
|
-
$[55] = rows;
|
|
256
|
-
$[56] = t10;
|
|
257
|
-
$[57] = t11;
|
|
258
|
-
} else t11 = $[57];
|
|
259
|
-
return t11;
|
|
260
|
-
}
|
|
261
|
-
function _temp5(t0) {
|
|
262
|
-
const { column: column_6, order } = t0;
|
|
263
|
-
return null !== order && "function" == typeof column_6.sorter;
|
|
264
|
-
}
|
|
265
|
-
function _temp4(state) {
|
|
266
|
-
return state.order;
|
|
267
|
-
}
|
|
268
|
-
function _temp3(column_2, index_1) {
|
|
269
|
-
return [
|
|
270
|
-
column_2,
|
|
271
|
-
index_1
|
|
272
|
-
];
|
|
273
|
-
}
|
|
274
|
-
function _temp2(column_1) {
|
|
275
|
-
return column_1.sorter && column_1.sortOrder;
|
|
276
|
-
}
|
|
277
|
-
function _temp(column) {
|
|
278
|
-
return column.defaultSortOrder;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
279
168
|
}
|
|
280
169
|
export { useTableData };
|
|
@@ -1,122 +1,125 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
[data-tao-tabs] {
|
|
3
|
+
font-family: var(--tao-font-family);
|
|
4
|
+
color: var(--tao-color-text);
|
|
5
|
+
width: fit-content;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-tao-tabs-list] {
|
|
10
|
+
display: flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-tao-tab] {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
color: var(--tao-color-text-secondary);
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
transition: color var(--tao-motion-duration-fast) var(--tao-motion-ease-out),
|
|
19
|
+
background-color var(--tao-motion-duration-fast)
|
|
20
|
+
var(--tao-motion-ease-out);
|
|
21
|
+
background: none;
|
|
22
|
+
border: none;
|
|
23
|
+
outline: none;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-tao-tab]:hover:not(:disabled) {
|
|
31
|
+
color: var(--tao-color-text);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-tao-tab][data-tao-active] {
|
|
35
|
+
color: var(--tao-primary);
|
|
36
|
+
text-shadow: 0 0 .25px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-tao-tab]:disabled {
|
|
40
|
+
color: var(--tao-color-text-disabled);
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-tao-tab]:focus-visible {
|
|
45
|
+
box-shadow: 0 0 0 2px var(--tao-control-outline);
|
|
46
|
+
border-radius: var(--tao-radius-sm);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-tao-tabs][data-tao-variant="line"] [data-tao-tab] {
|
|
50
|
+
padding: var(--tao-padding-xs) 0;
|
|
51
|
+
margin-inline-end: var(--tao-padding-lg);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-tao-tabs][data-tao-variant="line"][data-tao-size="small"] [data-tao-tab] {
|
|
55
|
+
font-size: var(--tao-font-size-sm);
|
|
56
|
+
padding: var(--tao-padding-xxs) 0;
|
|
57
|
+
margin-inline-end: var(--tao-padding);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[data-tao-tabs][data-tao-variant="line"][data-tao-size="medium"] [data-tao-tab] {
|
|
61
|
+
font-size: var(--tao-font-size-base);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-tao-tabs][data-tao-variant="line"][data-tao-size="large"] [data-tao-tab] {
|
|
65
|
+
font-size: var(--tao-font-size-lg);
|
|
66
|
+
padding: var(--tao-padding-sm) 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-tao-tabs-ink] {
|
|
70
|
+
inset-inline-start: 0;
|
|
71
|
+
background: var(--tao-primary);
|
|
72
|
+
transform-origin: 0;
|
|
73
|
+
width: 1px;
|
|
74
|
+
height: 2px;
|
|
75
|
+
transition: transform var(--tao-motion-duration-mid)
|
|
76
|
+
var(--tao-motion-ease-out-quint);
|
|
77
|
+
border-radius: 0;
|
|
78
|
+
position: absolute;
|
|
79
|
+
bottom: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-tao-tabs][data-tao-variant="card"] [data-tao-tabs-list] {
|
|
83
|
+
gap: var(--tao-padding-xxs);
|
|
84
|
+
background: var(--tao-color-fill-quaternary);
|
|
85
|
+
border-radius: var(--tao-radius-md);
|
|
86
|
+
padding: var(--tao-padding-xxs);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-tao-tabs][data-tao-variant="card"] [data-tao-tab] {
|
|
90
|
+
border-radius: var(--tao-radius-sm);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-tao-tabs][data-tao-variant="card"][data-tao-size="small"] [data-tao-tab] {
|
|
94
|
+
font-size: var(--tao-font-size-sm);
|
|
95
|
+
padding: var(--tao-padding-xxs) var(--tao-padding-xs);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-tao-tabs][data-tao-variant="card"][data-tao-size="medium"] [data-tao-tab] {
|
|
99
|
+
font-size: var(--tao-font-size-base);
|
|
100
|
+
padding: var(--tao-padding-xxs) var(--tao-padding-sm);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-tao-tabs][data-tao-variant="card"][data-tao-size="large"] [data-tao-tab] {
|
|
104
|
+
font-size: var(--tao-font-size-lg);
|
|
105
|
+
padding: var(--tao-padding-xs) var(--tao-padding);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-tao-tabs][data-tao-variant="card"] [data-tao-tab]:hover:not(:disabled):not([data-tao-active]) {
|
|
109
|
+
background: var(--tao-color-fill-tertiary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-tao-tabs][data-tao-variant="card"] [data-tao-tab][data-tao-active] {
|
|
113
|
+
background: var(--tao-color-bg-container);
|
|
114
|
+
box-shadow: var(--tao-box-shadow-tertiary);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-tao-tabs-panel] {
|
|
118
|
+
padding-top: var(--tao-padding);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-tao-tabs-panel][hidden] {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
121
124
|
}
|
|
122
125
|
|