@clubmed/trident-ui 1.3.0-beta.8 → 1.3.0-beta.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # ClubMed React UI components changelog
2
2
 
3
+ # [1.3.0-beta.9](https://scm.clubmed.com/clubmed/ui/trident-ui/compare/v1.3.0-beta.8...v1.3.0-beta.9) (2025-08-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **button:** deprecated FakeButton & AnchorButton in favor of Button v2 and update stories ([4c5d6a0](https://scm.clubmed.com/clubmed/ui/trident-ui/-/commit/4c5d6a04625f7839bd179dd277239e31d24e0ce0))
9
+ * **button:** fix displayName for FakeButton and improve disabled support for Button v2 ([55dea5c](https://scm.clubmed.com/clubmed/ui/trident-ui/-/commit/55dea5c2f5871a1b770ab7194f9d1a16593f983a))
10
+
11
+
12
+ ### Features
13
+
14
+ * **button:** add component property on Button v2 and allow root tag name customization ([078d91a](https://scm.clubmed.com/clubmed/ui/trident-ui/-/commit/078d91a06db14070c69cc01c30c6eaf8e9f0458a))
15
+
3
16
  # [1.3.0-beta.8](https://scm.clubmed.com/clubmed/ui/trident-ui/compare/v1.3.0-beta.7...v1.3.0-beta.8) (2025-08-06)
4
17
 
5
18
 
@@ -41,6 +41,10 @@ export type ButtonPropsLegacy = {
41
41
  * @deprecated
42
42
  */
43
43
  groupName?: string;
44
+ /**
45
+ * @deprecated use `data-testid` instead
46
+ */
47
+ dataTestId?: string;
44
48
  };
45
49
  export type CommonButtonProps = Omit<ButtonPropsV2, 'theme' | 'variant'> & ButtonPropsLegacy;
46
50
  type ButtonProps = CommonButtonProps & ButtonHTMLAttributes<HTMLButtonElement>;
@@ -1,7 +1,7 @@
1
- import { jsxs as e } from "react/jsx-runtime";
1
+ import { jsxs as l } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Button as l } from "./v2/Button.js";
4
- const i = {
3
+ import { Button as i } from "./v2/Button.js";
4
+ const a = {
5
5
  white: {
6
6
  color: "white",
7
7
  theme: "solid"
@@ -36,20 +36,22 @@ const i = {
36
36
  label: void 0,
37
37
  size: "large"
38
38
  }
39
- }, m = (t) => {
40
- const o = {
39
+ }, c = ({ dataTestId: o, ...t }) => {
40
+ const e = {
41
+ "data-testid": o,
41
42
  ...t,
42
- ...i[t.theme] || {},
43
+ ...a[t.theme] || {},
43
44
  ...r[t.variant] || {}
44
45
  };
45
- return /* @__PURE__ */ e(l, { ...o, children: [
46
- o.label,
46
+ return /* @__PURE__ */ l(i, { ...e, children: [
47
+ e.label,
47
48
  t.children
48
49
  ] });
49
50
  };
51
+ c.displayName = "Button";
50
52
  export {
51
- i as BUTTON_THEME_LEGACY,
53
+ a as BUTTON_THEME_LEGACY,
52
54
  r as BUTTON_VARIANT_LEGACY,
53
- m as Button
55
+ c as Button
54
56
  };
55
57
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../lib/molecules/Buttons/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, type FunctionComponent, type ReactNode } from 'react';\nimport { Button as ButtonV2, type ButtonProps as ButtonPropsV2 } from './v2/Button.js';\nimport type { IconicNames, IconicTypes } from '@clubmed/trident-icons';\n\nexport const BUTTON_THEME_LEGACY: any = {\n white: {\n color: 'white',\n theme: 'solid',\n },\n black: {\n color: 'black',\n theme: 'solid',\n },\n yellow: {\n color: 'saffron',\n theme: 'solid',\n },\n whiteStroke: {\n color: 'white',\n theme: 'outline',\n },\n blackStroke: {\n color: 'black',\n theme: 'outline',\n },\n};\n\nexport const BUTTON_VARIANT_LEGACY: any = {\n textSmall: {\n size: 'small',\n variant: undefined,\n },\n icon: {\n variant: 'circle',\n label: undefined,\n },\n arrow: {\n variant: 'circle',\n label: undefined,\n size: 'large',\n },\n};\n\nexport type ButtonPropsLegacy = {\n /**\n * Button themes defining background color and text/icon color\n */\n theme?: 'yellow' | 'white' | 'black' | 'whiteStroke' | 'blackStroke' | ButtonPropsV2['theme'];\n /**\n * Is it a text button? An icon button? An arrow button?\n */\n variant?: 'text' | 'textSmall' | 'icon' | 'arrow' | 'monogram' | ButtonPropsV2['variant'];\n /**\n * Background Color override\n * Ideally please use ONLY for the \"white\" and \"black\" themes\n * @deprecated\n */\n backgroundOverride?: string;\n /**\n * Button contents\n * @deprecated\n */\n label?: string;\n /**\n * Optional children (you might never use this, please actually try to avoid it)\n */\n children?: ReactNode;\n /**\n * Optional icon name\n */\n icon?: IconicNames;\n /**\n * Force the icon type to be svg, font or default\n */\n iconType?: IconicTypes;\n /**\n * Group name\n * Used to group buttons together (you might not need this)\n * @deprecated\n */\n groupName?: string;\n};\n\nexport type CommonButtonProps = Omit<ButtonPropsV2, 'theme' | 'variant'> & ButtonPropsLegacy;\n\ntype ButtonProps = CommonButtonProps & ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Button: FunctionComponent<ButtonProps> = (props: ButtonProps) => {\n const opts = {\n ...props,\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <ButtonV2 {...opts}>\n {opts.label}\n {props.children}\n </ButtonV2>\n );\n};\n"],"names":["BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","Button","props","opts","jsxs","ButtonV2"],"mappings":";;;AAIO,MAAMA,IAA2B;AAAA,EACtC,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX,GAEaC,IAA6B;AAAA,EACxC,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAEV,GA8CaC,IAAyC,CAACC,MAAuB;AAC5E,QAAMC,IAAO;AAAA,IACX,GAAGD;AAAA,IACH,GAAIH,EAAoBG,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIF,EAAsBE,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAE,EAACC,GAAA,EAAU,GAAGF,GACX,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../lib/molecules/Buttons/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, type FunctionComponent, type ReactNode } from 'react';\nimport { Button as ButtonV2, type ButtonProps as ButtonPropsV2 } from './v2/Button.js';\nimport type { IconicNames, IconicTypes } from '@clubmed/trident-icons';\n\nexport const BUTTON_THEME_LEGACY: any = {\n white: {\n color: 'white',\n theme: 'solid',\n },\n black: {\n color: 'black',\n theme: 'solid',\n },\n yellow: {\n color: 'saffron',\n theme: 'solid',\n },\n whiteStroke: {\n color: 'white',\n theme: 'outline',\n },\n blackStroke: {\n color: 'black',\n theme: 'outline',\n },\n};\n\nexport const BUTTON_VARIANT_LEGACY: any = {\n textSmall: {\n size: 'small',\n variant: undefined,\n },\n icon: {\n variant: 'circle',\n label: undefined,\n },\n arrow: {\n variant: 'circle',\n label: undefined,\n size: 'large',\n },\n};\n\nexport type ButtonPropsLegacy = {\n /**\n * Button themes defining background color and text/icon color\n */\n theme?: 'yellow' | 'white' | 'black' | 'whiteStroke' | 'blackStroke' | ButtonPropsV2['theme'];\n /**\n * Is it a text button? An icon button? An arrow button?\n */\n variant?: 'text' | 'textSmall' | 'icon' | 'arrow' | 'monogram' | ButtonPropsV2['variant'];\n /**\n * Background Color override\n * Ideally please use ONLY for the \"white\" and \"black\" themes\n * @deprecated\n */\n backgroundOverride?: string;\n /**\n * Button contents\n * @deprecated\n */\n label?: string;\n /**\n * Optional children (you might never use this, please actually try to avoid it)\n */\n children?: ReactNode;\n /**\n * Optional icon name\n */\n icon?: IconicNames;\n /**\n * Force the icon type to be svg, font or default\n */\n iconType?: IconicTypes;\n /**\n * Group name\n * Used to group buttons together (you might not need this)\n * @deprecated\n */\n groupName?: string;\n /**\n * @deprecated use `data-testid` instead\n */\n dataTestId?: string;\n};\n\nexport type CommonButtonProps = Omit<ButtonPropsV2, 'theme' | 'variant'> & ButtonPropsLegacy;\n\ntype ButtonProps = CommonButtonProps & ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Button: FunctionComponent<ButtonProps> = ({ dataTestId, ...props }) => {\n const opts = {\n 'data-testid': dataTestId,\n ...props,\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <ButtonV2 {...opts}>\n {opts.label}\n {props.children}\n </ButtonV2>\n );\n};\n\nButton.displayName = 'Button';\n"],"names":["BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","Button","dataTestId","props","opts","jsxs","ButtonV2"],"mappings":";;;AAIO,MAAMA,IAA2B;AAAA,EACtC,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,aAAa;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAEX,GAEaC,IAA6B;AAAA,EACxC,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAAA,EAEX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,SAAS;AAAA,IACT,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAEV,GAkDaC,IAAyC,CAAC,EAAE,YAAAC,GAAY,GAAGC,QAAY;AAClF,QAAMC,IAAO;AAAA,IACX,eAAeF;AAAA,IACf,GAAGC;AAAA,IACH,GAAIJ,EAAoBI,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIH,EAAsBG,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAE,EAACC,GAAA,EAAU,GAAGF,GACX,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;AAEAF,EAAO,cAAc;"}
@@ -3,5 +3,10 @@ import { type CommonButtonProps } from './Button';
3
3
  type ButtonAnchorProps = CommonButtonProps & {
4
4
  component?: FunctionComponent<PropsWithChildren<any>> | string;
5
5
  } & AnchorHTMLAttributes<HTMLAnchorElement>;
6
+ /**
7
+ * @deprecated use Button with `component="a"` instead
8
+ * @param dataTestId
9
+ * @param props
10
+ */
6
11
  export declare const ButtonAnchor: FunctionComponent<ButtonAnchorProps>;
7
12
  export {};
@@ -1,18 +1,21 @@
1
- import { jsxs as n } from "react/jsx-runtime";
2
- import { ButtonAnchor as r } from "./v2/ButtonAnchor.js";
3
- import { BUTTON_VARIANT_LEGACY as c, BUTTON_THEME_LEGACY as e } from "./Button.js";
4
- const i = (t) => {
5
- const o = {
1
+ import { jsxs as e } from "react/jsx-runtime";
2
+ import { BUTTON_VARIANT_LEGACY as m, BUTTON_THEME_LEGACY as r } from "./Button.js";
3
+ import { Button as a } from "./v2/Button.js";
4
+ const c = ({ dataTestId: o, ...t }) => {
5
+ const n = {
6
+ "data-testid": o,
6
7
  ...t,
7
- ...e[t.theme] || {},
8
- ...c[t.variant] || {}
8
+ component: t.component || "a",
9
+ ...r[t.theme] || {},
10
+ ...m[t.variant] || {}
9
11
  };
10
- return /* @__PURE__ */ n(r, { ...o, children: [
11
- o.label,
12
+ return /* @__PURE__ */ e(a, { ...n, children: [
13
+ n.label,
12
14
  t.children
13
15
  ] });
14
16
  };
17
+ c.displayName = "ButtonAnchor";
15
18
  export {
16
- i as ButtonAnchor
19
+ c as ButtonAnchor
17
20
  };
18
21
  //# sourceMappingURL=ButtonAnchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAnchor.js","sources":["../../../lib/molecules/Buttons/ButtonAnchor.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\nimport { ButtonAnchor as ButtonAnchorV2 } from './v2/ButtonAnchor';\nimport { BUTTON_THEME_LEGACY, BUTTON_VARIANT_LEGACY, type CommonButtonProps } from './Button';\n\ntype ButtonAnchorProps = CommonButtonProps & {\n component?: FunctionComponent<PropsWithChildren<any>> | string;\n} & AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const ButtonAnchor: FunctionComponent<ButtonAnchorProps> = (props) => {\n const opts = {\n ...props,\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <ButtonAnchorV2 {...opts}>\n {opts.label}\n {props.children}\n </ButtonAnchorV2>\n );\n};\n"],"names":["ButtonAnchor","props","opts","BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","jsxs","ButtonAnchorV2"],"mappings":";;;AAQO,MAAMA,IAAqD,CAACC,MAAU;AAC3E,QAAMC,IAAO;AAAA,IACX,GAAGD;AAAA,IACH,GAAIE,EAAoBF,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIG,EAAsBH,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAI,EAACC,GAAA,EAAgB,GAAGJ,GACjB,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;"}
1
+ {"version":3,"file":"ButtonAnchor.js","sources":["../../../lib/molecules/Buttons/ButtonAnchor.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\nimport { BUTTON_THEME_LEGACY, BUTTON_VARIANT_LEGACY, type CommonButtonProps } from './Button';\nimport { Button } from '@/molecules/Buttons/v2/Button';\n\ntype ButtonAnchorProps = CommonButtonProps & {\n component?: FunctionComponent<PropsWithChildren<any>> | string;\n} & AnchorHTMLAttributes<HTMLAnchorElement>;\n\n/**\n * @deprecated use Button with `component=\"a\"` instead\n * @param dataTestId\n * @param props\n */\nexport const ButtonAnchor: FunctionComponent<ButtonAnchorProps> = ({ dataTestId, ...props }) => {\n const opts = {\n 'data-testid': dataTestId,\n ...props,\n component: props.component || 'a',\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <Button {...opts}>\n {opts.label}\n {props.children}\n </Button>\n );\n};\n\nButtonAnchor.displayName = 'ButtonAnchor';\n"],"names":["ButtonAnchor","dataTestId","props","opts","BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","jsxs","Button"],"mappings":";;;AAaO,MAAMA,IAAqD,CAAC,EAAE,YAAAC,GAAY,GAAGC,QAAY;AAC9F,QAAMC,IAAO;AAAA,IACX,eAAeF;AAAA,IACf,GAAGC;AAAA,IACH,WAAWA,EAAM,aAAa;AAAA,IAC9B,GAAIE,EAAoBF,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIG,EAAsBH,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAI,EAACC,GAAA,EAAQ,GAAGJ,GACT,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;AAEAF,EAAa,cAAc;"}
@@ -1,7 +1,8 @@
1
- import type { ComponentPropsWithoutRef, FunctionComponent } from 'react';
2
- import { type ButtonProps } from './v2/Button.type';
1
+ import type { FunctionComponent } from 'react';
3
2
  import './v2/Button.css';
4
- interface Props extends ButtonProps, Omit<ComponentPropsWithoutRef<'span'>, 'color'> {
5
- }
6
- export declare const FakeButton: FunctionComponent<Props>;
7
- export {};
3
+ import { type FakeButtonProps } from './v2/Button';
4
+ /**
5
+ * @deprecated use Button with `component="span"` instead
6
+ * @param props
7
+ */
8
+ export declare const FakeButton: FunctionComponent<Omit<FakeButtonProps, 'component'>>;
@@ -1,27 +1,8 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { c as l } from "../../chunks/index.js";
3
- import { getButtonClasses as f } from "./v2/Button.type.js";
4
- import { ButtonContent as c } from "./ButtonContent.js";
5
- /* empty css */
6
- const g = ({
7
- className: t,
8
- children: r,
9
- color: s = "saffron",
10
- icon: m,
11
- iconWidth: n,
12
- size: e = "medium",
13
- theme: a = "solid",
14
- variant: i = "pill",
15
- ...p
16
- }) => /* @__PURE__ */ o(
17
- "span",
18
- {
19
- ...p,
20
- className: l(f({ color: s, size: e, theme: a, variant: i }), t),
21
- children: /* @__PURE__ */ o(c, { icon: m, iconWidth: n, children: r })
22
- }
23
- );
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Button as o } from "./v2/Button.js";
3
+ const e = (t) => /* @__PURE__ */ n(o, { component: "span", ...t, children: t.children });
4
+ e.displayName = "FakeButton";
24
5
  export {
25
- g as FakeButton
6
+ e as FakeButton
26
7
  };
27
8
  //# sourceMappingURL=FakeButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FakeButton.js","sources":["../../../lib/molecules/Buttons/FakeButton.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { ComponentPropsWithoutRef, FunctionComponent } from 'react';\n\nimport { getButtonClasses, type ButtonProps } from './v2/Button.type';\n\nimport { ButtonContent } from './ButtonContent';\n\nimport './v2/Button.css';\n\ninterface Props extends ButtonProps, Omit<ComponentPropsWithoutRef<'span'>, 'color'> {}\n\nexport const FakeButton: FunctionComponent<Props> = ({\n className,\n children,\n color = 'saffron',\n icon,\n iconWidth,\n size = 'medium',\n theme = 'solid',\n variant = 'pill',\n ...attrs\n}) => {\n return (\n <span\n {...attrs}\n className={classnames(getButtonClasses({ color, size, theme, variant }), className)}\n >\n <ButtonContent icon={icon} iconWidth={iconWidth}>\n {children}\n </ButtonContent>\n </span>\n );\n};\n"],"names":["FakeButton","className","children","color","icon","iconWidth","size","theme","variant","attrs","jsx","classnames","getButtonClasses","ButtonContent"],"mappings":";;;;;AAWO,MAAMA,IAAuC,CAAC;AAAA,EACnD,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAGD;AAAA,IACJ,WAAWE,EAAWC,EAAiB,EAAE,OAAAT,GAAO,MAAAG,GAAM,OAAAC,GAAO,SAAAC,GAAS,GAAGP,CAAS;AAAA,IAElF,UAAA,gBAAAS,EAACG,GAAA,EAAc,MAAAT,GAAY,WAAAC,GACxB,UAAAH,EAAA,CACH;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"FakeButton.js","sources":["../../../lib/molecules/Buttons/FakeButton.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport './v2/Button.css';\nimport { Button, type FakeButtonProps } from '@/molecules/Buttons/v2/Button';\n\n/**\n * @deprecated use Button with `component=\"span\"` instead\n * @param props\n */\nexport const FakeButton: FunctionComponent<Omit<FakeButtonProps, 'component'>> = (props) => {\n return (\n <Button component={'span'} {...props}>\n {props.children}\n </Button>\n );\n};\n\nFakeButton.displayName = 'FakeButton';\n"],"names":["FakeButton","props","Button"],"mappings":";;AASO,MAAMA,IAAoE,CAACC,wBAE7EC,GAAA,EAAO,WAAW,QAAS,GAAGD,GAC5B,YAAM,UACT;AAIJD,EAAW,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import type { FunctionComponent } from 'react';
2
2
  import { type CommonButtonProps } from './Button';
3
3
  /**
4
- * @deprecated Use `FakeButton` instead.
4
+ * @deprecated use Button with `component="span"` instead
5
5
  * @param props
6
6
  */
7
7
  export declare const InertButton: FunctionComponent<CommonButtonProps>;
@@ -1,18 +1,19 @@
1
- import { jsxs as e } from "react/jsx-runtime";
2
- import { BUTTON_VARIANT_LEGACY as n, BUTTON_THEME_LEGACY as o } from "./Button.js";
1
+ import { jsxs as n } from "react/jsx-runtime";
2
+ import { BUTTON_VARIANT_LEGACY as r, BUTTON_THEME_LEGACY as o } from "./Button.js";
3
3
  import { FakeButton as m } from "./FakeButton.js";
4
- const c = (t) => {
5
- const r = {
4
+ const i = (t) => {
5
+ const e = {
6
6
  ...t,
7
7
  ...o[t.theme] || {},
8
- ...n[t.variant] || {}
8
+ ...r[t.variant] || {}
9
9
  };
10
- return /* @__PURE__ */ e(m, { ...r, children: [
11
- r.label,
10
+ return /* @__PURE__ */ n(m, { ...e, children: [
11
+ e.label,
12
12
  t.children
13
13
  ] });
14
14
  };
15
+ i.displayName = "InertButton";
15
16
  export {
16
- c as InertButton
17
+ i as InertButton
17
18
  };
18
19
  //# sourceMappingURL=InertButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InertButton.js","sources":["../../../lib/molecules/Buttons/InertButton.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport { BUTTON_THEME_LEGACY, BUTTON_VARIANT_LEGACY, type CommonButtonProps } from './Button';\nimport { FakeButton } from '@/molecules/Buttons/FakeButton';\n\n/**\n * @deprecated Use `FakeButton` instead.\n * @param props\n */\nexport const InertButton: FunctionComponent<CommonButtonProps> = (props) => {\n const opts = {\n ...props,\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <FakeButton {...opts}>\n {opts.label}\n {props.children}\n </FakeButton>\n );\n};\n"],"names":["InertButton","props","opts","BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","jsxs","FakeButton"],"mappings":";;;AASO,MAAMA,IAAoD,CAACC,MAAU;AAC1E,QAAMC,IAAO;AAAA,IACX,GAAGD;AAAA,IACH,GAAIE,EAAoBF,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIG,EAAsBH,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAI,EAACC,GAAA,EAAY,GAAGJ,GACb,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;"}
1
+ {"version":3,"file":"InertButton.js","sources":["../../../lib/molecules/Buttons/InertButton.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport { BUTTON_THEME_LEGACY, BUTTON_VARIANT_LEGACY, type CommonButtonProps } from './Button';\nimport { FakeButton } from '@/molecules/Buttons/FakeButton';\n\n/**\n * @deprecated use Button with `component=\"span\"` instead\n * @param props\n */\nexport const InertButton: FunctionComponent<CommonButtonProps> = (props) => {\n const opts = {\n ...props,\n ...(BUTTON_THEME_LEGACY[props.theme!] || {}),\n ...(BUTTON_VARIANT_LEGACY[props.variant!] || {}),\n };\n\n return (\n <FakeButton {...opts}>\n {opts.label}\n {props.children}\n </FakeButton>\n );\n};\n\nInertButton.displayName = 'InertButton';\n"],"names":["InertButton","props","opts","BUTTON_THEME_LEGACY","BUTTON_VARIANT_LEGACY","jsxs","FakeButton"],"mappings":";;;AASO,MAAMA,IAAoD,CAACC,MAAU;AAC1E,QAAMC,IAAO;AAAA,IACX,GAAGD;AAAA,IACH,GAAIE,EAAoBF,EAAM,KAAM,KAAK,CAAA;AAAA,IACzC,GAAIG,EAAsBH,EAAM,OAAQ,KAAK,CAAA;AAAA,EAAC;AAGhD,SACE,gBAAAI,EAACC,GAAA,EAAY,GAAGJ,GACb,UAAA;AAAA,IAAAA,EAAK;AAAA,IACLD,EAAM;AAAA,EAAA,GACT;AAEJ;AAEAD,EAAY,cAAc;"}