@bridge-ui/vue 0.3.0 → 0.5.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 +3 -1
- package/dist/Components/Accordion/accordionInjectionKey.d.ts +1 -0
- package/dist/Components/Accordion/composables/useAccordion.js +3 -2
- package/dist/Components/AccordionItem/composables/useAccordionItem.js +1 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +40 -45
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +1 -0
- package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +39 -44
- package/dist/Components/ColorField/composables/useColorField.d.ts +1 -0
- package/dist/Components/DataTable/DataTable.vue.d.ts +4 -4
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +139 -121
- package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +9 -3
- package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +71 -26
- package/dist/Components/DataTable/DataTableFilterMenu.vue.d.ts +5 -2
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +94 -75
- package/dist/Components/DataTable/DataTableFilterOptions.vue.d.ts +4 -1
- package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +12 -4
- package/dist/Components/DataTable/DataTableSelection.vue_vue_type_script_setup_true_lang.js +22 -21
- package/dist/Components/DataTable/DataTableToolbarButton.vue.d.ts +2 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +12 -4
- package/dist/Components/DataTable/composables/useDataTable.js +255 -223
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +27 -0
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.js +54 -0
- package/dist/Components/DataTable/dataTable.types.d.ts +26 -9
- package/dist/Components/DataTable/index.d.ts +1 -1
- package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +52 -57
- package/dist/Components/DateField/composables/useDateField.d.ts +1 -0
- package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +50 -55
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -0
- package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +56 -61
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -0
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +56 -61
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -0
- package/dist/Components/EmptyState/EmptyState.js +5 -0
- package/dist/Components/EmptyState/EmptyState.vue.d.ts +16 -0
- package/dist/Components/EmptyState/EmptyState.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/Components/EmptyState/composables/useEmptyState.d.ts +24 -0
- package/dist/Components/EmptyState/composables/useEmptyState.js +76 -0
- package/dist/Components/EmptyState/emptyState.types.d.ts +140 -0
- package/dist/Components/EmptyState/index.d.ts +3 -0
- package/dist/Components/EmptyState/index.js +3 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -0
- package/dist/Components/FormField/composables/useFormField.js +80 -75
- package/dist/Components/List/composables/useList.d.ts +3 -1
- package/dist/Components/List/composables/useList.js +2 -2
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/ListSection/ListSection.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/ListSection/composables/useListSection.d.ts +1 -0
- package/dist/Components/ListSection/composables/useListSection.js +30 -28
- package/dist/Components/ListSection/listSectionInjectionKey.d.ts +5 -0
- package/dist/Components/ListSection/listSectionInjectionKey.js +4 -0
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +53 -43
- package/dist/Components/NumberField/composables/useNumberField.d.ts +8 -1
- package/dist/Components/NumberField/composables/useNumberField.js +49 -36
- package/dist/Components/NumberField/index.d.ts +1 -1
- package/dist/Components/NumberField/numberField.types.d.ts +13 -1
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +28 -33
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -0
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +42 -47
- package/dist/Components/Select/composables/useSelect.d.ts +1 -0
- package/dist/Components/Sidebar/Sidebar.js +5 -0
- package/dist/Components/Sidebar/Sidebar.vue.d.ts +16 -0
- package/dist/Components/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/Sidebar/SidebarInset.js +5 -0
- package/dist/Components/Sidebar/SidebarInset.vue.d.ts +11 -0
- package/dist/Components/Sidebar/SidebarInset.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/Components/Sidebar/SidebarList.js +5 -0
- package/dist/Components/Sidebar/SidebarList.vue.d.ts +16 -0
- package/dist/Components/Sidebar/SidebarList.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/Components/Sidebar/SidebarListItem.js +5 -0
- package/dist/Components/Sidebar/SidebarListItem.vue.d.ts +13 -0
- package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/Components/Sidebar/SidebarProvider.js +5 -0
- package/dist/Components/Sidebar/SidebarProvider.vue.d.ts +24 -0
- package/dist/Components/Sidebar/SidebarProvider.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Sidebar/SidebarTrigger.js +5 -0
- package/dist/Components/Sidebar/SidebarTrigger.vue.d.ts +11 -0
- package/dist/Components/Sidebar/SidebarTrigger.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Components/Sidebar/composables/useSidebar.d.ts +6 -0
- package/dist/Components/Sidebar/composables/useSidebar.js +10 -0
- package/dist/Components/Sidebar/composables/useSidebarInset.d.ts +7 -0
- package/dist/Components/Sidebar/composables/useSidebarInset.js +32 -0
- package/dist/Components/Sidebar/composables/useSidebarList.d.ts +8 -0
- package/dist/Components/Sidebar/composables/useSidebarList.js +27 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.d.ts +15 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +44 -0
- package/dist/Components/Sidebar/composables/useSidebarProvider.d.ts +18 -0
- package/dist/Components/Sidebar/composables/useSidebarProvider.js +88 -0
- package/dist/Components/Sidebar/composables/useSidebarShell.d.ts +41 -0
- package/dist/Components/Sidebar/composables/useSidebarShell.js +116 -0
- package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +10 -0
- package/dist/Components/Sidebar/composables/useSidebarTrigger.js +25 -0
- package/dist/Components/Sidebar/index.d.ts +15 -0
- package/dist/Components/Sidebar/index.js +15 -0
- package/dist/Components/Sidebar/sidebar.types.d.ts +244 -0
- package/dist/Components/Sidebar/sidebarInjectionKey.d.ts +80 -0
- package/dist/Components/Sidebar/sidebarInjectionKey.js +4 -0
- package/dist/Components/Sidebar/sidebarListInjectionKey.d.ts +5 -0
- package/dist/Components/Sidebar/sidebarListInjectionKey.js +4 -0
- package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +42 -47
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Table/Table.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Table/composables/useTable.d.ts +3 -0
- package/dist/Components/Table/composables/useTable.js +1 -0
- package/dist/Components/Table/table.types.d.ts +2 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/Components/TextField/composables/useTextField.d.ts +1 -0
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +15 -20
- package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -0
- package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +45 -50
- package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -0
- package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +45 -50
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -0
- package/dist/Utils/index.d.ts +1 -0
- package/dist/Utils/index.js +28 -27
- package/dist/Utils/useOptionalModel.d.ts +6 -0
- package/dist/Utils/useOptionalModel.js +13 -0
- package/dist/augments.d.ts +11 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +79 -64
- package/dist/theme.css +46 -42
- package/docs/README.md +2 -0
- package/docs/ScrollUtilities.md +1 -1
- package/docs/components/DataTable.md +43 -17
- package/docs/components/Drawer.md +1 -1
- package/docs/components/EmptyState.md +125 -0
- package/docs/components/List.md +1 -1
- package/docs/components/NumberField.md +17 -6
- package/docs/components/Sidebar.md +281 -0
- package/docs/examples/i18n-dictionary.ts +6 -0
- package/docs/examples/icon-fontawesome.ts +5 -0
- package/docs/examples/icon-heroicons.ts +6 -0
- package/docs/examples/icon-lucide.ts +6 -0
- package/docs/examples/icon-phosphor.ts +6 -0
- package/docs/examples/icon-tabler.ts +6 -0
- package/package.json +2 -2
package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
|
|
2
2
|
import { presentSlotNames as t } from "../../Utils/slotOrProp.js";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import i from "../FormField/
|
|
6
|
-
import a from "../
|
|
7
|
-
import
|
|
8
|
-
import s from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
3
|
+
import { useOptionalModel as n } from "../../Utils/useOptionalModel.js";
|
|
4
|
+
import r from "../Icon/Icon.js";
|
|
5
|
+
import { FORM_FIELD_CHROME_SLOT_NAMES as i } from "../FormField/formField.types.js";
|
|
6
|
+
import a from "../FormField/FormField.js";
|
|
7
|
+
import o from "../FieldOverlay/FieldOverlay.js";
|
|
8
|
+
import { useDateTimeRangeField as s } from "./composables/useDateTimeRangeField.js";
|
|
9
|
+
import c from "../DateTimeRangePicker/DateTimeRangePicker.js";
|
|
10
|
+
import { Fragment as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createSlots as p, 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, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useModel as O, withCtx as k, withKeys as A, withModifiers as j } from "vue";
|
|
11
11
|
//#region src/Components/DateTimeRangeField/DateTimeRangeField.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var M = { class: "flex min-w-0 flex-1 items-center gap-1" }, N = ["aria-label"], P = /*@__PURE__*/ g({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "DateTimeRangeField",
|
|
15
15
|
props: /*@__PURE__*/ v({
|
|
@@ -85,62 +85,57 @@ var N = { class: "flex min-w-0 flex-1 items-center gap-1" }, P = ["aria-label"],
|
|
|
85
85
|
"open"
|
|
86
86
|
], ["update:modelValue"]),
|
|
87
87
|
setup(g, { emit: v }) {
|
|
88
|
-
let F = O(g, "modelValue"), I =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
default: k(() => [f("div", N, [f("input", x(_(D(W))), null, 16), D($) ? (S(), d("span", y({ key: 0 }, D(G), {
|
|
96
|
-
onClick: o[0] ||= (...e) => D(K) && D(K)(...e),
|
|
97
|
-
"aria-label": D(R)("Clear"),
|
|
98
|
-
onKeydown: [o[1] ||= A(j((...e) => D(K) && D(K)(...e), ["prevent"]), ["enter"]), o[2] ||= A(j((...e) => D(K) && D(K)(...e), ["prevent"]), ["space"])]
|
|
99
|
-
}), [h(D(n), y({
|
|
88
|
+
let P = e(), F = O(g, "modelValue"), I = v, L = g, R = C(L.defaultValue ?? null), z = n(F, R), { open: ee, fill: B, overlay: V, formField: H, inputBind: U, clearBind: W, clearValue: G, modelValue: K, showFooter: q, orientation: J, pickerClass: Y, dateTimeOnly: X, clearIconSize: Z, showClearIcon: Q, handleOpenChange: $, handlePickerChange: te, handlePickerCancel: ne, overlayCustomProps: re, dateTimeRangePickerCustomProps: ie } = s(L, z, I);
|
|
89
|
+
return (e, n) => (S(), d(l, null, [h(D(a), { field: D(H) }, p({
|
|
90
|
+
default: k(() => [f("div", M, [f("input", x(_(D(U))), null, 16), D(Q) ? (S(), d("span", y({ key: 0 }, D(W), {
|
|
91
|
+
onClick: n[0] ||= (...e) => D(G) && D(G)(...e),
|
|
92
|
+
"aria-label": D(P)("Clear"),
|
|
93
|
+
onKeydown: [n[1] ||= A(j((...e) => D(G) && D(G)(...e), ["prevent"]), ["enter"]), n[2] ||= A(j((...e) => D(G) && D(G)(...e), ["prevent"]), ["space"])]
|
|
94
|
+
}), [h(D(r), y({
|
|
100
95
|
icon: "clear",
|
|
101
|
-
size: D(
|
|
102
|
-
},
|
|
96
|
+
size: D(Z)
|
|
97
|
+
}, L.customProps?.clearIcon), null, 16, ["size"])], 16, N)) : u("", !0)])]),
|
|
103
98
|
_: 2
|
|
104
|
-
}, [w(D(t)(D(
|
|
99
|
+
}, [w(D(t)(D(i), e.$slots), (t) => ({
|
|
105
100
|
name: t,
|
|
106
101
|
fn: k((n) => [T(e.$slots, t, x(_(n || {})))])
|
|
107
|
-
}))]), 1032, ["field"]), h(D(
|
|
108
|
-
overlay: D(
|
|
109
|
-
"model-value": D(
|
|
110
|
-
"custom-props": D(
|
|
111
|
-
"onUpdate:modelValue": D(
|
|
102
|
+
}))]), 1032, ["field"]), h(D(o), {
|
|
103
|
+
overlay: D(V),
|
|
104
|
+
"model-value": D(ee),
|
|
105
|
+
"custom-props": D(re),
|
|
106
|
+
"onUpdate:modelValue": D($)
|
|
112
107
|
}, {
|
|
113
|
-
default: k(() => [h(D(
|
|
114
|
-
fill: D(
|
|
115
|
-
value: D(
|
|
116
|
-
class: b(D(
|
|
117
|
-
ampm: D(
|
|
118
|
-
"show-footer": D(
|
|
119
|
-
orientation: D(
|
|
120
|
-
"read-only":
|
|
121
|
-
"max-date": D(
|
|
122
|
-
"min-date": D(
|
|
123
|
-
"max-time": D(
|
|
124
|
-
"min-time": D(
|
|
125
|
-
onChange: D(
|
|
126
|
-
onCancel: D(
|
|
127
|
-
interval: D(
|
|
128
|
-
"time-zone": D(
|
|
129
|
-
"hide-years": D(
|
|
130
|
-
error: D(
|
|
131
|
-
color: D(
|
|
132
|
-
"hide-months": D(
|
|
133
|
-
disabled: D(
|
|
134
|
-
"show-seconds": D(
|
|
135
|
-
"start-of-week": D(
|
|
136
|
-
rounded: D(
|
|
137
|
-
"disable-dates": D(
|
|
138
|
-
"hide-weekdays": D(
|
|
139
|
-
"disable-times": D(
|
|
140
|
-
"disable-years": D(
|
|
141
|
-
"disable-months": D(
|
|
142
|
-
"custom-props": D(
|
|
143
|
-
"hide-outside-days": D(
|
|
108
|
+
default: k(() => [h(D(c), {
|
|
109
|
+
fill: D(B),
|
|
110
|
+
value: D(K),
|
|
111
|
+
class: b(D(Y)),
|
|
112
|
+
ampm: D(X).ampm,
|
|
113
|
+
"show-footer": D(q),
|
|
114
|
+
orientation: D(J),
|
|
115
|
+
"read-only": L.readonly,
|
|
116
|
+
"max-date": D(X).maxDate,
|
|
117
|
+
"min-date": D(X).minDate,
|
|
118
|
+
"max-time": D(X).maxTime,
|
|
119
|
+
"min-time": D(X).minTime,
|
|
120
|
+
onChange: D(te),
|
|
121
|
+
onCancel: D(ne),
|
|
122
|
+
interval: D(X).interval,
|
|
123
|
+
"time-zone": D(X).timeZone,
|
|
124
|
+
"hide-years": D(X).hideYears,
|
|
125
|
+
error: D(H).invalidated.value,
|
|
126
|
+
color: D(H).merged.value.color,
|
|
127
|
+
"hide-months": D(X).hideMonths,
|
|
128
|
+
disabled: D(H).isDisabled.value,
|
|
129
|
+
"show-seconds": D(X).showSeconds,
|
|
130
|
+
"start-of-week": D(X).startOfWeek,
|
|
131
|
+
rounded: D(H).merged.value.rounded,
|
|
132
|
+
"disable-dates": D(X).disableDates,
|
|
133
|
+
"hide-weekdays": D(X).hideWeekdays,
|
|
134
|
+
"disable-times": D(X).disableTimes,
|
|
135
|
+
"disable-years": D(X).disableYears,
|
|
136
|
+
"disable-months": D(X).disableMonths,
|
|
137
|
+
"custom-props": D(ie),
|
|
138
|
+
"hide-outside-days": D(X).hideOutsideDays
|
|
144
139
|
}, p({
|
|
145
140
|
day: k((t) => [T(e.$slots, "day", x(_(t)), () => [m(E(t.label), 1)])]),
|
|
146
141
|
_: 2
|
|
@@ -159,4 +154,4 @@ var N = { class: "flex min-w-0 flex-1 items-center gap-1" }, P = ["aria-label"],
|
|
|
159
154
|
}
|
|
160
155
|
});
|
|
161
156
|
//#endregion
|
|
162
|
-
export {
|
|
157
|
+
export { P as default };
|
|
@@ -450,6 +450,7 @@ export declare function useDateTimeRangeField(props: DateTimeRangeFieldOwnProps,
|
|
|
450
450
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
451
451
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
452
452
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
453
|
+
"data-bridge-variant": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldVariant | undefined>;
|
|
453
454
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldRounded | undefined>;
|
|
454
455
|
}>>;
|
|
455
456
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EmptyStateOwnProps, EmptyStateSlots } from './emptyState.types';
|
|
2
|
+
type __VLS_Slots = EmptyStateSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<EmptyStateOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmptyStateOwnProps> & Readonly<{}>, {
|
|
4
|
+
size: import('@bridge-ui/core/Utils').MergeProps<import('@bridge-ui/core/Tokens').EmptyStateSize, import('./emptyState.types').EmptyStateSizeOverrides>;
|
|
5
|
+
align: import('@bridge-ui/core/Utils').MergeProps<import('@bridge-ui/core/Tokens').EmptyStateAlign, import('./emptyState.types').EmptyStateAlignOverrides>;
|
|
6
|
+
mediaDecorative: boolean;
|
|
7
|
+
titleAs: "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { hasNamedSlot as e, hasSlotOrProp as t, isPropPresent as n } from "../../Utils/slotOrProp.js";
|
|
2
|
+
import r from "../Icon/Icon.js";
|
|
3
|
+
import { useEmptyState as i } from "./composables/useEmptyState.js";
|
|
4
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createTextVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, normalizeProps as m, openBlock as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
5
|
+
//#region src/Components/EmptyState/EmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var x = /*@__PURE__*/ d({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "EmptyState",
|
|
9
|
+
props: {
|
|
10
|
+
align: { default: "center" },
|
|
11
|
+
classes: {},
|
|
12
|
+
customProps: {},
|
|
13
|
+
description: {},
|
|
14
|
+
icon: {},
|
|
15
|
+
mediaDecorative: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
size: { default: "md" },
|
|
20
|
+
title: {},
|
|
21
|
+
titleAs: { default: "p" }
|
|
22
|
+
},
|
|
23
|
+
setup(d) {
|
|
24
|
+
let { slots: x, merged: S, iconBind: C, rootBind: w, titleBind: T, mediaBind: E, actionsBind: D, descriptionBind: O } = i(d, {
|
|
25
|
+
size: "md",
|
|
26
|
+
titleAs: "p",
|
|
27
|
+
align: "center",
|
|
28
|
+
mediaDecorative: !0
|
|
29
|
+
}), k = o(() => e(x, "media") || n(S.value.icon));
|
|
30
|
+
return (i, o) => (h(), l("div", m(f(y(w))), [
|
|
31
|
+
k.value ? (h(), l("div", m(p({ key: 0 }, y(E))), [y(e)(y(x), "media") ? g(i.$slots, "media", {}, void 0, void 0, 0) : y(S).icon ? (h(), s(y(r), p({ key: 1 }, y(C), { icon: y(S).icon }), null, 16, ["icon"])) : c("", !0)], 16)) : c("", !0),
|
|
32
|
+
y(t)(y(x), "title", y(S).title) ? (h(), s(_(y(S).titleAs), m(p({ key: 1 }, y(T))), {
|
|
33
|
+
default: b(() => [y(e)(y(x), "title") ? g(i.$slots, "title", {}, void 0, void 0, 0) : y(n)(y(S).title) ? (h(), l(a, { key: 1 }, [u(v(y(S).title), 1)], 64)) : c("", !0)]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 16)) : c("", !0),
|
|
36
|
+
y(t)(y(x), "description", y(S).description) ? (h(), l("div", m(p({ key: 2 }, y(O))), [y(e)(y(x), "description") ? g(i.$slots, "description", {}, void 0, void 0, 0) : y(n)(y(S).description) ? (h(), l(a, { key: 1 }, [u(v(y(S).description), 1)], 64)) : c("", !0)], 16)) : c("", !0),
|
|
37
|
+
y(e)(y(x), "action") ? (h(), l("div", m(p({ key: 3 }, y(D))), [g(i.$slots, "action")], 16)) : c("", !0)
|
|
38
|
+
], 16));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { x as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconSize } from '@bridge-ui/core/Tokens';
|
|
2
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
3
|
+
import { EmptyStateOwnProps, EmptyStateProps } from '../emptyState.types';
|
|
4
|
+
type EmptyStateLibDefaults = LibDefaultsShape<EmptyStateOwnProps, "size" | "align" | "titleAs" | "mediaDecorative">;
|
|
5
|
+
type EmptyStateMerged = MergeLibDefaults<EmptyStateOwnProps, EmptyStateLibDefaults>;
|
|
6
|
+
export declare function useEmptyState(props: EmptyStateOwnProps, libDefaults: EmptyStateLibDefaults): {
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
merged: import('vue').ComputedRef<EmptyStateMerged>;
|
|
11
|
+
iconBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
12
|
+
size: keyof IconSize;
|
|
13
|
+
class: string;
|
|
14
|
+
}, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
15
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Omit<EmptyStateProps, "icon" | "size" | "classes" | "customProps" | "title" | "description" | "align" | "mediaDecorative" | "titleAs">>>;
|
|
16
|
+
titleBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
17
|
+
mediaBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
18
|
+
"aria-hidden": boolean | undefined;
|
|
19
|
+
class: string;
|
|
20
|
+
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
21
|
+
actionsBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
22
|
+
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as r, useAttrs as i, useSlots as a } from "vue";
|
|
3
|
+
import { get as o } from "es-toolkit/compat";
|
|
4
|
+
import { emptyStateAlignProps as s, emptyStateSizeProps as c } from "@bridge-ui/core/Tokens";
|
|
5
|
+
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core/Utils";
|
|
6
|
+
//#region src/Components/EmptyState/composables/useEmptyState.ts
|
|
7
|
+
var f = [
|
|
8
|
+
"icon",
|
|
9
|
+
"size",
|
|
10
|
+
"align",
|
|
11
|
+
"title",
|
|
12
|
+
"classes",
|
|
13
|
+
"titleAs",
|
|
14
|
+
"customProps",
|
|
15
|
+
"description",
|
|
16
|
+
"mediaDecorative"
|
|
17
|
+
];
|
|
18
|
+
function p(p, m) {
|
|
19
|
+
let h = i(), g = a(), _ = r(() => d({
|
|
20
|
+
props: {
|
|
21
|
+
...h,
|
|
22
|
+
...p
|
|
23
|
+
},
|
|
24
|
+
bridgeKeys: f
|
|
25
|
+
})), { merged: v, entry: y } = t({
|
|
26
|
+
libDefaults: m,
|
|
27
|
+
componentName: "EmptyState",
|
|
28
|
+
props: () => _.value.componentProps
|
|
29
|
+
}), b = r(() => v.value.customProps), x = n({
|
|
30
|
+
entry: y,
|
|
31
|
+
props: () => _.value.componentProps
|
|
32
|
+
}), S = r(() => {
|
|
33
|
+
let e = u(c, y.value?.tokens?.size);
|
|
34
|
+
return o(e, v.value.size);
|
|
35
|
+
}), C = r(() => {
|
|
36
|
+
let e = u(s, y.value?.tokens?.align);
|
|
37
|
+
return o(e, v.value.align);
|
|
38
|
+
}), w = r(() => e(b.value?.actions, {}, l({
|
|
39
|
+
[o(S.value, "actions") ?? ""]: !0,
|
|
40
|
+
[o(x.value, "actions") ?? ""]: !0
|
|
41
|
+
}))), T = r(() => e(b.value?.description, {}, l({
|
|
42
|
+
[o(S.value, "description") ?? ""]: !0,
|
|
43
|
+
[o(x.value, "description") ?? ""]: !0
|
|
44
|
+
}))), E = r(() => e(b.value?.icon, {}, {
|
|
45
|
+
size: o(S.value, "icon") ?? "md",
|
|
46
|
+
class: l({
|
|
47
|
+
"shrink-0": !0,
|
|
48
|
+
[o(x.value, "icon") ?? ""]: !0
|
|
49
|
+
})
|
|
50
|
+
})), D = r(() => e(b.value?.media, {}, {
|
|
51
|
+
"aria-hidden": v.value.mediaDecorative ? !0 : void 0,
|
|
52
|
+
class: l({
|
|
53
|
+
[o(S.value, "media") ?? ""]: !0,
|
|
54
|
+
[o(x.value, "media") ?? ""]: !0
|
|
55
|
+
})
|
|
56
|
+
}));
|
|
57
|
+
return {
|
|
58
|
+
slots: g,
|
|
59
|
+
merged: v,
|
|
60
|
+
iconBind: E,
|
|
61
|
+
rootBind: r(() => e(b.value?.root, _.value.inheritedAttrs, l({
|
|
62
|
+
[o(S.value, "root") ?? ""]: !0,
|
|
63
|
+
[C.value ?? ""]: !0,
|
|
64
|
+
[o(x.value, "root") ?? ""]: !0
|
|
65
|
+
}))),
|
|
66
|
+
titleBind: r(() => e(b.value?.title, {}, l({
|
|
67
|
+
[o(S.value, "title") ?? ""]: !0,
|
|
68
|
+
[o(x.value, "title") ?? ""]: !0
|
|
69
|
+
}))),
|
|
70
|
+
mediaBind: D,
|
|
71
|
+
actionsBind: w,
|
|
72
|
+
descriptionBind: T
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { p as useEmptyState };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { HTMLAttributes, Slot } from 'vue';
|
|
2
|
+
import { EmptyStateAlign, EmptyStateSize } from '@bridge-ui/core/Tokens';
|
|
3
|
+
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
4
|
+
import { IconSource } from '../../Adapters/Icon';
|
|
5
|
+
import { IconProps } from '../Icon';
|
|
6
|
+
export interface EmptyStateSizeOverrides {}
|
|
7
|
+
export interface EmptyStateAlignOverrides {}
|
|
8
|
+
export interface EmptyStateClasses {
|
|
9
|
+
/**
|
|
10
|
+
* The classes to apply to the actions row.
|
|
11
|
+
*/
|
|
12
|
+
actions?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The classes to apply to the description.
|
|
15
|
+
*/
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The classes to apply to the default `Icon`.
|
|
19
|
+
*/
|
|
20
|
+
icon?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The classes to apply to the media wrapper.
|
|
23
|
+
*/
|
|
24
|
+
media?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The classes to apply to the root.
|
|
27
|
+
*/
|
|
28
|
+
root?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The classes to apply to the title.
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface EmptyStateCustomProps {
|
|
35
|
+
/**
|
|
36
|
+
* Props forwarded to the actions row.
|
|
37
|
+
*/
|
|
38
|
+
actions?: HTMLAttributes;
|
|
39
|
+
/**
|
|
40
|
+
* Props forwarded to the description container.
|
|
41
|
+
*/
|
|
42
|
+
description?: HTMLAttributes;
|
|
43
|
+
/**
|
|
44
|
+
* Props forwarded to the default `Icon` (`icon` is set by the empty state).
|
|
45
|
+
*/
|
|
46
|
+
icon?: Partial<Omit<IconProps, "icon">>;
|
|
47
|
+
/**
|
|
48
|
+
* Props forwarded to the media wrapper.
|
|
49
|
+
*/
|
|
50
|
+
media?: HTMLAttributes;
|
|
51
|
+
/**
|
|
52
|
+
* Props forwarded to the root container.
|
|
53
|
+
*/
|
|
54
|
+
root?: HTMLAttributes;
|
|
55
|
+
/**
|
|
56
|
+
* Props forwarded to the title element.
|
|
57
|
+
*/
|
|
58
|
+
title?: HTMLAttributes;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Placeholder when a list, table, or view has no data.
|
|
62
|
+
* Does not set `role` by default — pass `role="status"` when the empty
|
|
63
|
+
* state is a live update.
|
|
64
|
+
*/
|
|
65
|
+
export interface EmptyStateOwnProps {
|
|
66
|
+
/**
|
|
67
|
+
* Horizontal alignment of the stack.
|
|
68
|
+
*
|
|
69
|
+
* @default "center"
|
|
70
|
+
*/
|
|
71
|
+
align?: MergeProps<EmptyStateAlign, EmptyStateAlignOverrides>;
|
|
72
|
+
/**
|
|
73
|
+
* The classes to apply to the empty state.
|
|
74
|
+
*
|
|
75
|
+
* @default undefined
|
|
76
|
+
*/
|
|
77
|
+
classes?: EmptyStateClasses;
|
|
78
|
+
/**
|
|
79
|
+
* Extra props for internal parts (`media`, `title`, `description`, etc.).
|
|
80
|
+
* Root HTML attributes stay on the component top level.
|
|
81
|
+
*
|
|
82
|
+
* @default undefined
|
|
83
|
+
*/
|
|
84
|
+
customProps?: EmptyStateCustomProps;
|
|
85
|
+
/**
|
|
86
|
+
* Supporting copy below the title.
|
|
87
|
+
*
|
|
88
|
+
* @default undefined
|
|
89
|
+
*/
|
|
90
|
+
description?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Default media icon. Use the `media` slot to replace it with custom markup.
|
|
93
|
+
*
|
|
94
|
+
* @default undefined
|
|
95
|
+
*/
|
|
96
|
+
icon?: IconSource;
|
|
97
|
+
/**
|
|
98
|
+
* When true, the media wrapper is hidden from assistive tech (`aria-hidden`).
|
|
99
|
+
*
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
mediaDecorative?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Spacing and typography scale.
|
|
105
|
+
*
|
|
106
|
+
* @default "md"
|
|
107
|
+
*/
|
|
108
|
+
size?: MergeProps<EmptyStateSize, EmptyStateSizeOverrides>;
|
|
109
|
+
/**
|
|
110
|
+
* Primary heading copy.
|
|
111
|
+
*
|
|
112
|
+
* @default undefined
|
|
113
|
+
*/
|
|
114
|
+
title?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Element used to render `title`. Use a heading when the page outline needs it.
|
|
117
|
+
*
|
|
118
|
+
* @default "p"
|
|
119
|
+
*/
|
|
120
|
+
titleAs?: "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
121
|
+
}
|
|
122
|
+
export interface EmptyStateSlots {
|
|
123
|
+
/**
|
|
124
|
+
* Action row (e.g. one or more `Button`s).
|
|
125
|
+
*/
|
|
126
|
+
action?: Slot<undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* Replaces the default description copy.
|
|
129
|
+
*/
|
|
130
|
+
description?: Slot<undefined>;
|
|
131
|
+
/**
|
|
132
|
+
* Illustration or icon above the title. Replaces the `icon` prop.
|
|
133
|
+
*/
|
|
134
|
+
media?: Slot<undefined>;
|
|
135
|
+
/**
|
|
136
|
+
* Replaces the default title copy.
|
|
137
|
+
*/
|
|
138
|
+
title?: Slot<undefined>;
|
|
139
|
+
}
|
|
140
|
+
export type EmptyStateProps = MergeHtmlProps<EmptyStateOwnProps, HTMLAttributes>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useEmptyState } from './composables/useEmptyState';
|
|
2
|
+
export type { EmptyStateAlignOverrides, EmptyStateClasses, EmptyStateCustomProps, EmptyStateOwnProps, EmptyStateProps, EmptyStateSizeOverrides, EmptyStateSlots, } from './emptyState.types';
|
|
3
|
+
export { default as EmptyState } from './EmptyState.vue';
|
|
@@ -460,6 +460,7 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
|
|
|
460
460
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
|
|
461
461
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
462
462
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {
|
|
463
|
+
"data-bridge-variant": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldVariant | undefined>;
|
|
463
464
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldRounded | undefined>;
|
|
464
465
|
}>>;
|
|
465
466
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|