@astryx-vue/core 0.36.2 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-Dz8T0KIa.js → AlertDialog-DwITRN1M.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-CRHPDrmS.js → BottomSheet-CDxV1Rkx.js} +1 -1
- package/dist/{BottomSheet-CYsGu9GP.js → BottomSheet-Cr6FacYP.js} +4 -77
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-nO9YHygD.js → Breadcrumbs-DaxgM0-F.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-D07roA0D.js → CommandPalette-CWaKVNGZ.js} +2 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-7OdAby6v.js → ComplexSelector-D2QRdM57.js} +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-BIJyyObZ.js → ContextMenu-D-G53u7B.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-BNKoPL3j.js → DateInput-BHSp4fZS.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-CGDlPnUb.js → DateRangeInput-DP1QWK_6.js} +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CRWUAh75.js → DateTimeInput-Bgx9lgWb.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-CXa-tu02.js → Dialog-DCKT1dWC.js} +2 -1
- package/dist/{Dialog-BxijA4zr.js → Dialog-DRQrtKHT.js} +3 -80
- package/dist/{DialogHeader-D7f97ksG.js → DialogHeader-C3Mc580J.js} +1 -1
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/Drawer-CnFTUjln.js +422 -0
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-Bklf6ekH.js → DropdownMenu-DU_Rw88D.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BjFYfRqV.js → MultiSelector-DUQMNBoZ.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DGcl38z9.js → Pagination-DBikmHyn.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DlCqmkYD.js → Popover-CTCWhA_K.js} +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BKhXYPRO.js → PowerSearch-CTNFHNnr.js} +8 -8
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-CHq3XHwH.js → Selector-BvxQXUYr.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-waEj3x_o.js → Table-3GiSElIS.js} +5 -5
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/{TimeField-BXQCZIwP.js → TimeField-BYuUKUNq.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-C_ZssG1D.js → TimeInput-Bqo_oHMl.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-W6aKxXlF.js → Toast-BSay0eZw.js} +14 -6
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-hmGkGVG7.js → Tokenizer-D-wBxbBE.js} +2 -2
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/{index-BWzEt0gT.d.ts → index--kbwaSXW.d.ts} +2 -2
- package/dist/{index-CArP_6wv.d.ts → index-0RIgvtdm.d.ts} +1 -1
- package/dist/{index-CAJMHw-g.d.ts → index-1yvu_vpF.d.ts} +4 -4
- package/dist/{index-DlH0BI35.d.ts → index-Ak1b0V24.d.ts} +1 -1
- package/dist/{index-SWw-WMTO.d.ts → index-B44fLswd.d.ts} +2 -2
- package/dist/{index-C0smuLQ8.d.ts → index-B7Rd2RuL.d.ts} +93 -81
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-maTGrWjF.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-BGUuyAMO.d.ts → index-BhpRhww0.d.ts} +11 -11
- package/dist/{index-C1e8LNx2.d.ts → index-BjqoHLMq.d.ts} +1 -1
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-gmY3A_Iw.d.ts → index-C93nwgTW.d.ts} +1 -1
- package/dist/{index-D2B3ysZr.d.ts → index-CGRtGORf.d.ts} +1 -1
- package/dist/{index-Xc3q9f84.d.ts → index-COgrQZIL.d.ts} +3 -3
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-Bwh8O-v8.d.ts → index-CZ29Xu_E.d.ts} +1 -1
- package/dist/{index-BQ3cm7mP.d.ts → index-CbA8rR_b.d.ts} +1 -1
- package/dist/{index-C6Iv6sgd.d.ts → index-CilCxEvD.d.ts} +3 -3
- package/dist/{index-BWWirRm3.d.ts → index-DHUCHxn2.d.ts} +1 -1
- package/dist/{index-DsWEyz1N.d.ts → index-DVX2jlTQ.d.ts} +3 -3
- package/dist/{index-CJdOt5Cc.d.ts → index-Dk50Zh3F.d.ts} +2 -2
- package/dist/{index-DA3DMFds.d.ts → index-J83fLEyo.d.ts} +4 -4
- package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
- package/dist/{index-BRr4ANpr.d.ts → index-hwP1oWCA.d.ts} +8 -8
- package/dist/{index-Cm36VS1A.d.ts → index-mK1ICsVg.d.ts} +2 -2
- package/dist/{index-ql9ApSTF.d.ts → index-yQc-te9a.d.ts} +2 -2
- package/dist/index.d.ts +27 -27
- package/dist/index.js +24 -24
- package/dist/{lazyBottomSheet-zUe1mYmM.js → lazyBottomSheet-C6Rw8yoX.js} +1 -1
- package/dist/{modalOutlet-Drr9a16b.js → modalOutlet-BwR9AAlm.js} +16 -1
- package/dist/position-DwHfneha.js +79 -0
- package/dist/sheetTransition-BEm1GCv1.js +76 -0
- package/package.json +1 -1
- package/styles/drawer.css +136 -44
- package/dist/Drawer-C3t7NKiF.js +0 -137
package/dist/Drawer-C3t7NKiF.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { t as _sfc_main$2 } from "./Dialog-BxijA4zr.js";
|
|
2
|
-
import { t as _sfc_main$3 } from "./DialogHeader-D7f97ksG.js";
|
|
3
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
4
|
-
import "../styles/drawer.css";
|
|
5
|
-
//#region src/Drawer/Drawer.vue
|
|
6
|
-
const _hoisted_1 = { class: "astryx-drawer-body" };
|
|
7
|
-
const _hoisted_2 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "astryx-drawer-footer"
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* 贴边的模态面板。模态、焦点陷阱、焦点归还、滚动锁和 `purpose` 的关闭规则
|
|
13
|
-
* 都由 `Dialog` 负责,这里只决定贴哪一边和多大。
|
|
14
|
-
*/
|
|
15
|
-
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
16
|
-
name: "AstryxDrawer",
|
|
17
|
-
inheritAttrs: false,
|
|
18
|
-
__name: "Drawer",
|
|
19
|
-
props: {
|
|
20
|
-
isOpen: { type: Boolean },
|
|
21
|
-
label: {},
|
|
22
|
-
placement: { default: "end" },
|
|
23
|
-
width: { default: 400 },
|
|
24
|
-
padding: { default: void 0 },
|
|
25
|
-
purpose: { default: "info" }
|
|
26
|
-
},
|
|
27
|
-
emits: ["openChange"],
|
|
28
|
-
setup(__props, { emit: __emit }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const emit = __emit;
|
|
31
|
-
const attrs = useAttrs();
|
|
32
|
-
const position = computed(() => props.placement === "start" ? {
|
|
33
|
-
start: 0,
|
|
34
|
-
top: 0,
|
|
35
|
-
bottom: 0
|
|
36
|
-
} : {
|
|
37
|
-
end: 0,
|
|
38
|
-
top: 0,
|
|
39
|
-
bottom: 0
|
|
40
|
-
});
|
|
41
|
-
const rootAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([name]) => name !== "class" && name !== "style")));
|
|
42
|
-
return (_ctx, _cache) => {
|
|
43
|
-
return openBlock(), createBlock(_sfc_main$2, mergeProps(rootAttrs.value, {
|
|
44
|
-
"aria-label": __props.label,
|
|
45
|
-
class: ["astryx-drawer", [`astryx-drawer--${__props.placement}`, unref(attrs).class]],
|
|
46
|
-
"is-open": __props.isOpen,
|
|
47
|
-
"max-height": "100dvh",
|
|
48
|
-
padding: __props.padding,
|
|
49
|
-
position: position.value,
|
|
50
|
-
purpose: __props.purpose,
|
|
51
|
-
style: unref(attrs).style,
|
|
52
|
-
width: __props.width,
|
|
53
|
-
onOpenChange: _cache[0] || (_cache[0] = ($event) => emit("openChange", $event))
|
|
54
|
-
}), {
|
|
55
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")]), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("v-if", true)]),
|
|
56
|
-
_: 3
|
|
57
|
-
}, 16, [
|
|
58
|
-
"aria-label",
|
|
59
|
-
"class",
|
|
60
|
-
"is-open",
|
|
61
|
-
"padding",
|
|
62
|
-
"position",
|
|
63
|
-
"purpose",
|
|
64
|
-
"style",
|
|
65
|
-
"width"
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/Drawer/DrawerHeader.vue
|
|
72
|
-
/**
|
|
73
|
-
* 抽屉的标题行。布局、标题语义和关闭按钮的补偿边都复用 `DialogHeader`,
|
|
74
|
-
* 这里只把关闭按钮的默认值和事件名换成抽屉的说法。
|
|
75
|
-
*/
|
|
76
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
77
|
-
name: "AstryxDrawerHeader",
|
|
78
|
-
__name: "DrawerHeader",
|
|
79
|
-
props: {
|
|
80
|
-
title: {},
|
|
81
|
-
subtitle: { default: void 0 },
|
|
82
|
-
hasCloseButton: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: void 0
|
|
85
|
-
},
|
|
86
|
-
closeButtonLabel: { default: void 0 }
|
|
87
|
-
},
|
|
88
|
-
emits: ["openChange"],
|
|
89
|
-
setup(__props, { emit: __emit }) {
|
|
90
|
-
const props = __props;
|
|
91
|
-
const emit = __emit;
|
|
92
|
-
const instance = getCurrentInstance();
|
|
93
|
-
const slots = useSlots();
|
|
94
|
-
/**
|
|
95
|
-
* 关闭按钮只在有人接关闭请求时出现:没人处理的按钮点了什么也不会发生。
|
|
96
|
-
* 显式传 `hasCloseButton` 时以传入值为准。监听函数在渲染时才看得到,所以放在 computed 里读。
|
|
97
|
-
*/
|
|
98
|
-
const showClose = computed(() => props.hasCloseButton ?? instance?.vnode?.props?.onOpenChange != null);
|
|
99
|
-
return (_ctx, _cache) => {
|
|
100
|
-
return openBlock(), createBlock(_sfc_main$3, {
|
|
101
|
-
"close-button-label": __props.closeButtonLabel,
|
|
102
|
-
"has-close-button": showClose.value,
|
|
103
|
-
subtitle: __props.subtitle,
|
|
104
|
-
title: __props.title,
|
|
105
|
-
onOpenChange: _cache[0] || (_cache[0] = ($event) => emit("openChange", false))
|
|
106
|
-
}, createSlots({ _: 2 }, [
|
|
107
|
-
unref(slots).title ? {
|
|
108
|
-
name: "title",
|
|
109
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
|
|
110
|
-
key: "0"
|
|
111
|
-
} : void 0,
|
|
112
|
-
unref(slots).subtitle ? {
|
|
113
|
-
name: "subtitle",
|
|
114
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "subtitle")]),
|
|
115
|
-
key: "1"
|
|
116
|
-
} : void 0,
|
|
117
|
-
unref(slots).startContent ? {
|
|
118
|
-
name: "startContent",
|
|
119
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "startContent")]),
|
|
120
|
-
key: "2"
|
|
121
|
-
} : void 0,
|
|
122
|
-
unref(slots).endContent ? {
|
|
123
|
-
name: "endContent",
|
|
124
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "endContent")]),
|
|
125
|
-
key: "3"
|
|
126
|
-
} : void 0
|
|
127
|
-
]), 1032, [
|
|
128
|
-
"close-button-label",
|
|
129
|
-
"has-close-button",
|
|
130
|
-
"subtitle",
|
|
131
|
-
"title"
|
|
132
|
-
]);
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
//#endregion
|
|
137
|
-
export { _sfc_main$1 as n, _sfc_main as t };
|