bitboss-ui 1.0.8 → 1.0.9

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 (130) hide show
  1. package/dist/index102.js +2 -2
  2. package/dist/index104.js +2 -2
  3. package/dist/index110.js +1 -1
  4. package/dist/index112.js +4 -4
  5. package/dist/index114.js +1 -1
  6. package/dist/index118.js +1 -1
  7. package/dist/index119.js +1 -1
  8. package/dist/index12.js +48 -48
  9. package/dist/index12.js.map +1 -1
  10. package/dist/index120.js +1 -1
  11. package/dist/index126.js +1 -1
  12. package/dist/index127.js +1 -1
  13. package/dist/index128.js +1 -1
  14. package/dist/index132.js +2 -2
  15. package/dist/index16.js +7 -7
  16. package/dist/index18.js +10 -10
  17. package/dist/index198.js +5 -121
  18. package/dist/index198.js.map +1 -1
  19. package/dist/index199.js +13 -131
  20. package/dist/index199.js.map +1 -1
  21. package/dist/index20.js +3 -3
  22. package/dist/index200.js +16 -5
  23. package/dist/index200.js.map +1 -1
  24. package/dist/index201.js +3 -3
  25. package/dist/index202.js +20 -2
  26. package/dist/index202.js.map +1 -1
  27. package/dist/index203.js +29 -2
  28. package/dist/index203.js.map +1 -1
  29. package/dist/index204.js +8 -35
  30. package/dist/index204.js.map +1 -1
  31. package/dist/index205.js +2 -174
  32. package/dist/index205.js.map +1 -1
  33. package/dist/index206.js +121 -6
  34. package/dist/index206.js.map +1 -1
  35. package/dist/index207.js +131 -365
  36. package/dist/index207.js.map +1 -1
  37. package/dist/index208.js +2 -373
  38. package/dist/index208.js.map +1 -1
  39. package/dist/index209.js +35 -3
  40. package/dist/index209.js.map +1 -1
  41. package/dist/index210.js +174 -2
  42. package/dist/index210.js.map +1 -1
  43. package/dist/index211.js +6 -4
  44. package/dist/index211.js.map +1 -1
  45. package/dist/index212.js +368 -3
  46. package/dist/index212.js.map +1 -1
  47. package/dist/index213.js +373 -3
  48. package/dist/index213.js.map +1 -1
  49. package/dist/index214.js +2 -16
  50. package/dist/index214.js.map +1 -1
  51. package/dist/index215.js +4 -16
  52. package/dist/index215.js.map +1 -1
  53. package/dist/index216.js +3 -20
  54. package/dist/index216.js.map +1 -1
  55. package/dist/index217.js +10 -29
  56. package/dist/index217.js.map +1 -1
  57. package/dist/index218.js +2 -8
  58. package/dist/index218.js.map +1 -1
  59. package/dist/index22.js +2 -2
  60. package/dist/index220.js +235 -2
  61. package/dist/index220.js.map +1 -1
  62. package/dist/index221.js +3 -10
  63. package/dist/index221.js.map +1 -1
  64. package/dist/index222.js +3 -235
  65. package/dist/index222.js.map +1 -1
  66. package/dist/index225.js +294 -5
  67. package/dist/index225.js.map +1 -1
  68. package/dist/index226.js +6 -2
  69. package/dist/index226.js.map +1 -1
  70. package/dist/index227.js +2 -295
  71. package/dist/index227.js.map +1 -1
  72. package/dist/index228.js +2 -2
  73. package/dist/index230.js +2 -106
  74. package/dist/index230.js.map +1 -1
  75. package/dist/index231.js +2 -435
  76. package/dist/index231.js.map +1 -1
  77. package/dist/index232.js +2 -89
  78. package/dist/index232.js.map +1 -1
  79. package/dist/index233.js +2 -117
  80. package/dist/index233.js.map +1 -1
  81. package/dist/index234.js +104 -198
  82. package/dist/index234.js.map +1 -1
  83. package/dist/index235.js +434 -3
  84. package/dist/index235.js.map +1 -1
  85. package/dist/index236.js +4 -224
  86. package/dist/index236.js.map +1 -1
  87. package/dist/index237.js +6 -258
  88. package/dist/index237.js.map +1 -1
  89. package/dist/index238.js +17 -2
  90. package/dist/index238.js.map +1 -1
  91. package/dist/index239.js +164 -2
  92. package/dist/index239.js.map +1 -1
  93. package/dist/index240.js +1 -4
  94. package/dist/index240.js.map +1 -1
  95. package/dist/index241.js +200 -2
  96. package/dist/index241.js.map +1 -1
  97. package/dist/index242.js +117 -6
  98. package/dist/index242.js.map +1 -1
  99. package/dist/index243.js +68 -16
  100. package/dist/index243.js.map +1 -1
  101. package/dist/index244.js +1 -1
  102. package/dist/index245.js +2 -5
  103. package/dist/index245.js.map +1 -1
  104. package/dist/index246.js +5 -164
  105. package/dist/index246.js.map +1 -1
  106. package/dist/index247.js +91 -1
  107. package/dist/index247.js.map +1 -1
  108. package/dist/index248.js +15 -2
  109. package/dist/index248.js.map +1 -1
  110. package/dist/index249.js +224 -69
  111. package/dist/index249.js.map +1 -1
  112. package/dist/index250.js +255 -12
  113. package/dist/index250.js.map +1 -1
  114. package/dist/index251.js +1 -1
  115. package/dist/index255.js +2 -2
  116. package/dist/index256.js +1 -1
  117. package/dist/index26.js +2 -2
  118. package/dist/index30.js +2 -2
  119. package/dist/index32.js +7 -7
  120. package/dist/index34.js +2 -2
  121. package/dist/index36.js +2 -2
  122. package/dist/index48.js +1 -1
  123. package/dist/index50.js +1 -1
  124. package/dist/index66.js +3 -3
  125. package/dist/index70.js +2 -2
  126. package/dist/index73.js +1 -1
  127. package/dist/index76.js +1 -1
  128. package/dist/index80.js +4 -4
  129. package/dist/style.css +1 -1
  130. package/package.json +1 -1
package/dist/index102.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as de, ref as O, computed as p, onMounted as be, watch as q, openBlock as n, createBlock as re, resolveDynamicComponent as ue, normalizeClass as f, withCtx as pe, createElementBlock as d, toDisplayString as m, createCommentVNode as v, createElementVNode as o, renderSlot as y, createVNode as J, unref as C, Fragment as N, renderList as T, createTextVNode as fe, mergeProps as me } from "vue";
2
- import { add as ye } from "./index248.js";
2
+ import { add as ye } from "./index245.js";
3
3
  import { clamp as he } from "./index197.js";
4
4
  import { deepEqual as G } from "./index124.js";
5
5
  import { isNil as j } from "./index121.js";
6
6
  import { isNotNil as _e } from "./index125.js";
7
7
  import { useId as ke } from "./index8.js";
8
8
  import { useItemValue as ge } from "./index127.js";
9
- import { when as ve } from "./index211.js";
9
+ import { when as ve } from "./index215.js";
10
10
  import K from "./index12.js";
11
11
  import "./index13.js";
12
12
  import Ce from "./index26.js";
package/dist/index104.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as y, ref as f, computed as B, openBlock as k, createBlock as g, withCtx as l, renderSlot as r, normalizeProps as i, guardReactiveProps as n, createVNode as w, mergeProps as V } from "vue";
2
2
  import $ from "./index22.js";
3
3
  import "./index23.js";
4
- import P from "./index246.js";
5
- import "./index247.js";
4
+ import P from "./index239.js";
5
+ import "./index240.js";
6
6
  const z = /* @__PURE__ */ y({
7
7
  __name: "BbTag",
8
8
  props: {
package/dist/index110.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
2
2
  import { state as k, useToast as C } from "./index6.js";
3
- import B from "./index249.js";
3
+ import B from "./index243.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {
package/dist/index112.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
2
- import { useFloating as G, arrow as J } from "./index198.js";
2
+ import { useFloating as G, arrow as J } from "./index206.js";
3
3
  import { useId as K } from "./index8.js";
4
4
  import { wait as P } from "./index123.js";
5
5
  import Q from "./index10.js";
6
6
  import "./index11.js";
7
- import { throttle as v } from "./index209.js";
8
- import { waitFor as W } from "./index206.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index207.js";
7
+ import { throttle as v } from "./index216.js";
8
+ import { waitFor as W } from "./index211.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index212.js";
10
10
  const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
11
11
  fill: "none",
12
12
  viewBox: "0 0 24 24",
package/dist/index114.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as $, computed as g, resolveComponent as y, openBlock as f, createElementBlock as i, Fragment as v, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as p, createVNode as k, createSlots as B, withCtx as C, normalizeProps as T, guardReactiveProps as _ } from "vue";
2
- import { flattenTree as P } from "./index245.js";
2
+ import { flattenTree as P } from "./index246.js";
3
3
  const w = { class: "bb-tree-row" }, z = { class: "bb-tree-main-content" }, I = /* @__PURE__ */ $({
4
4
  __name: "BbTree",
5
5
  props: {
package/dist/index118.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
2
- import { isCssColor as z } from "./index210.js";
2
+ import { isCssColor as z } from "./index214.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {
package/dist/index119.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
2
- import { throttle as g } from "./index209.js";
2
+ import { throttle as g } from "./index216.js";
3
3
  const O = /* @__PURE__ */ v({
4
4
  __name: "BbSmoothHeight",
5
5
  props: {
package/dist/index12.js CHANGED
@@ -1,17 +1,20 @@
1
- import { defineComponent as B, ref as p, computed as n, watch as E, openBlock as u, createElementBlock as c, normalizeClass as I, normalizeProps as h, mergeProps as i, createCommentVNode as F, createElementVNode as d, renderSlot as N, guardReactiveProps as A } from "vue";
2
- import { isCssColor as f } from "./index210.js";
3
- import { when as L } from "./index211.js";
4
- const M = {
1
+ import { defineComponent as C, ref as b, computed as n, watch as E, openBlock as m, createElementBlock as p, normalizeProps as c, guardReactiveProps as h, mergeProps as f, createCommentVNode as I, createElementVNode as r, renderSlot as F } from "vue";
2
+ import { isCssColor as k } from "./index214.js";
3
+ import { when as N } from "./index215.js";
4
+ const A = {
5
5
  "aria-hidden": "true",
6
6
  class: "bb-base-checkbox-container"
7
- }, S = /* @__PURE__ */ d("path", {
8
- d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
9
- fill: "none",
10
- "stroke-linecap": "round",
11
- "stroke-width": "14px"
12
- }, null, -1), J = [
13
- S
14
- ], $ = /* @__PURE__ */ B({
7
+ }, L = /* @__PURE__ */ r("svg", {
8
+ class: "bb-base-checkbox-container__icon",
9
+ viewBox: "276.411 158.834 114.971 114.97"
10
+ }, [
11
+ /* @__PURE__ */ r("path", {
12
+ d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
13
+ fill: "none",
14
+ "stroke-linecap": "round",
15
+ "stroke-width": "14px"
16
+ })
17
+ ], -1), $ = /* @__PURE__ */ C({
15
18
  __name: "BaseCheckbox",
16
19
  props: {
17
20
  ariaDescribedby: {},
@@ -30,39 +33,44 @@ const M = {
30
33
  modelValue: {}
31
34
  },
32
35
  emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
33
- setup(k, { emit: y }) {
34
- const e = k, t = y, l = p(null), s = n(() => e.checked ? !0 : JSON.stringify(e.trueValue) === JSON.stringify(e.modelValue)), r = p(!1), v = n(() => ({
35
- "bb-base-checkbox": !0,
36
- "bb-base-checkbox--disabled": e.disabled,
37
- "bb-base-checkbox--errors": e.hasErrors,
38
- "bb-base-checkbox--indeterminate": e.indeterminate,
39
- "bb-base-checkbox--readonly": e.readonly,
40
- [`bb-base-checkbox--${e.color}`]: e.color && !f(e.color)
41
- })), b = L(
36
+ setup(y, { emit: v }) {
37
+ const e = y, t = v, l = b(null), s = n(() => e.checked ? !0 : JSON.stringify(e.trueValue) === JSON.stringify(e.modelValue)), u = b(!1), V = n(() => {
38
+ const a = {
39
+ class: {
40
+ "bb-base-checkbox": !0,
41
+ "bb-base-checkbox--disabled": e.disabled,
42
+ "bb-base-checkbox--errors": e.hasErrors,
43
+ "bb-base-checkbox--indeterminate": e.indeterminate,
44
+ "bb-base-checkbox--readonly": e.readonly,
45
+ [`bb-base-checkbox--${e.color}`]: e.color && !k(e.color)
46
+ }
47
+ };
48
+ return e.color && k(e.color) && (a.style = `--color: ${e.color}`), a;
49
+ }), i = N(
42
50
  (a) => typeof a != "string",
43
51
  JSON.stringify
44
- ), V = n(() => {
45
- const a = b(e.falseValue);
52
+ ), x = n(() => {
53
+ const a = i(e.falseValue);
46
54
  return {
47
55
  disabled: e.disabled,
48
56
  name: e.name,
49
57
  type: "hidden",
50
58
  value: a
51
59
  };
52
- }), m = n(() => {
53
- const a = b(e.trueValue), w = {
60
+ }), d = n(() => {
61
+ const a = i(e.trueValue), w = {
54
62
  onBlur: (o) => {
55
- r.value = !1, t("blur", o);
63
+ u.value = !1, t("blur", o);
56
64
  },
57
65
  onChange: (o) => {
58
66
  if (o.target instanceof HTMLInputElement) {
59
- let C = o.target.checked ? e.trueValue : e.falseValue;
60
- t("change", o), t("update:modelValue", C);
67
+ let B = o.target.checked ? e.trueValue : e.falseValue;
68
+ t("change", o), t("update:modelValue", B);
61
69
  }
62
70
  },
63
71
  onClick: (o) => t("click", o),
64
72
  onFocus: (o) => {
65
- r.value = !0, t("focus", o);
73
+ u.value = !0, t("focus", o);
66
74
  },
67
75
  onKeydown: (o) => t("keydown", o),
68
76
  onMousedown: (o) => t("mousedown", o),
@@ -83,44 +91,36 @@ const M = {
83
91
  value: a,
84
92
  ...w
85
93
  };
86
- }), x = n(() => ({
94
+ }), g = n(() => ({
87
95
  checked: s.value,
88
96
  disabled: e.disabled,
89
97
  falseValue: e.falseValue,
90
- focused: r.value,
98
+ focused: u.value,
91
99
  hasErrors: e.hasErrors,
92
100
  id: e.id,
93
101
  name: e.name,
94
- parsedValue: m.value.value,
102
+ parsedValue: d.value.value,
95
103
  readonly: e.readonly,
96
104
  trueValue: e.trueValue,
97
105
  value: s.value ? e.trueValue : e.falseValue
98
- })), g = n(() => {
99
- let a = {};
100
- return e.color && f(e.color) && (a.backgroundColor = e.color), {
101
- class: "bb-base-checkbox-container__icon",
102
- style: a
103
- };
104
- });
106
+ }));
105
107
  return E(
106
108
  () => [e.modelValue, e.checked, e.indeterminate],
107
109
  () => {
108
110
  l.value && (l.value.indeterminate = !!e.indeterminate);
109
111
  }
110
- ), (a, _) => (u(), c("span", {
111
- class: I(v.value)
112
- }, [
113
- !s.value && a.submitWhenFalse ? (u(), c("input", h(i({ key: 0 }, V.value)), null, 16)) : F("", !0),
114
- d("input", i(m.value, {
112
+ ), (a, _) => (m(), p("span", c(h(V.value)), [
113
+ !s.value && a.submitWhenFalse ? (m(), p("input", c(f({ key: 0 }, x.value)), null, 16)) : I("", !0),
114
+ r("input", f(d.value, {
115
115
  ref_key: "checkboxInput",
116
116
  ref: l
117
117
  }), null, 16),
118
- d("span", M, [
119
- N(a.$slots, "icon", h(A(x.value)), () => [
120
- (u(), c("svg", i({ viewBox: "276.411 158.834 114.971 114.97" }, g.value), J, 16))
118
+ r("span", A, [
119
+ F(a.$slots, "icon", c(h(g.value)), () => [
120
+ L
121
121
  ])
122
122
  ])
123
- ], 2));
123
+ ], 16));
124
124
  }
125
125
  });
126
126
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index12.js","sources":["../src/components/BaseCheckbox/BaseCheckbox.vue"],"sourcesContent":["<template>\n\t<span :class=\"classes\">\n\t\t<input v-if=\"!checked && submitWhenFalse\" v-bind=\"hiddenInputAttributes\" />\n\t\t<input v-bind=\"inputAttributes\" ref=\"checkboxInput\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-checkbox-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<svg viewBox=\"276.411 158.834 114.971 114.97\" v-bind=\"iconAttributes\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M 297.574 224.786 L 318.309 243.134 L 371.568 189.232\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"14px\"\n\t\t\t\t\t></path>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseCheckboxProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n};\n\nexport type BaseCheckboxEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: boolean;\n\tfalseValue: any;\n\tfocused: boolean;\n\thasErrors: boolean;\n\tid: BaseCheckboxProps['id'];\n\tname: BaseCheckboxProps['name'];\n\tparsedValue: any;\n\treadonly: BaseCheckboxProps['readonly'];\n\ttrueValue: any;\n\tvalue: any;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxProps>(), {\n\ttrueValue: true,\n\tfalseValue: false,\n});\n\nconst emit = defineEmits<BaseCheckboxEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checkboxInput = ref<HTMLInputElement | null>(null);\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.trueValue) === JSON.stringify(props.modelValue);\n});\nconst hasFocus = ref(false);\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-base-checkbox': true,\n\t\t'bb-base-checkbox--disabled': props.disabled,\n\t\t'bb-base-checkbox--errors': props.hasErrors,\n\t\t'bb-base-checkbox--indeterminate': props.indeterminate,\n\t\t'bb-base-checkbox--readonly': props.readonly,\n\t\t[`bb-base-checkbox--${props.color}`]:\n\t\t\tprops.color && !isCssColor(props.color),\n\t};\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputAttributes = computed(() => {\n\tconst value = makeInputValue(props.falseValue);\n\treturn {\n\t\tdisabled: props.disabled,\n\t\tname: props.name,\n\t\ttype: 'hidden',\n\t\tvalue: value,\n\t};\n});\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.trueValue);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\n\tconst onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tlet value = event.target.checked ? props.trueValue : props.falseValue;\n\n\t\t\temit('change', event);\n\t\t\temit('update:modelValue', value);\n\t\t}\n\t};\n\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t\tonInput: (event: Event) => emit('input', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly checkbox so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tindeterminate: props.indeterminate,\n\t\tname: props.name,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'checkbox',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfalseValue: props.falseValue,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\ttrueValue: props.trueValue,\n\tvalue: checked.value ? props.trueValue : props.falseValue,\n}));\n\nconst iconAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.backgroundColor = props.color;\n\t}\n\treturn {\n\t\tclass: 'bb-base-checkbox-container__icon',\n\t\tstyle,\n\t};\n});\n\n/**\n * Indeterminate is a very volatile prop that is reset upon clicking,\n * this keeps the state and the prop aligned\n */\nwatch(\n\t() => [props.modelValue, props.checked, props.indeterminate],\n\t() => {\n\t\tif (checkboxInput.value) {\n\t\t\tcheckboxInput.value.indeterminate = !!props.indeterminate;\n\t\t}\n\t}\n);\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","checkboxInput","ref","checked","computed","hasFocus","classes","isCssColor","makeInputValue","when","item","hiddenInputAttributes","value","inputAttributes","eventListeners","event","slotAttributes","iconAttributes","style","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4HA,UAAMA,IAAQC,GAKRC,IAAOC,GAMPC,IAAgBC,EAA6B,IAAI,GAEjDC,IAAUC,EAAS,MACpBP,EAAM,UAAgB,KACnB,KAAK,UAAUA,EAAM,SAAS,MAAM,KAAK,UAAUA,EAAM,UAAU,CAC1E,GACKQ,IAAWH,EAAI,EAAK,GAEpBI,IAAUF,EAAS,OACjB;AAAA,MACN,oBAAoB;AAAA,MACpB,8BAA8BP,EAAM;AAAA,MACpC,4BAA4BA,EAAM;AAAA,MAClC,mCAAmCA,EAAM;AAAA,MACzC,8BAA8BA,EAAM;AAAA,MACpC,CAAC,qBAAqBA,EAAM,KAAK,EAAE,GAClCA,EAAM,SAAS,CAACU,EAAWV,EAAM,KAAK;AAAA,IAAA,EAExC,GAMKW,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAwBP,EAAS,MAAM;AACtC,YAAAQ,IAAQJ,EAAeX,EAAM,UAAU;AACtC,aAAA;AAAA,QACN,UAAUA,EAAM;AAAA,QAChB,MAAMA,EAAM;AAAA,QACZ,MAAM;AAAA,QACN,OAAAe;AAAA,MAAA;AAAA,IAC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M;AAAA,MAClB,SAASQ,EAAS;AAAA,MAClB,WAAWR,EAAM;AAAA,MACjB,IAAIA,EAAM;AAAA,MACV,MAAMA,EAAM;AAAA,MACZ,aAAagB,EAAgB,MAAM;AAAA,MACnC,UAAUhB,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,OAAOM,EAAQ,QAAQN,EAAM,YAAYA,EAAM;AAAA,IAC9C,EAAA,GAEIoB,IAAiBb,EAAS,MAAM;AACrC,UAAIc,IAAmC,CAAA;AACvC,aAAIrB,EAAM,SAASU,EAAWV,EAAM,KAAK,MACxCqB,EAAM,kBAAkBrB,EAAM,QAExB;AAAA,QACN,OAAO;AAAA,QACP,OAAAqB;AAAA,MAAA;AAAA,IACD,CACA;AAMD,WAAAC;AAAA,MACC,MAAM,CAACtB,EAAM,YAAYA,EAAM,SAASA,EAAM,aAAa;AAAA,MAC3D,MAAM;AACL,QAAII,EAAc,UACjBA,EAAc,MAAM,gBAAgB,CAAC,CAACJ,EAAM;AAAA,MAE9C;AAAA,IAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index12.js","sources":["../src/components/BaseCheckbox/BaseCheckbox.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\">\n\t\t<input v-if=\"!checked && submitWhenFalse\" v-bind=\"hiddenInputAttributes\" />\n\t\t<input v-bind=\"inputAttributes\" ref=\"checkboxInput\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-checkbox-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"bb-base-checkbox-container__icon\"\n\t\t\t\t\tviewBox=\"276.411 158.834 114.971 114.97\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M 297.574 224.786 L 318.309 243.134 L 371.568 189.232\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"14px\"\n\t\t\t\t\t></path>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseCheckboxProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n};\n\nexport type BaseCheckboxEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: boolean;\n\tfalseValue: any;\n\tfocused: boolean;\n\thasErrors: boolean;\n\tid: BaseCheckboxProps['id'];\n\tname: BaseCheckboxProps['name'];\n\tparsedValue: any;\n\treadonly: BaseCheckboxProps['readonly'];\n\ttrueValue: any;\n\tvalue: any;\n};\n\nconst props = withDefaults(defineProps<BaseCheckboxProps>(), {\n\ttrueValue: true,\n\tfalseValue: false,\n});\n\nconst emit = defineEmits<BaseCheckboxEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checkboxInput = ref<HTMLInputElement | null>(null);\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.trueValue) === JSON.stringify(props.modelValue);\n});\nconst hasFocus = ref(false);\n\nconst containerAttributes = computed(() => {\n\tconst attributes: Record<string, any> = {\n\t\tclass: {\n\t\t\t'bb-base-checkbox': true,\n\t\t\t'bb-base-checkbox--disabled': props.disabled,\n\t\t\t'bb-base-checkbox--errors': props.hasErrors,\n\t\t\t'bb-base-checkbox--indeterminate': props.indeterminate,\n\t\t\t'bb-base-checkbox--readonly': props.readonly,\n\t\t\t[`bb-base-checkbox--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t};\n\tif (props.color && isCssColor(props.color)) {\n\t\tattributes['style'] = `--color: ${props.color}`;\n\t}\n\treturn attributes;\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputAttributes = computed(() => {\n\tconst value = makeInputValue(props.falseValue);\n\treturn {\n\t\tdisabled: props.disabled,\n\t\tname: props.name,\n\t\ttype: 'hidden',\n\t\tvalue: value,\n\t};\n});\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.trueValue);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\n\tconst onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tlet value = event.target.checked ? props.trueValue : props.falseValue;\n\n\t\t\temit('change', event);\n\t\t\temit('update:modelValue', value);\n\t\t}\n\t};\n\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t\tonInput: (event: Event) => emit('input', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly checkbox so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tindeterminate: props.indeterminate,\n\t\tname: props.name,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'checkbox',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfalseValue: props.falseValue,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\ttrueValue: props.trueValue,\n\tvalue: checked.value ? props.trueValue : props.falseValue,\n}));\n\n/**\n * Indeterminate is a very volatile prop that is reset upon clicking,\n * this keeps the state and the prop aligned\n */\nwatch(\n\t() => [props.modelValue, props.checked, props.indeterminate],\n\t() => {\n\t\tif (checkboxInput.value) {\n\t\t\tcheckboxInput.value.indeterminate = !!props.indeterminate;\n\t\t}\n\t}\n);\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","checkboxInput","ref","checked","computed","hasFocus","containerAttributes","attributes","isCssColor","makeInputValue","when","item","hiddenInputAttributes","value","inputAttributes","eventListeners","event","slotAttributes","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HA,UAAMA,IAAQC,GAKRC,IAAOC,GAMPC,IAAgBC,EAA6B,IAAI,GAEjDC,IAAUC,EAAS,MACpBP,EAAM,UAAgB,KACnB,KAAK,UAAUA,EAAM,SAAS,MAAM,KAAK,UAAUA,EAAM,UAAU,CAC1E,GACKQ,IAAWH,EAAI,EAAK,GAEpBI,IAAsBF,EAAS,MAAM;AAC1C,YAAMG,IAAkC;AAAA,QACvC,OAAO;AAAA,UACN,oBAAoB;AAAA,UACpB,8BAA8BV,EAAM;AAAA,UACpC,4BAA4BA,EAAM;AAAA,UAClC,mCAAmCA,EAAM;AAAA,UACzC,8BAA8BA,EAAM;AAAA,UACpC,CAAC,qBAAqBA,EAAM,KAAK,EAAE,GAClCA,EAAM,SAAS,CAACW,EAAWX,EAAM,KAAK;AAAA,QACxC;AAAA,MAAA;AAED,aAAIA,EAAM,SAASW,EAAWX,EAAM,KAAK,MACxCU,EAAW,QAAW,YAAYV,EAAM,KAAK,KAEvCU;AAAA,IAAA,CACP,GAMKE,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAwBR,EAAS,MAAM;AACtC,YAAAS,IAAQJ,EAAeZ,EAAM,UAA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AAA;AAAA,IACJ,CACA,GAEKE,IAAiBb,EAAS,OAAO;AAAA,MACtC,SAASD,EAAQ;AAAA,MACjB,UAAUN,EAAM;AAAA,MAChB,YAAYA,EAAM;AAAA,MAClB,SAASQ,EAAS;AAAA,MAClB,WAAWR,EAAM;AAAA,MACjB,IAAIA,EAAM;AAAA,MACV,MAAMA,EAAM;AAAA,MACZ,aAAaiB,EAAgB,MAAM;AAAA,MACnC,UAAUjB,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,OAAOM,EAAQ,QAAQN,EAAM,YAAYA,EAAM;AAAA,IAC9C,EAAA;AAMF,WAAAqB;AAAA,MACC,MAAM,CAACrB,EAAM,YAAYA,EAAM,SAASA,EAAM,aAAa;AAAA,MAC3D,MAAM;AACL,QAAII,EAAc,UACjBA,EAAc,MAAM,gBAAgB,CAAC,CAACJ,EAAM;AAAA,MAE9C;AAAA,IAAA;;;;;;;;;;;;;;"}
package/dist/index120.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
2
- import { isCssColor as f } from "./index210.js";
2
+ import { isCssColor as f } from "./index214.js";
3
3
  const _ = /* @__PURE__ */ c("svg", {
4
4
  viewBox: "0 0 512 512",
5
5
  xmlns: "http://www.w3.org/2000/svg"
package/dist/index126.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index222.js";
1
+ import t from "./index220.js";
2
2
  const o = () => ({
3
3
  getItemText(r, n) {
4
4
  if (typeof r == "string" && !n)
package/dist/index127.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index222.js";
1
+ import o from "./index220.js";
2
2
  const e = () => ({
3
3
  getItemValue(n, f) {
4
4
  if (typeof f > "u")
package/dist/index128.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray as b, isPlainObject as m } from "./index250.js";
1
+ import { isArray as b, isPlainObject as m } from "./index248.js";
2
2
  function i(e, n, l, o, r) {
3
3
  const u = {}.propertyIsEnumerable.call(o, n) ? "enumerable" : "nonenumerable";
4
4
  u === "enumerable" && (e[n] = l), r && u === "nonenumerable" && Object.defineProperty(e, n, {
package/dist/index132.js CHANGED
@@ -1,5 +1,5 @@
1
- import { toValue as B } from "./index221.js";
2
- import { tryOnScopeDispose as E } from "./index221.js";
1
+ import { toValue as B } from "./index217.js";
2
+ import { tryOnScopeDispose as E } from "./index217.js";
3
3
  import { ref as c, computed as t } from "vue";
4
4
  function h(a) {
5
5
  var l;
package/dist/index16.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Ve, ref as k, computed as p, watch as F, nextTick as U, openBlock as d, createElementBlock as u, mergeProps as Se, createElementVNode as r, createTextVNode as De, toDisplayString as f, unref as y, withDirectives as q, createVNode as V, Transition as S, withCtx as D, vShow as j, createCommentVNode as Y, normalizeClass as g, Fragment as w, renderList as O, renderSlot as G } from "vue";
2
- import i from "./index200.js";
3
- import Me from "./index214.js";
4
- import Ae from "./index215.js";
2
+ import i from "./index198.js";
3
+ import Me from "./index199.js";
4
+ import Ae from "./index200.js";
5
5
  import xe from "./index201.js";
6
- import Ce from "./index216.js";
7
- import Ye from "./index217.js";
8
- import { groupBy as J } from "./index218.js";
6
+ import Ce from "./index202.js";
7
+ import Ye from "./index203.js";
8
+ import { groupBy as J } from "./index204.js";
9
9
  import { isNil as Be } from "./index121.js";
10
- import { last as Q } from "./index203.js";
10
+ import { last as Q } from "./index205.js";
11
11
  const Ie = { class: "bb-base-date-picker__header" }, Ee = ["disabled"], Ne = /* @__PURE__ */ r("span", null, null, -1), Te = {
12
12
  "aria-live": "polite",
13
13
  class: "bb-base-date-picker__selected-day-label"
package/dist/index18.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { defineComponent as Z, ref as n, computed as k, watch as x, openBlock as E, createElementBlock as ee, normalizeClass as z, renderSlot as c, createElementVNode as o, withDirectives as ae, mergeProps as B, unref as p, toDisplayString as L, createBlock as te, Teleport as ne, normalizeStyle as re, createVNode as oe, createSlots as le, renderList as se, withCtx as ie, normalizeProps as ue, guardReactiveProps as de, createCommentVNode as ce } from "vue";
2
- import { useFloating as pe } from "./index198.js";
3
- import me from "./index199.js";
4
- import r from "./index200.js";
2
+ import { useFloating as pe } from "./index206.js";
3
+ import me from "./index207.js";
4
+ import r from "./index198.js";
5
5
  import fe from "./index201.js";
6
- import { identity as be } from "./index202.js";
7
- import { last as ve } from "./index203.js";
8
- import { useFocusTrap as ye } from "./index204.js";
6
+ import { identity as be } from "./index208.js";
7
+ import { last as ve } from "./index205.js";
8
+ import { useFocusTrap as ye } from "./index209.js";
9
9
  import { useId as ge } from "./index8.js";
10
- import { vMaska as he } from "./index205.js";
10
+ import { vMaska as he } from "./index210.js";
11
11
  import { wait as Y } from "./index123.js";
12
- import { waitFor as ke } from "./index206.js";
12
+ import { waitFor as ke } from "./index211.js";
13
13
  import Me from "./index16.js";
14
14
  import "./index17.js";
15
- import { autoUpdate as we, flip as Ve, shift as _e } from "./index207.js";
16
- import { offset as Ye } from "./index208.js";
15
+ import { autoUpdate as we, flip as Ve, shift as _e } from "./index212.js";
16
+ import { offset as Ye } from "./index213.js";
17
17
  const De = ["aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "id", "name", "placeholder", "readonly", "value"], Ae = ["disabled"], Ce = /* @__PURE__ */ o("svg", {
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
19
  viewBox: "-2 -3 24 24"
package/dist/index198.js CHANGED
@@ -1,124 +1,8 @@
1
- import { arrow as j, computePosition as A } from "./index207.js";
2
- import { autoUpdate as T, flip as W, platform as X, shift as Y } from "./index207.js";
3
- import { unref as o, computed as r, ref as f, shallowRef as B, watch as h, getCurrentScope as F, onScopeDispose as I, shallowReadonly as a } from "vue";
4
- import { isNode as U, getNodeName as k } from "./index230.js";
5
- import { getOverflowAncestors as ee } from "./index230.js";
6
- function q(n) {
7
- return n != null && typeof n == "object" && "$el" in n;
8
- }
9
- function g(n) {
10
- if (q(n)) {
11
- const l = n.$el;
12
- return U(l) && k(l) === "#comment" ? null : l;
13
- }
14
- return n;
15
- }
16
- function J(n) {
17
- return {
18
- name: "arrow",
19
- options: n,
20
- fn(l) {
21
- const t = g(o(n.element));
22
- return t == null ? {} : j({
23
- element: t,
24
- padding: n.padding
25
- }).fn(l);
26
- }
27
- };
28
- }
29
- function S(n) {
30
- return typeof window > "u" ? 1 : (n.ownerDocument.defaultView || window).devicePixelRatio || 1;
31
- }
32
- function M(n, l) {
33
- const t = S(n);
34
- return Math.round(l * t) / t;
35
- }
36
- function K(n, l, t) {
37
- t === void 0 && (t = {});
38
- const x = t.whileElementsMounted, D = r(() => {
39
- var e;
40
- return (e = o(t.open)) != null ? e : !0;
41
- }), O = r(() => o(t.middleware)), d = r(() => {
42
- var e;
43
- return (e = o(t.placement)) != null ? e : "bottom";
44
- }), v = r(() => {
45
- var e;
46
- return (e = o(t.strategy)) != null ? e : "absolute";
47
- }), _ = r(() => {
48
- var e;
49
- return (e = o(t.transform)) != null ? e : !0;
50
- }), i = r(() => g(n.value)), u = r(() => g(l.value)), p = f(0), w = f(0), c = f(v.value), P = f(d.value), E = B({}), y = f(!1), N = r(() => {
51
- const e = {
52
- position: c.value,
53
- left: "0",
54
- top: "0"
55
- };
56
- if (!u.value)
57
- return e;
58
- const b = M(u.value, p.value), C = M(u.value, w.value);
59
- return _.value ? {
60
- ...e,
61
- transform: "translate(" + b + "px, " + C + "px)",
62
- ...S(u.value) >= 1.5 && {
63
- willChange: "transform"
64
- }
65
- } : {
66
- position: c.value,
67
- left: b + "px",
68
- top: C + "px"
69
- };
70
- });
71
- let s;
72
- function m() {
73
- i.value == null || u.value == null || A(i.value, u.value, {
74
- middleware: O.value,
75
- placement: d.value,
76
- strategy: v.value
77
- }).then((e) => {
78
- p.value = e.x, w.value = e.y, c.value = e.strategy, P.value = e.placement, E.value = e.middlewareData, y.value = !0;
79
- });
80
- }
81
- function R() {
82
- typeof s == "function" && (s(), s = void 0);
83
- }
84
- function V() {
85
- if (R(), x === void 0) {
86
- m();
87
- return;
88
- }
89
- if (i.value != null && u.value != null) {
90
- s = x(i.value, u.value, m);
91
- return;
92
- }
93
- }
94
- function $() {
95
- D.value || (y.value = !1);
96
- }
97
- return h([O, d, v], m, {
98
- flush: "sync"
99
- }), h([i, u], V, {
100
- flush: "sync"
101
- }), h(D, $, {
102
- flush: "sync"
103
- }), F() && I(R), {
104
- x: a(p),
105
- y: a(w),
106
- strategy: a(c),
107
- placement: a(P),
108
- middlewareData: a(E),
109
- isPositioned: a(y),
110
- floatingStyles: N,
111
- update: m
112
- };
113
- }
1
+ import { getDefaultExportFromCjs as r } from "./index226.js";
2
+ import { __require as o } from "./index225.js";
3
+ var t = o();
4
+ const s = /* @__PURE__ */ r(t);
114
5
  export {
115
- J as arrow,
116
- T as autoUpdate,
117
- A as computePosition,
118
- W as flip,
119
- ee as getOverflowAncestors,
120
- X as platform,
121
- Y as shift,
122
- K as useFloating
6
+ s as default
123
7
  };
124
8
  //# sourceMappingURL=index198.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index198.js","sources":["../node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs"],"sourcesContent":["import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport { unref, computed, ref, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly } from 'vue-demi';\nimport { isNode, getNodeName } from '@floating-ui/utils/dom';\n\nfunction isComponentPublicInstance(target) {\n return target != null && typeof target === 'object' && '$el' in target;\n}\nfunction unwrapElement(target) {\n if (isComponentPublicInstance(target)) {\n const element = target.$el;\n return isNode(element) && getNodeName(element) === '#comment' ? null : element;\n }\n return target;\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered to the reference element.\n * @param options The arrow options.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction arrow(options) {\n return {\n name: 'arrow',\n options,\n fn(args) {\n const element = unwrapElement(unref(options.element));\n if (element == null) {\n return {};\n }\n return arrow$1({\n element,\n padding: options.padding\n }).fn(args);\n }\n };\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.\n * @param reference The reference template ref.\n * @param floating The floating template ref.\n * @param options The floating options.\n * @see https://floating-ui.com/docs/vue\n */\nfunction useFloating(reference, floating, options) {\n if (options === void 0) {\n options = {};\n }\n const whileElementsMountedOption = options.whileElementsMounted;\n const openOption = computed(() => {\n var _unref;\n return (_unref = unref(options.open)) != null ? _unref : true;\n });\n const middlewareOption = computed(() => unref(options.middleware));\n const placementOption = computed(() => {\n var _unref2;\n return (_unref2 = unref(options.placement)) != null ? _unref2 : 'bottom';\n });\n const strategyOption = computed(() => {\n var _unref3;\n return (_unref3 = unref(options.strategy)) != null ? _unref3 : 'absolute';\n });\n const transformOption = computed(() => {\n var _unref4;\n return (_unref4 = unref(options.transform)) != null ? _unref4 : true;\n });\n const referenceElement = computed(() => unwrapElement(reference.value));\n const floatingElement = computed(() => unwrapElement(floating.value));\n const x = ref(0);\n const y = ref(0);\n const strategy = ref(strategyOption.value);\n const placement = ref(placementOption.value);\n const middlewareData = shallowRef({});\n const isPositioned = ref(false);\n const floatingStyles = computed(() => {\n const initialStyles = {\n position: strategy.value,\n left: '0',\n top: '0'\n };\n if (!floatingElement.value) {\n return initialStyles;\n }\n const xVal = roundByDPR(floatingElement.value, x.value);\n const yVal = roundByDPR(floatingElement.value, y.value);\n if (transformOption.value) {\n return {\n ...initialStyles,\n transform: \"translate(\" + xVal + \"px, \" + yVal + \"px)\",\n ...(getDPR(floatingElement.value) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy.value,\n left: xVal + \"px\",\n top: yVal + \"px\"\n };\n });\n let whileElementsMountedCleanup;\n function update() {\n if (referenceElement.value == null || floatingElement.value == null) {\n return;\n }\n computePosition(referenceElement.value, floatingElement.value, {\n middleware: middlewareOption.value,\n placement: placementOption.value,\n strategy: strategyOption.value\n }).then(position => {\n x.value = position.x;\n y.value = position.y;\n strategy.value = position.strategy;\n placement.value = position.placement;\n middlewareData.value = position.middlewareData;\n isPositioned.value = true;\n });\n }\n function cleanup() {\n if (typeof whileElementsMountedCleanup === 'function') {\n whileElementsMountedCleanup();\n whileElementsMountedCleanup = undefined;\n }\n }\n function attach() {\n cleanup();\n if (whileElementsMountedOption === undefined) {\n update();\n return;\n }\n if (referenceElement.value != null && floatingElement.value != null) {\n whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);\n return;\n }\n }\n function reset() {\n if (!openOption.value) {\n isPositioned.value = false;\n }\n }\n watch([middlewareOption, placementOption, strategyOption], update, {\n flush: 'sync'\n });\n watch([referenceElement, floatingElement], attach, {\n flush: 'sync'\n });\n watch(openOption, reset, {\n flush: 'sync'\n });\n if (getCurrentScope()) {\n onScopeDispose(cleanup);\n }\n return {\n x: shallowReadonly(x),\n y: shallowReadonly(y),\n strategy: shallowReadonly(strategy),\n placement: shallowReadonly(placement),\n middlewareData: shallowReadonly(middlewareData),\n isPositioned: shallowReadonly(isPositioned),\n floatingStyles,\n update\n };\n}\n\nexport { arrow, useFloating };\n"],"names":["isComponentPublicInstance","target","unwrapElement","element","isNode","getNodeName","arrow","options","args","unref","arrow$1","getDPR","roundByDPR","value","dpr","useFloating","reference","floating","whileElementsMountedOption","openOption","computed","_unref","middlewareOption","placementOption","_unref2","strategyOption","_unref3","transformOption","_unref4","referenceElement","floatingElement","x","ref","y","strategy","placement","middlewareData","shallowRef","isPositioned","floatingStyles","initialStyles","xVal","yVal","whileElementsMountedCleanup","update","computePosition","position","cleanup","attach","reset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