@bridge-ui/vue 0.14.0 → 0.15.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 (119) hide show
  1. package/ai/AGENTS.md +1 -1
  2. package/ai/README.md +1 -1
  3. package/ai/llms.txt +4 -3
  4. package/ai/skills/bridge-ui-setup/SKILL.md +9 -8
  5. package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
  6. package/dist/Adapters/Icon/mockIconAdapter.d.ts +5 -0
  7. package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
  8. package/dist/Adapters/RichText/useRichTextAdapter.d.ts +1 -1
  9. package/dist/Components/ActionFooter/ActionFooter.vue_vue_type_script_setup_true_lang.js +3 -5
  10. package/dist/Components/ActionFooter/actionFooter.types.d.ts +7 -12
  11. package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +4 -4
  12. package/dist/Components/ActionFooter/composables/useActionFooter.js +3 -4
  13. package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +2 -2
  14. package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +3 -3
  15. package/dist/Components/Autocomplete/composables/useAutocomplete.js +2 -0
  16. package/dist/Components/BaseField/composables/useBaseField.js +1 -0
  17. package/dist/Components/Checkbox/composables/useCheckbox.js +1 -0
  18. package/dist/Components/ColorField/ColorField.vue.d.ts +2 -2
  19. package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +2 -0
  20. package/dist/Components/ColorField/composables/useColorField.d.ts +2 -2
  21. package/dist/Components/ColorField/composables/useColorField.js +2 -0
  22. package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +5 -1
  23. package/dist/Components/ColorPicker/colorPicker.types.d.ts +8 -2
  24. package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +2 -2
  25. package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -0
  26. package/dist/Components/DateField/DateField.vue.d.ts +2 -2
  27. package/dist/Components/DateField/composables/useDateField.d.ts +2 -2
  28. package/dist/Components/DateField/composables/useDateField.js +2 -0
  29. package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  30. package/dist/Components/DateRangeField/DateRangeField.vue.d.ts +2 -2
  31. package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -2
  32. package/dist/Components/DateRangeField/composables/useDateRangeField.js +2 -0
  33. package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  34. package/dist/Components/DateTimeField/DateTimeField.vue.d.ts +2 -2
  35. package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -2
  36. package/dist/Components/DateTimeField/composables/useDateTimeField.js +2 -0
  37. package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  38. package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue.d.ts +2 -2
  39. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -2
  40. package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +2 -0
  41. package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  42. package/dist/Components/Drawer/Drawer.vue.d.ts +1 -1
  43. package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
  44. package/dist/Components/FileUpload/FileUpload.vue.d.ts +2 -2
  45. package/dist/Components/FormControl/composables/useFormControl.js +46 -45
  46. package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
  47. package/dist/Components/FormField/composables/useFormField.js +144 -143
  48. package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
  49. package/dist/Components/Listbox/Listbox.vue.d.ts +0 -1
  50. package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +3 -2
  51. package/dist/Components/Modal/Modal.vue.d.ts +1 -1
  52. package/dist/Components/Modal/composables/useModal.d.ts +1 -1
  53. package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
  54. package/dist/Components/NumberField/composables/useNumberField.js +1 -0
  55. package/dist/Components/OtpField/composables/useOtpField.js +1 -0
  56. package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
  57. package/dist/Components/PasswordField/composables/usePasswordField.js +1 -0
  58. package/dist/Components/Radio/composables/useRadio.js +1 -0
  59. package/dist/Components/Rating/composables/useRating.js +1 -0
  60. package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +36 -32
  61. package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +2 -1
  62. package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +143 -141
  63. package/dist/Components/Select/Select.vue.d.ts +2 -2
  64. package/dist/Components/Select/composables/useSelect.d.ts +3 -3
  65. package/dist/Components/Select/composables/useSelect.js +2 -0
  66. package/dist/Components/Slider/composables/useSlider.js +1 -0
  67. package/dist/Components/Switch/composables/useSwitch.js +1 -0
  68. package/dist/Components/Tabs/composables/useTabs.d.ts +0 -156
  69. package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
  70. package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
  71. package/dist/Components/Textarea/composables/useTextarea.js +1 -0
  72. package/dist/Components/TimeField/TimeField.vue.d.ts +2 -2
  73. package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -2
  74. package/dist/Components/TimeField/composables/useTimeField.js +2 -0
  75. package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  76. package/dist/Components/TimePicker/composables/useTimePicker.js +1 -0
  77. package/dist/Components/TimeRangeField/TimeRangeField.vue.d.ts +2 -2
  78. package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -2
  79. package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +2 -0
  80. package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +2 -0
  81. package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +1 -0
  82. package/dist/Components/Tooltip/Tooltip.vue.d.ts +0 -1
  83. package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
  84. package/dist/Utils/index.d.ts +16 -6
  85. package/dist/Utils/index.js +39 -35
  86. package/dist/augments.d.ts +1 -1
  87. package/dist/theme.css +10 -1
  88. package/docs/README.md +27 -13
  89. package/docs/components/ActionFooter.md +16 -14
  90. package/docs/components/BridgeUIProvider.md +108 -16
  91. package/docs/components/ColorPicker.md +14 -13
  92. package/docs/components/I18n.md +6 -6
  93. package/docs/components/Icon.md +10 -10
  94. package/docs/components/RichTextEditor.md +4 -4
  95. package/package.json +3 -92
  96. package/dist/Adapters/Examples/date-date-fns.d.ts +0 -9
  97. package/dist/Adapters/Examples/date-date-fns.js +0 -151
  98. package/dist/Adapters/Examples/date-dayjs.d.ts +0 -19
  99. package/dist/Adapters/Examples/date-dayjs.js +0 -174
  100. package/dist/Adapters/Examples/date-luxon.d.ts +0 -7
  101. package/dist/Adapters/Examples/date-luxon.js +0 -164
  102. package/dist/Adapters/Examples/date-moment.d.ts +0 -19
  103. package/dist/Adapters/Examples/date-moment.js +0 -172
  104. package/dist/Adapters/Examples/i18n-dictionary.d.ts +0 -15
  105. package/dist/Adapters/Examples/i18n-dictionary.js +0 -97
  106. package/dist/Adapters/Examples/i18n-vue-i18n.d.ts +0 -7
  107. package/dist/Adapters/Examples/i18n-vue-i18n.js +0 -14
  108. package/dist/Adapters/Examples/icon-fontawesome.d.ts +0 -19
  109. package/dist/Adapters/Examples/icon-fontawesome.js +0 -82
  110. package/dist/Adapters/Examples/icon-heroicons.d.ts +0 -5
  111. package/dist/Adapters/Examples/icon-heroicons.js +0 -56
  112. package/dist/Adapters/Examples/icon-lucide.d.ts +0 -5
  113. package/dist/Adapters/Examples/icon-lucide.js +0 -56
  114. package/dist/Adapters/Examples/icon-phosphor.d.ts +0 -5
  115. package/dist/Adapters/Examples/icon-phosphor.js +0 -56
  116. package/dist/Adapters/Examples/icon-tabler.d.ts +0 -5
  117. package/dist/Adapters/Examples/icon-tabler.js +0 -56
  118. package/dist/Adapters/Examples/rich-text-tiptap.d.ts +0 -5
  119. package/dist/Adapters/Examples/rich-text-tiptap.js +0 -131
@@ -1,18 +1,18 @@
1
1
  import { hasNamedSlot as e, presentSlotNames as t } from "../../Utils/slotOrProp.js";
2
2
  import { useOptionalModel as n } from "../../Utils/useOptionalModel.js";
3
- import r from "../Button/Button.js";
4
- import i from "../ActionFooter/ActionFooter.js";
5
- import { FORM_FIELD_CHROME_SLOT_NAMES as a } from "../FormField/formField.types.js";
6
- import o from "../FormField/FormField.js";
7
- import s from "../Menu/Menu.js";
8
- import { useRichTextEditor as c } from "./composables/useRichTextEditor.js";
9
- import l from "../TextField/TextField.js";
10
- import { Fragment as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createVNode as g, defineComponent as _, guardReactiveProps as v, isRef as y, mergeModels as b, mergeProps as x, normalizeProps as S, openBlock as C, ref as w, renderList as T, renderSlot as E, unref as D, useModel as O, useTemplateRef as k, withCtx as A, withModifiers as j } from "vue";
3
+ import ee from "../Button/Button.js";
4
+ import r from "../ActionFooter/ActionFooter.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 "../Menu/Menu.js";
8
+ import { useRichTextEditor as s } from "./composables/useRichTextEditor.js";
9
+ import c from "../TextField/TextField.js";
10
+ import { Fragment as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createVNode as h, defineComponent as g, guardReactiveProps as _, isRef as v, mergeModels as y, mergeProps as b, normalizeProps as x, openBlock as S, ref as C, renderList as w, renderSlot as T, unref as E, useModel as D, useTemplateRef as O, withCtx as k, withModifiers as A } from "vue";
11
11
  //#region src/Components/RichTextEditor/RichTextEditor.vue?vue&type=script&setup=true&lang.ts
12
- var M = { class: "flex min-h-0 min-w-0 flex-1 flex-col" }, N = { class: "flex w-64 flex-col" }, P = { class: "p-1.5" }, F = { class: "flex items-center justify-end gap-2 border-t border-dark-100 bg-dark-50 px-3 py-2 dark:border-dark-800 dark:bg-dark-950/40" }, I = /*@__PURE__*/ _({
12
+ var j = { class: "flex min-h-0 min-w-0 flex-1 flex-col" }, M = { class: "flex w-64 flex-col" }, N = { class: "p-1.5" }, P = { class: "flex items-center justify-end gap-2 border-t border-dark-100 bg-dark-50 px-3 py-2 dark:border-dark-800 dark:bg-dark-950/40" }, F = /*@__PURE__*/ g({
13
13
  inheritAttrs: !1,
14
14
  __name: "RichTextEditor",
15
- props: /*@__PURE__*/ b({
15
+ props: /*@__PURE__*/ y({
16
16
  classes: {},
17
17
  customProps: {},
18
18
  defaultValue: {},
@@ -49,44 +49,48 @@ var M = { class: "flex min-h-0 min-w-0 flex-1 flex-col" }, N = { class: "flex w-
49
49
  modelValue: {},
50
50
  modelModifiers: {}
51
51
  }),
52
- emits: /*@__PURE__*/ b(["update:modelValue"], ["update:modelValue"]),
53
- setup(_, { emit: b }) {
54
- let I = O(_, "modelValue"), L = b, R = _, z = k("content"), B = w(R.defaultValue), V = n(I, B), { slots: H, tools: U, linkHref: W, linkOpen: G, formField: K, linkAnchor: q, contentBind: J, confirmLink: Y, onToolClick: X, toolbarBind: Z, showToolbar: Q, linkUrlLabel: $, canConfirmLink: ee, closeLinkEditor: te, getToolbarButtonBind: ne } = c(R, V, L, z);
55
- return (n, c) => (C(), d(D(o), { field: D(K) }, h({
56
- default: A(() => [m("div", M, [D(Q) ? (C(), p(u, { key: 0 }, [D(e)(D(H), "toolbar") ? E(n.$slots, "toolbar", { tools: D(U) }, void 0, void 0, 0) : (C(), p("div", S(x({ key: 1 }, D(Z))), [(C(!0), p(u, null, T(D(U), (e) => (C(), d(D(r), x({
52
+ emits: /*@__PURE__*/ y(["update:modelValue"], ["update:modelValue"]),
53
+ setup(g, { emit: y }) {
54
+ let F = D(g, "modelValue"), I = y, L = g, R = O("content"), z = C(L.defaultValue), B = n(F, z), { color: V, slots: H, tools: U, linkHref: W, linkOpen: G, formField: K, linkAnchor: q, contentBind: J, confirmLink: Y, onToolClick: X, toolbarBind: Z, showToolbar: Q, linkUrlLabel: $, canConfirmLink: te, closeLinkEditor: ne, getToolbarButtonBind: re } = s(L, B, I, R);
55
+ return (n, s) => (S(), u(E(a), { field: E(K) }, m({
56
+ default: k(() => [p("div", j, [E(Q) ? (S(), f(l, { key: 0 }, [E(e)(E(H), "toolbar") ? T(n.$slots, "toolbar", { tools: E(U) }, void 0, void 0, 0) : (S(), f("div", x(b({ key: 1 }, E(Z))), [(S(!0), f(l, null, w(E(U), (e) => (S(), u(E(ee), b({
57
57
  key: e,
58
- onMousedown: c[0] ||= j(() => {}, ["prevent"])
59
- }, { ref_for: !0 }, D(ne)(e), { onClick: (t) => D(X)(e, t) }), null, 16, ["onClick"]))), 128))], 16))], 64)) : f("", !0), m("div", x({ ref: "content" }, D(J)), null, 16)]), g(D(s), {
60
- modelValue: D(G),
61
- "onUpdate:modelValue": c[2] ||= (e) => y(G) ? G.value = e : null,
62
- "anchor-el": D(q),
58
+ onMousedown: s[0] ||= A(() => {}, ["prevent"])
59
+ }, { ref_for: !0 }, E(re)(e), { onClick: (t) => E(X)(e, t) }), null, 16, ["onClick"]))), 128))], 16))], 64)) : d("", !0), p("div", b({ ref: "content" }, E(J)), null, 16)]), h(E(o), {
60
+ modelValue: E(G),
61
+ "onUpdate:modelValue": s[2] ||= (e) => v(G) ? G.value = e : null,
62
+ "anchor-el": E(q),
63
63
  placement: "bottom-start"
64
64
  }, {
65
- default: A(() => [m("div", N, [m("div", P, [g(D(l), {
65
+ default: k(() => [p("div", M, [p("div", N, [h(E(c), {
66
66
  size: "sm",
67
67
  type: "url",
68
68
  class: "w-full",
69
- modelValue: D(W),
70
- "onUpdate:modelValue": c[1] ||= (e) => y(W) ? W.value = e : null,
69
+ color: E(V),
70
+ modelValue: E(W),
71
+ "onUpdate:modelValue": s[1] ||= (e) => v(W) ? W.value = e : null,
71
72
  autocomplete: "off",
72
73
  "hide-error-message": "",
73
- "aria-label": D($),
74
- placeholder: D($)
74
+ "aria-label": E($),
75
+ placeholder: E($)
75
76
  }, null, 8, [
77
+ "color",
76
78
  "modelValue",
77
79
  "aria-label",
78
80
  "placeholder"
79
- ])]), m("div", F, [g(D(i), {
80
- onApply: D(Y),
81
- onCancel: D(te),
81
+ ])]), p("div", P, [h(E(r), {
82
+ color: E(V),
83
+ onApply: E(Y),
84
+ onCancel: E(ne),
82
85
  "custom-props": {
83
86
  cancelButton: { size: "sm" },
84
87
  applyButton: {
85
88
  size: "sm",
86
- disabled: !D(ee)
89
+ disabled: !E(te)
87
90
  }
88
91
  }
89
92
  }, null, 8, [
93
+ "color",
90
94
  "onApply",
91
95
  "onCancel",
92
96
  "custom-props"
@@ -94,11 +98,11 @@ var M = { class: "flex min-h-0 min-w-0 flex-1 flex-col" }, N = { class: "flex w-
94
98
  _: 1
95
99
  }, 8, ["modelValue", "anchor-el"])]),
96
100
  _: 2
97
- }, [T(D(t)(D(a), n.$slots), (e) => ({
101
+ }, [w(E(t)(E(i), n.$slots), (e) => ({
98
102
  name: e,
99
- fn: A((t) => [E(n.$slots, e, S(v(t || {})))])
103
+ fn: k((t) => [T(n.$slots, e, x(_(t || {})))])
100
104
  }))]), 1032, ["field"]));
101
105
  }
102
106
  });
103
107
  //#endregion
104
- export { I as default };
108
+ export { F as default };
@@ -7,6 +7,7 @@ import { RichTextEditorEmits, RichTextEditorOwnProps } from '../richTextEditor.t
7
7
  * Composes FormField chrome + rich-text adapter surface for Vue.
8
8
  */
9
9
  export declare function useRichTextEditor(props: RichTextEditorOwnProps, model: Ref<undefined | RichTextValue>, emit: SetupContext<RichTextEditorEmits>["emit"], contentRef: Ref<null | undefined | HTMLDivElement>): {
10
+ color: import('vue').ComputedRef<NonNullable<keyof import('@bridge-ui/core/Tokens').FormFieldColor | undefined>>;
10
11
  slots: Readonly<{
11
12
  [name: string]: import('vue').Slot<any> | undefined;
12
13
  }>;
@@ -441,7 +442,7 @@ export declare function useRichTextEditor(props: RichTextEditorOwnProps, model:
441
442
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
442
443
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
443
444
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
444
- }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "corner" | "required" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>;
445
+ }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "required" | "corner" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>;
445
446
  isNotched: import('vue').ComputedRef<boolean>;
446
447
  isStacked: import('vue').ComputedRef<boolean>;
447
448
  startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
@@ -3,12 +3,12 @@ import { useRichTextAdapter as t } from "../../../Adapters/RichText/useRichTextA
3
3
  import { mergePartBind as n, useBridgeUIComponent as r, useBridgeUIMergedRegistryClasses as ee } from "../../../Utils/index.js";
4
4
  import { formFieldBridgeKeys as i, useFormField as a } from "../../FormField/composables/useFormField.js";
5
5
  import { computed as o, onBeforeUnmount as s, ref as c, useAttrs as l, useSlots as u, watch as d } from "vue";
6
- import { DEFAULT_RICH_TEXT_TOOLS as f, RICH_TEXT_TOOL_ICONS as te, RICH_TEXT_TOOL_LABELS as p, richTextValuesEqual as ne } from "@bridge-ui/core/Adapters";
7
- import { get as m, isNil as h, omit as g } from "es-toolkit/compat";
8
- import { richTextEditorSizeProps as _ } from "@bridge-ui/core/Tokens";
9
- import { cn as v, mergeBridgeUILayeredClasses as re, splitComponentProps as y } from "@bridge-ui/core/Utils";
6
+ import { DEFAULT_RICH_TEXT_TOOLS as f, RICH_TEXT_TOOL_ICONS as te, RICH_TEXT_TOOL_LABELS as ne, richTextValuesEqual as p } from "@bridge-ui/core/Adapters";
7
+ import { get as re, isNil as m, omit as h } from "es-toolkit/compat";
8
+ import { richTextEditorSizeProps as ie } from "@bridge-ui/core/Tokens";
9
+ import { cn as g, mergeBridgeUILayeredClasses as _, splitComponentProps as v } from "@bridge-ui/core/Utils";
10
10
  //#region src/Components/RichTextEditor/composables/useRichTextEditor.ts
11
- var b = [
11
+ var y = [
12
12
  "tools",
13
13
  "format",
14
14
  "classes",
@@ -17,30 +17,31 @@ var b = [
17
17
  "placeholder",
18
18
  "defaultValue"
19
19
  ];
20
- function x(x, S, C, w) {
21
- let T = l(), E = u(), D = e(), O = t(), k = c(""), A = c(0), j = c(null), M = c(null), N = c(null), P = o(() => y({
22
- bridgeKeys: b,
20
+ function b(b, x, ae, S) {
21
+ let C = l(), w = u(), T = e(), E = t(), D = c(""), O = c(0), k = c(null), A = c(null), j = c(null), M = o(() => v({
22
+ bridgeKeys: y,
23
23
  props: {
24
- ...x,
25
- ...T
24
+ ...b,
25
+ ...C
26
26
  }
27
- })), F = o(() => P.value.componentProps), I = o(() => y({
27
+ })), N = o(() => M.value.componentProps), P = o(() => v({
28
28
  bridgeKeys: i,
29
- props: g(P.value.inheritedAttrs, ["class", "onUpdate:modelValue"])
30
- })), L = o(() => I.value.componentProps), R = o(() => I.value.inheritedAttrs), z = o(() => {
31
- let { content: e, toolbar: t, toolbarButton: n, ...r } = F.value.customProps ?? {};
29
+ props: h(M.value.inheritedAttrs, ["class", "onUpdate:modelValue"])
30
+ })), F = o(() => P.value.componentProps), I = o(() => P.value.inheritedAttrs), L = o(() => {
31
+ let { content: e, toolbar: t, toolbarButton: n, ...r } = N.value.customProps ?? {};
32
32
  return r;
33
- }), B = o(() => F.value.customProps?.toolbarButton), V = o(() => ({
34
- tools: F.value.tools,
35
- format: F.value.format,
36
- classes: F.value.classes,
37
- size: L.value.size,
38
- color: L.value.color,
39
- rounded: L.value.rounded,
40
- variant: L.value.variant
41
- })), { merged: H, entry: U } = r({
33
+ }), R = o(() => N.value.customProps?.toolbarButton), z = o(() => ({
34
+ tools: N.value.tools,
35
+ format: N.value.format,
36
+ classes: N.value.classes,
37
+ size: F.value.size,
38
+ color: F.value.color,
39
+ rounded: F.value.rounded,
40
+ variant: F.value.variant
41
+ })), { merged: B, entry: V } = r({
42
+ chrome: "FormField",
42
43
  componentName: "RichTextEditor",
43
- props: () => V.value,
44
+ props: () => z.value,
44
45
  libDefaults: {
45
46
  size: "md",
46
47
  rounded: "md",
@@ -48,18 +49,18 @@ function x(x, S, C, w) {
48
49
  color: "primary",
49
50
  variant: "outline"
50
51
  }
51
- }), W = ee({
52
- entry: U,
53
- props: () => V.value
54
- }), G = o(() => H.value.format ?? "html"), K = o(() => [...F.value.tools ?? H.value.tools ?? f]), q = o(() => F.value.readOnly === !0 || L.value.readonly === !0), J = o(() => !(q.value || L.value.disabled === !0) && K.value.length > 0), Y = o(() => {
55
- let e = re(_, U.value?.tokens?.size);
56
- return m(e, L.value.size ?? H.value.size ?? "md");
57
- }), X = a(() => ({
58
- ...R.value,
59
- ...L.value,
60
- classes: W.value,
61
- customProps: z.value,
62
- readonly: q.value || L.value.readonly
52
+ }), H = ee({
53
+ entry: V,
54
+ props: () => z.value
55
+ }), U = o(() => B.value.format ?? "html"), W = o(() => [...N.value.tools ?? B.value.tools ?? f]), G = o(() => N.value.readOnly === !0 || F.value.readonly === !0), K = o(() => !(G.value || F.value.disabled === !0) && W.value.length > 0), q = o(() => {
56
+ let e = _(ie, V.value?.tokens?.size);
57
+ return re(e, F.value.size ?? B.value.size ?? "md");
58
+ }), J = a(() => ({
59
+ ...I.value,
60
+ ...F.value,
61
+ classes: H.value,
62
+ customProps: L.value,
63
+ readonly: G.value || F.value.readonly
63
64
  }), {
64
65
  size: "md",
65
66
  rounded: "md",
@@ -69,158 +70,159 @@ function x(x, S, C, w) {
69
70
  }, {
70
71
  control: () => "textarea",
71
72
  componentName: "RichTextEditor"
72
- }), ie = o(() => X.invalidated.value ? "error" : X.merged.value.color ?? "primary");
73
- function ae(e) {
74
- return !!(X.isDisabled.value || q.value || !(N.value?.can(e) ?? !0));
73
+ }), Y = o(() => J.merged.value.color ?? "primary"), oe = o(() => J.invalidated.value ? "error" : Y.value);
74
+ function se(e) {
75
+ return !!(J.isDisabled.value || G.value || !(j.value?.can(e) ?? !0));
75
76
  }
76
- function Z() {
77
- A.value += 1;
77
+ function X() {
78
+ O.value += 1;
78
79
  }
79
- function Q() {
80
- k.value = "", M.value = null;
80
+ function Z() {
81
+ D.value = "", A.value = null;
81
82
  }
82
- function oe() {
83
- let e = k.value.trim();
84
- e.length !== 0 && (N.value?.run("link", { href: e }), Z(), Q());
83
+ function ce() {
84
+ let e = D.value.trim();
85
+ e.length !== 0 && (j.value?.run("link", { href: e }), X(), Z());
85
86
  }
86
- function se(e, t) {
87
- let n = N.value;
88
- if (!h(n)) {
87
+ function le(e, t) {
88
+ let n = j.value;
89
+ if (!m(n)) {
89
90
  if (e === "link") {
90
91
  if (n.isActive("link")) {
91
- n.run("link"), Z(), Q();
92
+ n.run("link"), X(), Z();
92
93
  return;
93
94
  }
94
95
  let e = t.currentTarget;
95
- e instanceof HTMLElement && (k.value = "", M.value = e);
96
+ e instanceof HTMLElement && (D.value = "", A.value = e);
96
97
  return;
97
98
  }
98
- n.run(e), Z();
99
+ n.run(e), X();
99
100
  }
100
101
  }
101
- let ce = o({
102
+ let Q = o({
102
103
  get() {
103
- return !h(M.value);
104
+ return !m(A.value);
104
105
  },
105
106
  set(e) {
106
- e || Q();
107
+ e || Z();
107
108
  }
108
- }), le = o(() => k.value.trim().length > 0), ue = o(() => D("URL"));
109
- d(J, (e) => {
110
- e || Q();
109
+ }), ue = o(() => D.value.trim().length > 0), de = o(() => T("URL"));
110
+ d(K, (e) => {
111
+ e || Z();
111
112
  });
112
113
  function $() {
113
- N.value?.destroy(), N.value = null;
114
- let e = j.value;
115
- h(e) || (e.remove(), j.value = null);
114
+ j.value?.destroy(), j.value = null;
115
+ let e = k.value;
116
+ m(e) || (e.remove(), k.value = null);
116
117
  }
117
- function de() {
118
+ function fe() {
118
119
  $();
119
- let e = w.value, t = O.value;
120
- if (h(e)) return;
121
- if (h(t)) throw Error("[BridgeUI] RichTextEditor requires BridgeUIProvider global.richText. See packages/{react,vue}/Adapters/Examples/rich-text-tiptap.");
120
+ let e = S.value, t = E.value;
121
+ if (m(e)) return;
122
+ if (m(t)) throw Error("[BridgeUI] RichTextEditor requires BridgeUIProvider global.richText. See @bridge-ui/adapters/vue/rich-text-tiptap.");
122
123
  let n = document.createElement("div");
123
- n.className = "flex min-h-0 min-w-0 w-full flex-1 flex-col outline-none", e.appendChild(n), j.value = n, N.value = t.mount({
124
+ n.className = "flex min-h-0 min-w-0 w-full flex-1 flex-col outline-none", e.appendChild(n), k.value = n, j.value = t.mount({
124
125
  element: n,
125
- tools: K.value,
126
- value: S.value,
127
- format: G.value,
128
- readOnly: q.value,
129
- id: X.controlId.value,
130
- ariaReadonly: q.value,
131
- onSelectionChange: Z,
132
- disabled: X.isDisabled.value,
133
- placeholder: F.value.placeholder,
134
- ariaDisabled: X.isDisabled.value,
135
- ariaInvalid: X.invalidated.value,
136
- ariaDescribedBy: X.ariaDescribedBy.value,
126
+ tools: W.value,
127
+ value: x.value,
128
+ format: U.value,
129
+ readOnly: G.value,
130
+ id: J.controlId.value,
131
+ ariaReadonly: G.value,
132
+ onSelectionChange: X,
133
+ disabled: J.isDisabled.value,
134
+ placeholder: N.value.placeholder,
135
+ ariaDisabled: J.isDisabled.value,
136
+ ariaInvalid: J.invalidated.value,
137
+ ariaDescribedBy: J.ariaDescribedBy.value,
137
138
  onChange: (e) => {
138
- S.value = e, C("update:modelValue", e);
139
+ x.value = e, ae("update:modelValue", e);
139
140
  }
140
141
  });
141
142
  }
142
143
  d([
143
- G,
144
- O,
145
- w
144
+ U,
145
+ E,
146
+ S
146
147
  ], () => {
147
- de();
148
- }, { flush: "post" }), d(() => S.value, (e) => {
149
- let t = N.value;
150
- h(t) || e === void 0 || ne(t.getValue(), e) || t.setValue(e);
151
- }), d(() => X.isDisabled.value, (e) => {
152
- N.value?.setDisabled(e);
153
- }), d(q, (e) => {
154
- N.value?.setReadOnly(e);
148
+ fe();
149
+ }, { flush: "post" }), d(() => x.value, (e) => {
150
+ let t = j.value;
151
+ m(t) || e === void 0 || p(t.getValue(), e) || t.setValue(e);
152
+ }), d(() => J.isDisabled.value, (e) => {
153
+ j.value?.setDisabled(e);
154
+ }), d(G, (e) => {
155
+ j.value?.setReadOnly(e);
155
156
  }), d([
156
- q,
157
- () => F.value.placeholder,
158
- () => X.controlId.value,
159
- () => X.isDisabled.value,
160
- () => X.invalidated.value,
161
- () => X.ariaDescribedBy.value
157
+ G,
158
+ () => N.value.placeholder,
159
+ () => J.controlId.value,
160
+ () => J.isDisabled.value,
161
+ () => J.invalidated.value,
162
+ () => J.ariaDescribedBy.value
162
163
  ], () => {
163
- N.value?.setA11y({
164
- id: X.controlId.value,
165
- ariaReadonly: q.value,
166
- placeholder: F.value.placeholder,
167
- ariaDisabled: X.isDisabled.value,
168
- ariaInvalid: X.invalidated.value,
169
- ariaDescribedBy: X.ariaDescribedBy.value
164
+ j.value?.setA11y({
165
+ id: J.controlId.value,
166
+ ariaReadonly: G.value,
167
+ placeholder: N.value.placeholder,
168
+ ariaDisabled: J.isDisabled.value,
169
+ ariaInvalid: J.invalidated.value,
170
+ ariaDescribedBy: J.ariaDescribedBy.value
170
171
  });
171
172
  }), s(() => {
172
173
  $();
173
174
  });
174
- let fe = o(() => n(F.value.customProps?.toolbar, {
175
+ let pe = o(() => n(N.value.customProps?.toolbar, {
175
176
  role: "toolbar",
176
- "aria-label": D("Formatting")
177
- }, v({
178
- [Y.value?.toolbar ?? ""]: !0,
179
- [W.value.toolbar ?? ""]: !0
180
- }))), pe = o(() => n(F.value.customProps?.content, {}, v({
177
+ "aria-label": T("Formatting")
178
+ }, g({
179
+ [q.value?.toolbar ?? ""]: !0,
180
+ [H.value.toolbar ?? ""]: !0
181
+ }))), me = o(() => n(N.value.customProps?.content, {}, g({
181
182
  "min-w-0 flex-1": !0,
182
- [Y.value?.content ?? ""]: !0,
183
- [W.value.content ?? ""]: !0,
184
- [W.value.input ?? ""]: !0
183
+ [q.value?.content ?? ""]: !0,
184
+ [H.value.content ?? ""]: !0,
185
+ [H.value.input ?? ""]: !0
185
186
  })));
186
- function me(e) {
187
- A.value;
188
- let t = N.value, r = D(p[e]);
189
- return n(B.value, {
187
+ function he(e) {
188
+ O.value;
189
+ let t = j.value, r = T(ne[e]);
190
+ return n(R.value, {
190
191
  type: "button",
191
192
  density: "mini",
192
193
  variant: "flat",
193
194
  "aria-label": r,
194
- color: ie.value,
195
+ color: oe.value,
195
196
  icon: te[e],
196
- disabled: ae(e),
197
- size: X.merged.value.size ?? "md",
197
+ disabled: se(e),
198
+ size: J.merged.value.size ?? "md",
198
199
  selected: t?.isActive(e) ?? !1,
199
- rounded: X.merged.value.rounded ?? "md"
200
- }, v({
201
- [Y.value?.toolbarButton ?? ""]: !0,
202
- [W.value.toolbarButton ?? ""]: !0
200
+ rounded: J.merged.value.rounded ?? "md"
201
+ }, g({
202
+ [q.value?.toolbarButton ?? ""]: !0,
203
+ [H.value.toolbarButton ?? ""]: !0
203
204
  }));
204
205
  }
205
206
  return {
206
- slots: E,
207
- tools: K,
208
- format: G,
209
- linkHref: k,
210
- linkOpen: ce,
211
- formField: X,
212
- linkAnchor: M,
213
- isReadOnly: q,
214
- contentBind: pe,
215
- confirmLink: oe,
216
- onToolClick: se,
217
- toolbarBind: fe,
218
- showToolbar: J,
219
- linkUrlLabel: ue,
220
- canConfirmLink: le,
221
- closeLinkEditor: Q,
222
- getToolbarButtonBind: me
207
+ color: Y,
208
+ slots: w,
209
+ tools: W,
210
+ format: U,
211
+ linkHref: D,
212
+ linkOpen: Q,
213
+ formField: J,
214
+ linkAnchor: A,
215
+ isReadOnly: G,
216
+ contentBind: me,
217
+ confirmLink: ce,
218
+ onToolClick: le,
219
+ toolbarBind: pe,
220
+ showToolbar: K,
221
+ linkUrlLabel: de,
222
+ canConfirmLink: ue,
223
+ closeLinkEditor: Z,
224
+ getToolbarButtonBind: he
223
225
  };
224
226
  }
225
227
  //#endregion
226
- export { x as useRichTextEditor };
228
+ export { b as useRichTextEditor };
@@ -11,8 +11,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
11
11
  apply: () => any;
12
12
  cancel: () => any;
13
13
  select: (option: import('@bridge-ui/core/Domain').ListboxOption) => any;
14
- close: () => any;
15
14
  change: (value: import('@bridge-ui/core/Domain').SelectModel) => any;
15
+ close: () => any;
16
16
  deselect: (option: import('@bridge-ui/core/Domain').ListboxOption) => any;
17
17
  open: () => any;
18
18
  "update:modelValue": (...args: unknown[]) => any;
@@ -22,8 +22,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
22
22
  onApply?: (() => any) | undefined;
23
23
  onCancel?: (() => any) | undefined;
24
24
  onSelect?: ((option: import('@bridge-ui/core/Domain').ListboxOption) => any) | undefined;
25
- onClose?: (() => any) | undefined;
26
25
  onChange?: ((value: import('@bridge-ui/core/Domain').SelectModel) => any) | undefined;
26
+ onClose?: (() => any) | undefined;
27
27
  onDeselect?: ((option: import('@bridge-ui/core/Domain').ListboxOption) => any) | undefined;
28
28
  onOpen?: (() => any) | undefined;
29
29
  "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
@@ -437,7 +437,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
437
437
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
438
438
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
439
439
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
440
- }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "corner" | "required" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>;
440
+ }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "required" | "corner" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>;
441
441
  isNotched: import('vue').ComputedRef<boolean>;
442
442
  isStacked: import('vue').ComputedRef<boolean>;
443
443
  startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
@@ -723,7 +723,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
723
723
  onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
724
724
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
725
725
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
726
- }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "corner" | "required" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>>;
726
+ }, Partial<Omit<Omit<FormFieldOwnProps, "field">, "error" | "color" | "end" | "size" | "classes" | "customProps" | "disabled" | "endIcon" | "rounded" | "startIcon" | "variant" | "label" | "start" | "required" | "corner" | "description" | "errorMessage" | "errorIcon" | "hideErrorMessage" | "readonly" | "showDescriptionOnError" | "showErrorIcon">>>>>;
727
727
  handleApply: () => void;
728
728
  selectOption: (option: SelectOption) => void;
729
729
  handleCancel: () => void;
@@ -731,7 +731,7 @@ export declare function useSelect(props: SelectOwnProps, model: Ref<null | undef
731
731
  listboxProps: import('vue').ComputedRef<{
732
732
  anchorEl?: null | HTMLElement;
733
733
  classes?: import('../../Listbox').ListboxClasses;
734
- color: "info" | "error" | "success" | "warning" | "black" | "dark" | "primary" | "secondary";
734
+ color: "info" | "error" | "success" | "warning" | "dark" | "black" | "primary" | "secondary";
735
735
  customProps?: import('../../Listbox').ListboxCustomProps;
736
736
  disableAutoFocus: boolean;
737
737
  disableMaxHeight: boolean;
@@ -42,6 +42,7 @@ function p(p, m, h, g, Me) {
42
42
  ...p
43
43
  }
44
44
  })), A = a(() => k.value.componentProps), Fe = a(() => ({ classes: A.value.classes })), { components: Ie, entry: Le } = te({
45
+ chrome: "FormField",
45
46
  componentName: "Select",
46
47
  props: () => Fe.value
47
48
  }), j = i({
@@ -83,6 +84,7 @@ function p(p, m, h, g, Me) {
83
84
  let e = m.value;
84
85
  return M.value ? Array.isArray(e) ? e : [] : !he(e) && e !== "" ? [e] : [];
85
86
  }), Ue = a(() => Ce(A.value.overlay, Pe.mobile)), z = ne({
87
+ chrome: "FormField",
86
88
  componentName: "Select",
87
89
  overlay: Ue,
88
90
  showFooter: () => A.value.showFooter
@@ -44,6 +44,7 @@ function T(v, T, E, me = {}) {
44
44
  labelHtmlFor: (e) => `${e}-thumb-0`
45
45
  }), { merged: N, entry: P } = n({
46
46
  libDefaults: T,
47
+ chrome: "BaseField",
47
48
  componentName: "Slider",
48
49
  props: () => ({
49
50
  ...d(j.value.componentProps, x),
@@ -29,6 +29,7 @@ function _(_, v, y) {
29
29
  }
30
30
  })), { merged: C, entry: w } = t({
31
31
  libDefaults: v,
32
+ chrome: "FormControl",
32
33
  componentName: "Switch",
33
34
  props: () => S.value.componentProps
34
35
  }), T = i(() => C.value.customProps), E = n({