bitboss-ui 1.0.11 → 1.0.13

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 (145) hide show
  1. package/dist/components/BbTab/BbTab.vue.d.ts +20 -0
  2. package/dist/index10.js +3 -3
  3. package/dist/index10.js.map +1 -1
  4. package/dist/index100.js +129 -116
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index102.js +3 -3
  7. package/dist/index104.js +2 -2
  8. package/dist/index110.js +1 -1
  9. package/dist/index112.js +4 -4
  10. package/dist/index114.js +1 -1
  11. package/dist/index118.js +1 -1
  12. package/dist/index119.js +1 -1
  13. package/dist/index12.js +3 -3
  14. package/dist/index120.js +1 -1
  15. package/dist/index122.js +1 -1
  16. package/dist/index126.js +1 -1
  17. package/dist/index127.js +1 -1
  18. package/dist/index128.js +1 -1
  19. package/dist/index132.js +191 -53
  20. package/dist/index132.js.map +1 -1
  21. package/dist/index16.js +8 -8
  22. package/dist/index18.js +11 -11
  23. package/dist/index197.js +235 -2
  24. package/dist/index197.js.map +1 -1
  25. package/dist/index198.js +3 -5
  26. package/dist/index198.js.map +1 -1
  27. package/dist/index199.js +35 -16
  28. package/dist/index199.js.map +1 -1
  29. package/dist/index20.js +61 -60
  30. package/dist/index20.js.map +1 -1
  31. package/dist/index200.js +6 -16
  32. package/dist/index200.js.map +1 -1
  33. package/dist/index201.js +79 -19
  34. package/dist/index201.js.map +1 -1
  35. package/dist/index202.js +2 -20
  36. package/dist/index202.js.map +1 -1
  37. package/dist/index203.js +4 -29
  38. package/dist/index203.js.map +1 -1
  39. package/dist/index204.js +2 -8
  40. package/dist/index204.js.map +1 -1
  41. package/dist/index205.js +5 -2
  42. package/dist/index205.js.map +1 -1
  43. package/dist/index206.js +16 -2
  44. package/dist/index206.js.map +1 -1
  45. package/dist/index207.js +16 -4
  46. package/dist/index207.js.map +1 -1
  47. package/dist/index208.js +19 -2
  48. package/dist/index208.js.map +1 -1
  49. package/dist/index209.js +20 -3
  50. package/dist/index209.js.map +1 -1
  51. package/dist/index210.js +29 -3
  52. package/dist/index210.js.map +1 -1
  53. package/dist/index211.js +8 -235
  54. package/dist/index211.js.map +1 -1
  55. package/dist/index212.js +2 -121
  56. package/dist/index212.js.map +1 -1
  57. package/dist/index213.js +2 -2
  58. package/dist/index213.js.map +1 -1
  59. package/dist/index214.js +2 -6
  60. package/dist/index214.js.map +1 -1
  61. package/dist/index215.js +105 -352
  62. package/dist/index215.js.map +1 -1
  63. package/dist/index216.js +2 -373
  64. package/dist/index216.js.map +1 -1
  65. package/dist/index217.js +368 -2
  66. package/dist/index217.js.map +1 -1
  67. package/dist/index218.js +373 -3
  68. package/dist/index218.js.map +1 -1
  69. package/dist/index219.js +3 -35
  70. package/dist/index219.js.map +1 -1
  71. package/dist/index22.js +2 -2
  72. package/dist/index220.js +3 -134
  73. package/dist/index220.js.map +1 -1
  74. package/dist/index221.js +130 -170
  75. package/dist/index221.js.map +1 -1
  76. package/dist/index222.js +172 -8
  77. package/dist/index222.js.map +1 -1
  78. package/dist/index227.js +1 -1
  79. package/dist/index228.js +163 -294
  80. package/dist/index228.js.map +1 -1
  81. package/dist/index229.js +1 -8
  82. package/dist/index229.js.map +1 -1
  83. package/dist/index230.js +2 -2
  84. package/dist/index230.js.map +1 -1
  85. package/dist/index231.js +69 -2
  86. package/dist/index231.js.map +1 -1
  87. package/dist/index232.js +435 -2
  88. package/dist/index232.js.map +1 -1
  89. package/dist/index233.js +89 -2
  90. package/dist/index233.js.map +1 -1
  91. package/dist/index234.js +200 -2
  92. package/dist/index234.js.map +1 -1
  93. package/dist/index235.js +5 -2
  94. package/dist/index235.js.map +1 -1
  95. package/dist/index236.js +2 -4
  96. package/dist/index236.js.map +1 -1
  97. package/dist/index237.js +4 -224
  98. package/dist/index237.js.map +1 -1
  99. package/dist/index238.js +294 -257
  100. package/dist/index238.js.map +1 -1
  101. package/dist/index239.js +5 -105
  102. package/dist/index239.js.map +1 -1
  103. package/dist/index24.js +1 -1
  104. package/dist/index240.js +2 -117
  105. package/dist/index240.js.map +1 -1
  106. package/dist/index241.js +2 -69
  107. package/dist/index241.js.map +1 -1
  108. package/dist/index242.js +2 -5
  109. package/dist/index242.js.map +1 -1
  110. package/dist/index243.js +2 -2
  111. package/dist/index243.js.map +1 -1
  112. package/dist/index244.js +2 -164
  113. package/dist/index244.js.map +1 -1
  114. package/dist/index245.js +4 -1
  115. package/dist/index245.js.map +1 -1
  116. package/dist/index246.js +99 -428
  117. package/dist/index246.js.map +1 -1
  118. package/dist/index247.js +12 -86
  119. package/dist/index247.js.map +1 -1
  120. package/dist/index248.js +224 -2
  121. package/dist/index248.js.map +1 -1
  122. package/dist/index249.js +258 -200
  123. package/dist/index249.js.map +1 -1
  124. package/dist/index250.js +117 -2
  125. package/dist/index250.js.map +1 -1
  126. package/dist/index251.js +2 -15
  127. package/dist/index251.js.map +1 -1
  128. package/dist/index255.js +3 -2
  129. package/dist/index255.js.map +1 -1
  130. package/dist/index256.js +2 -3
  131. package/dist/index256.js.map +1 -1
  132. package/dist/index26.js +2 -2
  133. package/dist/index30.js +3 -3
  134. package/dist/index32.js +8 -8
  135. package/dist/index34.js +3 -3
  136. package/dist/index36.js +2 -2
  137. package/dist/index48.js +1 -1
  138. package/dist/index50.js +1 -1
  139. package/dist/index66.js +3 -3
  140. package/dist/index73.js +1 -1
  141. package/dist/index76.js +1 -1
  142. package/dist/index80.js +4 -4
  143. package/dist/index82.js +1 -1
  144. package/dist/style.css +1 -1
  145. package/package.json +2 -2
@@ -69,6 +69,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
69
69
  direction: "horizontal" | "vertical";
70
70
  querykey: string;
71
71
  }, {}>, Readonly<{
72
+ 'header:prepend'?: ((props: {
73
+ isScrolling: boolean;
74
+ left: boolean;
75
+ right: boolean;
76
+ }) => any) | undefined;
77
+ 'header:append'?: ((props: {
78
+ isScrolling: boolean;
79
+ left: boolean;
80
+ right: boolean;
81
+ }) => any) | undefined;
72
82
  label?: ((props: {
73
83
  current: string | null;
74
84
  currentIndex: number;
@@ -93,6 +103,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
93
103
  goTo: (target: "first" | "last" | "next" | "previous") => void;
94
104
  }) => any;
95
105
  }> & {
106
+ 'header:prepend'?: ((props: {
107
+ isScrolling: boolean;
108
+ left: boolean;
109
+ right: boolean;
110
+ }) => any) | undefined;
111
+ 'header:append'?: ((props: {
112
+ isScrolling: boolean;
113
+ left: boolean;
114
+ right: boolean;
115
+ }) => any) | undefined;
96
116
  label?: ((props: {
97
117
  current: string | null;
98
118
  currentIndex: number;
package/dist/index10.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, getCurrentInstance as c, computed as n, resolveComponent as u, openBlock as y, createBlock as k, resolveDynamicComponent as C, mergeProps as g, withCtx as h, renderSlot as m, createTextVNode as S, toDisplayString as x } from "vue";
1
+ import { defineComponent as v, getCurrentInstance as c, computed as n, resolveComponent as u, openBlock as y, createBlock as g, resolveDynamicComponent as k, mergeProps as C, withCtx as h, renderSlot as m, createTextVNode as S, toDisplayString as x } from "vue";
2
2
  const A = /* @__PURE__ */ v({
3
3
  __name: "BaseButton",
4
4
  props: {
@@ -31,7 +31,7 @@ const A = /* @__PURE__ */ v({
31
31
  },
32
32
  setup(d) {
33
33
  var o, s, l, i;
34
- const e = d, r = !!((s = (o = c()) == null ? void 0 : o.proxy) != null && s.$inertia), p = !!((i = (l = c()) == null ? void 0 : l.proxy) != null && i.$nuxt), a = n(() => e.href || e.to && e.disabled ? r && !e.disabled ? u("Link") : "a" : e.to ? p ? u("NuxtLink") : "router-link" : e.tag), b = n(() => ({
34
+ const e = d, r = !!((s = (o = c()) == null ? void 0 : o.proxy) != null && s.$inertia), p = !!((i = (l = c()) == null ? void 0 : l.proxy) != null && i.$nuxt), a = n(() => e.href || e.to && e.disabled ? r && !e.disabled && !e.target ? u("Link") : "a" : e.to ? p ? u("NuxtLink") : "router-link" : e.tag), b = n(() => ({
35
35
  "base-btn": !0,
36
36
  "base-btn--block": e.block,
37
37
  "base-btn--disabled": e.disabled
@@ -50,7 +50,7 @@ const A = /* @__PURE__ */ v({
50
50
  }
51
51
  return t;
52
52
  });
53
- return (t, B) => (y(), k(C(a.value), g({ class: b.value }, f.value), {
53
+ return (t, B) => (y(), g(k(a.value), C({ class: b.value }, f.value), {
54
54
  default: h(() => [
55
55
  m(t.$slots, "default", {}, () => [
56
56
  S(x(t.text), 1)
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/BaseButton/BaseButton.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :class=\"classes\" v-bind=\"attributes\">\n\t\t<slot>{{ text }}</slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, resolveComponent } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nexport type BaseButtonProps = {\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseButtonProps>(), {\n\ttag: 'button',\n\ttype: 'button',\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n\t// For disabled links always render a\n\tif (props.href || (props.to && props.disabled)) {\n\t\tif (isInertia && !props.disabled) return resolveComponent('Link');\n\t\treturn 'a';\n\t}\n\tif (props.to) {\n\t\tif (isNuxt) return resolveComponent('NuxtLink');\n\t\treturn 'router-link';\n\t}\n\treturn props.tag;\n});\n\nconst classes = computed(() => ({\n\t'base-btn': true,\n\t'base-btn--block': props.block,\n\t'base-btn--disabled': props.disabled,\n}));\n\nconst attributes = computed(() => {\n\ttype PossibleAttributes = {\n\t\tactiveClass: BaseButtonProps['activeClass'];\n\n\t\t'aria-disabled': boolean;\n\n\t\tariaCurrentValue: BaseButtonProps['ariaCurrentValue'];\n\n\t\tdata: BaseButtonProps['data'];\n\n\t\tdisabled: boolean;\n\n\t\texactActiveClass: BaseButtonProps['exactActiveClass'];\n\n\t\theaders: BaseButtonProps['headers'];\n\n\t\thref: string;\n\n\t\tmethod: BaseButtonProps['method'];\n\n\t\tonBefore: BaseButtonProps['onBefore'];\n\n\t\tonCancel: BaseButtonProps['onCancel'];\n\n\t\tonCancelToken: BaseButtonProps['onCancelToken'];\n\n\t\tonFinish: BaseButtonProps['onFinish'];\n\n\t\tonly: BaseButtonProps['only'];\n\n\t\tonProgress: BaseButtonProps['onProgress'];\n\n\t\tonStart: BaseButtonProps['onStart'];\n\n\t\tonSuccess: BaseButtonProps['onSuccess'];\n\n\t\tpreserveScroll: BaseButtonProps['preserveScroll'];\n\n\t\tpreserveState: BaseButtonProps['preserveState'];\n\n\t\tqueryStringArrayFormat: BaseButtonProps['queryStringArrayFormat'];\n\n\t\treplace: BaseButtonProps['replace'];\n\n\t\trole: string;\n\n\t\tstyle: { [rule: string]: string };\n\n\t\ttarget: string;\n\n\t\tto: BaseButtonProps['to'];\n\n\t\ttype: string;\n\t};\n\tconst initial: Partial<PossibleAttributes> = {};\n\n\tif (tag.value === 'button') {\n\t\tinitial.disabled = props.disabled;\n\t\tinitial.type = props.type;\n\t} else if (\n\t\ttag.value === 'a' ||\n\t\t(isInertia && typeof tag.value !== 'string' && tag.value.name === 'Link')\n\t) {\n\t\t// When rendering as anchor prevent navigation if disabled\n\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\tif (props.disabled) {\n\t\t\tinitial['aria-disabled'] = true;\n\t\t\tinitial.role = 'link';\n\t\t} else {\n\t\t\t// Only attach the href to active links\n\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\tinitial.href = props.href;\n\t\t\tinitial.target = props.target;\n\n\t\t\tif (isInertia) {\n\t\t\t\tinitial.data = props.data;\n\t\t\t\tinitial.headers = props.headers;\n\t\t\t\tinitial.method = props.method;\n\t\t\t\tinitial.onBefore = props.onBefore;\n\t\t\t\tinitial.onCancel = props.onCancel;\n\t\t\t\tinitial.onCancelToken = props.onCancelToken;\n\t\t\t\tinitial.onFinish = props.onFinish;\n\t\t\t\tinitial.only = props.only;\n\t\t\t\tinitial.onProgress = props.onProgress;\n\t\t\t\tinitial.onStart = props.onStart;\n\t\t\t\tinitial.onSuccess = props.onSuccess;\n\t\t\t\tinitial.preserveScroll = props.preserveScroll;\n\t\t\t\tinitial.preserveState = props.preserveState;\n\t\t\t\tinitial.queryStringArrayFormat = props.queryStringArrayFormat;\n\t\t\t\tinitial.replace = props.replace;\n\t\t\t}\n\t\t}\n\t} else if (\n\t\ttag.value === 'router-link' ||\n\t\t(typeof tag.value !== 'string' && tag.value.name === 'NuxtLink')\n\t) {\n\t\tinitial.activeClass = props.activeClass;\n\t\tinitial.ariaCurrentValue = props.ariaCurrentValue;\n\t\tinitial.exactActiveClass = props.exactActiveClass;\n\t\tinitial.replace = props.replace;\n\t\tinitial.target = props.target;\n\t\tinitial.to = props.to;\n\t}\n\n\tswitch (tag.value) {\n\t\tcase 'button':\n\t\t\tinitial.disabled = props.disabled;\n\t\t\tinitial.type = props.type;\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t// When rendering as anchor prevent navigation if disabled\n\t\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\t\tif (props.disabled) {\n\t\t\t\tinitial['aria-disabled'] = true;\n\t\t\t\tinitial.role = 'link';\n\t\t\t} else {\n\t\t\t\t// Only attach the href to active links\n\t\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\t\tinitial.href = props.href;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'router-link':\n\t\t\tinitial.to = props.to;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn initial;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseButton';\n</style>\n"],"names":["props","__props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolveComponent","classes","attributes","initial"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAMA,IAAQC,GAWRC,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAG3CG,IAAS,CAAC,GAACC,KAAAC,IAAAH,EAAA,MAAA,gBAAAG,EAAsB,UAAtB,QAAAD,EAA6B,QAExCE,IAAMC,EAAS,MAEhBV,EAAM,QAASA,EAAM,MAAMA,EAAM,WAChCE,KAAa,CAACF,EAAM,WAAiBW,EAAiB,MAAM,IACzD,MAEJX,EAAM,KACLM,IAAeK,EAAiB,UAAU,IACvC,gBAEDX,EAAM,GACb,GAEKY,IAAUF,EAAS,OAAO;AAAA,MAC/B,YAAY;AAAA,MACZ,mBAAmBV,EAAM;AAAA,MACzB,sBAAsBA,EAAM;AAAA,IAC3B,EAAA,GAEIa,IAAaH,EAAS,MAAM;AAsDjC,YAAMI,IAAuC,CAAA;AAkD7C,cAhDIL,EAAI,UAAU,YACjBK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,QAErBS,EAAI,UAAU,OACbP,KAAa,OAAOO,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,SAI9DT,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,WAIfA,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,SAASd,EAAM,QAEnBE,MACHY,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,aAAad,EAAM,YAC3Bc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,YAAYd,EAAM,WAC1Bc,EAAQ,iBAAiBd,EAAM,gBAC/Bc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,yBAAyBd,EAAM,wBACvCc,EAAQ,UAAUd,EAAM,aAI1BS,EAAI,UAAU,iBACb,OAAOA,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,gBAErDK,EAAQ,cAAcd,EAAM,aAC5Bc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,KAAKd,EAAM,KAGZS,EAAI,OAAO;AAAA,QAClB,KAAK;AACJ,UAAAK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM;AACrB;AAAA,QACD,KAAK;AAGJ,UAAIA,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,UAIfA,EAAQ,OAAOd,EAAM;AAEtB;AAAA,QACD,KAAK;AACJ,UAAAc,EAAQ,KAAKd,EAAM;AACnB;AAAA,MAGF;AACO,aAAAc;AAAA,IAAA,CACP;;;;;;;;;;;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/components/BaseButton/BaseButton.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :class=\"classes\" v-bind=\"attributes\">\n\t\t<slot>{{ text }}</slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, resolveComponent } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nexport type BaseButtonProps = {\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseButtonProps>(), {\n\ttag: 'button',\n\ttype: 'button',\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n\t// For disabled links always render a\n\tif (props.href || (props.to && props.disabled)) {\n\t\t// Prevent rendering inertia links if target is passed (inertia doesn't support external links)\n\t\tif (isInertia && !props.disabled && !props.target)\n\t\t\treturn resolveComponent('Link');\n\t\treturn 'a';\n\t}\n\tif (props.to) {\n\t\tif (isNuxt) return resolveComponent('NuxtLink');\n\t\treturn 'router-link';\n\t}\n\treturn props.tag;\n});\n\nconst classes = computed(() => ({\n\t'base-btn': true,\n\t'base-btn--block': props.block,\n\t'base-btn--disabled': props.disabled,\n}));\n\nconst attributes = computed(() => {\n\ttype PossibleAttributes = {\n\t\tactiveClass: BaseButtonProps['activeClass'];\n\n\t\t'aria-disabled': boolean;\n\n\t\tariaCurrentValue: BaseButtonProps['ariaCurrentValue'];\n\n\t\tdata: BaseButtonProps['data'];\n\n\t\tdisabled: boolean;\n\n\t\texactActiveClass: BaseButtonProps['exactActiveClass'];\n\n\t\theaders: BaseButtonProps['headers'];\n\n\t\thref: string;\n\n\t\tmethod: BaseButtonProps['method'];\n\n\t\tonBefore: BaseButtonProps['onBefore'];\n\n\t\tonCancel: BaseButtonProps['onCancel'];\n\n\t\tonCancelToken: BaseButtonProps['onCancelToken'];\n\n\t\tonFinish: BaseButtonProps['onFinish'];\n\n\t\tonly: BaseButtonProps['only'];\n\n\t\tonProgress: BaseButtonProps['onProgress'];\n\n\t\tonStart: BaseButtonProps['onStart'];\n\n\t\tonSuccess: BaseButtonProps['onSuccess'];\n\n\t\tpreserveScroll: BaseButtonProps['preserveScroll'];\n\n\t\tpreserveState: BaseButtonProps['preserveState'];\n\n\t\tqueryStringArrayFormat: BaseButtonProps['queryStringArrayFormat'];\n\n\t\treplace: BaseButtonProps['replace'];\n\n\t\trole: string;\n\n\t\tstyle: { [rule: string]: string };\n\n\t\ttarget: string;\n\n\t\tto: BaseButtonProps['to'];\n\n\t\ttype: string;\n\t};\n\tconst initial: Partial<PossibleAttributes> = {};\n\n\tif (tag.value === 'button') {\n\t\tinitial.disabled = props.disabled;\n\t\tinitial.type = props.type;\n\t} else if (\n\t\ttag.value === 'a' ||\n\t\t(isInertia && typeof tag.value !== 'string' && tag.value.name === 'Link')\n\t) {\n\t\t// When rendering as anchor prevent navigation if disabled\n\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\tif (props.disabled) {\n\t\t\tinitial['aria-disabled'] = true;\n\t\t\tinitial.role = 'link';\n\t\t} else {\n\t\t\t// Only attach the href to active links\n\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\tinitial.href = props.href;\n\t\t\tinitial.target = props.target;\n\n\t\t\tif (isInertia) {\n\t\t\t\tinitial.data = props.data;\n\t\t\t\tinitial.headers = props.headers;\n\t\t\t\tinitial.method = props.method;\n\t\t\t\tinitial.onBefore = props.onBefore;\n\t\t\t\tinitial.onCancel = props.onCancel;\n\t\t\t\tinitial.onCancelToken = props.onCancelToken;\n\t\t\t\tinitial.onFinish = props.onFinish;\n\t\t\t\tinitial.only = props.only;\n\t\t\t\tinitial.onProgress = props.onProgress;\n\t\t\t\tinitial.onStart = props.onStart;\n\t\t\t\tinitial.onSuccess = props.onSuccess;\n\t\t\t\tinitial.preserveScroll = props.preserveScroll;\n\t\t\t\tinitial.preserveState = props.preserveState;\n\t\t\t\tinitial.queryStringArrayFormat = props.queryStringArrayFormat;\n\t\t\t\tinitial.replace = props.replace;\n\t\t\t}\n\t\t}\n\t} else if (\n\t\ttag.value === 'router-link' ||\n\t\t(typeof tag.value !== 'string' && tag.value.name === 'NuxtLink')\n\t) {\n\t\tinitial.activeClass = props.activeClass;\n\t\tinitial.ariaCurrentValue = props.ariaCurrentValue;\n\t\tinitial.exactActiveClass = props.exactActiveClass;\n\t\tinitial.replace = props.replace;\n\t\tinitial.target = props.target;\n\t\tinitial.to = props.to;\n\t}\n\n\tswitch (tag.value) {\n\t\tcase 'button':\n\t\t\tinitial.disabled = props.disabled;\n\t\t\tinitial.type = props.type;\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t// When rendering as anchor prevent navigation if disabled\n\t\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\t\tif (props.disabled) {\n\t\t\t\tinitial['aria-disabled'] = true;\n\t\t\t\tinitial.role = 'link';\n\t\t\t} else {\n\t\t\t\t// Only attach the href to active links\n\t\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\t\tinitial.href = props.href;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'router-link':\n\t\t\tinitial.to = props.to;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn initial;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseButton';\n</style>\n"],"names":["props","__props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolveComponent","classes","attributes","initial"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAMA,IAAQC,GAWRC,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAG3CG,IAAS,CAAC,GAACC,KAAAC,IAAAH,EAAA,MAAA,gBAAAG,EAAsB,UAAtB,QAAAD,EAA6B,QAExCE,IAAMC,EAAS,MAEhBV,EAAM,QAASA,EAAM,MAAMA,EAAM,WAEhCE,KAAa,CAACF,EAAM,YAAY,CAACA,EAAM,SACnCW,EAAiB,MAAM,IACxB,MAEJX,EAAM,KACLM,IAAeK,EAAiB,UAAU,IACvC,gBAEDX,EAAM,GACb,GAEKY,IAAUF,EAAS,OAAO;AAAA,MAC/B,YAAY;AAAA,MACZ,mBAAmBV,EAAM;AAAA,MACzB,sBAAsBA,EAAM;AAAA,IAC3B,EAAA,GAEIa,IAAaH,EAAS,MAAM;AAsDjC,YAAMI,IAAuC,CAAA;AAkD7C,cAhDIL,EAAI,UAAU,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O,aAAAc;AAAA,IAAA,CACP;;;;;;;;;;;"}
package/dist/index100.js CHANGED
@@ -1,14 +1,12 @@
1
- import { defineComponent as K, ref as F, getCurrentInstance as H, computed as p, watch as _, nextTick as J, openBlock as u, createElementBlock as d, unref as O, normalizeClass as g, createElementVNode as m, Fragment as w, renderList as N, createVNode as j, withCtx as G, renderSlot as q, toDisplayString as M, createCommentVNode as Q } from "vue";
2
- import { useId as W } from "./index8.js";
3
- import { useRoute as X } from "./index130.js";
4
- import { useRouter as Y } from "./index131.js";
5
- import { wait as Z } from "./index123.js";
6
- import ee from "./index10.js";
1
+ import { defineComponent as M, ref as _, computed as k, getCurrentInstance as Q, watch as w, nextTick as W, openBlock as u, createElementBlock as d, unref as X, normalizeClass as $, createElementVNode as c, renderSlot as y, normalizeProps as U, guardReactiveProps as z, Fragment as q, renderList as D, createVNode as Y, withCtx as Z, toDisplayString as ee, createCommentVNode as ae } from "vue";
2
+ import { useId as le } from "./index8.js";
3
+ import { useRoute as te } from "./index130.js";
4
+ import { useRouter as se } from "./index131.js";
5
+ import { wait as re } from "./index123.js";
6
+ import { useScroll as ie } from "./index132.js";
7
+ import oe from "./index10.js";
7
8
  import "./index11.js";
8
- const ae = ["id"], te = { class: "bb-tab__label-boundary" }, le = {
9
- class: "bb-tab__label-container",
10
- role: "tablist"
11
- }, se = { class: "bb-tab__label" }, ie = { class: "bb-tab__panes-container" }, re = ["id", "aria-labelledby"], fe = /* @__PURE__ */ K({
9
+ const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-tab__label" }, ce = { class: "bb-tab__panes-container" }, be = ["id", "aria-labelledby"], _e = /* @__PURE__ */ M({
12
10
  __name: "BbTab",
13
11
  props: {
14
12
  disabled: { type: Boolean },
@@ -21,106 +19,110 @@ const ae = ["id"], te = { class: "bb-tab__label-boundary" }, le = {
21
19
  querykey: { default: "tab" }
22
20
  },
23
21
  emits: ["update:modelValue"],
24
- setup(A, { expose: P, emit: U }) {
25
- var x, S, I, V, L, C, E;
26
- const t = A, D = U, o = X(), v = Y(), k = F(), $ = t.id ?? W().id.value, b = `bb-tab_${$}`, T = !!((S = (x = H()) == null ? void 0 : x.proxy) != null && S.$inertia), l = F(null), i = p(
27
- () => t.items.findIndex((e) => e.key === l.value)
28
- ), y = p(() => i.value === 0), f = p(() => i.value === t.items.length - 1);
29
- if (t.items.forEach((e) => {
22
+ setup(K, { expose: H, emit: J }) {
23
+ var L, C, R, E, B, P, F;
24
+ const l = K, O = J, o = te(), h = se(), p = _(), S = l.id ?? le().id.value, f = `bb-tab_${S}`, T = _(), { isScrolling: j, arrivedState: I } = ie(T), V = k(() => ({
25
+ isScrolling: j.value,
26
+ left: I.left,
27
+ right: I.right
28
+ })), x = !!((C = (L = Q()) == null ? void 0 : L.proxy) != null && C.$inertia), t = _(null), r = k(
29
+ () => l.items.findIndex((e) => e.key === t.value)
30
+ ), v = k(() => r.value === 0), m = k(() => r.value === l.items.length - 1);
31
+ if (l.items.forEach((e) => {
30
32
  if (!e.key)
31
33
  throw console.error("A tab item has no key", e), new Error("A tab item has no key " + JSON.stringify(e));
32
- }), t.navigation && ((V = (I = o.value) == null ? void 0 : I.query) != null && V[t.querykey]))
33
- l.value = (C = (L = o.value) == null ? void 0 : L.query) == null ? void 0 : C[t.querykey];
34
- else if (t.navigation && T && ((E = globalThis == null ? void 0 : globalThis.location) != null && E.href) && new URL(globalThis.location.href).searchParams.get(t.querykey))
35
- l.value = new URL(globalThis.location.href).searchParams.get(
36
- t.querykey
34
+ }), l.navigation && ((E = (R = o.value) == null ? void 0 : R.query) != null && E[l.querykey]))
35
+ t.value = (P = (B = o.value) == null ? void 0 : B.query) == null ? void 0 : P[l.querykey];
36
+ else if (l.navigation && x && ((F = globalThis == null ? void 0 : globalThis.location) != null && F.href) && new URL(globalThis.location.href).searchParams.get(l.querykey))
37
+ t.value = new URL(globalThis.location.href).searchParams.get(
38
+ l.querykey
37
39
  );
38
- else if (t.modelValue)
39
- l.value = t.modelValue;
40
- else if (t.items[0]) {
41
- const e = t.items.find((a) => !a.disabled);
40
+ else if (l.modelValue)
41
+ t.value = l.modelValue;
42
+ else if (l.items[0]) {
43
+ const e = l.items.find((a) => !a.disabled);
42
44
  if (!e)
43
45
  throw new Error(
44
46
  "No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected."
45
47
  );
46
48
  const s = e.key;
47
- l.value = s;
49
+ t.value = s;
48
50
  }
49
- const c = async (e, s = !1) => {
50
- var a, n, R, B;
51
- if (t.navigation && o.value && ((n = (a = o.value) == null ? void 0 : a.query) == null ? void 0 : n[t.querykey]) !== e)
52
- v == null || v.push({
51
+ const b = async (e, s = !1) => {
52
+ var a, n, N, A;
53
+ if (l.navigation && o.value && ((n = (a = o.value) == null ? void 0 : a.query) == null ? void 0 : n[l.querykey]) !== e)
54
+ h == null || h.push({
53
55
  ...o,
54
- query: { ...(R = o.value) == null ? void 0 : R.query, [t.querykey]: e },
56
+ query: { ...(N = o.value) == null ? void 0 : N.query, [l.querykey]: e },
55
57
  replace: s
56
58
  });
57
- else if (t.navigation && T && ((B = globalThis == null ? void 0 : globalThis.location) != null && B.href) && new URL(globalThis.location.href).searchParams.get(t.querykey) !== e) {
58
- const h = new URL(globalThis.location.href);
59
- h.searchParams.set(t.querykey, e), Z(0).then(() => {
60
- s ? history.replaceState({}, "", h.toString()) : history.pushState({}, "", h.toString());
59
+ else if (l.navigation && x && ((A = globalThis == null ? void 0 : globalThis.location) != null && A.href) && new URL(globalThis.location.href).searchParams.get(l.querykey) !== e) {
60
+ const g = new URL(globalThis.location.href);
61
+ g.searchParams.set(l.querykey, e), re(0).then(() => {
62
+ s ? history.replaceState({}, "", g.toString()) : history.pushState({}, "", g.toString());
61
63
  });
62
64
  }
63
- t.modelValue !== e && D("update:modelValue", e), l.value = e;
65
+ l.modelValue !== e && O("update:modelValue", e), t.value = e;
64
66
  };
65
- l.value && c(l.value, !0);
66
- const r = (e) => {
67
+ t.value && b(t.value, !0);
68
+ const i = (e) => {
67
69
  var s = null;
68
70
  switch (e) {
69
71
  case "first":
70
72
  s = 0;
71
73
  break;
72
74
  case "previous":
73
- s = (i.value + t.items.length - 1) % t.items.length;
75
+ s = (r.value + l.items.length - 1) % l.items.length;
74
76
  break;
75
77
  case "next":
76
- s = (i.value + 1) % t.items.length;
78
+ s = (r.value + 1) % l.items.length;
77
79
  break;
78
80
  case "last":
79
- s = t.items.length - 1;
81
+ s = l.items.length - 1;
80
82
  break;
81
83
  }
82
84
  if (s === null)
83
85
  throw new Error("Could not navigate to next tab");
84
- if (t.items[s].disabled)
86
+ if (l.items[s].disabled)
85
87
  return;
86
- const a = t.items[s].key, n = document.querySelector(
87
- `#${b}_tab_${a}`
88
+ const a = l.items[s].key, n = document.querySelector(
89
+ `#${f}_tab_${a}`
88
90
  );
89
- n == null || n.focus(), c(a);
90
- }, z = (e) => {
91
- if (!t.disabled)
91
+ n == null || n.focus(), b(a);
92
+ }, G = (e) => {
93
+ if (!l.disabled)
92
94
  if (e.key === "ArrowRight")
93
- r("next");
95
+ i("next");
94
96
  else if (e.key === "ArrowLeft")
95
- r("previous");
97
+ i("previous");
96
98
  else if (e.key === "Home")
97
- e.preventDefault(), r("first");
99
+ e.preventDefault(), i("first");
98
100
  else if (e.key === "End")
99
- e.preventDefault(), r("last");
101
+ e.preventDefault(), i("last");
100
102
  else
101
103
  return;
102
104
  };
103
- return _(
104
- () => t.modelValue,
105
+ return w(
106
+ () => l.modelValue,
105
107
  (e) => {
106
- e && c(e);
108
+ e && b(e);
107
109
  }
108
- ), _(
110
+ ), w(
109
111
  () => {
110
112
  var e, s;
111
- return (s = (e = o.value) == null ? void 0 : e.query) == null ? void 0 : s[t.querykey];
113
+ return (s = (e = o.value) == null ? void 0 : e.query) == null ? void 0 : s[l.querykey];
112
114
  },
113
115
  (e) => {
114
- e && typeof e == "string" && c(e);
116
+ e && typeof e == "string" && b(e);
115
117
  }
116
- ), _(
117
- l,
118
+ ), w(
119
+ t,
118
120
  async () => {
119
- if (k.value) {
120
- const e = k.value.querySelector(
121
+ if (p.value) {
122
+ const e = p.value.querySelector(
121
123
  "[role=tablist] .bb-tab__btn--active"
122
124
  );
123
- e && (await J(), e.scrollIntoView({
125
+ e && (await W(), e.scrollIntoView({
124
126
  behavior: "smooth",
125
127
  block: "nearest",
126
128
  inline: "nearest"
@@ -128,101 +130,112 @@ const ae = ["id"], te = { class: "bb-tab__label-boundary" }, le = {
128
130
  }
129
131
  },
130
132
  { flush: "post" }
131
- ), P({
132
- isFirst: y,
133
- isLast: f,
134
- current: l,
135
- currentIndex: i,
136
- goTo: r
133
+ ), H({
134
+ isFirst: v,
135
+ isLast: m,
136
+ current: t,
137
+ currentIndex: r,
138
+ goTo: i
137
139
  }), (e, s) => (u(), d("div", {
138
- id: O($),
139
- class: g(["bb-tab", {
140
+ id: X(S),
141
+ ref_key: "tabs",
142
+ ref: p,
143
+ class: $(["bb-tab", {
140
144
  [`bb-tab--${e.direction}`]: !0,
141
145
  "bb-tab--disabled": !0
142
- }]),
143
- ref_key: "tabs",
144
- ref: k
146
+ }])
145
147
  }, [
146
- m("div", te, [
147
- m("ul", le, [
148
- (u(!0), d(w, null, N(e.items, (a) => (u(), d("li", {
148
+ c("div", ue, [
149
+ c("span", null, [
150
+ y(e.$slots, "header:prepend", U(z(V.value)))
151
+ ]),
152
+ c("ul", {
153
+ class: "bb-tab__label-container",
154
+ role: "tablist",
155
+ ref_key: "tablist",
156
+ ref: T
157
+ }, [
158
+ (u(!0), d(q, null, D(e.items, (a) => (u(), d("li", {
149
159
  key: a.key,
150
160
  role: "presentation"
151
161
  }, [
152
- j(ee, {
153
- id: `${b}_tab_${a.key}`,
154
- "aria-selected": l.value === a.key,
155
- class: g(["bb-tab__btn", { "bb-tab__btn--active": l.value === a.key }]),
162
+ Y(oe, {
163
+ id: `${f}_tab_${a.key}`,
164
+ "aria-selected": t.value === a.key,
165
+ class: $(["bb-tab__btn", { "bb-tab__btn--active": t.value === a.key }]),
156
166
  disabled: a.disabled || e.disabled,
157
167
  role: "tab",
158
- tabindex: l.value === a.key ? 0 : -1,
159
- onClick: (n) => c(a.key),
160
- onKeydown: z
168
+ tabindex: t.value === a.key ? 0 : -1,
169
+ onClick: (n) => b(a.key),
170
+ onKeydown: G
161
171
  }, {
162
- default: G(() => [
163
- q(e.$slots, `label-${a.key}`, {
164
- current: l.value,
165
- currentIndex: i.value,
172
+ default: Z(() => [
173
+ y(e.$slots, `label-${a.key}`, {
174
+ current: t.value,
175
+ currentIndex: r.value,
166
176
  disabled: !!(a.disabled || e.disabled),
167
- goTo: r,
168
- isFirst: y.value,
169
- isLast: f.value,
170
- selected: l.value === a.key,
177
+ goTo: i,
178
+ isFirst: v.value,
179
+ isLast: m.value,
180
+ selected: t.value === a.key,
171
181
  text: a.label,
172
182
  value: a.key
173
183
  }, () => [
174
- q(e.$slots, "label", {
175
- current: l.value,
176
- currentIndex: i.value,
184
+ y(e.$slots, "label", {
185
+ current: t.value,
186
+ currentIndex: r.value,
177
187
  disabled: !!(a.disabled || e.disabled),
178
- goTo: r,
179
- isFirst: y.value,
180
- isLast: f.value,
181
- selected: l.value === a.key,
188
+ goTo: i,
189
+ isFirst: v.value,
190
+ isLast: m.value,
191
+ selected: t.value === a.key,
182
192
  text: a.label,
183
193
  value: a.key
184
194
  }, () => [
185
- m("span", se, M(a.label), 1)
195
+ c("span", de, ee(a.label), 1)
186
196
  ])
187
197
  ])
188
198
  ]),
189
199
  _: 2
190
200
  }, 1032, ["id", "aria-selected", "class", "disabled", "tabindex", "onClick"])
191
201
  ]))), 128))
202
+ ], 512),
203
+ c("span", null, [
204
+ y(e.$slots, "header:append", U(z(V.value)))
192
205
  ])
193
206
  ]),
194
- m("div", ie, [
195
- (u(!0), d(w, null, N(e.items, (a) => (u(), d(w, {
207
+ c("div", ce, [
208
+ (u(!0), d(q, null, D(e.items, (a) => (u(), d(q, {
196
209
  key: a.key
197
210
  }, [
198
- l.value === a.key || e.eager || a.eager ? (u(), d("section", {
211
+ t.value === a.key || e.eager || a.eager ? (u(), d("section", {
199
212
  key: 0,
200
- id: `${b}_tabpanel_${a.key}`,
201
- "aria-labelledby": `${b}_tab_${a.key}`,
202
- class: g(["bb-tab__pane", {
203
- "bb-tab__pane--shown": l.value === a.key
213
+ id: `${f}_tabpanel_${a.key}`,
214
+ "aria-labelledby": `${f}_tab_${a.key}`,
215
+ class: $(["bb-tab__pane", {
216
+ "bb-tab__pane--shown": t.value === a.key
204
217
  }]),
205
218
  role: "tabpanel",
206
219
  tabindex: "0"
207
220
  }, [
208
- q(e.$slots, a.key, {
209
- current: l.value,
210
- currentIndex: i.value,
221
+ y(e.$slots, a.key, {
222
+ current: t.value,
223
+ currentIndex: r.value,
211
224
  disabled: !!(a.disabled || e.disabled),
212
- goTo: r,
213
- isFirst: y.value,
214
- isLast: f.value,
215
- selected: l.value === a.key,
225
+ goTo: i,
226
+ isFirst: v.value,
227
+ isLast: m.value,
228
+ selected: t.value === a.key,
216
229
  text: a.label,
217
230
  value: a.key
218
231
  })
219
- ], 10, re)) : Q("", !0)
232
+ ], 10, be)) : ae("", !0)
220
233
  ], 64))), 128))
221
234
  ])
222
- ], 10, ae));
235
+ ], 10, ne));
223
236
  }
224
237
  });
225
238
  export {
226
- fe as default
239
+ _e as default
227
240
  };
228
241
  //# sourceMappingURL=index100.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index100.js","sources":["../src/components/BbTab/BbTab.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:id=\"id\"\n\t\tclass=\"bb-tab\"\n\t\tref=\"tabs\"\n\t\t:class=\"{\n\t\t\t[`bb-tab--${direction}`]: true,\n\t\t\t'bb-tab--disabled': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-tab__label-boundary\">\n\t\t\t<ul class=\"bb-tab__label-container\" role=\"tablist\">\n\t\t\t\t<li v-for=\"tab in items\" :key=\"tab.key\" role=\"presentation\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:id=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\t\t:aria-selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\tclass=\"bb-tab__btn\"\n\t\t\t\t\t\t:class=\"{ 'bb-tab__btn--active': selectedTab === tab.key }\"\n\t\t\t\t\t\t:disabled=\"tab.disabled || disabled\"\n\t\t\t\t\t\t:role=\"'tab'\"\n\t\t\t\t\t\t:tabindex=\"selectedTab === tab.key ? 0 : -1\"\n\t\t\t\t\t\t@click=\"onTabSelected(tab.key)\"\n\t\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t:name=\"`label-${tab.key}`\"\n\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-tab__label\">{{ tab.label }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div class=\"bb-tab__panes-container\">\n\t\t\t<template v-for=\"tab in items\" :key=\"tab.key\">\n\t\t\t\t<section\n\t\t\t\t\tv-if=\"selectedTab === tab.key || eager || tab.eager\"\n\t\t\t\t\t:id=\"`${instanceid}_tabpanel_${tab.key}`\"\n\t\t\t\t\t:aria-labelledby=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\tclass=\"bb-tab__pane\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-tab__pane--shown': selectedTab === tab.key,\n\t\t\t\t\t}\"\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t:name=\"tab.key\"\n\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t></slot>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, getCurrentInstance, computed, nextTick } from 'vue';\nimport { useId } from '@/composables/useId';\nimport { useRoute } from '@/composables/useRoute';\nimport { useRouter } from '@/composables/useRouter';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbTabItem = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Used to render a tab even when not visible.\n\t * It's useful if you want the content of a tab in the DOM\n\t * immediately rendered\n\t * even when not visible for SEO purposes.\n\t */\n\teager?: boolean;\n\t/**\n\t * String that identifies the tab.\n\t */\n\tkey: string;\n\t/**\n\t * Label to use as the tab text.\n\t */\n\tlabel?: string;\n};\n\nexport type BbTabProps = Pick<CommonProps, 'disabled' | 'eager' | 'id'> & {\n\t/**\n\t * Direction of the tabs component\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\t/**\n\t * Array of items that define the tabs in the component.\n\t */\n\titems: BbTabItem[];\n\t/**\n\t * The current tab. Used by v-model.\n\t */\n\tmodelValue?: null | BbTabItem['key'];\n\t/**\n\t * Synchronizes the current tab with the url.\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Defines the query key to reference for maintaining navigation\n\t */\n\tquerykey?: string;\n};\n\nconst props = withDefaults(defineProps<BbTabProps>(), {\n\tdirection: 'horizontal',\n\tquerykey: 'tab',\n});\n\nexport type BbTabEvents = {\n\t(e: 'update:modelValue', value: (typeof props.items)[number]['key']): void;\n};\nconst emit = defineEmits<BbTabEvents>();\n\ntype BbStepSlots = {\n\tlabel?: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n} & {\n\t[key: string]: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n};\n\ndefineSlots<BbStepSlots>();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst tabs = ref();\n\nconst id = props.id ?? useId().id.value;\nconst instanceid = `bb-tab_${id}`;\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\nconst selectedTab = ref<BbTabItem['key'] | null>(null);\n\nconst currentTabIndex = computed(() =>\n\tprops.items.findIndex((el) => el.key === selectedTab.value)\n);\nconst isFirst = computed(() => currentTabIndex.value === 0);\nconst isLast = computed(() => currentTabIndex.value === props.items.length - 1);\n\nprops.items.forEach((item) => {\n\tif (!item.key) {\n\t\tconsole.error(`A tab item has no key`, item);\n\t\tthrow new Error('A tab item has no key ' + JSON.stringify(item));\n\t}\n});\n\n/* \nThis section retrieves the current tab that should be selected\n*/\n// Retrieve tab from url on load for vue apps\nif (props.navigation && route.value?.query?.[props.querykey]) {\n\tselectedTab.value = route.value?.query?.[props.querykey] as string;\n\t// Retrieve tab from url on load for inertia app\n} else if (\n\tprops.navigation &&\n\tisInertia &&\n\tglobalThis?.location?.href &&\n\tnew URL(globalThis.location.href).searchParams.get(props.querykey)\n) {\n\tselectedTab.value = new URL(globalThis.location.href).searchParams.get(\n\t\tprops.querykey\n\t) as string;\n\t// Else whatever tab is passed first\n} else if (props.modelValue) {\n\tselectedTab.value = props.modelValue;\n\t// Else whatever tab is passed first\n} else if (props.items[0]) {\n\tconst firstSelectableTab = props.items.find((item) => !item.disabled);\n\tif (!firstSelectableTab) {\n\t\tthrow new Error(\n\t\t\t'No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected.'\n\t\t);\n\t}\n\tconst key = firstSelectableTab.key;\n\tselectedTab.value = key;\n}\n/* \nOnce the current tab is found update external variables\n*/\n\nconst onTabSelected = async (tab: BbTabItem['key'], replace = false) => {\n\t/* For Vue or Nuxt context */\n\tif (\n\t\tprops.navigation &&\n\t\troute.value &&\n\t\troute.value?.query?.[props.querykey] !== tab\n\t) {\n\t\trouter?.push({\n\t\t\t...route,\n\t\t\tquery: { ...route.value?.query, [props.querykey]: tab },\n\t\t\treplace,\n\t\t});\n\t\t/* Inertia context */\n\t} else if (\n\t\tprops.navigation &&\n\t\tisInertia &&\n\t\tglobalThis?.location?.href &&\n\t\tnew URL(globalThis.location.href).searchParams.get(props.querykey) !== tab\n\t) {\n\t\tconst url = new URL(globalThis.location.href);\n\t\turl.searchParams.set(props.querykey, tab);\n\t\twait(0).then(() => {\n\t\t\tif (replace) {\n\t\t\t\thistory.replaceState({}, '', url.toString());\n\t\t\t} else {\n\t\t\t\thistory.pushState({}, '', url.toString());\n\t\t\t}\n\t\t});\n\t}\n\tif (props.modelValue !== tab) {\n\t\temit('update:modelValue', tab);\n\t}\n\tselectedTab.value = tab;\n};\n\nif (selectedTab.value) {\n\tonTabSelected(selectedTab.value, true);\n}\n\nconst goTo = (target: 'first' | 'previous' | 'next' | 'last') => {\n\tvar nextTabIndex: number | null = null;\n\tswitch (target) {\n\t\tcase 'first':\n\t\t\tnextTabIndex = 0;\n\t\t\tbreak;\n\t\tcase 'previous':\n\t\t\tnextTabIndex =\n\t\t\t\t(currentTabIndex.value + props.items.length - 1) % props.items.length;\n\t\t\tbreak;\n\t\tcase 'next':\n\t\t\tnextTabIndex = (currentTabIndex.value + 1) % props.items.length;\n\t\t\tbreak;\n\t\tcase 'last':\n\t\t\tnextTabIndex = props.items.length - 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tif (nextTabIndex === null) {\n\t\tthrow new Error('Could not navigate to next tab');\n\t}\n\tif (props.items[nextTabIndex].disabled) return;\n\tconst targetKey = props.items[nextTabIndex].key;\n\tconst button: HTMLButtonElement | null = document.querySelector(\n\t\t`#${instanceid}_tab_${targetKey}`\n\t);\n\tbutton?.focus();\n\tonTabSelected(targetKey);\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\tif (props.disabled) return;\n\tif (event.key === 'ArrowRight') {\n\t\tgoTo('next');\n\t} else if (event.key === 'ArrowLeft') {\n\t\tgoTo('previous');\n\t} else if (event.key === 'Home') {\n\t\tevent.preventDefault();\n\t\tgoTo('first');\n\t} else if (event.key === 'End') {\n\t\tevent.preventDefault();\n\t\tgoTo('last');\n\t} else {\n\t\treturn;\n\t}\n};\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\tonTabSelected(value);\n\t\t}\n\t}\n);\n\nwatch(\n\t() => route.value?.query?.[props.querykey],\n\t(value) => {\n\t\tif (value && typeof value === 'string') {\n\t\t\tonTabSelected(value);\n\t\t}\n\t}\n);\n\nwatch(\n\tselectedTab,\n\tasync () => {\n\t\tif (tabs.value) {\n\t\t\tconst element = tabs.value.querySelector(\n\t\t\t\t`[role=tablist] .bb-tab__btn--active`\n\t\t\t);\n\t\t\tif (element) {\n\t\t\t\tawait nextTick();\n\t\t\t\telement.scrollIntoView({\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\tinline: 'nearest',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t{ flush: 'post' }\n);\n\ndefineExpose({\n\tisFirst,\n\tisLast,\n\tcurrent: selectedTab,\n\tcurrentIndex: currentTabIndex,\n\tgoTo,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTab';\n</style>\n"],"names":["props","__props","emit","__emit","route","useRoute","router","useRouter","tabs","ref","id","useId","instanceid","isInertia","_b","_a","getCurrentInstance","selectedTab","currentTabIndex","computed","el","isFirst","isLast","item","_d","_c","_f","_e","_g","firstSelectableTab","key","onTabSelected","tab","replace","url","wait","goTo","target","nextTabIndex","targetKey","button","onKeydown","event","watch","value","element","nextTick","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwIA,UAAMA,IAAQC,GAQRC,IAAOC,GA8BPC,IAAQC,KACRC,IAASC,KAETC,IAAOC,KAEPC,IAAKV,EAAM,MAAMW,IAAQ,GAAG,OAC5BC,IAAa,UAAUF,CAAE,IAIzBG,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAE3CG,IAAcR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O;AAAA,IAAA,GAGJE,EAAA;AAAA,MACZ,SAAA1B;AAAA,MACA,QAAAC;AAAA,MACA,SAASL;AAAA,MACT,cAAcC;AAAA,MACd,MAAAkB;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index100.js","sources":["../src/components/BbTab/BbTab.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:id=\"id\"\n\t\tref=\"tabs\"\n\t\tclass=\"bb-tab\"\n\t\t:class=\"{\n\t\t\t[`bb-tab--${direction}`]: true,\n\t\t\t'bb-tab--disabled': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-tab__label-boundary\">\n\t\t\t<span><slot name=\"header:prepend\" v-bind=\"scrollStatus\"></slot></span>\n\t\t\t<ul class=\"bb-tab__label-container\" role=\"tablist\" ref=\"tablist\">\n\t\t\t\t<li v-for=\"tab in items\" :key=\"tab.key\" role=\"presentation\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:id=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\t\t:aria-selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\tclass=\"bb-tab__btn\"\n\t\t\t\t\t\t:class=\"{ 'bb-tab__btn--active': selectedTab === tab.key }\"\n\t\t\t\t\t\t:disabled=\"tab.disabled || disabled\"\n\t\t\t\t\t\t:role=\"'tab'\"\n\t\t\t\t\t\t:tabindex=\"selectedTab === tab.key ? 0 : -1\"\n\t\t\t\t\t\t@click=\"onTabSelected(tab.key)\"\n\t\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t:name=\"`label-${tab.key}`\"\n\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-tab__label\">{{ tab.label }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<span><slot name=\"header:append\" v-bind=\"scrollStatus\"></slot></span>\n\t\t</div>\n\t\t<div class=\"bb-tab__panes-container\">\n\t\t\t<template v-for=\"tab in items\" :key=\"tab.key\">\n\t\t\t\t<section\n\t\t\t\t\tv-if=\"selectedTab === tab.key || eager || tab.eager\"\n\t\t\t\t\t:id=\"`${instanceid}_tabpanel_${tab.key}`\"\n\t\t\t\t\t:aria-labelledby=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\tclass=\"bb-tab__pane\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-tab__pane--shown': selectedTab === tab.key,\n\t\t\t\t\t}\"\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t:name=\"tab.key\"\n\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t></slot>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, getCurrentInstance, computed, nextTick } from 'vue';\nimport { useId } from '@/composables/useId';\nimport { useRoute } from '@/composables/useRoute';\nimport { useRouter } from '@/composables/useRouter';\nimport { wait } from '@/utilities/functions/wait';\nimport { useScroll } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbTabItem = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Used to render a tab even when not visible.\n\t * It's useful if you want the content of a tab in the DOM\n\t * immediately rendered\n\t * even when not visible for SEO purposes.\n\t */\n\teager?: boolean;\n\t/**\n\t * String that identifies the tab.\n\t */\n\tkey: string;\n\t/**\n\t * Label to use as the tab text.\n\t */\n\tlabel?: string;\n};\n\nexport type BbTabProps = Pick<CommonProps, 'disabled' | 'eager' | 'id'> & {\n\t/**\n\t * Direction of the tabs component\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\t/**\n\t * Array of items that define the tabs in the component.\n\t */\n\titems: BbTabItem[];\n\t/**\n\t * The current tab. Used by v-model.\n\t */\n\tmodelValue?: null | BbTabItem['key'];\n\t/**\n\t * Synchronizes the current tab with the url.\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Defines the query key to reference for maintaining navigation\n\t */\n\tquerykey?: string;\n};\n\nconst props = withDefaults(defineProps<BbTabProps>(), {\n\tdirection: 'horizontal',\n\tquerykey: 'tab',\n});\n\nexport type BbTabEvents = {\n\t(e: 'update:modelValue', value: (typeof props.items)[number]['key']): void;\n};\nconst emit = defineEmits<BbTabEvents>();\n\ntype BbStepSlots = {\n\t'header:prepend'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\t'header:append'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\tlabel?: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n} & {\n\t[key: string]: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n};\n\ndefineSlots<BbStepSlots>();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst tabs = ref();\n\nconst id = props.id ?? useId().id.value;\nconst instanceid = `bb-tab_${id}`;\n\nconst tablist = ref();\nconst { isScrolling, arrivedState } = useScroll(tablist);\nconst scrollStatus = computed(() => ({\n\tisScrolling: isScrolling.value,\n\tleft: arrivedState.left,\n\tright: arrivedState.right,\n}));\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\nconst selectedTab = ref<BbTabItem['key'] | null>(null);\n\nconst currentTabIndex = computed(() =>\n\tprops.items.findIndex((el) => el.key === selectedTab.value)\n);\nconst isFirst = computed(() => currentTabIndex.value === 0);\nconst isLast = computed(() => currentTabIndex.value === props.items.length - 1);\n\nprops.items.forEach((item) => {\n\tif (!item.key) {\n\t\tconsole.error(`A tab item has no key`, item);\n\t\tthrow new Error('A tab item has no key ' + JSON.stringify(item));\n\t}\n});\n\n/* \nThis section retrieves the current tab that should be selected\n*/\n// Retrieve tab from url on load for vue apps\nif (props.navigation && route.value?.query?.[props.querykey]) {\n\tselectedTab.value = route.value?.query?.[props.querykey] as string;\n\t// Retrieve tab from url on load for inertia app\n} else if (\n\tprops.navigation &&\n\tisInertia &&\n\tglobalThis?.location?.href &&\n\tnew URL(globalThis.location.href).searchParams.get(props.querykey)\n) {\n\tselectedTab.value = new URL(globalThis.location.href).searchParams.get(\n\t\tprops.querykey\n\t) as string;\n\t// Else whatever tab is passed first\n} else if (props.modelValue) {\n\tselectedTab.value = props.modelValue;\n\t// Else whatever tab is passed first\n} else if (props.items[0]) {\n\tconst firstSelectableTab = props.items.find((item) => !item.disabled);\n\tif (!firstSelectableTab) {\n\t\tthrow new Error(\n\t\t\t'No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected.'\n\t\t);\n\t}\n\tconst key = firstSelectableTab.key;\n\tselectedTab.value = key;\n}\n/* \nOnce the current tab is found update external variables\n*/\n\nconst onTabSelected = async (tab: BbTabItem['key'], replace = false) => {\n\t/* For Vue or Nuxt context */\n\tif (\n\t\tprops.navigation &&\n\t\troute.value &&\n\t\troute.value?.query?.[props.querykey] !== tab\n\t) {\n\t\trouter?.push({\n\t\t\t...route,\n\t\t\tquery: { ...route.value?.query, [props.querykey]: tab },\n\t\t\treplace,\n\t\t});\n\t\t/* Inertia context */\n\t} else if (\n\t\tprops.navigation &&\n\t\tisInertia &&\n\t\tglobalThis?.location?.href &&\n\t\tnew URL(globalThis.location.href).searchParams.get(props.querykey) !== tab\n\t) {\n\t\tconst url = new URL(globalThis.location.href);\n\t\turl.searchParams.set(props.querykey, tab);\n\t\twait(0).then(() => {\n\t\t\tif (replace) {\n\t\t\t\thistory.replaceState({}, '', url.toString());\n\t\t\t} else {\n\t\t\t\thistory.pushState({}, '', url.toString());\n\t\t\t}\n\t\t});\n\t}\n\tif (props.modelValue !== tab) {\n\t\temit('update:modelValue', tab);\n\t}\n\tselectedTab.value = tab;\n};\n\nif (selectedTab.value) {\n\tonTabSelected(selectedTab.value, true);\n}\n\nconst goTo = (target: 'first' | 'previous' | 'next' | 'last') => {\n\tvar nextTabIndex: number | null = null;\n\tswitch (target) {\n\t\tcase 'first':\n\t\t\tnextTabIndex = 0;\n\t\t\tbreak;\n\t\tcase 'previous':\n\t\t\tnextTabIndex =\n\t\t\t\t(currentTabIndex.value + props.items.length - 1) % props.items.length;\n\t\t\tbreak;\n\t\tcase 'next':\n\t\t\tnextTabIndex = (currentTabIndex.value + 1) % props.items.length;\n\t\t\tbreak;\n\t\tcase 'last':\n\t\t\tnextTabIndex = props.items.length - 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tif (nextTabIndex === null) {\n\t\tthrow new Error('Could not navigate to next tab');\n\t}\n\tif (props.items[nextTabIndex].disabled) return;\n\tconst targetKey = props.items[nextTabIndex].key;\n\tconst button: HTMLButtonElement | null = document.querySelector(\n\t\t`#${instanceid}_tab_${targetKey}`\n\t);\n\tbutton?.focus();\n\tonTabSelected(targetKey);\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\tif (props.disabled) return;\n\tif (event.key === 'ArrowRight') {\n\t\tgoTo('next');\n\t} else if (event.key === 'ArrowLeft') {\n\t\tgoTo('previous');\n\t} else if (event.key === 'Home') {\n\t\tevent.preventDefault();\n\t\tgoTo('first');\n\t} else if (event.key === 'End') {\n\t\tevent.preventDefault();\n\t\tgoTo('last');\n\t} else {\n\t\treturn;\n\t}\n};\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\tonTabSelected(value);\n\t\t}\n\t}\n);\n\nwatch(\n\t() => route.value?.query?.[props.querykey],\n\t(value) => {\n\t\tif (value && typeof value === 'string') {\n\t\t\tonTabSelected(value);\n\t\t}\n\t}\n);\n\nwatch(\n\tselectedTab,\n\tasync () => {\n\t\tif (tabs.value) {\n\t\t\tconst element = tabs.value.querySelector(\n\t\t\t\t`[role=tablist] .bb-tab__btn--active`\n\t\t\t);\n\t\t\tif (element) {\n\t\t\t\tawait nextTick();\n\t\t\t\telement.scrollIntoView({\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\tinline: 'nearest',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t{ flush: 'post' }\n);\n\ndefineExpose({\n\tisFirst,\n\tisLast,\n\tcurrent: selectedTab,\n\tcurrentIndex: currentTabIndex,\n\tgoTo,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTab';\n</style>\n"],"names":["props","__props","emit","__emit","route","useRoute","router","useRouter","tabs","ref","id","useId","instanceid","tablist","isScrolling","arrivedState","useScroll","scrollStatus","computed","isInertia","_b","_a","getCurrentInstance","selectedTab","currentTabIndex","el","isFirst","isLast","item","_d","_c","_f","_e","_g","firstSelectableTab","key","onTabSelected","tab","replace","url","wait","goTo","target","nextTabIndex","targetKey","button","onKeydown","event","watch","value","element","nextTick","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2IA,UAAMA,IAAQC,GAQRC,IAAOC,GAwCPC,IAAQC,MACRC,IAASC,MAETC,IAAOC,KAEPC,IAAKV,EAAM,MAAMW,KAAQ,GAAG,OAC5BC,IAAa,UAAUF,CAAE,IAEzBG,IAAUJ,KACV,EAAE,aAAAK,GAAa,cAAAC,EAAa,IAAIC,GAAUH,CAAO,GACjDI,IAAeC,EAAS,OAAO;AAAA,MACpC,aAAaJ,EAAY;AAAA,MACzB,MAAMC,EAAa;AAAA,MACnB,OAAOA,EAAa;AAAA,IACnB,EAAA,GAIII,IAAY,CAAC,GAACC,KAAAC,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AAAA,YACP,QAAQ;AAAA,UAAA,CACR;AAAA,QAEH;AAAA,MACD;AAAA,MACA,EAAE,OAAO,OAAO;AAAA,IAAA,GAGJE,EAAA;AAAA,MACZ,SAAA1B;AAAA,MACA,QAAAC;AAAA,MACA,SAASJ;AAAA,MACT,cAAcC;AAAA,MACd,MAAAiB;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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 "./index243.js";
3
- import { clamp as he } from "./index197.js";
2
+ import { add as ye } from "./index230.js";
3
+ import { clamp as he } from "./index213.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 "./index207.js";
9
+ import { when as ve } from "./index203.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 "./index244.js";
5
- import "./index245.js";
4
+ import P from "./index228.js";
5
+ import "./index229.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 "./index241.js";
3
+ import B from "./index231.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 "./index212.js";
2
+ import { useFloating as G, arrow as J } from "./index215.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 "./index218.js";
8
- import { waitFor as W } from "./index214.js";
9
- import { autoUpdate as X, flip as Y, shift as Z } from "./index215.js";
7
+ import { throttle as v } from "./index198.js";
8
+ import { waitFor as W } from "./index200.js";
9
+ import { autoUpdate as X, flip as Y, shift as Z } from "./index217.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 "./index242.js";
2
+ import { flattenTree as P } from "./index235.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 "./index206.js";
2
+ import { isCssColor as z } from "./index202.js";
3
3
  const g = ["innerHTML"], $ = /* @__PURE__ */ m({
4
4
  __name: "BbIcon",
5
5
  props: {