bitboss-ui 2.1.126 → 2.1.128

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 (88) hide show
  1. package/dist/ai/BbButton.md +0 -10
  2. package/dist/ai/BbTable.md +635 -2
  3. package/dist/components/BaseButton/BaseButton.vue.d.ts +1 -1
  4. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +6 -6
  5. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +3 -3
  6. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +6 -6
  7. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +4 -4
  8. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +6 -6
  9. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +1 -1
  10. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +8 -8
  11. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +6 -6
  12. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +3 -3
  13. package/dist/components/BaseRating/BaseRating.vue.d.ts +6 -6
  14. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +2 -2
  15. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +7 -7
  16. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +6 -6
  17. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -3
  18. package/dist/components/BaseTag/BaseTag.vue.d.ts +6 -6
  19. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +6 -6
  20. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +6 -6
  21. package/dist/components/BbButton/BbButton.vue.d.ts +1 -1
  22. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
  23. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -3
  24. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +6 -6
  25. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
  26. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -4
  27. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
  28. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -3
  29. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +4 -4
  30. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +8 -8
  31. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +7 -7
  32. package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
  33. package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
  34. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +3 -3
  35. package/dist/components/BbRating/BbRating.vue.d.ts +6 -6
  36. package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -2
  37. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +2 -2
  38. package/dist/components/BbSlider/BbSlider.vue.d.ts +6 -6
  39. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
  40. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +3 -3
  41. package/dist/components/BbTable/types.d.ts +32 -0
  42. package/dist/components/BbTag/BbTag.vue.d.ts +6 -6
  43. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +6 -6
  44. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +6 -6
  45. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
  46. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  47. package/dist/components/Transitions/Slide.vue.d.ts +1 -1
  48. package/dist/composables/useTableWidthContext.d.ts +35 -0
  49. package/dist/directives/bbDropdown.d.ts +8 -2
  50. package/dist/directives/bbTooltip.d.ts +7 -2
  51. package/dist/index.css +1 -1
  52. package/dist/index.js +9 -9
  53. package/dist/index240.js +58 -61
  54. package/dist/index270.js +1 -1
  55. package/dist/index325.js +34 -41
  56. package/dist/index326.js +40 -447
  57. package/dist/index327.js +632 -0
  58. package/dist/index329.js +5 -154
  59. package/dist/index330.js +155 -0
  60. package/dist/index332.js +5 -141
  61. package/dist/index333.js +142 -0
  62. package/dist/index335.js +5 -154
  63. package/dist/index336.js +155 -0
  64. package/dist/index338.js +5 -57
  65. package/dist/index339.js +57 -4
  66. package/dist/index340.js +4 -19
  67. package/dist/index341.js +20 -0
  68. package/dist/index343.js +5 -141
  69. package/dist/index344.js +142 -0
  70. package/dist/index346.js +5 -3
  71. package/dist/index347.js +3 -108
  72. package/dist/index348.js +109 -0
  73. package/dist/index350.js +5 -54
  74. package/dist/index351.js +54 -23
  75. package/dist/index352.js +12 -11
  76. package/dist/index353.js +22 -838
  77. package/dist/index354.js +811 -446
  78. package/dist/index355.js +472 -50
  79. package/dist/index356.js +51 -6
  80. package/dist/index357.js +7 -0
  81. package/package.json +1 -1
  82. package/dist/index328.js +0 -6
  83. package/dist/index331.js +0 -6
  84. package/dist/index334.js +0 -6
  85. package/dist/index337.js +0 -6
  86. package/dist/index342.js +0 -6
  87. package/dist/index345.js +0 -6
  88. package/dist/index349.js +0 -6
package/dist/index335.js CHANGED
@@ -1,155 +1,6 @@
1
- import e from "./index145.js";
2
- import t from "./index210.js";
3
- import { computed as n, createBlock as r, createVNode as i, defineComponent as a, guardReactiveProps as o, mergeProps as s, normalizeProps as c, openBlock as l, ref as u, renderSlot as d, withCtx as f } from "vue";
4
- //#region src/components/BbTextInput/BbTextInput.vue?vue&type=script&setup=true&lang.ts
5
- var p = /* @__PURE__ */ a({
6
- __name: "BbTextInput",
7
- props: {
8
- "append:icon": {},
9
- autocomplete: {},
10
- autofocus: {},
11
- clearable: { type: Boolean },
12
- compact: { type: Boolean },
13
- direction: {},
14
- disabled: { type: Boolean },
15
- emitMasked: { type: Boolean },
16
- errors: {},
17
- hasErrors: { type: Boolean },
18
- hideLabel: { type: Boolean },
19
- hint: {},
20
- id: {},
21
- inputMode: {},
22
- label: {},
23
- labelPosition: {},
24
- labelMode: {},
25
- loading: { type: Boolean },
26
- mask: {},
27
- modelValue: {},
28
- name: {},
29
- persistentHint: { type: Boolean },
30
- placeholder: {},
31
- "prepend:icon": {},
32
- readonly: { type: Boolean },
33
- required: { type: Boolean },
34
- reverse: { type: Boolean },
35
- type: {}
36
- },
37
- emits: [
38
- "blur",
39
- "change",
40
- "click",
41
- "focus",
42
- "input",
43
- "keydown",
44
- "mousedown",
45
- "mouseup",
46
- "update:modelValue"
47
- ],
48
- setup(a, { emit: p }) {
49
- let m = a, h = p, g = u(!1), _ = n(() => m.persistentHint || g.value), v = {
50
- onBlur: (e) => {
51
- g.value = !1, h("blur", e);
52
- },
53
- onChange: (e) => h("change", e),
54
- onClick: (e) => h("click", e),
55
- onFocus: (e) => {
56
- g.value = !0, h("focus", e);
57
- },
58
- onInput: (e) => h("input", e),
59
- onKeydown: (e) => h("keydown", e),
60
- onMousedown: (e) => h("mousedown", e),
61
- onMouseup: (e) => h("mouseup", e),
62
- "onUpdate:modelValue": (e) => h("update:modelValue", e)
63
- };
64
- return (n, a) => (l(), r(e, {
65
- id: n.id,
66
- class: "bb-text-input",
67
- compact: n.compact,
68
- direction: n.direction,
69
- errors: n.errors,
70
- "has-errors": n.hasErrors,
71
- "hide-label": n.hideLabel,
72
- hint: n.hint,
73
- label: n.label,
74
- "label-mode": n.labelMode,
75
- "label-position": n.labelPosition,
76
- "model-value": n.modelValue,
77
- name: n.name,
78
- reverse: n.reverse,
79
- "show-hint": _.value
80
- }, {
81
- label: f((e) => [d(n.$slots, "label", c(o(e)))]),
82
- input: f(({ id: e, hasErrors: r, ariaDescribedby: a }) => [i(t, s({
83
- id: e,
84
- "append:icon": m["append:icon"],
85
- "aria-describedby": a,
86
- autocomplete: n.autocomplete,
87
- autofocus: n.autofocus,
88
- clearable: n.clearable,
89
- compact: n.compact,
90
- disabled: n.disabled,
91
- "emit-masked": n.emitMasked,
92
- "has-errors": r,
93
- "input-mode": n.inputMode,
94
- "label-mode": n.labelMode,
95
- loading: n.loading,
96
- mask: n.mask,
97
- "model-value": n.modelValue,
98
- name: n.name,
99
- placeholder: n.placeholder,
100
- "prepend:icon": m["prepend:icon"],
101
- readonly: n.readonly,
102
- required: n.required,
103
- type: n.type
104
- }, v), {
105
- "append-outer": f(() => [d(n.$slots, "append-outer")]),
106
- append: f(() => [d(n.$slots, "append")]),
107
- prefix: f(() => [d(n.$slots, "prefix")]),
108
- suffix: f(() => [d(n.$slots, "suffix")]),
109
- prepend: f(() => [d(n.$slots, "prepend")]),
110
- "prepend-outer": f(() => [d(n.$slots, "prepend-outer")]),
111
- _: 2
112
- }, 1040, [
113
- "id",
114
- "append:icon",
115
- "aria-describedby",
116
- "autocomplete",
117
- "autofocus",
118
- "clearable",
119
- "compact",
120
- "disabled",
121
- "emit-masked",
122
- "has-errors",
123
- "input-mode",
124
- "label-mode",
125
- "loading",
126
- "mask",
127
- "model-value",
128
- "name",
129
- "placeholder",
130
- "prepend:icon",
131
- "readonly",
132
- "required",
133
- "type"
134
- ])]),
135
- _: 3
136
- }, 8, [
137
- "id",
138
- "compact",
139
- "direction",
140
- "errors",
141
- "has-errors",
142
- "hide-label",
143
- "hint",
144
- "label",
145
- "label-mode",
146
- "label-position",
147
- "model-value",
148
- "name",
149
- "reverse",
150
- "show-hint"
151
- ]));
152
- }
153
- });
1
+ import e from "./index333.js";
2
+ /* empty css */
3
+ //#region src/components/BbTextarea/BbTextarea.vue
4
+ var t = e;
154
5
  //#endregion
155
- export { p as default };
6
+ export { t as default };
@@ -0,0 +1,155 @@
1
+ import e from "./index145.js";
2
+ import t from "./index210.js";
3
+ import { computed as n, createBlock as r, createVNode as i, defineComponent as a, guardReactiveProps as o, mergeProps as s, normalizeProps as c, openBlock as l, ref as u, renderSlot as d, withCtx as f } from "vue";
4
+ //#region src/components/BbTextInput/BbTextInput.vue?vue&type=script&setup=true&lang.ts
5
+ var p = /* @__PURE__ */ a({
6
+ __name: "BbTextInput",
7
+ props: {
8
+ "append:icon": {},
9
+ autocomplete: {},
10
+ autofocus: {},
11
+ clearable: { type: Boolean },
12
+ compact: { type: Boolean },
13
+ direction: {},
14
+ disabled: { type: Boolean },
15
+ emitMasked: { type: Boolean },
16
+ errors: {},
17
+ hasErrors: { type: Boolean },
18
+ hideLabel: { type: Boolean },
19
+ hint: {},
20
+ id: {},
21
+ inputMode: {},
22
+ label: {},
23
+ labelPosition: {},
24
+ labelMode: {},
25
+ loading: { type: Boolean },
26
+ mask: {},
27
+ modelValue: {},
28
+ name: {},
29
+ persistentHint: { type: Boolean },
30
+ placeholder: {},
31
+ "prepend:icon": {},
32
+ readonly: { type: Boolean },
33
+ required: { type: Boolean },
34
+ reverse: { type: Boolean },
35
+ type: {}
36
+ },
37
+ emits: [
38
+ "blur",
39
+ "change",
40
+ "click",
41
+ "focus",
42
+ "input",
43
+ "keydown",
44
+ "mousedown",
45
+ "mouseup",
46
+ "update:modelValue"
47
+ ],
48
+ setup(a, { emit: p }) {
49
+ let m = a, h = p, g = u(!1), _ = n(() => m.persistentHint || g.value), v = {
50
+ onBlur: (e) => {
51
+ g.value = !1, h("blur", e);
52
+ },
53
+ onChange: (e) => h("change", e),
54
+ onClick: (e) => h("click", e),
55
+ onFocus: (e) => {
56
+ g.value = !0, h("focus", e);
57
+ },
58
+ onInput: (e) => h("input", e),
59
+ onKeydown: (e) => h("keydown", e),
60
+ onMousedown: (e) => h("mousedown", e),
61
+ onMouseup: (e) => h("mouseup", e),
62
+ "onUpdate:modelValue": (e) => h("update:modelValue", e)
63
+ };
64
+ return (n, a) => (l(), r(e, {
65
+ id: n.id,
66
+ class: "bb-text-input",
67
+ compact: n.compact,
68
+ direction: n.direction,
69
+ errors: n.errors,
70
+ "has-errors": n.hasErrors,
71
+ "hide-label": n.hideLabel,
72
+ hint: n.hint,
73
+ label: n.label,
74
+ "label-mode": n.labelMode,
75
+ "label-position": n.labelPosition,
76
+ "model-value": n.modelValue,
77
+ name: n.name,
78
+ reverse: n.reverse,
79
+ "show-hint": _.value
80
+ }, {
81
+ label: f((e) => [d(n.$slots, "label", c(o(e)))]),
82
+ input: f(({ id: e, hasErrors: r, ariaDescribedby: a }) => [i(t, s({
83
+ id: e,
84
+ "append:icon": m["append:icon"],
85
+ "aria-describedby": a,
86
+ autocomplete: n.autocomplete,
87
+ autofocus: n.autofocus,
88
+ clearable: n.clearable,
89
+ compact: n.compact,
90
+ disabled: n.disabled,
91
+ "emit-masked": n.emitMasked,
92
+ "has-errors": r,
93
+ "input-mode": n.inputMode,
94
+ "label-mode": n.labelMode,
95
+ loading: n.loading,
96
+ mask: n.mask,
97
+ "model-value": n.modelValue,
98
+ name: n.name,
99
+ placeholder: n.placeholder,
100
+ "prepend:icon": m["prepend:icon"],
101
+ readonly: n.readonly,
102
+ required: n.required,
103
+ type: n.type
104
+ }, v), {
105
+ "append-outer": f(() => [d(n.$slots, "append-outer")]),
106
+ append: f(() => [d(n.$slots, "append")]),
107
+ prefix: f(() => [d(n.$slots, "prefix")]),
108
+ suffix: f(() => [d(n.$slots, "suffix")]),
109
+ prepend: f(() => [d(n.$slots, "prepend")]),
110
+ "prepend-outer": f(() => [d(n.$slots, "prepend-outer")]),
111
+ _: 2
112
+ }, 1040, [
113
+ "id",
114
+ "append:icon",
115
+ "aria-describedby",
116
+ "autocomplete",
117
+ "autofocus",
118
+ "clearable",
119
+ "compact",
120
+ "disabled",
121
+ "emit-masked",
122
+ "has-errors",
123
+ "input-mode",
124
+ "label-mode",
125
+ "loading",
126
+ "mask",
127
+ "model-value",
128
+ "name",
129
+ "placeholder",
130
+ "prepend:icon",
131
+ "readonly",
132
+ "required",
133
+ "type"
134
+ ])]),
135
+ _: 3
136
+ }, 8, [
137
+ "id",
138
+ "compact",
139
+ "direction",
140
+ "errors",
141
+ "has-errors",
142
+ "hide-label",
143
+ "hint",
144
+ "label",
145
+ "label-mode",
146
+ "label-position",
147
+ "model-value",
148
+ "name",
149
+ "reverse",
150
+ "show-hint"
151
+ ]));
152
+ }
153
+ });
154
+ //#endregion
155
+ export { p as default };
package/dist/index338.js CHANGED
@@ -1,58 +1,6 @@
1
- import e from "./index36.js";
2
- import { useLocale as t } from "./index42.js";
3
- import n from "./index219.js";
4
- import { createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
5
- //#region src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts
6
- var p = { class: "bb-toast-message__icon-container" }, m = { class: "bb-toast-message__content" }, h = {
7
- key: 1,
8
- class: "bb-toast-message__title"
9
- }, g = { class: "bb-toast-message__text" }, _ = /* @__PURE__ */ s({
10
- __name: "BbToastMessage",
11
- props: {
12
- title: {},
13
- text: {},
14
- icon: {},
15
- theme: { default: "default" },
16
- id: {},
17
- showClose: { type: Boolean }
18
- },
19
- emits: ["click:close"],
20
- setup(s, { emit: _ }) {
21
- let v = s, y = _, { t: b } = t(), x = () => {
22
- y("click:close", v.id);
23
- };
24
- return (t, s) => (l(), a("div", {
25
- "aria-atomic": "true",
26
- "aria-live": "polite",
27
- "aria-role": "alert",
28
- class: c(["bb-toast-message", { [`bb-toast-message--${t.theme}`]: t.theme }])
29
- }, [o("div", p, [t.icon ? (l(), r(n, {
30
- key: 0,
31
- class: "bb-toast-message__icon",
32
- type: t.icon
33
- }, null, 8, ["type"])) : i("", !0)]), o("div", m, [
34
- t.showClose ? (l(), r(e, {
35
- key: 0,
36
- "aria-label": d(b)("common.closeLabel").value,
37
- class: "bb-toast-message__close",
38
- onClick: x
39
- }, {
40
- default: f(() => s[0] ||= [o("svg", {
41
- fill: "none",
42
- viewBox: "0 0 24 24",
43
- xmlns: "http://www.w3.org/2000/svg"
44
- }, [o("path", {
45
- d: "M23 23L1 1M23 1L1 23",
46
- stroke: "currentColor",
47
- "stroke-linecap": "round",
48
- "stroke-width": "2"
49
- })], -1)]),
50
- _: 1
51
- }, 8, ["aria-label"])) : i("", !0),
52
- t.title ? (l(), a("p", h, u(t.title), 1)) : i("", !0),
53
- o("p", g, u(t.text), 1)
54
- ])], 2));
55
- }
56
- });
1
+ import e from "./index336.js";
2
+ /* empty css */
3
+ //#region src/components/BbTextInput/BbTextInput.vue
4
+ var t = e;
57
5
  //#endregion
58
- export { _ as default };
6
+ export { t as default };
package/dist/index339.js CHANGED
@@ -1,5 +1,58 @@
1
- import e from "./index338.js";
2
- //#region src/components/BbToast/BbToastMessage.vue
3
- var t = e;
1
+ import e from "./index36.js";
2
+ import { useLocale as t } from "./index42.js";
3
+ import n from "./index219.js";
4
+ import { createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
5
+ //#region src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts
6
+ var p = { class: "bb-toast-message__icon-container" }, m = { class: "bb-toast-message__content" }, h = {
7
+ key: 1,
8
+ class: "bb-toast-message__title"
9
+ }, g = { class: "bb-toast-message__text" }, _ = /* @__PURE__ */ s({
10
+ __name: "BbToastMessage",
11
+ props: {
12
+ title: {},
13
+ text: {},
14
+ icon: {},
15
+ theme: { default: "default" },
16
+ id: {},
17
+ showClose: { type: Boolean }
18
+ },
19
+ emits: ["click:close"],
20
+ setup(s, { emit: _ }) {
21
+ let v = s, y = _, { t: b } = t(), x = () => {
22
+ y("click:close", v.id);
23
+ };
24
+ return (t, s) => (l(), a("div", {
25
+ "aria-atomic": "true",
26
+ "aria-live": "polite",
27
+ "aria-role": "alert",
28
+ class: c(["bb-toast-message", { [`bb-toast-message--${t.theme}`]: t.theme }])
29
+ }, [o("div", p, [t.icon ? (l(), r(n, {
30
+ key: 0,
31
+ class: "bb-toast-message__icon",
32
+ type: t.icon
33
+ }, null, 8, ["type"])) : i("", !0)]), o("div", m, [
34
+ t.showClose ? (l(), r(e, {
35
+ key: 0,
36
+ "aria-label": d(b)("common.closeLabel").value,
37
+ class: "bb-toast-message__close",
38
+ onClick: x
39
+ }, {
40
+ default: f(() => s[0] ||= [o("svg", {
41
+ fill: "none",
42
+ viewBox: "0 0 24 24",
43
+ xmlns: "http://www.w3.org/2000/svg"
44
+ }, [o("path", {
45
+ d: "M23 23L1 1M23 1L1 23",
46
+ stroke: "currentColor",
47
+ "stroke-linecap": "round",
48
+ "stroke-width": "2"
49
+ })], -1)]),
50
+ _: 1
51
+ }, 8, ["aria-label"])) : i("", !0),
52
+ t.title ? (l(), a("p", h, u(t.title), 1)) : i("", !0),
53
+ o("p", g, u(t.text), 1)
54
+ ])], 2));
55
+ }
56
+ });
4
57
  //#endregion
5
- export { t as default };
58
+ export { _ as default };
package/dist/index340.js CHANGED
@@ -1,20 +1,5 @@
1
- import { state as e, useToast as t } from "./index21.js";
2
- import n from "./index339.js";
3
- import { Fragment as r, TransitionGroup as i, createBlock as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, unref as p, withCtx as m } from "vue";
4
- //#region src/components/BbToast/BbToast.vue?vue&type=script&setup=true&lang.ts
5
- var h = /* @__PURE__ */ c({
6
- __name: "BbToast",
7
- props: { placement: { default: "bottom" } },
8
- setup(c) {
9
- let { dismiss: h } = t();
10
- return (t, c) => (d(), o("div", { class: u(["bb-toast", { [`bb-toast--${t.placement}`]: !0 }]) }, [s(i, { name: "toast" }, {
11
- default: m(() => [(d(!0), o(r, null, f(p(e).stack, (e) => (d(), a(n, l({
12
- key: e.id,
13
- ref_for: !0
14
- }, e, { "onClick:close": p(h) }), null, 16, ["onClick:close"]))), 128))]),
15
- _: 1
16
- })], 2));
17
- }
18
- });
1
+ import e from "./index339.js";
2
+ //#region src/components/BbToast/BbToastMessage.vue
3
+ var t = e;
19
4
  //#endregion
20
- export { h as default };
5
+ export { t as default };
@@ -0,0 +1,20 @@
1
+ import { state as e, useToast as t } from "./index21.js";
2
+ import n from "./index340.js";
3
+ import { Fragment as r, TransitionGroup as i, createBlock as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, unref as p, withCtx as m } from "vue";
4
+ //#region src/components/BbToast/BbToast.vue?vue&type=script&setup=true&lang.ts
5
+ var h = /* @__PURE__ */ c({
6
+ __name: "BbToast",
7
+ props: { placement: { default: "bottom" } },
8
+ setup(c) {
9
+ let { dismiss: h } = t();
10
+ return (t, c) => (d(), o("div", { class: u(["bb-toast", { [`bb-toast--${t.placement}`]: !0 }]) }, [s(i, { name: "toast" }, {
11
+ default: m(() => [(d(!0), o(r, null, f(p(e).stack, (e) => (d(), a(n, l({
12
+ key: e.id,
13
+ ref_for: !0
14
+ }, e, { "onClick:close": p(h) }), null, 16, ["onClick:close"]))), 128))]),
15
+ _: 1
16
+ })], 2));
17
+ }
18
+ });
19
+ //#endregion
20
+ export { h as default };
package/dist/index343.js CHANGED
@@ -1,142 +1,6 @@
1
- import { useId as e } from "./index12.js";
2
- import { useElementSize as t } from "./index14.js";
3
- import { extractDomContainer as n } from "./index45.js";
4
- import { useUntil as r } from "./index50.js";
5
- import i from "./index60.js";
6
- import { parseWidthString as a } from "./index231.js";
7
- import { Comment as o, Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, openBlock as x, ref as S, renderSlot as C, toDisplayString as w, useModel as T, useSlots as E, useTemplateRef as D, watch as O, withCtx as k } from "vue";
8
- //#region src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts
9
- var A = /* @__PURE__ */ m({
10
- inheritAttrs: !1,
11
- __name: "BbTooltip",
12
- props: /* @__PURE__ */ h({
13
- arrowPadding: { default: 10 },
14
- block: { type: Boolean },
15
- disabled: { type: Boolean },
16
- eager: { type: Boolean },
17
- id: {},
18
- padding: { default: 10 },
19
- placement: { default: "top" },
20
- text: {},
21
- theme: { default: "default" },
22
- transitionDuration: { default: 250 },
23
- activator: {},
24
- boundary: {},
25
- timeout: { default: 0 },
26
- width: {}
27
- }, {
28
- modelValue: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- modelModifiers: {}
33
- }),
34
- emits: ["update:modelValue"],
35
- setup(m) {
36
- let h = m, A = E(), j = `bb_${h.id ?? e().id.value}`, M = `${j}_desc`, N = (e) => {
37
- if (!e) return "";
38
- let t = "";
39
- for (let n of e) {
40
- if (n.type === o) continue;
41
- let e = n.children;
42
- typeof e == "string" ? t += e : Array.isArray(e) && (t += N(e));
43
- }
44
- return t;
45
- }, P = S(!1), F = c(() => (h.text ?? (P.value ? N(A.default?.({})) : "")).replace(/\s+/g, " ").trim()), I = S(), L = c(() => h.activator != null), R = D("popover"), z = c(() => n(R.value)), B = T(m, "modelValue"), V = r(B), H = (e) => {
46
- let t = n(e);
47
- t && (I.value = t);
48
- }, U, W, G = () => {
49
- clearTimeout(W);
50
- }, K = () => {
51
- clearTimeout(U), clearTimeout(W), document.removeEventListener("keydown", Y), B.value = !1;
52
- }, q = () => {
53
- clearTimeout(U), clearTimeout(W), W = setTimeout(K, 50);
54
- }, J = () => {
55
- G(), !(B.value || h.disabled) && (U = setTimeout(() => {
56
- B.value = !0, document.addEventListener("keydown", Y, { passive: !0 });
57
- }, h.timeout));
58
- }, Y = (e) => {
59
- e.key === "Escape" && K();
60
- };
61
- O(() => h.activator, (e) => {
62
- e && H(e);
63
- }, { immediate: !0 });
64
- let X = null;
65
- O(I, (e) => {
66
- X &&= (X(), null), e && (e.addEventListener("mouseenter", J, { passive: !0 }), e.addEventListener("mouseleave", q, { passive: !0 }), e.addEventListener("focus", J, { passive: !0 }), e.addEventListener("blur", K, { passive: !0 }), X = () => {
67
- e.removeEventListener("mouseenter", J), e.removeEventListener("mouseleave", q), e.removeEventListener("focus", J), e.removeEventListener("blur", K);
68
- });
69
- }, { immediate: !0 });
70
- let Z = null;
71
- O(z, (e) => {
72
- Z &&= (Z(), null), e && (e.addEventListener("mouseenter", G, { passive: !0 }), e.addEventListener("mouseleave", q, { passive: !0 }), Z = () => {
73
- e.removeEventListener("mouseenter", G), e.removeEventListener("mouseleave", q);
74
- });
75
- }, { immediate: !0 });
76
- let Q = () => {
77
- let e = I.value;
78
- e && (F.value ? e.setAttribute("aria-describedby", M) : V.value && e.setAttribute("aria-describedby", j));
79
- };
80
- b(() => {
81
- Q(), P.value = !0;
82
- }), O([
83
- I,
84
- V,
85
- F
86
- ], Q, { flush: "post" }), y(() => {
87
- X?.(), Z?.(), I.value && I.value.removeAttribute("aria-describedby"), K();
88
- });
89
- let { width: $ } = t(I, {
90
- width: 0,
91
- height: 0
92
- }, { box: "border-box" }), ee = c(() => {
93
- if (h.width) {
94
- let { value: e, unit: t } = a(h.width);
95
- return t === "%" ? I.value ? `${$.value * (e / 100)}px` : "0px" : `${e}px`;
96
- }
97
- });
98
- return (e, t) => (x(), u(s, null, [
99
- F.value ? (x(), u("span", {
100
- key: 0,
101
- id: M,
102
- class: "sr-only"
103
- }, w(F.value), 1)) : l("", !0),
104
- L.value ? l("", !0) : C(e.$slots, "activator", _(g({ key: 1 }, {
105
- props: { ref: H },
106
- disabled: e.disabled,
107
- open: B.value,
108
- placement: e.placement
109
- }))),
110
- p(i, g({
111
- ref: "popover",
112
- modelValue: B.value,
113
- "onUpdate:modelValue": t[0] ||= (e) => B.value = e,
114
- anchor: I.value,
115
- "arrow-padding": e.arrowPadding,
116
- boundary: e.boundary,
117
- class: ["bb-tooltip", { [`bb-tooltip--${e.theme}`]: !0 }],
118
- padding: e.padding,
119
- placement: e.placement,
120
- "transition-duration": e.transitionDuration
121
- }, e.$attrs), {
122
- default: k(() => [d("span", {
123
- id: j,
124
- class: "bb-tooltip__content",
125
- style: v({ width: ee.value })
126
- }, [C(e.$slots, "default", {}, () => [f(w(e.text), 1)])], 4)]),
127
- _: 3
128
- }, 16, [
129
- "modelValue",
130
- "anchor",
131
- "arrow-padding",
132
- "boundary",
133
- "class",
134
- "padding",
135
- "placement",
136
- "transition-duration"
137
- ])
138
- ], 64));
139
- }
140
- });
1
+ import e from "./index341.js";
2
+ /* empty css */
3
+ //#region src/components/BbToast/BbToast.vue
4
+ var t = e;
141
5
  //#endregion
142
- export { A as default };
6
+ export { t as default };