@rockshin/tao-ui 0.0.41 → 0.0.43
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 +39 -7
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/component-manifest.json +1352 -24
- package/dist/components/affix/affix.css +11 -0
- package/dist/components/affix/affix.d.ts +21 -0
- package/dist/components/affix/affix.js +140 -0
- package/dist/components/alert/alert.css +1 -0
- package/dist/components/app/app-modals.d.ts +2 -0
- package/dist/components/app/app-modals.js +266 -0
- package/dist/components/app/app-notices.d.ts +6 -0
- package/dist/components/app/app-notices.js +334 -0
- package/dist/components/app/app-types.d.ts +154 -0
- package/dist/components/app/app-types.js +0 -0
- package/dist/components/app/app.css +221 -0
- package/dist/components/app/app.d.ts +7 -0
- package/dist/components/app/app.js +69 -0
- package/dist/components/auto-complete/auto-complete.css +35 -0
- package/dist/components/auto-complete/auto-complete.d.ts +47 -0
- package/dist/components/auto-complete/auto-complete.js +106 -0
- package/dist/components/avatar/avatar.css +95 -0
- package/dist/components/avatar/avatar.d.ts +50 -0
- package/dist/components/avatar/avatar.js +159 -0
- package/dist/components/badge/badge.css +165 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.js +412 -0
- package/dist/components/border-beam/border-beam.css +35 -0
- package/dist/components/border-beam/border-beam.d.ts +27 -0
- package/dist/components/border-beam/border-beam.js +215 -0
- package/dist/components/button/button.css +7 -0
- package/dist/components/calendar/calendar.css +126 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +178 -0
- package/dist/components/card/card-tabs.d.ts +43 -0
- package/dist/components/card/card-tabs.js +455 -0
- package/dist/components/card/card.css +401 -0
- package/dist/components/card/card.d.ts +74 -0
- package/dist/components/card/card.js +362 -0
- package/dist/components/carousel/carousel.css +232 -0
- package/dist/components/carousel/carousel.d.ts +35 -0
- package/dist/components/carousel/carousel.js +248 -0
- package/dist/components/cascader/cascader.css +123 -0
- package/dist/components/cascader/cascader.d.ts +58 -0
- package/dist/components/cascader/cascader.js +132 -0
- package/dist/components/checkbox/checkbox.css +7 -0
- package/dist/components/collapse/collapse-panels.d.ts +4 -0
- package/dist/components/collapse/collapse-panels.js +413 -0
- package/dist/components/collapse/collapse.css +199 -0
- package/dist/components/collapse/collapse.d.ts +77 -0
- package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
- package/dist/components/color-picker/color-picker-types.d.ts +78 -0
- package/dist/components/color-picker/color-picker-types.js +0 -0
- package/dist/components/color-picker/color-picker.css +265 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/color-picker.js +1049 -0
- package/dist/components/color-picker/color.d.ts +35 -0
- package/dist/components/color-picker/color.js +65 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
- package/dist/components/date-picker/calendar/calendar-header.js +76 -69
- package/dist/components/date-picker/calendar/month-grid.js +20 -31
- package/dist/components/date-picker/calendar/time-panel.js +46 -41
- package/dist/components/date-picker/date-picker.css +22 -56
- package/dist/components/date-picker/date-picker.d.ts +2 -0
- package/dist/components/date-picker/date-picker.js +14 -9
- package/dist/components/date-picker/presets.js +5 -2
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +16 -13
- package/dist/components/descriptions/descriptions.css +109 -0
- package/dist/components/descriptions/descriptions.d.ts +49 -0
- package/dist/components/descriptions/descriptions.js +189 -0
- package/dist/components/divider/divider.css +71 -0
- package/dist/components/divider/divider.d.ts +31 -0
- package/dist/components/divider/divider.js +83 -0
- package/dist/components/drawer/drawer.js +199 -184
- package/dist/components/empty/empty.css +35 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.js +278 -0
- package/dist/components/float-button/float-button.css +146 -0
- package/dist/components/float-button/float-button.d.ts +67 -0
- package/dist/components/float-button/float-button.js +347 -0
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +1 -0
- package/dist/components/form/form.css +15 -0
- package/dist/components/form/form.js +4 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +109 -84
- package/dist/components/image/image-icons.d.ts +16 -0
- package/dist/components/image/image-icons.js +63 -0
- package/dist/components/image/image.css +253 -0
- package/dist/components/image/image.d.ts +75 -0
- package/dist/components/image/image.js +818 -0
- package/dist/components/input/base-input.d.ts +25 -0
- package/dist/components/input/base-input.js +104 -0
- package/dist/components/input/input-shared.css +75 -0
- package/dist/components/input/input-shared.d.ts +59 -0
- package/dist/components/input/input-shared.js +152 -0
- package/dist/components/input/input.css +107 -10
- package/dist/components/input/input.d.ts +12 -16
- package/dist/components/input/input.js +11 -154
- package/dist/components/input/otp.d.ts +29 -0
- package/dist/components/input/otp.js +335 -0
- package/dist/components/input/password.d.ts +12 -0
- package/dist/components/input/password.js +117 -0
- package/dist/components/input/search.d.ts +16 -0
- package/dist/components/input/search.js +99 -0
- package/dist/components/input-number/input-number.d.ts +2 -2
- package/dist/components/input-number/input-number.js +2 -2
- package/dist/components/list/list-pagination.css +127 -0
- package/dist/components/list/list-pagination.d.ts +38 -0
- package/dist/components/list/list-pagination.js +322 -0
- package/dist/components/list/list.css +225 -0
- package/dist/components/list/list.d.ts +77 -0
- package/dist/components/list/list.js +660 -0
- package/dist/components/listy/listy.css +55 -0
- package/dist/components/listy/listy.d.ts +20 -0
- package/dist/components/listy/listy.js +158 -0
- package/dist/components/masonry/masonry.css +13 -0
- package/dist/components/masonry/masonry.d.ts +39 -0
- package/dist/components/masonry/masonry.js +287 -0
- package/dist/components/mentions/mentions.css +179 -0
- package/dist/components/mentions/mentions.d.ts +48 -0
- package/dist/components/mentions/mentions.js +115 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/modal/modal.d.ts +30 -4
- package/dist/components/modal/modal.js +534 -241
- package/dist/components/pagination/pagination.css +10 -0
- package/dist/components/progress/progress.css +187 -0
- package/dist/components/progress/progress.d.ts +66 -0
- package/dist/components/progress/progress.js +567 -0
- package/dist/components/qr-code/qr-code.css +39 -0
- package/dist/components/qr-code/qr-code.d.ts +43 -0
- package/dist/components/qr-code/qr-code.js +286 -0
- package/dist/components/radio/radio.css +7 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +78 -73
- package/dist/components/rate/rate.css +97 -0
- package/dist/components/rate/rate.d.ts +17 -0
- package/dist/components/rate/rate.js +172 -0
- package/dist/components/result/result.css +69 -0
- package/dist/components/result/result.d.ts +33 -0
- package/dist/components/result/result.js +320 -0
- package/dist/components/segmented/segmented.css +134 -0
- package/dist/components/segmented/segmented.d.ts +40 -0
- package/dist/components/segmented/segmented.js +169 -0
- package/dist/components/select/mobile-select.css +1 -16
- package/dist/components/select/mobile-select.d.ts +11 -4
- package/dist/components/select/mobile-select.js +172 -59
- package/dist/components/select/select-tags.js +178 -130
- package/dist/components/select/select-types.d.ts +53 -0
- package/dist/components/select/select.css +86 -8
- package/dist/components/select/select.js +59 -31
- package/dist/components/select/use-select-selection.js +44 -43
- package/dist/components/skeleton/skeleton.css +129 -0
- package/dist/components/skeleton/skeleton.d.ts +78 -0
- package/dist/components/skeleton/skeleton.js +457 -0
- package/dist/components/slider/slider.css +191 -0
- package/dist/components/slider/slider.d.ts +47 -0
- package/dist/components/slider/slider.js +310 -0
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/statistic/statistic.css +34 -0
- package/dist/components/statistic/statistic.d.ts +46 -0
- package/dist/components/statistic/statistic.js +491 -0
- package/dist/components/steps/steps.css +53 -3
- package/dist/components/switch/switch-touch.css +20 -0
- package/dist/components/switch/switch.css +24 -13
- package/dist/components/switch/switch.js +8 -5
- package/dist/components/table/table.css +0 -5
- package/dist/components/table/table.js +21 -22
- package/dist/components/textarea/textarea.css +21 -1
- package/dist/components/textarea/textarea.d.ts +12 -6
- package/dist/components/textarea/textarea.js +120 -219
- package/dist/components/time-picker/time-picker.css +212 -0
- package/dist/components/time-picker/time-picker.d.ts +63 -0
- package/dist/components/time-picker/time-picker.js +356 -0
- package/dist/components/timeline/timeline.css +259 -0
- package/dist/components/timeline/timeline.d.ts +50 -0
- package/dist/components/timeline/timeline.js +140 -0
- package/dist/components/tour/tour.css +151 -0
- package/dist/components/tour/tour.d.ts +45 -0
- package/dist/components/tour/tour.js +575 -0
- package/dist/components/transfer/transfer-list.d.ts +2 -0
- package/dist/components/transfer/transfer-list.js +513 -0
- package/dist/components/transfer/transfer-parts.d.ts +3 -0
- package/dist/components/transfer/transfer-parts.js +163 -0
- package/dist/components/transfer/transfer-types.d.ts +163 -0
- package/dist/components/transfer/transfer-types.js +0 -0
- package/dist/components/transfer/transfer.css +226 -0
- package/dist/components/transfer/transfer.d.ts +13 -0
- package/dist/components/transfer/transfer.js +204 -0
- package/dist/components/tree/tree-check.d.ts +1 -0
- package/dist/components/tree/tree-check.js +36 -0
- package/dist/components/tree/tree.css +245 -0
- package/dist/components/tree/tree.d.ts +46 -0
- package/dist/components/tree/tree.js +388 -0
- package/dist/components/tree-select/select-engine.css +238 -0
- package/dist/components/tree-select/select-engine.d.ts +20 -0
- package/dist/components/tree-select/select-engine.js +46 -0
- package/dist/components/tree-select/tree-select.css +25 -0
- package/dist/components/tree-select/tree-select.d.ts +50 -0
- package/dist/components/tree-select/tree-select.js +130 -0
- package/dist/components/upload/upload-types.d.ts +135 -0
- package/dist/components/upload/upload-types.js +0 -0
- package/dist/components/upload/upload.css +166 -0
- package/dist/components/upload/upload.d.ts +12 -0
- package/dist/components/upload/upload.js +465 -0
- package/dist/components/watermark/watermark-context.d.ts +7 -0
- package/dist/components/watermark/watermark-context.js +20 -0
- package/dist/components/watermark/watermark.css +10 -0
- package/dist/components/watermark/watermark.d.ts +38 -0
- package/dist/components/watermark/watermark.js +436 -0
- package/dist/docs/component-docs.d.ts +35 -29
- package/dist/docs/component-docs.js +75 -3
- package/dist/docs/components/affix.doc.d.ts +14 -0
- package/dist/docs/components/affix.doc.js +22 -0
- package/dist/docs/components/app.doc.d.ts +18 -0
- package/dist/docs/components/app.doc.js +42 -0
- package/dist/docs/components/auto-complete.doc.d.ts +18 -0
- package/dist/docs/components/auto-complete.doc.js +49 -0
- package/dist/docs/components/avatar.doc.d.ts +17 -0
- package/dist/docs/components/avatar.doc.js +36 -0
- package/dist/docs/components/badge.doc.d.ts +17 -0
- package/dist/docs/components/badge.doc.js +34 -0
- package/dist/docs/components/border-beam.doc.d.ts +14 -0
- package/dist/docs/components/border-beam.doc.js +22 -0
- package/dist/docs/components/{collapsible.doc.d.ts → calendar.doc.d.ts} +1 -1
- package/dist/docs/components/calendar.doc.js +45 -0
- package/dist/docs/components/card.doc.d.ts +17 -0
- package/dist/docs/components/card.doc.js +39 -0
- package/dist/docs/components/carousel.doc.d.ts +15 -0
- package/dist/docs/components/carousel.doc.js +26 -0
- package/dist/docs/components/cascader.doc.d.ts +18 -0
- package/dist/docs/components/cascader.doc.js +54 -0
- package/dist/docs/components/collapse.doc.d.ts +18 -0
- package/dist/docs/components/collapse.doc.js +47 -0
- package/dist/docs/components/color-picker.doc.d.ts +18 -0
- package/dist/docs/components/color-picker.doc.js +46 -0
- package/dist/docs/components/descriptions.doc.d.ts +14 -0
- package/dist/docs/components/descriptions.doc.js +26 -0
- package/dist/docs/components/divider.doc.d.ts +17 -0
- package/dist/docs/components/divider.doc.js +34 -0
- package/dist/docs/components/empty.doc.d.ts +18 -0
- package/dist/docs/components/empty.doc.js +40 -0
- package/dist/docs/components/float-button.doc.d.ts +14 -0
- package/dist/docs/components/float-button.doc.js +23 -0
- package/dist/docs/components/form.doc.d.ts +1 -1
- package/dist/docs/components/image.doc.d.ts +15 -0
- package/dist/docs/components/image.doc.js +38 -0
- package/dist/docs/components/input.doc.js +11 -4
- package/dist/docs/components/list.doc.d.ts +18 -0
- package/dist/docs/components/list.doc.js +43 -0
- package/dist/docs/components/listy.doc.d.ts +18 -0
- package/dist/docs/components/listy.doc.js +40 -0
- package/dist/docs/components/masonry.doc.d.ts +14 -0
- package/dist/docs/components/masonry.doc.js +22 -0
- package/dist/docs/components/mentions.doc.d.ts +18 -0
- package/dist/docs/components/mentions.doc.js +43 -0
- package/dist/docs/components/modal.doc.js +3 -0
- package/dist/docs/components/progress.doc.d.ts +18 -0
- package/dist/docs/components/progress.doc.js +41 -0
- package/dist/docs/components/qr-code.doc.d.ts +18 -0
- package/dist/docs/components/qr-code.doc.js +41 -0
- package/dist/docs/components/rate.doc.d.ts +18 -0
- package/dist/docs/components/rate.doc.js +38 -0
- package/dist/docs/components/result.doc.d.ts +18 -0
- package/dist/docs/components/result.doc.js +42 -0
- package/dist/docs/components/segmented.doc.d.ts +14 -0
- package/dist/docs/components/segmented.doc.js +24 -0
- package/dist/docs/components/skeleton.doc.d.ts +18 -0
- package/dist/docs/components/skeleton.doc.js +42 -0
- package/dist/docs/components/slider.doc.d.ts +18 -0
- package/dist/docs/components/slider.doc.js +41 -0
- package/dist/docs/components/statistic.doc.d.ts +14 -0
- package/dist/docs/components/statistic.doc.js +27 -0
- package/dist/docs/components/textarea.doc.js +4 -2
- package/dist/docs/components/time-picker.doc.d.ts +18 -0
- package/dist/docs/components/time-picker.doc.js +45 -0
- package/dist/docs/components/timeline.doc.d.ts +14 -0
- package/dist/docs/components/timeline.doc.js +29 -0
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/docs/components/tour.doc.d.ts +15 -0
- package/dist/docs/components/tour.doc.js +36 -0
- package/dist/docs/components/transfer.doc.d.ts +18 -0
- package/dist/docs/components/transfer.doc.js +48 -0
- package/dist/docs/components/tree-select.doc.d.ts +18 -0
- package/dist/docs/components/tree-select.doc.js +55 -0
- package/dist/docs/components/tree.doc.d.ts +18 -0
- package/dist/docs/components/tree.doc.js +46 -0
- package/dist/docs/components/upload.doc.d.ts +18 -0
- package/dist/docs/components/upload.doc.js +43 -0
- package/dist/docs/components/watermark.doc.d.ts +14 -0
- package/dist/docs/components/watermark.doc.js +22 -0
- package/dist/entries/affix.d.ts +3 -0
- package/dist/entries/{collapsible.js → affix.js} +1 -1
- package/dist/entries/app.d.ts +3 -0
- package/dist/entries/app.js +4 -0
- package/dist/entries/auto-complete.d.ts +4 -0
- package/dist/entries/auto-complete.js +4 -0
- package/dist/entries/avatar.d.ts +3 -0
- package/dist/entries/avatar.js +4 -0
- package/dist/entries/badge.d.ts +3 -0
- package/dist/entries/badge.js +4 -0
- package/dist/entries/border-beam.d.ts +3 -0
- package/dist/entries/border-beam.js +4 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +4 -0
- package/dist/entries/card.d.ts +3 -0
- package/dist/entries/card.js +4 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/cascader.d.ts +4 -0
- package/dist/entries/cascader.js +4 -0
- package/dist/entries/collapse.d.ts +3 -0
- package/dist/entries/collapse.js +4 -0
- package/dist/entries/color-picker.d.ts +5 -0
- package/dist/entries/color-picker.js +4 -0
- package/dist/entries/descriptions.d.ts +3 -0
- package/dist/entries/descriptions.js +4 -0
- package/dist/entries/divider.d.ts +3 -0
- package/dist/entries/divider.js +4 -0
- package/dist/entries/empty.d.ts +3 -0
- package/dist/entries/empty.js +4 -0
- package/dist/entries/float-button.d.ts +3 -0
- package/dist/entries/float-button.js +4 -0
- package/dist/entries/image.d.ts +3 -0
- package/dist/entries/image.js +4 -0
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/list.d.ts +3 -0
- package/dist/entries/list.js +4 -0
- package/dist/entries/listy.d.ts +3 -0
- package/dist/entries/listy.js +4 -0
- package/dist/entries/masonry.d.ts +3 -0
- package/dist/entries/masonry.js +4 -0
- package/dist/entries/mentions.d.ts +4 -0
- package/dist/entries/mentions.js +4 -0
- package/dist/entries/progress.d.ts +3 -0
- package/dist/entries/progress.js +4 -0
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/provider.js +1 -1
- package/dist/entries/qr-code.d.ts +4 -0
- package/dist/entries/qr-code.js +4 -0
- package/dist/entries/rate.d.ts +3 -0
- package/dist/entries/rate.js +4 -0
- package/dist/entries/result.d.ts +3 -0
- package/dist/entries/result.js +4 -0
- package/dist/entries/segmented.d.ts +3 -0
- package/dist/entries/segmented.js +4 -0
- package/dist/entries/skeleton.d.ts +3 -0
- package/dist/entries/skeleton.js +4 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +4 -0
- package/dist/entries/statistic.d.ts +3 -0
- package/dist/entries/statistic.js +4 -0
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/entries/time-picker.d.ts +3 -0
- package/dist/entries/time-picker.js +4 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +4 -0
- package/dist/entries/tour.d.ts +3 -0
- package/dist/entries/tour.js +4 -0
- package/dist/entries/transfer.d.ts +3 -0
- package/dist/entries/transfer.js +4 -0
- package/dist/entries/tree-select.d.ts +4 -0
- package/dist/entries/tree-select.js +4 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +4 -0
- package/dist/entries/upload.d.ts +4 -0
- package/dist/entries/upload.js +4 -0
- package/dist/entries/util.d.ts +1 -0
- package/dist/entries/util.js +1 -0
- package/dist/entries/watermark.d.ts +3 -0
- package/dist/entries/watermark.js +4 -0
- package/dist/index.d.ts +51 -6
- package/dist/index.js +39 -3
- package/dist/provider/locale.d.ts +65 -0
- package/dist/provider/locale.js +146 -0
- package/dist/provider/tao-provider.d.ts +16 -1
- package/dist/provider/tao-provider.js +105 -87
- package/dist/theme/control.css +12 -2
- package/dist/theme/theme.css +4 -2
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +1 -0
- package/dist/utils/breakpoint.d.ts +2 -2
- package/dist/utils/breakpoint.js +3 -1
- package/dist/utils/field-label.d.ts +4 -0
- package/dist/utils/field-label.js +7 -0
- package/dist/utils/interop-default.d.ts +2 -0
- package/dist/utils/interop-default.js +4 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +0 -0
- package/llms.txt +493 -22
- package/package.json +33 -9
- package/dist/components/collapsible/collapsible.css +0 -49
- package/dist/components/collapsible/collapsible.d.ts +0 -39
- package/dist/docs/components/collapsible.doc.js +0 -39
- package/dist/entries/collapsible.d.ts +0 -3
|
@@ -4,7 +4,9 @@ import { c } from "react-compiler-runtime";
|
|
|
4
4
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
5
|
import { useBreakpoint } from "../../utils/breakpoint.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
|
+
import { Checkbox } from "../checkbox/checkbox.js";
|
|
7
8
|
import { Pagination } from "../pagination/pagination.js";
|
|
9
|
+
import { Radio } from "../radio/radio.js";
|
|
8
10
|
import { TableFilterDropdown } from "./table-filter.js";
|
|
9
11
|
import { ExpandIcon, SortIcon, TableLoadingSpinner } from "./table-icons.js";
|
|
10
12
|
import { getCellValue, getColKey, getRowKey, resolveRowClassName, resolveRowStyle, resolveSemanticClassNames, resolveSemanticStyles } from "./table-model.js";
|
|
@@ -402,10 +404,12 @@ function Table(t0) {
|
|
|
402
404
|
...rowProps,
|
|
403
405
|
"data-tao-table-row": "",
|
|
404
406
|
"data-tao-selected": isSelected || void 0,
|
|
405
|
-
onClick:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
onClick: (event)=>{
|
|
408
|
+
const selectionCell = event.target.closest("[data-tao-table-selection-cell]");
|
|
409
|
+
if (selectionCell && event.target !== selectionCell) return void event.stopPropagation();
|
|
410
|
+
rowProps.onClick?.(event);
|
|
411
|
+
if (rowExpandable && expandable?.expandRowByClick) toggleExpand(record_3, key_3);
|
|
412
|
+
},
|
|
409
413
|
className: cx(resolvedClassNames["body.row"], resolveRowClassName(rowClassName, record_3, rowIdx), rowProps.className),
|
|
410
414
|
style: {
|
|
411
415
|
...resolvedStyles["body.row"],
|
|
@@ -420,8 +424,8 @@ function Table(t0) {
|
|
|
420
424
|
style: stickyStyle(stickyPositions.__expand__, 1),
|
|
421
425
|
children: rowExpandable && /*#__PURE__*/ jsx(ExpandIcon, {
|
|
422
426
|
expanded: isExpanded,
|
|
423
|
-
onClick: (
|
|
424
|
-
|
|
427
|
+
onClick: (e_0)=>{
|
|
428
|
+
e_0.stopPropagation();
|
|
425
429
|
toggleExpand(record_3, key_3);
|
|
426
430
|
}
|
|
427
431
|
})
|
|
@@ -435,14 +439,16 @@ function Table(t0) {
|
|
|
435
439
|
...stickyStyle(stickyPositions.__selection__, 1),
|
|
436
440
|
...resolvedStyles["selection.cell"]
|
|
437
441
|
},
|
|
438
|
-
children: /*#__PURE__*/ jsx(
|
|
439
|
-
|
|
442
|
+
children: "radio" === selectionType ? /*#__PURE__*/ jsx(Radio, {
|
|
443
|
+
checked: isSelected,
|
|
444
|
+
"aria-label": `Select row ${String(key_3)}`,
|
|
445
|
+
disabled: checkboxProps?.disabled ?? false,
|
|
446
|
+
onChange: ()=>handleSelectRow(key_3)
|
|
447
|
+
}) : /*#__PURE__*/ jsx(Checkbox, {
|
|
440
448
|
checked: isSelected,
|
|
441
449
|
"aria-label": `Select row ${String(key_3)}`,
|
|
442
|
-
disabled: checkboxProps?.disabled,
|
|
443
|
-
onChange: ()=>handleSelectRow(key_3)
|
|
444
|
-
onClick: _temp2,
|
|
445
|
-
"data-tao-table-checkbox": ""
|
|
450
|
+
disabled: checkboxProps?.disabled ?? false,
|
|
451
|
+
onChange: ()=>handleSelectRow(key_3)
|
|
446
452
|
})
|
|
447
453
|
}),
|
|
448
454
|
columns.map((col_6, colIdx)=>{
|
|
@@ -587,16 +593,12 @@ function Table(t0) {
|
|
|
587
593
|
...stickyStyle(stickyPositions.__selection__, 3),
|
|
588
594
|
...resolvedStyles["selection.cell"]
|
|
589
595
|
},
|
|
590
|
-
children: "checkbox" === selectionType && /*#__PURE__*/ jsx(
|
|
591
|
-
type: "checkbox",
|
|
596
|
+
children: "checkbox" === selectionType && /*#__PURE__*/ jsx(Checkbox, {
|
|
592
597
|
"aria-label": "Select all rows",
|
|
593
598
|
checked: isAllSelected,
|
|
594
599
|
disabled: 0 === selectablePageKeys.length,
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
},
|
|
598
|
-
onChange: (e)=>handleSelectAll(e.target.checked),
|
|
599
|
-
"data-tao-table-checkbox": ""
|
|
600
|
+
indeterminate: isIndeterminate,
|
|
601
|
+
onChange: (e)=>handleSelectAll(e.target.checked)
|
|
600
602
|
})
|
|
601
603
|
}),
|
|
602
604
|
columns.map((col_5, i_1)=>{
|
|
@@ -666,9 +668,6 @@ function Table(t0) {
|
|
|
666
668
|
]
|
|
667
669
|
});
|
|
668
670
|
}
|
|
669
|
-
function _temp2(e_2) {
|
|
670
|
-
return e_2.stopPropagation();
|
|
671
|
-
}
|
|
672
671
|
function _temp(col_0) {
|
|
673
672
|
return col_0.responsive;
|
|
674
673
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
:where([data-tao-textarea][data-tao-size="medium"] textarea) {
|
|
31
|
-
padding-inline: var(--tao-padding-
|
|
31
|
+
padding-inline: var(--tao-padding-xs);
|
|
32
32
|
padding-block: calc((
|
|
33
33
|
var(--tao-control-height) -
|
|
34
34
|
var(--tao-font-size-base) *
|
|
@@ -92,3 +92,23 @@
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
[data-tao-textarea] {
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-tao-textarea] > [data-tao-input-clear] {
|
|
100
|
+
position: absolute;
|
|
101
|
+
inset-block-start: var(--tao-padding-xxs);
|
|
102
|
+
inset-inline-end: var(--tao-padding-xxs);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where([data-tao-textarea]:has([data-tao-input-clear]) textarea) {
|
|
106
|
+
padding-inline-end: var(--tao-control-height);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-tao-textarea] > [data-tao-input-count] {
|
|
110
|
+
text-align: end;
|
|
111
|
+
padding: 0 var(--tao-padding-xs) var(--tao-padding-xxs);
|
|
112
|
+
display: block;
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { type Ref, type TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { type TaoSize, type TaoStatus
|
|
2
|
+
import { type TaoSize, type TaoStatus } from '../../provider/tao-provider.js';
|
|
3
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
|
+
import { type InputFocusOptions, type InputSemanticValue, type InputVariant, type TextControlProps } from '../input/input-shared.js';
|
|
4
5
|
import './textarea.css';
|
|
5
|
-
export type TextareaSemanticPart = 'root' | 'textarea';
|
|
6
|
+
export type TextareaSemanticPart = 'root' | 'textarea' | 'clear' | 'count';
|
|
7
|
+
export type TextareaRef = HTMLTextAreaElement & {
|
|
8
|
+
textArea: HTMLTextAreaElement;
|
|
9
|
+
nativeElement: HTMLDivElement;
|
|
10
|
+
focus: (options?: InputFocusOptions) => void;
|
|
11
|
+
};
|
|
6
12
|
export interface AutoSizeOptions {
|
|
7
13
|
minRows?: number;
|
|
8
14
|
maxRows?: number;
|
|
9
15
|
}
|
|
10
|
-
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
16
|
+
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, TextControlProps<HTMLTextAreaElement> {
|
|
11
17
|
size?: TaoSize;
|
|
12
|
-
variant?:
|
|
18
|
+
variant?: InputVariant;
|
|
13
19
|
error?: boolean;
|
|
14
20
|
status?: TaoStatus;
|
|
15
21
|
ref?: Ref<HTMLTextAreaElement>;
|
|
16
22
|
/** Auto-grow height to fit content. `true` grows freely; pass min/max rows to clamp. */
|
|
17
23
|
autoSize?: boolean | AutoSizeOptions;
|
|
18
|
-
classNames?: SemanticClassNames<TextareaSemanticPart>;
|
|
19
|
-
styles?: SemanticStyles<TextareaSemanticPart>;
|
|
24
|
+
classNames?: InputSemanticValue<SemanticClassNames<TextareaSemanticPart>, TextareaProps>;
|
|
25
|
+
styles?: InputSemanticValue<SemanticStyles<TextareaSemanticPart>, TextareaProps>;
|
|
20
26
|
}
|
|
21
27
|
export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,232 +1,133 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef, useLayoutEffect, useRef } from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
4
3
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
|
-
import { mergeRefs } from "../../utils/refs.js";
|
|
6
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import { InputClear, useTextControl, useTextControlRef } from "../input/input-shared.js";
|
|
7
6
|
import "./textarea.css";
|
|
8
|
-
const textarea_Textarea = /*#__PURE__*/ forwardRef(function(
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let rest;
|
|
17
|
-
let size;
|
|
18
|
-
let status;
|
|
19
|
-
let style;
|
|
20
|
-
let styles;
|
|
21
|
-
let variant;
|
|
22
|
-
if ($[0] !== t0) {
|
|
23
|
-
({ size, variant, error, status, disabled, autoSize, className, style, classNames, styles, onChange, ...rest } = t0);
|
|
24
|
-
$[0] = t0;
|
|
25
|
-
$[1] = autoSize;
|
|
26
|
-
$[2] = className;
|
|
27
|
-
$[3] = classNames;
|
|
28
|
-
$[4] = disabled;
|
|
29
|
-
$[5] = error;
|
|
30
|
-
$[6] = onChange;
|
|
31
|
-
$[7] = rest;
|
|
32
|
-
$[8] = size;
|
|
33
|
-
$[9] = status;
|
|
34
|
-
$[10] = style;
|
|
35
|
-
$[11] = styles;
|
|
36
|
-
$[12] = variant;
|
|
37
|
-
} else {
|
|
38
|
-
autoSize = $[1];
|
|
39
|
-
className = $[2];
|
|
40
|
-
classNames = $[3];
|
|
41
|
-
disabled = $[4];
|
|
42
|
-
error = $[5];
|
|
43
|
-
onChange = $[6];
|
|
44
|
-
rest = $[7];
|
|
45
|
-
size = $[8];
|
|
46
|
-
status = $[9];
|
|
47
|
-
style = $[10];
|
|
48
|
-
styles = $[11];
|
|
49
|
-
variant = $[12];
|
|
50
|
-
}
|
|
7
|
+
const textarea_Textarea = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
8
|
+
const { size, variant, error, status, disabled, autoSize, className, style, classNames: customClassNames, styles: customStyles, allowClear, onClear, count, showCount, onPressEnter, onKeyDown, onCompositionStart, onCompositionEnd, value, defaultValue, onChange, ...rest } = props;
|
|
9
|
+
const classNames = 'function' == typeof customClassNames ? customClassNames({
|
|
10
|
+
props
|
|
11
|
+
}) : customClassNames;
|
|
12
|
+
const styles = 'function' == typeof customStyles ? customStyles({
|
|
13
|
+
props
|
|
14
|
+
}) : customStyles;
|
|
51
15
|
const ctx = useTaoConfig();
|
|
52
16
|
const resolvedSize = size ?? ctx.size;
|
|
53
17
|
const resolvedVariant = variant ?? ctx.variant;
|
|
54
18
|
const resolvedDisabled = disabled ?? ctx.disabled;
|
|
55
19
|
const innerRef = useRef(null);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
20
|
+
const rootRef = useRef(null);
|
|
21
|
+
const field = useTextControl(props, innerRef);
|
|
22
|
+
useTextControlRef(ref, innerRef, rootRef);
|
|
23
|
+
const resize = useCallback(()=>{
|
|
24
|
+
const el = innerRef.current;
|
|
25
|
+
if (!el || !autoSize) return;
|
|
26
|
+
el.style.height = 'auto';
|
|
27
|
+
const cs = getComputedStyle(el);
|
|
28
|
+
const lineHeight = Number.parseFloat(cs.lineHeight) || 0;
|
|
29
|
+
const padV = Number.parseFloat(cs.paddingTop) + Number.parseFloat(cs.paddingBottom);
|
|
30
|
+
const opts = 'object' == typeof autoSize ? autoSize : {};
|
|
31
|
+
let height = el.scrollHeight;
|
|
32
|
+
if (opts.minRows) height = Math.max(height, opts.minRows * lineHeight + padV);
|
|
33
|
+
let overflowY = 'hidden';
|
|
34
|
+
if (opts.maxRows) {
|
|
35
|
+
const max = opts.maxRows * lineHeight + padV;
|
|
36
|
+
if (height > max) {
|
|
37
|
+
height = max;
|
|
38
|
+
overflowY = 'auto';
|
|
75
39
|
}
|
|
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
|
-
useLayoutEffect(t2, t3);
|
|
104
|
-
let t4;
|
|
105
|
-
let t5;
|
|
106
|
-
if ($[21] !== autoSize || $[22] !== resize) {
|
|
107
|
-
t4 = ()=>{
|
|
108
|
-
const el_0 = innerRef.current;
|
|
109
|
-
if (!el_0 || !autoSize) return;
|
|
110
|
-
let width;
|
|
111
|
-
let frame = 0;
|
|
112
|
-
const observer = new ResizeObserver((t6)=>{
|
|
113
|
-
const [entry] = t6;
|
|
114
|
-
if (entry.contentRect.width === width) return;
|
|
115
|
-
width = entry.contentRect.width;
|
|
116
|
-
cancelAnimationFrame(frame);
|
|
117
|
-
frame = requestAnimationFrame(resize);
|
|
118
|
-
});
|
|
119
|
-
observer.observe(el_0);
|
|
120
|
-
return ()=>{
|
|
121
|
-
observer.disconnect();
|
|
122
|
-
cancelAnimationFrame(frame);
|
|
123
|
-
};
|
|
40
|
+
}
|
|
41
|
+
el.style.height = `${height}px`;
|
|
42
|
+
el.style.overflowY = overflowY;
|
|
43
|
+
}, [
|
|
44
|
+
autoSize
|
|
45
|
+
]);
|
|
46
|
+
useLayoutEffect(()=>{
|
|
47
|
+
resize();
|
|
48
|
+
}, [
|
|
49
|
+
resize,
|
|
50
|
+
field.value
|
|
51
|
+
]);
|
|
52
|
+
useLayoutEffect(()=>{
|
|
53
|
+
const el_0 = innerRef.current;
|
|
54
|
+
if (!el_0 || !autoSize) return;
|
|
55
|
+
let width;
|
|
56
|
+
let frame = 0;
|
|
57
|
+
const observer = new ResizeObserver(([entry])=>{
|
|
58
|
+
if (entry.contentRect.width === width) return;
|
|
59
|
+
width = entry.contentRect.width;
|
|
60
|
+
cancelAnimationFrame(frame);
|
|
61
|
+
frame = requestAnimationFrame(resize);
|
|
62
|
+
});
|
|
63
|
+
observer.observe(el_0);
|
|
64
|
+
return ()=>{
|
|
65
|
+
observer.disconnect();
|
|
66
|
+
cancelAnimationFrame(frame);
|
|
124
67
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
t4 = $[23];
|
|
135
|
-
t5 = $[24];
|
|
136
|
-
}
|
|
137
|
-
useLayoutEffect(t4, t5);
|
|
138
|
-
const t6 = classNames?.root;
|
|
139
|
-
let t7;
|
|
140
|
-
if ($[25] !== className || $[26] !== t6) {
|
|
141
|
-
t7 = cx(t6, className);
|
|
142
|
-
$[25] = className;
|
|
143
|
-
$[26] = t6;
|
|
144
|
-
$[27] = t7;
|
|
145
|
-
} else t7 = $[27];
|
|
146
|
-
const t8 = styles?.root;
|
|
147
|
-
let t9;
|
|
148
|
-
if ($[28] !== style || $[29] !== t8) {
|
|
149
|
-
t9 = {
|
|
150
|
-
...t8,
|
|
68
|
+
}, [
|
|
69
|
+
autoSize,
|
|
70
|
+
resize
|
|
71
|
+
]);
|
|
72
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
73
|
+
ref: rootRef,
|
|
74
|
+
className: cx(classNames?.root, className),
|
|
75
|
+
style: {
|
|
76
|
+
...styles?.root,
|
|
151
77
|
...style
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
let t21;
|
|
207
|
-
if ($[47] !== resolvedSize || $[48] !== resolvedVariant || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t20 || $[53] !== t7 || $[54] !== t9) {
|
|
208
|
-
t21 = /*#__PURE__*/ jsx("div", {
|
|
209
|
-
className: t7,
|
|
210
|
-
style: t9,
|
|
211
|
-
"data-tao-control": "",
|
|
212
|
-
"data-tao-textarea": "",
|
|
213
|
-
"data-tao-size": resolvedSize,
|
|
214
|
-
"data-tao-variant": resolvedVariant,
|
|
215
|
-
"data-tao-error": t10,
|
|
216
|
-
"data-tao-warning": t11,
|
|
217
|
-
"data-disabled": t12,
|
|
218
|
-
children: t20
|
|
219
|
-
});
|
|
220
|
-
$[47] = resolvedSize;
|
|
221
|
-
$[48] = resolvedVariant;
|
|
222
|
-
$[49] = t10;
|
|
223
|
-
$[50] = t11;
|
|
224
|
-
$[51] = t12;
|
|
225
|
-
$[52] = t20;
|
|
226
|
-
$[53] = t7;
|
|
227
|
-
$[54] = t9;
|
|
228
|
-
$[55] = t21;
|
|
229
|
-
} else t21 = $[55];
|
|
230
|
-
return t21;
|
|
78
|
+
},
|
|
79
|
+
"data-tao-control": "",
|
|
80
|
+
"data-tao-textarea": "",
|
|
81
|
+
"data-tao-size": resolvedSize,
|
|
82
|
+
"data-tao-variant": resolvedVariant,
|
|
83
|
+
"data-tao-error": 'error' === status || error || void 0,
|
|
84
|
+
"data-tao-warning": 'warning' === status || void 0,
|
|
85
|
+
"data-disabled": resolvedDisabled || void 0,
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ jsx("textarea", {
|
|
88
|
+
...rest,
|
|
89
|
+
value: field.value,
|
|
90
|
+
ref: innerRef,
|
|
91
|
+
className: classNames?.textarea,
|
|
92
|
+
style: styles?.textarea,
|
|
93
|
+
disabled: resolvedDisabled,
|
|
94
|
+
"aria-invalid": 'error' === status || error ? true : rest['aria-invalid'],
|
|
95
|
+
"data-tao-autosize": autoSize ? '' : void 0,
|
|
96
|
+
onChange: (e)=>{
|
|
97
|
+
if (autoSize) resize();
|
|
98
|
+
field.change(e);
|
|
99
|
+
},
|
|
100
|
+
onKeyDown: (event)=>{
|
|
101
|
+
onKeyDown?.(event);
|
|
102
|
+
if ('Enter' === event.key && !event.defaultPrevented && !field.composing.current && !event.nativeEvent.isComposing && 229 !== event.keyCode) onPressEnter?.(event);
|
|
103
|
+
},
|
|
104
|
+
onCompositionStart: (event_0)=>{
|
|
105
|
+
field.composing.current = true;
|
|
106
|
+
onCompositionStart?.(event_0);
|
|
107
|
+
},
|
|
108
|
+
onCompositionEnd: (event_1)=>{
|
|
109
|
+
field.composing.current = false;
|
|
110
|
+
if (field.normalize(event_1.currentTarget.value) !== event_1.currentTarget.value) field.change({
|
|
111
|
+
...event_1,
|
|
112
|
+
target: event_1.currentTarget
|
|
113
|
+
});
|
|
114
|
+
onCompositionEnd?.(event_1);
|
|
115
|
+
}
|
|
116
|
+
}),
|
|
117
|
+
allowClear && field.value && !resolvedDisabled && !rest.readOnly && /*#__PURE__*/ jsx(InputClear, {
|
|
118
|
+
config: allowClear,
|
|
119
|
+
onClick: field.clear,
|
|
120
|
+
className: classNames?.clear,
|
|
121
|
+
style: styles?.clear
|
|
122
|
+
}),
|
|
123
|
+
null != field.counter && /*#__PURE__*/ jsx("span", {
|
|
124
|
+
"data-tao-input-count": "",
|
|
125
|
+
"data-tao-exceeded": field.exceeded || void 0,
|
|
126
|
+
className: classNames?.count,
|
|
127
|
+
style: styles?.count,
|
|
128
|
+
children: field.counter
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
231
132
|
});
|
|
232
133
|
export { textarea_Textarea as Textarea };
|