@bridge-ui/vue 0.6.0 → 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.
Files changed (76) hide show
  1. package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
  2. package/dist/Adapters/I18n/useI18nAdapter.js +4 -1
  3. package/dist/Components/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/Components/Accordion/accordion.types.d.ts +2 -2
  5. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +1 -1
  6. package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +33 -28
  7. package/dist/Components/BaseField/BaseFieldCorner.js +5 -0
  8. package/dist/Components/BaseField/BaseFieldCorner.vue.d.ts +17 -0
  9. package/dist/Components/BaseField/BaseFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
  10. package/dist/Components/BaseField/baseField.types.d.ts +4 -2
  11. package/dist/Components/BaseField/composables/useBaseField.d.ts +1 -1
  12. package/dist/Components/BaseField/composables/useBaseField.js +11 -8
  13. package/dist/Components/ColorField/composables/useColorField.d.ts +1 -1
  14. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +154 -131
  15. package/dist/Components/DataTable/DataTablePagination.js +5 -0
  16. package/dist/Components/DataTable/DataTablePagination.vue.d.ts +24 -0
  17. package/dist/Components/DataTable/DataTablePagination.vue_vue_type_script_setup_true_lang.js +40 -0
  18. package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -3
  19. package/dist/Components/DataTable/composables/useDataTable.js +299 -280
  20. package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +69 -0
  21. package/dist/Components/DataTable/composables/useDataTablePagination.js +130 -0
  22. package/dist/Components/DataTable/dataTable.types.d.ts +27 -12
  23. package/dist/Components/DataTable/dataTablePagination.types.d.ts +169 -0
  24. package/dist/Components/DataTable/index.d.ts +2 -1
  25. package/dist/Components/DateField/composables/useDateField.d.ts +1 -1
  26. package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -1
  27. package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -1
  28. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -1
  29. package/dist/Components/FormField/FilledFormField.vue.d.ts +7 -7
  30. package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  31. package/dist/Components/FormField/FormFieldCorner.js +5 -0
  32. package/dist/Components/FormField/FormFieldCorner.vue.d.ts +17 -0
  33. package/dist/Components/FormField/FormFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
  34. package/dist/Components/FormField/NotchedFormField.vue.d.ts +7 -7
  35. package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +31 -26
  36. package/dist/Components/FormField/OutlinedFormField.vue.d.ts +7 -7
  37. package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  38. package/dist/Components/FormField/StackedFormField.vue.d.ts +6 -6
  39. package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +34 -29
  40. package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +7 -7
  41. package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
  42. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  43. package/dist/Components/FormField/composables/useFormField.js +15 -9
  44. package/dist/Components/FormField/formField.types.d.ts +4 -2
  45. package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -1
  46. package/dist/Components/OtpField/composables/useOtpField.d.ts +1 -1
  47. package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +6 -6
  48. package/dist/Components/Pagination/composables/usePagination.d.ts +4 -2
  49. package/dist/Components/Pagination/composables/usePagination.js +125 -127
  50. package/dist/Components/Pagination/pagination.types.d.ts +5 -5
  51. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -1
  52. package/dist/Components/Select/composables/useSelect.d.ts +1 -1
  53. package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
  54. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +2 -2
  55. package/dist/Components/Tabs/composables/useTabs.js +16 -10
  56. package/dist/Components/Tabs/tabs.types.d.ts +3 -3
  57. package/dist/Components/TextField/composables/useTextField.d.ts +1 -1
  58. package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -1
  59. package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -1
  60. package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -1
  61. package/dist/index.d.ts +1 -1
  62. package/dist/index.js +4 -4
  63. package/docs/components/Accordion.md +1 -1
  64. package/docs/components/DataTable.md +5 -11
  65. package/docs/components/I18n.md +65 -24
  66. package/docs/components/Pagination.md +5 -3
  67. package/docs/components/Table.md +2 -2
  68. package/docs/components/Tabs.md +24 -6
  69. package/docs/examples/i18n-dictionary.ts +28 -10
  70. package/docs/examples/i18n-vue-i18n.ts +7 -6
  71. package/docs/examples/icon-fontawesome.ts +4 -0
  72. package/docs/examples/icon-heroicons.ts +5 -1
  73. package/docs/examples/icon-lucide.ts +4 -0
  74. package/docs/examples/icon-phosphor.ts +4 -0
  75. package/docs/examples/icon-tabler.ts +4 -0
  76. package/package.json +2 -2
@@ -1,42 +1,47 @@
1
1
  import { hasNamedSlot as e, hasSlotOrProp as t, isPropPresent as n } from "../../Utils/slotOrProp.js";
2
2
  import r from "../Icon/Icon.js";
3
- import i from "./FormFieldLabel.js";
4
- import { Fragment as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, mergeProps as m, normalizeProps as h, openBlock as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as b, withCtx as x } from "vue";
3
+ import i from "./FormFieldCorner.js";
4
+ import a from "./FormFieldLabel.js";
5
+ import { Fragment as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, defineComponent as p, guardReactiveProps as m, mergeProps as h, normalizeProps as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useSlots as x, withCtx as S } from "vue";
5
6
  //#region src/Components/FormField/UnderlinedFormField.vue?vue&type=script&setup=true&lang.ts
6
- var S = [
7
+ var C = [
7
8
  "data-invalid",
8
9
  "aria-disabled",
9
10
  "aria-readonly"
10
- ], C = ["id"], w = ["id", "aria-hidden"], T = /*@__PURE__*/ f({
11
+ ], w = ["id"], T = ["id", "aria-hidden"], E = /*@__PURE__*/ p({
11
12
  __name: "UnderlinedFormField",
12
13
  props: { api: {} },
13
- setup(f) {
14
- let T = b();
15
- return (b, E) => (g(), s("div", m(f.api.rootBind.value, {
16
- "data-invalid": f.api.invalidated.value || void 0,
17
- "aria-disabled": f.api.isDisabled.value || void 0,
18
- "aria-readonly": f.api.isReadonly.value || void 0
14
+ setup(p) {
15
+ let E = x();
16
+ return (x, D) => (_(), c("div", h(p.api.rootBind.value, {
17
+ "data-invalid": p.api.invalidated.value || void 0,
18
+ "aria-disabled": p.api.isDisabled.value || void 0,
19
+ "aria-readonly": p.api.isReadonly.value || void 0
19
20
  }), [
20
- y(t)(y(T), "label", f.api.merged.value.label) || y(t)(y(T), "corner", f.api.merged.value.corner) ? (g(), s("div", h(m({ key: 0 }, f.api.headerBind.value)), [d(i, { api: f.api }, l({ _: 2 }, [y(e)(y(T), "label") ? {
21
+ b(t)(b(E), "label", p.api.merged.value.label) || b(t)(b(E), "corner", p.api.merged.value.corner) ? (_(), c("div", g(h({ key: 0 }, p.api.headerBind.value)), [f(a, { api: p.api }, u({ _: 2 }, [b(e)(b(E), "label") ? {
21
22
  name: "label",
22
- fn: x(() => [_(b.$slots, "label")]),
23
+ fn: S(() => [v(x.$slots, "label")]),
23
24
  key: "0"
24
- } : void 0]), 1032, ["api"]), y(t)(y(T), "corner", f.api.merged.value.corner) ? (g(), s("span", h(m({ key: 0 }, f.api.cornerBind.value)), [y(e)(y(T), "corner") ? _(b.$slots, "corner", {}, void 0, void 0, 0) : y(n)(f.api.merged.value.corner) ? (g(), s(a, { key: 1 }, [u(v(f.api.merged.value.corner), 1)], 64)) : o("", !0)], 16)) : o("", !0)], 16)) : o("", !0),
25
- c("div", h(p(f.api.containerBind.value)), [
26
- y(e)(y(T), "start") ? (g(), s("div", h(m({ key: 0 }, f.api.startSlotBind.value)), [_(b.$slots, "start")], 16)) : y(n)(f.api.merged.value.start) ? (g(), s("div", h(m({ key: 1 }, f.api.startBind.value)), v(f.api.merged.value.start), 17)) : f.api.merged.value.startIcon ? (g(), s("div", h(m({ key: 2 }, f.api.startBind.value)), [d(y(r), m({ size: f.api.merged.value.size }, f.api.startIconBind.value, { icon: f.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : o("", !0),
27
- _(b.$slots, "default"),
28
- y(e)(y(T), "end") ? (g(), s("div", h(m({ key: 3 }, f.api.endSlotBind.value)), [_(b.$slots, "end")], 16)) : y(n)(f.api.merged.value.end) ? (g(), s("div", h(m({ key: 4 }, f.api.endBind.value)), v(f.api.merged.value.end), 17)) : f.api.invalidated.value && f.api.merged.value.showErrorIcon !== !1 ? (g(), s("div", h(m({ key: 5 }, f.api.endBind.value)), [d(y(r), m({
29
- icon: f.api.errorIcon.value,
30
- size: f.api.merged.value.size
31
- }, f.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : f.api.merged.value.endIcon ? (g(), s("div", h(m({ key: 6 }, f.api.endBind.value)), [d(y(r), m({ size: f.api.merged.value.size }, f.api.endIconBind.value, { icon: f.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : o("", !0)
25
+ } : void 0]), 1032, ["api"]), f(i, { api: p.api }, u({ _: 2 }, [b(e)(b(E), "corner") ? {
26
+ name: "corner",
27
+ fn: S(() => [v(x.$slots, "corner")]),
28
+ key: "0"
29
+ } : void 0]), 1032, ["api"])], 16)) : s("", !0),
30
+ l("div", g(m(p.api.containerBind.value)), [
31
+ b(e)(b(E), "start") ? (_(), c("div", g(h({ key: 0 }, p.api.startSlotBind.value)), [v(x.$slots, "start")], 16)) : b(n)(p.api.merged.value.start) ? (_(), c("div", g(h({ key: 1 }, p.api.startBind.value)), y(p.api.merged.value.start), 17)) : p.api.merged.value.startIcon ? (_(), c("div", g(h({ key: 2 }, p.api.startBind.value)), [f(b(r), h({ size: p.api.merged.value.size }, p.api.startIconBind.value, { icon: p.api.merged.value.startIcon }), null, 16, ["size", "icon"])], 16)) : s("", !0),
32
+ v(x.$slots, "default"),
33
+ b(e)(b(E), "end") ? (_(), c("div", g(h({ key: 3 }, p.api.endSlotBind.value)), [v(x.$slots, "end")], 16)) : b(n)(p.api.merged.value.end) ? (_(), c("div", g(h({ key: 4 }, p.api.endBind.value)), y(p.api.merged.value.end), 17)) : p.api.invalidated.value && p.api.merged.value.showErrorIcon !== !1 ? (_(), c("div", g(h({ key: 5 }, p.api.endBind.value)), [f(b(r), h({
34
+ icon: p.api.errorIcon.value,
35
+ size: p.api.merged.value.size
36
+ }, p.api.endIconBind.value), null, 16, ["icon", "size"])], 16)) : p.api.merged.value.endIcon ? (_(), c("div", g(h({ key: 6 }, p.api.endBind.value)), [f(b(r), h({ size: p.api.merged.value.size }, p.api.endIconBind.value, { icon: p.api.merged.value.endIcon }), null, 16, ["size", "icon"])], 16)) : s("", !0)
32
37
  ], 16),
33
- !f.api.invalidated.value && y(t)(y(T), "description", f.api.merged.value.description) ? (g(), s("p", m({ key: 1 }, f.api.descriptionBind.value, { id: `${f.api.controlId.value}-description` }), [y(e)(y(T), "description") ? _(b.$slots, "description", {}, void 0, void 0, 0) : y(n)(f.api.merged.value.description) ? (g(), s(a, { key: 1 }, [u(v(f.api.merged.value.description), 1)], 64)) : o("", !0)], 16, C)) : o("", !0),
34
- f.api.merged.value.hideErrorMessage ? o("", !0) : (g(), s("p", m({ key: 2 }, f.api.errorBind.value, {
35
- id: `${f.api.controlId.value}-error`,
36
- "aria-hidden": !f.api.showErrorMessageContent.value || void 0
37
- }), [f.api.showErrorMessageContent.value ? (g(), s(a, { key: 0 }, [y(e)(y(T), "errorMessage") ? _(b.$slots, "errorMessage", {}, void 0, void 0, 0) : y(n)(f.api.merged.value.errorMessage) ? (g(), s(a, { key: 1 }, [u(v(f.api.merged.value.errorMessage), 1)], 64)) : o("", !0)], 64)) : o("", !0)], 16, w))
38
- ], 16, S));
38
+ !p.api.invalidated.value && b(t)(b(E), "description", p.api.merged.value.description) ? (_(), c("p", h({ key: 1 }, p.api.descriptionBind.value, { id: `${p.api.controlId.value}-description` }), [b(e)(b(E), "description") ? v(x.$slots, "description", {}, void 0, void 0, 0) : b(n)(p.api.merged.value.description) ? (_(), c(o, { key: 1 }, [d(y(p.api.merged.value.description), 1)], 64)) : s("", !0)], 16, w)) : s("", !0),
39
+ p.api.merged.value.hideErrorMessage ? s("", !0) : (_(), c("p", h({ key: 2 }, p.api.errorBind.value, {
40
+ id: `${p.api.controlId.value}-error`,
41
+ "aria-hidden": !p.api.showErrorMessageContent.value || void 0
42
+ }), [p.api.showErrorMessageContent.value ? (_(), c(o, { key: 0 }, [b(e)(b(E), "errorMessage") ? v(x.$slots, "errorMessage", {}, void 0, void 0, 0) : b(n)(p.api.merged.value.errorMessage) ? (_(), c(o, { key: 1 }, [d(y(p.api.merged.value.errorMessage), 1)], 64)) : s("", !0)], 64)) : s("", !0)], 16, T))
43
+ ], 16, C));
39
44
  }
40
45
  });
41
46
  //#endregion
42
- export { T as default };
47
+ export { E as default };
@@ -451,7 +451,6 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
451
451
  isNotched: import('vue').ComputedRef<boolean>;
452
452
  isStacked: import('vue').ComputedRef<boolean>;
453
453
  startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
454
- cornerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
455
454
  headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
456
455
  isDisabled: import('vue').ComputedRef<boolean>;
457
456
  isReadonly: import('vue').ComputedRef<boolean>;
@@ -469,6 +468,7 @@ export declare function useFormField(props: MaybeRefOrGetter<Omit<FormFieldOwnPr
469
468
  ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
470
469
  descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
471
470
  stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
471
+ fieldCornerProps: import('vue').ComputedRef<LabelProps>;
472
472
  hasInsetLabelRow: import('vue').ComputedRef<boolean>;
473
473
  insetLabelRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", HTMLAttributes | undefined, {}>>;
474
474
  stackedInputRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
@@ -90,10 +90,12 @@ function x(x, ee, S = {}) {
90
90
  [A.value.root ?? ""]: !0
91
91
  }));
92
92
  }), ie = o(() => r(O.value?.errorMessage, {}, g({
93
- "mt-2": !0,
93
+ "mt-1": !0,
94
94
  "min-h-[1lh]": V.value,
95
95
  "text-error-600 dark:text-error-400": !0,
96
96
  [q.value?.text ?? ""]: !0,
97
+ [q.value?.insetStart ?? ""]: !0,
98
+ [q.value?.insetEnd ?? ""]: !0,
97
99
  [A.value.errorMessage ?? ""]: !0
98
100
  }))), ae = o(() => r({
99
101
  ...O.value?.input,
@@ -134,12 +136,14 @@ function x(x, ee, S = {}) {
134
136
  "text-dark-400": !0,
135
137
  [J.value?.start ?? ""]: !0,
136
138
  [A.value.start ?? ""]: !0
137
- }))), se = o(() => r(O.value?.corner, {}, g({
138
- "text-dark-500 dark:text-dark-400": !I.value,
139
- [q.value?.text ?? ""]: !0,
140
- [X.value?.corner ?? ""]: I.value,
141
- [A.value.corner ?? ""]: !0
142
- }))), ce = o(() => {
139
+ }))), se = o(() => n(O.value?.corner, {
140
+ for: H.value,
141
+ size: E.value.size,
142
+ classes: { root: g({
143
+ [X.value?.corner ?? ""]: I.value,
144
+ [A.value.corner ?? ""]: !0
145
+ }) }
146
+ })), ce = o(() => {
143
147
  let e = t(w, "label", E.value.label);
144
148
  return r(O.value?.header, {}, g({
145
149
  flex: !0,
@@ -181,7 +185,6 @@ function x(x, ee, S = {}) {
181
185
  isNotched: I,
182
186
  isStacked: L,
183
187
  startBind: $,
184
- cornerBind: se,
185
188
  headerBind: le,
186
189
  isDisabled: M,
187
190
  isReadonly: N,
@@ -219,11 +222,14 @@ function x(x, ee, S = {}) {
219
222
  fieldLabelProps: oe,
220
223
  ariaDescribedBy: K,
221
224
  descriptionBind: o(() => r(O.value?.description, {}, g({
222
- "mt-2 text-dark-500 dark:text-dark-400": !0,
225
+ "mt-1 text-dark-500 dark:text-dark-400": !0,
223
226
  [q.value?.text ?? ""]: !0,
227
+ [q.value?.insetStart ?? ""]: !0,
228
+ [q.value?.insetEnd ?? ""]: !0,
224
229
  [A.value.description ?? ""]: !0
225
230
  }))),
226
231
  stackedBodyBind: fe,
232
+ fieldCornerProps: se,
227
233
  hasInsetLabelRow: W,
228
234
  insetLabelRowBind: ce,
229
235
  stackedInputRowBind: pe,
@@ -61,9 +61,11 @@ export interface FormFieldCustomProps {
61
61
  */
62
62
  container?: HTMLAttributes;
63
63
  /**
64
- * Props forwarded to the corner label element.
64
+ * Props forwarded to the corner `Label` (content stays owned by `FormField`).
65
+ *
66
+ * @default undefined
65
67
  */
66
- corner?: HTMLAttributes;
68
+ corner?: Partial<LabelProps>;
67
69
  /**
68
70
  * Props forwarded to the helper text below the control.
69
71
  */
@@ -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, getItemBind: M, prevIconBind: N, nextIconBind: P, getEllipsisBind: F } = t(C, {
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
- variant: "text",
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" }, _(N)), null, 16)])], 16)])) : r("", !0),
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
- }, _(F)(r)), [h(t.$slots, "ellipsis", {}, () => [c[0] ||= o("…", -1)])], 16)) : (p(), i("li", b, [a("button", d({ ref_for: !0 }, _(M)(e.page)), g(e.page), 17)]))], 64))), 128)),
72
- _(D) ? (p(), i("li", x, [a("button", f(l(_(j))), [h(t.$slots, "next", {}, () => [s(_(e), d({ icon: "chevronRight" }, _(P)), null, 16)])], 16)])) : r("", !0)
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>;
@@ -1,11 +1,12 @@
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 { getPaginationItems as s } from "@bridge-ui/core/Domain";
5
- import { paginationColorProps as ee, paginationRoundedProps as c, paginationSizeProps as l, paginationVariantProps as u } from "@bridge-ui/core/Tokens";
6
- import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core/Utils";
1
+ import { useResolveMessage as e } from "../../../Adapters/I18n/useI18nAdapter.js";
2
+ import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
3
+ import { computed as i, useAttrs as a, useSlots as o } from "vue";
4
+ import { get as s } from "es-toolkit/compat";
5
+ import { getPaginationItems as c } from "@bridge-ui/core/Domain";
6
+ import { paginationColorProps as l, paginationRoundedProps as u, paginationSizeProps as d, paginationVariantProps as f } from "@bridge-ui/core/Tokens";
7
+ import { cn as p, mergeBridgeUILayeredClasses as m, splitComponentProps as h } from "@bridge-ui/core/Utils";
7
8
  //#region src/Components/Pagination/composables/usePagination.ts
8
- var m = [
9
+ var g = [
9
10
  "mode",
10
11
  "size",
11
12
  "color",
@@ -23,166 +24,163 @@ var m = [
23
24
  "hideNextButton",
24
25
  "hidePrevButton"
25
26
  ];
26
- function h(h, g, _, v) {
27
- let y = i(), b = a(), x = r(() => p({
27
+ function _(_, v, y, b) {
28
+ let x = e(), S = a(), C = o(), w = i(() => h({
28
29
  props: {
29
- ...y,
30
- ...h
30
+ ...S,
31
+ ..._
31
32
  },
32
- bridgeKeys: m
33
- })), { merged: S, entry: C } = t({
34
- libDefaults: g,
33
+ bridgeKeys: g
34
+ })), { merged: T, entry: E } = n({
35
+ libDefaults: v,
35
36
  componentName: "Pagination",
36
- props: () => x.value.componentProps
37
- }), w = r(() => S.value.customProps), T = r(() => S.value.mode === "simple" ? 1 : _.value ?? 1), E = r(() => S.value.mode === "simple" ? [] : s({
38
- page: T.value,
39
- count: S.value.count ?? 0,
40
- siblingCount: S.value.siblingCount,
41
- boundaryCount: S.value.boundaryCount
42
- })), D = n({
43
- entry: C,
44
- props: () => x.value.componentProps
45
- }), O = r(() => f(l, C.value?.tokens?.size)), k = r(() => f(u, C.value?.tokens?.variant)), A = r(() => f(ee, C.value?.tokens?.color)), j = r(() => f(c, C.value?.tokens?.rounded)), M = r(() => o(O.value, S.value.size)), N = r(() => o(k.value, S.value.variant)), P = r(() => o(A.value, S.value.color)), F = r(() => o(j.value, S.value.rounded)), I = (e) => {
46
- if (S.value.disabled) return;
47
- let t = S.value.count ?? 0, n = Math.min(Math.max(1, e), Math.max(t, 1));
48
- _.value = n, v("change", n), v("update:modelValue", n);
49
- }, L = () => {
50
- if (!S.value.disabled) {
51
- if (S.value.mode === "simple") {
52
- if (S.value.hasPrevious === !1) return;
53
- v("previous");
37
+ props: () => w.value.componentProps
38
+ }), D = i(() => T.value.customProps), O = i(() => T.value.mode === "simple" ? 1 : y.value ?? 1), k = i(() => T.value.mode === "simple" ? [] : c({
39
+ page: O.value,
40
+ count: T.value.count ?? 0,
41
+ siblingCount: T.value.siblingCount,
42
+ boundaryCount: T.value.boundaryCount
43
+ })), A = r({
44
+ entry: E,
45
+ props: () => w.value.componentProps
46
+ }), j = i(() => m(d, E.value?.tokens?.size)), M = i(() => m(f, E.value?.tokens?.variant)), ee = i(() => m(l, E.value?.tokens?.color)), te = i(() => m(u, E.value?.tokens?.rounded)), N = i(() => s(j.value, T.value.size)), P = i(() => s(M.value, T.value.variant)), F = i(() => s(ee.value, T.value.color)), I = i(() => s(te.value, T.value.rounded)), L = (e) => {
47
+ if (T.value.disabled) return;
48
+ let t = T.value.count ?? 0, n = Math.min(Math.max(1, e), Math.max(t, 1));
49
+ y.value = n, b("change", n), b("update:modelValue", n);
50
+ }, R = () => {
51
+ if (!T.value.disabled) {
52
+ if (T.value.mode === "simple") {
53
+ if (T.value.hasPrevious === !1) return;
54
+ b("previous");
54
55
  return;
55
56
  }
56
- I(T.value - 1);
57
+ L(O.value - 1);
57
58
  }
58
- }, R = () => {
59
- if (!S.value.disabled) {
60
- if (S.value.mode === "simple") {
61
- if (S.value.hasNext === !1) return;
62
- v("next");
59
+ }, z = () => {
60
+ if (!T.value.disabled) {
61
+ if (T.value.mode === "simple") {
62
+ if (T.value.hasNext === !1) return;
63
+ b("next");
63
64
  return;
64
65
  }
65
- I(T.value + 1);
66
+ L(O.value + 1);
66
67
  }
67
- }, z = r(() => S.value.disabled ? !0 : S.value.mode === "simple" ? S.value.hasPrevious === !1 : T.value <= 1), B = r(() => S.value.disabled ? !0 : S.value.mode === "simple" ? S.value.hasNext === !1 : T.value >= (S.value.count ?? 0)), V = r(() => !S.value.hidePrevButton), H = r(() => !S.value.hideNextButton), U = r(() => S.value.variant === "outlined"), W = r(() => S.value.variant === "ghost"), G = r(() => d({
68
- [o(M.value, "item") ?? ""]: !0,
69
- [o(N.value, "item") ?? ""]: !0,
70
- [o(F.value, "item") ?? ""]: W.value
71
- })), K = r(() => d({
72
- [o(M.value, "itemIcon") ?? ""]: !0,
73
- [o(N.value, "item") ?? ""]: !0,
74
- [o(F.value, "item") ?? ""]: W.value
75
- })), q = r(() => {
76
- let e = S.value.variant;
77
- return d({
78
- [o(N.value, "itemSelected") ?? ""]: !0,
79
- [o(P.value, "itemSelectedFilled") ?? ""]: e === "outlined",
80
- [o(P.value, "itemSelectedAccent") ?? ""]: e === "text" || e === "ghost",
81
- [o(P.value, "itemSelectedSoft") ?? ""]: e === "ghost"
82
- });
83
- }), J = r(() => {
84
- let e = E.value.filter((e) => e.type === "page");
68
+ }, B = i(() => T.value.disabled ? !0 : T.value.mode === "simple" ? T.value.hasPrevious === !1 : O.value <= 1), V = i(() => T.value.disabled ? !0 : T.value.mode === "simple" ? T.value.hasNext === !1 : O.value >= (T.value.count ?? 0)), H = i(() => !T.value.hidePrevButton), U = i(() => !T.value.hideNextButton), W = i(() => T.value.variant === "outlined"), G = i(() => T.value.variant === "ghost" || T.value.variant === "text"), K = i(() => p({
69
+ [s(N.value, "item") ?? ""]: !0,
70
+ [s(P.value, "item") ?? ""]: !0,
71
+ [s(I.value, "item") ?? ""]: G.value
72
+ })), q = i(() => p({
73
+ [s(N.value, "itemIcon") ?? ""]: !0,
74
+ [s(P.value, "item") ?? ""]: !0,
75
+ [s(I.value, "item") ?? ""]: G.value
76
+ })), J = i(() => p({
77
+ [s(P.value, "itemSelected") ?? ""]: !0,
78
+ [s(F.value, "itemSelectedAccent") ?? ""]: !0
79
+ })), Y = i(() => {
80
+ let e = k.value.filter((e) => e.type === "page");
85
81
  return {
86
82
  first: e[0]?.page,
87
83
  last: e[e.length - 1]?.page
88
84
  };
89
- }), Y = (e, t) => {
90
- if (!U.value) return !1;
85
+ }), X = (e, t) => {
86
+ if (!W.value) return !1;
91
87
  if (e === "prev") return !0;
92
- if (V.value) return !1;
93
- let n = E.value[0];
88
+ if (H.value) return !1;
89
+ let n = k.value[0];
94
90
  return e === "page" ? n?.type === "page" && n.page === t : e === "ellipsis" && n?.type === "ellipsis" && t === 0;
95
- }, X = r(() => {
96
- let t = x.value.inheritedAttrs;
97
- return e(w.value?.root, t, {
98
- "aria-label": t["aria-label"] ?? "Pagination",
99
- class: d({
100
- [o(M.value, "root") ?? ""]: !0,
101
- [o(D.value, "root") ?? ""]: !0
91
+ }, Z = i(() => x("Previous")), Q = i(() => x("Next")), ne = i(() => {
92
+ let e = w.value.inheritedAttrs;
93
+ return t(D.value?.root, e, {
94
+ "aria-label": e["aria-label"] ?? x("Pagination"),
95
+ class: p({
96
+ [s(N.value, "root") ?? ""]: !0,
97
+ [s(A.value, "root") ?? ""]: !0
102
98
  })
103
99
  });
104
- }), Z = r(() => e(w.value?.list, {}, { class: d({
105
- [o(M.value, "list") ?? ""]: !0,
106
- [o(N.value, "list") ?? ""]: !0,
107
- [o(F.value, "list") ?? ""]: U.value,
108
- [o(D.value, "list") ?? ""]: !0
109
- }) })), Q = (t) => {
110
- let n = t === T.value, r = U.value && !V.value && t === J.value.first, i = U.value && !H.value && t === J.value.last;
111
- return e(w.value?.item, {}, {
100
+ }), re = i(() => t(D.value?.list, {}, { class: p({
101
+ [s(N.value, "list") ?? ""]: !0,
102
+ [s(P.value, "list") ?? ""]: !0,
103
+ [s(I.value, "list") ?? ""]: W.value,
104
+ [s(A.value, "list") ?? ""]: !0
105
+ }) })), ie = (e) => {
106
+ let n = e === O.value, r = W.value && !H.value && e === Y.value.first, i = W.value && !U.value && e === Y.value.last;
107
+ return t(D.value?.item, {}, {
112
108
  type: "button",
113
- disabled: S.value.disabled,
114
- "aria-label": `Page ${t}`,
109
+ disabled: T.value.disabled,
110
+ "aria-label": `Page ${e}`,
115
111
  "aria-current": n ? "page" : void 0,
116
112
  onClick: () => {
117
- n || I(t);
113
+ n || L(e);
118
114
  },
119
- class: d({
120
- [G.value]: !0,
121
- [q.value]: n,
122
- [o(D.value, "item") ?? ""]: !0,
123
- "ml-0": Y("page", t),
124
- [o(F.value, "itemStart") ?? ""]: r,
125
- [o(F.value, "itemEnd") ?? ""]: i
115
+ class: p({
116
+ [K.value]: !0,
117
+ [J.value]: n,
118
+ [s(A.value, "item") ?? ""]: !0,
119
+ "ml-0": X("page", e),
120
+ [s(I.value, "itemStart") ?? ""]: r,
121
+ [s(I.value, "itemEnd") ?? ""]: i
126
122
  })
127
123
  });
128
- }, te = (t) => e(w.value?.ellipsis, {}, {
124
+ }, ae = (e) => t(D.value?.ellipsis, {}, {
129
125
  "aria-hidden": !0,
130
- "data-ellipsis-index": t,
131
- class: d({
132
- [o(M.value, "ellipsis") ?? ""]: !0,
133
- [o(N.value, "ellipsis") ?? ""]: !0,
134
- [o(F.value, "item") ?? ""]: W.value,
135
- [o(D.value, "ellipsis") ?? ""]: !0,
136
- "ml-0": Y("ellipsis", t)
126
+ "data-ellipsis-index": e,
127
+ class: p({
128
+ [s(N.value, "ellipsis") ?? ""]: !0,
129
+ [s(P.value, "ellipsis") ?? ""]: !0,
130
+ [s(I.value, "item") ?? ""]: G.value,
131
+ [s(A.value, "ellipsis") ?? ""]: !0,
132
+ "ml-0": X("ellipsis", e)
137
133
  })
138
- }), $ = r(() => o(M.value, "icon") ?? "sm");
134
+ }), $ = i(() => s(N.value, "icon") ?? "sm");
139
135
  return {
140
- page: T,
141
- slots: b,
142
- merged: S,
143
- entries: E,
144
- showPrev: V,
145
- showNext: H,
146
- rootBind: X,
147
- listBind: Z,
148
- prevBind: r(() => e(w.value?.prev, {}, {
149
- onClick: L,
136
+ page: O,
137
+ slots: C,
138
+ merged: T,
139
+ entries: k,
140
+ showPrev: H,
141
+ showNext: U,
142
+ rootBind: ne,
143
+ listBind: re,
144
+ prevBind: i(() => t(D.value?.prev, {}, {
145
+ onClick: R,
150
146
  type: "button",
151
- "aria-label": "Previous",
152
- disabled: z.value,
153
- class: d({
154
- [K.value]: !0,
155
- [o(D.value, "prev") ?? ""]: !0,
156
- [o(D.value, "item") ?? ""]: !0,
157
- "ml-0": U.value,
158
- [o(F.value, "itemStart") ?? ""]: U.value
147
+ disabled: B.value,
148
+ "aria-label": Z.value,
149
+ class: p({
150
+ [q.value]: !0,
151
+ [s(A.value, "prev") ?? ""]: !0,
152
+ [s(A.value, "item") ?? ""]: !0,
153
+ "ml-0": W.value,
154
+ [s(I.value, "itemStart") ?? ""]: W.value
159
155
  })
160
156
  })),
161
- nextBind: r(() => e(w.value?.next, {}, {
162
- onClick: R,
163
- "aria-label": "Next",
157
+ nextBind: i(() => t(D.value?.next, {}, {
158
+ onClick: z,
164
159
  type: "button",
165
- disabled: B.value,
166
- class: d({
167
- [K.value]: !0,
168
- [o(D.value, "next") ?? ""]: !0,
169
- [o(D.value, "item") ?? ""]: !0,
170
- [o(F.value, "itemEnd") ?? ""]: U.value
160
+ disabled: V.value,
161
+ "aria-label": Q.value,
162
+ class: p({
163
+ [q.value]: !0,
164
+ [s(A.value, "next") ?? ""]: !0,
165
+ [s(A.value, "item") ?? ""]: !0,
166
+ [s(I.value, "itemEnd") ?? ""]: W.value
171
167
  })
172
168
  })),
173
- getItemBind: Q,
174
- prevIconBind: r(() => e(w.value?.prevIcon, {}, {
169
+ prevLabel: Z,
170
+ nextLabel: Q,
171
+ getItemBind: ie,
172
+ prevIconBind: i(() => t(D.value?.prevIcon, {}, {
175
173
  "aria-hidden": !0,
176
174
  size: $.value,
177
175
  class: "shrink-0 pointer-events-none"
178
176
  })),
179
- nextIconBind: r(() => e(w.value?.nextIcon, {}, {
177
+ nextIconBind: i(() => t(D.value?.nextIcon, {}, {
180
178
  "aria-hidden": !0,
181
179
  size: $.value,
182
180
  class: "shrink-0 pointer-events-none"
183
181
  })),
184
- getEllipsisBind: te
182
+ getEllipsisBind: ae
185
183
  };
186
184
  }
187
185
  //#endregion
188
- export { h as usePagination };
186
+ export { _ as usePagination };
@@ -117,9 +117,9 @@ export interface PaginationOwnProps {
117
117
  */
118
118
  classes?: PaginationClasses;
119
119
  /**
120
- * Selected page accent color.
120
+ * Optional text accent for the selected page. Selected surface comes from `variant`.
121
121
  *
122
- * @default "primary"
122
+ * @default "dark"
123
123
  */
124
124
  color?: MergeProps<PaginationColor, PaginationColorOverrides>;
125
125
  /**
@@ -165,7 +165,7 @@ export interface PaginationOwnProps {
165
165
  */
166
166
  hidePrevButton?: boolean;
167
167
  /**
168
- * Numbered pages vs prev/next only.
168
+ * Numbered pages, or prev/next only.
169
169
  *
170
170
  * @default "numbered"
171
171
  */
@@ -177,7 +177,7 @@ export interface PaginationOwnProps {
177
177
  */
178
178
  modelValue?: number;
179
179
  /**
180
- * Control corner radius (`ghost` items / `outlined` group edges).
180
+ * Control corner radius (`ghost` / `text` items and `outlined` group edges).
181
181
  *
182
182
  * @default "md"
183
183
  */
@@ -197,7 +197,7 @@ export interface PaginationOwnProps {
197
197
  /**
198
198
  * Visual style of page / control buttons.
199
199
  *
200
- * @default "text"
200
+ * @default "ghost"
201
201
  */
202
202
  variant?: MergeProps<PaginationVariant, PaginationVariantOverrides>;
203
203
  }