@20minutes/hela 2.23.0 → 2.23.1

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,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface RadioButtonProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
3
  label?: string;
4
- variant?: 'warning';
4
+ variant?: 'warning' | 'green';
5
5
  }
6
6
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1,10 +1,17 @@
1
1
  import { default as React } from 'react';
2
2
  import { FlexProps, IconProps, TextProps } from '../..';
3
- import { MarginSystemProps } from '../../../types';
3
+ import { ColorType, MarginSystemProps } from '../../../types';
4
4
  export interface TilesProps extends Pick<FlexProps, 'className'>, MarginSystemProps {
5
- href: string;
6
5
  iconProps: IconProps;
7
6
  children: TextProps['children'];
7
+ href?: string;
8
8
  hasDot?: boolean;
9
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement> & {
10
+ bg?: ColorType;
11
+ selectedBg?: ColorType;
12
+ color?: ColorType;
13
+ selectedColor?: ColorType;
14
+ };
15
+ isSquare?: boolean;
9
16
  }
10
17
  export declare const Tiles: React.FC<TilesProps>;
package/dist/index.es.js CHANGED
@@ -4490,19 +4490,33 @@ const d1 = j(
4490
4490
  r !== a.length - 1 && /* @__PURE__ */ e(E, { color: "grey-200", my: "l" })
4491
4491
  ] }, l.title)) }),
4492
4492
  /* @__PURE__ */ e(w0, { heading: s.heading, description: s.description })
4493
- ] }), W2 = ({ astroSignsList: a }) => /* @__PURE__ */ e(x, { as: "ul", className: "o-inline", mx: { xs: "m", md: "0" }, children: a.map((s) => /* @__PURE__ */ e("li", { className: "o-inline__by-4", children: /* @__PURE__ */ t("a", { href: s.url, className: "c-square-tile o-column bg-ultramarine color-white", children: [
4494
- /* @__PURE__ */ e(
4495
- z,
4496
- {
4497
- name: (
4498
- // Accept all names as even if wrong it would just add useless attribute
4499
- s.isNumerology ? `num-${s.slug}` : `horoscope-${s.slug}`
4493
+ ] }), W2 = ({ astroSignsList: a }) => /* @__PURE__ */ e(x, { as: "ul", className: "o-inline", mx: { xs: "m", md: "0" }, children: a.map((s) => /* @__PURE__ */ e("li", { className: "o-inline__by-4", children: /* @__PURE__ */ t(
4494
+ m,
4495
+ {
4496
+ as: "a",
4497
+ href: s.url,
4498
+ className: "c-tiles c-tiles--square",
4499
+ direction: "column",
4500
+ alignItems: "center",
4501
+ justifyContent: "center",
4502
+ bg: "ultramarine",
4503
+ color: "white",
4504
+ gap: "xxs",
4505
+ children: [
4506
+ /* @__PURE__ */ e(
4507
+ z,
4508
+ {
4509
+ name: (
4510
+ // Accept all names as even if wrong it would just add useless attribute
4511
+ s.isNumerology ? `num-${s.slug}` : `horoscope-${s.slug}`
4512
+ ),
4513
+ size: 18
4514
+ }
4500
4515
  ),
4501
- size: 18
4502
- }
4503
- ),
4504
- /* @__PURE__ */ e(A, { isUppercase: !1, children: s.label })
4505
- ] }) }, s.slug)) }), Xe = j(
4516
+ /* @__PURE__ */ e(A, { isUppercase: !1, children: s.label })
4517
+ ]
4518
+ }
4519
+ ) }, s.slug)) }), Xe = j(
4506
4520
  ({ icon: a, title: s, content: c, ...l }, r) => /* @__PURE__ */ t(x, { ...l, ref: r, className: p("c-astro-topic-card", l?.className), children: [
4507
4521
  /* @__PURE__ */ t(m, { alignItems: "center", mb: "s", children: [
4508
4522
  /* @__PURE__ */ e(z, { mr: "xs", name: a, size: 21 }),
@@ -9898,27 +9912,41 @@ const d1 = j(
9898
9912
  iconProps: s,
9899
9913
  children: c,
9900
9914
  hasDot: l = !1,
9901
- ...r
9915
+ inputProps: r,
9916
+ isSquare: n = !1,
9917
+ ...i
9902
9918
  }) => {
9903
- const n = /* @__PURE__ */ e(z, { ...s });
9919
+ const o = /* @__PURE__ */ e(z, { ...s }), { bg: d, selectedBg: u, color: h, selectedColor: v, type: w, ...y } = r ?? {};
9904
9920
  return /* @__PURE__ */ t(
9905
9921
  m,
9906
9922
  {
9907
- ...r,
9923
+ ...i,
9924
+ className: p("c-tiles", i.className, {
9925
+ [`c-tiles--selected-bg-${u}`]: u,
9926
+ [`c-tiles--selected-color-${v}`]: v,
9927
+ "c-tiles--square": n
9928
+ }),
9929
+ ...r && {
9930
+ as: "label",
9931
+ htmlFor: r.id
9932
+ },
9933
+ ...a && {
9934
+ as: C,
9935
+ href: a
9936
+ },
9908
9937
  direction: "column",
9909
9938
  alignItems: "center",
9910
9939
  justifyContent: "center",
9911
9940
  gap: "xxs",
9912
- as: C,
9913
- href: a,
9914
9941
  py: "xs",
9915
- bg: "ultramarine",
9916
- color: "white",
9942
+ bg: d || "ultramarine",
9943
+ color: h || "white",
9917
9944
  children: [
9945
+ !!r && /* @__PURE__ */ e("input", { className: "u-hidden", type: w ?? "checkbox", ...y }),
9918
9946
  l ? /* @__PURE__ */ t(m, { alignItems: "center", gap: "xxs-2", children: [
9919
9947
  /* @__PURE__ */ e(z, { name: "dot", color: "red", size: 8 }),
9920
- n
9921
- ] }) : n,
9948
+ o
9949
+ ] }) : o,
9922
9950
  /* @__PURE__ */ e(g, { as: "span", size: "xxs", weight: "bold", children: c })
9923
9951
  ]
9924
9952
  }