@sdata/web-vue 4.4.3 → 4.5.1
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/dist/sd.css +74 -9
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/select-view.vue.d.ts +1 -1
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/_hooks/use-component-ref.d.ts +1 -1
- package/es/_hooks/use-responsive.js +6 -1
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.d.ts +1 -1
- package/es/_utils/date.js +6 -3
- package/es/_utils/debounce.d.ts +4 -1
- package/es/_utils/debounce.js +8 -1
- package/es/_utils/get-value-by-path.d.ts +1 -0
- package/es/_utils/get-value-by-path.js +9 -9
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +18 -5
- package/es/anchor/utils.d.ts +1 -1
- package/es/anchor/utils.js +4 -2
- package/es/auto-complete/auto-complete.vue.d.ts +4 -4
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +22 -9
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +16 -23
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +36 -20
- package/es/avatar/style/index.css +4 -0
- package/es/avatar/style/index.scss +5 -0
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +24 -13
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +1 -1
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +24 -15
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +4 -4
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +58 -37
- package/es/basic-crud-table/index.d.ts +12 -12
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +64 -22
- package/es/border-beam/styles.js +20 -7
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +19 -13
- package/es/button/index.d.ts +3 -3
- package/es/calendar/__test__/real-transitions.js +10 -0
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/header.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/core/config.js +17 -20
- package/es/calendar/core/events.js +59 -41
- package/es/calendar/core/i18n.d.ts +1 -1
- package/es/calendar/core/i18n.js +2 -2
- package/es/calendar/core/index.d.ts +6 -6
- package/es/calendar/core/index.js +1 -1
- package/es/calendar/core/view.js +10 -7
- package/es/calendar/modules/drag-and-drop.js +80 -30
- package/es/calendar/utils/date.d.ts +4 -4
- package/es/calendar/utils/date.js +20 -11
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +17 -11
- package/es/card/context.d.ts +2 -0
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +8 -21
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +27 -12
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader.vue.d.ts +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +37 -17
- package/es/cascader/context.d.ts +2 -2
- package/es/cascader/hooks/use-lazy-load.d.ts +6 -0
- package/es/cascader/hooks/use-lazy-load.js +35 -0
- package/es/cascader/interface.d.ts +4 -0
- package/es/cascader/utils.d.ts +2 -2
- package/es/cascader/utils.js +10 -8
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +17 -2
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/color-picker/hooks/use-control-block.js +5 -1
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +31 -12
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +7 -15
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/context.d.ts +5 -1
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/global-theme.d.ts +3 -0
- package/es/config-provider/global-theme.js +49 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +39 -37
- package/es/config-provider/theme.d.ts +1 -0
- package/es/config-provider/theme.js +5 -3
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +33 -25
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/date-picker/hooks/use-is-disabled-date.d.ts +2 -2
- package/es/date-picker/hooks/use-is-disabled-date.js +4 -5
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +28 -0
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +28 -0
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +10 -9
- package/es/descriptions/interface.d.ts +1 -0
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -24
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +15 -13
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +17 -13
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +23 -8
- package/es/ellipsis/index.d.ts +3 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +24 -9
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +34 -18
- package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
- package/es/file-previewer/use-pdf-js.js +57 -38
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +54 -15
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/grid/context.d.ts +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +11 -12
- package/es/grid/style/col.scss +2 -2
- package/es/grid/style/index.css +42 -0
- package/es/grid/utils/index.js +5 -2
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon-component/add-from-icon-font-cn.js +5 -1
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/icon.js +292 -292
- package/es/image/hooks/use-image-drag.js +4 -2
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +14 -10
- package/es/image/preview-action.vue.d.ts +6 -2
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +7 -9
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +17 -22
- package/es/index.css +74 -9
- package/es/index.d.ts +6 -6
- package/es/input/index.d.ts +3 -3
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-search.vue.d.ts +1 -1
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +7 -8
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +14 -7
- package/es/input-mask/mask-engine.js +1 -1
- package/es/input-number/decimal.d.ts +3 -0
- package/es/input-number/decimal.js +49 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +60 -27
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +34 -16
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +4 -2
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/index.d.ts +3 -3
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list.vue.d.ts +1 -1
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/locale/interface.d.ts +4 -0
- package/es/locale/lang/en-us.js +4 -0
- package/es/locale/lang/zh-cn.js +4 -0
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +13 -3
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/index.js +2 -1
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/hooks/use-draggable.js +3 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +5 -2
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/pagination/interface.d.ts +1 -0
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +23 -12
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +9 -7
- package/es/regex-vis/layout.js +1 -1
- package/es/regex-vis/parser/parser.js +1 -1
- package/es/regex-vis/regex-vis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/index.d.ts +7 -6
- package/es/result/result.vue.d.ts +2 -2
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +1 -1
- package/es/secret/index.d.ts +4 -15
- package/es/secret/interface.d.ts +6 -0
- package/es/secret/secret.vue.d.ts +1 -5
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/index.d.ts +3 -3
- package/es/select/interface.d.ts +5 -0
- package/es/select/select-dropdown.vue.d.ts +3 -1
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/select/select.vue.d.ts +1 -1
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/select/utils.js +1 -1
- package/es/selectable-card/index.d.ts +4 -52
- package/es/selectable-card/selectable-card.vue.d.ts +3 -20
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/selectable-card/types.d.ts +17 -0
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/index.d.ts +1 -0
- package/es/skeleton/interface.d.ts +14 -0
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +6 -8
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +9 -4
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/split/index.d.ts +1 -0
- package/es/split/interface.d.ts +7 -7
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/steps/index.d.ts +2 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/switch/index.d.ts +4 -3
- package/es/switch/switch.vue.d.ts +1 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/table/index.d.ts +3 -3
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +14 -3
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table.vue.d.ts +1 -1
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +14 -5
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +19 -57
- package/es/tabs/style/index.css +17 -1
- package/es/tabs/style/index.scss +17 -1
- package/es/tabs/tab-pane.vue.d.ts +1 -13
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +26 -5
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/tag/index.d.ts +10 -10
- package/es/tag/tag.vue.d.ts +4 -4
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/textarea/index.d.ts +1 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/style/index.scss +3 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/theme-provider/index.d.ts +1 -0
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/index.d.ts +1 -0
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/index.d.ts +2 -0
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/transfer/index.d.ts +1 -0
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +3 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-filter-tree-node.js +2 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue.d.ts +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/trigger/interface.d.ts +4 -1
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +11 -5
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/style/index.css +9 -6
- package/es/upload/style/index.scss +12 -6
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +42 -11
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/verification-code/index.d.ts +1 -0
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/index.d.ts +5 -3
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +4 -1
- package/json/vetur-attributes.json +4 -0
- package/json/vetur-tags.json +2 -1
- package/json/web-types.json +9 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
4
|
import input_group_default from "../input/input-group.js";
|
|
@@ -10,11 +10,16 @@ import control_bar_default from "./control-bar.js";
|
|
|
10
10
|
import { addGradientColor, formatColor, formatColorState, getActiveGradientPoint, getColorBackground, getColorObject, getDefaultColorState, getDefaultGradientState, getFormatInputs, getGradientThumbBackground, getLinearGradientString, normalizeFormat, parseColorState, parseFormatInputValues, removeGradientColor, round, setActiveColorHsva, setGradientColors, setGradientDegree, setGradientSelectedPoint } from "./utils.js";
|
|
11
11
|
import gradient_thumb_default from "./gradient-thumb.js";
|
|
12
12
|
import palette_default from "./palette.js";
|
|
13
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
13
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
14
14
|
import { createReusableTemplate } from "@vueuse/core";
|
|
15
15
|
//#region components/color-picker/panel.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var _hoisted_1 = ["
|
|
17
|
-
var _hoisted_2 = [
|
|
16
|
+
var _hoisted_1 = ["disabled"];
|
|
17
|
+
var _hoisted_2 = [
|
|
18
|
+
"disabled",
|
|
19
|
+
"aria-label",
|
|
20
|
+
"onClick"
|
|
21
|
+
];
|
|
22
|
+
var _hoisted_3 = ["disabled"];
|
|
18
23
|
var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Panel" }), {}, {
|
|
19
24
|
__name: "panel",
|
|
20
25
|
props: {
|
|
@@ -190,10 +195,17 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
190
195
|
});
|
|
191
196
|
const emitStateChange = (nextState, trigger, notifyPaletteBar) => {
|
|
192
197
|
var _props$onChange, _props$onPaletteBarCh;
|
|
198
|
+
if (props.disabled) return;
|
|
193
199
|
colorState.value = nextState;
|
|
194
200
|
syncDrafts();
|
|
195
201
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, formatColorState(nextState, selectedFormat.value, props.enableAlpha), trigger);
|
|
196
202
|
if (notifyPaletteBar) (_props$onPaletteBarCh = props.onPaletteBarChange) === null || _props$onPaletteBarCh === void 0 || _props$onPaletteBarCh.call(props, { color: getColorObject(nextState) });
|
|
203
|
+
nextTick(() => {
|
|
204
|
+
const acceptedState = parseColorState(props.value, props.colorModes);
|
|
205
|
+
if (formatColorState(colorState.value, selectedFormat.value, props.enableAlpha) === formatColorState(acceptedState, selectedFormat.value, props.enableAlpha)) return;
|
|
206
|
+
colorState.value = reconcileGradientState(colorState.value, acceptedState);
|
|
207
|
+
syncDrafts();
|
|
208
|
+
});
|
|
197
209
|
};
|
|
198
210
|
const handleHsvaChange = (nextHsva, trigger, notifyPaletteBar) => emitStateChange(setActiveColorHsva(colorState.value, nextHsva), trigger, notifyPaletteBar);
|
|
199
211
|
const handleModeChange = (mode) => {
|
|
@@ -212,8 +224,10 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
212
224
|
nextDrafts[index] = value;
|
|
213
225
|
formatDrafts.value = nextDrafts;
|
|
214
226
|
};
|
|
215
|
-
const commitDrafts = () => {
|
|
216
|
-
|
|
227
|
+
const commitDrafts = (index) => {
|
|
228
|
+
const drafts = [...formatDrafts.value];
|
|
229
|
+
if (index === 1 && normalizeFormat(selectedFormat.value, props.enableAlpha) === "HEX8") drafts[0] = drafts[0].slice(0, 6);
|
|
230
|
+
handleHsvaChange(parseFormatInputValues(drafts, selectedFormat.value, props.enableAlpha), "input");
|
|
217
231
|
};
|
|
218
232
|
const getThumbTrackRect = () => {
|
|
219
233
|
var _ref;
|
|
@@ -263,6 +277,7 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
263
277
|
};
|
|
264
278
|
const addRecentColor = () => {
|
|
265
279
|
var _props$onRecentColors;
|
|
280
|
+
if (props.disabled) return;
|
|
266
281
|
if (props.recentColors === null || props.recentColors === false) return;
|
|
267
282
|
const currentValue = formatColorState(colorState.value, selectedFormat.value, props.enableAlpha);
|
|
268
283
|
const next = [...recentColorList.value || []];
|
|
@@ -281,8 +296,9 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
281
296
|
key: 0,
|
|
282
297
|
type: "button",
|
|
283
298
|
class: normalizeClass(`${unref(prefixCls)}-colors-action`),
|
|
299
|
+
disabled: props.disabled,
|
|
284
300
|
onClick: addRecentColor
|
|
285
|
-
}, " 添加当前颜色 ",
|
|
301
|
+
}, " 添加当前颜色 ", 10, _hoisted_1)) : createCommentVNode("", true)], 2), createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-colors-wrapper`) }, [(values === null || values === void 0 ? void 0 : values.length) ? (openBlock(), createElementBlock("div", {
|
|
286
302
|
key: 0,
|
|
287
303
|
class: normalizeClass(`${unref(prefixCls)}-colors-list`)
|
|
288
304
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(values, (value) => {
|
|
@@ -290,12 +306,13 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
290
306
|
key: value,
|
|
291
307
|
type: "button",
|
|
292
308
|
class: normalizeClass(`${unref(prefixCls)}-color-block`),
|
|
309
|
+
disabled: props.disabled,
|
|
293
310
|
"aria-label": unref(t)("a11y.selectColor", value),
|
|
294
311
|
onClick: ($event) => selectColorBlock(value, trigger)
|
|
295
312
|
}, [createElementVNode("div", {
|
|
296
313
|
class: normalizeClass(`${unref(prefixCls)}-block`),
|
|
297
314
|
style: normalizeStyle(getColorBlockStyle(value))
|
|
298
|
-
}, null, 6)], 10,
|
|
315
|
+
}, null, 6)], 10, _hoisted_2);
|
|
299
316
|
}), 128))], 2)) : (openBlock(), createElementBlock("span", {
|
|
300
317
|
key: 1,
|
|
301
318
|
class: normalizeClass(`${unref(prefixCls)}-colors-empty`)
|
|
@@ -330,7 +347,7 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
330
347
|
style: normalizeStyle({ backgroundImage: unref(getGradientThumbBackground)(colorState.value.gradientColors) }),
|
|
331
348
|
onClick: handleGradientBarClick,
|
|
332
349
|
onKeydown: handleGradientBarKeyDown
|
|
333
|
-
}, null, 46,
|
|
350
|
+
}, null, 46, _hoisted_3), (openBlock(true), createElementBlock(Fragment, null, renderList(colorState.value.gradientColors, (point) => {
|
|
334
351
|
return openBlock(), createBlock(gradient_thumb_default, {
|
|
335
352
|
key: point.id,
|
|
336
353
|
point,
|
|
@@ -420,13 +437,15 @@ var panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
420
437
|
disabled: props.disabled,
|
|
421
438
|
"model-value": draft,
|
|
422
439
|
onInput: ($event) => updateDraft(index, $event),
|
|
423
|
-
onChange: commitDrafts,
|
|
424
|
-
onPressEnter: commitDrafts
|
|
440
|
+
onChange: ($event) => commitDrafts(index),
|
|
441
|
+
onPressEnter: ($event) => commitDrafts(index)
|
|
425
442
|
}, null, 8, [
|
|
426
443
|
"class",
|
|
427
444
|
"disabled",
|
|
428
445
|
"model-value",
|
|
429
|
-
"onInput"
|
|
446
|
+
"onInput",
|
|
447
|
+
"onChange",
|
|
448
|
+
"onPressEnter"
|
|
430
449
|
]);
|
|
431
450
|
}), 128))]),
|
|
432
451
|
_: 1
|
package/es/color-picker/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { formatInputToHSVA, hsvToRgb, rgbToHex, rgbToHsv, rgbaToHex } from "../_utils/color.js";
|
|
3
3
|
//#region components/color-picker/utils.ts
|
|
4
4
|
var DEFAULT_HSVA = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isString } from "../_utils/is.js";
|
|
4
|
-
import {
|
|
5
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
|
4
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref } from "vue";
|
|
6
5
|
//#region components/comment/comment.vue?vue&type=script&setup=true&lang.ts
|
|
7
6
|
var _hoisted_1 = ["src"];
|
|
8
7
|
var _hoisted_2 = { key: 0 };
|
|
@@ -68,14 +67,7 @@ var comment_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
68
67
|
* @en Action list
|
|
69
68
|
* @slot actions
|
|
70
69
|
*/
|
|
71
|
-
const slots = useSlots();
|
|
72
70
|
const prefixCls = getPrefixCls("comment");
|
|
73
|
-
const [hasAuthor, hasAvatar, hasContent, hasDatetime] = [
|
|
74
|
-
"author",
|
|
75
|
-
"avatar",
|
|
76
|
-
"content",
|
|
77
|
-
"datetime"
|
|
78
|
-
].map((propName) => hasPropOrSlot(props, slots, propName));
|
|
79
71
|
const computedAlign = computed(() => {
|
|
80
72
|
var _align$datetime, _align$actions;
|
|
81
73
|
const { align } = props;
|
|
@@ -89,7 +81,7 @@ var comment_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
89
81
|
};
|
|
90
82
|
});
|
|
91
83
|
return (_ctx, _cache) => {
|
|
92
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [
|
|
84
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [__props.avatar || _ctx.$slots.avatar ? (openBlock(), createElementBlock("div", {
|
|
93
85
|
key: 0,
|
|
94
86
|
class: normalizeClass(`${unref(prefixCls)}-avatar`)
|
|
95
87
|
}, [__props.avatar ? (openBlock(), createElementBlock("img", {
|
|
@@ -97,17 +89,17 @@ var comment_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
97
89
|
src: __props.avatar,
|
|
98
90
|
alt: "comment-avatar"
|
|
99
91
|
}, null, 8, _hoisted_1)) : renderSlot(_ctx.$slots, "avatar", {}, void 0, void 0, 1)], 2)) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-inner`) }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-inner-content`) }, [
|
|
100
|
-
|
|
92
|
+
__props.author || _ctx.$slots.author || __props.datetime || _ctx.$slots.datetime ? (openBlock(), createElementBlock("div", {
|
|
101
93
|
key: 0,
|
|
102
94
|
class: normalizeClass(`${unref(prefixCls)}-title ${unref(prefixCls)}-title-align-${computedAlign.value.datetime}`)
|
|
103
|
-
}, [
|
|
95
|
+
}, [__props.author || _ctx.$slots.author ? (openBlock(), createElementBlock("span", {
|
|
104
96
|
key: 0,
|
|
105
97
|
class: normalizeClass(`${unref(prefixCls)}-author`)
|
|
106
|
-
}, [__props.author ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.author), 1)) : renderSlot(_ctx.$slots, "author", {}, void 0, void 0, 1)], 2)) : createCommentVNode("", true),
|
|
98
|
+
}, [__props.author ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.author), 1)) : renderSlot(_ctx.$slots, "author", {}, void 0, void 0, 1)], 2)) : createCommentVNode("", true), __props.datetime || _ctx.$slots.datetime ? (openBlock(), createElementBlock("span", {
|
|
107
99
|
key: 1,
|
|
108
100
|
class: normalizeClass(`${unref(prefixCls)}-datetime`)
|
|
109
101
|
}, [__props.datetime ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.datetime), 1)) : renderSlot(_ctx.$slots, "datetime", {}, void 0, void 0, 1)], 2)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true),
|
|
110
|
-
|
|
102
|
+
__props.content || _ctx.$slots.content ? (openBlock(), createElementBlock("div", {
|
|
111
103
|
key: 1,
|
|
112
104
|
class: normalizeClass(`${unref(prefixCls)}-content`)
|
|
113
105
|
}, [__props.content ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.content), 1)) : renderSlot(_ctx.$slots, "content", {}, void 0, void 0, 1)], 2)) : createCommentVNode("", true),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "./context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { normalizeTheme } from "./theme.js";
|
|
4
4
|
import theme_provider_default from "./theme-provider.js";
|
|
5
5
|
import { createBlock, defineComponent, getCurrentInstance, openBlock, provide, reactive, renderSlot, toRefs, useSlots, watch, withCtx } from "vue";
|
|
@@ -9,7 +9,7 @@ import type { JsonFormProviderConfig } from '../json-form/types';
|
|
|
9
9
|
import type { SdLang } from '../locale/interface';
|
|
10
10
|
import type { PaginationSelectProps } from '../pagination/interface';
|
|
11
11
|
import type { SpinProps } from '../spin';
|
|
12
|
-
import type { SDThemeNormalized } from './theme';
|
|
12
|
+
import type { SDThemeNormalized, SdThemeMode } from './theme';
|
|
13
13
|
export interface ConfigProviderModal {
|
|
14
14
|
mask?: boolean;
|
|
15
15
|
maskClosable?: boolean;
|
|
@@ -104,3 +104,7 @@ export interface ConfigProvider {
|
|
|
104
104
|
}
|
|
105
105
|
export declare const configProviderInjectionKey: InjectionKey<ConfigProvider>;
|
|
106
106
|
export declare const themePopupContainerInjectionKey: InjectionKey<Ref<HTMLElement | null>>;
|
|
107
|
+
export declare const inheritedThemeInjectionKey: InjectionKey<{
|
|
108
|
+
variables: Ref<Record<string, string>>;
|
|
109
|
+
mode: Ref<SdThemeMode | undefined>;
|
|
110
|
+
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//#region components/config-provider/context.ts
|
|
2
2
|
var configProviderInjectionKey = Symbol("SDConfigProvider");
|
|
3
3
|
var themePopupContainerInjectionKey = Symbol("SDThemePopupContainer");
|
|
4
|
+
var inheritedThemeInjectionKey = Symbol("SDInheritedTheme");
|
|
4
5
|
//#endregion
|
|
5
|
-
export { configProviderInjectionKey, themePopupContainerInjectionKey };
|
|
6
|
+
export { configProviderInjectionKey, inheritedThemeInjectionKey, themePopupContainerInjectionKey };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type SDThemeNormalized, type SdThemeMode } from './theme';
|
|
2
|
+
export declare function applyGlobalTheme(target: HTMLElement, owner: symbol, theme: SDThemeNormalized, mode?: SdThemeMode): void;
|
|
3
|
+
export declare function releaseGlobalTheme(target: HTMLElement, owner: symbol): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getThemeCSSVariables } from "./theme.js";
|
|
2
|
+
//#region components/config-provider/global-theme.ts
|
|
3
|
+
var targets = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function render(target, state) {
|
|
5
|
+
const variables = {};
|
|
6
|
+
let mode = state.mode;
|
|
7
|
+
for (const layer of state.layers.values()) {
|
|
8
|
+
Object.assign(variables, layer.variables);
|
|
9
|
+
if (layer.mode !== void 0) mode = layer.mode;
|
|
10
|
+
}
|
|
11
|
+
for (const [key, original] of state.variables) if (variables[key] !== void 0) target.style.setProperty(key, variables[key]);
|
|
12
|
+
else {
|
|
13
|
+
if (original.value) target.style.setProperty(key, original.value, original.priority);
|
|
14
|
+
else target.style.removeProperty(key);
|
|
15
|
+
state.variables.delete(key);
|
|
16
|
+
}
|
|
17
|
+
if (mode === null) target.removeAttribute("sd-theme");
|
|
18
|
+
else target.setAttribute("sd-theme", mode);
|
|
19
|
+
}
|
|
20
|
+
function applyGlobalTheme(target, owner, theme, mode) {
|
|
21
|
+
let state = targets.get(target);
|
|
22
|
+
if (!state) {
|
|
23
|
+
state = {
|
|
24
|
+
mode: target.getAttribute("sd-theme"),
|
|
25
|
+
variables: /* @__PURE__ */ new Map(),
|
|
26
|
+
layers: /* @__PURE__ */ new Map()
|
|
27
|
+
};
|
|
28
|
+
targets.set(target, state);
|
|
29
|
+
}
|
|
30
|
+
const variables = getThemeCSSVariables(theme);
|
|
31
|
+
for (const key of Object.keys(variables)) if (!state.variables.has(key)) state.variables.set(key, {
|
|
32
|
+
value: target.style.getPropertyValue(key),
|
|
33
|
+
priority: target.style.getPropertyPriority(key)
|
|
34
|
+
});
|
|
35
|
+
state.layers.set(owner, {
|
|
36
|
+
variables,
|
|
37
|
+
mode
|
|
38
|
+
});
|
|
39
|
+
render(target, state);
|
|
40
|
+
}
|
|
41
|
+
function releaseGlobalTheme(target, owner) {
|
|
42
|
+
const state = targets.get(target);
|
|
43
|
+
if (!state) return;
|
|
44
|
+
state.layers.delete(owner);
|
|
45
|
+
render(target, state);
|
|
46
|
+
if (!state.layers.size) targets.delete(target);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { applyGlobalTheme, releaseGlobalTheme };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { themePopupContainerInjectionKey } from "./context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { inheritedThemeInjectionKey, themePopupContainerInjectionKey } from "./context.js";
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import usePopupManager from "../_hooks/use-popup-manager.js";
|
|
5
|
-
import { applyThemeCSSVariables, clearThemeCSSVariables, normalizeTheme } from "./theme.js";
|
|
6
|
-
import {
|
|
5
|
+
import { applyThemeCSSVariableMap, applyThemeCSSVariables, clearThemeCSSVariables, getThemeCSSVariables, normalizeTheme } from "./theme.js";
|
|
6
|
+
import { applyGlobalTheme, releaseGlobalTheme } from "./global-theme.js";
|
|
7
|
+
import { computed, createBlock, defineComponent, inject, normalizeClass, onBeforeUnmount, openBlock, provide, renderSlot, resolveDynamicComponent, shallowRef, unref, watch, withCtx } from "vue";
|
|
7
8
|
//#region components/config-provider/theme-provider.vue?vue&type=script&setup=true&lang.ts
|
|
8
9
|
var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ThemeProvider" }), {}, {
|
|
9
10
|
__name: "theme-provider",
|
|
@@ -20,8 +21,22 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
20
21
|
const props = __props;
|
|
21
22
|
const rootElement = shallowRef(null);
|
|
22
23
|
const popupContainer = shallowRef(null);
|
|
23
|
-
|
|
24
|
+
const parentPopupContainer = inject(themePopupContainerInjectionKey, void 0);
|
|
25
|
+
provide(themePopupContainerInjectionKey, computed(() => {
|
|
26
|
+
var _ref, _popupContainer$value;
|
|
27
|
+
return (_ref = (_popupContainer$value = popupContainer.value) !== null && _popupContainer$value !== void 0 ? _popupContainer$value : parentPopupContainer === null || parentPopupContainer === void 0 ? void 0 : parentPopupContainer.value) !== null && _ref !== void 0 ? _ref : null;
|
|
28
|
+
}));
|
|
24
29
|
const normalizedTheme = computed(() => normalizeTheme(props.theme));
|
|
30
|
+
const parentTheme = inject(inheritedThemeInjectionKey, void 0);
|
|
31
|
+
const popupVariables = computed(() => _objectSpread2(_objectSpread2({}, parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.variables.value), getThemeCSSVariables(normalizedTheme.value)));
|
|
32
|
+
const popupMode = computed(() => {
|
|
33
|
+
var _props$themeMode;
|
|
34
|
+
return (_props$themeMode = props.themeMode) !== null && _props$themeMode !== void 0 ? _props$themeMode : parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.mode.value;
|
|
35
|
+
});
|
|
36
|
+
provide(inheritedThemeInjectionKey, {
|
|
37
|
+
variables: popupVariables,
|
|
38
|
+
mode: popupMode
|
|
39
|
+
});
|
|
25
40
|
const usesLocalThemeContainer = computed(() => {
|
|
26
41
|
if (props.global) return false;
|
|
27
42
|
return Boolean(props.themeMode) || Object.keys(normalizedTheme.value.tokens).length > 0 || Object.keys(normalizedTheme.value.components).length > 0;
|
|
@@ -37,7 +52,8 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
37
52
|
let appliedThemeKeys = /* @__PURE__ */ new Set();
|
|
38
53
|
let appliedPopupThemeKeys = /* @__PURE__ */ new Set();
|
|
39
54
|
let activeTarget = null;
|
|
40
|
-
let
|
|
55
|
+
let activeTargetIsGlobal = false;
|
|
56
|
+
const globalOwner = Symbol("ThemeProvider");
|
|
41
57
|
function cleanupPopupContainer() {
|
|
42
58
|
if (!popupContainer.value) return;
|
|
43
59
|
clearThemeCSSVariables(popupContainer.value, appliedPopupThemeKeys);
|
|
@@ -54,7 +70,7 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
54
70
|
popupContainer.value = containerElement;
|
|
55
71
|
}
|
|
56
72
|
function syncPopupContainerTheme(target) {
|
|
57
|
-
var _target$closest;
|
|
73
|
+
var _popupMode$value, _target$closest;
|
|
58
74
|
if (props.global || !target || !usesLocalThemeContainer.value) {
|
|
59
75
|
cleanupPopupContainer();
|
|
60
76
|
return;
|
|
@@ -62,8 +78,8 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
62
78
|
ensurePopupContainer();
|
|
63
79
|
if (!popupContainer.value) return;
|
|
64
80
|
popupContainer.value.style.zIndex = String(zIndex.value);
|
|
65
|
-
appliedPopupThemeKeys =
|
|
66
|
-
const inheritedThemeMode = (_target$closest = target.closest("[sd-theme]")) === null || _target$closest === void 0 ? void 0 : _target$closest.getAttribute("sd-theme");
|
|
81
|
+
appliedPopupThemeKeys = applyThemeCSSVariableMap(popupContainer.value, popupVariables.value, appliedPopupThemeKeys);
|
|
82
|
+
const inheritedThemeMode = (_popupMode$value = popupMode.value) !== null && _popupMode$value !== void 0 ? _popupMode$value : (_target$closest = target.closest("[sd-theme]")) === null || _target$closest === void 0 ? void 0 : _target$closest.getAttribute("sd-theme");
|
|
67
83
|
if (inheritedThemeMode) popupContainer.value.setAttribute("sd-theme", inheritedThemeMode);
|
|
68
84
|
else popupContainer.value.removeAttribute("sd-theme");
|
|
69
85
|
}
|
|
@@ -73,22 +89,6 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
73
89
|
if (!usesLocalThemeContainer.value) return null;
|
|
74
90
|
return rootElement.value;
|
|
75
91
|
}
|
|
76
|
-
function restoreThemeMode(target) {
|
|
77
|
-
if (!props.global) {
|
|
78
|
-
if (props.themeMode) target.setAttribute("sd-theme", props.themeMode);
|
|
79
|
-
else target.removeAttribute("sd-theme");
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if (props.themeMode) {
|
|
83
|
-
target.setAttribute("sd-theme", props.themeMode);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (previousGlobalThemeMode === null) {
|
|
87
|
-
target.removeAttribute("sd-theme");
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (previousGlobalThemeMode) target.setAttribute("sd-theme", previousGlobalThemeMode);
|
|
91
|
-
}
|
|
92
92
|
function resetActiveTarget() {
|
|
93
93
|
if (!activeTarget) return;
|
|
94
94
|
cleanupTarget(activeTarget);
|
|
@@ -96,16 +96,12 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
96
96
|
}
|
|
97
97
|
function cleanupTarget(target) {
|
|
98
98
|
if (!target) return;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
else target.setAttribute("sd-theme", previousGlobalThemeMode);
|
|
105
|
-
previousGlobalThemeMode = void 0;
|
|
106
|
-
return;
|
|
99
|
+
if (activeTargetIsGlobal) releaseGlobalTheme(target, globalOwner);
|
|
100
|
+
else {
|
|
101
|
+
clearThemeCSSVariables(target, appliedThemeKeys);
|
|
102
|
+
appliedThemeKeys = /* @__PURE__ */ new Set();
|
|
103
|
+
target.removeAttribute("sd-theme");
|
|
107
104
|
}
|
|
108
|
-
target.removeAttribute("sd-theme");
|
|
109
105
|
}
|
|
110
106
|
function syncThemeTarget() {
|
|
111
107
|
const nextTarget = resolveThemeTarget();
|
|
@@ -115,14 +111,20 @@ var theme_provider_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
115
111
|
return;
|
|
116
112
|
}
|
|
117
113
|
if (activeTarget && activeTarget !== nextTarget) cleanupTarget(activeTarget);
|
|
118
|
-
if (props.global
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
if (props.global) applyGlobalTheme(nextTarget, globalOwner, normalizedTheme.value, props.themeMode);
|
|
115
|
+
else {
|
|
116
|
+
appliedThemeKeys = applyThemeCSSVariables(nextTarget, normalizedTheme.value, appliedThemeKeys);
|
|
117
|
+
if (props.themeMode) nextTarget.setAttribute("sd-theme", props.themeMode);
|
|
118
|
+
else nextTarget.removeAttribute("sd-theme");
|
|
119
|
+
}
|
|
121
120
|
activeTarget = nextTarget;
|
|
121
|
+
activeTargetIsGlobal = props.global;
|
|
122
122
|
syncPopupContainerTheme(nextTarget);
|
|
123
123
|
}
|
|
124
124
|
watch([
|
|
125
125
|
normalizedTheme,
|
|
126
|
+
popupVariables,
|
|
127
|
+
popupMode,
|
|
126
128
|
() => props.themeMode,
|
|
127
129
|
() => props.global,
|
|
128
130
|
usesLocalThemeContainer,
|
|
@@ -24,4 +24,5 @@ export declare function normalizeTheme(theme?: SdThemeConfig): SDThemeNormalized
|
|
|
24
24
|
export declare function resolveThemeToken(theme: SDThemeNormalized, componentName: string, tokenKey: string): ThemeTokenValue | undefined;
|
|
25
25
|
export declare function getThemeCSSVariables(theme: SDThemeNormalized): Record<string, string>;
|
|
26
26
|
export declare function applyThemeCSSVariables(target: HTMLElement, theme: SDThemeNormalized, previousKeys?: Set<string>): Set<string>;
|
|
27
|
+
export declare function applyThemeCSSVariableMap(target: HTMLElement, variableMap: Record<string, string>, previousKeys: Set<string>): Set<string>;
|
|
27
28
|
export declare function clearThemeCSSVariables(target: HTMLElement, keys: Set<string>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
//#region components/config-provider/theme.ts
|
|
3
3
|
var DEFAULT_THEME_META = {
|
|
4
4
|
schemaVersion: 1,
|
|
@@ -77,7 +77,9 @@ function getThemeCSSVariables(theme) {
|
|
|
77
77
|
return cssVariables;
|
|
78
78
|
}
|
|
79
79
|
function applyThemeCSSVariables(target, theme, previousKeys = /* @__PURE__ */ new Set()) {
|
|
80
|
-
|
|
80
|
+
return applyThemeCSSVariableMap(target, getThemeCSSVariables(theme), previousKeys);
|
|
81
|
+
}
|
|
82
|
+
function applyThemeCSSVariableMap(target, variableMap, previousKeys) {
|
|
81
83
|
const nextKeys = new Set(Object.keys(variableMap));
|
|
82
84
|
for (const key of previousKeys) if (!nextKeys.has(key)) target.style.removeProperty(key);
|
|
83
85
|
for (const [key, value] of Object.entries(variableMap)) target.style.setProperty(key, value);
|
|
@@ -87,4 +89,4 @@ function clearThemeCSSVariables(target, keys) {
|
|
|
87
89
|
for (const key of keys) target.style.removeProperty(key);
|
|
88
90
|
}
|
|
89
91
|
//#endregion
|
|
90
|
-
export { applyThemeCSSVariables, clearThemeCSSVariables, getThemeCSSVariables, normalizeTheme, normalizeTokenKey };
|
|
92
|
+
export { applyThemeCSSVariableMap, applyThemeCSSVariables, clearThemeCSSVariables, getThemeCSSVariables, normalizeTheme, normalizeTokenKey };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
|
-
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/asyncToGenerator.js";
|
|
5
5
|
import Tooltip from "../tooltip/index.js";
|
|
6
6
|
import Button from "../button/index.js";
|
|
7
7
|
import Link from "../link/index.js";
|
|
8
8
|
import IconCopy from "../icon/icon-copy/index.js";
|
|
9
9
|
import Message from "../message/index.js";
|
|
10
|
-
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
10
|
+
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onBeforeUnmount, onBeforeUpdate, openBlock, renderSlot, resolveDynamicComponent, shallowRef, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
11
11
|
import copy from "copy-to-clipboard";
|
|
12
12
|
//#region components/copy/copy.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
@@ -51,14 +51,12 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
51
51
|
const emit = __emit;
|
|
52
52
|
const attrs = useAttrs();
|
|
53
53
|
const slots = useSlots();
|
|
54
|
+
const hasTextSlot = shallowRef(Boolean(slots.default));
|
|
55
|
+
onBeforeUpdate(() => {
|
|
56
|
+
hasTextSlot.value = Boolean(slots.default);
|
|
57
|
+
});
|
|
54
58
|
const { t } = useI18n();
|
|
55
59
|
const prefixCls = getPrefixCls("copy");
|
|
56
|
-
const computedAriaLabel = computed(() => {
|
|
57
|
-
const consumer = attrs["aria-label"];
|
|
58
|
-
if (consumer !== void 0) return consumer;
|
|
59
|
-
if (slots.default) return void 0;
|
|
60
|
-
return mergedTooltip.value;
|
|
61
|
-
});
|
|
62
60
|
const componentMap = {
|
|
63
61
|
link: Link,
|
|
64
62
|
button: Button
|
|
@@ -82,34 +80,44 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
82
80
|
var _props$tooltipProps$c, _props$tooltipProps;
|
|
83
81
|
return _objectSpread2(_objectSpread2({}, props.tooltipProps), {}, { content: (_props$tooltipProps$c = (_props$tooltipProps = props.tooltipProps) === null || _props$tooltipProps === void 0 ? void 0 : _props$tooltipProps.content) !== null && _props$tooltipProps$c !== void 0 ? _props$tooltipProps$c : mergedTooltip.value });
|
|
84
82
|
});
|
|
83
|
+
let disposed = false;
|
|
84
|
+
onBeforeUnmount(() => {
|
|
85
|
+
disposed = true;
|
|
86
|
+
});
|
|
85
87
|
function handleCopy() {
|
|
86
88
|
return _handleCopy.apply(this, arguments);
|
|
87
89
|
}
|
|
88
90
|
function _handleCopy() {
|
|
89
91
|
_handleCopy = _asyncToGenerator(function* () {
|
|
90
92
|
if (isDisabled.value || !props.content) return;
|
|
91
|
-
|
|
93
|
+
const content = props.content;
|
|
94
|
+
const success = yield copy(content, props.clipboardProps);
|
|
95
|
+
if (disposed) return;
|
|
96
|
+
if (!success) throw new Error("[sdCopy] failed to copy content to the clipboard");
|
|
92
97
|
Message.success(mergedSuccessMessage.value);
|
|
93
|
-
emit("copy",
|
|
98
|
+
emit("copy", content);
|
|
94
99
|
});
|
|
95
100
|
return _handleCopy.apply(this, arguments);
|
|
96
101
|
}
|
|
97
102
|
return (_ctx, _cache) => {
|
|
98
103
|
return openBlock(), createBlock(unref(Tooltip), normalizeProps(guardReactiveProps(mergedTooltipProps.value)), {
|
|
99
|
-
default: withCtx(() =>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
default: withCtx(() => {
|
|
105
|
+
var _unref$ariaLabel;
|
|
106
|
+
return [(openBlock(), createBlock(resolveDynamicComponent(renderComponent.value), mergeProps(unref(attrs), {
|
|
107
|
+
disabled: isDisabled.value,
|
|
108
|
+
class: componentClass.value,
|
|
109
|
+
"aria-label": (_unref$ariaLabel = unref(attrs)["aria-label"]) !== null && _unref$ariaLabel !== void 0 ? _unref$ariaLabel : hasTextSlot.value ? void 0 : mergedTooltip.value,
|
|
110
|
+
onClick: handleCopy
|
|
111
|
+
}), {
|
|
112
|
+
icon: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(IconCopy))])]),
|
|
113
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
114
|
+
_: 3
|
|
115
|
+
}, 16, [
|
|
116
|
+
"disabled",
|
|
117
|
+
"class",
|
|
118
|
+
"aria-label"
|
|
119
|
+
]))];
|
|
120
|
+
}),
|
|
113
121
|
_: 3
|
|
114
122
|
}, 16);
|
|
115
123
|
};
|