bitboss-ui 0.2.32 → 0.2.34

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 (259) hide show
  1. package/dist/index103.js +2 -2
  2. package/dist/index109.js +1 -1
  3. package/dist/index111.js +4 -4
  4. package/dist/index116.js +1 -1
  5. package/dist/index118.js +1 -1
  6. package/dist/index125.js +1 -1
  7. package/dist/index126.js +1 -1
  8. package/dist/index127.js +1 -1
  9. package/dist/index131.js +2 -2
  10. package/dist/index15.js +8 -8
  11. package/dist/index17.js +9 -9
  12. package/dist/index19.js +3 -3
  13. package/dist/index199.js +10 -295
  14. package/dist/index199.js.map +1 -1
  15. package/dist/index200.js +3 -16
  16. package/dist/index200.js.map +1 -1
  17. package/dist/index201.js +3 -16
  18. package/dist/index201.js.map +1 -1
  19. package/dist/index202.js +376 -17
  20. package/dist/index202.js.map +1 -1
  21. package/dist/index203.js +131 -17
  22. package/dist/index203.js.map +1 -1
  23. package/dist/index204.js +5 -29
  24. package/dist/index204.js.map +1 -1
  25. package/dist/index205.js +19 -8
  26. package/dist/index205.js.map +1 -1
  27. package/dist/index206.js +2 -2
  28. package/dist/index206.js.map +1 -1
  29. package/dist/index207.js +2 -235
  30. package/dist/index207.js.map +1 -1
  31. package/dist/index208.js +174 -3
  32. package/dist/index208.js.map +1 -1
  33. package/dist/index209.js +23 -35
  34. package/dist/index209.js.map +1 -1
  35. package/dist/index21.js +2 -2
  36. package/dist/index210.js +373 -6
  37. package/dist/index210.js.map +1 -1
  38. package/dist/index211.js +16 -10
  39. package/dist/index211.js.map +1 -1
  40. package/dist/index212.js +14 -376
  41. package/dist/index212.js.map +1 -1
  42. package/dist/index213.js +17 -131
  43. package/dist/index213.js.map +1 -1
  44. package/dist/index214.js +29 -2
  45. package/dist/index214.js.map +1 -1
  46. package/dist/index215.js +8 -174
  47. package/dist/index215.js.map +1 -1
  48. package/dist/index216.js +3 -23
  49. package/dist/index216.js.map +1 -1
  50. package/dist/index217.js +31 -369
  51. package/dist/index217.js.map +1 -1
  52. package/dist/index218.js +6 -3
  53. package/dist/index218.js.map +1 -1
  54. package/dist/index219.js +235 -3
  55. package/dist/index219.js.map +1 -1
  56. package/dist/index221.js +8 -27
  57. package/dist/index221.js.map +1 -1
  58. package/dist/index222.js +120 -16
  59. package/dist/index222.js.map +1 -1
  60. package/dist/index224.js +27 -8
  61. package/dist/index224.js.map +1 -1
  62. package/dist/index225.js +16 -120
  63. package/dist/index225.js.map +1 -1
  64. package/dist/index226.js +1 -1
  65. package/dist/index229.js +223 -5
  66. package/dist/index229.js.map +1 -1
  67. package/dist/index230.js +258 -2
  68. package/dist/index230.js.map +1 -1
  69. package/dist/index231.js +6 -2
  70. package/dist/index231.js.map +1 -1
  71. package/dist/index232.js +2 -2
  72. package/dist/index233.js +295 -2
  73. package/dist/index233.js.map +1 -1
  74. package/dist/index234.js +2 -2
  75. package/dist/index236.js +110 -428
  76. package/dist/index236.js.map +1 -1
  77. package/dist/index237.js +105 -88
  78. package/dist/index237.js.map +1 -1
  79. package/dist/index238.js +2 -200
  80. package/dist/index238.js.map +1 -1
  81. package/dist/index239.js +2 -224
  82. package/dist/index239.js.map +1 -1
  83. package/dist/index240.js +2 -258
  84. package/dist/index240.js.map +1 -1
  85. package/dist/index241.js +2 -2
  86. package/dist/index242.js +428 -110
  87. package/dist/index242.js.map +1 -1
  88. package/dist/index243.js +88 -105
  89. package/dist/index243.js.map +1 -1
  90. package/dist/index244.js +197 -157
  91. package/dist/index244.js.map +1 -1
  92. package/dist/index245.js +160 -2
  93. package/dist/index245.js.map +1 -1
  94. package/dist/index246.js +2 -69
  95. package/dist/index246.js.map +1 -1
  96. package/dist/index248.js +69 -2
  97. package/dist/index248.js.map +1 -1
  98. package/dist/index249.js +14 -37
  99. package/dist/index249.js.map +1 -1
  100. package/dist/index250.js +38 -2
  101. package/dist/index250.js.map +1 -1
  102. package/dist/index251.js +2 -2
  103. package/dist/index251.js.map +1 -1
  104. package/dist/index252.js +2 -15
  105. package/dist/index252.js.map +1 -1
  106. package/dist/index253.js +2 -3
  107. package/dist/index253.js.map +1 -1
  108. package/dist/index254.js +3 -2
  109. package/dist/index254.js.map +1 -1
  110. package/dist/index255.js +2 -2
  111. package/dist/index255.js.map +1 -1
  112. package/dist/index256.js +5 -0
  113. package/dist/index256.js.map +1 -0
  114. package/dist/index29.js +1 -1
  115. package/dist/index31.js +306 -292
  116. package/dist/index31.js.map +1 -1
  117. package/dist/index65.js +5 -5
  118. package/dist/index69.js +2 -2
  119. package/dist/index72.js +1 -1
  120. package/dist/index75.js +1 -1
  121. package/dist/index79.js +4 -4
  122. package/dist/index91.js +9 -7
  123. package/dist/index91.js.map +1 -1
  124. package/dist/{components → src/components}/BaseSelect/BaseSelect.vue.d.ts +13 -6
  125. package/dist/{components → src/components}/BbSelect/BbSelect.vue.d.ts +13 -6
  126. package/dist/{components → src/components}/BbTab/BbTab.vue.d.ts +5 -5
  127. package/dist/style.css +1 -1
  128. package/package.json +1 -1
  129. package/dist/{components → src/components}/BaseButton/BaseButton.vue.d.ts +0 -0
  130. package/dist/{components → src/components}/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -0
  131. package/dist/{components → src/components}/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -0
  132. package/dist/{components → src/components}/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -1
  133. package/dist/{components → src/components}/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -0
  134. package/dist/{components → src/components}/BaseDialog/BaseDialog.vue.d.ts +3 -3
  135. package/dist/{components → src/components}/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -0
  136. package/dist/{components → src/components}/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -0
  137. package/dist/{components → src/components}/BaseRadio/BaseRadio.vue.d.ts +0 -0
  138. package/dist/{components → src/components}/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -0
  139. package/dist/{components → src/components}/BaseRating/BaseRating.vue.d.ts +0 -0
  140. package/dist/{components → src/components}/BaseSlider/BaseSlider.vue.d.ts +2 -2
  141. package/dist/{components → src/components}/BaseSwitch/BaseSwitch.vue.d.ts +0 -0
  142. package/dist/{components → src/components}/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -0
  143. package/dist/{components → src/components}/BaseTag/BaseTag.vue.d.ts +0 -0
  144. package/dist/{components → src/components}/BaseTextInput/BaseTextInput.vue.d.ts +0 -0
  145. package/dist/{components → src/components}/BaseTextarea/BaseTextarea.vue.d.ts +0 -0
  146. package/dist/{components → src/components}/BbAccordion/BbAccordion.vue.d.ts +0 -0
  147. package/dist/{components → src/components}/BbAlert/BbAlert.vue.d.ts +0 -0
  148. package/dist/{components → src/components}/BbAvatar/BbAvatar.vue.d.ts +0 -0
  149. package/dist/{components → src/components}/BbBadge/BbBadge.vue.d.ts +0 -0
  150. package/dist/{components → src/components}/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -0
  151. package/dist/{components → src/components}/BbButton/BbButton.vue.d.ts +0 -0
  152. package/dist/{components → src/components}/BbCheckbox/BbCheckbox.vue.d.ts +0 -0
  153. package/dist/{components → src/components}/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +0 -0
  154. package/dist/{components → src/components}/BbChip/BbChip.vue.d.ts +0 -0
  155. package/dist/{components → src/components}/BbCollapsible/BbCollapsible.vue.d.ts +0 -0
  156. package/dist/{components → src/components}/BbConfirm/BbConfirm.vue.d.ts +0 -0
  157. package/dist/{components → src/components}/BbDatePickerInput/BbDatePickerInput.vue.d.ts +0 -0
  158. package/dist/{components → src/components}/BbDialog/BbDialog.vue.d.ts +2 -2
  159. package/dist/{components → src/components}/BbDropdown/BbDropdown.vue.d.ts +1 -1
  160. package/dist/{components → src/components}/BbDropdownButton/BbDropdownButton.vue.d.ts +0 -0
  161. package/dist/{components → src/components}/BbDropzone/BbDropzone.vue.d.ts +0 -0
  162. package/dist/{components → src/components}/BbHover/BbHover.vue.d.ts +0 -0
  163. package/dist/{components → src/components}/BbIcon/BbIcon.vue.d.ts +0 -0
  164. package/dist/{components → src/components}/BbIntersection/BbIntersection.vue.d.ts +1 -1
  165. package/dist/{components → src/components}/BbNumberInput/BbNumberInput.vue.d.ts +0 -0
  166. package/dist/{components → src/components}/BbOffCanvas/BbOffCanvas.vue.d.ts +4 -4
  167. package/dist/{components → src/components}/BbPagination/BbPagination.vue.d.ts +0 -0
  168. package/dist/{components → src/components}/BbPopover/BbPopover.vue.d.ts +3 -3
  169. package/dist/{components → src/components}/BbProgress/BbProgress.vue.d.ts +0 -0
  170. package/dist/{components → src/components}/BbRadio/BbRadio.vue.d.ts +0 -0
  171. package/dist/{components → src/components}/BbRadioGroup/BbRadioGroup.vue.d.ts +0 -0
  172. package/dist/{components → src/components}/BbRating/BbRating.vue.d.ts +0 -0
  173. package/dist/{components → src/components}/BbRatio/BbRatio.vue.d.ts +0 -0
  174. package/dist/{components → src/components}/BbSlider/BbSlider.vue.d.ts +1 -1
  175. package/dist/{components → src/components}/BbSmoothHeight/BbSmoothHeight.vue.d.ts +2 -2
  176. package/dist/{components → src/components}/BbSpinner/BbSpinner.vue.d.ts +0 -0
  177. package/dist/{components → src/components}/BbSwitch/BbSwitch.vue.d.ts +0 -0
  178. package/dist/{components → src/components}/BbSwitchGroup/BbSwitchGroup.vue.d.ts +0 -0
  179. package/dist/{components → src/components}/BbTable/BbTable.vue.d.ts +0 -0
  180. package/dist/{components → src/components}/BbTable/types.d.ts +0 -0
  181. package/dist/{components → src/components}/BbTag/BbTag.vue.d.ts +0 -0
  182. package/dist/{components → src/components}/BbTextInput/BbTextInput.vue.d.ts +0 -0
  183. package/dist/{components → src/components}/BbTextarea/BbTextarea.vue.d.ts +0 -0
  184. package/dist/{components → src/components}/BbToast/BbToast.vue.d.ts +0 -0
  185. package/dist/{components → src/components}/BbToast/BbToastMessage.vue.d.ts +0 -0
  186. package/dist/{components → src/components}/BbTooltip/BbTooltip.vue.d.ts +2 -2
  187. /package/dist/{components → src/components}/BbTree/BbTree.vue.d.ts +0 -0
  188. /package/dist/{composables → src/composables}/useBroadcastChannelInstance.d.ts +0 -0
  189. /package/dist/{composables → src/composables}/useConfirm.d.ts +0 -0
  190. /package/dist/{composables → src/composables}/useCountdown.d.ts +0 -0
  191. /package/dist/{composables → src/composables}/useId.d.ts +0 -0
  192. /package/dist/{composables → src/composables}/useItemText.d.ts +0 -0
  193. /package/dist/{composables → src/composables}/useItemValue.d.ts +0 -0
  194. /package/dist/{composables → src/composables}/useOptions.d.ts +0 -0
  195. /package/dist/{composables → src/composables}/useRoute.d.ts +0 -0
  196. /package/dist/{composables → src/composables}/useRouter.d.ts +0 -0
  197. /package/dist/{composables → src/composables}/useToast.d.ts +0 -0
  198. /package/dist/{composables → src/composables}/useWizard.d.ts +0 -0
  199. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  200. /package/dist/{types → src/types}/Classes.d.ts +0 -0
  201. /package/dist/{types → src/types}/CommonProps.d.ts +0 -0
  202. /package/dist/{types → src/types}/ExtractGenericFromComputedRef.d.ts +0 -0
  203. /package/dist/{types → src/types}/ExtractGenericFromRef.d.ts +0 -0
  204. /package/dist/{types → src/types}/NestedKeyOf.d.ts +0 -0
  205. /package/dist/{types → src/types}/Simplify.d.ts +0 -0
  206. /package/dist/{types → src/types}/VoidHtmlElements.d.ts +0 -0
  207. /package/dist/{utilities → src/utilities}/functions/add.d.ts +0 -0
  208. /package/dist/{utilities → src/utilities}/functions/booleanishToBoolean.d.ts +0 -0
  209. /package/dist/{utilities → src/utilities}/functions/capitalize.d.ts +0 -0
  210. /package/dist/{utilities → src/utilities}/functions/clamp.d.ts +0 -0
  211. /package/dist/{utilities → src/utilities}/functions/cloneDeep.d.ts +0 -0
  212. /package/dist/{utilities → src/utilities}/functions/curry.d.ts +0 -0
  213. /package/dist/{utilities → src/utilities}/functions/debounce.d.ts +0 -0
  214. /package/dist/{utilities → src/utilities}/functions/deburr.d.ts +0 -0
  215. /package/dist/{utilities → src/utilities}/functions/drop.d.ts +0 -0
  216. /package/dist/{utilities → src/utilities}/functions/empty.d.ts +0 -0
  217. /package/dist/{utilities → src/utilities}/functions/findInTree.d.ts +0 -0
  218. /package/dist/{utilities → src/utilities}/functions/findRight.d.ts +0 -0
  219. /package/dist/{utilities → src/utilities}/functions/findRightIndex.d.ts +0 -0
  220. /package/dist/{utilities → src/utilities}/functions/flattenTree.d.ts +0 -0
  221. /package/dist/{utilities → src/utilities}/functions/flow.d.ts +0 -0
  222. /package/dist/{utilities → src/utilities}/functions/get.d.ts +0 -0
  223. /package/dist/{utilities → src/utilities}/functions/groupBy.d.ts +0 -0
  224. /package/dist/{utilities → src/utilities}/functions/gt.d.ts +0 -0
  225. /package/dist/{utilities → src/utilities}/functions/head.d.ts +0 -0
  226. /package/dist/{utilities → src/utilities}/functions/identity.d.ts +0 -0
  227. /package/dist/{utilities → src/utilities}/functions/includes.d.ts +0 -0
  228. /package/dist/{utilities → src/utilities}/functions/indexBy.d.ts +0 -0
  229. /package/dist/{utilities → src/utilities}/functions/initial.d.ts +0 -0
  230. /package/dist/{utilities → src/utilities}/functions/isCssColor.d.ts +0 -0
  231. /package/dist/{utilities → src/utilities}/functions/isNil.d.ts +0 -0
  232. /package/dist/{utilities → src/utilities}/functions/isNotNil.d.ts +0 -0
  233. /package/dist/{utilities → src/utilities}/functions/last.d.ts +0 -0
  234. /package/dist/{utilities → src/utilities}/functions/lt.d.ts +0 -0
  235. /package/dist/{utilities → src/utilities}/functions/makeUrl.d.ts +0 -0
  236. /package/dist/{utilities → src/utilities}/functions/mapKeys.d.ts +0 -0
  237. /package/dist/{utilities → src/utilities}/functions/mapValues.d.ts +0 -0
  238. /package/dist/{utilities → src/utilities}/functions/matchesPropertyInsensitive.d.ts +0 -0
  239. /package/dist/{utilities → src/utilities}/functions/mean.d.ts +0 -0
  240. /package/dist/{utilities → src/utilities}/functions/merge.d.ts +0 -0
  241. /package/dist/{utilities → src/utilities}/functions/millisecondsTo.d.ts +0 -0
  242. /package/dist/{utilities → src/utilities}/functions/negate.d.ts +0 -0
  243. /package/dist/{utilities → src/utilities}/functions/noop.d.ts +0 -0
  244. /package/dist/{utilities → src/utilities}/functions/omit.d.ts +0 -0
  245. /package/dist/{utilities → src/utilities}/functions/overEvery.d.ts +0 -0
  246. /package/dist/{utilities → src/utilities}/functions/percentage.d.ts +0 -0
  247. /package/dist/{utilities → src/utilities}/functions/pick.d.ts +0 -0
  248. /package/dist/{utilities → src/utilities}/functions/pickBy.d.ts +0 -0
  249. /package/dist/{utilities → src/utilities}/functions/replace.d.ts +0 -0
  250. /package/dist/{utilities → src/utilities}/functions/replaceInTree.d.ts +0 -0
  251. /package/dist/{utilities → src/utilities}/functions/retry.d.ts +0 -0
  252. /package/dist/{utilities → src/utilities}/functions/roundToTheNearest.d.ts +0 -0
  253. /package/dist/{utilities → src/utilities}/functions/set.d.ts +0 -0
  254. /package/dist/{utilities → src/utilities}/functions/snakeCase.d.ts +0 -0
  255. /package/dist/{utilities → src/utilities}/functions/throttle.d.ts +0 -0
  256. /package/dist/{utilities → src/utilities}/functions/tryTo.d.ts +0 -0
  257. /package/dist/{utilities → src/utilities}/functions/wait.d.ts +0 -0
  258. /package/dist/{utilities → src/utilities}/functions/waitFor.d.ts +0 -0
  259. /package/dist/{utilities → src/utilities}/functions/when.d.ts +0 -0
package/dist/index245.js CHANGED
@@ -1,5 +1,163 @@
1
- const e = "";
1
+ import { defineComponent as K, ref as s, computed as y, openBlock as p, createElementBlock as m, normalizeClass as g, renderSlot as v, createElementVNode as k, Fragment as E, renderList as C, toDisplayString as B, createBlock as S, withDirectives as z, mergeProps as H, vModelDynamic as J } from "vue";
2
+ import { clamp as P } from "./index196.js";
3
+ import { drop as q } from "./index256.js";
4
+ import { isNil as R } from "./index120.js";
5
+ import { isNotNil as w } from "./index124.js";
6
+ import { wait as L } from "./index122.js";
7
+ import U from "./index115.js";
8
+ import "./index158.js";
9
+ const j = { class: "bb-base-tag__input-container" }, G = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], te = /* @__PURE__ */ K({
10
+ __name: "BaseTag",
11
+ props: {
12
+ autocomplete: {},
13
+ autofocus: {},
14
+ comma: { type: Boolean },
15
+ disabled: { type: Boolean },
16
+ divider: { default: "Enter" },
17
+ hasErrors: { type: Boolean },
18
+ id: {},
19
+ modelValue: {},
20
+ multiple: { type: Boolean, default: !0 },
21
+ name: {},
22
+ placeholder: {},
23
+ readonly: {}
24
+ },
25
+ emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
26
+ setup(N, { emit: I }) {
27
+ const a = N, u = I;
28
+ if (a.multiple && !Array.isArray(a.modelValue))
29
+ throw new Error('Multiple is set to "true" but modelValue is not an array.');
30
+ const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
31
+ () => [].concat(a.modelValue).filter(w)
32
+ ), h = y(() => {
33
+ let e = {};
34
+ return o.value.forEach((n, r) => {
35
+ e[JSON.stringify(n)] = r;
36
+ }), {
37
+ get: (n) => e[JSON.stringify(n)]
38
+ };
39
+ }), f = s(!1), l = s(null), A = (e) => {
40
+ if (u("keyup", e), a.readonly || a.disabled) {
41
+ e.preventDefault();
42
+ return;
43
+ }
44
+ if (e.key === a.divider) {
45
+ if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
46
+ return;
47
+ l.value = null;
48
+ const n = h.value.get(t.value);
49
+ R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
50
+ } else if (e.key === "ArrowLeft")
51
+ l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
52
+ else if (e.key === "ArrowRight")
53
+ l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
54
+ else if (e.key === "Backspace") {
55
+ if (t.value)
56
+ return;
57
+ w(l.value) ? (b(l.value), l.value = P(
58
+ l.value,
59
+ 0,
60
+ o.value.length - 2
61
+ ), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
62
+ } else
63
+ (e.key === "Tab" || e.key === "Escape") && (l.value = null);
64
+ }, F = (e) => {
65
+ a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
66
+ }, b = (e) => {
67
+ if (typeof e == "number")
68
+ a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
69
+ else {
70
+ const n = h.value.get(t.value);
71
+ b(n);
72
+ }
73
+ }, M = (e) => {
74
+ u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
75
+ }, O = (e) => {
76
+ u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
77
+ }, _ = (e) => {
78
+ if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
79
+ u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
80
+ t.value = "";
81
+ });
82
+ return;
83
+ }
84
+ }, V = (e) => {
85
+ if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
86
+ u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
87
+ t.value = "";
88
+ });
89
+ return;
90
+ }
91
+ }, T = {
92
+ onBlur: (e) => u("blur", e),
93
+ onChange: (e) => u("change", e),
94
+ onKeydown: (e) => {
95
+ e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
96
+ },
97
+ onInput: (e) => u("input", e)
98
+ };
99
+ return (e, n) => (p(), m("span", {
100
+ ref_key: "outerContainer",
101
+ ref: i,
102
+ class: g({
103
+ "bb-base-tag": !0,
104
+ "bb-base-tag--active": f.value,
105
+ "bb-base-tag--disabled": e.disabled,
106
+ "bb-base-tag--errors": e.hasErrors,
107
+ "bb-base-tag--readonly": e.readonly
108
+ }),
109
+ onClick: O
110
+ }, [
111
+ v(e.$slots, "prepend-outer"),
112
+ k("span", {
113
+ ref_key: "innerContainer",
114
+ ref: $,
115
+ class: "bb-base-tag__inner-container"
116
+ }, [
117
+ v(e.$slots, "prepend"),
118
+ k("span", j, [
119
+ e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
120
+ key: r,
121
+ class: g({
122
+ "bb-base-tag__selected": !0,
123
+ "bb-base-tag__selected--comma": !0,
124
+ "bb-base-tag__selected--focused": d === l.value
125
+ })
126
+ }, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
127
+ key: r,
128
+ class: g({
129
+ "bb-base-tag__selected": !0,
130
+ "bb-base-tag__selected--chip": !0,
131
+ "bb-base-tag__selected--focused": d === l.value
132
+ }),
133
+ clearable: !0,
134
+ text: r,
135
+ "onClick:clear": (Q) => b(d)
136
+ }, null, 8, ["class", "text", "onClick:clear"]))), 128)),
137
+ z(k("input", H({ id: e.id }, T, {
138
+ ref_key: "input",
139
+ ref: c,
140
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
141
+ autocomplete: e.autocomplete,
142
+ autofocus: e.autofocus,
143
+ class: "bb-base-tag__text-input",
144
+ disabled: e.disabled,
145
+ placeholder: D.value,
146
+ readonly: e.readonly,
147
+ type: "text",
148
+ onFocus: M,
149
+ onKeyup: A
150
+ }), null, 16, G), [
151
+ [J, t.value]
152
+ ])
153
+ ]),
154
+ v(e.$slots, "append")
155
+ ], 512),
156
+ v(e.$slots, "append-outer")
157
+ ], 2));
158
+ }
159
+ });
2
160
  export {
3
- e as default
161
+ te as default
4
162
  };
5
163
  //# sourceMappingURL=index245.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index245.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index245.js","sources":["../src/components/BaseTag/BaseTag.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createBlock as _createBlock, vModelDynamic as _vModelDynamic, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-tag__input-container\" }\nconst _hoisted_2 = [\"id\", \"autocomplete\", \"autofocus\", \"disabled\", \"placeholder\", \"readonly\"]\n\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, ref } from 'vue';\nimport { drop } from '@/utilities/functions/drop';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { wait } from '@/utilities/functions/wait';\nimport BbChip from '../BbChip/BbChip.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseTagProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\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 * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\n\t(e: 'change', event: Event): void;\n\n\t(e: 'click', event: MouseEvent): void;\n\n\t(e: 'duplicate', string: string): void;\n\n\t(e: 'focus', event: FocusEvent): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'input', event: Event): void;\n\n\t(e: 'keydown', event: KeyboardEvent): void;\n\n\t(e: 'keyup', event: KeyboardEvent): void;\n\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type BaseTagSlots = {\n\tappend?: (props: {}) => any;\n\n\t'append-outer'?: (props: {}) => any;\n\n\tprepend?: (props: {}) => any;\n\n\t'prepend-outer'?: (props: {}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseTag',\n props: {\n autocomplete: {},\n autofocus: {},\n comma: { type: Boolean },\n disabled: { type: Boolean },\n divider: { default: 'Enter' },\n hasErrors: { type: Boolean },\n id: {},\n modelValue: {},\n multiple: { type: Boolean, default: true },\n name: {},\n placeholder: {},\n readonly: {}\n },\n emits: [\"blur\", \"change\", \"click\", \"duplicate\", \"focus\", \"inactive\", \"input\", \"keydown\", \"keyup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>('');\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n\t[].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n\tlet map: { [key: string]: number } = {};\n\tmodelValueNormalized.value.forEach((value: any, index: number) => {\n\t\tmap[JSON.stringify(value)] = index;\n\t});\n\treturn {\n\t\tget: (value: any) => map[JSON.stringify(value)],\n\t};\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\tif (event.key === props.divider) {\n\t\tif (query.value[query.value.length - 1] === event.key) {\n\t\t\tquery.value = query.value.slice(0, query.value.length - 1);\n\t\t}\n\t\tif (!query.value) return;\n\t\tfocusedIndex.value = null;\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tif (isNil(currentIndex)) selectValue(query.value);\n\t\telse emit('duplicate', query.value);\n\t\tquery.value = '';\n\t} else if (event.key === 'ArrowLeft') {\n\t\tif (focusedIndex.value === null)\n\t\t\tfocusedIndex.value = modelValueNormalized.value.length - 1;\n\t\telse if (focusedIndex.value === 0) focusedIndex.value = null;\n\t\telse focusedIndex.value--;\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (focusedIndex.value === null) focusedIndex.value = 1;\n\t\telse if (focusedIndex.value === modelValueNormalized.value.length - 1)\n\t\t\tfocusedIndex.value = null;\n\t\telse focusedIndex.value++;\n\t} else if (event.key === 'Backspace') {\n\t\tif (query.value) return;\n\t\tif (isNotNil(focusedIndex.value)) {\n\t\t\tremoveValue(focusedIndex.value);\n\t\t\tfocusedIndex.value = clamp(\n\t\t\t\tfocusedIndex.value,\n\t\t\t\t0,\n\t\t\t\tmodelValueNormalized.value.length - 2\n\t\t\t);\n\t\t\tif (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n\t\t} else focusedIndex.value = modelValueNormalized.value.length - 1;\n\t} else if (event.key === 'Tab' || event.key === 'Escape') {\n\t\tfocusedIndex.value = null;\n\t}\n};\n\nconst selectValue = (text: string) => {\n\tif (props.multiple) emit('update:modelValue', props.modelValue.concat(text));\n\telse emit('update:modelValue', text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n\tif (typeof indexOrString === 'number') {\n\t\tif (props.multiple)\n\t\t\temit('update:modelValue', drop(props.modelValue, 1, indexOrString));\n\t\telse emit('update:modelValue', null);\n\t} else {\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tremoveValue(currentIndex);\n\t}\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tactive.value = true;\n\tdocument.addEventListener('click', onClickOutside);\n\tdocument.addEventListener('focusin', onFocusOutside);\n\tif (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('click', onClickOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('focusin', onFocusOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => {\n\t\tif (event.key === 'Enter' && props.divider === 'Enter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\temit('keydown', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n ref_key: \"outerContainer\",\n ref: outerContainer,\n class: _normalizeClass({\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active.value,\n\t\t\t'bb-base-tag--disabled': _ctx.disabled,\n\t\t\t'bb-base-tag--errors': _ctx.hasErrors,\n\t\t\t'bb-base-tag--readonly': _ctx.readonly,\n\t\t}),\n onClick: onOuterContainerClick\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n ref_key: \"innerContainer\",\n ref: innerContainer,\n class: \"bb-base-tag__inner-container\"\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _createElementVNode(\"span\", _hoisted_1, [\n (_ctx.comma)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: option,\n class: _normalizeClass({\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--comma': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex.value,\n\t\t\t\t\t\t})\n }, _toDisplayString(option) + _toDisplayString(index < modelValueNormalized.value.length - 1 ? ',' : ''), 3))\n }), 128))\n : (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(modelValueNormalized.value, (option, index) => {\n return (_openBlock(), _createBlock(BbChip, {\n key: option,\n class: _normalizeClass({\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--chip': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex.value,\n\t\t\t\t\t\t}),\n clearable: true,\n text: option,\n \"onClick:clear\": ($event: any) => (removeValue(index))\n }, null, 8, [\"class\", \"text\", \"onClick:clear\"]))\n }), 128)),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({ id: _ctx.id }, eventListeners, {\n ref_key: \"input\",\n ref: input,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((query).value = $event)),\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n class: 'bb-base-tag__text-input',\n disabled: _ctx.disabled,\n placeholder: computedPlaceholder.value,\n readonly: _ctx.readonly,\n type: 'text',\n onFocus: onInputFocus,\n onKeyup: onInputKeyup\n }), null, 16, _hoisted_2), [\n [_vModelDynamic, query.value]\n ])\n ]),\n _renderSlot(_ctx.$slots, \"append\")\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\")\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","props","emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_Fragment","_renderList","option","_toDisplayString","_createBlock","BbChip","$event","_withDirectives","_mergeProps","_vModelDynamic"],"mappings":";;;;;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,kCACtBC,IAAa,CAAC,MAAM,gBAAgB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A,CAC7B;AAAA,QAAA,CACF;AAAA,QACDgC,EAAYL,EAAK,QAAQ,QAAQ;AAAA,SAChC,GAAG;AAAA,MACNK,EAAYL,EAAK,QAAQ,cAAc;AAAA,OACtC,CAAC;AAAA,EAEN;AAEA,CAAC;"}
package/dist/index246.js CHANGED
@@ -1,72 +1,5 @@
1
- import { defineComponent as d, openBlock as s, createElementBlock as a, normalizeClass as b, createElementVNode as t, createBlock as i, createCommentVNode as o, toDisplayString as l, withCtx as p } from "vue";
2
- import h from "./index9.js";
3
- import "./index10.js";
4
- import u from "./index117.js";
5
- import "./index169.js";
6
- const k = { class: "bb-toast-message__icon-container" }, g = { class: "bb-toast-message__content" }, f = {
7
- key: 0,
8
- class: "bb-toast-message__title"
9
- }, C = { class: "bb-toast-message__text" }, v = { class: "bb-toast-message__close" }, w = /* @__PURE__ */ t("svg", {
10
- fill: "none",
11
- viewBox: "0 0 24 24",
12
- xmlns: "http://www.w3.org/2000/svg"
13
- }, [
14
- /* @__PURE__ */ t("path", {
15
- d: "M23 23L1 1M23 1L1 23",
16
- stroke: "currentColor",
17
- "stroke-linecap": "round",
18
- "stroke-width": "2"
19
- })
20
- ], -1), N = /* @__PURE__ */ d({
21
- __name: "BbToastMessage",
22
- props: {
23
- title: {},
24
- text: {},
25
- icon: {},
26
- theme: { default: "default" },
27
- id: {},
28
- showClose: { type: Boolean }
29
- },
30
- emits: ["click:close"],
31
- setup(n, { emit: c }) {
32
- const r = n, m = c, _ = () => {
33
- m("click:close", r.id);
34
- };
35
- return (e, y) => (s(), a("div", {
36
- "aria-atomic": "true",
37
- "aria-live": "assertive",
38
- "aria-role": "alert",
39
- class: b(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
40
- }, [
41
- t("div", k, [
42
- e.icon ? (s(), i(u, {
43
- key: 0,
44
- class: "bb-alert__icon",
45
- type: e.icon
46
- }, null, 8, ["type"])) : o("", !0)
47
- ]),
48
- t("div", g, [
49
- e.title ? (s(), a("p", f, l(e.title), 1)) : o("", !0),
50
- t("p", C, l(e.text), 1)
51
- ]),
52
- t("div", v, [
53
- e.showClose ? (s(), i(h, {
54
- key: 0,
55
- "aria-label": "Chiudi",
56
- block: "",
57
- class: "bb-toast-message__close-btn",
58
- onClick: _
59
- }, {
60
- default: p(() => [
61
- w
62
- ]),
63
- _: 1
64
- })) : o("", !0)
65
- ])
66
- ], 2));
67
- }
68
- });
1
+ const e = "";
69
2
  export {
70
- N as default
3
+ e as default
71
4
  };
72
5
  //# sourceMappingURL=index246.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index246.js","sources":["../src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, withCtx as _withCtx, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-toast-message__icon-container\" }\nconst _hoisted_2 = { class: \"bb-toast-message__content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"bb-toast-message__title\"\n}\nconst _hoisted_4 = { class: \"bb-toast-message__text\" }\nconst _hoisted_5 = { class: \"bb-toast-message__close\" }\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n], -1)\n\nimport type { Message } from '../../composables/useToast';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\n\ntype BbToastMessageEvents = {\n\t(e: 'click:close', id: Message['id']): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbToastMessage',\n props: {\n title: {},\n text: {},\n icon: {},\n theme: { default: 'default' },\n id: {},\n showClose: { type: Boolean }\n },\n emits: [\"click:close\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\nconst emit = __emit;\n\nconst onClickClose = () => {\n\temit('click:close', props.id);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"aria-atomic\": \"true\",\n \"aria-live\": \"assertive\",\n \"aria-role\": \"alert\",\n class: _normalizeClass([\"bb-toast-message\", { [`bb-toast-message--${_ctx.theme}`]: _ctx.theme }])\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.icon)\n ? (_openBlock(), _createBlock(BbIcon, {\n key: 0,\n class: \"bb-alert__icon\",\n type: _ctx.icon\n }, null, 8, [\"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"p\", _hoisted_4, _toDisplayString(_ctx.text), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n \"aria-label\": 'Chiudi',\n block: \"\",\n class: \"bb-toast-message__close-btn\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_6\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_main","_defineComponent","__props","__emit","props","emit","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","BbIcon","_createCommentVNode","_toDisplayString","BaseButton","_withCtx"],"mappings":";;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,sCACtBC,IAAa,EAAE,OAAO,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EAAoB,OAAOjB,GAAY;AAAA,QACpCY,EAAK,SACDE,EAAW,GAAGC,EAAoB,KAAKd,GAAYoB,EAAiBT,EAAK,KAAK,GAAG,CAAC,KACnFQ,EAAoB,IAAI,EAAI;AAAA,QAChCH,EAAoB,KAAKf,GAAYmB,EAAiBT,EAAK,IAAI,GAAG,CAAC;AAAA,MAAA,CACpE;AAAA,MACDK,EAAoB,OAAOd,GAAY;AAAA,QACpCS,EAAK,aACDE,KAAcI,EAAaI,GAAY;AAAA,UACtC,KAAK;AAAA,UACL,cAAc;AAAA,UACd,OAAO;AAAA,UACP,OAAO;AAAA,UACP,SAASX;AAAA,QAAA,GACR;AAAA,UACD,SAASY,EAAS,MAAM;AAAA,YACtBnB;AAAA,UAAA,CACD;AAAA,UACD,GAAG;AAAA,QAAA,CACJ,KACDgB,EAAoB,IAAI,EAAI;AAAA,MAAA,CACjC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index246.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index248.js CHANGED
@@ -1,5 +1,72 @@
1
- import e from "./index207.js";
1
+ import { defineComponent as d, openBlock as s, createElementBlock as a, normalizeClass as b, createElementVNode as t, createBlock as i, createCommentVNode as o, toDisplayString as l, withCtx as p } from "vue";
2
+ import h from "./index9.js";
3
+ import "./index10.js";
4
+ import u from "./index117.js";
5
+ import "./index169.js";
6
+ const k = { class: "bb-toast-message__icon-container" }, g = { class: "bb-toast-message__content" }, f = {
7
+ key: 0,
8
+ class: "bb-toast-message__title"
9
+ }, C = { class: "bb-toast-message__text" }, v = { class: "bb-toast-message__close" }, w = /* @__PURE__ */ t("svg", {
10
+ fill: "none",
11
+ viewBox: "0 0 24 24",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ t("path", {
15
+ d: "M23 23L1 1M23 1L1 23",
16
+ stroke: "currentColor",
17
+ "stroke-linecap": "round",
18
+ "stroke-width": "2"
19
+ })
20
+ ], -1), N = /* @__PURE__ */ d({
21
+ __name: "BbToastMessage",
22
+ props: {
23
+ title: {},
24
+ text: {},
25
+ icon: {},
26
+ theme: { default: "default" },
27
+ id: {},
28
+ showClose: { type: Boolean }
29
+ },
30
+ emits: ["click:close"],
31
+ setup(n, { emit: c }) {
32
+ const r = n, m = c, _ = () => {
33
+ m("click:close", r.id);
34
+ };
35
+ return (e, y) => (s(), a("div", {
36
+ "aria-atomic": "true",
37
+ "aria-live": "assertive",
38
+ "aria-role": "alert",
39
+ class: b(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
40
+ }, [
41
+ t("div", k, [
42
+ e.icon ? (s(), i(u, {
43
+ key: 0,
44
+ class: "bb-alert__icon",
45
+ type: e.icon
46
+ }, null, 8, ["type"])) : o("", !0)
47
+ ]),
48
+ t("div", g, [
49
+ e.title ? (s(), a("p", f, l(e.title), 1)) : o("", !0),
50
+ t("p", C, l(e.text), 1)
51
+ ]),
52
+ t("div", v, [
53
+ e.showClose ? (s(), i(h, {
54
+ key: 0,
55
+ "aria-label": "Chiudi",
56
+ block: "",
57
+ class: "bb-toast-message__close-btn",
58
+ onClick: _
59
+ }, {
60
+ default: p(() => [
61
+ w
62
+ ]),
63
+ _: 1
64
+ })) : o("", !0)
65
+ ])
66
+ ], 2));
67
+ }
68
+ });
2
69
  export {
3
- e as default
70
+ N as default
4
71
  };
5
72
  //# sourceMappingURL=index248.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index248.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index248.js","sources":["../src/components/BbToast/BbToastMessage.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, withCtx as _withCtx, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-toast-message__icon-container\" }\nconst _hoisted_2 = { class: \"bb-toast-message__content\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"bb-toast-message__title\"\n}\nconst _hoisted_4 = { class: \"bb-toast-message__text\" }\nconst _hoisted_5 = { class: \"bb-toast-message__close\" }\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n], -1)\n\nimport type { Message } from '../../composables/useToast';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\n\ntype BbToastMessageEvents = {\n\t(e: 'click:close', id: Message['id']): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbToastMessage',\n props: {\n title: {},\n text: {},\n icon: {},\n theme: { default: 'default' },\n id: {},\n showClose: { type: Boolean }\n },\n emits: [\"click:close\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\nconst emit = __emit;\n\nconst onClickClose = () => {\n\temit('click:close', props.id);\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"aria-atomic\": \"true\",\n \"aria-live\": \"assertive\",\n \"aria-role\": \"alert\",\n class: _normalizeClass([\"bb-toast-message\", { [`bb-toast-message--${_ctx.theme}`]: _ctx.theme }])\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n (_ctx.icon)\n ? (_openBlock(), _createBlock(BbIcon, {\n key: 0,\n class: \"bb-alert__icon\",\n type: _ctx.icon\n }, null, 8, [\"type\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.title)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString(_ctx.title), 1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"p\", _hoisted_4, _toDisplayString(_ctx.text), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_5, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n \"aria-label\": 'Chiudi',\n block: \"\",\n class: \"bb-toast-message__close-btn\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_6\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_sfc_main","_defineComponent","__props","__emit","props","emit","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createBlock","BbIcon","_createCommentVNode","_toDisplayString","BaseButton","_withCtx"],"mappings":";;;;;AAGA,MAAMA,IAAa,EAAE,OAAO,sCACtBC,IAAa,EAAE,OAAO,+BACtBC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,IAAa,EAAE,OAAO,4BACtBC,IAAa,EAAE,OAAO,6BACtBC,sBAA8C,OAAO;AAAA,EACzD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT,GAAG;AAAA,oBACgC,QAAQ;AAAA,IACvC,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAAA,CACjB;AACH,GAAG,EAAE,GAUuBC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,MAAM,CAAC;AAAA,IACP,MAAM,CAAC;AAAA,IACP,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,IAAI,CAAC;AAAA,IACL,WAAW,EAAE,MAAM,QAAQ;AAAA,EAC7B;AAAA,EACA,OAAO,CAAC,aAAa;AAAA,EAC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CHANGED
@@ -1,41 +1,18 @@
1
- function r() {
2
- this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
3
- for (let t = 0; t < arguments.length; t++)
4
- this.define(arguments[t]);
5
- this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
1
+ function r(t) {
2
+ return Object.prototype.toString.call(t).slice(8, -1);
3
+ }
4
+ function o(t) {
5
+ return r(t) === "Array";
6
+ }
7
+ function c(t) {
8
+ if (r(t) !== "Object")
9
+ return !1;
10
+ const e = Object.getPrototypeOf(t);
11
+ return !!e && e.constructor === Object && e === Object.prototype;
6
12
  }
7
- r.prototype.define = function(t, n) {
8
- for (let e in t) {
9
- let o = t[e].map(function(s) {
10
- return s.toLowerCase();
11
- });
12
- e = e.toLowerCase();
13
- for (let s = 0; s < o.length; s++) {
14
- const i = o[s];
15
- if (i[0] !== "*") {
16
- if (!n && i in this._types)
17
- throw new Error(
18
- 'Attempt to change mapping for "' + i + '" extension from "' + this._types[i] + '" to "' + e + '". Pass `force=true` to allow this, otherwise remove "' + i + '" from the list of extensions for "' + e + '".'
19
- );
20
- this._types[i] = e;
21
- }
22
- }
23
- if (n || !this._extensions[e]) {
24
- const s = o[0];
25
- this._extensions[e] = s[0] !== "*" ? s : s.substr(1);
26
- }
27
- }
28
- };
29
- r.prototype.getType = function(t) {
30
- t = String(t);
31
- let n = t.replace(/^.*[/\\]/, "").toLowerCase(), e = n.replace(/^.*\./, "").toLowerCase(), o = n.length < t.length;
32
- return (e.length < n.length - 1 || !o) && this._types[e] || null;
33
- };
34
- r.prototype.getExtension = function(t) {
35
- return t = /^\s*([^;\s]*)/.test(t) && RegExp.$1, t && this._extensions[t.toLowerCase()] || null;
36
- };
37
- var h = r;
38
13
  export {
39
- h as M
14
+ r as getType,
15
+ o as isArray,
16
+ c as isPlainObject
40
17
  };
41
18
  //# sourceMappingURL=index249.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index249.js","sources":["../node_modules/mime/Mime.js"],"sourcesContent":["'use strict';\n\n/**\n * @param typeMap [Object] Map of MIME type -> Array[extensions]\n * @param ...\n */\nfunction Mime() {\n this._types = Object.create(null);\n this._extensions = Object.create(null);\n\n for (let i = 0; i < arguments.length; i++) {\n this.define(arguments[i]);\n }\n\n this.define = this.define.bind(this);\n this.getType = this.getType.bind(this);\n this.getExtension = this.getExtension.bind(this);\n}\n\n/**\n * Define mimetype -> extension mappings. Each key is a mime-type that maps\n * to an array of extensions associated with the type. The first extension is\n * used as the default extension for the type.\n *\n * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});\n *\n * If a type declares an extension that has already been defined, an error will\n * be thrown. To suppress this error and force the extension to be associated\n * with the new type, pass `force`=true. Alternatively, you may prefix the\n * extension with \"*\" to map the type to extension, without mapping the\n * extension to the type.\n *\n * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});\n *\n *\n * @param map (Object) type definitions\n * @param force (Boolean) if true, force overriding of existing definitions\n */\nMime.prototype.define = function(typeMap, force) {\n for (let type in typeMap) {\n let extensions = typeMap[type].map(function(t) {\n return t.toLowerCase();\n });\n type = type.toLowerCase();\n\n for (let i = 0; i < extensions.length; i++) {\n const ext = extensions[i];\n\n // '*' prefix = not the preferred type for this extension. So fixup the\n // extension, and skip it.\n if (ext[0] === '*') {\n continue;\n }\n\n if (!force && (ext in this._types)) {\n throw new Error(\n 'Attempt to change mapping for \"' + ext +\n '\" extension from \"' + this._types[ext] + '\" to \"' + type +\n '\". Pass `force=true` to allow this, otherwise remove \"' + ext +\n '\" from the list of extensions for \"' + type + '\".'\n );\n }\n\n this._types[ext] = type;\n }\n\n // Use first extension as default\n if (force || !this._extensions[type]) {\n const ext = extensions[0];\n this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);\n }\n }\n};\n\n/**\n * Lookup a mime type based on extension\n */\nMime.prototype.getType = function(path) {\n path = String(path);\n let last = path.replace(/^.*[/\\\\]/, '').toLowerCase();\n let ext = last.replace(/^.*\\./, '').toLowerCase();\n\n let hasPath = last.length < path.length;\n let hasDot = ext.length < last.length - 1;\n\n return (hasDot || !hasPath) && this._types[ext] || null;\n};\n\n/**\n * Return file extension associated with a mime type\n */\nMime.prototype.getExtension = function(type) {\n type = /^\\s*([^;\\s]*)/.test(type) && RegExp.$1;\n return type && this._extensions[type.toLowerCase()] || null;\n};\n\nmodule.exports = Mime;\n"],"names":["Mime","i","typeMap","force","type","extensions","t","ext","path","last","hasPath","Mime_1"],"mappings":"AAMA,SAASA,IAAO;AACd,OAAK,SAAS,uBAAO,OAAO,IAAI,GAChC,KAAK,cAAc,uBAAO,OAAO,IAAI;AAErC,WAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA;AACpC,SAAK,OAAO,UAAUA,CAAC,CAAC;AAG1B,OAAK,SAAS,KAAK,OAAO,KAAK,IAAI,GACnC,KAAK,UAAU,KAAK,QAAQ,KAAK,IAAI,GACrC,KAAK,eAAe,KAAK,aAAa,KAAK,IAAI;AACjD;AAqBAD,EAAK,UAAU,SAAS,SAASE,GAASC,GAAO;AAC/C,WAASC,KAAQF,GAAS;AACxB,QAAIG,IAAaH,EAAQE,CAAI,EAAE,IAAI,SAASE,GAAG;AAC7C,aAAOA,EAAE;IACf,CAAK;AACD,IAAAF,IAAOA,EAAK;AAEZ,aAASH,IAAI,GAAGA,IAAII,EAAW,QAAQJ,KAAK;AAC1C,YAAMM,IAAMF,EAAWJ,CAAC;AAIxB,UAAIM,EAAI,CAAC,MAAM,KAIf;AAAA,YAAI,CAACJ,KAAUI,KAAO,KAAK;AACzB,gBAAM,IAAI;AAAA,YACR,oCAAoCA,IACpC,uBAAuB,KAAK,OAAOA,CAAG,IAAI,WAAWH,IACrD,2DAA2DG,IAC3D,wCAAwCH,IAAO;AAAA,UACzD;AAGM,aAAK,OAAOG,CAAG,IAAIH;AAAA;AAAA,IACpB;AAGD,QAAID,KAAS,CAAC,KAAK,YAAYC,CAAI,GAAG;AACpC,YAAMG,IAAMF,EAAW,CAAC;AACxB,WAAK,YAAYD,CAAI,IAAKG,EAAI,CAAC,MAAM,MAAOA,IAAMA,EAAI,OAAO,CAAC;AAAA,IAC/D;AAAA,EACF;AACH;AAKAP,EAAK,UAAU,UAAU,SAASQ,GAAM;AACtC,EAAAA,IAAO,OAAOA,CAAI;AAClB,MAAIC,IAAOD,EAAK,QAAQ,YAAY,EAAE,EAAE,eACpCD,IAAME,EAAK,QAAQ,SAAS,EAAE,EAAE,eAEhCC,IAAUD,EAAK,SAASD,EAAK;AAGjC,UAFaD,EAAI,SAASE,EAAK,SAAS,KAEtB,CAACC,MAAY,KAAK,OAAOH,CAAG,KAAK;AACrD;AAKAP,EAAK,UAAU,eAAe,SAASI,GAAM;AAC3C,SAAAA,IAAO,gBAAgB,KAAKA,CAAI,KAAK,OAAO,IACrCA,KAAQ,KAAK,YAAYA,EAAK,YAAW,CAAE,KAAK;AACzD;AAEA,IAAAO,IAAiBX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index249.js","sources":["../node_modules/is-what/dist/index.js"],"sourcesContent":["function getType(payload) {\n return Object.prototype.toString.call(payload).slice(8, -1);\n}\n\nfunction isAnyObject(payload) {\n return getType(payload) === \"Object\";\n}\n\nfunction isArray(payload) {\n return getType(payload) === \"Array\";\n}\n\nfunction isBlob(payload) {\n return getType(payload) === \"Blob\";\n}\n\nfunction isBoolean(payload) {\n return getType(payload) === \"Boolean\";\n}\n\nfunction isDate(payload) {\n return getType(payload) === \"Date\" && !isNaN(payload);\n}\n\nfunction isEmptyArray(payload) {\n return isArray(payload) && payload.length === 0;\n}\n\nfunction isPlainObject(payload) {\n if (getType(payload) !== \"Object\")\n return false;\n const prototype = Object.getPrototypeOf(payload);\n return !!prototype && prototype.constructor === Object && prototype === Object.prototype;\n}\n\nfunction isEmptyObject(payload) {\n return isPlainObject(payload) && Object.keys(payload).length === 0;\n}\n\nfunction isEmptyString(payload) {\n return payload === \"\";\n}\n\nfunction isError(payload) {\n return getType(payload) === \"Error\" || payload instanceof Error;\n}\n\nfunction isFile(payload) {\n return getType(payload) === \"File\";\n}\n\nfunction isFullArray(payload) {\n return isArray(payload) && payload.length > 0;\n}\n\nfunction isFullObject(payload) {\n return isPlainObject(payload) && Object.keys(payload).length > 0;\n}\n\nfunction isString(payload) {\n return getType(payload) === \"String\";\n}\n\nfunction isFullString(payload) {\n return isString(payload) && payload !== \"\";\n}\n\nfunction isFunction(payload) {\n return typeof payload === \"function\";\n}\n\nfunction isType(payload, type) {\n if (!(type instanceof Function)) {\n throw new TypeError(\"Type must be a function\");\n }\n if (!Object.prototype.hasOwnProperty.call(type, \"prototype\")) {\n throw new TypeError(\"Type is not a class\");\n }\n const name = type.name;\n return getType(payload) === name || Boolean(payload && payload.constructor === type);\n}\n\nfunction isInstanceOf(value, classOrClassName) {\n if (typeof classOrClassName === \"function\") {\n for (let p = value; p; p = Object.getPrototypeOf(p)) {\n if (isType(p, classOrClassName)) {\n return true;\n }\n }\n return false;\n } else {\n for (let p = value; p; p = Object.getPrototypeOf(p)) {\n if (getType(p) === classOrClassName) {\n return true;\n }\n }\n return false;\n }\n}\n\nfunction isMap(payload) {\n return getType(payload) === \"Map\";\n}\n\nfunction isNaNValue(payload) {\n return getType(payload) === \"Number\" && isNaN(payload);\n}\n\nfunction isNumber(payload) {\n return getType(payload) === \"Number\" && !isNaN(payload);\n}\n\nfunction isNegativeNumber(payload) {\n return isNumber(payload) && payload < 0;\n}\n\nfunction isNull(payload) {\n return getType(payload) === \"Null\";\n}\n\nfunction isOneOf(a, b, c, d, e) {\n return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);\n}\n\nfunction isUndefined(payload) {\n return getType(payload) === \"Undefined\";\n}\n\nconst isNullOrUndefined = isOneOf(isNull, isUndefined);\n\nfunction isObject(payload) {\n return isPlainObject(payload);\n}\n\nfunction isObjectLike(payload) {\n return isAnyObject(payload);\n}\n\nfunction isPositiveNumber(payload) {\n return isNumber(payload) && payload > 0;\n}\n\nfunction isSymbol(payload) {\n return getType(payload) === \"Symbol\";\n}\n\nfunction isPrimitive(payload) {\n return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);\n}\n\nfunction isPromise(payload) {\n return getType(payload) === \"Promise\";\n}\n\nfunction isRegExp(payload) {\n return getType(payload) === \"RegExp\";\n}\n\nfunction isSet(payload) {\n return getType(payload) === \"Set\";\n}\n\nfunction isWeakMap(payload) {\n return getType(payload) === \"WeakMap\";\n}\n\nfunction isWeakSet(payload) {\n return getType(payload) === \"WeakSet\";\n}\n\nexport { getType, isAnyObject, isArray, isBlob, isBoolean, isDate, isEmptyArray, isEmptyObject, isEmptyString, isError, isFile, isFullArray, isFullObject, isFullString, isFunction, isInstanceOf, isMap, isNaNValue, isNegativeNumber, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isOneOf, isPlainObject, isPositiveNumber, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isType, isUndefined, isWeakMap, isWeakSet };\n"],"names":["getType","payload","isArray","isPlainObject","prototype"],"mappings":"AAAA,SAASA,EAAQC,GAAS;AACxB,SAAO,OAAO,UAAU,SAAS,KAAKA,CAAO,EAAE,MAAM,GAAG,EAAE;AAC5D;AAMA,SAASC,EAAQD,GAAS;AACxB,SAAOD,EAAQC,CAAO,MAAM;AAC9B;AAkBA,SAASE,EAAcF,GAAS;AAC9B,MAAID,EAAQC,CAAO,MAAM;AACvB,WAAO;AACT,QAAMG,IAAY,OAAO,eAAeH,CAAO;AAC/C,SAAO,CAAC,CAACG,KAAaA,EAAU,gBAAgB,UAAUA,MAAc,OAAO;AACjF;","x_google_ignoreList":[0]}
package/dist/index250.js CHANGED
@@ -1,5 +1,41 @@
1
- var i = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
1
+ function r() {
2
+ this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
3
+ for (let t = 0; t < arguments.length; t++)
4
+ this.define(arguments[t]);
5
+ this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
6
+ }
7
+ r.prototype.define = function(t, n) {
8
+ for (let e in t) {
9
+ let o = t[e].map(function(s) {
10
+ return s.toLowerCase();
11
+ });
12
+ e = e.toLowerCase();
13
+ for (let s = 0; s < o.length; s++) {
14
+ const i = o[s];
15
+ if (i[0] !== "*") {
16
+ if (!n && i in this._types)
17
+ throw new Error(
18
+ 'Attempt to change mapping for "' + i + '" extension from "' + this._types[i] + '" to "' + e + '". Pass `force=true` to allow this, otherwise remove "' + i + '" from the list of extensions for "' + e + '".'
19
+ );
20
+ this._types[i] = e;
21
+ }
22
+ }
23
+ if (n || !this._extensions[e]) {
24
+ const s = o[0];
25
+ this._extensions[e] = s[0] !== "*" ? s : s.substr(1);
26
+ }
27
+ }
28
+ };
29
+ r.prototype.getType = function(t) {
30
+ t = String(t);
31
+ let n = t.replace(/^.*[/\\]/, "").toLowerCase(), e = n.replace(/^.*\./, "").toLowerCase(), o = n.length < t.length;
32
+ return (e.length < n.length - 1 || !o) && this._types[e] || null;
33
+ };
34
+ r.prototype.getExtension = function(t) {
35
+ return t = /^\s*([^;\s]*)/.test(t) && RegExp.$1, t && this._extensions[t.toLowerCase()] || null;
36
+ };
37
+ var h = r;
2
38
  export {
3
- i as s
39
+ h as M
4
40
  };
5
41
  //# sourceMappingURL=index250.js.map