@clubmed/trident-ui 1.3.0-beta.7 → 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 +20 -0
- package/README.md +11 -1
- package/molecules/Buttons/Button.d.ts +4 -0
- package/molecules/Buttons/Button.js +12 -10
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.d.ts +5 -0
- package/molecules/Buttons/ButtonAnchor.js +13 -10
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/FakeButton.d.ts +7 -6
- package/molecules/Buttons/FakeButton.js +5 -24
- package/molecules/Buttons/FakeButton.js.map +1 -1
- package/molecules/Buttons/InertButton.d.ts +1 -1
- package/molecules/Buttons/InertButton.js +9 -8
- package/molecules/Buttons/InertButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.d.ts +2285 -6
- package/molecules/Buttons/v2/Button.js +51 -26
- package/molecules/Buttons/v2/Button.js.map +1 -1
- package/package.json +28 -9
- package/molecules/Buttons/v2/ButtonAnchor.d.ts +0 -12
- package/molecules/Buttons/v2/ButtonAnchor.js +0 -32
- package/molecules/Buttons/v2/ButtonAnchor.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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
|
+
|
|
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)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **dependencies:** add @clubmed/trident-icons to peerDependencies and devDependencies ([ce9f885](https://scm.clubmed.com/clubmed/ui/trident-ui/-/commit/ce9f885f8a20edfdfc3dd4d8ceb71008893afbca))
|
|
22
|
+
|
|
3
23
|
# [1.3.0-beta.7](https://scm.clubmed.com/clubmed/ui/trident-ui/compare/v1.3.0-beta.6...v1.3.0-beta.7) (2025-08-04)
|
|
4
24
|
|
|
5
25
|
|
package/README.md
CHANGED
|
@@ -31,10 +31,20 @@ React UI components is a library of reusable components for building web applica
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
npm install --save @clubmed/trident-ui react react-dom @react-spring/web
|
|
34
|
+
npm install --save @clubmed/trident-icons @clubmed/trident-ui react react-dom @react-spring/web
|
|
35
35
|
npm install --save-dev tailwindcss postcss autoprefixer
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
```sh
|
|
39
|
+
yarn add @clubmed/trident-icons @clubmed/trident-ui react react-dom @react-spring/web
|
|
40
|
+
yarn add -D tailwindcss postcss autoprefixer
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
pnpm add @clubmed/trident-icons @clubmed/trident-ui react react-dom @react-spring/web
|
|
45
|
+
pnpm add -D tailwindcss postcss autoprefixer
|
|
46
|
+
```
|
|
47
|
+
|
|
38
48
|
## Tailwind configuration
|
|
39
49
|
|
|
40
50
|
This package exports a `tailwind.preset` file that you can use to extend your own configuration.
|
|
@@ -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
|
|
1
|
+
import { jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Button as
|
|
4
|
-
const
|
|
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
|
-
},
|
|
40
|
-
const
|
|
39
|
+
}, c = ({ dataTestId: o, ...t }) => {
|
|
40
|
+
const e = {
|
|
41
|
+
"data-testid": o,
|
|
41
42
|
...t,
|
|
42
|
-
...
|
|
43
|
+
...a[t.theme] || {},
|
|
43
44
|
...r[t.variant] || {}
|
|
44
45
|
};
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
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
|
-
|
|
53
|
+
a as BUTTON_THEME_LEGACY,
|
|
52
54
|
r as BUTTON_VARIANT_LEGACY,
|
|
53
|
-
|
|
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
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
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
|
-
|
|
8
|
-
...
|
|
8
|
+
component: t.component || "a",
|
|
9
|
+
...r[t.theme] || {},
|
|
10
|
+
...m[t.variant] || {}
|
|
9
11
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
2
|
-
import { type ButtonProps } from './v2/Button.type';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import './v2/Button.css';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
2
|
-
import { BUTTON_VARIANT_LEGACY as
|
|
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
|
|
5
|
-
const
|
|
4
|
+
const i = (t) => {
|
|
5
|
+
const e = {
|
|
6
6
|
...t,
|
|
7
7
|
...o[t.theme] || {},
|
|
8
|
-
...
|
|
8
|
+
...r[t.variant] || {}
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
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
|
-
|
|
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
|
|
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;"}
|