@rockshin/tao-ui 0.0.59 → 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 +29 -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.css +1 -1
- package/dist/components/color-picker/color-picker.js +418 -981
- package/dist/components/context-menu/context-menu.css +4 -4
- package/dist/components/context-menu/context-menu.d.ts +3 -1
- package/dist/components/context-menu/context-menu.js +54 -135
- 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 +84 -209
- 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 +96 -105
- 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 +222 -255
- 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 -30
- package/dist/components/dropdown/dropdown.js +91 -271
- 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 +38 -48
- 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 -66
- 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 +4 -2
- package/dist/components/input-number/input-number.js +30 -137
- 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 +291 -75
- package/dist/components/menu/menu-render.d.ts +7 -0
- package/dist/components/menu/menu-render.js +156 -302
- package/dist/components/menu/menu.css +142 -140
- package/dist/components/modal/confirm-dialog.js +19 -24
- 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 +4 -3
- package/dist/components/pagination/pagination.js +138 -281
- 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 +189 -469
- 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-model.js +1 -1
- 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 -261
- 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 -406
- 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 +3 -1
- package/dist/components/table/table-filter.js +72 -133
- 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 +86 -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 +4 -3
- package/dist/components/tabs/tabs.js +157 -322
- 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 +91 -221
- 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.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +111 -263
- 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 +12 -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.d.ts +1 -0
- package/dist/number-input/use-number-input.js +47 -43
- 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 -364
- package/dist/theme/control.css +106 -122
- package/dist/theme/theme.css +4 -2
- 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/dist/theme/control.css
CHANGED
|
@@ -1,151 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
[data-tao-control] {
|
|
10
|
-
transition: border-color var(--tao-motion-duration-mid) var(--tao-motion-ease-out),
|
|
11
|
-
background-color var(--tao-motion-duration-mid) var(--tao-motion-ease-out),
|
|
12
|
-
box-shadow var(--tao-motion-duration-mid) var(--tao-motion-ease-out);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[data-tao-control][data-tao-variant="outlined"] {
|
|
16
|
-
border: var(--tao-line-width) solid var(--tao-color-border);
|
|
17
|
-
background: none;
|
|
18
|
-
}
|
|
1
|
+
@layer components.control {
|
|
2
|
+
[data-tao-control] {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
transition: border-color var(--tao-motion-duration-mid) var(--tao-motion-ease-out),
|
|
5
|
+
background-color var(--tao-motion-duration-mid) var(--tao-motion-ease-out),
|
|
6
|
+
box-shadow var(--tao-motion-duration-mid) var(--tao-motion-ease-out);
|
|
7
|
+
}
|
|
19
8
|
|
|
20
|
-
[data-tao-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var(--tao-color-bg-base)));
|
|
24
|
-
}
|
|
9
|
+
[data-tao-form-field] [data-tao-control] {
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
25
12
|
|
|
26
|
-
[data-tao-control][data-tao-variant="outlined"]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
13
|
+
[data-tao-control][data-tao-variant="outlined"] {
|
|
14
|
+
border: var(--tao-line-width) solid var(--tao-color-border);
|
|
15
|
+
background: none;
|
|
16
|
+
}
|
|
31
17
|
|
|
32
|
-
[data-tao-control][data-tao-variant="outlined"][data-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
[data-tao-control][data-tao-variant="outlined"]:hover:not([data-disabled]):not(:has(input:disabled)):not(:focus-within):not([data-state="open"]) {
|
|
19
|
+
border-color: var(--tao-input-hover-border-color, color-mix(in oklch,
|
|
20
|
+
var(--tao-color-text-base) calc(var(--tao-border-text-weight) + 8%),
|
|
21
|
+
var(--tao-color-bg-base)));
|
|
22
|
+
}
|
|
35
23
|
|
|
36
|
-
[data-tao-control][data-tao-variant="outlined"][data-tao-error]
|
|
37
|
-
|
|
38
|
-
}
|
|
24
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-error] {
|
|
25
|
+
border-color: var(--tao-error);
|
|
26
|
+
}
|
|
39
27
|
|
|
40
|
-
[data-tao-control][data-tao-variant="outlined"][data-tao-error]:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
28
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-error]:hover:not([data-disabled]):not(:focus-within) {
|
|
29
|
+
border-color: var(--tao-error-hover);
|
|
30
|
+
}
|
|
44
31
|
|
|
45
|
-
[data-tao-control][data-tao-variant="outlined"][data-tao-warning] {
|
|
46
|
-
|
|
47
|
-
}
|
|
32
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning] {
|
|
33
|
+
border-color: var(--tao-warning);
|
|
34
|
+
}
|
|
48
35
|
|
|
49
|
-
[data-tao-control][data-tao-variant="outlined"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
50
|
-
|
|
51
|
-
}
|
|
36
|
+
[data-tao-control][data-tao-variant="outlined"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
37
|
+
border-color: color-mix(in oklab, var(--tao-color-warning) 80%, white);
|
|
38
|
+
}
|
|
52
39
|
|
|
53
|
-
[data-tao-control][data-tao-variant="
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
40
|
+
[data-tao-control][data-tao-variant="filled"] {
|
|
41
|
+
background: var(--tao-color-fill-tertiary);
|
|
42
|
+
border: var(--tao-line-width) solid transparent;
|
|
43
|
+
}
|
|
57
44
|
|
|
58
|
-
[data-tao-control][data-tao-variant="
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color: var(--tao-color-text-disabled);
|
|
62
|
-
cursor: not-allowed;
|
|
63
|
-
box-shadow: none;
|
|
64
|
-
}
|
|
45
|
+
[data-tao-control][data-tao-variant="filled"]:hover:not([data-disabled]):not(:focus-within):not([data-state="open"]) {
|
|
46
|
+
background: var(--tao-input-hover-bg, var(--tao-color-fill-secondary));
|
|
47
|
+
}
|
|
65
48
|
|
|
66
|
-
[data-tao-control][data-tao-variant="filled"] {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
49
|
+
[data-tao-control][data-tao-variant="filled"]:is(:focus-within, [data-state="open"]) {
|
|
50
|
+
background: var(--tao-input-active-bg, var(--tao-color-bg-container));
|
|
51
|
+
}
|
|
70
52
|
|
|
71
|
-
[data-tao-control][data-tao-variant="filled"]
|
|
72
|
-
|
|
73
|
-
}
|
|
53
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-error] {
|
|
54
|
+
background: var(--tao-error-bg);
|
|
55
|
+
}
|
|
74
56
|
|
|
75
|
-
[data-tao-control][data-tao-variant="filled"]
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
57
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-error]:hover:not([data-disabled]):not(:focus-within) {
|
|
58
|
+
background: color-mix(in oklab,
|
|
59
|
+
var(--tao-color-error) 10%,
|
|
60
|
+
var(--tao-color-bg-base));
|
|
61
|
+
}
|
|
81
62
|
|
|
82
|
-
[data-tao-control][data-tao-variant="filled"][data-tao-
|
|
83
|
-
|
|
84
|
-
}
|
|
63
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning] {
|
|
64
|
+
background: var(--tao-warning-bg);
|
|
65
|
+
}
|
|
85
66
|
|
|
86
|
-
[data-tao-control][data-tao-variant="filled"][data-tao-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
67
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning]:hover:not([data-disabled]):not(:focus-within) {
|
|
68
|
+
background: color-mix(in oklab,
|
|
69
|
+
var(--tao-color-warning) 10%,
|
|
70
|
+
var(--tao-color-bg-base));
|
|
71
|
+
}
|
|
91
72
|
|
|
92
|
-
[data-tao-control][data-tao-variant="filled"][data-tao-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
box-shadow: var(--tao-input-error-active-shadow, 0 0 0 var(--tao-ring-width) var(--tao-color-error-outline));
|
|
96
|
-
}
|
|
73
|
+
[data-tao-control][data-tao-variant="filled"][data-tao-warning]:is(:focus-within, [data-state="open"]) {
|
|
74
|
+
background: var(--tao-color-bg-container);
|
|
75
|
+
}
|
|
97
76
|
|
|
98
|
-
[data-tao-control][data-tao-variant="
|
|
99
|
-
|
|
100
|
-
|
|
77
|
+
[data-tao-control]:is([data-tao-variant="outlined"], [data-tao-variant="filled"]):is(:focus-within, [data-state="open"]) {
|
|
78
|
+
border-color: var(--tao-input-active-border-color, var(--tao-primary));
|
|
79
|
+
box-shadow: var(--tao-input-active-shadow, 0 0 0 var(--tao-ring-width) var(--tao-control-outline));
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
101
82
|
|
|
102
|
-
[data-tao-control][data-tao-variant="
|
|
103
|
-
|
|
104
|
-
var(--tao-color-
|
|
105
|
-
|
|
106
|
-
}
|
|
83
|
+
[data-tao-control]:is([data-tao-variant="outlined"], [data-tao-variant="filled"])[data-tao-error]:is(:focus-within, [data-state="open"]) {
|
|
84
|
+
border-color: var(--tao-error);
|
|
85
|
+
box-shadow: var(--tao-input-error-active-shadow, 0 0 0 var(--tao-ring-width) var(--tao-color-error-outline));
|
|
86
|
+
}
|
|
107
87
|
|
|
108
|
-
[data-tao-control][data-tao-variant="
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
88
|
+
[data-tao-control]:is([data-tao-variant="outlined"], [data-tao-variant="filled"])[data-tao-warning]:is(:focus-within, [data-state="open"]) {
|
|
89
|
+
border-color: var(--tao-warning);
|
|
90
|
+
box-shadow: 0 0 0 var(--tao-ring-width) var(--tao-color-warning-outline);
|
|
91
|
+
}
|
|
113
92
|
|
|
114
|
-
[data-tao-control][data-tao-variant="
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
93
|
+
[data-tao-control]:is([data-tao-variant="outlined"], [data-tao-variant="filled"]):is([data-disabled], :has(input:disabled)) {
|
|
94
|
+
background: var(--tao-color-bg-disabled);
|
|
95
|
+
border-color: var(--tao-color-border);
|
|
96
|
+
color: var(--tao-color-text-disabled);
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
box-shadow: none;
|
|
99
|
+
}
|
|
121
100
|
|
|
122
|
-
[data-tao-control][data-tao-variant="borderless"] {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
101
|
+
[data-tao-control][data-tao-variant="borderless"] {
|
|
102
|
+
border: var(--tao-line-width) solid transparent;
|
|
103
|
+
background: none;
|
|
104
|
+
border-radius: 0 !important;
|
|
105
|
+
}
|
|
127
106
|
|
|
128
|
-
[data-tao-control][data-tao-variant="borderless"]:focus-within, [data-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
107
|
+
[data-tao-control][data-tao-variant="borderless"]:is(:focus-within, [data-state="open"]) {
|
|
108
|
+
border-block-end-color: var(--tao-primary);
|
|
109
|
+
outline: none;
|
|
110
|
+
}
|
|
132
111
|
|
|
133
|
-
[data-tao-control][data-tao-variant="borderless"][data-tao-error] {
|
|
134
|
-
|
|
135
|
-
}
|
|
112
|
+
[data-tao-control][data-tao-variant="borderless"][data-tao-error] {
|
|
113
|
+
border-block-end-color: var(--tao-error);
|
|
114
|
+
}
|
|
136
115
|
|
|
137
|
-
[data-tao-control][data-tao-variant="borderless"][data-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
116
|
+
[data-tao-control][data-tao-variant="borderless"][data-tao-warning] {
|
|
117
|
+
border-block-end-color: var(--tao-warning);
|
|
118
|
+
}
|
|
141
119
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
120
|
+
[data-tao-control][data-tao-variant="borderless"]:is([data-disabled], :has(input:disabled)) {
|
|
121
|
+
color: var(--tao-color-text-disabled);
|
|
122
|
+
cursor: not-allowed;
|
|
145
123
|
}
|
|
146
124
|
|
|
147
|
-
|
|
148
|
-
|
|
125
|
+
@media (pointer: coarse) {
|
|
126
|
+
[data-tao-control] {
|
|
127
|
+
min-height: 44px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:is([data-tao-control] input, input[data-tao-control], textarea[data-tao-control]) {
|
|
131
|
+
font-size: max(16px, 1em);
|
|
132
|
+
}
|
|
149
133
|
}
|
|
150
134
|
}
|
|
151
135
|
|
package/dist/theme/theme.css
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
var(--tao-color-bg-base));
|
|
48
48
|
--tao-primary-fg: var(--tao-color-bg-base);
|
|
49
49
|
--tao-error: var(--tao-color-error);
|
|
50
|
-
--tao-error-hover: color-mix(in
|
|
51
|
-
--tao-error-active: color-mix(in
|
|
50
|
+
--tao-error-hover: color-mix(in oklab, var(--tao-color-error) 80%, white);
|
|
51
|
+
--tao-error-active: color-mix(in oklab, var(--tao-color-error) 90%, black);
|
|
52
52
|
--tao-error-bg: color-mix(in oklab,
|
|
53
53
|
var(--tao-color-error) 6%,
|
|
54
54
|
var(--tao-color-bg-base));
|
|
@@ -247,6 +247,8 @@
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
@layer components;
|
|
251
|
+
|
|
250
252
|
@media (prefers-reduced-motion: reduce) {
|
|
251
253
|
:root, [data-tao-provider], [data-tao-theme] {
|
|
252
254
|
--tao-motion-unit: 0s !important;
|
|
@@ -1,222 +1,67 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
2
|
import { forwardRef, memo, useImperativeHandle, useLayoutEffect, useState } from "react";
|
|
4
3
|
import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
|
|
5
|
-
function DialogContent(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$[1] = contentRef;
|
|
15
|
-
$[2] = keepAlive;
|
|
16
|
-
$[3] = open;
|
|
17
|
-
$[4] = props;
|
|
18
|
-
} else {
|
|
19
|
-
contentRef = $[1];
|
|
20
|
-
keepAlive = $[2];
|
|
21
|
-
open = $[3];
|
|
22
|
-
props = $[4];
|
|
23
|
-
}
|
|
24
|
-
let t1;
|
|
25
|
-
if ($[5] !== contentRef || $[6] !== keepAlive || $[7] !== open || $[8] !== props) {
|
|
26
|
-
t1 = keepAlive ? /*#__PURE__*/ jsx(KeptDialogContent, {
|
|
27
|
-
open: open,
|
|
28
|
-
contentRef: contentRef,
|
|
29
|
-
contentProps: props
|
|
30
|
-
}) : /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
|
|
31
|
-
...props,
|
|
32
|
-
ref: contentRef
|
|
33
|
-
});
|
|
34
|
-
$[5] = contentRef;
|
|
35
|
-
$[6] = keepAlive;
|
|
36
|
-
$[7] = open;
|
|
37
|
-
$[8] = props;
|
|
38
|
-
$[9] = t1;
|
|
39
|
-
} else t1 = $[9];
|
|
40
|
-
return t1;
|
|
4
|
+
function DialogContent({ open, keepAlive, contentRef, ...props }) {
|
|
5
|
+
return keepAlive ? /*#__PURE__*/ jsx(KeptDialogContent, {
|
|
6
|
+
open: open,
|
|
7
|
+
contentRef: contentRef,
|
|
8
|
+
contentProps: props
|
|
9
|
+
}) : /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
|
|
10
|
+
...props,
|
|
11
|
+
ref: contentRef
|
|
12
|
+
});
|
|
41
13
|
}
|
|
42
|
-
function KeptDialogContent(
|
|
43
|
-
const $ = c(29);
|
|
44
|
-
const { open, contentRef, contentProps } = t0;
|
|
14
|
+
function KeptDialogContent({ open, contentRef, contentProps }) {
|
|
45
15
|
const [node, setNode] = useState(null);
|
|
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
|
-
children = $[5];
|
|
78
|
-
hostProps = $[6];
|
|
79
|
-
}
|
|
80
|
-
let t4;
|
|
81
|
-
if ($[7] !== contentProps || $[8] !== node || $[9] !== open) {
|
|
82
|
-
t4 = open && node && /*#__PURE__*/ jsx(dialog_content_ModalLayer, {
|
|
83
|
-
node: node,
|
|
84
|
-
contentProps: contentProps,
|
|
85
|
-
onPropsChange: setLayerProps
|
|
86
|
-
});
|
|
87
|
-
$[7] = contentProps;
|
|
88
|
-
$[8] = node;
|
|
89
|
-
$[9] = open;
|
|
90
|
-
$[10] = t4;
|
|
91
|
-
} else t4 = $[10];
|
|
92
|
-
const t5 = layerProps["aria-labelledby"];
|
|
93
|
-
const t6 = layerProps["aria-describedby"];
|
|
94
|
-
const t7 = open ? layerProps : void 0;
|
|
95
|
-
const t8 = open ? "open" : "closed";
|
|
96
|
-
let t9;
|
|
97
|
-
if ($[11] !== layerProps.style || $[12] !== open) {
|
|
98
|
-
t9 = open ? layerProps.style : {
|
|
99
|
-
display: "none"
|
|
100
|
-
};
|
|
101
|
-
$[11] = layerProps.style;
|
|
102
|
-
$[12] = open;
|
|
103
|
-
$[13] = t9;
|
|
104
|
-
} else t9 = $[13];
|
|
105
|
-
let t10;
|
|
106
|
-
if ($[14] !== hostProps.style || $[15] !== t9) {
|
|
107
|
-
t10 = {
|
|
108
|
-
...hostProps.style,
|
|
109
|
-
...t9
|
|
110
|
-
};
|
|
111
|
-
$[14] = hostProps.style;
|
|
112
|
-
$[15] = t9;
|
|
113
|
-
$[16] = t10;
|
|
114
|
-
} else t10 = $[16];
|
|
115
|
-
let t11;
|
|
116
|
-
if ($[17] !== children || $[18] !== hostProps || $[19] !== layerProps.id || $[20] !== t10 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
|
|
117
|
-
t11 = /*#__PURE__*/ jsx("div", {
|
|
118
|
-
role: "dialog",
|
|
119
|
-
id: layerProps.id,
|
|
120
|
-
"aria-labelledby": t5,
|
|
121
|
-
"aria-describedby": t6,
|
|
122
|
-
...hostProps,
|
|
123
|
-
...t7,
|
|
124
|
-
ref: setNode,
|
|
125
|
-
"data-state": t8,
|
|
126
|
-
style: t10,
|
|
127
|
-
children: children
|
|
128
|
-
});
|
|
129
|
-
$[17] = children;
|
|
130
|
-
$[18] = hostProps;
|
|
131
|
-
$[19] = layerProps.id;
|
|
132
|
-
$[20] = t10;
|
|
133
|
-
$[21] = t5;
|
|
134
|
-
$[22] = t6;
|
|
135
|
-
$[23] = t7;
|
|
136
|
-
$[24] = t8;
|
|
137
|
-
$[25] = t11;
|
|
138
|
-
} else t11 = $[25];
|
|
139
|
-
let t12;
|
|
140
|
-
if ($[26] !== t11 || $[27] !== t4) {
|
|
141
|
-
t12 = /*#__PURE__*/ jsxs(Fragment, {
|
|
142
|
-
children: [
|
|
143
|
-
t4,
|
|
144
|
-
t11
|
|
145
|
-
]
|
|
146
|
-
});
|
|
147
|
-
$[26] = t11;
|
|
148
|
-
$[27] = t4;
|
|
149
|
-
$[28] = t12;
|
|
150
|
-
} else t12 = $[28];
|
|
151
|
-
return t12;
|
|
16
|
+
const [layerProps, setLayerProps] = useState({});
|
|
17
|
+
useImperativeHandle(contentRef, ()=>node, [
|
|
18
|
+
node
|
|
19
|
+
]);
|
|
20
|
+
const { children, forceMount: _forceMount, asChild: _asChild, onOpenAutoFocus: _onOpenAutoFocus, onCloseAutoFocus: _onCloseAutoFocus, onEscapeKeyDown: _onEscapeKeyDown, onPointerDownOutside: _onPointerDownOutside, onFocusOutside: _onFocusOutside, onInteractOutside: _onInteractOutside, ...hostProps } = contentProps;
|
|
21
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
open && node && /*#__PURE__*/ jsx(dialog_content_ModalLayer, {
|
|
24
|
+
node: node,
|
|
25
|
+
contentProps: contentProps,
|
|
26
|
+
onPropsChange: setLayerProps
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx("div", {
|
|
29
|
+
role: "dialog",
|
|
30
|
+
id: layerProps.id,
|
|
31
|
+
"aria-labelledby": layerProps['aria-labelledby'],
|
|
32
|
+
"aria-describedby": layerProps['aria-describedby'],
|
|
33
|
+
...hostProps,
|
|
34
|
+
...open ? layerProps : void 0,
|
|
35
|
+
ref: setNode,
|
|
36
|
+
"data-state": open ? 'open' : 'closed',
|
|
37
|
+
style: {
|
|
38
|
+
...hostProps.style,
|
|
39
|
+
...open ? layerProps.style : {
|
|
40
|
+
display: 'none'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
children: children
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
152
47
|
}
|
|
153
|
-
const dialog_content_ModalLayer = /*#__PURE__*/ memo(function(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
t1 = /*#__PURE__*/ jsx(dialog_content_HostBridge, {
|
|
48
|
+
const dialog_content_ModalLayer = /*#__PURE__*/ memo(function({ node, contentProps, onPropsChange }) {
|
|
49
|
+
return /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
|
|
50
|
+
...contentProps,
|
|
51
|
+
asChild: true,
|
|
52
|
+
children: /*#__PURE__*/ jsx(dialog_content_HostBridge, {
|
|
159
53
|
node: node,
|
|
160
54
|
onPropsChange: onPropsChange
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
$[1] = onPropsChange;
|
|
164
|
-
$[2] = t1;
|
|
165
|
-
} else t1 = $[2];
|
|
166
|
-
let t2;
|
|
167
|
-
if ($[3] !== contentProps || $[4] !== t1) {
|
|
168
|
-
t2 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
|
|
169
|
-
...contentProps,
|
|
170
|
-
asChild: true,
|
|
171
|
-
children: t1
|
|
172
|
-
});
|
|
173
|
-
$[3] = contentProps;
|
|
174
|
-
$[4] = t1;
|
|
175
|
-
$[5] = t2;
|
|
176
|
-
} else t2 = $[5];
|
|
177
|
-
return t2;
|
|
55
|
+
})
|
|
56
|
+
});
|
|
178
57
|
});
|
|
179
|
-
const dialog_content_HostBridge = /*#__PURE__*/ forwardRef(function(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
$[0] = t0;
|
|
187
|
-
$[1] = node;
|
|
188
|
-
$[2] = onPropsChange;
|
|
189
|
-
$[3] = props;
|
|
190
|
-
} else {
|
|
191
|
-
node = $[1];
|
|
192
|
-
onPropsChange = $[2];
|
|
193
|
-
props = $[3];
|
|
194
|
-
}
|
|
195
|
-
let t1;
|
|
196
|
-
let t2;
|
|
197
|
-
if ($[4] !== node) {
|
|
198
|
-
t1 = ()=>node;
|
|
199
|
-
t2 = [
|
|
200
|
-
node
|
|
201
|
-
];
|
|
202
|
-
$[4] = node;
|
|
203
|
-
$[5] = t1;
|
|
204
|
-
$[6] = t2;
|
|
205
|
-
} else {
|
|
206
|
-
t1 = $[5];
|
|
207
|
-
t2 = $[6];
|
|
208
|
-
}
|
|
209
|
-
useImperativeHandle(ref, t1, t2);
|
|
210
|
-
let t3;
|
|
211
|
-
if ($[7] !== onPropsChange || $[8] !== props) {
|
|
212
|
-
t3 = ()=>{
|
|
213
|
-
onPropsChange(props);
|
|
214
|
-
};
|
|
215
|
-
$[7] = onPropsChange;
|
|
216
|
-
$[8] = props;
|
|
217
|
-
$[9] = t3;
|
|
218
|
-
} else t3 = $[9];
|
|
219
|
-
useLayoutEffect(t3);
|
|
58
|
+
const dialog_content_HostBridge = /*#__PURE__*/ forwardRef(function({ node, onPropsChange, ...props }, ref) {
|
|
59
|
+
useImperativeHandle(ref, ()=>node, [
|
|
60
|
+
node
|
|
61
|
+
]);
|
|
62
|
+
useLayoutEffect(()=>{
|
|
63
|
+
onPropsChange(props);
|
|
64
|
+
});
|
|
220
65
|
return null;
|
|
221
66
|
});
|
|
222
67
|
export { DialogContent };
|
package/dist/utils/overlay.js
CHANGED
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
function useControlledOpen(t0) {
|
|
5
|
-
const $ = c(7);
|
|
6
|
-
const { open, defaultOpen, onOpenChange, canOpen: t1 } = t0;
|
|
7
|
-
const canOpen = void 0 === t1 ? true : t1;
|
|
2
|
+
import { Children, Fragment, isValidElement, useCallback, useState } from "react";
|
|
3
|
+
function useControlledOpen({ open, defaultOpen, onOpenChange, canOpen = true }) {
|
|
8
4
|
const isControlled = null != open;
|
|
9
5
|
const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);
|
|
10
6
|
const realOpen = isControlled ? open : internalOpen;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let t3;
|
|
25
|
-
if ($[4] !== realOpen || $[5] !== setOpen) {
|
|
26
|
-
t3 = [
|
|
27
|
-
realOpen,
|
|
28
|
-
setOpen
|
|
29
|
-
];
|
|
30
|
-
$[4] = realOpen;
|
|
31
|
-
$[5] = setOpen;
|
|
32
|
-
$[6] = t3;
|
|
33
|
-
} else t3 = $[6];
|
|
34
|
-
return t3;
|
|
7
|
+
const setOpen = useCallback((next)=>{
|
|
8
|
+
if (next && !canOpen) return;
|
|
9
|
+
if (!isControlled) setInternalOpen(next);
|
|
10
|
+
onOpenChange?.(next);
|
|
11
|
+
}, [
|
|
12
|
+
isControlled,
|
|
13
|
+
canOpen,
|
|
14
|
+
onOpenChange
|
|
15
|
+
]);
|
|
16
|
+
return [
|
|
17
|
+
realOpen,
|
|
18
|
+
setOpen
|
|
19
|
+
];
|
|
35
20
|
}
|
|
36
21
|
function asTriggerChild(children) {
|
|
37
22
|
if (!/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ jsx("span", {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DependencyList, type EffectCallback, type ReactNode, type Ref } from 'react';
|
|
2
|
+
/** SSR-safe useLayoutEffect (falls back to useEffect during server rendering). */
|
|
3
|
+
export declare const useIsomorphicLayoutEffect: (effect: EffectCallback, deps?: DependencyList) => void;
|
|
4
|
+
/** True for any ReactNode that actually produces rendered output (keeps 0, rejects ""). */
|
|
5
|
+
export declare function isReactRenderable(node: ReactNode): boolean;
|
|
6
|
+
/** Deep structural equality for plain values, arrays, Dates, and plain objects. */
|
|
7
|
+
export declare function isEqual(a: unknown, b: unknown, shallow?: boolean): boolean;
|
|
8
|
+
/** Extract the attached ref from a React element (compatible with React 18 & 19). */
|
|
9
|
+
export declare function getNodeRef<T = unknown>(node: ReactNode): Ref<T> | null;
|
|
10
|
+
/** True when a React element can safely receive a ref (React 18 & 19). */
|
|
11
|
+
export declare function supportNodeRef(node: ReactNode): boolean;
|
|
12
|
+
/** Resolve an HTMLElement/SVGElement from a DOM node or `{ nativeElement }` ref handle. */
|
|
13
|
+
export declare function getDOM(node: unknown): HTMLElement | SVGElement | null;
|