@bridge-ui/vue 0.21.0 → 0.22.1
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/Alert/Alert.vue_vue_type_script_setup_true_lang.js +24 -10
- package/dist/Components/Alert/alert.types.d.ts +5 -4
- package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
- package/dist/Components/Alert/composables/useAlert.js +2 -2
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +1 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +7 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +2 -2
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +3 -2
- package/dist/Components/Avatar/composables/useAvatar.js +2 -2
- package/dist/Components/Calendar/composables/useCalendar.js +132 -131
- package/dist/Components/CalendarDate/composables/useCalendarDate.js +116 -115
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +132 -131
- package/dist/Components/Card/Card.vue_vue_type_script_setup_true_lang.js +24 -10
- package/dist/Components/Card/card.types.d.ts +5 -4
- package/dist/Components/Card/composables/useCard.d.ts +2 -2
- package/dist/Components/Card/composables/useCard.js +2 -2
- package/dist/Components/Carousel/composables/useCarousel.js +6 -6
- package/dist/Components/Chip/Chip.vue.d.ts +0 -1
- package/dist/Components/Chip/Chip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +48 -39
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +33 -36
- package/dist/Components/DataTable/composables/useDataTable.d.ts +2 -0
- package/dist/Components/DataTable/composables/useDataTable.js +226 -216
- package/dist/Components/EmptyState/EmptyState.vue.d.ts +0 -3
- package/dist/Components/EmptyState/EmptyState.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +51 -57
- package/dist/Components/FileUpload/composables/useFileUpload.d.ts +2 -0
- package/dist/Components/FileUpload/composables/useFileUpload.js +6 -4
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Link/link.types.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.js +4 -5
- package/dist/Components/Pagination/composables/usePagination.js +9 -9
- package/dist/Components/Select/Select.vue.d.ts +1 -0
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/Components/Select/composables/useSelect.d.ts +2 -2
- package/dist/Components/Select/composables/useSelect.js +3 -2
- package/dist/Components/Select/select.types.d.ts +7 -0
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +97 -72
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.js +2 -2
- package/dist/Components/Snackbar/snackbar.types.d.ts +5 -4
- package/dist/Components/Table/composables/useTableRow.js +3 -3
- package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Text/composables/useText.d.ts +1 -1
- package/dist/Components/Text/text.types.d.ts +1 -1
- package/dist/Components/TimePanel/composables/useTimePanel.js +113 -112
- package/dist/Utils/index.d.ts +6 -0
- package/dist/Utils/index.js +21 -17
- package/dist/index.js +157 -157
- package/docs/components/Autocomplete.md +23 -22
- package/docs/components/Link.md +1 -1
- package/docs/components/Select.md +22 -21
- package/docs/components/Text.md +6 -4
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useDateAdapter as e } from "../../../Adapters/Date/useDateAdapter.js";
|
|
2
2
|
import { useResolveMessage as t } from "../../../Adapters/I18n/useI18nAdapter.js";
|
|
3
|
-
import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
|
|
4
|
-
import { computed as i, getCurrentInstance as
|
|
5
|
-
import { get as
|
|
6
|
-
import { CALENDAR_YEAR_PAGE_SIZE as
|
|
7
|
-
import { calendarRoundedProps as
|
|
8
|
-
import { cn as
|
|
3
|
+
import { mergePartBind as n, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as te, useDefaultTextSizeClass as r } from "../../../Utils/index.js";
|
|
4
|
+
import { computed as i, getCurrentInstance as ne, ref as a, toValue as o, useAttrs as re } from "vue";
|
|
5
|
+
import { get as ie, isFunction as s, isNil as c, omit as ae } from "es-toolkit/compat";
|
|
6
|
+
import { CALENDAR_YEAR_PAGE_SIZE as oe, applyDateSelection as l, calendarPanelViewFromGranularity as u, getCalendarNavigationMessage as d, getCalendarYearPageStart as f, isCalendarMonthPanelHidden as p, isCalendarYearPanelHidden as m, isDateRangeValue as h, resolveCalendarFocusDate as se, resolveCalendarMonthSelection as ce, resolveCalendarNavigation as le, resolveCalendarPanelView as g, resolveCalendarYearSelection as ue } from "@bridge-ui/core/Domain";
|
|
7
|
+
import { calendarRoundedProps as de } from "@bridge-ui/core/Tokens";
|
|
8
|
+
import { cn as _, mergeBridgeUILayeredClasses as fe, splitComponentProps as pe } from "@bridge-ui/core/Utils";
|
|
9
9
|
// src/Components/CalendarRange/composables/useCalendarRange.ts
|
|
10
|
-
var
|
|
10
|
+
var v = [
|
|
11
11
|
"fill",
|
|
12
12
|
"color",
|
|
13
13
|
"error",
|
|
@@ -34,62 +34,62 @@ var fe = [
|
|
|
34
34
|
"disableMonths",
|
|
35
35
|
"hideOutsideDays"
|
|
36
36
|
];
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function y(e) {
|
|
38
|
+
return h(e) ? e : null;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
let
|
|
42
|
-
bridgeKeys:
|
|
40
|
+
function b(h, b, x, S) {
|
|
41
|
+
let me = re(), C = e(), w = t(), T = i(() => pe({
|
|
42
|
+
bridgeKeys: v,
|
|
43
43
|
props: {
|
|
44
|
-
...
|
|
45
|
-
...
|
|
44
|
+
...me,
|
|
45
|
+
...o(h)
|
|
46
46
|
}
|
|
47
|
-
})), { merged: E, entry:
|
|
48
|
-
libDefaults:
|
|
47
|
+
})), { merged: E, entry: he } = ee({
|
|
48
|
+
libDefaults: b,
|
|
49
49
|
componentName: "Calendar",
|
|
50
50
|
props: () => T.value.componentProps
|
|
51
|
-
}), D = i(() => E.value.customProps),
|
|
51
|
+
}), D = i(() => E.value.customProps), ge = i(() => ae(T.value.inheritedAttrs, [
|
|
52
52
|
"onChange",
|
|
53
53
|
"onViewDateChange",
|
|
54
54
|
"onPreviewDateChange",
|
|
55
55
|
"onUpdate:modelValue"
|
|
56
|
-
])), O =
|
|
56
|
+
])), O = te({
|
|
57
57
|
props: () => T.value.componentProps,
|
|
58
58
|
entry: i(() => {})
|
|
59
|
-
}), k = i(() => E.value.timeZone), A = i(() =>
|
|
60
|
-
let e =
|
|
61
|
-
return !
|
|
62
|
-
}), M = i(() => !
|
|
59
|
+
}), k = i(() => E.value.timeZone), A = i(() => o(h)), j = i(() => {
|
|
60
|
+
let e = ne()?.vnode.props ?? {}, t = s(e.onViewDateChange) || s(e["onUpdate:viewDate"]);
|
|
61
|
+
return !c(A.value.viewDate) && t;
|
|
62
|
+
}), M = i(() => !c(A.value.previewDate)), N = a(g({
|
|
63
63
|
hideYears: E.value.hideYears,
|
|
64
64
|
hideMonths: E.value.hideMonths,
|
|
65
65
|
granularity: A.value.granularity ?? "day",
|
|
66
|
-
view: A.value.defaultView ??
|
|
67
|
-
})), P =
|
|
66
|
+
view: A.value.defaultView ?? u(A.value.granularity ?? "day")
|
|
67
|
+
})), P = a(C.value.startOfMonth(c(A.value.viewDate) ? se(x.value, C.value, k.value) : A.value.viewDate, k.value)), F = a(null), I = a(null), L = i(() => E.value.granularity ?? "day"), R = i(() => g({
|
|
68
68
|
view: N.value,
|
|
69
69
|
granularity: L.value,
|
|
70
70
|
hideYears: E.value.hideYears,
|
|
71
71
|
hideMonths: E.value.hideMonths
|
|
72
|
-
})), z = i(() => j.value ? A.value.viewDate : P.value), B = i(() => C.value.addMonths(z.value, 1, k.value)),
|
|
73
|
-
let e =
|
|
74
|
-
return
|
|
72
|
+
})), z = i(() => j.value ? A.value.viewDate : P.value), B = i(() => C.value.addMonths(z.value, 1, k.value)), _e = i(() => M.value ? A.value.previewDate ?? null : F.value), ve = i(() => String(C.value.getYear(z.value, k.value))), ye = i(() => C.value.getMonthNames()[C.value.getMonth(z.value, k.value)] ?? ""), be = i(() => C.value.getMonthNames()[C.value.getMonth(B.value, k.value)] ?? ""), V = i(() => C.value.getYear(z.value, k.value)), H = i(() => C.value.getMonth(z.value, k.value)), U = i(() => c(I.value) ? f(V.value) : I.value), W = i(() => {
|
|
73
|
+
let e = fe(de, he.value?.tokens?.rounded);
|
|
74
|
+
return ie(e, E.value.rounded);
|
|
75
75
|
}), G = (e) => {
|
|
76
76
|
N.value = e;
|
|
77
|
-
},
|
|
78
|
-
I.value =
|
|
77
|
+
}, xe = () => {
|
|
78
|
+
I.value = f(V.value), G("year");
|
|
79
79
|
}, K = (e) => {
|
|
80
80
|
let t = C.value.startOfMonth(e, k.value);
|
|
81
|
-
j.value || (P.value = t),
|
|
82
|
-
}, xe = (e) => {
|
|
83
|
-
K(e);
|
|
81
|
+
j.value || (P.value = t), S("viewDateChange", t);
|
|
84
82
|
}, Se = (e) => {
|
|
83
|
+
K(e);
|
|
84
|
+
}, Ce = (e) => {
|
|
85
85
|
K(C.value.addMonths(e, -1, k.value));
|
|
86
86
|
}, q = (e) => {
|
|
87
|
-
let t =
|
|
88
|
-
|
|
87
|
+
let t = y(e);
|
|
88
|
+
x.value = t, S("change", t);
|
|
89
|
+
}, we = (e) => {
|
|
90
|
+
M.value || (F.value = e), S("previewDateChange", e);
|
|
89
91
|
}, J = (e) => {
|
|
90
|
-
|
|
91
|
-
}, Y = (e) => {
|
|
92
|
-
let t = se({
|
|
92
|
+
let t = le({
|
|
93
93
|
direction: e,
|
|
94
94
|
view: R.value,
|
|
95
95
|
adapter: C.value,
|
|
@@ -98,16 +98,16 @@ function y(g, y, b, x) {
|
|
|
98
98
|
yearPageStart: U.value
|
|
99
99
|
});
|
|
100
100
|
t.type === "yearPage" ? I.value = t.yearPageStart : K(t.viewDate);
|
|
101
|
-
}, Ce = () => {
|
|
102
|
-
Y(-1);
|
|
103
|
-
}, we = () => {
|
|
104
|
-
Y(1);
|
|
105
101
|
}, Te = () => {
|
|
102
|
+
J(-1);
|
|
103
|
+
}, Ee = () => {
|
|
104
|
+
J(1);
|
|
105
|
+
}, De = () => {
|
|
106
106
|
let e = C.value.startOfMonth(C.value.now(k.value), k.value);
|
|
107
|
-
I.value = null, K(e), G(
|
|
108
|
-
},
|
|
107
|
+
I.value = null, K(e), G(u(L.value));
|
|
108
|
+
}, Oe = (e) => {
|
|
109
109
|
I.value = null;
|
|
110
|
-
let t =
|
|
110
|
+
let t = ue({
|
|
111
111
|
year: e,
|
|
112
112
|
adapter: C.value,
|
|
113
113
|
viewDate: z.value,
|
|
@@ -115,33 +115,33 @@ function y(g, y, b, x) {
|
|
|
115
115
|
granularity: L.value,
|
|
116
116
|
hideMonths: E.value.hideMonths
|
|
117
117
|
});
|
|
118
|
-
K(t.viewDate), t.type === "commit" ? q(
|
|
118
|
+
K(t.viewDate), t.type === "commit" ? q(l({
|
|
119
119
|
mode: "range",
|
|
120
|
-
value:
|
|
120
|
+
value: x.value,
|
|
121
121
|
next: t.date,
|
|
122
122
|
adapter: C.value,
|
|
123
123
|
timeZone: k.value,
|
|
124
124
|
granularity: L.value
|
|
125
125
|
})) : G(t.view);
|
|
126
|
-
},
|
|
126
|
+
}, Y = () => {
|
|
127
127
|
G("month");
|
|
128
|
-
},
|
|
129
|
-
let t =
|
|
128
|
+
}, ke = (e) => {
|
|
129
|
+
let t = ce({
|
|
130
130
|
month: e,
|
|
131
131
|
adapter: C.value,
|
|
132
132
|
viewDate: z.value,
|
|
133
133
|
timeZone: k.value,
|
|
134
134
|
granularity: L.value
|
|
135
135
|
});
|
|
136
|
-
K(t.viewDate), t.type === "commit" ? q(
|
|
136
|
+
K(t.viewDate), t.type === "commit" ? q(l({
|
|
137
137
|
mode: "range",
|
|
138
|
-
value:
|
|
138
|
+
value: x.value,
|
|
139
139
|
next: t.date,
|
|
140
140
|
adapter: C.value,
|
|
141
141
|
timeZone: k.value,
|
|
142
142
|
granularity: L.value
|
|
143
143
|
})) : G(t.view);
|
|
144
|
-
},
|
|
144
|
+
}, Ae = V, je = H, Me = i(() => ({
|
|
145
145
|
color: E.value.color,
|
|
146
146
|
error: E.value.error,
|
|
147
147
|
rounded: E.value.rounded,
|
|
@@ -150,161 +150,162 @@ function y(g, y, b, x) {
|
|
|
150
150
|
disabled: E.value.disabled,
|
|
151
151
|
readOnly: E.value.readOnly,
|
|
152
152
|
timeZone: E.value.timeZone
|
|
153
|
-
})),
|
|
153
|
+
})), X = i(() => E.value.orientation === "vertical"), Ne = i(() => n(D.value?.root, ge.value, _({
|
|
154
154
|
"flex flex-col overflow-hidden": !0,
|
|
155
155
|
"w-full": E.value.fill,
|
|
156
156
|
"min-w-max": !0,
|
|
157
|
-
"w-fit": !E.value.fill &&
|
|
157
|
+
"w-fit": !E.value.fill && X.value,
|
|
158
158
|
[O.value.root ?? ""]: !0
|
|
159
|
-
}))),
|
|
159
|
+
}))), Pe = i(() => n(D.value?.header, {}, _({
|
|
160
160
|
"relative flex w-full items-center p-2.5": !0,
|
|
161
161
|
[O.value.header ?? ""]: !0
|
|
162
|
-
}))),
|
|
162
|
+
}))), Fe = i(() => n(D.value?.months, {}, _({
|
|
163
163
|
"flex min-w-0 flex-1 items-center justify-center": !0,
|
|
164
164
|
[O.value.months ?? ""]: !0
|
|
165
|
-
}))),
|
|
165
|
+
}))), Ie = i(() => n(D.value?.startHeader, {}, _({
|
|
166
166
|
"flex min-w-0 flex-1 items-center pr-4": !0,
|
|
167
167
|
[O.value.startHeader ?? ""]: !0
|
|
168
|
-
}))),
|
|
168
|
+
}))), Le = i(() => n(D.value?.endHeader, {}, _({
|
|
169
169
|
"items-center": !0,
|
|
170
|
-
"flex min-w-0 flex-1 items-center pl-4": !
|
|
171
|
-
"flex justify-center":
|
|
170
|
+
"flex min-w-0 flex-1 items-center pl-4": !X.value || R.value === "month",
|
|
171
|
+
"flex justify-center": X.value && R.value !== "month",
|
|
172
172
|
[O.value.endHeader ?? ""]: !0
|
|
173
|
-
}))),
|
|
173
|
+
}))), Re = i(() => n(D.value?.body, {}, _({
|
|
174
174
|
"relative flex min-h-64 flex-col": !0,
|
|
175
175
|
[O.value.body ?? ""]: !0
|
|
176
|
-
}))),
|
|
176
|
+
}))), ze = i(() => n(D.value?.panels, { "aria-hidden": R.value !== "date" }, _({
|
|
177
177
|
"flex w-full": !0,
|
|
178
|
-
"flex-row": !
|
|
179
|
-
"flex-col":
|
|
178
|
+
"flex-row": !X.value,
|
|
179
|
+
"flex-col": X.value,
|
|
180
180
|
invisible: R.value !== "date",
|
|
181
181
|
[O.value.panels ?? ""]: !0
|
|
182
|
-
}))),
|
|
182
|
+
}))), Be = i(() => n(D.value?.start, {}, _({
|
|
183
183
|
"flex min-w-72 flex-1 flex-col px-2.5": !0,
|
|
184
|
-
"pb-2.5": !
|
|
184
|
+
"pb-2.5": !X.value,
|
|
185
185
|
[O.value.start ?? ""]: !0
|
|
186
|
-
}))),
|
|
186
|
+
}))), Ve = i(() => n(D.value?.end, {}, _({
|
|
187
187
|
"flex min-w-72 flex-1 flex-col px-2.5 pb-2.5": !0,
|
|
188
188
|
[O.value.end ?? ""]: !0
|
|
189
|
-
}))),
|
|
189
|
+
}))), He = i(() => _({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Ue = r(), Z = i(() => n(D.value?.selector, {
|
|
190
190
|
type: "button",
|
|
191
191
|
disabled: E.value.disabled
|
|
192
|
-
},
|
|
193
|
-
"inline-flex cursor-pointer items-center gap-x-2 px-1.5 py-1
|
|
192
|
+
}, _({
|
|
193
|
+
"inline-flex cursor-pointer items-center gap-x-2 px-1.5 py-1 font-medium text-dark-600 hover:bg-dark-100 focus:outline-none disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
|
|
194
194
|
[W.value ?? ""]: !0,
|
|
195
|
+
[Ue.value]: !0,
|
|
195
196
|
[O.value.selector ?? ""]: !0
|
|
196
|
-
}))),
|
|
197
|
+
}))), Q = i(() => n(D.value?.navButton, {
|
|
197
198
|
type: "button",
|
|
198
199
|
disabled: E.value.disabled
|
|
199
|
-
},
|
|
200
|
+
}, _({
|
|
200
201
|
"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center text-dark-600 hover:bg-dark-100 disabled:cursor-not-allowed dark:text-dark-300 dark:hover:bg-dark-800": !0,
|
|
201
202
|
[W.value ?? ""]: !0,
|
|
202
203
|
[O.value.navButton ?? ""]: !0
|
|
203
|
-
}))),
|
|
204
|
-
|
|
205
|
-
onClick:
|
|
204
|
+
}))), We = i(() => w(d(R.value, -1))), $ = i(() => w(d(R.value, 1))), Ge = i(() => n(D.value?.previousButton, {
|
|
205
|
+
...Q.value,
|
|
206
|
+
onClick: Te,
|
|
206
207
|
type: "button",
|
|
207
208
|
disabled: E.value.disabled,
|
|
208
|
-
"aria-label":
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
onClick:
|
|
209
|
+
"aria-label": We.value
|
|
210
|
+
}, _({ [O.value.navButton ?? ""]: !0 }))), Ke = i(() => n(D.value?.nextButton, {
|
|
211
|
+
...Q.value,
|
|
212
|
+
onClick: Ee,
|
|
212
213
|
type: "button",
|
|
213
214
|
disabled: E.value.disabled,
|
|
214
|
-
"aria-label":
|
|
215
|
-
},
|
|
216
|
-
onClick:
|
|
215
|
+
"aria-label": $.value
|
|
216
|
+
}, _({ [O.value.navButton ?? ""]: !0 }))), qe = i(() => n(D.value?.todayButton, {
|
|
217
|
+
onClick: De,
|
|
217
218
|
type: "button",
|
|
218
219
|
disabled: E.value.disabled,
|
|
219
220
|
"aria-label": w("Today")
|
|
220
|
-
},
|
|
221
|
+
}, _({
|
|
221
222
|
"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center hover:bg-dark-100 disabled:cursor-not-allowed dark:hover:bg-dark-800": !0,
|
|
222
223
|
[W.value ?? ""]: !0,
|
|
223
224
|
[O.value.navButton ?? ""]: !0
|
|
224
|
-
}))),
|
|
225
|
-
...
|
|
226
|
-
onClick:
|
|
225
|
+
}))), Je = i(() => n(D.value?.selector, void 0, {
|
|
226
|
+
...Z.value,
|
|
227
|
+
onClick: xe,
|
|
227
228
|
type: "button",
|
|
228
229
|
"aria-label": w("Select year"),
|
|
229
|
-
disabled: E.value.disabled ||
|
|
230
|
+
disabled: E.value.disabled || m({
|
|
230
231
|
granularity: L.value,
|
|
231
232
|
hideYears: E.value.hideYears
|
|
232
233
|
})
|
|
233
|
-
})),
|
|
234
|
+
})), Ye = i(() => ({
|
|
234
235
|
...n(D.value?.selector, void 0, {
|
|
235
|
-
...
|
|
236
|
+
...Z.value,
|
|
236
237
|
type: "button",
|
|
237
238
|
"aria-label": w("Select month"),
|
|
238
|
-
disabled: E.value.disabled ||
|
|
239
|
+
disabled: E.value.disabled || p({
|
|
239
240
|
granularity: L.value,
|
|
240
241
|
hideMonths: E.value.hideMonths
|
|
241
242
|
})
|
|
242
243
|
}),
|
|
243
|
-
onClick:
|
|
244
|
-
})),
|
|
244
|
+
onClick: Y
|
|
245
|
+
})), Xe = i(() => ({
|
|
245
246
|
...n(D.value?.selector, void 0, {
|
|
246
|
-
...
|
|
247
|
+
...Z.value,
|
|
247
248
|
type: "button",
|
|
248
249
|
"aria-label": w("Select end month"),
|
|
249
|
-
disabled: E.value.disabled ||
|
|
250
|
+
disabled: E.value.disabled || p({
|
|
250
251
|
granularity: L.value,
|
|
251
252
|
hideMonths: E.value.hideMonths
|
|
252
253
|
})
|
|
253
254
|
}),
|
|
254
|
-
onClick:
|
|
255
|
-
})),
|
|
255
|
+
onClick: Y
|
|
256
|
+
})), Ze = i(() => !m({
|
|
256
257
|
granularity: L.value,
|
|
257
258
|
hideYears: E.value.hideYears
|
|
258
|
-
})),
|
|
259
|
+
})), Qe = i(() => !p({
|
|
259
260
|
granularity: L.value,
|
|
260
261
|
hideMonths: E.value.hideMonths
|
|
261
262
|
}));
|
|
262
263
|
return {
|
|
263
264
|
view: R,
|
|
264
|
-
model:
|
|
265
|
-
shared:
|
|
265
|
+
model: x,
|
|
266
|
+
shared: Me,
|
|
266
267
|
merged: E,
|
|
267
268
|
showNav: i(() => !0),
|
|
268
|
-
endBind:
|
|
269
|
-
rootBind:
|
|
270
|
-
bodyBind:
|
|
269
|
+
endBind: Ve,
|
|
270
|
+
rootBind: Ne,
|
|
271
|
+
bodyBind: Re,
|
|
271
272
|
viewDate: z,
|
|
272
273
|
viewYear: V,
|
|
273
|
-
startBind:
|
|
274
|
+
startBind: Be,
|
|
274
275
|
viewMonth: H,
|
|
275
|
-
yearLabel:
|
|
276
|
-
monthLabel:
|
|
277
|
-
headerBind:
|
|
278
|
-
monthsBind:
|
|
279
|
-
panelsBind:
|
|
280
|
-
isVertical:
|
|
276
|
+
yearLabel: ve,
|
|
277
|
+
monthLabel: ye,
|
|
278
|
+
headerBind: Pe,
|
|
279
|
+
monthsBind: Fe,
|
|
280
|
+
panelsBind: ze,
|
|
281
|
+
isVertical: X,
|
|
281
282
|
endViewDate: B,
|
|
282
|
-
previewDate:
|
|
283
|
+
previewDate: _e,
|
|
283
284
|
setViewDate: K,
|
|
284
285
|
navIconBind: i(() => D.value?.navIcon),
|
|
285
286
|
granularity: L,
|
|
286
287
|
handleChange: q,
|
|
287
|
-
endMonthLabel:
|
|
288
|
-
endHeaderBind:
|
|
289
|
-
monthYearBind:
|
|
290
|
-
nextButtonBind:
|
|
291
|
-
monthPanelYear:
|
|
292
|
-
startHeaderBind:
|
|
293
|
-
todayButtonBind:
|
|
294
|
-
monthPanelValue:
|
|
295
|
-
yearSelectorBind:
|
|
296
|
-
handleYearSelect:
|
|
297
|
-
showYearSelector:
|
|
298
|
-
monthSelectorBind:
|
|
299
|
-
handleMonthSelect:
|
|
300
|
-
showMonthSelector:
|
|
301
|
-
previousButtonBind:
|
|
302
|
-
endMonthSelectorBind:
|
|
303
|
-
handleEndViewDateChange:
|
|
304
|
-
handlePreviewDateChange:
|
|
305
|
-
handleStartViewDateChange:
|
|
288
|
+
endMonthLabel: be,
|
|
289
|
+
endHeaderBind: Le,
|
|
290
|
+
monthYearBind: He,
|
|
291
|
+
nextButtonBind: Ke,
|
|
292
|
+
monthPanelYear: Ae,
|
|
293
|
+
startHeaderBind: Ie,
|
|
294
|
+
todayButtonBind: qe,
|
|
295
|
+
monthPanelValue: je,
|
|
296
|
+
yearSelectorBind: Je,
|
|
297
|
+
handleYearSelect: Oe,
|
|
298
|
+
showYearSelector: Ze,
|
|
299
|
+
monthSelectorBind: Ye,
|
|
300
|
+
handleMonthSelect: ke,
|
|
301
|
+
showMonthSelector: Qe,
|
|
302
|
+
previousButtonBind: Ge,
|
|
303
|
+
endMonthSelectorBind: Xe,
|
|
304
|
+
handleEndViewDateChange: Ce,
|
|
305
|
+
handlePreviewDateChange: we,
|
|
306
|
+
handleStartViewDateChange: Se,
|
|
306
307
|
yearPageStart: U,
|
|
307
|
-
yearPageSize:
|
|
308
|
+
yearPageSize: oe
|
|
308
309
|
};
|
|
309
310
|
}
|
|
310
|
-
export {
|
|
311
|
+
export { b as useCalendarRange };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { hasNamedSlot as e, hasSlotOrProp as t, isPropPresent as n } from "../../Utils/slotOrProp.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import r from "../Text/Text.js";
|
|
3
|
+
import { useCard as i } from "./composables/useCard.js";
|
|
4
|
+
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, normalizeProps as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
4
5
|
// src/Components/Card/Card.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
+
var b = /*@__PURE__*/ d({
|
|
6
7
|
inheritAttrs: !1,
|
|
7
8
|
__name: "Card",
|
|
8
9
|
props: {
|
|
@@ -15,18 +16,31 @@ var _ = /*@__PURE__*/ l({
|
|
|
15
16
|
title: {},
|
|
16
17
|
variant: {}
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
let { slots:
|
|
19
|
+
setup(d) {
|
|
20
|
+
let { slots: b, merged: x, bodyBind: S, rootBind: C, titleBind: w, footerBind: T, headerBind: E, hasDefaultBody: D } = i(d, {
|
|
20
21
|
shadow: "sm",
|
|
21
22
|
rounded: "sm",
|
|
22
23
|
padding: "medium",
|
|
23
24
|
variant: "elevated"
|
|
24
25
|
});
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
return (i, d) => (h(), c("div", m(f(v(C))), [
|
|
27
|
+
v(e)(v(b), "header") ? g(i.$slots, "header", {}, void 0, void 0, 0) : v(t)(v(b), "title", v(x).title) ? (h(), c("div", m(p({ key: 1 }, v(E))), [u(v(r), p({
|
|
28
|
+
as: "div",
|
|
29
|
+
color: "inherit"
|
|
30
|
+
}, v(w)), {
|
|
31
|
+
default: y(() => [v(e)(v(b), "title") ? g(i.$slots, "title", {}, void 0, void 0, 0) : v(n)(v(x).title) ? (h(), c(a, { key: 1 }, [l(_(v(x).title), 1)], 64)) : s("", !0)]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 16), g(i.$slots, "action")], 16)) : s("", !0),
|
|
34
|
+
v(D) ? (h(), o(v(r), p({
|
|
35
|
+
key: 2,
|
|
36
|
+
as: "div",
|
|
37
|
+
color: "inherit"
|
|
38
|
+
}, v(S)), {
|
|
39
|
+
default: y(() => [g(i.$slots, "default")]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 16)) : s("", !0),
|
|
42
|
+
v(e)(v(b), "footer") ? (h(), c("div", m(p({ key: 3 }, v(T))), [g(i.$slots, "footer")], 16)) : s("", !0)
|
|
29
43
|
], 16));
|
|
30
44
|
}
|
|
31
45
|
});
|
|
32
|
-
export {
|
|
46
|
+
export { b as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, Slot } from 'vue';
|
|
2
2
|
import { CardPadding, CardRounded, CardShadow, CardVariant } from '@bridge-ui/core/Tokens';
|
|
3
3
|
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
4
|
+
import { TextProps } from '../Text';
|
|
4
5
|
export interface CardShadowOverrides {}
|
|
5
6
|
export interface CardPaddingOverrides {}
|
|
6
7
|
export interface CardRoundedOverrides {}
|
|
@@ -29,9 +30,9 @@ export interface CardClasses {
|
|
|
29
30
|
}
|
|
30
31
|
export interface CardCustomProps {
|
|
31
32
|
/**
|
|
32
|
-
* Props forwarded to the default body container.
|
|
33
|
+
* Props forwarded to the `Text` that renders the default body container.
|
|
33
34
|
*/
|
|
34
|
-
body?:
|
|
35
|
+
body?: Partial<Omit<TextProps, "as">>;
|
|
35
36
|
/**
|
|
36
37
|
* Props forwarded to the footer container.
|
|
37
38
|
*/
|
|
@@ -45,9 +46,9 @@ export interface CardCustomProps {
|
|
|
45
46
|
*/
|
|
46
47
|
root?: HTMLAttributes;
|
|
47
48
|
/**
|
|
48
|
-
* Props forwarded to the title container.
|
|
49
|
+
* Props forwarded to the `Text` that renders the title container.
|
|
49
50
|
*/
|
|
50
|
-
title?:
|
|
51
|
+
title?: Partial<Omit<TextProps, "as">>;
|
|
51
52
|
}
|
|
52
53
|
export interface CardOwnProps {
|
|
53
54
|
/**
|
|
@@ -7,9 +7,9 @@ export declare function useCard(props: CardOwnProps, libDefaults: CardLibDefault
|
|
|
7
7
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
8
8
|
}>;
|
|
9
9
|
merged: import('vue').ComputedRef<CardMerged>;
|
|
10
|
-
bodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('
|
|
10
|
+
bodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", Partial<Omit<import('../../Text').TextProps, "as">> | undefined, {}>>;
|
|
11
11
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<CardProps, "classes" | "customProps" | "title" | "rounded" | "variant" | "padding" | "shadow" | "borderless">>>;
|
|
12
|
-
titleBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('
|
|
12
|
+
titleBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", Partial<Omit<import('../../Text').TextProps, "as">> | undefined, {}>>;
|
|
13
13
|
footerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
14
14
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
15
15
|
hasDefaultBody: import('vue').ComputedRef<boolean>;
|
|
@@ -45,7 +45,7 @@ function h(h, g) {
|
|
|
45
45
|
let e = f(c, x.value?.tokens?.rounded);
|
|
46
46
|
return o(e, b.value.rounded);
|
|
47
47
|
}), A = r(() => e(S.value?.body, {}, d({
|
|
48
|
-
grow: !0,
|
|
48
|
+
"grow font-normal": !0,
|
|
49
49
|
[o(O.value, "body") ?? ""]: !0,
|
|
50
50
|
[o(T.value, "text") ?? ""]: !0,
|
|
51
51
|
[o(C.value, "body") ?? ""]: !0
|
|
@@ -76,7 +76,7 @@ function h(h, g) {
|
|
|
76
76
|
[o(C.value, "root") ?? ""]: !0
|
|
77
77
|
}))),
|
|
78
78
|
titleBind: r(() => e(S.value?.title, {}, d({
|
|
79
|
-
"
|
|
79
|
+
"font-medium whitespace-normal": !0,
|
|
80
80
|
[o(T.value, "text") ?? ""]: !0,
|
|
81
81
|
[o(C.value, "title") ?? ""]: !0
|
|
82
82
|
}))),
|
|
@@ -192,8 +192,8 @@ function w(w, T, E) {
|
|
|
192
192
|
},
|
|
193
193
|
class: x({
|
|
194
194
|
[d(H.value, "viewport") ?? ""]: !0,
|
|
195
|
-
[d(
|
|
196
|
-
[d(
|
|
195
|
+
[d(H.value, "viewportVertical") ?? ""]: Z.value,
|
|
196
|
+
[d(B.value, "viewport") ?? ""]: !0
|
|
197
197
|
}),
|
|
198
198
|
onPointerdown: (e) => {
|
|
199
199
|
(e.pointerType !== "mouse" || e.button === 0) && (F.value = {
|
|
@@ -218,8 +218,8 @@ function w(w, T, E) {
|
|
|
218
218
|
"data-part": "track",
|
|
219
219
|
class: x({
|
|
220
220
|
[d(H.value, "track") ?? ""]: !0,
|
|
221
|
-
[d(
|
|
222
|
-
[d(
|
|
221
|
+
[d(H.value, "trackVertical") ?? ""]: Z.value,
|
|
222
|
+
[d(B.value, "track") ?? ""]: !0
|
|
223
223
|
}),
|
|
224
224
|
style: y(z.value, {
|
|
225
225
|
rtl: Q.value,
|
|
@@ -232,8 +232,8 @@ function w(w, T, E) {
|
|
|
232
232
|
"data-part": "controls",
|
|
233
233
|
class: x({
|
|
234
234
|
[d(H.value, "controls") ?? ""]: !0,
|
|
235
|
-
[d(
|
|
236
|
-
[d(
|
|
235
|
+
[d(H.value, "controlsVertical") ?? ""]: Z.value,
|
|
236
|
+
[d(B.value, "controls") ?? ""]: !0
|
|
237
237
|
})
|
|
238
238
|
})), we = a(() => X.value ? Z.value ? d(H.value, "frameVertical") ?? "relative" : d(H.value, "frame") ?? "relative" : "relative"), Te = a(() => t(L.value.customProps?.prev, {}, {
|
|
239
239
|
"data-part": "prev",
|
|
@@ -5,7 +5,6 @@ declare const __VLS_base: import('vue').DefineComponent<ChipOwnProps, {}, {}, {}
|
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<ChipOwnProps> & Readonly<{
|
|
6
6
|
onDismiss?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
|
-
size: import('@bridge-ui/core/Utils').MergeProps<import('@bridge-ui/core/Tokens').ChipSize, import('./chip.types').ChipSizeOverrides>;
|
|
9
8
|
disabled: boolean;
|
|
10
9
|
clearLabel: string;
|
|
11
10
|
dismissible: boolean;
|