@club-employes/utopia 4.311.0 → 4.313.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.
@@ -1,4 +1,4 @@
1
- import { MfePageProps, ShyHeaderMode } from './types';
1
+ import { MfePageProps, ShyHeaderMode, FooterVariant } from './types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
@@ -18,6 +18,7 @@ declare const __VLS_component: DefineComponent<MfePageProps, {}, {}, {}, {}, Com
18
18
  padding: "none" | "small" | "medium" | "large";
19
19
  intro: string;
20
20
  shyHeader: ShyHeaderMode;
21
+ footerVariant: FooterVariant;
21
22
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
22
23
  footerSentinel: HTMLDivElement;
23
24
  }, HTMLDivElement>;
@@ -1,8 +1,10 @@
1
1
  export type ShyHeaderMode = 'all' | 'title' | 'extra' | 'none';
2
+ export type FooterVariant = 'auto' | 'transparent';
2
3
  export interface MfePageProps {
3
4
  title: string;
4
5
  intro?: string;
5
6
  padding?: 'none' | 'small' | 'medium' | 'large';
6
7
  shyHeader?: ShyHeaderMode;
7
8
  maxWidth?: string;
9
+ footerVariant?: FooterVariant;
8
10
  }
@@ -10,5 +10,6 @@ declare const _default: DefineComponent<DownloadListProps, {}, {}, {}, {}, Compo
10
10
  icon3d: Icon3DName;
11
11
  items: DownloadListItem[];
12
12
  linkText: string;
13
+ skipWindowOpen: boolean;
13
14
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
14
15
  export default _default;
@@ -14,4 +14,9 @@ export interface DownloadListProps {
14
14
  linkText?: string;
15
15
  to?: string;
16
16
  items: DownloadListItem[];
17
+ /**
18
+ * Si true, n'appelle pas window.open après l'emit download.
19
+ * Utile quand le parent gère lui-même le téléchargement (ex. fetch authentifié).
20
+ */
21
+ skipWindowOpen?: boolean;
17
22
  }
package/dist/index.js CHANGED
@@ -45273,12 +45273,14 @@ const IB = ["id"], YB = {
45273
45273
  _: 1
45274
45274
  }),
45275
45275
  g("div", wS, [
45276
- (c(!0), f(_, null, be(e.media, (r) => (c(), T(b(je), {
45277
- key: r.label,
45276
+ (c(!0), f(_, null, be(e.media, (r, i) => (c(), T(b(je), {
45277
+ key: r.url ?? r.label ?? i,
45278
45278
  aspect: "outlined",
45279
45279
  icon: "Download",
45280
45280
  "icon-position": "right",
45281
- onClick: (i) => o("download", r)
45281
+ onClick: (A) => {
45282
+ A.stopPropagation(), o("download", r);
45283
+ }
45282
45284
  }, {
45283
45285
  default: B(() => [
45284
45286
  H(O(r.label), 1)
@@ -45296,7 +45298,7 @@ const IB = ["id"], YB = {
45296
45298
  ])
45297
45299
  ]));
45298
45300
  }
45299
- }), ZE = /* @__PURE__ */ fe(xS, [["__scopeId", "data-v-a8796732"]]), PS = { class: "utopia-download-list__header" }, MS = { class: "utopia-download-list__title-group" }, kS = { class: "utopia-download-list__text-content" }, CS = { class: "utopia-download-list__items" }, OS = { class: "utopia-download-list__item-left" }, BS = { class: "utopia-download-list__item-info" }, TS = {
45301
+ }), ZE = /* @__PURE__ */ fe(xS, [["__scopeId", "data-v-895dfb81"]]), PS = { class: "utopia-download-list__header" }, MS = { class: "utopia-download-list__title-group" }, kS = { class: "utopia-download-list__text-content" }, CS = { class: "utopia-download-list__items" }, OS = { class: "utopia-download-list__item-left" }, BS = { class: "utopia-download-list__item-info" }, TS = {
45300
45302
  key: 0,
45301
45303
  class: "utopia-download-list__item-tags"
45302
45304
  }, DS = ["onClick"], LS = /* @__PURE__ */ ie({
@@ -45308,14 +45310,15 @@ const IB = ["id"], YB = {
45308
45310
  icon3d: { default: "Doc" },
45309
45311
  linkText: { default: "Voir la liste" },
45310
45312
  to: {},
45311
- items: { default: () => [] }
45313
+ items: { default: () => [] },
45314
+ skipWindowOpen: { type: Boolean, default: !1 }
45312
45315
  },
45313
45316
  emits: ["download"],
45314
45317
  setup(e, { emit: t }) {
45315
- const n = t, o = (s) => {
45316
- s.url && (n("download", s), window.open(s.url, "_blank"));
45318
+ const n = e, o = t, s = (a) => {
45319
+ a.url && (o("download", a), n.skipWindowOpen || window.open(a.url, "_blank"));
45317
45320
  };
45318
- return (s, a) => (c(), T(b(qs), {
45321
+ return (a, l) => (c(), T(b(qs), {
45319
45322
  variant: "elevated",
45320
45323
  size: "large",
45321
45324
  class: "utopia-download-list"
@@ -45374,13 +45377,13 @@ const IB = ["id"], YB = {
45374
45377
  class: "utopia-download-list__separator"
45375
45378
  }),
45376
45379
  g("div", CS, [
45377
- (c(!0), f(_, null, be(e.items, (l) => (c(), f("div", {
45378
- key: l.id,
45380
+ (c(!0), f(_, null, be(e.items, (r) => (c(), f("div", {
45381
+ key: r.id,
45379
45382
  class: "utopia-download-list__item"
45380
45383
  }, [
45381
45384
  g("div", OS, [
45382
45385
  z(b(Q), {
45383
- name: l.icon || "File-down",
45386
+ name: r.icon || "File-down",
45384
45387
  color: "brand-primary-500",
45385
45388
  size: "large",
45386
45389
  class: "utopia-download-list__item-doc-icon"
@@ -45392,31 +45395,31 @@ const IB = ["id"], YB = {
45392
45395
  class: "utopia-download-list__item-title"
45393
45396
  }, {
45394
45397
  default: B(() => [
45395
- H(O(l.title), 1)
45398
+ H(O(r.title), 1)
45396
45399
  ]),
45397
45400
  _: 2
45398
45401
  }, 1024),
45399
- l.tags?.length ? (c(), f("div", TS, [
45400
- (c(!0), f(_, null, be(l.tags, (r) => (c(), T(b(Yt), {
45401
- key: r,
45402
+ r.tags?.length ? (c(), f("div", TS, [
45403
+ (c(!0), f(_, null, be(r.tags, (i) => (c(), T(b(Yt), {
45404
+ key: i,
45402
45405
  size: "extra-small",
45403
45406
  ghost: "",
45404
45407
  variant: "secondary",
45405
45408
  disabled: ""
45406
45409
  }, {
45407
45410
  default: B(() => [
45408
- H(O(r), 1)
45411
+ H(O(i), 1)
45409
45412
  ]),
45410
45413
  _: 2
45411
45414
  }, 1024))), 128))
45412
45415
  ])) : M("", !0)
45413
45416
  ])
45414
45417
  ]),
45415
- l.url ? (c(), f("button", {
45418
+ r.url ? (c(), f("button", {
45416
45419
  key: 0,
45417
45420
  type: "button",
45418
45421
  class: "utopia-download-list__download-button",
45419
- onClick: (r) => o(l),
45422
+ onClick: (i) => s(r),
45420
45423
  "aria-label": "Télécharger"
45421
45424
  }, [
45422
45425
  z(b(Q), {
@@ -45431,7 +45434,7 @@ const IB = ["id"], YB = {
45431
45434
  _: 1
45432
45435
  }));
45433
45436
  }
45434
- }), NE = /* @__PURE__ */ fe(LS, [["__scopeId", "data-v-2b36e96a"]]), jS = { class: "utopia-tromboitem__photo-container" }, SS = ["src", "alt"], HS = {
45437
+ }), NE = /* @__PURE__ */ fe(LS, [["__scopeId", "data-v-0670ea97"]]), jS = { class: "utopia-tromboitem__photo-container" }, SS = ["src", "alt"], HS = {
45435
45438
  key: 1,
45436
45439
  class: "utopia-tromboitem__initials"
45437
45440
  }, GS = { class: "utopia-tromboitem__content" }, ES = ["href"], FS = ["href"], IS = /* @__PURE__ */ ie({
@@ -47143,7 +47146,8 @@ const IB = ["id"], YB = {
47143
47146
  intro: { default: "" },
47144
47147
  padding: { default: "medium" },
47145
47148
  shyHeader: { default: "all" },
47146
- maxWidth: {}
47149
+ maxWidth: {},
47150
+ footerVariant: { default: "auto" }
47147
47151
  },
47148
47152
  setup(e) {
47149
47153
  const t = e, n = Di(), o = P(() => {
@@ -47174,14 +47178,18 @@ const IB = ["id"], YB = {
47174
47178
  "utopia-mfepage__footer--resting": d.value
47175
47179
  }));
47176
47180
  function k() {
47177
- y?.disconnect(), m.value && (y = new IntersectionObserver(
47181
+ if (y?.disconnect(), y = null, t.footerVariant === "transparent") {
47182
+ d.value = !0;
47183
+ return;
47184
+ }
47185
+ m.value && (y = new IntersectionObserver(
47178
47186
  ([v]) => {
47179
47187
  d.value = v.isIntersecting;
47180
47188
  },
47181
47189
  { threshold: 0 }
47182
47190
  ), y.observe(m.value));
47183
47191
  }
47184
- return De(m, k), gt(() => {
47192
+ return De(m, k), De(() => t.footerVariant, k), gt(() => {
47185
47193
  window.addEventListener("scroll", i, { passive: !0 }), k();
47186
47194
  }), Ot(() => {
47187
47195
  window.removeEventListener("scroll", i), y?.disconnect();
@@ -47240,7 +47248,7 @@ const IB = ["id"], YB = {
47240
47248
  }, null, 512)) : M("", !0)
47241
47249
  ], 6));
47242
47250
  }
47243
- }), QE = /* @__PURE__ */ fe(DG, [["__scopeId", "data-v-56a159c3"]]);
47251
+ }), QE = /* @__PURE__ */ fe(DG, [["__scopeId", "data-v-7265fca4"]]);
47244
47252
  export {
47245
47253
  or as Accordion,
47246
47254
  ar as AccordionItem,