@bridge-ui/vue 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/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 +3 -3
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +86 -72
- 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 +254 -222
- 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/FormField/composables/useFormField.d.ts +1 -0
- package/dist/Components/FormField/composables/useFormField.js +80 -75
- 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/Slider/Slider.vue_vue_type_script_setup_true_lang.js +43 -48
- 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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/theme.css +46 -42
- package/docs/components/DataTable.md +42 -16
- package/docs/components/NumberField.md +17 -6
- package/docs/examples/i18n-dictionary.ts +6 -0
- package/docs/examples/icon-fontawesome.ts +4 -0
- package/docs/examples/icon-heroicons.ts +4 -0
- 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,23 +1,32 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { useFormField as r } from "../../FormField/composables/useFormField.js";
|
|
3
3
|
import { computed as i, useAttrs as a } from "vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { get as o, isNil as s } from "es-toolkit/compat";
|
|
5
|
+
import { getNumberFieldStepper as c, resolveNumberFieldStepperIconSize as l } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { numberFieldControlVariantProps as u } from "@bridge-ui/core/Tokens";
|
|
7
|
+
import { cn as d, mergeBridgeUILayeredClasses as f } from "@bridge-ui/core/Utils";
|
|
6
8
|
//#region src/Components/NumberField/composables/useNumberField.ts
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
+
function p(p, m, h = {}) {
|
|
10
|
+
let g = a(), _ = i(() => p.step ?? 1), v = i(() => ({
|
|
11
|
+
classes: p.classes,
|
|
12
|
+
controlVariant: p.controlVariant
|
|
13
|
+
})), { entry: y, merged: b } = t({
|
|
9
14
|
componentName: "NumberField",
|
|
10
|
-
props: () =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
props: () => v.value,
|
|
16
|
+
libDefaults: { controlVariant: "stacked" }
|
|
17
|
+
}), x = n({
|
|
18
|
+
entry: y,
|
|
19
|
+
props: () => v.value
|
|
20
|
+
}), S = i(() => b.value.controlVariant ?? "stacked"), C = i(() => c(S.value)), w = i(() => {
|
|
21
|
+
let e = f(u, y.value?.tokens?.controlVariant);
|
|
22
|
+
return o(e, S.value) ?? u.stacked;
|
|
23
|
+
}), T = r(() => {
|
|
24
|
+
let { min: e, max: t, step: n, classes: r, defaultValue: i, controlVariant: a, ...o } = p;
|
|
16
25
|
return {
|
|
17
|
-
...
|
|
18
|
-
...
|
|
26
|
+
...g,
|
|
27
|
+
...o,
|
|
19
28
|
showErrorIcon: !1,
|
|
20
|
-
classes:
|
|
29
|
+
classes: x.value
|
|
21
30
|
};
|
|
22
31
|
}, {
|
|
23
32
|
size: "md",
|
|
@@ -27,41 +36,45 @@ function c(c, l, u = {}) {
|
|
|
27
36
|
showErrorIcon: !1
|
|
28
37
|
}, {
|
|
29
38
|
componentName: "NumberField",
|
|
30
|
-
reservedSlots: () => ["end"]
|
|
31
|
-
}),
|
|
32
|
-
min:
|
|
33
|
-
max:
|
|
39
|
+
reservedSlots: () => C.value.isSplit ? ["start", "end"] : ["end"]
|
|
40
|
+
}), E = i(() => l(T.merged.value.size, S.value)), D = i(() => e(T.inputBind.value, {
|
|
41
|
+
min: p.min,
|
|
42
|
+
max: p.max,
|
|
34
43
|
type: "number",
|
|
35
|
-
step:
|
|
36
|
-
},
|
|
37
|
-
get: () =>
|
|
38
|
-
if (!o(_.value)) return String(_.value);
|
|
39
|
-
},
|
|
44
|
+
step: _.value
|
|
45
|
+
}, d({ "appearance:textfield [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none": !0 }))), O = i(() => m.value ?? void 0), k = i({
|
|
46
|
+
get: () => s(O.value) ? "" : String(O.value),
|
|
40
47
|
set: (e) => {
|
|
41
|
-
if (e === "" ||
|
|
42
|
-
|
|
48
|
+
if (e === "" || s(e)) {
|
|
49
|
+
m.value = void 0;
|
|
43
50
|
return;
|
|
44
51
|
}
|
|
45
52
|
let t = Number(e);
|
|
46
|
-
Number.isNaN(t) || (
|
|
53
|
+
Number.isNaN(t) || (m.value = t, h.onChange?.(t));
|
|
47
54
|
}
|
|
48
|
-
}),
|
|
49
|
-
|
|
55
|
+
}), A = (e) => {
|
|
56
|
+
m.value = e, h.onChange?.(e);
|
|
50
57
|
};
|
|
51
58
|
return {
|
|
52
59
|
decrement: () => {
|
|
53
|
-
let e = (
|
|
54
|
-
return !
|
|
60
|
+
let e = (O.value ?? p.min ?? 0) - _.value;
|
|
61
|
+
return !s(p.min) && e < p.min ? !1 : (A(e), !0);
|
|
55
62
|
},
|
|
56
|
-
formField:
|
|
63
|
+
formField: T,
|
|
57
64
|
increment: () => {
|
|
58
|
-
let e = (
|
|
59
|
-
return !
|
|
65
|
+
let e = (O.value ?? p.min ?? 0) + _.value;
|
|
66
|
+
return !s(p.max) && e > p.max ? !1 : (A(e), !0);
|
|
60
67
|
},
|
|
61
|
-
inputBind:
|
|
62
|
-
stringModel:
|
|
63
|
-
mergedClasses:
|
|
68
|
+
inputBind: D,
|
|
69
|
+
stringModel: k,
|
|
70
|
+
mergedClasses: x,
|
|
71
|
+
stepperIconSize: E,
|
|
72
|
+
controlVariantItem: w,
|
|
73
|
+
isSplit: i(() => C.value.isSplit),
|
|
74
|
+
decrementIcon: i(() => C.value.decrementIcon),
|
|
75
|
+
incrementIcon: i(() => C.value.incrementIcon),
|
|
76
|
+
incrementFirst: i(() => C.value.incrementFirst)
|
|
64
77
|
};
|
|
65
78
|
}
|
|
66
79
|
//#endregion
|
|
67
|
-
export {
|
|
80
|
+
export { p as useNumberField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { useNumberField } from './composables/useNumberField';
|
|
2
2
|
export type { UseNumberFieldOptions } from './composables/useNumberField';
|
|
3
|
-
export type { NumberFieldClasses, NumberFieldCustomProps, NumberFieldEmits, NumberFieldOwnProps, NumberFieldProps, NumberFieldSlots, } from './numberField.types';
|
|
3
|
+
export type { NumberFieldClasses, NumberFieldControlVariantOverrides, NumberFieldCustomProps, NumberFieldEmits, NumberFieldOwnProps, NumberFieldProps, NumberFieldSlots, } from './numberField.types';
|
|
4
4
|
export { default as NumberField } from './NumberField.vue';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { NumberFieldControlVariant } from '@bridge-ui/core/Tokens';
|
|
3
|
+
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
3
4
|
import { FormFieldClasses, FormFieldCustomProps, FormFieldOwnProps, FormFieldSlots } from '../FormField/formField.types';
|
|
4
5
|
import { IconProps } from '../Icon';
|
|
6
|
+
export interface NumberFieldControlVariantOverrides {}
|
|
5
7
|
export interface NumberFieldClasses extends FormFieldClasses {
|
|
6
8
|
/**
|
|
7
9
|
* The classes to apply to the decrement button.
|
|
@@ -54,6 +56,16 @@ export interface NumberFieldOwnProps extends Omit<FormFieldOwnProps, "field" | "
|
|
|
54
56
|
* The classes to apply to the number field.
|
|
55
57
|
*/
|
|
56
58
|
classes?: NumberFieldClasses;
|
|
59
|
+
/**
|
|
60
|
+
* Layout of the increment and decrement controls.
|
|
61
|
+
*
|
|
62
|
+
* `stacked` places them in a column at the end. `inline` places them in a
|
|
63
|
+
* row at the end. `split` places decrement at the start and increment at the
|
|
64
|
+
* end, and reserves the start slot (`start` / `startIcon`) for decrement.
|
|
65
|
+
*
|
|
66
|
+
* @default "stacked"
|
|
67
|
+
*/
|
|
68
|
+
controlVariant?: MergeProps<NumberFieldControlVariant, NumberFieldControlVariantOverrides>;
|
|
57
69
|
/**
|
|
58
70
|
* Extra props for FormField parts and the stepper buttons.
|
|
59
71
|
*
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
|
|
2
2
|
import { presentSlotNames as t } from "../../Utils/slotOrProp.js";
|
|
3
|
-
import {
|
|
4
|
-
import i from "
|
|
5
|
-
import
|
|
6
|
-
import o from "../FormField/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { cn as
|
|
3
|
+
import { useOptionalModel as n } from "../../Utils/useOptionalModel.js";
|
|
4
|
+
import { mergePartBind as r, resolveFieldAdornmentIconSize as i } from "../../Utils/index.js";
|
|
5
|
+
import a from "../Icon/Icon.js";
|
|
6
|
+
import { FORM_FIELD_CHROME_SLOT_NAMES as o } from "../FormField/formField.types.js";
|
|
7
|
+
import s from "../FormField/FormField.js";
|
|
8
|
+
import { usePasswordField as c } from "./composables/usePasswordField.js";
|
|
9
|
+
import { computed as l, createBlock as u, createElementVNode as d, createSlots as f, createVNode as p, defineComponent as m, guardReactiveProps as h, isRef as g, mergeModels as _, mergeProps as v, normalizeProps as y, openBlock as b, ref as x, renderList as S, renderSlot as C, unref as w, useModel as T, vModelDynamic as E, withCtx as D, withDirectives as O } from "vue";
|
|
10
|
+
import { cn as k } from "@bridge-ui/core/Utils";
|
|
11
11
|
//#region src/Components/PasswordField/PasswordField.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var A = /*@__PURE__*/ m({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "PasswordField",
|
|
15
|
-
props: /*@__PURE__*/
|
|
15
|
+
props: /*@__PURE__*/ _({
|
|
16
16
|
classes: {},
|
|
17
17
|
customProps: {},
|
|
18
18
|
defaultValue: {},
|
|
@@ -45,34 +45,29 @@ var k = /*@__PURE__*/ p({
|
|
|
45
45
|
modelValue: {},
|
|
46
46
|
modelModifiers: {}
|
|
47
47
|
}),
|
|
48
|
-
emits: /*@__PURE__*/
|
|
49
|
-
setup(
|
|
50
|
-
let
|
|
51
|
-
set: (e) => {
|
|
52
|
-
A.value = e, M.value = e;
|
|
53
|
-
},
|
|
54
|
-
get: () => D(A.value) ? M.value : A.value
|
|
55
|
-
}), P = e(), { formField: F, inputBind: I, isVisible: L, mergedClasses: R, toggleVisibility: z } = s(j, { onVisibilityChange: (e) => k("visibility-change", e) }), B = c(() => n(j.customProps?.toggle, {
|
|
48
|
+
emits: /*@__PURE__*/ _(["visibility-change"], ["update:modelValue"]),
|
|
49
|
+
setup(m, { emit: _ }) {
|
|
50
|
+
let A = e(), j = _, M = T(m, "modelValue"), N = m, P = x(N.defaultValue), F = n(M, P), { formField: I, inputBind: L, isVisible: R, mergedClasses: z, toggleVisibility: B } = c(N, { onVisibilityChange: (e) => j("visibility-change", e) }), V = l(() => r(N.customProps?.toggle, {
|
|
56
51
|
type: "button",
|
|
57
|
-
disabled:
|
|
58
|
-
onClick:
|
|
59
|
-
"aria-label":
|
|
60
|
-
},
|
|
61
|
-
"bridge-end-adornment bridge-field-adornment-button inline-flex h-
|
|
62
|
-
[
|
|
52
|
+
disabled: N.disabled,
|
|
53
|
+
onClick: B,
|
|
54
|
+
"aria-label": R.value ? A("Hide password") : A("Show password")
|
|
55
|
+
}, k({
|
|
56
|
+
"bridge-end-adornment bridge-field-adornment-button inline-flex h-auto! min-h-0 self-stretch overflow-hidden items-center justify-center px-2.5": !0,
|
|
57
|
+
[z.value.toggle ?? ""]: !0
|
|
63
58
|
})));
|
|
64
|
-
return (e, n) => (
|
|
65
|
-
end:
|
|
66
|
-
icon:
|
|
67
|
-
size:
|
|
68
|
-
},
|
|
69
|
-
default:
|
|
59
|
+
return (e, n) => (b(), u(w(s), { field: w(I) }, f({
|
|
60
|
+
end: D(() => [d("button", y(h(V.value)), [p(w(a), v({
|
|
61
|
+
icon: w(R) ? "eyeOff" : "eye",
|
|
62
|
+
size: w(i)(N.size)
|
|
63
|
+
}, N.customProps?.toggleIcon), null, 16, ["icon", "size"])], 16)]),
|
|
64
|
+
default: D(() => [O(d("input", v({ "onUpdate:modelValue": n[0] ||= (e) => g(F) ? F.value = e : null }, w(L)), null, 16), [[E, w(F)]])]),
|
|
70
65
|
_: 2
|
|
71
|
-
}, [
|
|
66
|
+
}, [S(w(t)(w(o).filter((e) => e !== "end"), e.$slots), (t) => ({
|
|
72
67
|
name: t,
|
|
73
|
-
fn:
|
|
68
|
+
fn: D((n) => [C(e.$slots, t, y(h(n || {})))])
|
|
74
69
|
}))]), 1032, ["field"]));
|
|
75
70
|
}
|
|
76
71
|
});
|
|
77
72
|
//#endregion
|
|
78
|
-
export {
|
|
73
|
+
export { A as default };
|
|
@@ -446,6 +446,7 @@ export declare function usePasswordField(props: PasswordFieldOwnProps, options?:
|
|
|
446
446
|
endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
447
447
|
invalidated: import('vue').ComputedRef<boolean>;
|
|
448
448
|
containerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
449
|
+
"data-bridge-variant": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldVariant | undefined>;
|
|
449
450
|
"data-bridge-rounded": NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldRounded | undefined>;
|
|
450
451
|
}>>;
|
|
451
452
|
startIconBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useResolveMessage as e } from "../../Adapters/I18n/useI18nAdapter.js";
|
|
2
2
|
import { hasNamedSlot as t, presentSlotNames as n } from "../../Utils/slotOrProp.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { useOptionalModel as r } from "../../Utils/useOptionalModel.js";
|
|
4
|
+
import { mergeNestedComponentProps as i } from "../../Utils/index.js";
|
|
5
|
+
import ee from "../Icon/Icon.js";
|
|
6
|
+
import a from "../Chip/Chip.js";
|
|
7
|
+
import { FORM_FIELD_CHROME_SLOT_NAMES as o } from "../FormField/formField.types.js";
|
|
8
|
+
import te from "../FormField/FormField.js";
|
|
8
9
|
import ne from "../Listbox/Listbox.js";
|
|
9
|
-
import { useSelect as
|
|
10
|
-
import { SELECT_OPTION_KEY as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { isUndefined as j } from "es-toolkit/compat";
|
|
10
|
+
import { useSelect as s } from "./composables/useSelect.js";
|
|
11
|
+
import { SELECT_OPTION_KEY as c } from "./selectInjectionKey.js";
|
|
12
|
+
import { Fragment as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as re, createVNode as h, defineComponent as g, guardReactiveProps as _, isRef as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, toDisplayString as ie, unref as D, useModel as ae, useTemplateRef as O, withCtx as k, withKeys as A, withModifiers as j } from "vue";
|
|
13
13
|
import { cn as M } from "@bridge-ui/core/Utils";
|
|
14
14
|
//#region src/Components/Select/Select.vue?vue&type=script&setup=true&lang.ts
|
|
15
15
|
var N = {
|
|
@@ -98,13 +98,8 @@ var N = {
|
|
|
98
98
|
"update:modelValue"
|
|
99
99
|
], ["update:modelValue"]),
|
|
100
100
|
setup(g, { emit: y }) {
|
|
101
|
-
let L = ae(g, "modelValue"),
|
|
102
|
-
|
|
103
|
-
L.value = e, V.value = e;
|
|
104
|
-
},
|
|
105
|
-
get: () => j(L.value) ? V.value : L.value
|
|
106
|
-
}), U = oe("trigger"), W = w([]);
|
|
107
|
-
C(s, {
|
|
101
|
+
let L = y, R = e(), z = ae(g, "modelValue"), B = g, V = w(B.defaultValue), H = r(z, V), U = O("trigger"), W = w([]);
|
|
102
|
+
C(c, {
|
|
108
103
|
unregister(e) {
|
|
109
104
|
W.value = W.value.filter((t) => String(t.value) !== String(e));
|
|
110
105
|
},
|
|
@@ -112,24 +107,24 @@ var N = {
|
|
|
112
107
|
W.value.some((t) => String(t.value) === String(e.value)) || (W.value = [...W.value, e]);
|
|
113
108
|
}
|
|
114
109
|
});
|
|
115
|
-
let { open: G, slots: K, multiple: q, formField: J, clearBind: Y, clearValue: X, removeChip:
|
|
116
|
-
return (e,
|
|
117
|
-
h(D(
|
|
118
|
-
default:
|
|
110
|
+
let { open: G, slots: K, multiple: q, formField: J, clearBind: Y, clearValue: X, removeChip: oe, triggerBind: Z, handleApply: se, selectOption: ce, handleCancel: le, containerRef: ue, listboxProps: Q, clearIconSize: de, mergedClasses: fe, showClearIcon: pe, selectedOptions: me, hasComposedList: $, handleRegisteredOptionsChange: he } = s(B, H, U, L, W);
|
|
111
|
+
return (e, r) => (S(), f(l, null, [
|
|
112
|
+
h(D(te), { field: D(J) }, m({
|
|
113
|
+
default: k(() => [D(q) ? (S(), f("div", N, [(S(!0), f(l, null, T(D(me), (t) => (S(), u(D(a), b({
|
|
119
114
|
dismissible: "",
|
|
120
115
|
key: String(t.value),
|
|
121
116
|
size: D(J).merged.value.size,
|
|
122
117
|
disabled: D(J).isDisabled.value,
|
|
123
118
|
"clear-label": `Remove ${t.label}`,
|
|
124
|
-
onDismiss: (e) => D(
|
|
125
|
-
}, { ref_for: !0 }, D(
|
|
119
|
+
onDismiss: (e) => D(oe)(t, e)
|
|
120
|
+
}, { ref_for: !0 }, D(i)(B.customProps?.chip, {
|
|
126
121
|
customProps: { clear: D(Y) },
|
|
127
122
|
classes: { root: D(M)({
|
|
128
123
|
"bg-white ring-1 ring-inset ring-dark-200 dark:bg-dark-700 dark:ring-dark-600": !0,
|
|
129
|
-
[D(
|
|
124
|
+
[D(fe).chip ?? ""]: !0
|
|
130
125
|
}) }
|
|
131
126
|
})), {
|
|
132
|
-
default:
|
|
127
|
+
default: k(() => [E(e.$slots, "chip", { option: t }, () => [re(ie(t.label), 1)])]),
|
|
133
128
|
_: 2
|
|
134
129
|
}, 1040, [
|
|
135
130
|
"size",
|
|
@@ -139,62 +134,62 @@ var N = {
|
|
|
139
134
|
]))), 128)), p("textarea", b({ ref: "trigger" }, D(Z)), null, 16)])) : (S(), f("div", P, [p("input", b({
|
|
140
135
|
ref: "trigger",
|
|
141
136
|
class: "min-w-0 flex-1"
|
|
142
|
-
}, D(Z)), null, 16), D(
|
|
143
|
-
onClick:
|
|
144
|
-
onKeydown: [
|
|
145
|
-
"aria-label": D(
|
|
146
|
-
}), [h(D(
|
|
137
|
+
}, D(Z)), null, 16), D(pe) ? (S(), f("span", b({ key: 0 }, D(Y), {
|
|
138
|
+
onClick: r[0] ||= (...e) => D(X) && D(X)(...e),
|
|
139
|
+
onKeydown: [r[1] ||= A(j((...e) => D(X) && D(X)(...e), ["prevent"]), ["enter"]), r[2] ||= A(j((...e) => D(X) && D(X)(...e), ["prevent"]), ["space"])],
|
|
140
|
+
"aria-label": D(R)("Clear selection")
|
|
141
|
+
}), [h(D(ee), b({
|
|
147
142
|
icon: "clear",
|
|
148
|
-
size: D(
|
|
149
|
-
},
|
|
143
|
+
size: D(de)
|
|
144
|
+
}, B.customProps?.clearIcon), null, 16, ["size"])], 16, F)) : d("", !0)]))]),
|
|
150
145
|
_: 2
|
|
151
|
-
}, [T(D(n)(D(
|
|
146
|
+
}, [T(D(n)(D(o), e.$slots), (t) => ({
|
|
152
147
|
name: t,
|
|
153
|
-
fn:
|
|
148
|
+
fn: k((n) => [E(e.$slots, t, x(_(n || {})))])
|
|
154
149
|
}))]), 1032, ["field"]),
|
|
155
150
|
h(D(ne), b({
|
|
156
151
|
modelValue: D(G),
|
|
157
|
-
"onUpdate:modelValue":
|
|
158
|
-
}, D(
|
|
159
|
-
onApply: D(
|
|
160
|
-
"anchor-el": D(
|
|
161
|
-
onCancel: D(
|
|
162
|
-
onSelect: D(
|
|
163
|
-
onRegisteredOptionsChange: D(
|
|
152
|
+
"onUpdate:modelValue": r[3] ||= (e) => v(G) ? G.value = e : null
|
|
153
|
+
}, D(Q), {
|
|
154
|
+
onApply: D(se),
|
|
155
|
+
"anchor-el": D(ue),
|
|
156
|
+
onCancel: D(le),
|
|
157
|
+
onSelect: D(ce),
|
|
158
|
+
onRegisteredOptionsChange: D(he)
|
|
164
159
|
}), m({ _: 2 }, [
|
|
165
160
|
D($) ? {
|
|
166
161
|
name: "default",
|
|
167
|
-
fn:
|
|
162
|
+
fn: k(() => [E(e.$slots, "default")]),
|
|
168
163
|
key: "0"
|
|
169
164
|
} : void 0,
|
|
170
165
|
D(t)(D(K), "beforeOptions") ? {
|
|
171
166
|
name: "beforeOptions",
|
|
172
|
-
fn:
|
|
167
|
+
fn: k(() => [E(e.$slots, "beforeOptions")]),
|
|
173
168
|
key: "1"
|
|
174
169
|
} : void 0,
|
|
175
170
|
D(t)(D(K), "loading") ? {
|
|
176
171
|
name: "loading",
|
|
177
|
-
fn:
|
|
172
|
+
fn: k(() => [E(e.$slots, "loading")]),
|
|
178
173
|
key: "2"
|
|
179
174
|
} : void 0,
|
|
180
175
|
D(t)(D(K), "option") ? {
|
|
181
176
|
name: "option",
|
|
182
|
-
fn:
|
|
177
|
+
fn: k((t) => [E(e.$slots, "option", x(_(t)))]),
|
|
183
178
|
key: "3"
|
|
184
179
|
} : void 0,
|
|
185
180
|
D(t)(D(K), "empty") ? {
|
|
186
181
|
name: "empty",
|
|
187
|
-
fn:
|
|
182
|
+
fn: k(() => [E(e.$slots, "empty")]),
|
|
188
183
|
key: "4"
|
|
189
184
|
} : void 0,
|
|
190
185
|
D(t)(D(K), "footer") ? {
|
|
191
186
|
name: "footer",
|
|
192
|
-
fn:
|
|
187
|
+
fn: k((t) => [E(e.$slots, "footer", x(_(t)))]),
|
|
193
188
|
key: "5"
|
|
194
189
|
} : void 0,
|
|
195
190
|
D(t)(D(K), "afterOptions") ? {
|
|
196
191
|
name: "afterOptions",
|
|
197
|
-
fn:
|
|
192
|
+
fn: k(() => [E(e.$slots, "afterOptions")]),
|
|
198
193
|
key: "6"
|
|
199
194
|
} : void 0
|
|
200
195
|
]), 1040, [
|
|
@@ -450,6 +450,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
|
|
|
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, {}>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { presentSlotNames as e } from "../../Utils/slotOrProp.js";
|
|
2
|
-
import {
|
|
3
|
-
import n from "../BaseField/
|
|
4
|
-
import
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { resolveSliderBounds as
|
|
2
|
+
import { useOptionalModel as t } from "../../Utils/useOptionalModel.js";
|
|
3
|
+
import { BASE_FIELD_CHROME_SLOT_NAMES as n } from "../BaseField/baseField.types.js";
|
|
4
|
+
import r from "../BaseField/BaseField.js";
|
|
5
|
+
import { useSlider as i } from "./composables/useSlider.js";
|
|
6
|
+
import a from "../Tooltip/Tooltip.js";
|
|
7
|
+
import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, defineComponent as f, guardReactiveProps as p, mergeModels as m, mergeProps as h, normalizeProps as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, useModel as C, withCtx as w } from "vue";
|
|
8
|
+
import { resolveSliderBounds as T, resolveSliderDefaultValue as E } from "@bridge-ui/core/Domain";
|
|
9
9
|
//#region src/Components/Slider/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var D = /*@__PURE__*/ f({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "Slider",
|
|
13
13
|
props: /*@__PURE__*/ m({
|
|
@@ -43,7 +43,7 @@ var O = /*@__PURE__*/ f({
|
|
|
43
43
|
}),
|
|
44
44
|
emits: /*@__PURE__*/ m(["change", "update:modelValue"], ["update:modelValue"]),
|
|
45
45
|
setup(f, { emit: m }) {
|
|
46
|
-
let
|
|
46
|
+
let D = m, O = f, k = C(f, "modelValue"), A = {
|
|
47
47
|
min: 0,
|
|
48
48
|
step: 1,
|
|
49
49
|
max: 100,
|
|
@@ -52,67 +52,62 @@ var O = /*@__PURE__*/ f({
|
|
|
52
52
|
color: "primary",
|
|
53
53
|
showStops: !1,
|
|
54
54
|
showTooltip: !0
|
|
55
|
-
},
|
|
56
|
-
min:
|
|
57
|
-
max:
|
|
58
|
-
step:
|
|
59
|
-
}),
|
|
60
|
-
min:
|
|
61
|
-
max:
|
|
62
|
-
step:
|
|
63
|
-
range: !!
|
|
64
|
-
defaultValue:
|
|
65
|
-
})), P =
|
|
66
|
-
|
|
67
|
-
A.value = e, N.value = e;
|
|
68
|
-
},
|
|
69
|
-
get: () => T(A.value) ? N.value : A.value
|
|
70
|
-
}), F = v([null, null]), { barBind: I, trackRef: L, baseField: R, trackBind: z, controlBind: B, getStopBind: V, thumbIndexes: H, tooltipProps: U, getThumbBind: W, resolvedStops: G, isTooltipOpen: K, hasStopLabels: q, readThumbValue: J, stopLabelsBind: Y, getStopLabelBind: X, getThumbKnobBind: Z, showTooltip: Q } = r(() => k, j, P, { onChange: (e) => {
|
|
71
|
-
O("change", e);
|
|
55
|
+
}, j = T({
|
|
56
|
+
min: O.min ?? A.min,
|
|
57
|
+
max: O.max ?? A.max,
|
|
58
|
+
step: O.step ?? A.step
|
|
59
|
+
}), M = v(E({
|
|
60
|
+
min: j.min,
|
|
61
|
+
max: j.max,
|
|
62
|
+
step: j.step,
|
|
63
|
+
range: !!O.range,
|
|
64
|
+
defaultValue: O.defaultValue
|
|
65
|
+
})), N = t(k, M), P = v([null, null]), { barBind: F, trackRef: I, baseField: L, trackBind: R, controlBind: z, getStopBind: B, thumbIndexes: V, tooltipProps: H, getThumbBind: U, resolvedStops: W, isTooltipOpen: G, hasStopLabels: K, readThumbValue: q, stopLabelsBind: J, getStopLabelBind: Y, getThumbKnobBind: X, showTooltip: Z } = i(() => O, A, N, { onChange: (e) => {
|
|
66
|
+
D("change", e);
|
|
72
67
|
} });
|
|
73
|
-
function
|
|
74
|
-
|
|
68
|
+
function Q(e) {
|
|
69
|
+
I.value = e instanceof HTMLDivElement ? e : e?.$el ?? null;
|
|
75
70
|
}
|
|
76
|
-
function
|
|
71
|
+
function $(e, t) {
|
|
77
72
|
let n = t instanceof HTMLButtonElement ? t : t?.$el ?? null;
|
|
78
|
-
|
|
73
|
+
P.value[e] = n;
|
|
79
74
|
}
|
|
80
|
-
return (
|
|
81
|
-
default: w(() => [u("div", g(p(S(
|
|
82
|
-
u("div", h({ ref:
|
|
83
|
-
u("div", g(p(S(
|
|
84
|
-
(_(!0), l(
|
|
85
|
-
(_(!0), l(
|
|
75
|
+
return (t, i) => (_(), s(r, { field: S(L) }, d({
|
|
76
|
+
default: w(() => [u("div", g(p(S(z))), [
|
|
77
|
+
u("div", h({ ref: Q }, S(R)), [
|
|
78
|
+
u("div", g(p(S(F))), null, 16),
|
|
79
|
+
(_(!0), l(o, null, y(S(W), (e) => (_(), l("div", h({ key: `stop-${e.value}` }, { ref_for: !0 }, S(B)(e)), null, 16))), 128)),
|
|
80
|
+
(_(!0), l(o, null, y(S(V), (e) => (_(), l("button", h({ key: e }, { ref_for: !0 }, S(U)(e), {
|
|
86
81
|
ref_for: !0,
|
|
87
|
-
ref: (t) =>
|
|
88
|
-
}), [b(
|
|
82
|
+
ref: (t) => $(e, t)
|
|
83
|
+
}), [b(t.$slots, "thumb", {}, () => [u("span", h({ ref_for: !0 }, S(X)(e)), null, 16)])], 16))), 128))
|
|
89
84
|
], 16),
|
|
90
|
-
S(
|
|
85
|
+
S(Z) ? (_(!0), l(o, { key: 0 }, y(S(V), (e) => (_(), s(S(a), h({
|
|
91
86
|
arrow: "",
|
|
92
87
|
size: "sm",
|
|
93
88
|
"open-delay": 0,
|
|
94
89
|
placement: "top",
|
|
95
90
|
"close-delay": 0,
|
|
96
91
|
key: `tooltip-${e}`,
|
|
97
|
-
"anchor-el":
|
|
98
|
-
"model-value": S(
|
|
99
|
-
content: String(S(
|
|
100
|
-
}, { ref_for: !0 }, S(
|
|
92
|
+
"anchor-el": P.value[e],
|
|
93
|
+
"model-value": S(G)(e),
|
|
94
|
+
content: String(S(q)(e))
|
|
95
|
+
}, { ref_for: !0 }, S(H)), null, 16, [
|
|
101
96
|
"anchor-el",
|
|
102
97
|
"model-value",
|
|
103
98
|
"content"
|
|
104
99
|
]))), 128)) : c("", !0),
|
|
105
|
-
S(
|
|
100
|
+
S(K) ? (_(), l("div", g(h({ key: 1 }, S(J))), [(_(!0), l(o, null, y(S(W), (e) => (_(), l(o, { key: `label-${e.value}` }, [e.label ? (_(), l("div", h({
|
|
106
101
|
key: 0,
|
|
107
102
|
ref_for: !0
|
|
108
|
-
}, S(
|
|
103
|
+
}, S(Y)(e)), x(e.label), 17)) : c("", !0)], 64))), 128))], 16)) : c("", !0)
|
|
109
104
|
], 16)]),
|
|
110
105
|
_: 2
|
|
111
|
-
}, [y(S(e)(S(
|
|
106
|
+
}, [y(S(e)(S(n), t.$slots), (e) => ({
|
|
112
107
|
name: e,
|
|
113
|
-
fn: w((
|
|
108
|
+
fn: w((n) => [b(t.$slots, e, g(p(n || {})))])
|
|
114
109
|
}))]), 1032, ["field"]));
|
|
115
110
|
}
|
|
116
111
|
});
|
|
117
112
|
//#endregion
|
|
118
|
-
export {
|
|
113
|
+
export { D as default };
|
|
@@ -479,7 +479,7 @@ export declare function useSlider(props: MaybeRefOrGetter<SliderOwnProps>, libDe
|
|
|
479
479
|
getThumbKnobBind: (thumbIndex: 0 | 1) => import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
480
480
|
"aria-hidden": boolean;
|
|
481
481
|
}>;
|
|
482
|
-
tooltipProps: import('vue').ComputedRef<Partial<Omit<import('../../Tooltip').TooltipOwnProps, "slots" | "
|
|
482
|
+
tooltipProps: import('vue').ComputedRef<Partial<Omit<import('../../Tooltip').TooltipOwnProps, "slots" | "modelValue" | "anchorEl" | "content">> | undefined>;
|
|
483
483
|
readThumbValue: (thumbIndex: 0 | 1) => number;
|
|
484
484
|
};
|
|
485
485
|
export type UseSliderReturn = ReturnType<typeof useSlider>;
|
|
@@ -28,7 +28,7 @@ var l = /*@__PURE__*/ r({
|
|
|
28
28
|
variant: {}
|
|
29
29
|
},
|
|
30
30
|
setup(r) {
|
|
31
|
-
let {
|
|
31
|
+
let { wrapBind: l, rootBind: u, tableBind: d } = e(r, {
|
|
32
32
|
size: "md",
|
|
33
33
|
full: !0,
|
|
34
34
|
rounded: "lg",
|
|
@@ -37,7 +37,7 @@ var l = /*@__PURE__*/ r({
|
|
|
37
37
|
hoverable: !1,
|
|
38
38
|
stickyHeader: !1
|
|
39
39
|
});
|
|
40
|
-
return (e, r) => (o(), t("div", a(i(c(l))), [n("
|
|
40
|
+
return (e, r) => (o(), t("div", a(i(c(l))), [n("div", a(i(c(u))), [n("table", a(i(c(d))), [s(e.$slots, "default")], 16)], 16)], 16));
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
//#endregion
|
|
@@ -5,6 +5,9 @@ type TableLibDefaults = LibDefaultsShape<TableOwnProps, "full" | "size" | "round
|
|
|
5
5
|
type TableMerged = MergeLibDefaults<TableOwnProps, TableLibDefaults>;
|
|
6
6
|
export declare function useTable(props: TableOwnProps, libDefaults: TableLibDefaults): {
|
|
7
7
|
merged: import('vue').ComputedRef<TableMerged>;
|
|
8
|
+
wrapBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
9
|
+
class: string;
|
|
10
|
+
}, "class", {}, {}>>;
|
|
8
11
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
9
12
|
class: string;
|
|
10
13
|
}, "class", import('vue').HTMLAttributes | undefined, Omit<TableProps, "size" | "classes" | "customProps" | "full" | "rounded" | "variant" | "hoverable" | "stickyHeader" | "striped">>>;
|
|
@@ -65,6 +65,7 @@ function g(g, _) {
|
|
|
65
65
|
}));
|
|
66
66
|
return a(r, A), {
|
|
67
67
|
merged: b,
|
|
68
|
+
wrapBind: i(() => e({}, {}, { class: f({ "w-fit min-w-0 max-w-full": b.value.full === !1 }) })),
|
|
68
69
|
rootBind: i(() => e(b.value.customProps?.root, y.value.inheritedAttrs, { class: f({
|
|
69
70
|
"overflow-x-auto": b.value.stickyHeader !== !0,
|
|
70
71
|
[s(D.value, "root") ?? ""]: !0,
|
|
@@ -321,7 +321,8 @@ export interface TableOwnProps {
|
|
|
321
321
|
*/
|
|
322
322
|
customProps?: TableCustomProps;
|
|
323
323
|
/**
|
|
324
|
-
* Stretch the table to at least the wrapper width.
|
|
324
|
+
* Stretch the table to at least the wrapper width. When `false`, the
|
|
325
|
+
* wrapper hugs column content instead of spanning the parent.
|
|
325
326
|
*
|
|
326
327
|
* @default true
|
|
327
328
|
*/
|