@adyen/bento-vue3 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/@types/components.d.ts +6 -0
  2. package/dist/@types/packages/vue2/src/components/currency/currency.types.d.ts +18 -0
  3. package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +34 -211
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.types.d.ts +0 -1
  5. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +1 -1
  6. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -1
  7. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +1 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +10 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/composables/{use-selector.d.ts → use-selector/use-selector.d.ts} +2 -2
  10. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-sorter.d.ts +1 -2
  11. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +16 -1
  12. package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +43 -72
  13. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -1
  14. package/dist/@types/packages/vue2/src/components/layout/components/layout-row/layout-row.vue.d.ts +54 -0
  15. package/dist/@types/packages/vue2/src/components/layout/index.d.ts +3 -0
  16. package/dist/@types/packages/vue2/src/components/layout/layout.keys.d.ts +1 -0
  17. package/dist/@types/packages/vue2/src/components/layout/layout.types.d.ts +19 -0
  18. package/dist/@types/packages/vue2/src/components/layout/layout.vue.d.ts +53 -0
  19. package/dist/@types/packages/vue2/src/components/promo-banner/__mock-image.d.ts +1 -0
  20. package/dist/@types/packages/vue2/src/components/promo-banner/index.d.ts +2 -0
  21. package/dist/@types/packages/vue2/src/components/promo-banner/promo-banner.types.d.ts +83 -0
  22. package/dist/@types/packages/vue2/src/components/promo-banner/promo-banner.vue.d.ts +65 -0
  23. package/dist/@types/packages/vue2/src/components/selection-card/components/selection-card-group/selection-card-group.types.d.ts +2 -0
  24. package/dist/@types/packages/vue2/src/components/selection-card/components/selection-card-group/selection-card-group.vue.d.ts +19 -4
  25. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -3
  26. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +1 -3
  27. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +4 -4
  28. package/dist/@types/packages/vue2/src/index.d.ts +2 -0
  29. package/dist/action-bar.js +1 -1
  30. package/dist/assets/accordion-item.css +1 -1
  31. package/dist/assets/action-bar.css +1 -1
  32. package/dist/assets/base-modal.css +1 -1
  33. package/dist/assets/card.css +1 -1
  34. package/dist/assets/currency.css +1 -1
  35. package/dist/assets/data-grid.css +1 -1
  36. package/dist/assets/dialog-page.css +1 -1
  37. package/dist/assets/inspector.css +1 -1
  38. package/dist/assets/layout-row.css +1 -0
  39. package/dist/assets/menu.css +1 -1
  40. package/dist/assets/modal-fullscreen.css +1 -1
  41. package/dist/assets/popover.css +1 -1
  42. package/dist/assets/promo-banner.css +1 -0
  43. package/dist/assets/selection-card-group.css +1 -1
  44. package/dist/assets/sidepanel.css +1 -1
  45. package/dist/assets/structured-list-item.css +1 -1
  46. package/dist/checkbox.js +2 -2
  47. package/dist/chunks/{action-bar.CNH2XWmk.js → action-bar.BZIBGja0.js} +2 -2
  48. package/dist/chunks/{action-bar.CNH2XWmk.js.map → action-bar.BZIBGja0.js.map} +1 -1
  49. package/dist/chunks/{checkbox-group.Bu6WRt6i.js → checkbox-group.Zf-GivDW.js} +2 -2
  50. package/dist/chunks/{checkbox-group.Bu6WRt6i.js.map → checkbox-group.Zf-GivDW.js.map} +1 -1
  51. package/dist/chunks/{checkbox.DfUxRkJe.js → checkbox.DdMkyTo5.js} +15 -15
  52. package/dist/chunks/{checkbox.DfUxRkJe.js.map → checkbox.DdMkyTo5.js.map} +1 -1
  53. package/dist/chunks/{code-snippet.DqTEK8cz.js → code-snippet.Dp_tDJ-S.js} +3 -3
  54. package/dist/chunks/{code-snippet.DqTEK8cz.js.map → code-snippet.Dp_tDJ-S.js.map} +1 -1
  55. package/dist/chunks/{currency.BGrGBnhm.js → currency.Dz2x17_Q.js} +57 -70
  56. package/dist/chunks/currency.Dz2x17_Q.js.map +1 -0
  57. package/dist/chunks/{dashboard-section.rv0r2_-a.js → dashboard-section.BdRXcY4u.js} +2 -2
  58. package/dist/chunks/{dashboard-section.rv0r2_-a.js.map → dashboard-section.BdRXcY4u.js.map} +1 -1
  59. package/dist/chunks/{data-grid.DR-w_KKU.js → data-grid.BC2tOBxm.js} +1329 -1276
  60. package/dist/chunks/data-grid.BC2tOBxm.js.map +1 -0
  61. package/dist/chunks/{date-picker.mfXjVZ9w.js → date-picker.B6HK0sb2.js} +14 -14
  62. package/dist/chunks/{date-picker.mfXjVZ9w.js.map → date-picker.B6HK0sb2.js.map} +1 -1
  63. package/dist/chunks/{date-range-picker.Cs8Ia3Qs.js → date-range-picker.3iWt1Cd6.js} +23 -23
  64. package/dist/chunks/{date-range-picker.Cs8Ia3Qs.js.map → date-range-picker.3iWt1Cd6.js.map} +1 -1
  65. package/dist/chunks/{dropdown-tag.DeoUXbp4.js → dropdown-tag.ChFJ9l5g.js} +2 -2
  66. package/dist/chunks/{dropdown-tag.DeoUXbp4.js.map → dropdown-tag.ChFJ9l5g.js.map} +1 -1
  67. package/dist/chunks/{dropdown.DBxpqjEM.js → dropdown.CMKdLPHi.js} +26 -26
  68. package/dist/chunks/{dropdown.DBxpqjEM.js.map → dropdown.CMKdLPHi.js.map} +1 -1
  69. package/dist/chunks/es6.b4enG1py.js +10 -0
  70. package/dist/chunks/es6.b4enG1py.js.map +1 -0
  71. package/dist/chunks/{filter-bar.DiW13x-f.js → filter-bar.pKcJryD3.js} +7 -7
  72. package/dist/chunks/{filter-bar.DiW13x-f.js.map → filter-bar.pKcJryD3.js.map} +1 -1
  73. package/dist/chunks/image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js +47 -0
  74. package/dist/chunks/image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map +1 -0
  75. package/dist/chunks/index.ChdIlujs.js +248 -0
  76. package/dist/chunks/{index.DKQuLmwu.js.map → index.ChdIlujs.js.map} +1 -1
  77. package/dist/chunks/{input-field.DbeVnbwg.js → input-field.Bk2p3kIb.js} +2 -2
  78. package/dist/chunks/{input-field.DbeVnbwg.js.map → input-field.Bk2p3kIb.js.map} +1 -1
  79. package/dist/chunks/layout-row.rzhGrBQ3.js +101 -0
  80. package/dist/chunks/layout-row.rzhGrBQ3.js.map +1 -0
  81. package/dist/chunks/{pagination.B-OihXTg.js → pagination.D_4FRHE9.js} +2 -2
  82. package/dist/chunks/{pagination.B-OihXTg.js.map → pagination.D_4FRHE9.js.map} +1 -1
  83. package/dist/chunks/promo-banner.BRn1iznD.js +126 -0
  84. package/dist/chunks/promo-banner.BRn1iznD.js.map +1 -0
  85. package/dist/chunks/{search-bar.DN-QKFlJ.js → search-bar.D_4u91te.js} +3 -3
  86. package/dist/chunks/{search-bar.DN-QKFlJ.js.map → search-bar.D_4u91te.js.map} +1 -1
  87. package/dist/chunks/{secondary-nav.C-7Qq6rE.js → secondary-nav.CQ3aLyrM.js} +4 -4
  88. package/dist/chunks/{secondary-nav.C-7Qq6rE.js.map → secondary-nav.CQ3aLyrM.js.map} +1 -1
  89. package/dist/chunks/selection-card-group.Du3Cwf47.js +474 -0
  90. package/dist/chunks/selection-card-group.Du3Cwf47.js.map +1 -0
  91. package/dist/chunks/{structured-list-item.BhNJlDub.js → structured-list-item.CujUEOTK.js} +3 -3
  92. package/dist/chunks/structured-list-item.CujUEOTK.js.map +1 -0
  93. package/dist/chunks/{timeline-item.CEolKFn0.js → timeline-item.B8VvkDfR.js} +2 -2
  94. package/dist/chunks/{timeline-item.CEolKFn0.js.map → timeline-item.B8VvkDfR.js.map} +1 -1
  95. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Bz6QyDuV.js → tutorial.vue_vue_type_script_setup_true_lang.CGpbGgfc.js} +9 -9
  96. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Bz6QyDuV.js.map → tutorial.vue_vue_type_script_setup_true_lang.CGpbGgfc.js.map} +1 -1
  97. package/dist/chunks/{use-cached-selected-values.C7Lt5U_S.js → use-cached-selected-values.DaRzXFIt.js} +2 -2
  98. package/dist/chunks/{use-cached-selected-values.C7Lt5U_S.js.map → use-cached-selected-values.DaRzXFIt.js.map} +1 -1
  99. package/dist/code-snippet.js +1 -1
  100. package/dist/currency.js +1 -1
  101. package/dist/dashboard-template.js +1 -1
  102. package/dist/data-grid.js +1 -1
  103. package/dist/date-picker.js +1 -1
  104. package/dist/date-range-picker.js +1 -1
  105. package/dist/dropdown.js +3 -3
  106. package/dist/filter-bar.js +1 -1
  107. package/dist/image.js +1 -1
  108. package/dist/index.js +197 -190
  109. package/dist/index.js.map +1 -1
  110. package/dist/input-field.js +1 -1
  111. package/dist/internal.js +1 -1
  112. package/dist/layout.js +6 -0
  113. package/dist/layout.js.map +1 -0
  114. package/dist/pagination.js +1 -1
  115. package/dist/promo-banner.js +7 -0
  116. package/dist/promo-banner.js.map +1 -0
  117. package/dist/search-bar.js +2 -2
  118. package/dist/secondary-nav.js +1 -1
  119. package/dist/selection-card.js +1 -1
  120. package/dist/structured-list.js +1 -1
  121. package/dist/styles/bento-dark.css +16 -0
  122. package/dist/styles/bento-light.css +16 -0
  123. package/dist/styles/bento.css +16 -0
  124. package/dist/styles/legacy.css +16 -0
  125. package/dist/styles/styleguide.css +16 -0
  126. package/dist/timeline.js +1 -1
  127. package/dist/tutorial.js +1 -1
  128. package/dist/web-types.json +1 -1
  129. package/package.json +2 -2
  130. package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +0 -19
  131. package/dist/chunks/currency.BGrGBnhm.js.map +0 -1
  132. package/dist/chunks/data-grid.DR-w_KKU.js.map +0 -1
  133. package/dist/chunks/es6.BvpG4Oi6.js +0 -9
  134. package/dist/chunks/es6.BvpG4Oi6.js.map +0 -1
  135. package/dist/chunks/image.0KzfycGE.js +0 -78
  136. package/dist/chunks/image.0KzfycGE.js.map +0 -1
  137. package/dist/chunks/index.DKQuLmwu.js +0 -182
  138. package/dist/chunks/selection-card-group.DkSYInMF.js +0 -392
  139. package/dist/chunks/selection-card-group.DkSYInMF.js.map +0 -1
  140. package/dist/chunks/structured-list-item.BhNJlDub.js.map +0 -1
@@ -0,0 +1,47 @@
1
+ import { defineComponent as u, computed as e, openBlock as n, createElementBlock as t, normalizeStyle as d } from "vue";
2
+ var l = /* @__PURE__ */ ((r) => (r.LANDSCAPE = "landscape", r.P4_3 = "4:3", r.P3_3 = "3:3", r.P16_9 = "16:9", r.P2_1 = "2:1", r.PORTRAIT = "portrait", r.P3_4 = "3:4", r.P2_3 = "2:3", r.P9_16 = "9:16", r.P1_2 = "1:2", r.SQUARE = "square", r.P1_1 = "1:1", r))(l || {}), f = /* @__PURE__ */ ((r) => (r.COVER = "cover", r.FILL = "fill", r.CONTAIN = "contain", r))(f || {});
3
+ const o = ["src", "alt"], p = {
4
+ name: "bento-image"
5
+ }, i = /* @__PURE__ */ u({
6
+ ...p,
7
+ props: {
8
+ src: {},
9
+ alt: {},
10
+ aspectRatio: { default: null },
11
+ objectFit: { default: null }
12
+ },
13
+ setup(r) {
14
+ const c = r, a = (s) => {
15
+ let _ = l.P16_9;
16
+ switch (s) {
17
+ case l.LANDSCAPE:
18
+ _ = l.P16_9;
19
+ break;
20
+ case l.PORTRAIT:
21
+ _ = l.P3_4;
22
+ break;
23
+ case l.SQUARE:
24
+ _ = l.P1_1;
25
+ break;
26
+ default:
27
+ _ = s;
28
+ break;
29
+ }
30
+ return `${_}`.replace(":", "/");
31
+ }, P = e(() => ({
32
+ aspectRatio: a(c.aspectRatio),
33
+ objectFit: c.objectFit
34
+ }));
35
+ return (s, _) => (n(), t("img", {
36
+ src: s.src,
37
+ alt: s.alt,
38
+ style: d(P.value)
39
+ }, null, 12, o));
40
+ }
41
+ });
42
+ export {
43
+ l as B,
44
+ i as _,
45
+ f as a
46
+ };
47
+ //# sourceMappingURL=image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.vue_vue_type_script_setup_true_lang.BMoSMeM-.js","sources":["../../../core/src/components/image/image.types.ts","../../../vue2/src/components/image/image.vue"],"sourcesContent":["export enum BentoImageAspectRatio {\n LANDSCAPE = 'landscape',\n P4_3 = '4:3',\n P3_3 = '3:3',\n P16_9 = '16:9',\n P2_1 = '2:1',\n PORTRAIT = 'portrait',\n P3_4 = '3:4',\n P2_3 = '2:3',\n P9_16 = '9:16',\n P1_2 = '1:2',\n SQUARE = 'square',\n P1_1 = '1:1',\n}\n\nexport enum BentoImageObjectFit {\n COVER = 'cover',\n FILL = 'fill',\n CONTAIN = 'contain',\n}\n\nexport interface BentoImageProps {\n /** Url to image, same as src attribute of `<img>` tag */\n src: string;\n\n /** Accessible text describing the image, same as alt attribute of `<img>` tag */\n alt: string;\n\n /** Aspect ratio of the image, maps to css aspect-ratio */\n aspectRatio?: BentoImageAspectRatio | `${BentoImageAspectRatio}` | null;\n\n /** Object fitting strategy, maps to css object-fit */\n objectFit?: BentoImageObjectFit | `${BentoImageObjectFit}` | null;\n}\n","<template>\n <img :src=\"src\" :alt=\"alt\" :style=\"imageStyles\" />\n</template>\n<script lang=\"ts\" setup>\n import { computed } from 'vue';\n import { BentoImageAspectRatio, BentoImageProps } from '@adyen/bento-core/src/components/image/image.types';\n\n const props = withDefaults(defineProps<BentoImageProps>(), {\n aspectRatio: null,\n objectFit: null,\n });\n\n const convertAspectRatio = (aspectRatio: BentoImageAspectRatio | `${BentoImageAspectRatio}`) => {\n let parsedAspectRatio: BentoImageAspectRatio | `${BentoImageAspectRatio}` = BentoImageAspectRatio.P16_9;\n switch (aspectRatio) {\n case BentoImageAspectRatio.LANDSCAPE:\n parsedAspectRatio = BentoImageAspectRatio.P16_9;\n break;\n case BentoImageAspectRatio.PORTRAIT:\n parsedAspectRatio = BentoImageAspectRatio.P3_4;\n break;\n case BentoImageAspectRatio.SQUARE:\n parsedAspectRatio = BentoImageAspectRatio.P1_1;\n break;\n default:\n parsedAspectRatio = aspectRatio;\n break;\n }\n return `${parsedAspectRatio}`.replace(':', '/');\n };\n\n const imageStyles = computed(() => ({\n aspectRatio: convertAspectRatio(props.aspectRatio),\n objectFit: props.objectFit,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image component used for resizing images to certain aspect ratios and fit strategies.\n *\n * @example\n * import { BentoImage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoImage },\n * template: `\n * <bento-image\n * :src=\"imageSrc\"\n * alt=\"alternative text\"\n * aspect-ratio=\"landscape\"\n * object-fit=\"cover\"\n *\n * />\n * `\n * }\n */\n export default {\n name: 'bento-image',\n };\n</script>\n"],"names":["BentoImageAspectRatio","BentoImageObjectFit","__default__","props","__props","convertAspectRatio","aspectRatio","parsedAspectRatio","imageStyles","computed"],"mappings":";AAAY,IAAAA,sBAAAA,OACRA,EAAA,YAAY,aACZA,EAAA,OAAO,OACPA,EAAA,OAAO,OACPA,EAAA,QAAQ,QACRA,EAAA,OAAO,OACPA,EAAA,WAAW,YACXA,EAAA,OAAO,OACPA,EAAA,OAAO,OACPA,EAAA,QAAQ,QACRA,EAAA,OAAO,OACPA,EAAA,SAAS,UACTA,EAAA,OAAO,OAZCA,IAAAA,KAAA,CAAA,CAAA,GAeAC,sBAAAA,OACRA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,UAAU,WAHFA,IAAAA,KAAA,CAAA,CAAA;0BC0COC,IAAA;AAAA,EACX,MAAM;AACV;;;;;;;;;AApDA,UAAMC,IAAQC,GAKRC,IAAqB,CAACC,MAAoE;AAC5F,UAAIC,IAAwEP,EAAsB;AAClG,cAAQM,GAAa;AAAA,QACjB,KAAKN,EAAsB;AACvB,UAAAO,IAAoBP,EAAsB;AAC1C;AAAA,QACJ,KAAKA,EAAsB;AACvB,UAAAO,IAAoBP,EAAsB;AAC1C;AAAA,QACJ,KAAKA,EAAsB;AACvB,UAAAO,IAAoBP,EAAsB;AAC1C;AAAA,QACJ;AACwB,UAAAO,IAAAD;AACpB;AAAA,MAAA;AAER,aAAO,GAAGC,CAAiB,GAAG,QAAQ,KAAK,GAAG;AAAA,IAClD,GAEMC,IAAcC,EAAS,OAAO;AAAA,MAChC,aAAaJ,EAAmBF,EAAM,WAAW;AAAA,MACjD,WAAWA,EAAM;AAAA,IAAA,EACnB;;;;;;;;"}
@@ -0,0 +1,248 @@
1
+ import { getCurrentScope as N, onScopeDispose as A, unref as L, onMounted as E, nextTick as T, getCurrentInstance as $, ref as m, watchEffect as j, computed as y, watch as g } from "vue";
2
+ function S(t) {
3
+ return N() ? (A(t), !0) : !1;
4
+ }
5
+ function x(t) {
6
+ return typeof t == "function" ? t() : L(t);
7
+ }
8
+ const B = typeof window < "u" && typeof document < "u";
9
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
+ const C = Object.prototype.toString, _ = (t) => C.call(t) === "[object Object]", z = () => {
11
+ };
12
+ function R(t, n) {
13
+ var r;
14
+ if (typeof t == "number")
15
+ return t + n;
16
+ const u = ((r = t.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : r[0]) || "", o = t.slice(u.length), c = Number.parseFloat(u) + n;
17
+ return Number.isNaN(c) ? t : c + o;
18
+ }
19
+ function F(t) {
20
+ return $();
21
+ }
22
+ function W(t, n = !0, r) {
23
+ F() ? E(t, r) : n ? t() : T(t);
24
+ }
25
+ function p(t) {
26
+ var n;
27
+ const r = x(t);
28
+ return (n = r == null ? void 0 : r.$el) != null ? n : r;
29
+ }
30
+ const w = B ? window : void 0;
31
+ function I(...t) {
32
+ let n, r, u, o;
33
+ if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, u, o] = t, n = w) : [n, r, u, o] = t, !n)
34
+ return z;
35
+ Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
36
+ const c = [], a = () => {
37
+ c.forEach((f) => f()), c.length = 0;
38
+ }, e = (f, s, d, h) => (f.addEventListener(s, d, h), () => f.removeEventListener(s, d, h)), i = g(
39
+ () => [p(n), x(o)],
40
+ ([f, s]) => {
41
+ if (a(), !f)
42
+ return;
43
+ const d = _(s) ? { ...s } : s;
44
+ c.push(
45
+ ...r.flatMap((h) => u.map((v) => e(f, h, v, d)))
46
+ );
47
+ },
48
+ { immediate: !0, flush: "post" }
49
+ ), l = () => {
50
+ i(), a();
51
+ };
52
+ return S(l), l;
53
+ }
54
+ function G() {
55
+ const t = m(!1);
56
+ return $() && E(() => {
57
+ t.value = !0;
58
+ }), t;
59
+ }
60
+ function M(t) {
61
+ const n = G();
62
+ return y(() => (n.value, !!t()));
63
+ }
64
+ function b(t, n = {}) {
65
+ const { window: r = w } = n, u = M(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
66
+ let o;
67
+ const c = m(!1), a = (l) => {
68
+ c.value = l.matches;
69
+ }, e = () => {
70
+ o && ("removeEventListener" in o ? o.removeEventListener("change", a) : o.removeListener(a));
71
+ }, i = j(() => {
72
+ u.value && (e(), o = r.matchMedia(x(t)), "addEventListener" in o ? o.addEventListener("change", a) : o.addListener(a), c.value = o.matches);
73
+ });
74
+ return S(() => {
75
+ i(), e(), o = void 0;
76
+ }), c;
77
+ }
78
+ function Y(t, n = {}) {
79
+ function r(e, i) {
80
+ let l = x(t[e]);
81
+ return i != null && (l = R(l, i)), typeof l == "number" && (l = `${l}px`), l;
82
+ }
83
+ const { window: u = w } = n;
84
+ function o(e) {
85
+ return u ? u.matchMedia(e).matches : !1;
86
+ }
87
+ const c = (e) => b(() => `(min-width: ${r(e)})`, n), a = Object.keys(t).reduce((e, i) => (Object.defineProperty(e, i, {
88
+ get: () => c(i),
89
+ enumerable: !0,
90
+ configurable: !0
91
+ }), e), {});
92
+ return Object.assign(a, {
93
+ greater(e) {
94
+ return b(() => `(min-width: ${r(e, 0.1)})`, n);
95
+ },
96
+ greaterOrEqual: c,
97
+ smaller(e) {
98
+ return b(() => `(max-width: ${r(e, -0.1)})`, n);
99
+ },
100
+ smallerOrEqual(e) {
101
+ return b(() => `(max-width: ${r(e)})`, n);
102
+ },
103
+ between(e, i) {
104
+ return b(() => `(min-width: ${r(e)}) and (max-width: ${r(i, -0.1)})`, n);
105
+ },
106
+ isGreater(e) {
107
+ return o(`(min-width: ${r(e, 0.1)})`);
108
+ },
109
+ isGreaterOrEqual(e) {
110
+ return o(`(min-width: ${r(e)})`);
111
+ },
112
+ isSmaller(e) {
113
+ return o(`(max-width: ${r(e, -0.1)})`);
114
+ },
115
+ isSmallerOrEqual(e) {
116
+ return o(`(max-width: ${r(e)})`);
117
+ },
118
+ isInBetween(e, i) {
119
+ return o(`(min-width: ${r(e)}) and (max-width: ${r(i, -0.1)})`);
120
+ },
121
+ current() {
122
+ const e = Object.keys(t).map((i) => [i, c(i)]);
123
+ return y(() => e.filter(([, i]) => i.value).map(([i]) => i));
124
+ }
125
+ });
126
+ }
127
+ function H(t, n, r = {}) {
128
+ const { window: u = w, ...o } = r;
129
+ let c;
130
+ const a = M(() => u && "ResizeObserver" in u), e = () => {
131
+ c && (c.disconnect(), c = void 0);
132
+ }, i = y(() => Array.isArray(t) ? t.map((s) => p(s)) : [p(t)]), l = g(
133
+ i,
134
+ (s) => {
135
+ if (e(), a.value && u) {
136
+ c = new ResizeObserver(n);
137
+ for (const d of s)
138
+ d && c.observe(d, o);
139
+ }
140
+ },
141
+ { immediate: !0, flush: "post", deep: !0 }
142
+ ), f = () => {
143
+ e(), l();
144
+ };
145
+ return S(f), {
146
+ isSupported: a,
147
+ stop: f
148
+ };
149
+ }
150
+ function q(t, n = { width: 0, height: 0 }, r = {}) {
151
+ const { window: u = w, box: o = "content-box" } = r, c = y(() => {
152
+ var s, d;
153
+ return (d = (s = p(t)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
154
+ }), a = m(n.width), e = m(n.height), { stop: i } = H(
155
+ t,
156
+ ([s]) => {
157
+ const d = o === "border-box" ? s.borderBoxSize : o === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
158
+ if (u && c.value) {
159
+ const h = p(t);
160
+ if (h) {
161
+ const v = u.getComputedStyle(h);
162
+ a.value = Number.parseFloat(v.width), e.value = Number.parseFloat(v.height);
163
+ }
164
+ } else if (d) {
165
+ const h = Array.isArray(d) ? d : [d];
166
+ a.value = h.reduce((v, { inlineSize: O }) => v + O, 0), e.value = h.reduce((v, { blockSize: O }) => v + O, 0);
167
+ } else
168
+ a.value = s.contentRect.width, e.value = s.contentRect.height;
169
+ },
170
+ r
171
+ );
172
+ W(() => {
173
+ const s = p(t);
174
+ s && (a.value = "offsetWidth" in s ? s.offsetWidth : n.width, e.value = "offsetHeight" in s ? s.offsetHeight : n.height);
175
+ });
176
+ const l = g(
177
+ () => p(t),
178
+ (s) => {
179
+ a.value = s ? n.width : 0, e.value = s ? n.height : 0;
180
+ }
181
+ );
182
+ function f() {
183
+ i(), l();
184
+ }
185
+ return {
186
+ width: a,
187
+ height: e,
188
+ stop: f
189
+ };
190
+ }
191
+ function P(t = {}) {
192
+ const { window: n = w, behavior: r = "auto" } = t;
193
+ if (!n)
194
+ return {
195
+ x: m(0),
196
+ y: m(0)
197
+ };
198
+ const u = m(n.scrollX), o = m(n.scrollY), c = y({
199
+ get() {
200
+ return u.value;
201
+ },
202
+ set(e) {
203
+ scrollTo({ left: e, behavior: r });
204
+ }
205
+ }), a = y({
206
+ get() {
207
+ return o.value;
208
+ },
209
+ set(e) {
210
+ scrollTo({ top: e, behavior: r });
211
+ }
212
+ });
213
+ return I(
214
+ n,
215
+ "scroll",
216
+ () => {
217
+ u.value = n.scrollX, o.value = n.scrollY;
218
+ },
219
+ {
220
+ capture: !1,
221
+ passive: !0
222
+ }
223
+ ), { x: c, y: a };
224
+ }
225
+ function k(t = {}) {
226
+ const {
227
+ window: n = w,
228
+ initialWidth: r = Number.POSITIVE_INFINITY,
229
+ initialHeight: u = Number.POSITIVE_INFINITY,
230
+ listenOrientation: o = !0,
231
+ includeScrollbar: c = !0
232
+ } = t, a = m(r), e = m(u), i = () => {
233
+ n && (c ? (a.value = n.innerWidth, e.value = n.innerHeight) : (a.value = n.document.documentElement.clientWidth, e.value = n.document.documentElement.clientHeight));
234
+ };
235
+ if (i(), W(i), I("resize", i, { passive: !0 }), o) {
236
+ const l = b("(orientation: portrait)");
237
+ g(l, () => i());
238
+ }
239
+ return { width: a, height: e };
240
+ }
241
+ export {
242
+ q as a,
243
+ P as b,
244
+ b as c,
245
+ Y as d,
246
+ k as u
247
+ };
248
+ //# sourceMappingURL=index.ChdIlujs.js.map