sard 1.0.1 → 1.0.2
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 +3 -3
- package/all-components.js +2 -1
- package/components/accordion/accordion-item.js +0 -1
- package/components/accordion/accordion.js +0 -1
- package/components/accordion/index.js +0 -1
- package/components/action-sheet/action-sheet-item.js +1 -6
- package/components/action-sheet/action-sheet.js +0 -1
- package/components/action-sheet/common.d.ts +0 -1
- package/components/action-sheet/context.js +0 -1
- package/components/action-sheet/index.css +1 -1
- package/components/action-sheet/index.js +0 -1
- package/components/alert/alert.js +0 -1
- package/components/alert/index.css +1 -1
- package/components/alert/index.js +0 -1
- package/components/avatar/avatar-group.js +0 -1
- package/components/avatar/avatar.js +0 -1
- package/components/avatar/index.js +0 -1
- package/components/back-top/back-top.js +0 -1
- package/components/back-top/index.js +0 -1
- package/components/back-top/useElementBackTop.js +0 -1
- package/components/back-top/usePageBackTop.js +0 -1
- package/components/badge/badge.js +0 -1
- package/components/badge/index.js +0 -1
- package/components/barcode/barcode.js +0 -1
- package/components/barcode/index.js +0 -1
- package/components/button/button.js +0 -1
- package/components/button/index.js +0 -1
- package/components/calendar/calendar-month.js +2 -3
- package/components/calendar/calendar.js +0 -2
- package/components/calendar/index.css +1 -1
- package/components/calendar/index.js +0 -1
- package/components/calendar-input/calendar-input.js +0 -1
- package/components/calendar-input/index.js +0 -1
- package/components/calendar-popout/index.js +0 -1
- package/components/card/card.js +0 -1
- package/components/card/index.css +1 -1
- package/components/card/index.js +0 -1
- package/components/cascader/cascader.js +4 -6
- package/components/cascader/common.js +0 -1
- package/components/cascader/index.css +1 -1
- package/components/cascader/index.js +0 -1
- package/components/cascader/useCascaderTree.js +0 -1
- package/components/cascader-input/cascader-input.js +0 -2
- package/components/cascader-input/index.js +0 -1
- package/components/cascader-popout/cascader-popout.js +0 -1
- package/components/cascader-popout/index.js +0 -1
- package/components/check-icon/check-icon.js +0 -1
- package/components/checkbox/checkbox-group.js +0 -2
- package/components/checkbox/checkbox.js +0 -1
- package/components/checkbox/index.css +1 -1
- package/components/checkbox/index.js +0 -1
- package/components/checkbox-input/checkbox-input.js +0 -2
- package/components/checkbox-input/index.js +0 -1
- package/components/checkbox-popout/checkbox-popout.js +0 -2
- package/components/checkbox-popout/index.css +1 -1
- package/components/checkbox-popout/index.js +0 -1
- package/components/collapse/collapse.js +0 -1
- package/components/collapse/index.js +0 -1
- package/components/color-picker/color-picker.js +0 -2
- package/components/color-picker/index.js +0 -1
- package/components/color-picker-input/color-picker-input.js +0 -1
- package/components/color-picker-input/index.js +0 -1
- package/components/color-picker-popout/color-picker-popout.js +0 -1
- package/components/color-picker-popout/index.js +0 -1
- package/components/compact/compact.js +0 -1
- package/components/compact/index.js +0 -1
- package/components/cool-icon/cool-icon.js +0 -1
- package/components/cool-icon/index.js +0 -1
- package/components/count-down/index.js +0 -1
- package/components/count-to/count-to.js +0 -1
- package/components/count-to/index.js +0 -1
- package/components/crop-image/crop-image.js +0 -2
- package/components/crop-image/index.js +0 -1
- package/components/date-strip/date-strip.js +0 -1
- package/components/date-strip/index.css +1 -1
- package/components/date-strip/index.js +0 -1
- package/components/datetime-picker/common.js +0 -1
- package/components/datetime-picker/datetime-picker.js +0 -1
- package/components/datetime-picker/index.js +0 -1
- package/components/datetime-picker-input/datetime-picker-input.js +0 -1
- package/components/datetime-picker-input/index.js +0 -1
- package/components/datetime-picker-popout/datetime-picker-popout.js +0 -1
- package/components/datetime-picker-popout/index.js +0 -1
- package/components/datetime-range-picker/datetime-range-picker.js +0 -1
- package/components/datetime-range-picker/index.js +0 -1
- package/components/datetime-range-picker-input/datetime-range-picker-input.js +0 -1
- package/components/datetime-range-picker-input/index.js +0 -1
- package/components/datetime-range-picker-popout/datetime-range-picker-popout.js +0 -1
- package/components/datetime-range-picker-popout/index.js +0 -1
- package/components/descriptions/descriptions-item.js +0 -1
- package/components/descriptions/descriptions.js +0 -1
- package/components/descriptions/index.js +0 -1
- package/components/dialog/dialog.js +0 -1
- package/components/dialog/index.js +0 -1
- package/components/divider/divider.js +0 -1
- package/components/divider/index.js +0 -1
- package/components/dnd/dnd-handle.js +0 -2
- package/components/dnd/dnd-item.js +0 -1
- package/components/dnd/dnd.js +0 -1
- package/components/dnd/index.js +0 -1
- package/components/dropdown/dropdown-item.js +0 -2
- package/components/dropdown/dropdown.js +0 -1
- package/components/dropdown/index.js +0 -1
- package/components/ellipsis/ellipsis.js +0 -2
- package/components/ellipsis/index.js +0 -1
- package/components/empty/empty.js +0 -1
- package/components/empty/index.js +0 -1
- package/components/fab/common.d.ts +2 -2
- package/components/fab/common.js +2 -2
- package/components/fab/fab-item.js +0 -1
- package/components/fab/fab.d.ts +2 -2
- package/components/fab/fab.js +2 -4
- package/components/fab/index.js +0 -1
- package/components/floating-bubble/common.d.ts +2 -2
- package/components/floating-bubble/common.js +2 -2
- package/components/floating-bubble/floating-bubble.d.ts +2 -2
- package/components/floating-bubble/floating-bubble.js +2 -3
- package/components/floating-bubble/index.js +0 -1
- package/components/floating-bubble/useFloatingBubble.d.ts +2 -2
- package/components/floating-bubble/useFloatingBubble.js +4 -6
- package/components/floating-panel/floating-panel.js +0 -2
- package/components/floating-panel/index.js +0 -1
- package/components/form/Validator.js +0 -1
- package/components/form/form-item.js +0 -1
- package/components/form/form.js +0 -1
- package/components/form/index.css +1 -1
- package/components/form/index.js +0 -1
- package/components/form/useForm.js +0 -1
- package/components/form/useFormItem.js +0 -1
- package/components/form-plain/index.js +0 -1
- package/components/grid/grid-item.js +0 -1
- package/components/grid/grid.js +0 -1
- package/components/grid/index.css +1 -1
- package/components/grid/index.js +0 -1
- package/components/image/image.js +0 -2
- package/components/image/index.js +0 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +3 -3
- package/components/indexes/index.js +0 -1
- package/components/indexes/indexes-anchor.js +0 -1
- package/components/indexes/indexes-nav.js +0 -2
- package/components/indexes/indexes.js +0 -2
- package/components/infinite-list/common.d.ts +24 -0
- package/components/infinite-list/common.js +4 -0
- package/components/infinite-list/index.css +1 -0
- package/components/infinite-list/index.d.ts +5 -0
- package/components/infinite-list/index.js +6 -0
- package/components/infinite-list/infinite-list.d.ts +23 -0
- package/components/infinite-list/infinite-list.js +126 -0
- package/components/input/index.css +1 -1
- package/components/input/index.js +0 -1
- package/components/input/input.js +0 -2
- package/components/input/utils.js +0 -1
- package/components/keyboard/common.js +0 -1
- package/components/keyboard/index.css +1 -1
- package/components/keyboard/index.js +0 -1
- package/components/keyboard/keyboard.js +0 -1
- package/components/keyboard-popout/index.js +0 -1
- package/components/keyboard-popout/keyboard-popout.js +0 -1
- package/components/layout/col.js +0 -1
- package/components/layout/index.js +0 -1
- package/components/layout/row.js +0 -1
- package/components/list/index.js +0 -1
- package/components/list/list-item.js +0 -1
- package/components/list/list.js +0 -1
- package/components/load-more/index.js +0 -1
- package/components/load-more/load-more.js +0 -1
- package/components/load-more/useLoadMore.js +9 -6
- package/components/loading/index.js +0 -1
- package/components/loading/loading.js +0 -1
- package/components/marquee/index.js +0 -1
- package/components/marquee/marquee.js +0 -2
- package/components/menu/context.js +0 -1
- package/components/menu/index.js +0 -1
- package/components/menu/menu-item.js +0 -1
- package/components/menu/menu.js +0 -1
- package/components/motion/index.js +0 -1
- package/components/motion/motion.js +0 -1
- package/components/navbar/index.css +1 -1
- package/components/navbar/index.js +0 -1
- package/components/navbar/navbar-item.js +0 -1
- package/components/navbar/navbar.js +18 -27
- package/components/navbar-pit/index.js +0 -1
- package/components/navbar-pit/navbar-pit.js +0 -1
- package/components/notice-bar/index.js +0 -1
- package/components/notice-bar/notice-bar.js +0 -2
- package/components/notify/index.js +0 -1
- package/components/notify/notify.js +0 -2
- package/components/overlay/index.js +0 -1
- package/components/overlay/overlay.js +0 -1
- package/components/pagination/index.js +0 -1
- package/components/pagination/pagination.js +0 -1
- package/components/password-input/index.css +1 -1
- package/components/password-input/index.js +0 -1
- package/components/password-input/password-input.js +0 -1
- package/components/picker/index.css +1 -1
- package/components/picker/index.js +0 -1
- package/components/picker/picker.js +0 -2
- package/components/picker-input/index.js +0 -1
- package/components/picker-input/picker-input.js +0 -2
- package/components/picker-popout/index.js +0 -1
- package/components/picker-popout/picker-popout.js +0 -2
- package/components/picker-view/index.css +1 -1
- package/components/picker-view/index.js +0 -1
- package/components/picker-view/picker-view-column.js +0 -2
- package/components/picker-view/picker-view.js +0 -2
- package/components/popout/index.css +1 -1
- package/components/popout/index.js +0 -1
- package/components/popout/popout.js +0 -1
- package/components/popout/useFormPopout.js +0 -1
- package/components/popout-input/index.js +0 -1
- package/components/popout-input/popout-input.js +0 -2
- package/components/popout-input/usePopoutInput.js +0 -1
- package/components/popover/index.js +0 -1
- package/components/popover/popover.js +0 -2
- package/components/popup/index.js +0 -1
- package/components/popup/popup.js +0 -2
- package/components/preview-image/index.js +0 -1
- package/components/preview-image/preview-image-item.js +0 -2
- package/components/preview-image/preview-image.js +0 -2
- package/components/progress-bar/index.js +0 -1
- package/components/progress-bar/progress-bar.js +0 -1
- package/components/progress-circle/index.css +1 -1
- package/components/progress-circle/index.js +0 -1
- package/components/progress-circle/progress-circle.js +0 -1
- package/components/pull-down-refresh/index.js +0 -1
- package/components/pull-down-refresh/pull-down-refresh.js +0 -2
- package/components/puzzle-verify/index.js +0 -1
- package/components/puzzle-verify/puzzle-verify.js +0 -1
- package/components/qrcode/index.js +0 -1
- package/components/qrcode/qrcode.js +0 -2
- package/components/radio/index.css +1 -1
- package/components/radio/index.js +0 -1
- package/components/radio/radio-group.js +0 -2
- package/components/radio/radio.js +0 -1
- package/components/radio-input/index.js +0 -1
- package/components/radio-input/radio-input.js +0 -2
- package/components/radio-popout/index.css +1 -1
- package/components/radio-popout/index.js +0 -1
- package/components/radio-popout/radio-popout.js +0 -2
- package/components/rate/index.css +1 -1
- package/components/rate/index.js +0 -1
- package/components/rate/rate.js +1 -3
- package/components/read-more/index.js +0 -1
- package/components/read-more/read-more.js +0 -2
- package/components/result/index.js +0 -1
- package/components/result/result.js +0 -1
- package/components/rotate-verify/index.js +0 -1
- package/components/rotate-verify/rotate-verify.js +0 -1
- package/components/scroll-list/index.js +0 -1
- package/components/scroll-list/scroll-list.js +0 -2
- package/components/scroll-spy/index.js +0 -1
- package/components/scroll-spy/scroll-spy.js +0 -2
- package/components/search/index.js +0 -1
- package/components/search/search.js +0 -1
- package/components/segmented/index.js +0 -1
- package/components/segmented/segmented-item.js +0 -2
- package/components/segmented/segmented.js +0 -3
- package/components/select/index.js +0 -1
- package/components/select/select-option-group.js +0 -1
- package/components/select/select-option.js +0 -1
- package/components/select/select.js +0 -3
- package/components/select-input/index.js +0 -1
- package/components/select-input/select-input.js +0 -2
- package/components/select-popout/index.js +0 -1
- package/components/share-sheet/context.js +0 -1
- package/components/share-sheet/index.js +0 -1
- package/components/share-sheet/share-sheet-icon.js +0 -1
- package/components/share-sheet/share-sheet-item.js +0 -1
- package/components/share-sheet/share-sheet-row.js +0 -1
- package/components/share-sheet/share-sheet.js +0 -1
- package/components/sidebar/index.css +1 -1
- package/components/sidebar/index.js +0 -1
- package/components/sidebar/sidebar-item.js +0 -1
- package/components/sidebar/sidebar.js +0 -1
- package/components/signature/index.js +0 -1
- package/components/signature/signature.js +0 -2
- package/components/skeleton/index.css +1 -1
- package/components/skeleton/index.js +0 -1
- package/components/skeleton/skeleton-avatar.js +0 -1
- package/components/skeleton/skeleton-block.js +0 -1
- package/components/skeleton/skeleton-paragraph.js +0 -1
- package/components/skeleton/skeleton-title.js +0 -1
- package/components/skeleton/skeleton.js +0 -1
- package/components/slide-verify/index.css +1 -1
- package/components/slide-verify/index.js +0 -1
- package/components/slide-verify/slide-verify.js +0 -2
- package/components/slider/index.js +0 -1
- package/components/slider/slider.js +0 -2
- package/components/space/index.css +1 -1
- package/components/space/index.js +0 -1
- package/components/space/space.js +0 -1
- package/components/status-bar/index.js +0 -1
- package/components/status-bar/status-bar.js +0 -1
- package/components/stepper/index.js +0 -1
- package/components/stepper/stepper.js +0 -2
- package/components/steps/index.css +1 -1
- package/components/steps/index.js +0 -1
- package/components/steps/step.js +0 -1
- package/components/steps/steps.js +0 -1
- package/components/sticky/index.js +0 -1
- package/components/sticky/sticky-box.js +0 -1
- package/components/sticky/sticky.js +0 -2
- package/components/style/index.css +1 -1
- package/components/swipe-action/index.js +0 -1
- package/components/swipe-action/swipe-action-group.js +0 -1
- package/components/swipe-action/swipe-action.js +0 -2
- package/components/swiper/index.js +0 -1
- package/components/swiper/swiper-item.js +0 -1
- package/components/swiper/swiper.js +0 -1
- package/components/swiper/useSwiper.js +0 -2
- package/components/swiper/useSwiperAnimation.js +0 -1
- package/components/swiper/useSwiperAutoHeight.js +0 -1
- package/components/swiper/useSwiperAutoPlay.js +0 -1
- package/components/swiper/useSwiperData.js +0 -1
- package/components/switch/index.js +0 -1
- package/components/switch/switch.js +0 -1
- package/components/tabbar/index.js +0 -1
- package/components/tabbar/tabbar-item.js +0 -1
- package/components/tabbar/tabbar.js +0 -1
- package/components/tabbar-pit/index.js +0 -1
- package/components/tabbar-pit/tabbar-pit.js +0 -1
- package/components/table/index.css +1 -1
- package/components/table/index.js +0 -1
- package/components/table/table-col.js +0 -2
- package/components/table/table.js +0 -2
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.js +0 -1
- package/components/tabs/tab.js +0 -1
- package/components/tabs/tabs.js +0 -2
- package/components/tag/index.css +1 -1
- package/components/tag/index.js +0 -1
- package/components/tag/tag.js +0 -1
- package/components/text/index.js +0 -1
- package/components/text/text.js +0 -1
- package/components/timeline/index.js +0 -1
- package/components/timeline/timeline-item.js +0 -1
- package/components/timeline/timeline.js +0 -1
- package/components/toast/index.css +1 -1
- package/components/toast/index.js +0 -1
- package/components/toast/toast.js +0 -2
- package/components/tree/index.css +1 -1
- package/components/tree/index.js +0 -1
- package/components/tree/tree-node.js +0 -2
- package/components/tree/tree.js +1 -3
- package/components/upload/index.js +0 -1
- package/components/upload/upload-preview.js +0 -1
- package/components/upload/upload.js +0 -1
- package/components/waterfall/index.js +0 -1
- package/components/waterfall/test/SimulatedImage.js +0 -2
- package/components/waterfall/waterfall-item.js +0 -2
- package/components/waterfall/waterfall-load.js +0 -2
- package/components/waterfall/waterfall.js +0 -2
- package/components/watermark/index.js +0 -1
- package/components/watermark/watermark.js +0 -1
- package/global.d.ts +1 -0
- package/index.css +1 -1
- package/index.d.ts +2 -1
- package/index.js +3 -6
- package/locale/index.js +0 -1
- package/locale/lang/ar-SA.d.ts +7 -0
- package/locale/lang/ar-SA.js +7 -0
- package/locale/lang/bn-BD.d.ts +7 -0
- package/locale/lang/bn-BD.js +7 -0
- package/locale/lang/en-US.d.ts +7 -0
- package/locale/lang/en-US.js +7 -0
- package/locale/lang/es-ES.d.ts +7 -0
- package/locale/lang/es-ES.js +7 -0
- package/locale/lang/hi-IN.d.ts +7 -0
- package/locale/lang/hi-IN.js +7 -0
- package/locale/lang/id-ID.d.ts +7 -0
- package/locale/lang/id-ID.js +7 -0
- package/locale/lang/pt-BR.d.ts +7 -0
- package/locale/lang/pt-BR.js +7 -0
- package/locale/lang/tr-TR.d.ts +7 -0
- package/locale/lang/tr-TR.js +7 -0
- package/locale/lang/ur-PK.d.ts +7 -0
- package/locale/lang/ur-PK.js +7 -0
- package/locale/lang/vi-VN.d.ts +7 -0
- package/locale/lang/vi-VN.js +7 -0
- package/locale/lang/zh-CN.d.ts +7 -0
- package/locale/lang/zh-CN.js +7 -0
- package/package.json +2 -1
- package/use/useComposition.js +0 -1
- package/use/useDragPinch.js +0 -1
- package/use/useKeyList.js +0 -1
- package/use/useLuckyDraw.js +0 -1
- package/use/useOptionKeys.js +0 -1
- package/use/usePointerDown.js +0 -1
- package/use/usePopper.js +0 -1
- package/use/useRtl.js +0 -1
- package/use/useScrollSpy.js +0 -1
- package/use/useSimulatedClick.js +0 -1
- package/use/useSimulatedDblClick.js +0 -1
- package/use/useSimulatedPress.js +0 -1
- package/utils/index.js +0 -1
- package/utils/scroller/useScrollBinding.js +0 -1
|
@@ -2,7 +2,6 @@ import { isBoolean, isFunction, isNumber, isString } from "../../utils/is.js";
|
|
|
2
2
|
import { isEmptyValue } from "../../utils/utils.js";
|
|
3
3
|
import { chainGet } from "../../utils/object.js";
|
|
4
4
|
import { toArray } from "../../utils/array.js";
|
|
5
|
-
import "../../utils/index.js";
|
|
6
5
|
import getUrlRegexp_default from "./getUrlRegexp.js";
|
|
7
6
|
//#region packages/sard/components/form/Validator.ts
|
|
8
7
|
function getMessage(message) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { isNullish } from "../../utils/is.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { defaultFormItemProps } from "./common.js";
|
|
5
4
|
import { useFormItem } from "./useFormItem.js";
|
|
6
5
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
package/components/form/form.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import { defaultFormProps } from "./common.js";
|
|
4
3
|
import { useForm } from "./useForm.js";
|
|
5
4
|
import { computed, createElementBlock, defineComponent, mergeDefaults, normalizeClass, openBlock, renderSlot } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--s-form-bg:var(--s-bg-color-container);--s-form-
|
|
1
|
+
:root{--s-form-bg:var(--s-bg-color-container);--s-form-border-radius-card:var(--s-border-radius-lg);--s-form-item-min-height:var(--s-content-height);--s-form-item-padding-x:var(--s-content-padding-x);--s-form-item-padding-y:var(--s-content-padding-y);--s-form-item-border-color:var(--s-border-color);--s-form-item-label-width:7em;--s-form-item-label-margin-end:var(--s-size-sm);--s-form-item-label-margin-bottom:var(--s-size-2xs);--s-form-item-label-font-size:var(--s-font-size);--s-form-item-label-line-height:var(--s-line-height-normal);--s-form-item-star-font-size:var(--s-font-size);--s-form-item-star-line-height:var(--s-line-height-normal);--s-form-item-star-color:var(--s-color-danger);--s-form-item-star-gap:var(--s-size-2xs);--s-form-item-error-margin-top:var(--s-size-2xs);--s-form-item-error-font-size:var(--s-font-size-sm);--s-form-item-error-line-height:var(--s-line-height-tight);--s-form-item-error-color:var(--s-color-danger)}.s-form{background:var(--s-form-bg)}.s-form--card{border-radius:var(--s-form-border-radius-card)}.s-form-item{position:relative;display:flex;min-height:var(--s-form-item-min-height);padding:var(--s-form-item-padding-y) var(--s-form-item-padding-x)}.s-form-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.s-form-item:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.s-form-item:not(:first-child)::before{position:absolute;z-index:1;pointer-events:none;touch-action:none;opacity:1;content:"";left:0;right:0;transform:scaleY(0.5);top:0;border-top:var(--s-border-width) var(--s-border-style) var(--s-form-item-border-color);transform-origin:top center;left:var(--s-form-item-padding-x);right:var(--s-form-item-padding-x)}.s-form-item__label{flex:none;display:flex;width:var(--s-form-item-label-width);margin-inline-end:var(--s-form-item-label-margin-end);font-size:var(--s-form-item-label-font-size);line-height:var(--s-form-item-label-line-height);word-break:break-all;gap:var(--s-form-item-star-gap)}.s-form-item__star{font-size:var(--s-form-item-star-font-size);line-height:var(--s-form-item-star-line-height);color:var(--s-form-item-star-color)}.s-form-item__content{flex:1;display:flex;flex-direction:column;justify-content:center}.s-form-item__content--start{text-align:start}.s-form-item__content--end{text-align:end}.s-form-item__error{margin-top:var(--s-form-item-error-margin-top);font-size:var(--s-form-item-error-font-size);line-height:var(--s-form-item-error-line-height);color:var(--s-form-item-error-color)}.s-form-item--vertical{flex-direction:column}.s-form-item--vertical .s-form-item__label{flex:auto;width:auto;margin-inline-end:0;margin-bottom:var(--s-form-item-label-margin-bottom)}.s-form-item--align-start .s-form-item__label{justify-content:flex-start}.s-form-item--align-center .s-form-item__label{justify-content:center}.s-form-item--align-end .s-form-item__label{justify-content:flex-end}.s-form-item--valign-start .s-form-item__label{align-items:flex-start}.s-form-item--valign-center .s-form-item__label{align-items:center}.s-form-item--valign-end .s-form-item__label{align-items:flex-end}.s-form-item--star-end .s-form-item__star{order:1}.s-form-item--inlaid{padding:0;min-height:auto}.s-form-item--inlaid::before{display:none}
|
package/components/form/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { noop } from "../../utils/utils.js";
|
|
2
2
|
import { arrayEqual, toArray } from "../../utils/array.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { useTranslateWithPrefix } from "../../locale/index.js";
|
|
5
4
|
import { formContextKey } from "./common.js";
|
|
6
5
|
import { Validator } from "./Validator.js";
|
|
@@ -2,7 +2,6 @@ import { isBoolean } from "../../utils/is.js";
|
|
|
2
2
|
import { noop } from "../../utils/utils.js";
|
|
3
3
|
import { chainGet, chainSet, deepClone } from "../../utils/object.js";
|
|
4
4
|
import { toArray } from "../../utils/array.js";
|
|
5
|
-
import "../../utils/index.js";
|
|
6
5
|
import { formItemContextKey, useFormContext } from "./common.js";
|
|
7
6
|
import { computed, nextTick, onBeforeUnmount, onMounted, provide, reactive, ref, toRef, useTemplateRef, watch } from "vue";
|
|
8
7
|
//#region packages/sard/components/form/useFormItem.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import { createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
|
4
3
|
//#region packages/sard/components/grid/grid-item.vue
|
|
5
4
|
var grid_item_default = /*@__PURE__*/ defineComponent({
|
package/components/grid/grid.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { addUnit } from "../../utils/utils.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { defaultGridProps } from "./common.js";
|
|
5
4
|
import { computed, createElementBlock, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
6
5
|
//#region packages/sard/components/grid/grid.vue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--s-grid-bg:var(--s-bg-color-container);--s-grid-
|
|
1
|
+
:root{--s-grid-bg:var(--s-bg-color-container);--s-grid-bg-active:var(--s-bg-color-active);--s-grid-border-color:var(--s-border-color);--s-grid-content-padding-x:var(--s-size-xs);--s-grid-content-padding-y:var(--s-size);--s-grid-content-gap:var(--s-size-xs);--s-grid-icon-size:var(--s-size-xl);--s-grid-text-font-size:var(--s-font-size-sm);--s-grid-text-line-height:var(--s-line-height-tight);--s-grid-text-color:var(--s-text-color-primary)}.s-grid{position:relative;display:grid}.s-grid__item{position:relative}.s-grid--square .s-grid__item{aspect-ratio:1/1}.s-grid--bordered::after{position:absolute;top:0;left:0;z-index:1;width:200%;height:200%;border:var(--s-border-width) var(--s-border-style) rgba(0,0,0,0);transform:scale(0.5);transform-origin:0 0;pointer-events:none;touch-action:none;content:"";border-top-color:var(--s-grid-border-color);border-left-color:var(--s-grid-border-color)}.s-grid--bordered .s-grid__item::after{position:absolute;top:0;left:0;z-index:1;width:200%;height:200%;border:var(--s-border-width) var(--s-border-style) rgba(0,0,0,0);transform:scale(0.5);transform-origin:0 0;pointer-events:none;touch-action:none;content:"";border-bottom-color:var(--s-grid-border-color);border-right-color:var(--s-grid-border-color)}.s-grid--surround .s-grid__item::after{position:absolute;top:0;left:0;z-index:1;width:200%;height:200%;border:var(--s-border-width) var(--s-border-style) rgba(0,0,0,0);transform:scale(0.5);transform-origin:0 0;pointer-events:none;touch-action:none;content:"";border-color:var(--s-grid-border-color)}.s-grid--clickable .s-grid__content{cursor:pointer}.s-grid--clickable .s-grid__content:active{background:var(--s-grid-bg-active)}.s-grid__content{box-sizing:border-box;display:flex;justify-content:center;align-items:center;height:100%;padding-top:var(--s-grid-content-padding-y);padding-inline-end:var(--s-grid-content-padding-x);padding-bottom:var(--s-grid-content-padding-y);padding-inline-start:var(--s-grid-content-padding-x);gap:var(--s-grid-content-gap);background:var(--s-grid-bg)}.s-grid__icon{position:relative;display:flex;font-size:var(--s-grid-icon-size);line-height:1}.s-grid__text{font-size:var(--s-grid-text-font-size);line-height:var(--s-grid-text-line-height);color:var(--s-grid-text-color);text-align:center}.s-grid--vertical .s-grid__content{flex-direction:column}.s-grid--horizontal .s-grid__content{flex-direction:row}.s-grid--vertical.s-grid--reverse .s-grid__content{flex-direction:column-reverse}.s-grid--horizontal.s-grid--reverse .s-grid__content{flex-direction:row-reverse}
|
package/components/grid/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { useResizeObserver } from "../../use/useResizeObserver.js";
|
|
3
|
-
import "../../use/index.js";
|
|
4
|
-
import "../../utils/index.js";
|
|
5
3
|
import { IMAGE_MODES, defaultImageProps } from "./common.js";
|
|
6
4
|
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useSlots, useTemplateRef, watch } from "vue";
|
|
7
5
|
import { Image, ImageError } from "@sard/icons";
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -29,7 +29,6 @@ import { ColorPickerInput } from "./color-picker-input/index.js";
|
|
|
29
29
|
import { ColorPickerPopout } from "./color-picker-popout/index.js";
|
|
30
30
|
import { Compact } from "./compact/index.js";
|
|
31
31
|
import { safeAreaInsets, windowInfo } from "./config/windowInfo.js";
|
|
32
|
-
import "./config/index.js";
|
|
33
32
|
import { CoolIcon } from "./cool-icon/index.js";
|
|
34
33
|
import { formatTime, getCurrentTime, useCountDown } from "./count-down/useCountDown.js";
|
|
35
34
|
import { CountDown } from "./count-down/index.js";
|
|
@@ -60,13 +59,14 @@ import { FormItemPlain, FormPlain } from "./form-plain/index.js";
|
|
|
60
59
|
import { Grid, GridItem } from "./grid/index.js";
|
|
61
60
|
import { Image } from "./image/index.js";
|
|
62
61
|
import { Indexes, IndexesAnchor, IndexesNav } from "./indexes/index.js";
|
|
62
|
+
import { useLoadMore } from "./load-more/useLoadMore.js";
|
|
63
|
+
import { InfiniteList } from "./infinite-list/index.js";
|
|
63
64
|
import { Input } from "./input/index.js";
|
|
64
65
|
import { plateEnglishLetterKeys, plateProvinceKeys, plateSuffixKeys } from "./keyboard/common.js";
|
|
65
66
|
import { Keyboard } from "./keyboard/index.js";
|
|
66
67
|
import { KeyboardPopout } from "./keyboard-popout/index.js";
|
|
67
68
|
import { Col, Row } from "./layout/index.js";
|
|
68
69
|
import { List, ListItem } from "./list/index.js";
|
|
69
|
-
import { useLoadMore } from "./load-more/useLoadMore.js";
|
|
70
70
|
import { LoadMore } from "./load-more/index.js";
|
|
71
71
|
import { Loading } from "./loading/index.js";
|
|
72
72
|
import { Marquee } from "./marquee/index.js";
|
|
@@ -139,4 +139,4 @@ import { Tree, TreeBranch, TreeNode } from "./tree/index.js";
|
|
|
139
139
|
import { Upload, UploadPreview } from "./upload/index.js";
|
|
140
140
|
import { Waterfall, WaterfallItem, WaterfallLoad } from "./waterfall/index.js";
|
|
141
141
|
import { Watermark } from "./watermark/index.js";
|
|
142
|
-
export { ADD_SWIPER_CONTEXT_KEY, Accordion, AccordionItem, ActionSheet, ActionSheetItem, Alert, Avatar, AvatarGroup, BackTop, Badge, Barcode, Button, Calendar, CalendarInput, CalendarPopout, Card, Cascader, CascaderInput, CascaderPopout, Checkbox, CheckboxGroup, CheckboxInput, CheckboxPopout, Col, Collapse, ColorPicker, ColorPickerInput, ColorPickerPopout, Compact, CoolIcon, CountDown, CountTo, CropImage, DateStrip, DatetimePicker, DatetimePickerInput, DatetimePickerPopout, DatetimeRangePicker, DatetimeRangePickerInput, DatetimeRangePickerPopout, Descriptions, DescriptionsItem, Dialog, Divider, Dnd, DndHandle, DndItem, Dropdown, DropdownItem, Ellipsis, Empty, Fab, FabItem, FloatingBubble, FloatingPanel, Form, FormItem, FormItemPlain, FormPlain, Grid, GridItem, Image, Indexes, IndexesAnchor, IndexesNav, Input, Keyboard, KeyboardPopout, List, ListItem, LoadMore, Loading, Marquee, Menu, MenuItem, Motion, Navbar, NavbarItem, NavbarPit, NoticeBar, Notify, Overlay, Pagination, PasswordInput, Picker, PickerInput, PickerPopout, PickerView, PickerViewColumn, Popout, PopoutInput, Popover, Popup, PreviewImage, ProgressBar, ProgressCircle, PullDownRefresh, PuzzleVerify, Qrcode, REMOVE_SWIPER_CONTEXT_KEY, Radio, RadioGroup, RadioInput, RadioPopout, Rate, ReadMore, Result, RotateVerify, Row, SWIPER_AUTO_HEIGHT_KEY, ScrollList, ScrollSpy, ScrollSpyAnchor, Search, Segmented, SegmentedItem, Select, SelectInput, SelectOption, SelectOptionGroup, SelectPopout, ShareSheet, ShareSheetIcon, ShareSheetItem, ShareSheetRow, Sidebar, SidebarItem, Signature, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonParagraph, SkeletonTitle, SlideVerify, Slider, Space, StatusBar, Step, Stepper, Steps, Sticky, StickyBox, SwipeAction, SwipeActionGroup, Swiper, SwiperItem, Switch, Tab, Tabbar, TabbarItem, TabbarPit, Table, Tabs, Tag, Text, Timeline, TimelineItem, Toast, Tree, TreeBranch, TreeNode, Upload, UploadPreview, Waterfall, WaterfallItem, WaterfallLoad, Watermark, actionSheet, createActionSheet, createCropImage, createDialog, createNotify, createPreviewImage, createToast, cropImage, dialog, formatTime, getCurrentTime, notify, omitFormPopoutProps, partitionPopoutInputProps, plateEnglishLetterKeys, plateProvinceKeys, plateSuffixKeys, previewImage, safeAreaInsets, spaceSizes, toast, useCountDown, useElementBackTop, useFormContext, useFormItem, useFormItemContext, useFormPopout, useInPopup, useLoadMore, useMotioning, usePageBackTop, usePopoutInput, usePopupEnter, usePopupVisibleHookProvide, windowInfo };
|
|
142
|
+
export { ADD_SWIPER_CONTEXT_KEY, Accordion, AccordionItem, ActionSheet, ActionSheetItem, Alert, Avatar, AvatarGroup, BackTop, Badge, Barcode, Button, Calendar, CalendarInput, CalendarPopout, Card, Cascader, CascaderInput, CascaderPopout, Checkbox, CheckboxGroup, CheckboxInput, CheckboxPopout, Col, Collapse, ColorPicker, ColorPickerInput, ColorPickerPopout, Compact, CoolIcon, CountDown, CountTo, CropImage, DateStrip, DatetimePicker, DatetimePickerInput, DatetimePickerPopout, DatetimeRangePicker, DatetimeRangePickerInput, DatetimeRangePickerPopout, Descriptions, DescriptionsItem, Dialog, Divider, Dnd, DndHandle, DndItem, Dropdown, DropdownItem, Ellipsis, Empty, Fab, FabItem, FloatingBubble, FloatingPanel, Form, FormItem, FormItemPlain, FormPlain, Grid, GridItem, Image, Indexes, IndexesAnchor, IndexesNav, InfiniteList, Input, Keyboard, KeyboardPopout, List, ListItem, LoadMore, Loading, Marquee, Menu, MenuItem, Motion, Navbar, NavbarItem, NavbarPit, NoticeBar, Notify, Overlay, Pagination, PasswordInput, Picker, PickerInput, PickerPopout, PickerView, PickerViewColumn, Popout, PopoutInput, Popover, Popup, PreviewImage, ProgressBar, ProgressCircle, PullDownRefresh, PuzzleVerify, Qrcode, REMOVE_SWIPER_CONTEXT_KEY, Radio, RadioGroup, RadioInput, RadioPopout, Rate, ReadMore, Result, RotateVerify, Row, SWIPER_AUTO_HEIGHT_KEY, ScrollList, ScrollSpy, ScrollSpyAnchor, Search, Segmented, SegmentedItem, Select, SelectInput, SelectOption, SelectOptionGroup, SelectPopout, ShareSheet, ShareSheetIcon, ShareSheetItem, ShareSheetRow, Sidebar, SidebarItem, Signature, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonParagraph, SkeletonTitle, SlideVerify, Slider, Space, StatusBar, Step, Stepper, Steps, Sticky, StickyBox, SwipeAction, SwipeActionGroup, Swiper, SwiperItem, Switch, Tab, Tabbar, TabbarItem, TabbarPit, Table, Tabs, Tag, Text, Timeline, TimelineItem, Toast, Tree, TreeBranch, TreeNode, Upload, UploadPreview, Waterfall, WaterfallItem, WaterfallLoad, Watermark, actionSheet, createActionSheet, createCropImage, createDialog, createNotify, createPreviewImage, createToast, cropImage, dialog, formatTime, getCurrentTime, notify, omitFormPopoutProps, partitionPopoutInputProps, plateEnglishLetterKeys, plateProvinceKeys, plateSuffixKeys, previewImage, safeAreaInsets, spaceSizes, toast, useCountDown, useElementBackTop, useFormContext, useFormItem, useFormItemContext, useFormPopout, useInPopup, useLoadMore, useMotioning, usePageBackTop, usePopoutInput, usePopupEnter, usePopupVisibleHookProvide, windowInfo };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { isNullish } from "../../utils/is.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { indexesContextKey } from "./common.js";
|
|
5
4
|
import { createElementBlock, createTextVNode, defineComponent, inject, normalizeClass, onBeforeMount, openBlock, renderSlot, toDisplayString, unref, useTemplateRef } from "vue";
|
|
6
5
|
//#region packages/sard/components/indexes/indexes-anchor.vue
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { createBem, cssVarName } from "../../utils/bem.js";
|
|
2
2
|
import { clamp } from "../../utils/number.js";
|
|
3
3
|
import { usePointerDown } from "../../use/usePointerDown.js";
|
|
4
|
-
import "../../use/index.js";
|
|
5
|
-
import "../../utils/index.js";
|
|
6
4
|
import motion_default from "../motion/motion.js";
|
|
7
5
|
import { Fragment, computed, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, useModel, useTemplateRef, vShow, withCtx, withDirectives, withModifiers } from "vue";
|
|
8
6
|
//#region packages/sard/components/indexes/indexes-nav.vue
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { isNullish } from "../../utils/is.js";
|
|
3
3
|
import { useScrollSpy } from "../../use/useScrollSpy.js";
|
|
4
|
-
import "../../use/index.js";
|
|
5
|
-
import "../../utils/index.js";
|
|
6
4
|
import { defaultIndexesProps, indexesContextKey } from "./common.js";
|
|
7
5
|
import indexes_nav_default from "./indexes-nav.js";
|
|
8
6
|
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, isRef, mergeDefaults, normalizeClass, openBlock, provide, renderSlot, unref, useTemplateRef, watch } from "vue";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DefaultProps } from '../config';
|
|
2
|
+
import type { LoadMoreStatus } from '../load-more/common';
|
|
3
|
+
import type { PullDownRefreshSlots } from '../pull-down-refresh/common';
|
|
4
|
+
export interface InfiniteListProps {
|
|
5
|
+
request: (page: number, isRefresh: boolean) => Promise<boolean>;
|
|
6
|
+
hideLoadMore?: boolean;
|
|
7
|
+
refreshable?: boolean;
|
|
8
|
+
doneDuration?: number;
|
|
9
|
+
rootMargin?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultInfiniteListProps: DefaultProps<InfiniteListProps>;
|
|
12
|
+
export interface InfiniteListSlots extends Omit<PullDownRefreshSlots, 'default'> {
|
|
13
|
+
default?(props: {
|
|
14
|
+
status: LoadMoreStatus;
|
|
15
|
+
refresh: () => void;
|
|
16
|
+
}): any;
|
|
17
|
+
}
|
|
18
|
+
export interface InfiniteListEmits {
|
|
19
|
+
(e: 'refresh-success'): void;
|
|
20
|
+
(e: 'refresh-error'): void;
|
|
21
|
+
}
|
|
22
|
+
export interface InfiniteListExpose {
|
|
23
|
+
refresh: () => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.s-infinite-list{overflow-x:hidden;overflow-y:auto}.s-infinite-list .s-pull-down-refresh{display:flow-root;min-height:100%}.s-infinite-list__load-more:is(.is-hidden){visibility:hidden;pointer-events:none}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type EnhancedComponent } from '../../utils';
|
|
2
|
+
import _InfiniteList from './infinite-list.vue';
|
|
3
|
+
export declare const InfiniteList: EnhancedComponent<typeof _InfiniteList>;
|
|
4
|
+
export default InfiniteList;
|
|
5
|
+
export type { InfiniteListProps, InfiniteListSlots, InfiniteListEmits, InfiniteListExpose, } from './common';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
+
import infinite_list_default from "./infinite-list.js";
|
|
3
|
+
//#region packages/sard/components/infinite-list/index.ts
|
|
4
|
+
const InfiniteList = enhanceComponent(infinite_list_default);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { InfiniteList, InfiniteList as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type InfiniteListProps, type InfiniteListSlots, type InfiniteListExpose } from './common';
|
|
2
|
+
type __VLS_Slots = InfiniteListSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<InfiniteListProps, InfiniteListExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
"refresh-success": () => any;
|
|
5
|
+
"refresh-error": () => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<InfiniteListProps> & Readonly<{
|
|
7
|
+
"onRefresh-success"?: (() => any) | undefined;
|
|
8
|
+
"onRefresh-error"?: (() => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
rootMargin: string;
|
|
11
|
+
doneDuration: number;
|
|
12
|
+
request: (page: number, isRefresh: boolean) => Promise<boolean>;
|
|
13
|
+
hideLoadMore: boolean;
|
|
14
|
+
refreshable: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createBem } from "../../utils/bem.js";
|
|
2
|
+
import loading_default from "../loading/loading.js";
|
|
3
|
+
import { useTranslateWithPrefix } from "../../locale/index.js";
|
|
4
|
+
import { defaultInfiniteListProps } from "./common.js";
|
|
5
|
+
import pull_down_refresh_default from "../pull-down-refresh/pull-down-refresh.js";
|
|
6
|
+
import load_more_default from "../load-more/load-more.js";
|
|
7
|
+
import { useLoadMore } from "../load-more/useLoadMore.js";
|
|
8
|
+
import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeDefaults, normalizeClass, normalizeProps, openBlock, ref, renderSlot, toDisplayString, unref, useTemplateRef, withCtx } from "vue";
|
|
9
|
+
//#region packages/sard/components/infinite-list/infinite-list.vue
|
|
10
|
+
var infinite_list_default = /*@__PURE__*/ defineComponent({
|
|
11
|
+
__name: "infinite-list",
|
|
12
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
13
|
+
request: {
|
|
14
|
+
type: Function,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
hideLoadMore: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
refreshable: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
doneDuration: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
rootMargin: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
}, defaultInfiniteListProps),
|
|
34
|
+
emits: ["refresh-success", "refresh-error"],
|
|
35
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
36
|
+
const props = __props;
|
|
37
|
+
const emit = __emit;
|
|
38
|
+
const bem = createBem("infinite-list");
|
|
39
|
+
const { t } = useTranslateWithPrefix("pullDownRefresh");
|
|
40
|
+
const doneText = ref("");
|
|
41
|
+
const scrollRef = useTemplateRef("scroll");
|
|
42
|
+
const pullDownRefresh = useTemplateRef("pull-down-refresh");
|
|
43
|
+
const onScroll = () => {
|
|
44
|
+
pullDownRefresh.value?.enableToRefresh(scrollRef.value.scrollTop === 0);
|
|
45
|
+
};
|
|
46
|
+
const onRefresh = () => {
|
|
47
|
+
refresh().then(() => {
|
|
48
|
+
doneText.value = t("doneSuccess");
|
|
49
|
+
emit("refresh-success");
|
|
50
|
+
}).catch(() => {
|
|
51
|
+
doneText.value = t("doneFail");
|
|
52
|
+
emit("refresh-error");
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const { status, isLoading, isRefreshing, onLoadMore, onReload, refresh } = useLoadMore({
|
|
56
|
+
root: scrollRef,
|
|
57
|
+
target: useTemplateRef("load-more"),
|
|
58
|
+
rootMargin: () => props.rootMargin,
|
|
59
|
+
request: async (page, isRefresh) => {
|
|
60
|
+
return props.request(page, isRefresh);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
__expose({ refresh });
|
|
64
|
+
return (_ctx, _cache) => {
|
|
65
|
+
return openBlock(), createElementBlock("div", {
|
|
66
|
+
ref: "scroll",
|
|
67
|
+
class: normalizeClass(unref(bem).b()),
|
|
68
|
+
onScroll
|
|
69
|
+
}, [createVNode(pull_down_refresh_default, {
|
|
70
|
+
ref: "pull-down-refresh",
|
|
71
|
+
loading: unref(isRefreshing),
|
|
72
|
+
disabled: !__props.refreshable || unref(isLoading),
|
|
73
|
+
"done-duration": __props.doneDuration,
|
|
74
|
+
onRefresh
|
|
75
|
+
}, {
|
|
76
|
+
unready: withCtx((slotsProps) => [renderSlot(_ctx.$slots, "unready", normalizeProps(guardReactiveProps(slotsProps)), () => [createVNode(loading_default, {
|
|
77
|
+
type: "clock",
|
|
78
|
+
size: "18px",
|
|
79
|
+
animated: false,
|
|
80
|
+
progress: slotsProps.progress
|
|
81
|
+
}, {
|
|
82
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("unready")), 1)]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["progress"])])]),
|
|
85
|
+
ready: withCtx(() => [renderSlot(_ctx.$slots, "ready", {}, () => [createVNode(loading_default, {
|
|
86
|
+
type: "clock",
|
|
87
|
+
size: "18px",
|
|
88
|
+
animated: false
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("ready")), 1)]),
|
|
91
|
+
_: 1
|
|
92
|
+
})])]),
|
|
93
|
+
loading: withCtx(() => [renderSlot(_ctx.$slots, "loading", {}, () => [createVNode(loading_default, {
|
|
94
|
+
type: "clock",
|
|
95
|
+
size: "18px"
|
|
96
|
+
}, {
|
|
97
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("loading")), 1)]),
|
|
98
|
+
_: 1
|
|
99
|
+
})])]),
|
|
100
|
+
done: withCtx(() => [renderSlot(_ctx.$slots, "done", {}, () => [createTextVNode(toDisplayString(doneText.value), 1)])]),
|
|
101
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
102
|
+
status: unref(status),
|
|
103
|
+
refresh: unref(refresh)
|
|
104
|
+
}), createElementVNode("div", {
|
|
105
|
+
ref: "load-more",
|
|
106
|
+
class: normalizeClass([unref(bem).e("load-more"), unref(bem).is("hidden", __props.hideLoadMore)])
|
|
107
|
+
}, [createVNode(load_more_default, {
|
|
108
|
+
status: unref(status),
|
|
109
|
+
onLoadMore: unref(onLoadMore),
|
|
110
|
+
onReload: unref(onReload)
|
|
111
|
+
}, null, 8, [
|
|
112
|
+
"status",
|
|
113
|
+
"onLoadMore",
|
|
114
|
+
"onReload"
|
|
115
|
+
])], 2)]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 8, [
|
|
118
|
+
"loading",
|
|
119
|
+
"disabled",
|
|
120
|
+
"done-duration"
|
|
121
|
+
])], 34);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
export { infinite_list_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--s-input-padding-y:5px;--s-input-padding-y-borderless:6px;--s-input-padding-x:var(--s-size-sm);--s-input-gap:var(--s-size-xs);--s-input-radius:var(--s-border-radius);--s-input-border-color:var(--s-border-color);--s-input-border-color-focused:var(--s-color-primary);--s-input-
|
|
1
|
+
:root{--s-input-padding-y:5px;--s-input-padding-y-borderless:6px;--s-input-padding-x:var(--s-size-sm);--s-input-gap:var(--s-size-xs);--s-input-border-radius:var(--s-border-radius);--s-input-border-color:var(--s-border-color);--s-input-border-color-focused:var(--s-color-primary);--s-input-bg:rgba(0,0,0,0);--s-input-bg-disabled:var(--s-bg-color-disabled);--s-input-duration:var(--s-duration);--s-input-control-height:24px;--s-input-control-font-size:var(--s-font-size);--s-input-control-line-height:var(--s-line-height-normal);--s-input-control-color-disabled:var(--s-text-color-disabled);--s-input-placeholder-color:var(--s-text-color-fourth);--s-input-append-gap:var(--s-size-xs);--s-input-clear-font-size:var(--s-size);--s-input-clear-color:var(--s-text-color-fourth);--s-input-eye-font-size:var(--s-size);--s-input-eye-color:var(--s-text-color-fourth);--s-input-count-font-size:var(--s-font-size-sm);--s-input-count-line-height:var(--s-line-height-tight);--s-input-count-color:var(--s-text-color-tertiary);--s-input-count-margin-top:var(--s-size-2xs)}.s-input{position:relative;display:flex;align-items:center;gap:var(--s-input-gap);padding:var(--s-input-padding-y) var(--s-input-padding-x);border:1px solid var(--s-input-border-color);border-radius:var(--s-input-border-radius);font-size:var(--s-input-control-font-size);line-height:var(--s-input-control-line-height);transition:var(--s-input-duration)}.s-input--borderless{padding-top:var(--s-input-padding-y-borderless);padding-bottom:var(--s-input-padding-y-borderless);border-width:0}.s-input--inlaid{padding:0;border-width:0}.s-input--inlaid .s-input__tools{min-width:0;margin-inline-end:0}.s-input--inlaid .s-input__append{margin-inline-end:0}.s-input:is(.is-focused){border-color:var(--s-input-border-color-focused);z-index:1}.s-input:is(.is-disabled){background:var(--s-input-bg-disabled)}.s-input__control{flex:1;width:100%;max-width:100%;min-width:0;margin:0;padding:0;border-width:0;font-size:inherit;line-height:inherit;background:var(--s-input-bg);appearance:none;outline:none;text-align:inherit;color:inherit}.s-input__control:is(input){height:var(--s-input-control-height)}.s-input__control:is(input)::-ms-reveal{display:none}.s-input__control:is(input)::-webkit-search-cancel-button{display:none}.s-input__control:is(textarea){min-height:var(--s-input-control-height);resize:none}.s-input__control::placeholder{color:var(--s-input-placeholder-color)}.s-input__prepend,.s-input__append{display:flex;align-items:center;align-self:stretch;flex:none;line-height:1}.s-input__append{gap:var(--s-input-append-gap)}.s-input__clear{position:relative;z-index:2;display:flex;align-self:stretch;justify-content:center;align-items:center;font-size:var(--s-input-clear-font-size);color:var(--s-input-clear-color);cursor:pointer}.s-input__clear::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transform:scale(1.5, 1)}.s-input__eye{position:relative;display:flex;align-self:stretch;justify-content:center;align-items:center;font-size:var(--s-input-eye-font-size);color:var(--s-input-eye-color);cursor:pointer}.s-input__eye::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transform:scale(1.5, 1)}.s-input__count{display:flex;align-items:center;font-size:var(--s-input-count-font-size);line-height:var(--s-input-count-line-height);color:var(--s-input-count-color);white-space:nowrap;pointer-events:none}.s-input--textarea .s-input__count{position:absolute;top:100%;margin-top:var(--s-input-count-margin-top);inset-inline-end:0}.s-input:is(.is-disabled) .s-input__control{color:var(--s-input-control-color-disabled)}.s-input:is(.is-readonly) .s-input__control{pointer-events:none}.s-input--compact-horizontal{width:auto;flex:0 1 auto}.s-input--compact-horizontal:not(:first-child){margin-inline-start:-1px}:root:not([dir=rtl]) .s-input--compact-horizontal:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}:root[dir=rtl] .s-input--compact-horizontal:not(:first-child){border-top-right-radius:0;border-bottom-right-radius:0}:root:not([dir=rtl]) .s-input--compact-horizontal:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}:root[dir=rtl] .s-input--compact-horizontal:not(:last-child){border-top-left-radius:0;border-bottom-left-radius:0}.s-input--compact-block{flex:1 1 auto}
|
|
@@ -4,8 +4,6 @@ import { isNullish } from "../../utils/is.js";
|
|
|
4
4
|
import { usePointerDown } from "../../use/usePointerDown.js";
|
|
5
5
|
import { useSimulatedClick } from "../../use/useSimulatedClick.js";
|
|
6
6
|
import { useComposition } from "../../use/useComposition.js";
|
|
7
|
-
import "../../use/index.js";
|
|
8
|
-
import "../../utils/index.js";
|
|
9
7
|
import { useFormContext, useFormItemContext } from "../form/common.js";
|
|
10
8
|
import { compactContextKey } from "../compact/common.js";
|
|
11
9
|
import { defaultInputProps } from "./common.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--s-keyboard-bg:var(--s-gray-200);--s-keyboard-padding:6px;--s-keyboard-key-gap:6px;--s-keyboard-key-color:var(--s-text-color-primary);--s-keyboard-key-bg:var(--s-white);--s-keyboard-key-bg-active:var(--s-gray-300);--s-keyboard-key-height:var(--s-size-4xl);--s-keyboard-key-radius:var(--s-border-radius);--s-keyboard-key-font-size:var(--s-font-size-xl);--s-keyboard-key-plate-height:var(--s-size-3xl);--s-keyboard-key-plate-radius:var(--s-border-radius-sm);--s-keyboard-key-plate-font-size:var(--s-font-size);--s-keyboard-key-plate-backspace-font-size:var(--s-size);--s-keyboard-key-plate-bg:var(--s-gray-300);--s-keyboard-key-plate-bg-active:var(--s-gray-400)}.dark{--s-keyboard-bg:var(--s-gray-800);--s-keyboard-key-color:var(--s-white);--s-keyboard-key-bg:var(--s-gray-600);--s-keyboard-key-bg-active:var(--s-gray-500);--s-keyboard-key-plate-bg:var(--s-gray-600);--s-keyboard-key-plate-bg-active:var(--s-gray-500)}.s-keyboard{display:grid;gap:var(--s-keyboard-key-gap);padding:var(--s-keyboard-padding);background:var(--s-keyboard-bg)}.s-keyboard--number,.s-keyboard--digit,.s-keyboard--idcard,.s-keyboard--random{grid-template-columns:repeat(3, 1fr)}.s-keyboard--number .s-keyboard__key:nth-child(10),.s-keyboard--random .s-keyboard__key:nth-child(10){grid-column:1/3}.s-keyboard__key{
|
|
1
|
+
:root{--s-keyboard-bg:var(--s-gray-200);--s-keyboard-padding:6px;--s-keyboard-key-gap:6px;--s-keyboard-key-color:var(--s-text-color-primary);--s-keyboard-key-bg:var(--s-white);--s-keyboard-key-bg-active:var(--s-gray-300);--s-keyboard-key-height:var(--s-size-4xl);--s-keyboard-key-radius:var(--s-border-radius);--s-keyboard-key-font-size:var(--s-font-size-xl);--s-keyboard-key-plate-height:var(--s-size-3xl);--s-keyboard-key-plate-radius:var(--s-border-radius-sm);--s-keyboard-key-plate-font-size:var(--s-font-size);--s-keyboard-key-plate-backspace-font-size:var(--s-size);--s-keyboard-key-plate-bg:var(--s-gray-300);--s-keyboard-key-plate-bg-active:var(--s-gray-400)}.dark{--s-keyboard-bg:var(--s-gray-800);--s-keyboard-key-color:var(--s-white);--s-keyboard-key-bg:var(--s-gray-600);--s-keyboard-key-bg-active:var(--s-gray-500);--s-keyboard-key-plate-bg:var(--s-gray-600);--s-keyboard-key-plate-bg-active:var(--s-gray-500)}.s-keyboard{display:grid;gap:var(--s-keyboard-key-gap);padding:var(--s-keyboard-padding);background:var(--s-keyboard-bg)}.s-keyboard--number,.s-keyboard--digit,.s-keyboard--idcard,.s-keyboard--random{grid-template-columns:repeat(3, 1fr)}.s-keyboard--number .s-keyboard__key:nth-child(10),.s-keyboard--random .s-keyboard__key:nth-child(10){grid-column:1/3}.s-keyboard__key{display:flex;align-items:center;justify-content:center;height:var(--s-keyboard-key-height);border-radius:var(--s-keyboard-key-radius);font-size:var(--s-keyboard-key-font-size);color:var(--s-keyboard-key-color);background:var(--s-keyboard-key-bg);cursor:pointer;-webkit-user-select:none;user-select:none}.s-keyboard__key:active{background:var(--s-keyboard-key-bg-active)}.s-keyboard__key:is(.is-disabled){opacity:.4;pointer-events:none}.s-keyboard--plate{grid-template-columns:repeat(20, 1fr)}.s-keyboard--plate .s-keyboard__key{grid-column:span 2;height:var(--s-keyboard-key-plate-height);border-radius:var(--s-keyboard-key-plate-radius);font-size:var(--s-keyboard-key-plate-font-size)}.s-keyboard--plate .s-keyboard__key--A{grid-column:2/4}.s-keyboard--plate .s-keyboard__key--I,.s-keyboard--plate .s-keyboard__key--O{opacity:.4;pointer-events:none}.s-keyboard--plate .s-keyboard__key--backspace,.s-keyboard--plate .s-keyboard__key--toggle{grid-column:span 3;background:var(--s-keyboard-key-plate-bg)}.s-keyboard--plate .s-keyboard__key--backspace:active,.s-keyboard--plate .s-keyboard__key--toggle:active{background:var(--s-keyboard-key-plate-bg-active)}.s-keyboard--plate .s-keyboard__key--backspace{font-size:var(--s-keyboard-key-plate-backspace-font-size)}:root[dir=rtl] .s-keyboard__delete-icon{transform:rotateY(180deg)}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import { plateEnglishLetterKeys, plateProvinceKeys, plateSuffixKeys } from "./common.js";
|
|
4
3
|
import keyboard_default from "./keyboard.js";
|
|
5
4
|
//#region packages/sard/components/keyboard/index.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import { chineseKeys, defaultKeyboardProps, digitKeys, englishKeys, getRandomKeys, idcardKeys, numberKeys } from "./common.js";
|
|
4
3
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, useModel, watch } from "vue";
|
|
5
4
|
import { Backspace } from "@sard/icons";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import keyboard_popout_default from "./keyboard-popout.js";
|
|
4
3
|
//#region packages/sard/components/keyboard-popout/index.ts
|
|
5
4
|
const KeyboardPopout = enhanceComponent(keyboard_popout_default);
|
package/components/layout/col.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import "../../utils/index.js";
|
|
3
2
|
import { rowSymbol } from "./common.js";
|
|
4
3
|
import { computed, createElementBlock, defineComponent, inject, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
5
4
|
//#region packages/sard/components/layout/col.vue
|
package/components/layout/row.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { splitUnit } from "../../utils/utils.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { mapAlign, mapJustify, rowSymbol } from "./common.js";
|
|
5
4
|
import { computed, createElementBlock, defineComponent, normalizeClass, normalizeStyle, openBlock, provide, reactive, renderSlot, toRef, unref } from "vue";
|
|
6
5
|
//#region packages/sard/components/layout/row.vue
|
package/components/list/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { isRenderVisible } from "../../utils/utils.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { defaultListItemProps, listContextKey } from "./common.js";
|
|
5
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, mergeDefaults, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
|
6
5
|
import { Down, Right, Up } from "@sard/icons";
|
package/components/list/list.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { isRenderVisible } from "../../utils/utils.js";
|
|
3
|
-
import "../../utils/index.js";
|
|
4
3
|
import { listContextKey } from "./common.js";
|
|
5
4
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, provide, reactive, renderSlot, toDisplayString, toRef, unref, useSlots } from "vue";
|
|
6
5
|
//#region packages/sard/components/list/list.vue
|