@bridge-ui/vue 0.5.1 → 0.7.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/ai/skills/bridge-ui-components/SKILL.md +2 -2
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
- package/dist/Adapters/I18n/useI18nAdapter.js +4 -1
- package/dist/Components/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Accordion/accordion.types.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.js +1 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +2 -2
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +150 -145
- package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +33 -28
- package/dist/Components/BaseField/BaseFieldCorner.js +5 -0
- package/dist/Components/BaseField/BaseFieldCorner.vue.d.ts +17 -0
- package/dist/Components/BaseField/BaseFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/BaseField/baseField.types.d.ts +4 -2
- package/dist/Components/BaseField/composables/useBaseField.d.ts +1 -1
- package/dist/Components/BaseField/composables/useBaseField.js +11 -8
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Button/button.types.d.ts +6 -0
- package/dist/Components/Button/composables/useButton.d.ts +4 -1
- package/dist/Components/Button/composables/useButton.js +88 -69
- package/dist/Components/ButtonGroup/ButtonGroup.js +5 -0
- package/dist/Components/ButtonGroup/ButtonGroup.vue.d.ts +14 -0
- package/dist/Components/ButtonGroup/ButtonGroup.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/Components/ButtonGroup/buttonGroup.types.d.ts +93 -0
- package/dist/Components/ButtonGroup/buttonGroupInjectionKey.d.ts +7 -0
- package/dist/Components/ButtonGroup/buttonGroupInjectionKey.js +4 -0
- package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +16 -0
- package/dist/Components/ButtonGroup/composables/useButtonGroup.js +66 -0
- package/dist/Components/ButtonGroup/index.d.ts +4 -0
- package/dist/Components/ButtonGroup/index.js +4 -0
- package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Checkbox/composables/useCheckbox.js +1 -1
- package/dist/Components/ColorField/composables/useColorField.d.ts +1 -1
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +180 -158
- package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTablePagination.js +5 -0
- package/dist/Components/DataTable/DataTablePagination.vue.d.ts +24 -0
- package/dist/Components/DataTable/DataTablePagination.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/Components/DataTable/DataTableSortButton.vue.d.ts +5 -11
- package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +22 -26
- package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -6
- package/dist/Components/DataTable/composables/useDataTable.js +268 -263
- package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +69 -0
- package/dist/Components/DataTable/composables/useDataTablePagination.js +130 -0
- package/dist/Components/DataTable/dataTable.types.d.ts +27 -12
- package/dist/Components/DataTable/dataTablePagination.types.d.ts +169 -0
- package/dist/Components/DataTable/index.d.ts +2 -1
- package/dist/Components/DateField/composables/useDateField.d.ts +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -1
- package/dist/Components/FieldOverlay/composables/useFieldOverlay.js +4 -1
- package/dist/Components/FormField/FilledFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/FormFieldCorner.js +5 -0
- package/dist/Components/FormField/FormFieldCorner.vue.d.ts +17 -0
- package/dist/Components/FormField/FormFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/FormField/NotchedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/Components/FormField/OutlinedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/StackedFormField.vue.d.ts +6 -6
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +34 -29
- package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/FormField/composables/useFormField.js +15 -9
- package/dist/Components/FormField/formField.types.d.ts +4 -2
- package/dist/Components/List/composables/useList.js +1 -1
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
- package/dist/Components/ListItem/composables/useListItem.js +101 -86
- package/dist/Components/ListSection/composables/useListSection.js +34 -31
- package/dist/Components/ListSection/listSection.types.d.ts +2 -1
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/Components/Listbox/collectComposedListboxOptions.d.ts +5 -0
- package/dist/Components/Listbox/collectComposedListboxOptions.js +27 -0
- package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -1
- package/dist/Components/OtpField/composables/useOtpField.d.ts +1 -1
- package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/Pagination/composables/usePagination.d.ts +4 -2
- package/dist/Components/Pagination/composables/usePagination.js +125 -127
- package/dist/Components/Pagination/pagination.types.d.ts +5 -5
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -1
- package/dist/Components/Radio/composables/useRadio.js +2 -1
- package/dist/Components/Select/composables/useSelect.d.ts +2 -2
- package/dist/Components/Select/composables/useSelect.js +104 -99
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +29 -28
- package/dist/Components/Sidebar/composables/useSidebarTrigger.js +14 -14
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.js +53 -53
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -0
- package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/Components/Tabs/composables/useTabs.js +16 -10
- package/dist/Components/Tabs/tabs.types.d.ts +3 -3
- package/dist/Components/TextField/composables/useTextField.d.ts +1 -1
- package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -1
- package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -1
- package/dist/Components/TimePanel/composables/useTimePanel.js +106 -106
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +150 -147
- package/docs/README.md +1 -0
- package/docs/components/Accordion.md +1 -1
- package/docs/components/Badge.md +2 -0
- package/docs/components/Button.md +5 -1
- package/docs/components/ButtonGroup.md +124 -0
- package/docs/components/DataTable.md +9 -11
- package/docs/components/Divider.md +1 -0
- package/docs/components/I18n.md +65 -24
- package/docs/components/Pagination.md +5 -3
- package/docs/components/Table.md +2 -2
- package/docs/components/Tabs.md +24 -6
- package/docs/components/ToggleGroup.md +1 -1
- package/docs/examples/i18n-dictionary.ts +31 -10
- package/docs/examples/i18n-vue-i18n.ts +7 -6
- package/docs/examples/icon-fontawesome.ts +4 -0
- package/docs/examples/icon-heroicons.ts +5 -1
- package/docs/examples/icon-lucide.ts +4 -0
- package/docs/examples/icon-phosphor.ts +4 -0
- package/docs/examples/icon-tabler.ts +4 -0
- package/package.json +2 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
|
|
2
2
|
import { hasNamedSlot as t } from "../../Utils/slotOrProp.js";
|
|
3
3
|
import { mergeNestedComponentProps as n } from "../../Utils/index.js";
|
|
4
|
-
import { useListbox as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { LISTBOX_INJECTION_KEY as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Fragment as
|
|
4
|
+
import { useListbox as r } from "./composables/useListbox.js";
|
|
5
|
+
import i from "../Button/Button.js";
|
|
6
|
+
import a from "../FieldOverlay/FieldOverlay.js";
|
|
7
|
+
import o from "../List/List.js";
|
|
8
|
+
import { LISTBOX_INJECTION_KEY as ee } from "./listboxInjectionKey.js";
|
|
9
|
+
import te from "../ListItem/ListItem.js";
|
|
10
|
+
import ne from "../ListSection/ListSection.js";
|
|
11
|
+
import s from "../Progress/Progress.js";
|
|
12
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as re, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeModels as v, mergeProps as y, normalizeClass as b, normalizeProps as x, openBlock as S, provide as ie, ref as ae, renderList as oe, renderSlot as C, toDisplayString as w, unref as T, useModel as E, useSlots as se, watch as D, withCtx as O } from "vue";
|
|
13
13
|
import { isNil as ce } from "es-toolkit/compat";
|
|
14
|
-
import { entriesFromListboxOptions as le, flattenListboxOptions as ue, mapListboxEntriesToRows as de } from "@bridge-ui/core/Domain";
|
|
15
|
-
import { cn as
|
|
14
|
+
import { entriesFromListboxOptions as le, flattenListboxOptions as ue, mapListboxEntriesToRows as de, upsertListboxOption as k } from "@bridge-ui/core/Domain";
|
|
15
|
+
import { cn as A } from "@bridge-ui/core/Utils";
|
|
16
16
|
//#region src/Components/Listbox/Listbox.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
17
|
+
var j = { key: 1 }, M = /*@__PURE__*/ g({
|
|
18
18
|
__name: "Listbox",
|
|
19
|
-
props: /*@__PURE__*/
|
|
19
|
+
props: /*@__PURE__*/ v({
|
|
20
20
|
anchorEl: {},
|
|
21
21
|
classes: {},
|
|
22
22
|
color: { default: "primary" },
|
|
@@ -67,114 +67,114 @@ var A = { key: 1 }, j = /*@__PURE__*/ h({
|
|
|
67
67
|
},
|
|
68
68
|
modelModifiers: {}
|
|
69
69
|
}),
|
|
70
|
-
emits: /*@__PURE__*/
|
|
70
|
+
emits: /*@__PURE__*/ v([
|
|
71
71
|
"apply",
|
|
72
72
|
"cancel",
|
|
73
73
|
"registered-options-change",
|
|
74
74
|
"select",
|
|
75
75
|
"show-change"
|
|
76
76
|
], ["update:modelValue"]),
|
|
77
|
-
setup(
|
|
78
|
-
let
|
|
79
|
-
D(
|
|
80
|
-
|
|
77
|
+
setup(g, { emit: v }) {
|
|
78
|
+
let M = se(), N = v, P = E(g, "modelValue");
|
|
79
|
+
D(P, (e) => {
|
|
80
|
+
N("show-change", e);
|
|
81
81
|
});
|
|
82
|
-
let
|
|
82
|
+
let F = g, I = e(), L = l(() => F.emptyMessage ?? I("No options")), R = l(() => F.loadingMessage ?? I("Loading...")), { merged: z, checkClass: B, scrollBind: V, footerBind: H, showFooter: fe, applyLabel: pe, cancelLabel: me, messageBind: U, surfaceBind: he, sizeClasses: ge, mergedClasses: W, applyButtonProps: _e, optionHoverClass: ve, cancelButtonProps: ye, optionSelectedClass: be, optionHighlightedClass: xe } = r(F, {
|
|
83
83
|
size: "md",
|
|
84
84
|
color: "primary"
|
|
85
|
-
}),
|
|
85
|
+
}), Se = l(() => F.options ?? []), G = l(() => F.entries ? F.entries : le(Se.value)), K = l(() => ue(G.value)), q = l(() => t(M, "default")), J = l(() => !F.loading && !q.value && K.value.length === 0 && F.hideEmptyMessage !== !0), Ce = l(() => A(B.value, W.value.check)), Y = ae([]);
|
|
86
86
|
function X(e) {
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
function Ce(e) {
|
|
90
|
-
e.disabled || M("select", e);
|
|
87
|
+
return F.isSelected?.(e) ?? !1;
|
|
91
88
|
}
|
|
92
89
|
function we(e) {
|
|
93
|
-
|
|
90
|
+
e.disabled || N("select", e);
|
|
91
|
+
}
|
|
92
|
+
function Te(e) {
|
|
93
|
+
let t = k(Y.value, e);
|
|
94
|
+
return t !== Y.value && (Y.value = t), () => {
|
|
94
95
|
Y.value = Y.value.filter((t) => String(t.value) !== String(e.value));
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
+
function Ee(e) {
|
|
98
99
|
return (q.value ? Y.value : K.value).findIndex((t) => String(t.value) === String(e));
|
|
99
100
|
}
|
|
100
101
|
D(Y, (e) => {
|
|
101
|
-
q.value &&
|
|
102
|
+
q.value && N("registered-options-change", e);
|
|
102
103
|
}, { deep: !0 });
|
|
103
|
-
let
|
|
104
|
-
getOptionIndex:
|
|
105
|
-
registerOption:
|
|
106
|
-
onSelect:
|
|
107
|
-
listboxId:
|
|
104
|
+
let De = l(() => ({
|
|
105
|
+
getOptionIndex: Ee,
|
|
106
|
+
registerOption: Te,
|
|
107
|
+
onSelect: we,
|
|
108
|
+
listboxId: F.listboxId,
|
|
108
109
|
isSelected: X,
|
|
109
|
-
sizeClasses:
|
|
110
|
-
showCheckmark:
|
|
111
|
-
checkClass:
|
|
112
|
-
highlightedIndex:
|
|
113
|
-
optionHoverClass:
|
|
114
|
-
optionSelectedClass:
|
|
115
|
-
optionHighlightedClass:
|
|
110
|
+
sizeClasses: ge.value,
|
|
111
|
+
showCheckmark: F.showCheckmark,
|
|
112
|
+
checkClass: Ce.value,
|
|
113
|
+
highlightedIndex: F.highlightedIndex,
|
|
114
|
+
optionHoverClass: ve.value,
|
|
115
|
+
optionSelectedClass: be.value,
|
|
116
|
+
optionHighlightedClass: xe.value,
|
|
116
117
|
mergedClasses: {
|
|
117
118
|
optionHover: W.value.optionHover,
|
|
118
119
|
optionSelected: W.value.optionSelected,
|
|
119
120
|
optionHighlighted: W.value.optionHighlighted
|
|
120
121
|
}
|
|
121
122
|
}));
|
|
122
|
-
|
|
123
|
-
let
|
|
124
|
-
modal:
|
|
125
|
-
drawer:
|
|
123
|
+
ie(ee, De);
|
|
124
|
+
let Oe = l(() => de(G.value, X)), ke = l(() => z.value.customProps?.menu), Ae = l(() => z.value.customProps?.modal), je = l(() => z.value.customProps?.drawer), Me = l(() => z.value.customProps?.list), Ne = l(() => z.value.customProps?.listItem), Pe = l(() => z.value.customProps?.progress), Fe = l(() => z.value.customProps?.listSection), Ie = l(() => ({
|
|
125
|
+
modal: Ae.value,
|
|
126
|
+
drawer: je.value,
|
|
126
127
|
menu: {
|
|
127
|
-
anchorEl:
|
|
128
|
-
placement:
|
|
129
|
-
disableAutoFocus:
|
|
130
|
-
...ce(
|
|
131
|
-
...
|
|
128
|
+
anchorEl: F.anchorEl,
|
|
129
|
+
placement: F.placement,
|
|
130
|
+
disableAutoFocus: F.disableAutoFocus,
|
|
131
|
+
...ce(F.rounded) ? {} : { rounded: F.rounded },
|
|
132
|
+
...ke.value
|
|
132
133
|
}
|
|
133
|
-
})),
|
|
134
|
+
})), Z = l(() => ({
|
|
134
135
|
size: "xs",
|
|
135
136
|
"aria-hidden": !0,
|
|
136
|
-
color:
|
|
137
|
-
...n(
|
|
137
|
+
color: z.value.color,
|
|
138
|
+
...n(Pe.value, {
|
|
138
139
|
class: "shrink-0",
|
|
139
140
|
classes: { bar: W.value.loading }
|
|
140
141
|
})
|
|
141
|
-
})),
|
|
142
|
-
dense: !0,
|
|
142
|
+
})), Le = l(() => ({
|
|
143
143
|
role: "listbox",
|
|
144
|
-
id:
|
|
145
|
-
"aria-labelledby":
|
|
146
|
-
"aria-multiselectable":
|
|
147
|
-
...n(
|
|
144
|
+
id: F.listboxId,
|
|
145
|
+
"aria-labelledby": F.labelledBy,
|
|
146
|
+
"aria-multiselectable": F.multiple || void 0,
|
|
147
|
+
...n(Me.value)
|
|
148
148
|
}));
|
|
149
149
|
function Q() {
|
|
150
|
-
|
|
150
|
+
N("apply"), P.value = !1;
|
|
151
151
|
}
|
|
152
152
|
function $() {
|
|
153
|
-
|
|
153
|
+
N("cancel"), P.value = !1;
|
|
154
154
|
}
|
|
155
|
-
return (e, n) => (
|
|
156
|
-
modelValue:
|
|
157
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
158
|
-
overlay:
|
|
159
|
-
"custom-props":
|
|
155
|
+
return (e, n) => (S(), u(T(a), {
|
|
156
|
+
modelValue: P.value,
|
|
157
|
+
"onUpdate:modelValue": n[0] ||= (e) => P.value = e,
|
|
158
|
+
overlay: g.overlay,
|
|
159
|
+
"custom-props": Ie.value
|
|
160
160
|
}, {
|
|
161
|
-
default: O(() => [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
default: O(() => [q.value ?
|
|
161
|
+
default: O(() => [p("div", { class: b(T(he)) }, [
|
|
162
|
+
T(t)(T(M), "beforeOptions") ? C(e.$slots, "beforeOptions", {}, void 0, void 0, 0) : d("", !0),
|
|
163
|
+
g.loading ? (S(), f(c, { key: 1 }, [h(T(s), x(_(Z.value)), null, 16), p("div", x(_(T(U))), [T(t)(T(M), "loading") ? C(e.$slots, "loading", {}, void 0, void 0, 0) : (S(), f("span", j, w(R.value), 1))], 16)], 64)) : (S(), f("div", x(y({ key: 2 }, T(V))), [h(T(o), x(_(Le.value)), {
|
|
164
|
+
default: O(() => [q.value ? C(e.$slots, "default", {}, void 0, void 0, 0) : (S(!0), f(c, { key: 1 }, oe(Oe.value, (n) => (S(), f(c, { key: n.key }, [n.kind === "section" ? (S(), u(T(ne), y({
|
|
165
165
|
key: 0,
|
|
166
166
|
title: n.title,
|
|
167
167
|
sticky: n.sticky
|
|
168
|
-
}, { ref_for: !0 },
|
|
168
|
+
}, { ref_for: !0 }, Fe.value), null, 16, ["title", "sticky"])) : (S(), u(T(te), y({
|
|
169
169
|
key: 1,
|
|
170
170
|
interactive: "",
|
|
171
171
|
value: n.option.value,
|
|
172
172
|
disabled: n.option.disabled,
|
|
173
173
|
secondary: n.option.description,
|
|
174
|
-
primary:
|
|
175
|
-
}, { ref_for: !0 },
|
|
174
|
+
primary: T(t)(T(M), "option") ? void 0 : n.option.label
|
|
175
|
+
}, { ref_for: !0 }, Ne.value), re({ _: 2 }, [T(t)(T(M), "option") ? {
|
|
176
176
|
name: "default",
|
|
177
|
-
fn: O(() => [
|
|
177
|
+
fn: O(() => [C(e.$slots, "option", {
|
|
178
178
|
option: n.option,
|
|
179
179
|
selected: n.selected
|
|
180
180
|
})]),
|
|
@@ -187,21 +187,21 @@ var A = { key: 1 }, j = /*@__PURE__*/ h({
|
|
|
187
187
|
]))], 64))), 128))]),
|
|
188
188
|
_: 3
|
|
189
189
|
}, 16)], 16)),
|
|
190
|
-
J.value && !
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
J.value && !T(t)(T(M), "empty") ? (S(), f("div", x(y({ key: 3 }, T(U))), w(L.value), 17)) : J.value && T(t)(T(M), "empty") ? C(e.$slots, "empty", {}, void 0, void 0, 4) : d("", !0),
|
|
191
|
+
T(t)(T(M), "afterOptions") ? C(e.$slots, "afterOptions", {}, void 0, void 0, 5) : d("", !0),
|
|
192
|
+
T(fe) ? (S(), f("div", x(y({ key: 6 }, T(H))), [C(e.$slots, "footer", {
|
|
193
193
|
apply: Q,
|
|
194
194
|
cancel: $
|
|
195
|
-
}, () => [
|
|
195
|
+
}, () => [h(T(i), y({
|
|
196
196
|
variant: "flat",
|
|
197
197
|
color: "secondary"
|
|
198
|
-
},
|
|
199
|
-
default: O(() => [
|
|
198
|
+
}, T(ye), { onClick: $ }), {
|
|
199
|
+
default: O(() => [m(w(T(me)), 1)]),
|
|
200
200
|
_: 1
|
|
201
|
-
}, 16),
|
|
202
|
-
default: O(() => [
|
|
201
|
+
}, 16), h(T(i), y({ color: "primary" }, T(_e), { onClick: Q }), {
|
|
202
|
+
default: O(() => [m(w(T(pe)), 1)]),
|
|
203
203
|
_: 1
|
|
204
|
-
}, 16)])], 16)) :
|
|
204
|
+
}, 16)])], 16)) : d("", !0)
|
|
205
205
|
], 2)]),
|
|
206
206
|
_: 3
|
|
207
207
|
}, 8, [
|
|
@@ -212,4 +212,4 @@ var A = { key: 1 }, j = /*@__PURE__*/ h({
|
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
214
|
//#endregion
|
|
215
|
-
export {
|
|
215
|
+
export { M as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isArray as e, isFunction as t, isNil as n, isObjectLike as r } from "es-toolkit/compat";
|
|
2
|
+
import { listboxOptionFromComposedItem as i } from "@bridge-ui/core/Domain";
|
|
3
|
+
//#region src/Components/Listbox/collectComposedListboxOptions.ts
|
|
4
|
+
function a(o) {
|
|
5
|
+
let s = [], c = e(o) ? o : n(o) ? [] : [o];
|
|
6
|
+
for (let n of c) {
|
|
7
|
+
if (!r(n)) continue;
|
|
8
|
+
let o = n, c = i({
|
|
9
|
+
value: o.props?.value,
|
|
10
|
+
primary: o.props?.primary,
|
|
11
|
+
disabled: o.props?.disabled,
|
|
12
|
+
secondary: o.props?.secondary
|
|
13
|
+
});
|
|
14
|
+
if (c && s.push(c), e(o.children)) {
|
|
15
|
+
s.push(...a(o.children));
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
let l = o.children;
|
|
19
|
+
if (r(l) && "default" in l) {
|
|
20
|
+
let e = l.default;
|
|
21
|
+
t(e) && s.push(...a(e()));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as collectComposedListboxOptions };
|
|
@@ -439,7 +439,6 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
439
439
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
440
440
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
441
441
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
442
|
-
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
443
442
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
444
443
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
445
444
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -457,6 +456,7 @@ export declare function useNumberField(props: NumberFieldOwnProps, model: Ref<nu
|
|
|
457
456
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
458
457
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
459
458
|
stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
|
|
459
|
+
fieldCornerProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
460
460
|
hasInsetLabelRow: import('vue').ComputedRef<boolean>;
|
|
461
461
|
insetLabelRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
462
462
|
stackedInputRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
|
|
@@ -41,7 +41,6 @@ export declare function useOtpField(props: MaybeRefOrGetter<OtpFieldOwnProps>, m
|
|
|
41
41
|
}>>;
|
|
42
42
|
controlId: import('vue').ComputedRef<string>;
|
|
43
43
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
44
|
-
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
45
44
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
46
45
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
47
46
|
sizeClasses: import('vue').ComputedRef<import('@bridge-ui/core/Tokens').BaseFieldSizeItem | undefined>;
|
|
@@ -52,6 +51,7 @@ export declare function useOtpField(props: MaybeRefOrGetter<OtpFieldOwnProps>, m
|
|
|
52
51
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
53
52
|
fieldLabelProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
54
53
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
54
|
+
fieldCornerProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
55
55
|
showErrorMessageContent: import('vue').ComputedRef<boolean>;
|
|
56
56
|
};
|
|
57
57
|
inputBind: (index: number) => import('@bridge-ui/core/Utils').MergePartBind<object, "class", {
|
|
@@ -51,25 +51,25 @@ var y = {
|
|
|
51
51
|
"update:modelValue"
|
|
52
52
|
], ["update:modelValue"]),
|
|
53
53
|
setup(c, { emit: u }) {
|
|
54
|
-
let S = u, C = c, w = v(c, "modelValue"), { entries: T, showPrev: E, showNext: D, rootBind: O, listBind: k, prevBind: A, nextBind: j,
|
|
54
|
+
let S = u, C = c, w = v(c, "modelValue"), { entries: T, showPrev: E, showNext: D, rootBind: O, listBind: k, prevBind: A, nextBind: j, prevLabel: M, nextLabel: N, getItemBind: P, prevIconBind: F, nextIconBind: I, getEllipsisBind: L } = t(C, {
|
|
55
55
|
size: "md",
|
|
56
56
|
rounded: "md",
|
|
57
|
-
|
|
57
|
+
color: "dark",
|
|
58
58
|
disabled: !1,
|
|
59
59
|
siblingCount: 1,
|
|
60
|
+
variant: "ghost",
|
|
60
61
|
mode: "numbered",
|
|
61
|
-
color: "primary",
|
|
62
62
|
boundaryCount: 1,
|
|
63
63
|
hideNextButton: !1,
|
|
64
64
|
hidePrevButton: !1
|
|
65
65
|
}, w, S);
|
|
66
66
|
return (t, c) => (p(), i("nav", f(l(_(O))), [a("ul", f(l(_(k))), [
|
|
67
|
-
_(E) ? (p(), i("li", y, [a("button", f(l(_(A))), [h(t.$slots, "prev", {}, () => [s(_(e), d({ icon: "chevronLeft" }, _(
|
|
67
|
+
_(E) ? (p(), i("li", y, [a("button", f(l(_(A))), [h(t.$slots, "prev", {}, () => [s(_(e), d({ icon: "chevronLeft" }, _(F)), null, 16), o(" " + g(_(M)), 1)])], 16)])) : r("", !0),
|
|
68
68
|
(p(!0), i(n, null, m(_(T), (e, r) => (p(), i(n, { key: `${e.type}-${r}` }, [e.type === "ellipsis" ? (p(), i("li", d({
|
|
69
69
|
key: 0,
|
|
70
70
|
ref_for: !0
|
|
71
|
-
}, _(
|
|
72
|
-
_(D) ? (p(), i("li", x, [a("button", f(l(_(j))), [h(t.$slots, "next", {}, () => [s(_(e), d({ icon: "chevronRight" }, _(
|
|
71
|
+
}, _(L)(r)), [h(t.$slots, "ellipsis", {}, () => [c[0] ||= o("…", -1)])], 16)) : (p(), i("li", b, [a("button", d({ ref_for: !0 }, _(P)(e.page)), g(e.page), 17)]))], 64))), 128)),
|
|
72
|
+
_(D) ? (p(), i("li", x, [a("button", f(l(_(j))), [h(t.$slots, "next", {}, () => [o(g(_(N)) + " ", 1), s(_(e), d({ icon: "chevronRight" }, _(I)), null, 16)])], 16)])) : r("", !0)
|
|
73
73
|
], 16)], 16));
|
|
74
74
|
}
|
|
75
75
|
});
|
|
@@ -24,17 +24,19 @@ export declare function usePagination(props: PaginationOwnProps, libDefaults: Pa
|
|
|
24
24
|
prevBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
25
25
|
onClick: () => void;
|
|
26
26
|
type: "button";
|
|
27
|
-
"aria-label": string;
|
|
28
27
|
disabled: boolean;
|
|
28
|
+
"aria-label": string;
|
|
29
29
|
class: string;
|
|
30
30
|
}, "class", import('vue').ButtonHTMLAttributes | undefined, {}>>;
|
|
31
31
|
nextBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
32
32
|
onClick: () => void;
|
|
33
|
-
"aria-label": string;
|
|
34
33
|
type: "button";
|
|
35
34
|
disabled: boolean;
|
|
35
|
+
"aria-label": string;
|
|
36
36
|
class: string;
|
|
37
37
|
}, "class", import('vue').ButtonHTMLAttributes | undefined, {}>>;
|
|
38
|
+
prevLabel: import('vue').ComputedRef<string>;
|
|
39
|
+
nextLabel: import('vue').ComputedRef<string>;
|
|
38
40
|
getItemBind: (pageNumber: number) => import('@bridge-ui/core/Utils').MergePartBind<{
|
|
39
41
|
type: "button";
|
|
40
42
|
disabled: NonNullable<boolean | undefined>;
|