cakeinpanic-widget 1.0.0
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/dist/cjs/button/Button.js +43 -0
- package/dist/cjs/button/Button.js.map +1 -0
- package/dist/cjs/button/Button.module.css.js +6 -0
- package/dist/cjs/button/Button.module.css.js.map +1 -0
- package/dist/cjs/index.css +1 -0
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/button/Button.mjs +39 -0
- package/dist/esm/button/Button.mjs.map +1 -0
- package/dist/esm/button/Button.module.css.mjs +4 -0
- package/dist/esm/button/Button.module.css.mjs.map +1 -0
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/types/button/Button.d.ts +21 -0
- package/dist/types/button/Button.d.ts.map +1 -0
- package/dist/types/button/index.d.ts +3 -0
- package/dist/types/button/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const react = require('react');
|
|
6
|
+
const cn = require('classnames');
|
|
7
|
+
const Button_module = require('./Button.module.css.js');
|
|
8
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
const Button = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
11
|
+
let {
|
|
12
|
+
size = 'md',
|
|
13
|
+
variant = 'filled',
|
|
14
|
+
color = 'primary',
|
|
15
|
+
fullwidth = false,
|
|
16
|
+
loading = false,
|
|
17
|
+
disabled,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...rest
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
23
|
+
ref: ref,
|
|
24
|
+
disabled: disabled || loading,
|
|
25
|
+
className: cn(Button_module.button, Button_module[size], Button_module[variant], Button_module[color], {
|
|
26
|
+
[Button_module.fullwidth]: fullwidth,
|
|
27
|
+
[Button_module.loading]: loading
|
|
28
|
+
}, className),
|
|
29
|
+
...rest,
|
|
30
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
31
|
+
className: cn(Button_module.content, {
|
|
32
|
+
[Button_module.hidden]: loading
|
|
33
|
+
}),
|
|
34
|
+
children: children
|
|
35
|
+
}), loading && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36
|
+
className: Button_module.loader
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
Button.displayName = 'Button';
|
|
41
|
+
|
|
42
|
+
exports.Button = Button;
|
|
43
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/button/Button.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, forwardRef, ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Button.module.css'\n\nexport type ButtonSize = 'sm' | 'md' | 'lg'\nexport type ButtonVariant = 'filled' | 'outlined' | 'ghost'\nexport type ButtonColor = 'primary' | 'secondary' | 'warning'\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n size?: ButtonSize\n variant?: ButtonVariant\n color?: ButtonColor\n fullwidth?: boolean\n loading?: boolean\n children?: ReactNode\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n size = 'md',\n variant = 'filled',\n color = 'primary',\n fullwidth = false,\n loading = false,\n disabled,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n return (\n <button\n ref={ref}\n disabled={disabled || loading}\n className={cn(\n styles.button,\n styles[size],\n styles[variant],\n styles[color],\n { [styles.fullwidth]: fullwidth, [styles.loading]: loading },\n className,\n )}\n {...rest}\n >\n <span className={cn(styles.content, { [styles.hidden]: loading })}>\n {children}\n </span>\n {loading && <span className={styles.loader} />}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n"],"names":["Button","forwardRef","_ref","ref","size","variant","color","fullwidth","loading","disabled","children","className","rest","_jsxs","cn","styles","button","_jsx","content","hidden","loader","displayName"],"mappings":";;;;;;;;;AAiBO,MAAMA,MAAM,gBAAGC,gBAAU,CAC9B,CAAAC,IAAA,EAYEC,GAAG,KACA;EAAA,IAZH;AACEC,IAAAA,IAAI,GAAG,IAAI;AACXC,IAAAA,OAAO,GAAG,QAAQ;AAClBC,IAAAA,KAAK,GAAG,SAAS;AACjBC,IAAAA,SAAS,GAAG,KAAK;AACjBC,IAAAA,OAAO,GAAG,KAAK;IACfC,QAAQ;IACRC,QAAQ;IACRC,SAAS;IACT,GAAGC,IAAAA;AACL,GAAC,GAAAV,IAAA,CAAA;AAGD,EAAA,oBACEW,eAAA,CAAA,QAAA,EAAA;AACEV,IAAAA,GAAG,EAAEA,GAAI;IACTM,QAAQ,EAAEA,QAAQ,IAAID,OAAQ;IAC9BG,SAAS,EAAEG,EAAE,CACXC,aAAM,CAACC,MAAM,EACbD,aAAM,CAACX,IAAI,CAAC,EACZW,aAAM,CAACV,OAAO,CAAC,EACfU,aAAM,CAACT,KAAK,CAAC,EACb;AAAE,MAAA,CAACS,aAAM,CAACR,SAAS,GAAGA,SAAS;MAAE,CAACQ,aAAM,CAACP,OAAO,GAAGA,OAAAA;KAAS,EAC5DG,SACF,CAAE;AAAA,IAAA,GACEC,IAAI;AAAAF,IAAAA,QAAA,gBAERO,cAAA,CAAA,MAAA,EAAA;AAAMN,MAAAA,SAAS,EAAEG,EAAE,CAACC,aAAM,CAACG,OAAO,EAAE;QAAE,CAACH,aAAM,CAACI,MAAM,GAAGX,OAAAA;AAAQ,OAAC,CAAE;AAAAE,MAAAA,QAAA,EAC/DA,QAAAA;AAAQ,KACL,CAAC,EACNF,OAAO,iBAAIS,cAAA,CAAA,MAAA,EAAA;MAAMN,SAAS,EAAEI,aAAM,CAACK,MAAAA;AAAO,KAAE,CAAC,CAAA;AAAA,GACxC,CAAC,CAAA;AAEb,CACF,EAAC;AAEDpB,MAAM,CAACqB,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const styles = {"button":"Button-module_button__eiKKZ","loading":"Button-module_loading__wZ1IR","sm":"Button-module_sm__Y4qjx","md":"Button-module_md__qbViT","lg":"Button-module_lg__vMNHM","filled":"Button-module_filled__7Ri6T","primary":"Button-module_primary__EU45Z","secondary":"Button-module_secondary__5BZ2i","warning":"Button-module_warning__8WIwI","outlined":"Button-module_outlined__kI-f-","ghost":"Button-module_ghost__OX4Ks","fullwidth":"Button-module_fullwidth__6G5sB","loader":"Button-module_loader__kuL68","spin":"Button-module_spin__Q6mex","content":"Button-module_content__SVjwi","hidden":"Button-module_hidden__vJlfj"};
|
|
4
|
+
|
|
5
|
+
module.exports = styles;
|
|
6
|
+
//# sourceMappingURL=Button.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Button-module_button__eiKKZ{align-items:center;border:none;border-radius:10px;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;gap:8px;justify-content:center;outline:none;overflow:hidden;position:relative;text-decoration:none;transition:background .15s ease,transform .1s ease,opacity .15s ease;white-space:nowrap}.Button-module_button__eiKKZ:active:not(.Button-module_loading__wZ1IR){transform:scale(.97)}.Button-module_button__eiKKZ.Button-module_loading__wZ1IR,.Button-module_button__eiKKZ:disabled{cursor:not-allowed;opacity:.5}.Button-module_sm__Y4qjx{font-size:13px;line-height:18px;min-height:34px;padding:8px 16px}.Button-module_md__qbViT{font-size:14px;line-height:20px;min-height:42px;padding:10px 20px}.Button-module_lg__vMNHM{font-size:16px;line-height:24px;min-height:52px;padding:14px 28px}.Button-module_filled__7Ri6T.Button-module_primary__EU45Z{background:linear-gradient(135deg,#00a3ff,#0047ff);color:#fff}.Button-module_filled__7Ri6T.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#33b5ff,#2260ff)}.Button-module_filled__7Ri6T.Button-module_secondary__5BZ2i{background:linear-gradient(135deg,#2d3748,#1a202c);color:#e2e8f0}.Button-module_filled__7Ri6T.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#3d4f65,#2a3244)}.Button-module_filled__7Ri6T.Button-module_warning__8WIwI{background:linear-gradient(135deg,#f6a623,#e07b00);color:#fff}.Button-module_filled__7Ri6T.Button-module_warning__8WIwI:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#f8b84a,#f09010)}.Button-module_outlined__kI-f-{background:transparent;border:1.5px solid}.Button-module_outlined__kI-f-.Button-module_primary__EU45Z{border-color:#0047ff;color:#0047ff}.Button-module_outlined__kI-f-.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(0,71,255,.07)}.Button-module_outlined__kI-f-.Button-module_secondary__5BZ2i{border-color:#718096;color:#718096}.Button-module_outlined__kI-f-.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(113,128,150,.07)}.Button-module_ghost__OX4Ks{background:transparent;border:none}.Button-module_ghost__OX4Ks.Button-module_primary__EU45Z{color:#0047ff}.Button-module_ghost__OX4Ks.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(0,71,255,.07)}.Button-module_ghost__OX4Ks.Button-module_secondary__5BZ2i{color:#718096}.Button-module_ghost__OX4Ks.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(113,128,150,.07)}.Button-module_fullwidth__6G5sB{width:100%}.Button-module_loader__kuL68{animation:Button-module_spin__Q6mex .7s linear infinite;border:2px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:16px;position:absolute;width:16px}@keyframes Button-module_spin__Q6mex{to{transform:rotate(1turn)}}.Button-module_content__SVjwi{align-items:center;display:flex;gap:8px}.Button-module_content__SVjwi.Button-module_hidden__vJlfj{visibility:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import styles from './Button.module.css.mjs';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
+
let {
|
|
8
|
+
size = 'md',
|
|
9
|
+
variant = 'filled',
|
|
10
|
+
color = 'primary',
|
|
11
|
+
fullwidth = false,
|
|
12
|
+
loading = false,
|
|
13
|
+
disabled,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/jsxs("button", {
|
|
19
|
+
ref: ref,
|
|
20
|
+
disabled: disabled || loading,
|
|
21
|
+
className: cn(styles.button, styles[size], styles[variant], styles[color], {
|
|
22
|
+
[styles.fullwidth]: fullwidth,
|
|
23
|
+
[styles.loading]: loading
|
|
24
|
+
}, className),
|
|
25
|
+
...rest,
|
|
26
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
27
|
+
className: cn(styles.content, {
|
|
28
|
+
[styles.hidden]: loading
|
|
29
|
+
}),
|
|
30
|
+
children: children
|
|
31
|
+
}), loading && /*#__PURE__*/jsx("span", {
|
|
32
|
+
className: styles.loader
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
Button.displayName = 'Button';
|
|
37
|
+
|
|
38
|
+
export { Button };
|
|
39
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.mjs","sources":["../../../src/button/Button.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, forwardRef, ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Button.module.css'\n\nexport type ButtonSize = 'sm' | 'md' | 'lg'\nexport type ButtonVariant = 'filled' | 'outlined' | 'ghost'\nexport type ButtonColor = 'primary' | 'secondary' | 'warning'\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n size?: ButtonSize\n variant?: ButtonVariant\n color?: ButtonColor\n fullwidth?: boolean\n loading?: boolean\n children?: ReactNode\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n size = 'md',\n variant = 'filled',\n color = 'primary',\n fullwidth = false,\n loading = false,\n disabled,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n return (\n <button\n ref={ref}\n disabled={disabled || loading}\n className={cn(\n styles.button,\n styles[size],\n styles[variant],\n styles[color],\n { [styles.fullwidth]: fullwidth, [styles.loading]: loading },\n className,\n )}\n {...rest}\n >\n <span className={cn(styles.content, { [styles.hidden]: loading })}>\n {children}\n </span>\n {loading && <span className={styles.loader} />}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n"],"names":["Button","forwardRef","_ref","ref","size","variant","color","fullwidth","loading","disabled","children","className","rest","_jsxs","cn","styles","button","_jsx","content","hidden","loader","displayName"],"mappings":";;;;;AAiBO,MAAMA,MAAM,gBAAGC,UAAU,CAC9B,CAAAC,IAAA,EAYEC,GAAG,KACA;EAAA,IAZH;AACEC,IAAAA,IAAI,GAAG,IAAI;AACXC,IAAAA,OAAO,GAAG,QAAQ;AAClBC,IAAAA,KAAK,GAAG,SAAS;AACjBC,IAAAA,SAAS,GAAG,KAAK;AACjBC,IAAAA,OAAO,GAAG,KAAK;IACfC,QAAQ;IACRC,QAAQ;IACRC,SAAS;IACT,GAAGC,IAAAA;AACL,GAAC,GAAAV,IAAA,CAAA;AAGD,EAAA,oBACEW,IAAA,CAAA,QAAA,EAAA;AACEV,IAAAA,GAAG,EAAEA,GAAI;IACTM,QAAQ,EAAEA,QAAQ,IAAID,OAAQ;IAC9BG,SAAS,EAAEG,EAAE,CACXC,MAAM,CAACC,MAAM,EACbD,MAAM,CAACX,IAAI,CAAC,EACZW,MAAM,CAACV,OAAO,CAAC,EACfU,MAAM,CAACT,KAAK,CAAC,EACb;AAAE,MAAA,CAACS,MAAM,CAACR,SAAS,GAAGA,SAAS;MAAE,CAACQ,MAAM,CAACP,OAAO,GAAGA,OAAAA;KAAS,EAC5DG,SACF,CAAE;AAAA,IAAA,GACEC,IAAI;AAAAF,IAAAA,QAAA,gBAERO,GAAA,CAAA,MAAA,EAAA;AAAMN,MAAAA,SAAS,EAAEG,EAAE,CAACC,MAAM,CAACG,OAAO,EAAE;QAAE,CAACH,MAAM,CAACI,MAAM,GAAGX,OAAAA;AAAQ,OAAC,CAAE;AAAAE,MAAAA,QAAA,EAC/DA,QAAAA;AAAQ,KACL,CAAC,EACNF,OAAO,iBAAIS,GAAA,CAAA,MAAA,EAAA;MAAMN,SAAS,EAAEI,MAAM,CAACK,MAAAA;AAAO,KAAE,CAAC,CAAA;AAAA,GACxC,CAAC,CAAA;AAEb,CACF,EAAC;AAEDpB,MAAM,CAACqB,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const styles = {"button":"Button-module_button__eiKKZ","loading":"Button-module_loading__wZ1IR","sm":"Button-module_sm__Y4qjx","md":"Button-module_md__qbViT","lg":"Button-module_lg__vMNHM","filled":"Button-module_filled__7Ri6T","primary":"Button-module_primary__EU45Z","secondary":"Button-module_secondary__5BZ2i","warning":"Button-module_warning__8WIwI","outlined":"Button-module_outlined__kI-f-","ghost":"Button-module_ghost__OX4Ks","fullwidth":"Button-module_fullwidth__6G5sB","loader":"Button-module_loader__kuL68","spin":"Button-module_spin__Q6mex","content":"Button-module_content__SVjwi","hidden":"Button-module_hidden__vJlfj"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
4
|
+
//# sourceMappingURL=Button.module.css.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.module.css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Button-module_button__eiKKZ{align-items:center;border:none;border-radius:10px;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;gap:8px;justify-content:center;outline:none;overflow:hidden;position:relative;text-decoration:none;transition:background .15s ease,transform .1s ease,opacity .15s ease;white-space:nowrap}.Button-module_button__eiKKZ:active:not(.Button-module_loading__wZ1IR){transform:scale(.97)}.Button-module_button__eiKKZ.Button-module_loading__wZ1IR,.Button-module_button__eiKKZ:disabled{cursor:not-allowed;opacity:.5}.Button-module_sm__Y4qjx{font-size:13px;line-height:18px;min-height:34px;padding:8px 16px}.Button-module_md__qbViT{font-size:14px;line-height:20px;min-height:42px;padding:10px 20px}.Button-module_lg__vMNHM{font-size:16px;line-height:24px;min-height:52px;padding:14px 28px}.Button-module_filled__7Ri6T.Button-module_primary__EU45Z{background:linear-gradient(135deg,#00a3ff,#0047ff);color:#fff}.Button-module_filled__7Ri6T.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#33b5ff,#2260ff)}.Button-module_filled__7Ri6T.Button-module_secondary__5BZ2i{background:linear-gradient(135deg,#2d3748,#1a202c);color:#e2e8f0}.Button-module_filled__7Ri6T.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#3d4f65,#2a3244)}.Button-module_filled__7Ri6T.Button-module_warning__8WIwI{background:linear-gradient(135deg,#f6a623,#e07b00);color:#fff}.Button-module_filled__7Ri6T.Button-module_warning__8WIwI:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:linear-gradient(135deg,#f8b84a,#f09010)}.Button-module_outlined__kI-f-{background:transparent;border:1.5px solid}.Button-module_outlined__kI-f-.Button-module_primary__EU45Z{border-color:#0047ff;color:#0047ff}.Button-module_outlined__kI-f-.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(0,71,255,.07)}.Button-module_outlined__kI-f-.Button-module_secondary__5BZ2i{border-color:#718096;color:#718096}.Button-module_outlined__kI-f-.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(113,128,150,.07)}.Button-module_ghost__OX4Ks{background:transparent;border:none}.Button-module_ghost__OX4Ks.Button-module_primary__EU45Z{color:#0047ff}.Button-module_ghost__OX4Ks.Button-module_primary__EU45Z:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(0,71,255,.07)}.Button-module_ghost__OX4Ks.Button-module_secondary__5BZ2i{color:#718096}.Button-module_ghost__OX4Ks.Button-module_secondary__5BZ2i:hover:not(:disabled):not(.Button-module_loading__wZ1IR){background:rgba(113,128,150,.07)}.Button-module_fullwidth__6G5sB{width:100%}.Button-module_loader__kuL68{animation:Button-module_spin__Q6mex .7s linear infinite;border:2px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:16px;position:absolute;width:16px}@keyframes Button-module_spin__Q6mex{to{transform:rotate(1turn)}}.Button-module_content__SVjwi{align-items:center;display:flex;gap:8px}.Button-module_content__SVjwi.Button-module_hidden__vJlfj{visibility:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type ButtonVariant = 'filled' | 'outlined' | 'ghost';
|
|
4
|
+
export type ButtonColor = 'primary' | 'secondary' | 'warning';
|
|
5
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
color?: ButtonColor;
|
|
9
|
+
fullwidth?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
color?: ButtonColor;
|
|
17
|
+
fullwidth?: boolean;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAInE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC3C,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;AAC3D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;AAE7D,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAClE,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,MAAM;WARV,UAAU;cACP,aAAa;YACf,WAAW;gBACP,OAAO;cACT,OAAO;eACN,SAAS;qDAuCrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,UAAU,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cakeinpanic-widget",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"homepage": "https://github.com/lidofinance/ui",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/cakeinpanic/monorepo-test.git"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/lidofinance/ui/issues"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "dist/cjs/index.js",
|
|
14
|
+
"module": "dist/esm/index.mjs",
|
|
15
|
+
"types": "dist/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/esm/index.mjs",
|
|
19
|
+
"require": "./dist/cjs/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "rm -rf dist && rollup -c && tsc --project tsconfig.production.json",
|
|
27
|
+
"dev": "storybook dev -p 5557",
|
|
28
|
+
"build-storybook": "storybook build --output-dir storybook-static",
|
|
29
|
+
"test": "node --experimental-vm-modules ../../node_modules/.bin/jest --passWithNoTests",
|
|
30
|
+
"lint": "eslint .",
|
|
31
|
+
"lint:fix": "eslint --fix .",
|
|
32
|
+
"lint:css": "stylelint '**/*.css'",
|
|
33
|
+
"types": "tsc --noEmit"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^18",
|
|
37
|
+
"react-dom": "^18"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@lido-ui/shared": "*",
|
|
41
|
+
"classnames": "2.5.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/preset-env": "7.26.9",
|
|
45
|
+
"@babel/preset-react": "7.26.3",
|
|
46
|
+
"@babel/preset-typescript": "7.27.0",
|
|
47
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
48
|
+
"@rollup/plugin-commonjs": "28.0.3",
|
|
49
|
+
"@rollup/plugin-node-resolve": "16.0.1",
|
|
50
|
+
"@storybook/addon-docs": "8.6.12",
|
|
51
|
+
"@storybook/addon-essentials": "8.6.12",
|
|
52
|
+
"@storybook/addon-webpack5-compiler-swc": "3.0.0",
|
|
53
|
+
"@storybook/react": "8.6.12",
|
|
54
|
+
"@storybook/react-webpack5": "8.6.12",
|
|
55
|
+
"@storybook/test": "8.6.12",
|
|
56
|
+
"@types/jest": "29.5.14",
|
|
57
|
+
"@types/react": "18.2.24",
|
|
58
|
+
"@types/react-dom": "18.2.24",
|
|
59
|
+
"jest": "29.7.0",
|
|
60
|
+
"jest-environment-jsdom": "29.7.0",
|
|
61
|
+
"react": "18.2.0",
|
|
62
|
+
"react-dom": "18.2.0",
|
|
63
|
+
"rollup": "3.29.5",
|
|
64
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
65
|
+
"storybook": "8.6.12",
|
|
66
|
+
"ts-jest": "29.3.4",
|
|
67
|
+
"tslib": "2.3.1"
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"provenance": true,
|
|
71
|
+
"access": "public"
|
|
72
|
+
}
|
|
73
|
+
}
|