@20minutes/hela 2.26.1 → 2.26.3

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,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { BoxProps, HeadingProps } from '../../..';
2
+ import { HeadingProps } from '../../..';
3
3
  type CartridgeType = 'exclusive' | 'alert' | 'live' | 'info' | 'with-you' | 'magazine';
4
- export interface CardTitleProps extends Pick<HeadingProps, 'as' | 'size' | 'fontFamily' | 'weight' | 'children'>, BoxProps {
4
+ export interface CardTitleProps extends HeadingProps {
5
5
  cartridge?: CartridgeType;
6
6
  cartridgeIsCentered?: boolean;
7
7
  maxRows?: 2 | 3 | 4 | 5;
@@ -1,9 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { BoxProps } from '../..';
3
2
  export type TableCell = React.ReactNode;
4
3
  export type TableRow = TableCell[];
5
4
  export type TableContentProps = TableRow[];
6
- export interface TableProps extends BoxProps {
5
+ export interface TableProps {
7
6
  hasHeader?: boolean;
8
7
  tableProps?: TableContentProps;
9
8
  }
@@ -2,7 +2,6 @@ import { BoxProps } from '../..';
2
2
  import { LayoutType } from '../../../types';
3
3
  type RankingPlayer = {
4
4
  current: number;
5
- previous: number;
6
5
  points: number;
7
6
  played: number;
8
7
  wins: number;
package/dist/index.es.js CHANGED
@@ -7319,13 +7319,18 @@ const h1 = L(
7319
7319
  enableHD: x
7320
7320
  }
7321
7321
  );
7322
- return /* @__PURE__ */ e(w, { ...M, className: g("c-card-img", f), children: /* @__PURE__ */ n(
7323
- "div",
7322
+ return /* @__PURE__ */ n(
7323
+ w,
7324
7324
  {
7325
- className: g("c-card-img__inner", {
7326
- "c-card-img__inner--with-shadow": u || !!t || y,
7327
- "c-card-img__inner--with-interaction": h !== void 0
7328
- }),
7325
+ ...M,
7326
+ className: g(
7327
+ "c-card-img",
7328
+ {
7329
+ "c-card-img--with-shadow": u || !!t || y,
7330
+ "c-card-img--with-interaction": h !== void 0
7331
+ },
7332
+ f
7333
+ ),
7329
7334
  children: [
7330
7335
  t && /* @__PURE__ */ n(
7331
7336
  m,
@@ -7365,7 +7370,7 @@ const h1 = L(
7365
7370
  )
7366
7371
  ]
7367
7372
  }
7368
- ) });
7373
+ );
7369
7374
  }, E1 = (a) => {
7370
7375
  switch (a) {
7371
7376
  case "alert":
@@ -7393,48 +7398,46 @@ const h1 = L(
7393
7398
  weight: d,
7394
7399
  children: u,
7395
7400
  ...h
7396
- }) => /* @__PURE__ */ e(
7397
- w,
7398
- {
7399
- pb: "xxs-3",
7400
- ...h,
7401
- className: g(
7402
- "c-card-title",
7403
- {
7404
- "c-card-title--has-max-rows": l,
7405
- [`c-card-title--has-${l}-rows`]: l
7406
- },
7407
- h?.className
7408
- ),
7409
- children: /* @__PURE__ */ n(
7410
- I,
7411
- {
7412
- as: s || "h1",
7413
- ...i && { as: "a", href: i },
7414
- ...r && { target: r },
7415
- size: t || "m",
7416
- fontFamily: o || "source-serif-pro",
7417
- weight: d || "semi-bold",
7418
- children: [
7419
- a && /* @__PURE__ */ e(
7420
- T,
7421
- {
7422
- bg: E1(a).color,
7423
- color: "white",
7424
- hasDot: a === "live" || !1,
7425
- mr: "xxs",
7426
- textProps: { fontFamily: "base" },
7427
- className: g("c-card-title__cartridge-heading", {
7428
- "c-card-title__cartridge-heading--is-centered": c
7429
- }),
7430
- children: E1(a).label
7431
- }
7432
- ),
7433
- u
7434
- ]
7435
- }
7436
- )
7437
- }
7401
+ }) => (
7402
+ // pb is to prevent the bottom of certain letters from being hidden (g, j, p and q)
7403
+ /* @__PURE__ */ n(
7404
+ I,
7405
+ {
7406
+ as: s || "h1",
7407
+ ...i && { as: "a", href: i },
7408
+ ...r && { target: r },
7409
+ pb: "xxs-3",
7410
+ ...h,
7411
+ className: g(
7412
+ "c-card-title",
7413
+ {
7414
+ "c-card-title--has-max-rows": l,
7415
+ [`c-card-title--has-${l}-rows`]: l
7416
+ },
7417
+ h?.className
7418
+ ),
7419
+ size: t || "m",
7420
+ fontFamily: o || "source-serif-pro",
7421
+ weight: d || "semi-bold",
7422
+ children: [
7423
+ a && /* @__PURE__ */ e(
7424
+ T,
7425
+ {
7426
+ bg: E1(a).color,
7427
+ color: "white",
7428
+ hasDot: a === "live" || !1,
7429
+ mr: "xxs",
7430
+ textProps: { fontFamily: "base" },
7431
+ className: g("c-card-title__cartridge-heading", {
7432
+ "c-card-title__cartridge-heading--is-centered": c
7433
+ }),
7434
+ children: E1(a).label
7435
+ }
7436
+ ),
7437
+ u
7438
+ ]
7439
+ }
7440
+ )
7438
7441
  ), Zc = ({
7439
7442
  link: a,
7440
7443
  title: c,
@@ -7528,41 +7531,39 @@ const h1 = L(
7528
7531
  ]
7529
7532
  }
7530
7533
  ) : /* @__PURE__ */ n(S, { children: [
7531
- /* @__PURE__ */ n("div", { children: [
7532
- s && /* @__PURE__ */ e(Q, { ...s, rightSubheader: void 0, mx: "m", mb: "xxs-2" }),
7533
- /* @__PURE__ */ e(A, { as: "h2", weight: "bold", ...i, mx: "m", children: /* @__PURE__ */ e("a", { href: a, children: c }) }),
7534
- r && /* @__PURE__ */ e(
7535
- F,
7536
- {
7537
- ...r,
7538
- formats: f,
7539
- defaultFormat: "640x408",
7540
- alt: c,
7541
- mt: "xs",
7542
- radius: "0"
7543
- }
7544
- ),
7545
- o && /* @__PURE__ */ e(
7546
- ue,
7547
- {
7548
- ...o,
7549
- mx: "m",
7550
- mt: "xs",
7551
- className: "u-relative u-relative--z-index-2"
7552
- }
7553
- ),
7554
- l && /* @__PURE__ */ e(
7555
- w,
7556
- {
7557
- as: "p",
7558
- color: l.color || "grey-600",
7559
- className: "c-card-extra-large__summary",
7560
- mx: "m",
7561
- mt: "xs",
7562
- children: l.children
7563
- }
7564
- )
7565
- ] }),
7534
+ s && /* @__PURE__ */ e(Q, { ...s, rightSubheader: void 0, mx: "m", mb: "xxs-2" }),
7535
+ /* @__PURE__ */ e(A, { as: "h2", weight: "bold", ...i, mx: "m", children: /* @__PURE__ */ e("a", { href: a, children: c }) }),
7536
+ r && /* @__PURE__ */ e(
7537
+ F,
7538
+ {
7539
+ ...r,
7540
+ formats: f,
7541
+ defaultFormat: "640x408",
7542
+ alt: c,
7543
+ mt: "xs",
7544
+ radius: "0"
7545
+ }
7546
+ ),
7547
+ o && /* @__PURE__ */ e(
7548
+ ue,
7549
+ {
7550
+ ...o,
7551
+ mx: "m",
7552
+ mt: "xs",
7553
+ className: "u-relative u-relative--z-index-2"
7554
+ }
7555
+ ),
7556
+ l && /* @__PURE__ */ e(
7557
+ w,
7558
+ {
7559
+ as: "p",
7560
+ color: l.color || "grey-600",
7561
+ className: "c-card-extra-large__summary",
7562
+ mx: "m",
7563
+ mt: "xs",
7564
+ children: l.children
7565
+ }
7566
+ ),
7566
7567
  d && /* @__PURE__ */ e(
7567
7568
  t1,
7568
7569
  {
@@ -12120,13 +12121,13 @@ const h1 = L(
12120
12121
  ] })
12121
12122
  ] })
12122
12123
  }
12123
- ), Tl = ({ hasHeader: a, tableProps: c, ...l }) => {
12124
+ ), Tl = ({ hasHeader: a, tableProps: c }) => {
12124
12125
  if (!c?.length)
12125
12126
  return null;
12126
- const s = a ? c[0] : null, i = a ? c.slice(1) : c;
12127
- return /* @__PURE__ */ n(w, { as: "table", ...l, children: [
12128
- a && s && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: s.map((r, t) => /* @__PURE__ */ e(w, { as: "th", p: "s", children: r }, t)) }) }),
12129
- /* @__PURE__ */ e("tbody", { children: i.map((r, t) => /* @__PURE__ */ e("tr", { children: r.map((o, d) => /* @__PURE__ */ e(w, { as: "td", p: "s", children: o }, d)) }, t)) })
12127
+ const l = a ? c[0] : null, s = a ? c.slice(1) : c;
12128
+ return /* @__PURE__ */ n("table", { className: "c-table", children: [
12129
+ a && l && /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: l.map((i, r) => /* @__PURE__ */ e(w, { as: "th", p: "s", children: i }, r)) }) }),
12130
+ /* @__PURE__ */ e("tbody", { children: s.map((i, r) => /* @__PURE__ */ e("tr", { children: i.map((t, o) => /* @__PURE__ */ e(w, { as: "td", p: "s", children: t }, o)) }, r)) })
12130
12131
  ] });
12131
12132
  }, ge = ({
12132
12133
  tabItems: a,
@@ -13374,11 +13375,11 @@ const La = {
13374
13375
  },
13375
13376
  `photoswipe-${l.imgProps?.id}`
13376
13377
  )) }), Aa = [
13377
- { current: 1, previous: 1, username: "Joueur 1", points: 9010, played: 23, wins: 20 },
13378
- { current: 2, previous: 2, username: "Joueur 2", points: 9e3, played: 23, wins: 20 },
13379
- { current: 3, previous: 3, username: "Joueur 3", points: 7349, played: 17, wins: 12 },
13380
- { current: 4, previous: 4, username: "Joueur 4", points: 5102, played: 15, wins: 10 },
13381
- { current: 5, previous: 5, username: "Joueur 5", points: 5029, played: 15, wins: 9 }
13378
+ { current: 1, username: "Joueur 1", points: 9010, played: 23, wins: 20 },
13379
+ { current: 2, username: "Joueur 2", points: 9e3, played: 23, wins: 20 },
13380
+ { current: 3, username: "Joueur 3", points: 7349, played: 17, wins: 12 },
13381
+ { current: 4, username: "Joueur 4", points: 5102, played: 15, wins: 10 },
13382
+ { current: 5, username: "Joueur 5", points: 5029, played: 15, wins: 9 }
13382
13383
  ], Jl = ({ playerData: a, layout: c, children: l, ...s }) => {
13383
13384
  const i = !a, r = a ?? Aa, t = (d, u) => u ? "is-current" : d % 2 === 0 ? "even" : "odd", o = /* @__PURE__ */ n(l1, { colsNumber: c === _.MOBILE ? 5 : 6, className: "c-ranking__content", children: [
13384
13385
  /* @__PURE__ */ e("div", {}),