@goodhood-web/ui 3.0.0-development.4 → 3.0.0-development.5

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.
package/index.mjs CHANGED
@@ -7775,45 +7775,51 @@ const De = (t) => {
7775
7775
  }, $w = "_baseBtn_e43ry_120", G1 = {
7776
7776
  baseBtn: $w
7777
7777
  }, Bt = B((t, e) => {
7778
- const n = "href" in t, { children: r, className: i, "data-testid": a, disabled: l = !1 } = t, { active: h, focusVisible: f, getRootProps: p } = zc({
7778
+ const n = "href" in t, {
7779
+ children: r,
7780
+ className: i,
7781
+ "data-testid": a,
7782
+ disabled: l = !1,
7783
+ isToggleButton: h = !1
7784
+ } = t, { active: f, focusVisible: p, getRootProps: v } = zc({
7779
7785
  ...t,
7780
7786
  rootRef: e
7781
- }), v = pe(G1.baseBtn, i, {
7782
- [G1["baseBtn--active"]]: h,
7783
- [G1["baseBtn--focusVisible"]]: f
7787
+ }), y = pe(G1.baseBtn, i, {
7788
+ [G1["baseBtn--active"]]: f,
7789
+ [G1["baseBtn--focusVisible"]]: p
7784
7790
  });
7785
7791
  if (n) {
7786
- const { ariaDescribedBy: P, ariaLabel: O, ariaLabelledBy: $, href: W, onClick: N, rel: Y, target: J } = t, K = J === "_blank" ? "noopener noreferrer" : Y;
7792
+ const { ariaDescribedBy: O, ariaLabel: $, ariaLabelledBy: W, href: N, onClick: Y, rel: J, target: K } = t, ie = K === "_blank" ? "noopener noreferrer" : J;
7787
7793
  return /* @__PURE__ */ M.jsx(
7788
7794
  "a",
7789
7795
  {
7790
- "aria-label": O,
7791
- "aria-labelledby": $,
7792
- "aria-describedby": P,
7793
- className: v,
7794
- href: W,
7795
- target: J,
7796
- onClick: N,
7797
- rel: K,
7796
+ "aria-label": $,
7797
+ "aria-labelledby": W,
7798
+ "aria-describedby": O,
7799
+ className: y,
7800
+ href: N,
7801
+ target: K,
7802
+ onClick: Y,
7803
+ rel: ie,
7798
7804
  "data-testid": a,
7799
7805
  children: r
7800
7806
  }
7801
7807
  );
7802
7808
  }
7803
- const { ariaDescribedBy: y, ariaLabel: b, ariaLabelledBy: T, onClick: L, role: D, selected: A } = t;
7809
+ const { ariaDescribedBy: b, ariaLabel: T, ariaLabelledBy: L, onClick: D, role: A, selected: P } = t;
7804
7810
  return /* @__PURE__ */ M.jsx(
7805
7811
  "button",
7806
7812
  {
7807
- ...p(),
7808
- "aria-label": b,
7809
- "aria-labelledby": T,
7810
- className: pe(G1.baseBtn, v, i),
7811
- role: D,
7813
+ ...v(),
7814
+ "aria-label": T,
7815
+ "aria-labelledby": L,
7816
+ className: pe(G1.baseBtn, y, i),
7817
+ role: A,
7812
7818
  disabled: l,
7813
- onClick: L,
7814
- "aria-pressed": h,
7815
- "aria-selected": A,
7816
- "aria-describedby": y,
7819
+ onClick: D,
7820
+ "aria-pressed": h ? f : void 0,
7821
+ "aria-selected": P,
7822
+ "aria-describedby": b,
7817
7823
  "data-testid": a,
7818
7824
  children: r
7819
7825
  }
@@ -12954,6 +12960,7 @@ function mA({
12954
12960
  { [nc["button--selected"]]: r },
12955
12961
  i.className
12956
12962
  ),
12963
+ isToggleButton: !0,
12957
12964
  children: /* @__PURE__ */ M.jsx(
12958
12965
  dt,
12959
12966
  {
@@ -12969,14 +12976,15 @@ const Fk = "_feedTile_123y5_120", Ik = "_feedTile__icon_123y5_133", Ll = {
12969
12976
  feedTile: Fk,
12970
12977
  feedTile__icon: Ik,
12971
12978
  "feedTile--fullWidth": "_feedTile--fullWidth_123y5_157"
12972
- }, gA = ({ fullWidth: t, icon: e, onClick: n, text: r }) => /* @__PURE__ */ M.jsxs(
12979
+ }, gA = ({ ariaLabel: t, fullWidth: e, icon: n, onClick: r, text: i }) => /* @__PURE__ */ M.jsxs(
12973
12980
  Bt,
12974
12981
  {
12975
- onClick: n,
12976
- className: pe(Ll.feedTile, { [Ll["feedTile--fullWidth"]]: t }),
12982
+ ariaLabel: t,
12983
+ onClick: r,
12984
+ className: pe(Ll.feedTile, { [Ll["feedTile--fullWidth"]]: e }),
12977
12985
  children: [
12978
- /* @__PURE__ */ M.jsx(dt, { className: Ll.feedTile__icon, name: e }),
12979
- typeof r == "string" ? /* @__PURE__ */ M.jsx(De, { type: "body-regular", className: Ll.feedTile__text, children: r }) : /* @__PURE__ */ M.jsx("span", { className: Ll.feedTile__text, children: r })
12986
+ /* @__PURE__ */ M.jsx(dt, { className: Ll.feedTile__icon, name: n }),
12987
+ typeof i == "string" ? /* @__PURE__ */ M.jsx(De, { type: "body-regular", className: Ll.feedTile__text, children: i }) : /* @__PURE__ */ M.jsx("span", { className: Ll.feedTile__text, children: i })
12980
12988
  ]
12981
12989
  }
12982
12990
  ), Dk = "_menuTile_1lvni_120", Vk = "_menuTile__value_1lvni_140", rc = {
@@ -12985,23 +12993,25 @@ const Fk = "_feedTile_123y5_120", Ik = "_feedTile__icon_123y5_133", Ll = {
12985
12993
  "menuTile--icon": "_menuTile--icon_1lvni_136",
12986
12994
  menuTile__value: Vk
12987
12995
  }, vA = ({
12988
- fullWidth: t = !1,
12989
- icon: e,
12990
- primaryText: n,
12991
- secondaryText: r,
12992
- ...i
12996
+ ariaLabel: t,
12997
+ fullWidth: e = !1,
12998
+ icon: n,
12999
+ primaryText: r,
13000
+ secondaryText: i,
13001
+ ...a
12993
13002
  }) => /* @__PURE__ */ M.jsxs(
12994
13003
  Bt,
12995
13004
  {
12996
- ...i,
13005
+ ...a,
13006
+ ariaLabel: t,
12997
13007
  className: pe(rc.menuTile, {
12998
- [rc["menuTile--icon"]]: e,
12999
- [rc["menuTile--fullWidth"]]: t
13008
+ [rc["menuTile--icon"]]: n,
13009
+ [rc["menuTile--fullWidth"]]: e
13000
13010
  }),
13001
13011
  children: [
13002
- e && /* @__PURE__ */ M.jsx(dt, { name: e }),
13003
- n && /* @__PURE__ */ M.jsx(De, { type: "detail-bold", className: rc.menuTile__value, children: n }),
13004
- r && /* @__PURE__ */ M.jsx(De, { type: "detail-medium", children: r })
13012
+ n && /* @__PURE__ */ M.jsx(dt, { name: n }),
13013
+ r && /* @__PURE__ */ M.jsx(De, { type: "detail-bold", className: rc.menuTile__value, children: r }),
13014
+ i && /* @__PURE__ */ M.jsx(De, { type: "detail-medium", children: i })
13005
13015
  ]
13006
13016
  }
13007
13017
  );
@@ -8,6 +8,7 @@ interface CommonProps {
8
8
  className?: string;
9
9
  'data-testid'?: string;
10
10
  disabled?: boolean;
11
+ isToggleButton?: boolean;
11
12
  ref?: ForwardedRef<null>;
12
13
  role?: AriaRole;
13
14
  selected?: boolean;
@@ -1,3 +1,3 @@
1
1
  import { default as FeedTileProps } from './FeedTile.types';
2
- declare const FeedTile: ({ fullWidth, icon, onClick, text }: FeedTileProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const FeedTile: ({ ariaLabel, fullWidth, icon, onClick, text }: FeedTileProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default FeedTile;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { Icon32 } from '../../../../Base/Icon/Icon.types';
3
3
  import { BaseButtonProps } from '../../../Buttons/Button/Button.types';
4
4
  export default interface FeedTileProps {
5
+ ariaLabel?: string;
5
6
  fullWidth?: boolean;
6
7
  icon: Icon32;
7
8
  onClick?: BaseButtonProps['onClick'];
@@ -1,3 +1,3 @@
1
1
  import { default as MenuTileProps } from './MenuTile.type';
2
- declare const MenuTile: ({ fullWidth, icon, primaryText, secondaryText, ...props }: MenuTileProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const MenuTile: ({ ariaLabel, fullWidth, icon, primaryText, secondaryText, ...props }: MenuTileProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default MenuTile;
@@ -1,6 +1,7 @@
1
1
  import { Icon32 } from '../../../../Base/Icon/Icon.types';
2
2
  import { ButtonProps } from '../../Button/Button.types';
3
3
  export default interface MenuTileProps extends Omit<ButtonProps, 'children'> {
4
+ ariaLabel?: string;
4
5
  fullWidth?: boolean;
5
6
  icon?: Icon32;
6
7
  primaryText?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/ui",
3
- "version": "3.0.0-development.4",
3
+ "version": "3.0.0-development.5",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",