@bridge-ui/vue 0.25.0 → 0.26.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/Components/ActionFooter/ActionFooter.vue.d.ts +2 -2
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +4 -4
- package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +62 -58
- package/dist/Components/Calendar/calendar.types.d.ts +8 -0
- package/dist/Components/Calendar/composables/useCalendar.d.ts +2 -1
- package/dist/Components/Calendar/composables/useCalendar.js +188 -177
- package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +96 -92
- package/dist/Components/CalendarRange/calendarRange.types.d.ts +8 -0
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +2 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +203 -220
- package/dist/Components/ColorField/ColorField.vue.d.ts +2 -2
- package/dist/Components/ColorPicker/ColorPicker.vue.d.ts +2 -2
- package/dist/Components/DateField/DateField.vue.d.ts +2 -2
- package/dist/Components/DatePicker/DatePicker.vue.d.ts +2 -2
- package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/DateRangeField/DateRangeField.vue.d.ts +2 -2
- package/dist/Components/DateRangePicker/DateRangePicker.vue.d.ts +2 -2
- package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/DateTimeField/DateTimeField.vue.d.ts +2 -2
- package/dist/Components/DateTimePicker/DateTimePicker.vue.d.ts +2 -2
- package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue.d.ts +2 -2
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +2 -2
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/List/List.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/Components/List/composables/useList.d.ts +1 -1
- package/dist/Components/List/composables/useList.js +5 -1
- package/dist/Components/List/index.d.ts +1 -1
- package/dist/Components/List/list.types.d.ts +10 -1
- package/dist/Components/List/listInjectionKey.d.ts +2 -0
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -2
- package/dist/Components/ListItem/composables/useListItem.js +92 -86
- package/dist/Components/ListItem/listItem.types.d.ts +8 -0
- package/dist/Components/ListSection/composables/useListSection.js +31 -29
- package/dist/Components/Listbox/Listbox.vue.d.ts +2 -2
- package/dist/Components/Listbox/listbox.types.d.ts +2 -2
- package/dist/Components/Modal/Modal.vue.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Pagination/Pagination.vue.d.ts +2 -2
- package/dist/Components/Select/Select.vue.d.ts +4 -4
- package/dist/Components/Sidebar/SidebarList.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Slider/composables/useSlider.d.ts +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +1 -1
- package/dist/Components/TimeField/TimeField.vue.d.ts +2 -2
- package/dist/Components/TimePicker/TimePicker.vue.d.ts +2 -2
- package/dist/Components/TimeRangeField/TimeRangeField.vue.d.ts +2 -2
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -2
- package/dist/Utils/index.d.ts +2 -0
- package/dist/Utils/index.js +40 -39
- package/dist/Utils/useWheelNavigation.d.ts +11 -0
- package/dist/Utils/useWheelNavigation.js +20 -0
- package/dist/augments.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/docs/components/Calendar.md +31 -30
- package/docs/components/CalendarRange.md +29 -28
- package/docs/components/List.md +43 -27
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ActionFooterOwnProps } from './actionFooter.types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<ActionFooterOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
apply: () => any;
|
|
4
3
|
cancel: () => any;
|
|
4
|
+
apply: () => any;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<ActionFooterOwnProps> & Readonly<{
|
|
6
|
-
onApply?: (() => any) | undefined;
|
|
7
6
|
onCancel?: (() => any) | undefined;
|
|
7
|
+
onApply?: (() => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const _default: typeof __VLS_export;
|
|
10
10
|
export default _default;
|
|
@@ -8,22 +8,22 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
8
8
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
9
|
clear: () => any;
|
|
10
10
|
search: (query: string) => any;
|
|
11
|
-
apply: () => any;
|
|
12
11
|
cancel: () => any;
|
|
13
|
-
select: (option: import('@bridge-ui/core/Domain').ListboxOption) => any;
|
|
14
12
|
change: (value: import('@bridge-ui/core/Domain').SelectModel) => any;
|
|
15
13
|
close: () => any;
|
|
14
|
+
select: (option: import('@bridge-ui/core/Domain').ListboxOption) => any;
|
|
15
|
+
apply: () => any;
|
|
16
16
|
deselect: (option: import('@bridge-ui/core/Domain').ListboxOption) => any;
|
|
17
17
|
open: () => any;
|
|
18
18
|
"update:modelValue": (...args: unknown[]) => any;
|
|
19
19
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
20
|
onClear?: (() => any) | undefined;
|
|
21
21
|
onSearch?: ((query: string) => any) | undefined;
|
|
22
|
-
onApply?: (() => any) | undefined;
|
|
23
22
|
onCancel?: (() => any) | undefined;
|
|
24
|
-
onSelect?: ((option: import('@bridge-ui/core/Domain').ListboxOption) => any) | undefined;
|
|
25
23
|
onChange?: ((value: import('@bridge-ui/core/Domain').SelectModel) => any) | undefined;
|
|
26
24
|
onClose?: (() => any) | undefined;
|
|
25
|
+
onSelect?: ((option: import('@bridge-ui/core/Domain').ListboxOption) => any) | undefined;
|
|
26
|
+
onApply?: (() => any) | undefined;
|
|
27
27
|
onDeselect?: ((option: import('@bridge-ui/core/Domain').ListboxOption) => any) | undefined;
|
|
28
28
|
onOpen?: (() => any) | undefined;
|
|
29
29
|
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
@@ -6,12 +6,12 @@ import i from "../Icon/Icon.js";
|
|
|
6
6
|
import { useOptionalModel as a } from "../../Utils/useOptionalModel.js";
|
|
7
7
|
import { createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, mergeModels as m, mergeProps as h, normalizeProps as g, openBlock as _, ref as v, renderSlot as y, toDisplayString as b, toValue as x, unref as S, useModel as C, withCtx as w } from "vue";
|
|
8
8
|
import { isString as T } from "es-toolkit/compat";
|
|
9
|
-
import { cn as
|
|
9
|
+
import { cn as ee } from "@bridge-ui/core/Utils";
|
|
10
10
|
// src/Components/Calendar/Calendar.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var te = { class: "flex w-full min-w-0 items-center gap-x-1" }, E = { class: "truncate" }, D = { class: "truncate" }, O = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "flex items-center"
|
|
14
|
-
},
|
|
13
|
+
class: "flex shrink-0 items-center"
|
|
14
|
+
}, k = /*@__PURE__*/ f({
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "Calendar",
|
|
17
17
|
props: /*@__PURE__*/ m({
|
|
@@ -45,7 +45,8 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, D = {
|
|
|
45
45
|
startOfWeek: {},
|
|
46
46
|
timeZone: {},
|
|
47
47
|
view: {},
|
|
48
|
-
viewDate: {}
|
|
48
|
+
viewDate: {},
|
|
49
|
+
wheelNavigation: { type: Boolean }
|
|
49
50
|
}, {
|
|
50
51
|
modelValue: {},
|
|
51
52
|
modelModifiers: {}
|
|
@@ -58,51 +59,54 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, D = {
|
|
|
58
59
|
"viewDateChange"
|
|
59
60
|
], ["update:modelValue"]),
|
|
60
61
|
setup(f, { emit: m }) {
|
|
61
|
-
let
|
|
62
|
+
let k = m, A = C(f, "modelValue"), j = f, M = v(j.defaultValue ?? null), N = a(A, M), { view: P, merged: F, shared: I, showNav: L, rootRef: R, rootBind: z, viewDate: B, viewYear: V, bodyBind: ne, viewMonth: H, yearLabel: U, monthLabel: W, headerBind: G, navIconBind: K, setViewDate: q, granularity: J, handleChange: Y, yearPageSize: X, yearPageStart: Z, nextButtonBind: re, todayButtonBind: ie, yearSelectorBind: ae, handleYearSelect: oe, showYearSelector: se, monthSelectorBind: Q, handleMonthSelect: ce, showMonthSelector: le, previousButtonBind: ue } = e(j, {
|
|
62
63
|
rounded: "md",
|
|
63
64
|
startOfWeek: 0,
|
|
64
65
|
color: "primary",
|
|
65
66
|
defaultView: "date"
|
|
66
|
-
},
|
|
67
|
+
}, N, k);
|
|
67
68
|
function $(e) {
|
|
68
|
-
let t = x(
|
|
69
|
-
return
|
|
70
|
-
"size-3 transition-all duration-200 ease-in-out": !0,
|
|
69
|
+
let t = x(K)?.class;
|
|
70
|
+
return ee({
|
|
71
|
+
"size-3 shrink-0 transition-all duration-200 ease-in-out": !0,
|
|
71
72
|
[T(t) ? t : ""]: !0,
|
|
72
73
|
"rotate-180": e
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
|
-
return (e, a) => (_(), c("div",
|
|
76
|
+
return (e, a) => (_(), c("div", h({
|
|
77
|
+
ref_key: "rootRef",
|
|
78
|
+
ref: R
|
|
79
|
+
}, S(z)), [l("div", g(p(S(G))), [l("div", te, [S(se) ? (_(), c("button", g(h({ key: 0 }, S(ae))), [l("span", E, b(S(U)), 1), d(S(i), h({
|
|
76
80
|
size: "2xs",
|
|
77
81
|
icon: "chevronDown"
|
|
78
|
-
}, S(
|
|
82
|
+
}, S(K), { class: $(S(P) === "year") }), null, 16, ["class"])], 16)) : s("", !0), S(le) ? (_(), c("button", g(h({ key: 1 }, S(Q))), [l("span", D, b(S(W)), 1), d(S(i), h({
|
|
79
83
|
size: "2xs",
|
|
80
84
|
icon: "chevronDown"
|
|
81
|
-
}, S(
|
|
82
|
-
l("button", g(p(S(
|
|
85
|
+
}, S(K), { class: $(S(P) === "month") }), null, 16, ["class"])], 16)) : s("", !0)]), S(L) ? (_(), c("div", O, [
|
|
86
|
+
l("button", g(p(S(ue))), [d(S(i), h({
|
|
83
87
|
size: "sm",
|
|
84
88
|
icon: "chevronLeft"
|
|
85
|
-
}, S(
|
|
86
|
-
l("button", g(p(S(
|
|
87
|
-
l("button", g(p(S(
|
|
89
|
+
}, S(K)), null, 16)], 16),
|
|
90
|
+
l("button", g(p(S(ie))), [...a[3] ||= [l("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
|
|
91
|
+
l("button", g(p(S(re))), [d(S(i), h({
|
|
88
92
|
size: "sm",
|
|
89
93
|
icon: "chevronRight"
|
|
90
|
-
}, S(
|
|
91
|
-
])) : s("", !0)], 16), l("div", g(p(S(
|
|
92
|
-
"model-value": S(
|
|
93
|
-
range: S(
|
|
94
|
-
"view-date": S(
|
|
95
|
-
onChange: S(
|
|
96
|
-
multiple: S(
|
|
97
|
-
"preview-date":
|
|
98
|
-
onViewDateChange: S(
|
|
99
|
-
"start-of-week": S(
|
|
100
|
-
"disable-dates": S(
|
|
101
|
-
"disable-years": S(
|
|
102
|
-
"hide-weekdays": S(
|
|
103
|
-
"disable-months": S(
|
|
104
|
-
"hide-outside-days": S(
|
|
105
|
-
onPreviewDateChange: a[0] ||= (e) =>
|
|
94
|
+
}, S(K)), null, 16)], 16)
|
|
95
|
+
])) : s("", !0)], 16), l("div", g(p(S(ne))), [S(P) === "date" ? (_(), o(t, h({ key: 0 }, S(I), {
|
|
96
|
+
"model-value": S(N),
|
|
97
|
+
range: S(F).range,
|
|
98
|
+
"view-date": S(B),
|
|
99
|
+
onChange: S(Y),
|
|
100
|
+
multiple: S(F).multiple,
|
|
101
|
+
"preview-date": j.previewDate,
|
|
102
|
+
onViewDateChange: S(q),
|
|
103
|
+
"start-of-week": S(F).startOfWeek,
|
|
104
|
+
"disable-dates": S(F).disableDates,
|
|
105
|
+
"disable-years": S(F).disableYears,
|
|
106
|
+
"hide-weekdays": S(F).hideWeekdays,
|
|
107
|
+
"disable-months": S(F).disableMonths,
|
|
108
|
+
"hide-outside-days": S(F).hideOutsideDays,
|
|
109
|
+
onPreviewDateChange: a[0] ||= (e) => k("previewDateChange", e)
|
|
106
110
|
}), {
|
|
107
111
|
day: w((t) => [y(e.$slots, "day", g(p(t)), () => [u(b(t.label), 1)])]),
|
|
108
112
|
_: 3
|
|
@@ -120,18 +124,18 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, D = {
|
|
|
120
124
|
"hide-weekdays",
|
|
121
125
|
"disable-months",
|
|
122
126
|
"hide-outside-days"
|
|
123
|
-
])) : S(
|
|
124
|
-
year: S(
|
|
125
|
-
range: S(
|
|
126
|
-
"model-value": S(
|
|
127
|
-
multiple: S(
|
|
128
|
-
onChange: S(
|
|
129
|
-
"preview-date":
|
|
130
|
-
"disable-dates": S(
|
|
131
|
-
"disable-years": S(
|
|
132
|
-
"disable-months": S(
|
|
133
|
-
selection: S(
|
|
134
|
-
onPreviewDateChange: a[1] ||= (e) =>
|
|
127
|
+
])) : S(P) === "month" ? (_(), o(n, h({ key: 1 }, S(I), {
|
|
128
|
+
year: S(V),
|
|
129
|
+
range: S(F).range,
|
|
130
|
+
"model-value": S(H),
|
|
131
|
+
multiple: S(F).multiple,
|
|
132
|
+
onChange: S(ce),
|
|
133
|
+
"preview-date": j.previewDate,
|
|
134
|
+
"disable-dates": S(F).disableDates,
|
|
135
|
+
"disable-years": S(F).disableYears,
|
|
136
|
+
"disable-months": S(F).disableMonths,
|
|
137
|
+
selection: S(J) === "month" ? S(N) : void 0,
|
|
138
|
+
onPreviewDateChange: a[1] ||= (e) => k("previewDateChange", e)
|
|
135
139
|
}), null, 16, [
|
|
136
140
|
"year",
|
|
137
141
|
"range",
|
|
@@ -143,18 +147,18 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, D = {
|
|
|
143
147
|
"disable-years",
|
|
144
148
|
"disable-months",
|
|
145
149
|
"selection"
|
|
146
|
-
])) : S(
|
|
147
|
-
range: S(
|
|
148
|
-
"model-value": S(
|
|
149
|
-
"page-size": S(
|
|
150
|
-
"start-year": S(
|
|
151
|
-
multiple: S(
|
|
152
|
-
onChange: S(
|
|
153
|
-
"preview-date":
|
|
154
|
-
"disable-dates": S(
|
|
155
|
-
"disable-years": S(
|
|
156
|
-
selection: S(
|
|
157
|
-
onPreviewDateChange: a[2] ||= (e) =>
|
|
150
|
+
])) : S(P) === "year" ? (_(), o(r, h({ key: 2 }, S(I), {
|
|
151
|
+
range: S(F).range,
|
|
152
|
+
"model-value": S(V),
|
|
153
|
+
"page-size": S(X),
|
|
154
|
+
"start-year": S(Z),
|
|
155
|
+
multiple: S(F).multiple,
|
|
156
|
+
onChange: S(oe),
|
|
157
|
+
"preview-date": j.previewDate,
|
|
158
|
+
"disable-dates": S(F).disableDates,
|
|
159
|
+
"disable-years": S(F).disableYears,
|
|
160
|
+
selection: S(J) === "year" ? S(N) : void 0,
|
|
161
|
+
onPreviewDateChange: a[2] ||= (e) => k("previewDateChange", e)
|
|
158
162
|
}), null, 16, [
|
|
159
163
|
"range",
|
|
160
164
|
"model-value",
|
|
@@ -169,4 +173,4 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, D = {
|
|
|
169
173
|
])) : s("", !0)], 16)], 16));
|
|
170
174
|
}
|
|
171
175
|
});
|
|
172
|
-
export {
|
|
176
|
+
export { k as default };
|
|
@@ -281,6 +281,14 @@ export interface CalendarOwnProps {
|
|
|
281
281
|
* @default undefined
|
|
282
282
|
*/
|
|
283
283
|
viewDate?: Date;
|
|
284
|
+
/**
|
|
285
|
+
* When `true`, the mouse wheel or trackpad over the calendar steps previous /
|
|
286
|
+
* next like the header buttons, and does not scroll the page. Pickers
|
|
287
|
+
* (`DatePicker`, `DateRangePicker`, …) turn it on.
|
|
288
|
+
*
|
|
289
|
+
* @default false
|
|
290
|
+
*/
|
|
291
|
+
wheelNavigation?: boolean;
|
|
284
292
|
}
|
|
285
293
|
export type CalendarProps = MergeHtmlProps<CalendarOwnProps, HTMLAttributes> & {
|
|
286
294
|
/**
|
|
@@ -20,8 +20,9 @@ export declare function useCalendar(props: MaybeRefOrGetter<CalendarOwnProps>, l
|
|
|
20
20
|
timeZone: string | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
showNav: import('vue').ComputedRef<boolean>;
|
|
23
|
+
rootRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
23
24
|
timeZone: import('vue').ComputedRef<string | undefined>;
|
|
24
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarOwnProps, "error" | "color" | "fill" | "
|
|
25
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<CalendarOwnProps, "error" | "color" | "fill" | "view" | "classes" | "customProps" | "disabled" | "rounded" | "granularity" | "hideMonths" | "hideOutsideDays" | "hideWeekdays" | "hideYears" | "multiple" | "range" | "startOfWeek" | "timeZone" | "defaultValue" | "readOnly" | "disableDates" | "disableMonths" | "disableYears" | "maxDate" | "minDate" | "previewDate" | "viewDate" | "defaultView" | "wheelNavigation">>>>;
|
|
25
26
|
viewDate: import('vue').ComputedRef<Date>;
|
|
26
27
|
viewYear: import('vue').ComputedRef<number>;
|
|
27
28
|
bodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|