@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
package/README.md
CHANGED
|
@@ -77,13 +77,17 @@ Directional keys, horizontal scrolling, splitters, ratings and fixed table colum
|
|
|
77
77
|
|
|
78
78
|
### Component imports
|
|
79
79
|
|
|
80
|
-
Use component entries to
|
|
80
|
+
Use component entries to guarantee minimal CSS across all bundlers (Vite, esbuild, Bun, Rspack, Webpack) — each entry includes only its own styles, shared theme tokens, and (for form controls) control styles. No separate CSS import is needed.
|
|
81
81
|
|
|
82
82
|
```tsx
|
|
83
83
|
import { Button, type ButtonProps } from '@rockshin/tao-ui/button';
|
|
84
84
|
import { TaoProvider } from '@rockshin/tao-ui/provider';
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
The root `@rockshin/tao-ui` entry is a pure barrel with CSS-only `sideEffects`, so Rspack / Webpack / Next.js (`optimizePackageImports`) tree-shake unused component CSS from root imports too. Standalone stylesheets are also exported at `@rockshin/tao-ui/theme.css` and `@rockshin/tao-ui/control.css`.
|
|
88
|
+
|
|
89
|
+
Browser baseline: Chrome 111+, Edge 111+, Safari 16.2+, Firefox 113+ (matching native `oklch()`, `color-mix()`, cascade layers, and logical properties; configure your bundler target accordingly to avoid unnecessary logical-property fallback expansion).
|
|
90
|
+
|
|
87
91
|
Entry names use kebab-case, such as `/input-number`, `/range-picker`, and `/form-layout`. Related exports share an entry: `CheckboxGroup` uses `/checkbox`, and `HeadlessInputNumber` uses `/number-input`.
|
|
88
92
|
|
|
89
93
|
The `/input` entry includes `Input.Password`, `Input.Search`, `Input.TextArea`, and `Input.OTP`. Input and Textarea support `allowClear`, `showCount`, custom `count`, and `onPressEnter`; existing native DOM refs and standalone `Textarea` remain supported. See the [Input examples and API](docs/en/components/input.mdx).
|
package/component-manifest.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import '../../theme/theme.css';
|
|
3
4
|
import './affix.css';
|
|
4
5
|
export type AffixSemanticPart = 'root' | 'content';
|
|
5
6
|
export interface AffixProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { getComposedParent } from "../../utils/composed-parent.js";
|
|
4
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import "../../theme/theme.css";
|
|
5
6
|
import "./affix.css";
|
|
6
7
|
const Affix = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
8
|
const { offsetTop, offsetBottom, onChange, target, prefixCls, rootClassName, className, style, classNames, styles, children, ...rest } = props;
|
|
@@ -68,7 +69,7 @@ const Affix = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
68
69
|
updatePosition
|
|
69
70
|
]);
|
|
70
71
|
useEffect(()=>{
|
|
71
|
-
const
|
|
72
|
+
const view = holder.current?.ownerDocument.defaultView ?? window;
|
|
72
73
|
const events = [
|
|
73
74
|
'resize',
|
|
74
75
|
'scroll',
|
|
@@ -83,9 +84,9 @@ const Affix = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
83
84
|
passive: true
|
|
84
85
|
});
|
|
85
86
|
});
|
|
86
|
-
if (scrollTarget !==
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
if (scrollTarget !== view) {
|
|
88
|
+
view.addEventListener('resize', updatePosition);
|
|
89
|
+
view.addEventListener('scroll', updatePosition, {
|
|
89
90
|
passive: true
|
|
90
91
|
});
|
|
91
92
|
}
|
|
@@ -95,20 +96,20 @@ const Affix = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
95
96
|
targetElement
|
|
96
97
|
];
|
|
97
98
|
function* ancestors() {
|
|
98
|
-
for (const source of sources)for(let
|
|
99
|
+
for (const source of sources)for(let node = source; node; node = getComposedParent(node))yield node;
|
|
99
100
|
}
|
|
100
101
|
const scrollRoots = new Set([
|
|
101
|
-
|
|
102
|
+
view
|
|
102
103
|
]);
|
|
103
|
-
for (const
|
|
104
|
-
const root =
|
|
104
|
+
for (const node of ancestors()){
|
|
105
|
+
const root = node.getRootNode();
|
|
105
106
|
if ('host' in root) scrollRoots.add(root);
|
|
106
107
|
}
|
|
107
|
-
const onAncestorScroll = (
|
|
108
|
-
if (
|
|
109
|
-
for (const
|
|
108
|
+
const onAncestorScroll = (event)=>{
|
|
109
|
+
if (event.target === scrollTarget) return;
|
|
110
|
+
for (const node of ancestors())if (node === event.target) return void updatePosition();
|
|
110
111
|
};
|
|
111
|
-
for (const
|
|
112
|
+
for (const root of scrollRoots)root.addEventListener('scroll', onAncestorScroll, {
|
|
112
113
|
capture: true,
|
|
113
114
|
passive: true
|
|
114
115
|
});
|
|
@@ -118,12 +119,12 @@ const Affix = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
118
119
|
if (scrollTarget && 'getBoundingClientRect' in scrollTarget) observer.observe(scrollTarget);
|
|
119
120
|
updatePosition();
|
|
120
121
|
return ()=>{
|
|
121
|
-
events.forEach((
|
|
122
|
-
scrollTarget?.removeEventListener(
|
|
122
|
+
events.forEach((event)=>{
|
|
123
|
+
scrollTarget?.removeEventListener(event, updatePosition);
|
|
123
124
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
for (const
|
|
125
|
+
view.removeEventListener('resize', updatePosition);
|
|
126
|
+
view.removeEventListener('scroll', updatePosition);
|
|
127
|
+
for (const root of scrollRoots)root.removeEventListener('scroll', onAncestorScroll, true);
|
|
127
128
|
observer.disconnect();
|
|
128
129
|
updatePosition.cancel();
|
|
129
130
|
};
|
|
@@ -1,121 +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
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
[data-tao-alert] {
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
gap: var(--tao-padding-xs);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: var(--tao-padding-xs) var(--tao-padding-sm);
|
|
7
|
+
font-family: var(--tao-font-family);
|
|
8
|
+
font-size: var(--tao-font-size-base);
|
|
9
|
+
line-height: var(--tao-line-height);
|
|
10
|
+
color: var(--tao-color-text);
|
|
11
|
+
border-radius: var(--tao-radius-md);
|
|
12
|
+
border: var(--tao-line-width) solid transparent;
|
|
13
|
+
transition: background-color var(--tao-motion-duration-fast)
|
|
14
|
+
var(--tao-motion-ease-out),
|
|
15
|
+
border-color var(--tao-motion-duration-fast) var(--tao-motion-ease-out),
|
|
16
|
+
color var(--tao-motion-duration-fast) var(--tao-motion-ease-out),
|
|
17
|
+
opacity var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-tao-alert-icon] {
|
|
22
|
+
font-size: var(--tao-font-size-base);
|
|
23
|
+
line-height: var(--tao-line-height);
|
|
24
|
+
flex: none;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-self: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-tao-alert][data-tao-with-description] [data-tao-alert-icon] {
|
|
32
|
+
font-size: var(--tao-font-size-lg);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-tao-alert-content] {
|
|
36
|
+
flex: auto;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-tao-alert-title] {
|
|
41
|
+
color: var(--tao-color-text);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-tao-alert][data-tao-with-description] [data-tao-alert-title] {
|
|
45
|
+
font-weight: var(--tao-font-weight-strong);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-tao-alert-description] {
|
|
49
|
+
color: var(--tao-color-text-secondary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-tao-alert-action] {
|
|
53
|
+
flex: none;
|
|
54
|
+
align-items: center;
|
|
55
|
+
margin-inline-start: var(--tao-padding-xs);
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-tao-alert-close] {
|
|
60
|
+
width: calc(var(--tao-font-size-base) * var(--tao-line-height));
|
|
61
|
+
height: calc(var(--tao-font-size-base) * var(--tao-line-height));
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
border-radius: var(--tao-radius-sm);
|
|
64
|
+
color: var(--tao-color-text-secondary);
|
|
65
|
+
font: inherit;
|
|
66
|
+
transition: background-color var(--tao-motion-duration-fast)
|
|
67
|
+
var(--tao-motion-ease-out),
|
|
68
|
+
color var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
|
|
69
|
+
background: none;
|
|
70
|
+
border: 0;
|
|
71
|
+
flex: none;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
padding: 0;
|
|
75
|
+
line-height: 1;
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-tao-alert-close]:hover {
|
|
80
|
+
background: var(--tao-color-fill-secondary);
|
|
81
|
+
color: var(--tao-color-text);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-tao-alert-close]:focus-visible {
|
|
85
|
+
box-shadow: 0 0 0 var(--tao-ring-width) var(--tao-control-outline);
|
|
86
|
+
outline: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-tao-alert][data-tao-type="success"] {
|
|
90
|
+
background: var(--tao-success-bg);
|
|
91
|
+
border-color: var(--tao-success-border);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-tao-alert][data-tao-type="success"] [data-tao-alert-icon], [data-tao-alert][data-tao-type="success"] [data-tao-alert-title] {
|
|
95
|
+
color: var(--tao-success);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-tao-alert][data-tao-type="info"] {
|
|
99
|
+
background: var(--tao-primary-bg);
|
|
100
|
+
border-color: var(--tao-primary-border);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-tao-alert][data-tao-type="info"] [data-tao-alert-icon], [data-tao-alert][data-tao-type="info"] [data-tao-alert-title] {
|
|
104
|
+
color: var(--tao-primary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-tao-alert][data-tao-type="warning"] {
|
|
108
|
+
background: var(--tao-warning-bg);
|
|
109
|
+
border-color: var(--tao-warning-border);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-tao-alert][data-tao-type="warning"] [data-tao-alert-icon], [data-tao-alert][data-tao-type="warning"] [data-tao-alert-title] {
|
|
113
|
+
color: var(--tao-warning);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-tao-alert][data-tao-type="error"] {
|
|
117
|
+
background: var(--tao-error-bg);
|
|
118
|
+
border-color: var(--tao-error-border);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-tao-alert][data-tao-type="error"] [data-tao-alert-icon], [data-tao-alert][data-tao-type="error"] [data-tao-alert-title] {
|
|
122
|
+
color: var(--tao-error);
|
|
123
|
+
}
|
|
120
124
|
}
|
|
121
125
|
|
|
@@ -1,203 +1,93 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
4
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
5
|
import { StatusIcon } from "../status-icon/status-icon.js";
|
|
6
|
-
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
7
6
|
import "./alert.css";
|
|
8
7
|
function CloseIcon() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
strokeLinecap: "round"
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
$[0] = t0;
|
|
28
|
-
} else t0 = $[0];
|
|
29
|
-
return t0;
|
|
8
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
9
|
+
width: "12",
|
|
10
|
+
height: "12",
|
|
11
|
+
viewBox: "0 0 12 12",
|
|
12
|
+
fill: "none",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
focusable: "false",
|
|
15
|
+
role: "presentation",
|
|
16
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
17
|
+
d: "M3 3l6 6M9 3l-6 6",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: "1.5",
|
|
20
|
+
strokeLinecap: "round"
|
|
21
|
+
})
|
|
22
|
+
});
|
|
30
23
|
}
|
|
31
24
|
function hasContent(content) {
|
|
32
25
|
return null != content && 'boolean' != typeof content;
|
|
33
26
|
}
|
|
34
|
-
function Alert(
|
|
35
|
-
const $ = c(49);
|
|
36
|
-
const { type: t1, title, description, showIcon: t2, icon, closable: t3, onClose, action, className, style, classNames, styles } = t0;
|
|
37
|
-
const type = void 0 === t1 ? "info" : t1;
|
|
38
|
-
const showIcon = void 0 === t2 ? false : t2;
|
|
39
|
-
const closable = void 0 === t3 ? false : t3;
|
|
27
|
+
function Alert({ type = 'info', title, description, showIcon = false, icon, closable = false, onClose, action, className, style, classNames, styles }) {
|
|
40
28
|
const { locale } = useTaoConfig();
|
|
41
29
|
const [visible, setVisible] = useState(true);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
$[0] = onClose;
|
|
49
|
-
$[1] = t4;
|
|
50
|
-
} else t4 = $[1];
|
|
51
|
-
const handleClose = t4;
|
|
30
|
+
const handleClose = useCallback((e)=>{
|
|
31
|
+
onClose?.(e);
|
|
32
|
+
if (!e.defaultPrevented) setVisible(false);
|
|
33
|
+
}, [
|
|
34
|
+
onClose
|
|
35
|
+
]);
|
|
52
36
|
if (!visible) return null;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
$[4] = icon;
|
|
66
|
-
$[5] = showIcon;
|
|
67
|
-
$[6] = type;
|
|
68
|
-
$[7] = t6;
|
|
69
|
-
} else t6 = $[7];
|
|
70
|
-
const resolvedIcon = t6;
|
|
71
|
-
const t7 = hasDescription || void 0;
|
|
72
|
-
const t8 = classNames?.root;
|
|
73
|
-
let t9;
|
|
74
|
-
if ($[8] !== className || $[9] !== t8) {
|
|
75
|
-
t9 = cx(t8, className);
|
|
76
|
-
$[8] = className;
|
|
77
|
-
$[9] = t8;
|
|
78
|
-
$[10] = t9;
|
|
79
|
-
} else t9 = $[10];
|
|
80
|
-
const t10 = styles?.root;
|
|
81
|
-
let t11;
|
|
82
|
-
if ($[11] !== style || $[12] !== t10) {
|
|
83
|
-
t11 = {
|
|
84
|
-
...t10,
|
|
37
|
+
const hasDescription = hasContent(description);
|
|
38
|
+
const resolvedIcon = icon ?? (showIcon ? /*#__PURE__*/ jsx(StatusIcon, {
|
|
39
|
+
type: type
|
|
40
|
+
}) : null);
|
|
41
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
42
|
+
role: "alert",
|
|
43
|
+
"data-tao-alert": "",
|
|
44
|
+
"data-tao-type": type,
|
|
45
|
+
"data-tao-with-description": hasDescription || void 0,
|
|
46
|
+
className: cx(classNames?.root, className),
|
|
47
|
+
style: {
|
|
48
|
+
...styles?.root,
|
|
85
49
|
...style
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
$[25] = styles?.description;
|
|
129
|
-
$[26] = t14;
|
|
130
|
-
} else t14 = $[26];
|
|
131
|
-
let t15;
|
|
132
|
-
if ($[27] !== t13 || $[28] !== t14) {
|
|
133
|
-
t15 = /*#__PURE__*/ jsxs("div", {
|
|
134
|
-
"data-tao-alert-content": "",
|
|
135
|
-
children: [
|
|
136
|
-
t13,
|
|
137
|
-
t14
|
|
138
|
-
]
|
|
139
|
-
});
|
|
140
|
-
$[27] = t13;
|
|
141
|
-
$[28] = t14;
|
|
142
|
-
$[29] = t15;
|
|
143
|
-
} else t15 = $[29];
|
|
144
|
-
let t16;
|
|
145
|
-
if ($[30] !== action || $[31] !== classNames?.action || $[32] !== styles?.action) {
|
|
146
|
-
t16 = hasContent(action) && /*#__PURE__*/ jsx("div", {
|
|
147
|
-
"data-tao-alert-action": "",
|
|
148
|
-
className: cx(classNames?.action),
|
|
149
|
-
style: styles?.action,
|
|
150
|
-
children: action
|
|
151
|
-
});
|
|
152
|
-
$[30] = action;
|
|
153
|
-
$[31] = classNames?.action;
|
|
154
|
-
$[32] = styles?.action;
|
|
155
|
-
$[33] = t16;
|
|
156
|
-
} else t16 = $[33];
|
|
157
|
-
let t17;
|
|
158
|
-
if ($[34] !== classNames?.close || $[35] !== closable || $[36] !== handleClose || $[37] !== locale || $[38] !== styles?.close) {
|
|
159
|
-
t17 = closable && /*#__PURE__*/ jsx("button", {
|
|
160
|
-
type: "button",
|
|
161
|
-
"data-tao-alert-close": "",
|
|
162
|
-
"aria-label": locale.close,
|
|
163
|
-
onClick: handleClose,
|
|
164
|
-
className: cx(classNames?.close),
|
|
165
|
-
style: styles?.close,
|
|
166
|
-
children: /*#__PURE__*/ jsx(CloseIcon, {})
|
|
167
|
-
});
|
|
168
|
-
$[34] = classNames?.close;
|
|
169
|
-
$[35] = closable;
|
|
170
|
-
$[36] = handleClose;
|
|
171
|
-
$[37] = locale;
|
|
172
|
-
$[38] = styles?.close;
|
|
173
|
-
$[39] = t17;
|
|
174
|
-
} else t17 = $[39];
|
|
175
|
-
let t18;
|
|
176
|
-
if ($[40] !== t11 || $[41] !== t12 || $[42] !== t15 || $[43] !== t16 || $[44] !== t17 || $[45] !== t7 || $[46] !== t9 || $[47] !== type) {
|
|
177
|
-
t18 = /*#__PURE__*/ jsxs("div", {
|
|
178
|
-
role: "alert",
|
|
179
|
-
"data-tao-alert": "",
|
|
180
|
-
"data-tao-type": type,
|
|
181
|
-
"data-tao-with-description": t7,
|
|
182
|
-
className: t9,
|
|
183
|
-
style: t11,
|
|
184
|
-
children: [
|
|
185
|
-
t12,
|
|
186
|
-
t15,
|
|
187
|
-
t16,
|
|
188
|
-
t17
|
|
189
|
-
]
|
|
190
|
-
});
|
|
191
|
-
$[40] = t11;
|
|
192
|
-
$[41] = t12;
|
|
193
|
-
$[42] = t15;
|
|
194
|
-
$[43] = t16;
|
|
195
|
-
$[44] = t17;
|
|
196
|
-
$[45] = t7;
|
|
197
|
-
$[46] = t9;
|
|
198
|
-
$[47] = type;
|
|
199
|
-
$[48] = t18;
|
|
200
|
-
} else t18 = $[48];
|
|
201
|
-
return t18;
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
hasContent(resolvedIcon) && /*#__PURE__*/ jsx("span", {
|
|
53
|
+
"data-tao-alert-icon": "",
|
|
54
|
+
className: cx(classNames?.icon),
|
|
55
|
+
style: styles?.icon,
|
|
56
|
+
children: resolvedIcon
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsxs("div", {
|
|
59
|
+
"data-tao-alert-content": "",
|
|
60
|
+
children: [
|
|
61
|
+
hasContent(title) && /*#__PURE__*/ jsx("div", {
|
|
62
|
+
"data-tao-alert-title": "",
|
|
63
|
+
className: cx(classNames?.title),
|
|
64
|
+
style: styles?.title,
|
|
65
|
+
children: title
|
|
66
|
+
}),
|
|
67
|
+
hasDescription && /*#__PURE__*/ jsx("div", {
|
|
68
|
+
"data-tao-alert-description": "",
|
|
69
|
+
className: cx(classNames?.description),
|
|
70
|
+
style: styles?.description,
|
|
71
|
+
children: description
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
hasContent(action) && /*#__PURE__*/ jsx("div", {
|
|
76
|
+
"data-tao-alert-action": "",
|
|
77
|
+
className: cx(classNames?.action),
|
|
78
|
+
style: styles?.action,
|
|
79
|
+
children: action
|
|
80
|
+
}),
|
|
81
|
+
closable && /*#__PURE__*/ jsx("button", {
|
|
82
|
+
type: "button",
|
|
83
|
+
"data-tao-alert-close": "",
|
|
84
|
+
"aria-label": locale.close,
|
|
85
|
+
onClick: handleClose,
|
|
86
|
+
className: cx(classNames?.close),
|
|
87
|
+
style: styles?.close,
|
|
88
|
+
children: /*#__PURE__*/ jsx(CloseIcon, {})
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
});
|
|
202
92
|
}
|
|
203
93
|
export { Alert };
|