sard 1.0.18 → 1.0.19
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/all-components.js +2 -2
- package/components/check-icon/index.css +1 -1
- package/components/cool-icon/index.css +1 -1
- package/components/date-strip/index.css +1 -1
- package/components/dialog/index.css +1 -1
- package/components/flex/common.d.ts +19 -0
- package/components/flex/common.js +9 -0
- package/components/flex/flex.vue.d.ts +19 -0
- package/components/flex/flex.vue.js +69 -0
- package/components/flex/index.css +1 -0
- package/components/flex/index.d.ts +5 -0
- package/components/flex/index.js +7 -0
- package/components/floating-panel/index.css +1 -1
- package/components/grid/common.d.ts +1 -1
- package/components/grid/grid.vue.d.ts +1 -1
- package/components/grid/grid.vue.js +8 -3
- package/components/index.d.ts +1 -1
- package/components/index.js +3 -3
- package/components/keyboard/index.css +1 -1
- package/components/list/index.css +1 -1
- package/components/menu/index.css +1 -1
- package/components/pagination/index.css +1 -1
- package/components/segmented/index.css +1 -1
- package/components/share-sheet/index.css +1 -1
- package/components/skeleton/index.css +1 -1
- package/components/skeleton/skeleton-avatar.vue.js +7 -16
- package/components/skeleton/skeleton-paragraph.vue.js +7 -14
- package/components/skeleton/skeleton-title.vue.js +2 -14
- package/components/status-bar/index.css +1 -1
- package/components/status-bar/status-bar.vue.js +2 -12
- package/components/stepper/index.css +1 -1
- package/components/style/index.css +1 -1
- package/components/switch/index.css +1 -1
- package/components/upload/index.css +1 -1
- package/global.d.ts +1 -1
- package/index.css +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/components/space/common.d.ts +0 -18
- package/components/space/common.js +0 -23
- package/components/space/index.css +0 -1
- package/components/space/index.d.ts +0 -5
- package/components/space/index.js +0 -7
- package/components/space/space.vue.d.ts +0 -17
- package/components/space/space.vue.js +0 -59
package/index.js
CHANGED
|
@@ -114,6 +114,8 @@ import { Dropdown, DropdownItem } from "./components/dropdown/index.js";
|
|
|
114
114
|
import { Ellipsis } from "./components/ellipsis/index.js";
|
|
115
115
|
import { Empty } from "./components/empty/index.js";
|
|
116
116
|
import { Fab, FabItem } from "./components/fab/index.js";
|
|
117
|
+
import { flexGap } from "./components/flex/common.js";
|
|
118
|
+
import { Flex } from "./components/flex/index.js";
|
|
117
119
|
import { FloatingBubble } from "./components/floating-bubble/index.js";
|
|
118
120
|
import { FloatingPanel } from "./components/floating-panel/index.js";
|
|
119
121
|
import { CancelError, isCancelError } from "./components/form/Validator.js";
|
|
@@ -180,8 +182,6 @@ import { Signature } from "./components/signature/index.js";
|
|
|
180
182
|
import { Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonParagraph, SkeletonTitle } from "./components/skeleton/index.js";
|
|
181
183
|
import { SlideVerify } from "./components/slide-verify/index.js";
|
|
182
184
|
import { Slider } from "./components/slider/index.js";
|
|
183
|
-
import { spaceSizes } from "./components/space/common.js";
|
|
184
|
-
import { Space } from "./components/space/index.js";
|
|
185
185
|
import { StatusBar } from "./components/status-bar/index.js";
|
|
186
186
|
import { Stepper } from "./components/stepper/index.js";
|
|
187
187
|
import { Step, Steps } from "./components/steps/index.js";
|
|
@@ -217,4 +217,4 @@ function prepareEnvironment() {
|
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
//#endregion
|
|
220
|
-
export { ADD_SWIPER_CONTEXT_KEY, ALPHANUMERIC_CHARS, Accordion, AccordionItem, ActionSheet, ActionSheetItem, Alert, Avatar, AvatarGroup, BackTop, Badge, Barcode, BarcodeFormatList, BarcodeTextPositionList, Button, Calendar, CalendarInput, CalendarPopout, CancelError, 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, ECLList, Ellipsis, Empty, Fab, FabItem, FloatingBubble, FloatingPanel, Form, FormItem, FormItemPlain, FormPlain, Friction, Grid, GridItem, Image, Indexes, IndexesAnchor, IndexesNav, Input, Keyboard, KeyboardPopout, List, ListItem, LoadMore, LoadMoreStatus, Loading, Marquee, Menu, MenuItem, Motion, Navbar, NavbarItem, NavbarPit, NoticeBar, Notify, OnlyChild, 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,
|
|
220
|
+
export { ADD_SWIPER_CONTEXT_KEY, ALPHANUMERIC_CHARS, Accordion, AccordionItem, ActionSheet, ActionSheetItem, Alert, Avatar, AvatarGroup, BackTop, Badge, Barcode, BarcodeFormatList, BarcodeTextPositionList, Button, Calendar, CalendarInput, CalendarPopout, CancelError, 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, ECLList, Ellipsis, Empty, Fab, FabItem, Flex, FloatingBubble, FloatingPanel, Form, FormItem, FormItemPlain, FormPlain, Friction, Grid, GridItem, Image, Indexes, IndexesAnchor, IndexesNav, Input, Keyboard, KeyboardPopout, List, ListItem, LoadMore, LoadMoreStatus, Loading, Marquee, Menu, MenuItem, Motion, Navbar, NavbarItem, NavbarPit, NoticeBar, Notify, OnlyChild, 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, Spring, StatusBar, Step, Stepper, Steps, Sticky, StickyBox, SwipeAction, Swiper, SwiperItem, Switch, Tab, Tabbar, TabbarItem, TabbarPit, Table, Tabs, Tag, Text, Timeline, TimelineItem, Toast, Tree, TreeBranch, TreeNode, Upload, UploadPreview, Waterfall, WaterfallItem, WaterfallLoad, Watermark, actionSheet, addSeparator, addUnit, arrayEqual, arrayMove, autoUpdate, barcode, baseLunarYear, calculateBarcodeLayout, camelCase, capitalize, chainGet, chainSet, checkRtl, chooseFile, clamp, clipboard, computePosition, createActionSheet, createBem, createBemStruct, createCropImage, createDialog, createInertialAnimate, createNotify, createPreviewImage, createToast, cropImage, cssVar, cssVarName, currentLocale, debounce, deepClone, defaultBemConfig, defaultColorPickerPresets, defaultColorPickerValue, defaultOptionKeys, defineSetupFnComponent, dialog, earthlyBranches, enhanceComponent, extend, flatVNode, flexGap, formatColor, formatDate, formatNumber, formatTime, getAllImperatives, getAspectFillSize, getAspectFitSize, getAvailableImperative, getCurrentTime, getDampingValue, getDayOfYear, getDaysAfterLastDay, getDaysBeforeFirstDay, getDaysInMonth, getDaysSinceUnixEpoch, getDecimalsLength, getFileName, getFirstDayWeekday, getGridCenterSize, getGridIndex, getGridPrizeCount, getImperatives, getInBoundValue, getLeafNodes, getLunarDayName, getLunarHourName, getLunarLeapMonth, getLunarLeapMonthDays, getLunarMonthDays, getLunarMonthName, getLunarYearDays, getLunarYearName, getNextMonthDate, getNextMonthHeadDays, getNodeLevel, getOverflowRangeInArea, getPageRange, getPrevMonthDate, getPrevMonthTailDays, getPreviewColor, getRectDampingValue, getRotatedRect, getScrollIntoViewValue, getScrollTop, getTouchPoint, getTransformOrigin, getTreeCheckedKeys, getTreeHalfCheckedKeys, getTwoPointsDistance, heavenlyStems, hslToHsv, hslToHwb, hslToRgb, hsvToHsl, hwbToHsl, imageDataToDataURL, inRange, initializeCheckNodes, installer, isBoolean, isCancelError, isColorScheme, isConfigObject, isDate, isEmptyArray, isEmptyBinding, isEmptyValue, isFileUrl, isFunction, isImageFile, isImageUrl, isKorean, isLeapYear, isNoEmptyArray, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isRectEqual, isRenderVisible, isSizeEqual, isString, isUndefined, isVideoFile, isVideoUrl, isVisibleEmpty, kebabCase, loadImage, localeContextKey, logError, looseToNumber, lowerFirst, lunarDayNames, lunarInfo, lunarMonthNames, lunarToSolar, lunarYearNames, mapTreeToGrid, matchScrollVisible, measureTextWidth, minmaxDate, mround, nestedToMulti, noop, normalizeBarcodeOptions, normalizeHsla, normalizeHsva, notify, omit, omitFormPopoutProps, parseColor, parseDate, partition, partitionPopoutInputProps, pascalCase, pick, plateEnglishLetterKeys, plateProvinceKeys, plateSuffixKeys, popupManager, prepareEnvironment, previewImage, provideColorScheme, provideLocale, qrcode, random, reactiveComputed, readFileContent, rgbToHsl, round, safeAreaInsets, scrollToTarget, setCheckedRecursively, setLocale, shuffle, sleep, snakeCase, solarToLunar, splitUnit, spreadEach, springFestivals, throttle, toArray, toDate, toDateNumber, toDateString, toMonthNumber, toReactive, toTouchEvent, toast, treeToMap, uniqid, updateAncestorsChecked, upperFirst, useClickOutside, useColorScheme, useComposition, useCountDown, useDragPinch, useElementBackTop, useElementScroll, useFormContext, useFormItem, useFormItemContext, useFormPopout, useImperative, useInPopup, useIndeterminate, useInitialVelocity, useIntersectionObserver, useKeyList, useLocale, useLockScroll, useLuckyDraw, useLuckyGrid, useLuckyWheel, useMotioning, useOptionKeys, usePageBackTop, usePageScroll, usePointerDown, usePopoutInput, usePopper, usePopupEnter, usePopupVisibleHookProvide, useReachBottom, useResizeObserver, useRtl, useScrollSide, useScrollSpy, useScroller, useSimulatedClick, useSimulatedDblClick, useSimulatedPress, useSingleTask, useSlotMachine, useStopMovedClick, useTimeout, useTimeoutLoading, useTranslate, useTranslateWithPrefix, useWindowResize, useZIndex, walkAncestor, walkDescendant, walkNodes, windowInfo, withResolvers };
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type DefaultProps } from '../config';
|
|
2
|
-
export type SpaceSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type SpaceAlign = 'start' | 'end' | 'center' | 'baseline';
|
|
4
|
-
export type SpaceJustify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
5
|
-
export interface SpaceProps {
|
|
6
|
-
direction?: 'vertical' | 'horizontal';
|
|
7
|
-
size?: SpaceSize | (string & {});
|
|
8
|
-
align?: SpaceAlign | (string & {});
|
|
9
|
-
justify?: SpaceJustify | (string & {});
|
|
10
|
-
wrap?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const spaceSizes: string[];
|
|
13
|
-
export declare const spaceMapAlign: Record<string, string>;
|
|
14
|
-
export declare const spaceMapJustify: Record<string, string>;
|
|
15
|
-
export declare const defaultSpaceProps: DefaultProps<SpaceProps>;
|
|
16
|
-
export interface SpaceSlots {
|
|
17
|
-
default?(props: Record<string, never>): any;
|
|
18
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region packages/sard/components/space/common.ts
|
|
2
|
-
const spaceSizes = [
|
|
3
|
-
"small",
|
|
4
|
-
"medium",
|
|
5
|
-
"large"
|
|
6
|
-
];
|
|
7
|
-
const spaceMapAlign = {
|
|
8
|
-
start: "flex-start",
|
|
9
|
-
end: "flex-end"
|
|
10
|
-
};
|
|
11
|
-
const spaceMapJustify = {
|
|
12
|
-
start: "flex-start",
|
|
13
|
-
end: "flex-end",
|
|
14
|
-
between: "space-between",
|
|
15
|
-
around: "space-around",
|
|
16
|
-
evenly: "space-evenly"
|
|
17
|
-
};
|
|
18
|
-
const defaultSpaceProps = {
|
|
19
|
-
direction: "horizontal",
|
|
20
|
-
size: "medium"
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { defaultSpaceProps, spaceMapAlign, spaceMapJustify, spaceSizes };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--s-space-gap-sm:var(--s-size-xs);--s-space-gap:var(--s-size-sm);--s-space-gap-lg:var(--s-size)}.s-space{display:flex}.s-space--vertical{flex-direction:column}.s-space--horizontal{flex-direction:row}.s-space--small{gap:var(--s-space-gap-sm)}.s-space--medium{gap:var(--s-space-gap)}.s-space--large{gap:var(--s-space-gap-lg)}.s-space--wrap{flex-wrap:wrap}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { enhanceComponent } from "../../utils/component.js";
|
|
2
|
-
import { spaceSizes } from "./common.js";
|
|
3
|
-
import space_default from "./space.vue.js";
|
|
4
|
-
//#region packages/sard/components/space/index.ts
|
|
5
|
-
const Space = enhanceComponent(space_default);
|
|
6
|
-
//#endregion
|
|
7
|
-
export { Space, Space as default, spaceSizes };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type SpaceProps, type SpaceSlots } from './common';
|
|
2
|
-
type __VLS_Slots = SpaceSlots;
|
|
3
|
-
declare const __VLS_base: import("vue").DefineComponent<SpaceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SpaceProps> & Readonly<{}>, {
|
|
4
|
-
size: import("./common").SpaceSize | (string & {});
|
|
5
|
-
direction: "vertical" | "horizontal";
|
|
6
|
-
wrap: boolean;
|
|
7
|
-
justify: import("./common").SpaceJustify | (string & {});
|
|
8
|
-
align: import("./common").SpaceAlign | (string & {});
|
|
9
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
-
declare const _default: typeof __VLS_export;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { createBem } from "../../utils/bem.js";
|
|
2
|
-
import { defaultSpaceProps, spaceMapAlign, spaceMapJustify, spaceSizes } from "./common.js";
|
|
3
|
-
import { computed, createElementBlock, defineComponent, mergeDefaults, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
|
4
|
-
//#region packages/sard/components/space/space.vue
|
|
5
|
-
var space_default = /*@__PURE__*/ defineComponent({
|
|
6
|
-
__name: "space",
|
|
7
|
-
props: /*@__PURE__*/ mergeDefaults({
|
|
8
|
-
direction: {
|
|
9
|
-
type: String,
|
|
10
|
-
required: false
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
type: [String, Object],
|
|
14
|
-
required: false
|
|
15
|
-
},
|
|
16
|
-
align: {
|
|
17
|
-
type: [String, Object],
|
|
18
|
-
required: false
|
|
19
|
-
},
|
|
20
|
-
justify: {
|
|
21
|
-
type: [String, Object],
|
|
22
|
-
required: false
|
|
23
|
-
},
|
|
24
|
-
wrap: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
required: false
|
|
27
|
-
}
|
|
28
|
-
}, defaultSpaceProps),
|
|
29
|
-
setup(__props) {
|
|
30
|
-
const props = __props;
|
|
31
|
-
const bem = createBem("space");
|
|
32
|
-
const presetSize = computed(() => {
|
|
33
|
-
return spaceSizes.includes(props.size);
|
|
34
|
-
});
|
|
35
|
-
const spaceClass = computed(() => {
|
|
36
|
-
return [
|
|
37
|
-
bem.b(),
|
|
38
|
-
bem.m(props.direction),
|
|
39
|
-
bem.m(props.size, presetSize.value),
|
|
40
|
-
bem.m("wrap", props.wrap)
|
|
41
|
-
];
|
|
42
|
-
});
|
|
43
|
-
const spaceStyle = computed(() => {
|
|
44
|
-
return {
|
|
45
|
-
gap: presetSize.value ? "" : props.size,
|
|
46
|
-
alignItems: (props.align && spaceMapAlign[props.align]) ?? props.align,
|
|
47
|
-
justifyContent: (props.justify && spaceMapJustify[props.justify]) ?? props.justify
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return openBlock(), createElementBlock("div", {
|
|
52
|
-
class: normalizeClass(spaceClass.value),
|
|
53
|
-
style: normalizeStyle(spaceStyle.value)
|
|
54
|
-
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
//#endregion
|
|
59
|
-
export { space_default as default };
|