sard 1.2.1 → 1.2.3
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 +1 -1
- package/components/accordion/style.d.ts +3 -0
- package/components/accordion/style.js +3 -0
- package/components/action-sheet/style.d.ts +6 -0
- package/components/action-sheet/style.js +6 -0
- package/components/alert/style.d.ts +2 -0
- package/components/alert/style.js +2 -0
- package/components/avatar/style.d.ts +2 -0
- package/components/avatar/style.js +2 -0
- package/components/back-top/style.d.ts +2 -0
- package/components/back-top/style.js +2 -0
- package/components/badge/style.d.ts +2 -0
- package/components/badge/style.js +2 -0
- package/components/barcode/style.d.ts +2 -0
- package/components/barcode/style.js +2 -0
- package/components/button/style.d.ts +3 -0
- package/components/button/style.js +3 -0
- package/components/calendar/style.d.ts +10 -0
- package/components/calendar/style.js +10 -0
- package/components/calendar-input/style.d.ts +12 -0
- package/components/calendar-input/style.js +12 -0
- package/components/calendar-popout/style.d.ts +10 -0
- package/components/calendar-popout/style.js +10 -0
- package/components/card/style.d.ts +5 -0
- package/components/card/style.js +5 -0
- package/components/cascader/style.d.ts +6 -0
- package/components/cascader/style.js +6 -0
- package/components/cascader-input/style.d.ts +13 -0
- package/components/cascader-input/style.js +13 -0
- package/components/cascader-popout/style.d.ts +11 -0
- package/components/cascader-popout/style.js +11 -0
- package/components/check-icon/style.d.ts +2 -0
- package/components/check-icon/style.js +2 -0
- package/components/checkbox/style.d.ts +3 -0
- package/components/checkbox/style.js +3 -0
- package/components/checkbox-input/style.d.ts +13 -0
- package/components/checkbox-input/style.js +13 -0
- package/components/checkbox-popout/style.d.ts +12 -0
- package/components/checkbox-popout/style.js +12 -0
- package/components/collapse/style.d.ts +2 -0
- package/components/collapse/style.js +2 -0
- package/components/color-picker/style.d.ts +5 -0
- package/components/color-picker/style.js +5 -0
- package/components/color-picker-input/style.d.ts +14 -0
- package/components/color-picker-input/style.js +14 -0
- package/components/color-picker-popout/style.d.ts +11 -0
- package/components/color-picker-popout/style.js +11 -0
- package/components/compact/style.d.ts +2 -0
- package/components/compact/style.js +2 -0
- package/components/cool-icon/style.d.ts +2 -0
- package/components/cool-icon/style.js +2 -0
- package/components/count-down/style.d.ts +2 -0
- package/components/count-down/style.js +2 -0
- package/components/crop-image/style.d.ts +7 -0
- package/components/crop-image/style.js +7 -0
- package/components/danmaku/style.d.ts +2 -0
- package/components/danmaku/style.js +2 -0
- package/components/date-strip/style.d.ts +2 -0
- package/components/date-strip/style.js +2 -0
- package/components/datetime-picker/style.d.ts +3 -0
- package/components/datetime-picker/style.js +3 -0
- package/components/datetime-picker-input/style.d.ts +11 -0
- package/components/datetime-picker-input/style.js +11 -0
- package/components/datetime-picker-popout/style.d.ts +9 -0
- package/components/datetime-picker-popout/style.js +9 -0
- package/components/datetime-range-picker/style.d.ts +5 -0
- package/components/datetime-range-picker/style.js +5 -0
- package/components/datetime-range-picker-input/style.d.ts +13 -0
- package/components/datetime-range-picker-input/style.js +13 -0
- package/components/datetime-range-picker-popout/style.d.ts +11 -0
- package/components/datetime-range-picker-popout/style.js +11 -0
- package/components/descriptions/style.d.ts +2 -0
- package/components/descriptions/style.js +2 -0
- package/components/dialog/style.d.ts +7 -0
- package/components/dialog/style.js +7 -0
- package/components/divider/style.d.ts +2 -0
- package/components/divider/style.js +2 -0
- package/components/dnd/style.d.ts +2 -0
- package/components/dnd/style.js +2 -0
- package/components/dropdown/style.d.ts +5 -0
- package/components/dropdown/style.js +5 -0
- package/components/ellipsis/ellipsis.vue.js +12 -16
- package/components/ellipsis/style.d.ts +2 -0
- package/components/ellipsis/style.js +2 -0
- package/components/empty/style.d.ts +2 -0
- package/components/empty/style.js +2 -0
- package/components/fab/style.d.ts +4 -0
- package/components/fab/style.js +4 -0
- package/components/flex/style.d.ts +2 -0
- package/components/flex/style.js +2 -0
- package/components/floating-bubble/style.d.ts +2 -0
- package/components/floating-bubble/style.js +2 -0
- package/components/floating-panel/style.d.ts +2 -0
- package/components/floating-panel/style.js +2 -0
- package/components/form/style.d.ts +2 -0
- package/components/form/style.js +2 -0
- package/components/grid/style.d.ts +2 -0
- package/components/grid/style.js +2 -0
- package/components/image/style.d.ts +2 -0
- package/components/image/style.js +2 -0
- package/components/indexes/style.d.ts +3 -0
- package/components/indexes/style.js +3 -0
- package/components/infinite-list/style.d.ts +5 -0
- package/components/infinite-list/style.js +5 -0
- package/components/input/style.d.ts +2 -0
- package/components/input/style.js +2 -0
- package/components/keyboard/style.d.ts +2 -0
- package/components/keyboard/style.js +2 -0
- package/components/keyboard-popout/style.d.ts +9 -0
- package/components/keyboard-popout/style.js +9 -0
- package/components/layout/style.d.ts +2 -0
- package/components/layout/style.js +2 -0
- package/components/list/style.d.ts +2 -0
- package/components/list/style.js +2 -0
- package/components/load-more/style.d.ts +3 -0
- package/components/load-more/style.js +3 -0
- package/components/loading/style.d.ts +2 -0
- package/components/loading/style.js +2 -0
- package/components/marquee/style.d.ts +2 -0
- package/components/marquee/style.js +2 -0
- package/components/menu/style.d.ts +2 -0
- package/components/menu/style.js +2 -0
- package/components/motion/style.d.ts +2 -0
- package/components/motion/style.js +2 -0
- package/components/navbar/style.d.ts +4 -0
- package/components/navbar/style.js +4 -0
- package/components/navbar-pit/style.d.ts +3 -0
- package/components/navbar-pit/style.js +3 -0
- package/components/notice-bar/style.d.ts +2 -0
- package/components/notice-bar/style.js +2 -0
- package/components/notify/style.d.ts +6 -0
- package/components/notify/style.js +6 -0
- package/components/overlay/style.d.ts +3 -0
- package/components/overlay/style.js +3 -0
- package/components/pagination/style.d.ts +2 -0
- package/components/pagination/style.js +2 -0
- package/components/password-input/style.d.ts +2 -0
- package/components/password-input/style.js +2 -0
- package/components/picker/style.d.ts +3 -0
- package/components/picker/style.js +3 -0
- package/components/picker-input/style.d.ts +11 -0
- package/components/picker-input/style.js +11 -0
- package/components/picker-popout/style.d.ts +9 -0
- package/components/picker-popout/style.js +9 -0
- package/components/picker-view/style.d.ts +2 -0
- package/components/picker-view/style.js +2 -0
- package/components/popout/style.d.ts +7 -0
- package/components/popout/style.js +7 -0
- package/components/popout-input/style.d.ts +4 -0
- package/components/popout-input/style.js +4 -0
- package/components/popover/style.d.ts +3 -0
- package/components/popover/style.js +3 -0
- package/components/popup/style.d.ts +4 -0
- package/components/popup/style.js +4 -0
- package/components/preview-image/style.d.ts +6 -0
- package/components/preview-image/style.js +6 -0
- package/components/progress-bar/style.d.ts +2 -0
- package/components/progress-bar/style.js +2 -0
- package/components/progress-circle/style.d.ts +2 -0
- package/components/progress-circle/style.js +2 -0
- package/components/pull-down-refresh/style.d.ts +3 -0
- package/components/pull-down-refresh/style.js +3 -0
- package/components/puzzle-verify/style.d.ts +4 -0
- package/components/puzzle-verify/style.js +4 -0
- package/components/qrcode/style.d.ts +2 -0
- package/components/qrcode/style.js +2 -0
- package/components/radio/style.d.ts +3 -0
- package/components/radio/style.js +3 -0
- package/components/radio-input/style.d.ts +13 -0
- package/components/radio-input/style.js +13 -0
- package/components/radio-popout/style.d.ts +12 -0
- package/components/radio-popout/style.js +12 -0
- package/components/rate/style.d.ts +2 -0
- package/components/rate/style.js +2 -0
- package/components/read-more/style.d.ts +4 -0
- package/components/read-more/style.js +4 -0
- package/components/result/style.d.ts +2 -0
- package/components/result/style.js +2 -0
- package/components/rotate-verify/style.d.ts +4 -0
- package/components/rotate-verify/style.js +4 -0
- package/components/scroll-list/style.d.ts +2 -0
- package/components/scroll-list/style.js +2 -0
- package/components/scroll-spy/style.d.ts +2 -0
- package/components/scroll-spy/style.js +2 -0
- package/components/search/style.d.ts +5 -0
- package/components/search/style.js +5 -0
- package/components/segmented/style.d.ts +3 -0
- package/components/segmented/style.js +3 -0
- package/components/select/style.d.ts +9 -0
- package/components/select/style.js +9 -0
- package/components/select-input/style.d.ts +11 -0
- package/components/select-input/style.js +11 -0
- package/components/select-popout/style.d.ts +10 -0
- package/components/select-popout/style.js +10 -0
- package/components/share-sheet/style.d.ts +5 -0
- package/components/share-sheet/style.js +5 -0
- package/components/sidebar/style.d.ts +2 -0
- package/components/sidebar/style.js +2 -0
- package/components/signature/style.d.ts +5 -0
- package/components/signature/style.js +5 -0
- package/components/skeleton/style.d.ts +2 -0
- package/components/skeleton/style.js +2 -0
- package/components/slide-verify/style.d.ts +3 -0
- package/components/slide-verify/style.js +3 -0
- package/components/slider/style.d.ts +2 -0
- package/components/slider/style.js +2 -0
- package/components/status-bar/style.d.ts +2 -0
- package/components/status-bar/style.js +2 -0
- package/components/stepper/style.d.ts +3 -0
- package/components/stepper/style.js +3 -0
- package/components/steps/style.d.ts +2 -0
- package/components/steps/style.js +2 -0
- package/components/sticky/style.d.ts +2 -0
- package/components/sticky/style.js +2 -0
- package/components/swipe-action/style.d.ts +2 -0
- package/components/swipe-action/style.js +2 -0
- package/components/swiper/style.d.ts +2 -0
- package/components/swiper/style.js +2 -0
- package/components/switch/style.d.ts +3 -0
- package/components/switch/style.js +3 -0
- package/components/tabbar/style.d.ts +2 -0
- package/components/tabbar/style.js +2 -0
- package/components/tabbar-pit/style.d.ts +2 -0
- package/components/tabbar-pit/style.js +2 -0
- package/components/table/style.d.ts +2 -0
- package/components/table/style.js +2 -0
- package/components/tabs/style.d.ts +2 -0
- package/components/tabs/style.js +2 -0
- package/components/tag/style.d.ts +2 -0
- package/components/tag/style.js +2 -0
- package/components/text/style.d.ts +2 -0
- package/components/text/style.js +2 -0
- package/components/text-shrink/style.d.ts +2 -0
- package/components/text-shrink/style.js +2 -0
- package/components/text-shrink/text-shrink.vue.js +2 -2
- package/components/timeline/style.d.ts +2 -0
- package/components/timeline/style.js +2 -0
- package/components/toast/style.d.ts +6 -0
- package/components/toast/style.js +6 -0
- package/components/tree/style.d.ts +16 -0
- package/components/tree/style.js +16 -0
- package/components/upload/style.d.ts +3 -0
- package/components/upload/style.js +3 -0
- package/components/waterfall/style.d.ts +2 -0
- package/components/waterfall/style.js +2 -0
- package/components/watermark/style.d.ts +2 -0
- package/components/watermark/style.js +2 -0
- package/global.d.ts +16 -0
- package/locale/index.js +3 -2
- package/package.json +8 -4
- package/utils/date.d.ts +0 -3
- package/utils/date.js +33 -14
- package/.DS_Store +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../style/index.scss';
|
|
2
|
+
import '../loading/index.scss';
|
|
3
|
+
import '../button/index.scss';
|
|
4
|
+
import '../empty/index.scss';
|
|
5
|
+
import '../input/index.scss';
|
|
6
|
+
import '../motion/index.scss';
|
|
7
|
+
import '../overlay/index.scss';
|
|
8
|
+
import '../popup/index.scss';
|
|
9
|
+
import './index.scss';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../style/index.css";
|
|
2
|
+
import "../loading/index.css";
|
|
3
|
+
import "../button/index.css";
|
|
4
|
+
import "../motion/index.css";
|
|
5
|
+
import "../overlay/index.css";
|
|
6
|
+
import "../popup/index.css";
|
|
7
|
+
import "../input/index.css";
|
|
8
|
+
import "../empty/index.css";
|
|
9
|
+
import "./index.css";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../style/index.scss';
|
|
2
|
+
import '../input/index.scss';
|
|
3
|
+
import '../loading/index.scss';
|
|
4
|
+
import '../popout-input/index.scss';
|
|
5
|
+
import '../button/index.scss';
|
|
6
|
+
import '../motion/index.scss';
|
|
7
|
+
import '../overlay/index.scss';
|
|
8
|
+
import '../popup/index.scss';
|
|
9
|
+
import '../popout/index.scss';
|
|
10
|
+
import '../empty/index.scss';
|
|
11
|
+
import '../select/index.scss';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../style/index.css";
|
|
2
|
+
import "../loading/index.css";
|
|
3
|
+
import "../button/index.css";
|
|
4
|
+
import "../motion/index.css";
|
|
5
|
+
import "../overlay/index.css";
|
|
6
|
+
import "../popup/index.css";
|
|
7
|
+
import "../input/index.css";
|
|
8
|
+
import "../popout/index.css";
|
|
9
|
+
import "../empty/index.css";
|
|
10
|
+
import "../select/index.css";
|
|
11
|
+
import "../popout-input/index.css";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../style/index.scss';
|
|
2
|
+
import '../loading/index.scss';
|
|
3
|
+
import '../button/index.scss';
|
|
4
|
+
import '../motion/index.scss';
|
|
5
|
+
import '../overlay/index.scss';
|
|
6
|
+
import '../popup/index.scss';
|
|
7
|
+
import '../popout/index.scss';
|
|
8
|
+
import '../empty/index.scss';
|
|
9
|
+
import '../input/index.scss';
|
|
10
|
+
import '../select/index.scss';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../style/index.css";
|
|
2
|
+
import "../loading/index.css";
|
|
3
|
+
import "../button/index.css";
|
|
4
|
+
import "../motion/index.css";
|
|
5
|
+
import "../overlay/index.css";
|
|
6
|
+
import "../popup/index.css";
|
|
7
|
+
import "../input/index.css";
|
|
8
|
+
import "../popout/index.css";
|
|
9
|
+
import "../empty/index.css";
|
|
10
|
+
import "../select/index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createBem } from "../../utils/bem.js";
|
|
2
2
|
import { defaultTextShrinkProps } from "./common.js";
|
|
3
|
-
import { computed,
|
|
3
|
+
import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, toDisplayString, unref, useTemplateRef, watch } from "vue";
|
|
4
4
|
//#region packages/sard/components/text-shrink/text-shrink.vue
|
|
5
5
|
const _hoisted_1 = ["textContent"];
|
|
6
6
|
const MIN_FONT_SIZE = 1;
|
|
@@ -235,7 +235,7 @@ var text_shrink_default = /*@__PURE__*/ defineComponent({
|
|
|
235
235
|
return openBlock(), createElementBlock("div", {
|
|
236
236
|
ref: "root",
|
|
237
237
|
class: normalizeClass(rootClass.value)
|
|
238
|
-
}, [
|
|
238
|
+
}, [createElementVNode("div", {
|
|
239
239
|
ref: "text",
|
|
240
240
|
class: normalizeClass(textClass.value),
|
|
241
241
|
style: normalizeStyle(textStyle.value)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../style/index.scss';
|
|
2
|
+
import '../check-icon/index.scss';
|
|
3
|
+
import '../checkbox/index.scss';
|
|
4
|
+
import '../collapse/index.scss';
|
|
5
|
+
import '../loading/index.scss';
|
|
6
|
+
import '../button/index.scss';
|
|
7
|
+
import '../motion/index.scss';
|
|
8
|
+
import '../overlay/index.scss';
|
|
9
|
+
import '../popup/index.scss';
|
|
10
|
+
import '../dialog/index.scss';
|
|
11
|
+
import '../input/index.scss';
|
|
12
|
+
import '../menu/index.scss';
|
|
13
|
+
import '../popover/index.scss';
|
|
14
|
+
import '../radio/index.scss';
|
|
15
|
+
import '../toast/index.scss';
|
|
16
|
+
import './index.scss';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../style/index.css";
|
|
2
|
+
import "../loading/index.css";
|
|
3
|
+
import "../check-icon/index.css";
|
|
4
|
+
import "../checkbox/index.css";
|
|
5
|
+
import "../collapse/index.css";
|
|
6
|
+
import "../button/index.css";
|
|
7
|
+
import "../motion/index.css";
|
|
8
|
+
import "../overlay/index.css";
|
|
9
|
+
import "../popup/index.css";
|
|
10
|
+
import "../dialog/index.css";
|
|
11
|
+
import "../input/index.css";
|
|
12
|
+
import "../menu/index.css";
|
|
13
|
+
import "../popover/index.css";
|
|
14
|
+
import "../radio/index.css";
|
|
15
|
+
import "../toast/index.css";
|
|
16
|
+
import "./index.css";
|
package/global.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
/**
|
|
3
|
+
* 编译时标识:是否默认引入中文翻译,默认为 `true`。
|
|
4
|
+
*
|
|
5
|
+
* 设置为 `false` 可移除内置的中文语言包,适用于应用本身不包含中文的场景。
|
|
6
|
+
*/
|
|
7
|
+
const __SARD_DEFAULT_LANG__: boolean
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 编译时标识:是否引入农历数据,默认为 `true`。
|
|
11
|
+
*
|
|
12
|
+
* 设置为 `false` 可移除农历数据及相关实现,适用于不需要农历的场景。
|
|
13
|
+
*/
|
|
14
|
+
const __SARD_LUNAR__: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
declare module 'vue' {
|
|
2
18
|
export interface GlobalComponents {
|
|
3
19
|
SAccordion: typeof import('./components/accordion/accordion').default
|
package/locale/index.js
CHANGED
|
@@ -3,10 +3,11 @@ import { interpolate } from "../utils/string.js";
|
|
|
3
3
|
import zh_CN_default from "./lang/zh-CN.js";
|
|
4
4
|
import { computed, inject, ref, shallowRef, watch } from "vue";
|
|
5
5
|
//#region packages/sard/locale/index.ts
|
|
6
|
-
const
|
|
6
|
+
const defaultLocale = typeof __SARD_DEFAULT_LANG__ === "undefined" || __SARD_DEFAULT_LANG__ ? zh_CN_default : {};
|
|
7
|
+
const currentLocale = shallowRef(defaultLocale);
|
|
7
8
|
function useTranslate(prefix = "") {
|
|
8
9
|
const locale = computed(() => {
|
|
9
|
-
return currentLocale.value ||
|
|
10
|
+
return currentLocale.value || defaultLocale;
|
|
10
11
|
});
|
|
11
12
|
const translate = (chainOrData, data) => {
|
|
12
13
|
const chain = typeof chainOrData === "string" ? prefix ? prefix + "." + chainOrData : chainOrData : prefix;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sard",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "sard 是基于 Vue3 的 Web 移动端 UI 组件库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"UI",
|
|
@@ -16,14 +16,18 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"*"
|
|
18
18
|
],
|
|
19
|
-
"sideEffects":
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"**/*.css",
|
|
21
|
+
"**/*.scss",
|
|
22
|
+
"**/style.*"
|
|
23
|
+
],
|
|
20
24
|
"main": "index.js",
|
|
21
25
|
"devDependencies": {
|
|
22
|
-
"@sard/icons": "^0.1.
|
|
26
|
+
"@sard/icons": "^0.1.1",
|
|
23
27
|
"vue": "^3.5.0"
|
|
24
28
|
},
|
|
25
29
|
"peerDependencies": {
|
|
26
|
-
"@sard/icons": "^0.1.
|
|
30
|
+
"@sard/icons": "^0.1.1",
|
|
27
31
|
"vue": "^3.5.0"
|
|
28
32
|
}
|
|
29
33
|
}
|
package/utils/date.d.ts
CHANGED
|
@@ -61,9 +61,6 @@ export declare function toDate(date: Date | string | number, valueFormat?: strin
|
|
|
61
61
|
export declare function minmaxDate(date: Date, minDate: Date, maxDate: Date): Date;
|
|
62
62
|
export declare function getPrevMonthDate(date: Date): Date;
|
|
63
63
|
export declare function getNextMonthDate(date: Date): Date;
|
|
64
|
-
/****************************************************************
|
|
65
|
-
* 农历
|
|
66
|
-
****************************************************************/
|
|
67
64
|
export declare const lunarInfo: number[];
|
|
68
65
|
export declare const springFestivals: number[][];
|
|
69
66
|
export declare const baseLunarYear = 1900;
|