@bridge-ui/vue 0.21.0 → 0.22.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.
Files changed (51) hide show
  1. package/dist/Components/Alert/Alert.vue_vue_type_script_setup_true_lang.js +24 -10
  2. package/dist/Components/Alert/alert.types.d.ts +5 -4
  3. package/dist/Components/Alert/composables/useAlert.d.ts +2 -2
  4. package/dist/Components/Alert/composables/useAlert.js +2 -2
  5. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +1 -0
  6. package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +5 -1
  7. package/dist/Components/Autocomplete/autocomplete.types.d.ts +7 -0
  8. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +2 -2
  9. package/dist/Components/Autocomplete/composables/useAutocomplete.js +3 -2
  10. package/dist/Components/Avatar/composables/useAvatar.js +2 -2
  11. package/dist/Components/Calendar/composables/useCalendar.js +132 -131
  12. package/dist/Components/CalendarDate/composables/useCalendarDate.js +116 -115
  13. package/dist/Components/CalendarRange/composables/useCalendarRange.js +132 -131
  14. package/dist/Components/Card/Card.vue_vue_type_script_setup_true_lang.js +24 -10
  15. package/dist/Components/Card/card.types.d.ts +5 -4
  16. package/dist/Components/Card/composables/useCard.d.ts +2 -2
  17. package/dist/Components/Card/composables/useCard.js +2 -2
  18. package/dist/Components/Carousel/composables/useCarousel.js +6 -6
  19. package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +48 -39
  20. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +33 -36
  21. package/dist/Components/DataTable/composables/useDataTable.d.ts +2 -0
  22. package/dist/Components/DataTable/composables/useDataTable.js +226 -216
  23. package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +51 -57
  24. package/dist/Components/FileUpload/composables/useFileUpload.d.ts +2 -0
  25. package/dist/Components/FileUpload/composables/useFileUpload.js +6 -4
  26. package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/dist/Components/Link/link.types.d.ts +1 -1
  28. package/dist/Components/ListItem/composables/useListItem.js +4 -5
  29. package/dist/Components/Pagination/composables/usePagination.js +9 -9
  30. package/dist/Components/Select/Select.vue.d.ts +1 -0
  31. package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +5 -1
  32. package/dist/Components/Select/composables/useSelect.d.ts +2 -2
  33. package/dist/Components/Select/composables/useSelect.js +3 -2
  34. package/dist/Components/Select/select.types.d.ts +7 -0
  35. package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +97 -72
  36. package/dist/Components/Snackbar/composables/useSnackbar.d.ts +2 -2
  37. package/dist/Components/Snackbar/composables/useSnackbar.js +2 -2
  38. package/dist/Components/Snackbar/snackbar.types.d.ts +5 -4
  39. package/dist/Components/Table/composables/useTableRow.js +3 -3
  40. package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/dist/Components/Text/composables/useText.d.ts +1 -1
  42. package/dist/Components/Text/text.types.d.ts +1 -1
  43. package/dist/Components/TimePanel/composables/useTimePanel.js +113 -112
  44. package/dist/Utils/index.d.ts +6 -0
  45. package/dist/Utils/index.js +21 -17
  46. package/dist/index.js +157 -157
  47. package/docs/components/Autocomplete.md +23 -22
  48. package/docs/components/Link.md +1 -1
  49. package/docs/components/Select.md +22 -21
  50. package/docs/components/Text.md +6 -4
  51. 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 a, ref as o, toValue as s, useAttrs as te } from "vue";
5
- import { get as ne, isFunction as c, isNil as l, omit as re } from "es-toolkit/compat";
6
- import { CALENDAR_YEAR_PAGE_SIZE as ie, applyDateSelection as u, calendarPanelViewFromGranularity as d, getCalendarNavigationMessage as f, getCalendarYearPageStart as p, isCalendarMonthPanelHidden as m, isCalendarYearPanelHidden as h, isDateRangeValue as g, resolveCalendarFocusDate as ae, resolveCalendarMonthSelection as oe, resolveCalendarNavigation as se, resolveCalendarPanelView as _, resolveCalendarYearSelection as ce } from "@bridge-ui/core/Domain";
7
- import { calendarRoundedProps as le } from "@bridge-ui/core/Tokens";
8
- import { cn as v, mergeBridgeUILayeredClasses as ue, splitComponentProps as de } from "@bridge-ui/core/Utils";
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 fe = [
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 pe(e) {
38
- return g(e) ? e : null;
37
+ function y(e) {
38
+ return h(e) ? e : null;
39
39
  }
40
- function y(g, y, b, x) {
41
- let S = te(), C = e(), w = t(), T = i(() => de({
42
- bridgeKeys: fe,
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
- ...S,
45
- ...s(g)
44
+ ...me,
45
+ ...o(h)
46
46
  }
47
- })), { merged: E, entry: me } = ee({
48
- libDefaults: y,
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), he = i(() => re(T.value.inheritedAttrs, [
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 = r({
56
+ ])), O = te({
57
57
  props: () => T.value.componentProps,
58
58
  entry: i(() => {})
59
- }), k = i(() => E.value.timeZone), A = i(() => s(g)), j = i(() => {
60
- let e = a()?.vnode.props ?? {}, t = c(e.onViewDateChange) || c(e["onUpdate:viewDate"]);
61
- return !l(A.value.viewDate) && t;
62
- }), M = i(() => !l(A.value.previewDate)), N = o(_({
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 ?? d(A.value.granularity ?? "day")
67
- })), P = o(C.value.startOfMonth(l(A.value.viewDate) ? ae(b.value, C.value, k.value) : A.value.viewDate, k.value)), F = o(null), I = o(null), L = i(() => E.value.granularity ?? "day"), R = i(() => _({
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)), ge = i(() => M.value ? A.value.previewDate ?? null : F.value), _e = i(() => String(C.value.getYear(z.value, k.value))), ve = i(() => C.value.getMonthNames()[C.value.getMonth(z.value, k.value)] ?? ""), ye = 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(() => l(I.value) ? p(V.value) : I.value), W = i(() => {
73
- let e = ue(le, me.value?.tokens?.rounded);
74
- return ne(e, E.value.rounded);
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
- }, be = () => {
78
- I.value = p(V.value), G("year");
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), x("viewDateChange", 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 = pe(e);
88
- b.value = t, x("change", t);
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
- M.value || (F.value = e), x("previewDateChange", e);
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(d(L.value));
108
- }, Ee = (e) => {
107
+ I.value = null, K(e), G(u(L.value));
108
+ }, Oe = (e) => {
109
109
  I.value = null;
110
- let t = ce({
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(u({
118
+ K(t.viewDate), t.type === "commit" ? q(l({
119
119
  mode: "range",
120
- value: b.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
- }, X = () => {
126
+ }, Y = () => {
127
127
  G("month");
128
- }, De = (e) => {
129
- let t = oe({
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(u({
136
+ K(t.viewDate), t.type === "commit" ? q(l({
137
137
  mode: "range",
138
- value: b.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
- }, Oe = V, ke = H, Ae = i(() => ({
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
- })), Z = i(() => E.value.orientation === "vertical"), je = i(() => n(D.value?.root, he.value, v({
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 && Z.value,
157
+ "w-fit": !E.value.fill && X.value,
158
158
  [O.value.root ?? ""]: !0
159
- }))), Me = i(() => n(D.value?.header, {}, v({
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
- }))), Ne = i(() => n(D.value?.months, {}, v({
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
- }))), Pe = i(() => n(D.value?.startHeader, {}, v({
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
- }))), Fe = i(() => n(D.value?.endHeader, {}, v({
168
+ }))), Le = i(() => n(D.value?.endHeader, {}, _({
169
169
  "items-center": !0,
170
- "flex min-w-0 flex-1 items-center pl-4": !Z.value || R.value === "month",
171
- "flex justify-center": Z.value && R.value !== "month",
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
- }))), Ie = i(() => n(D.value?.body, {}, v({
173
+ }))), Re = i(() => n(D.value?.body, {}, _({
174
174
  "relative flex min-h-64 flex-col": !0,
175
175
  [O.value.body ?? ""]: !0
176
- }))), Le = i(() => n(D.value?.panels, { "aria-hidden": R.value !== "date" }, v({
176
+ }))), ze = i(() => n(D.value?.panels, { "aria-hidden": R.value !== "date" }, _({
177
177
  "flex w-full": !0,
178
- "flex-row": !Z.value,
179
- "flex-col": Z.value,
178
+ "flex-row": !X.value,
179
+ "flex-col": X.value,
180
180
  invisible: R.value !== "date",
181
181
  [O.value.panels ?? ""]: !0
182
- }))), Re = i(() => n(D.value?.start, {}, v({
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": !Z.value,
184
+ "pb-2.5": !X.value,
185
185
  [O.value.start ?? ""]: !0
186
- }))), ze = i(() => n(D.value?.end, {}, v({
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
- }))), Be = i(() => v({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Q = i(() => n(D.value?.selector, {
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
- }, v({
193
- "inline-flex cursor-pointer items-center gap-x-2 px-1.5 py-1 text-sm 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,
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
- }))), $ = i(() => n(D.value?.navButton, {
197
+ }))), Q = i(() => n(D.value?.navButton, {
197
198
  type: "button",
198
199
  disabled: E.value.disabled
199
- }, v({
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
- }))), Ve = i(() => w(f(R.value, -1))), He = i(() => w(f(R.value, 1))), Ue = i(() => n(D.value?.previousButton, {
204
- ...$.value,
205
- onClick: Ce,
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": Ve.value
209
- }, v({ [O.value.navButton ?? ""]: !0 }))), We = i(() => n(D.value?.nextButton, {
210
- ...$.value,
211
- onClick: we,
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": He.value
215
- }, v({ [O.value.navButton ?? ""]: !0 }))), Ge = i(() => n(D.value?.todayButton, {
216
- onClick: Te,
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
- }, v({
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
- }))), Ke = i(() => n(D.value?.selector, void 0, {
225
- ...Q.value,
226
- onClick: be,
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 || h({
230
+ disabled: E.value.disabled || m({
230
231
  granularity: L.value,
231
232
  hideYears: E.value.hideYears
232
233
  })
233
- })), qe = i(() => ({
234
+ })), Ye = i(() => ({
234
235
  ...n(D.value?.selector, void 0, {
235
- ...Q.value,
236
+ ...Z.value,
236
237
  type: "button",
237
238
  "aria-label": w("Select month"),
238
- disabled: E.value.disabled || m({
239
+ disabled: E.value.disabled || p({
239
240
  granularity: L.value,
240
241
  hideMonths: E.value.hideMonths
241
242
  })
242
243
  }),
243
- onClick: X
244
- })), Je = i(() => ({
244
+ onClick: Y
245
+ })), Xe = i(() => ({
245
246
  ...n(D.value?.selector, void 0, {
246
- ...Q.value,
247
+ ...Z.value,
247
248
  type: "button",
248
249
  "aria-label": w("Select end month"),
249
- disabled: E.value.disabled || m({
250
+ disabled: E.value.disabled || p({
250
251
  granularity: L.value,
251
252
  hideMonths: E.value.hideMonths
252
253
  })
253
254
  }),
254
- onClick: X
255
- })), Ye = i(() => !h({
255
+ onClick: Y
256
+ })), Ze = i(() => !m({
256
257
  granularity: L.value,
257
258
  hideYears: E.value.hideYears
258
- })), Xe = i(() => !m({
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: b,
265
- shared: Ae,
265
+ model: x,
266
+ shared: Me,
266
267
  merged: E,
267
268
  showNav: i(() => !0),
268
- endBind: ze,
269
- rootBind: je,
270
- bodyBind: Ie,
269
+ endBind: Ve,
270
+ rootBind: Ne,
271
+ bodyBind: Re,
271
272
  viewDate: z,
272
273
  viewYear: V,
273
- startBind: Re,
274
+ startBind: Be,
274
275
  viewMonth: H,
275
- yearLabel: _e,
276
- monthLabel: ve,
277
- headerBind: Me,
278
- monthsBind: Ne,
279
- panelsBind: Le,
280
- isVertical: Z,
276
+ yearLabel: ve,
277
+ monthLabel: ye,
278
+ headerBind: Pe,
279
+ monthsBind: Fe,
280
+ panelsBind: ze,
281
+ isVertical: X,
281
282
  endViewDate: B,
282
- previewDate: ge,
283
+ previewDate: _e,
283
284
  setViewDate: K,
284
285
  navIconBind: i(() => D.value?.navIcon),
285
286
  granularity: L,
286
287
  handleChange: q,
287
- endMonthLabel: ye,
288
- endHeaderBind: Fe,
289
- monthYearBind: Be,
290
- nextButtonBind: We,
291
- monthPanelYear: Oe,
292
- startHeaderBind: Pe,
293
- todayButtonBind: Ge,
294
- monthPanelValue: ke,
295
- yearSelectorBind: Ke,
296
- handleYearSelect: Ee,
297
- showYearSelector: Ye,
298
- monthSelectorBind: qe,
299
- handleMonthSelect: De,
300
- showMonthSelector: Xe,
301
- previousButtonBind: Ue,
302
- endMonthSelectorBind: Je,
303
- handleEndViewDateChange: Se,
304
- handlePreviewDateChange: J,
305
- handleStartViewDateChange: xe,
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: ie
308
+ yearPageSize: oe
308
309
  };
309
310
  }
310
- export { y as useCalendarRange };
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 { useCard as r } from "./composables/useCard.js";
3
- import { Fragment as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g } from "vue";
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 _ = /*@__PURE__*/ l({
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(l) {
19
- let { slots: _, merged: v, bodyBind: y, rootBind: b, titleBind: x, footerBind: S, headerBind: C, hasDefaultBody: w } = r(l, {
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 (r, l) => (p(), o("div", f(u(g(b))), [
26
- g(e)(g(_), "header") ? m(r.$slots, "header", {}, void 0, void 0, 0) : g(t)(g(_), "title", g(v).title) ? (p(), o("div", f(d({ key: 1 }, g(C))), [s("div", f(u(g(x))), [g(e)(g(_), "title") ? m(r.$slots, "title", {}, void 0, void 0, 0) : g(n)(g(v).title) ? (p(), o(i, { key: 1 }, [c(h(g(v).title), 1)], 64)) : a("", !0)], 16), m(r.$slots, "action")], 16)) : a("", !0),
27
- g(w) ? (p(), o("div", f(d({ key: 2 }, g(y))), [m(r.$slots, "default")], 16)) : a("", !0),
28
- g(e)(g(_), "footer") ? (p(), o("div", f(d({ key: 3 }, g(S))), [m(r.$slots, "footer")], 16)) : a("", !0)
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 { _ as default };
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?: HTMLAttributes;
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?: HTMLAttributes;
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('vue').HTMLAttributes | undefined, {}>>;
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('vue').HTMLAttributes | undefined, {}>>;
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
- "text-base font-medium whitespace-normal": !0,
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(B.value, "viewport") ?? ""]: !0,
196
- [d(H.value, "viewportVertical") ?? ""]: Z.value
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(B.value, "track") ?? ""]: !0,
222
- [d(H.value, "trackVertical") ?? ""]: Z.value
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(B.value, "controls") ?? ""]: !0,
236
- [d(H.value, "controlsVertical") ?? ""]: Z.value
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",