tfy-web-components 0.0.2 → 0.0.3
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/package.json +1 -1
- package/dist/..d.ts +0 -31
- package/dist/Button.d.ts +0 -62
- package/dist/CustomDrawer.d.ts +0 -30
- package/dist/IconButton.d.ts +0 -15
- package/dist/IconProvider.d.ts +0 -39
- package/dist/Spinner.d.ts +0 -15
- package/dist/Tooltip.d.ts +0 -28
- package/dist/animation.d.ts +0 -6
- package/dist/backgroundColor.d.ts +0 -5
- package/dist/backgroundImage.d.ts +0 -9
- package/dist/borderWidth.d.ts +0 -6
- package/dist/classNames-f3c6f58e.js +0 -9
- package/dist/classNames-f3c6f58e.js.map +0 -1
- package/dist/colors.d.ts +0 -61
- package/dist/components/atoms/Button.d.ts +0 -42
- package/dist/components/atoms/Button.es.js +0 -147
- package/dist/components/atoms/Button.es.js.map +0 -1
- package/dist/components/atoms/IconButton.d.ts +0 -11
- package/dist/components/atoms/IconButton.es.js +0 -20
- package/dist/components/atoms/IconButton.es.js.map +0 -1
- package/dist/components/atoms/IconProvider.d.ts +0 -29
- package/dist/components/atoms/IconProvider.es.js +0 -67
- package/dist/components/atoms/IconProvider.es.js.map +0 -1
- package/dist/components/atoms/Spinner.d.ts +0 -11
- package/dist/components/atoms/Spinner.es.js +0 -28
- package/dist/components/atoms/Spinner.es.js.map +0 -1
- package/dist/components/atoms/Tooltip.d.ts +0 -21
- package/dist/components/atoms/Tooltip.es.js +0 -118
- package/dist/components/atoms/Tooltip.es.js.map +0 -1
- package/dist/components/molecules/CustomDrawer.d.ts +0 -24
- package/dist/components/molecules/CustomDrawer.es.js +0 -114
- package/dist/components/molecules/CustomDrawer.es.js.map +0 -1
- package/dist/components/theme/animation.d.ts +0 -4
- package/dist/components/theme/animation.es.js +0 -8
- package/dist/components/theme/animation.es.js.map +0 -1
- package/dist/components/theme/backgroundColor.d.ts +0 -3
- package/dist/components/theme/backgroundColor.es.js +0 -7
- package/dist/components/theme/backgroundColor.es.js.map +0 -1
- package/dist/components/theme/backgroundImage.d.ts +0 -7
- package/dist/components/theme/backgroundImage.es.js +0 -19
- package/dist/components/theme/backgroundImage.es.js.map +0 -1
- package/dist/components/theme/borderWidth.d.ts +0 -4
- package/dist/components/theme/borderWidth.es.js +0 -8
- package/dist/components/theme/borderWidth.es.js.map +0 -1
- package/dist/components/theme/colors.d.ts +0 -59
- package/dist/components/theme/colors.es.js +0 -63
- package/dist/components/theme/colors.es.js.map +0 -1
- package/dist/components/theme/cursor.d.ts +0 -3
- package/dist/components/theme/cursor.es.js +0 -7
- package/dist/components/theme/cursor.es.js.map +0 -1
- package/dist/components/theme/dropShadow.d.ts +0 -3
- package/dist/components/theme/dropShadow.es.js +0 -7
- package/dist/components/theme/dropShadow.es.js.map +0 -1
- package/dist/components/theme/flexGrow.d.ts +0 -3
- package/dist/components/theme/flexGrow.es.js +0 -7
- package/dist/components/theme/flexGrow.es.js.map +0 -1
- package/dist/components/theme/fontSize.d.ts +0 -6
- package/dist/components/theme/fontSize.es.js +0 -10
- package/dist/components/theme/fontSize.es.js.map +0 -1
- package/dist/components/theme/height.d.ts +0 -6
- package/dist/components/theme/height.es.js +0 -10
- package/dist/components/theme/height.es.js.map +0 -1
- package/dist/components/theme/index.d.ts +0 -136
- package/dist/components/theme/index.es.js +0 -37
- package/dist/components/theme/index.es.js.map +0 -1
- package/dist/components/theme/keyframes.d.ts +0 -18
- package/dist/components/theme/keyframes.es.js +0 -14
- package/dist/components/theme/keyframes.es.js.map +0 -1
- package/dist/components/theme/maxHeight.d.ts +0 -4
- package/dist/components/theme/maxHeight.es.js +0 -8
- package/dist/components/theme/maxHeight.es.js.map +0 -1
- package/dist/components/theme/screens.d.ts +0 -6
- package/dist/components/theme/screens.es.js +0 -10
- package/dist/components/theme/screens.es.js.map +0 -1
- package/dist/components/theme/transitionProperty.d.ts +0 -4
- package/dist/components/theme/transitionProperty.es.js +0 -8
- package/dist/components/theme/transitionProperty.es.js.map +0 -1
- package/dist/components/theme/utils.d.ts +0 -135
- package/dist/components/theme/utils.es.js +0 -763
- package/dist/components/theme/utils.es.js.map +0 -1
- package/dist/components/theme/zIndex.d.ts +0 -3
- package/dist/components/theme/zIndex.es.js +0 -7
- package/dist/components/theme/zIndex.es.js.map +0 -1
- package/dist/cursor.d.ts +0 -5
- package/dist/dropShadow.d.ts +0 -5
- package/dist/flexGrow.d.ts +0 -5
- package/dist/fontSize.d.ts +0 -8
- package/dist/height.d.ts +0 -8
- package/dist/index.es.js +0 -13
- package/dist/index.es.js.map +0 -1
- package/dist/keyframes.d.ts +0 -20
- package/dist/maxHeight.d.ts +0 -6
- package/dist/screens.d.ts +0 -8
- package/dist/transitionProperty.d.ts +0 -6
- package/dist/utils.d.ts +0 -137
- package/dist/zIndex.d.ts +0 -5
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { forwardRef, Suspense } from "react";
|
|
3
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { c as classNames } from "../../classNames-f3c6f58e.js";
|
|
5
|
-
import "classnames";
|
|
6
|
-
import "tailwind-merge";
|
|
7
|
-
const IMG_ICONS_MAP = {};
|
|
8
|
-
const registerImgIcons = (iconMap) => {
|
|
9
|
-
Object.assign(IMG_ICONS_MAP, iconMap);
|
|
10
|
-
};
|
|
11
|
-
const CUSTOM_ICONS_MAP = {};
|
|
12
|
-
const registerIcons = (iconMap) => {
|
|
13
|
-
Object.assign(CUSTOM_ICONS_MAP, iconMap);
|
|
14
|
-
};
|
|
15
|
-
const FA_ICON_ALIAS_MAP = {
|
|
16
|
-
github: "fa-brands fa-github",
|
|
17
|
-
gitlab: "fa-brands fa-gitlab",
|
|
18
|
-
bitbucket: "fa-brands fa-bitbucket",
|
|
19
|
-
jenkins: "fa-brands fa-jenkins"
|
|
20
|
-
};
|
|
21
|
-
const DynamicIcon = ({ name, ...props }) => {
|
|
22
|
-
const IconToRender = CUSTOM_ICONS_MAP[name];
|
|
23
|
-
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("span", {}), children: /* @__PURE__ */ jsx(IconToRender, { ...props }) });
|
|
24
|
-
};
|
|
25
|
-
const IconProvider = ({
|
|
26
|
-
icon,
|
|
27
|
-
color,
|
|
28
|
-
size = 0.75,
|
|
29
|
-
width,
|
|
30
|
-
className,
|
|
31
|
-
onClick,
|
|
32
|
-
forwardedRef,
|
|
33
|
-
nativeProps = {}
|
|
34
|
-
}) => {
|
|
35
|
-
const imgIcon = typeof icon === "string" && icon.startsWith("http") ? icon : IMG_ICONS_MAP[icon];
|
|
36
|
-
const faIcon = FA_ICON_ALIAS_MAP[icon] || icon;
|
|
37
|
-
const iconStyles = width ? { width: `${width}rem`, height: "auto" } : { height: `${size}rem`, width: "auto" };
|
|
38
|
-
return imgIcon ? /* @__PURE__ */ jsx(
|
|
39
|
-
"img",
|
|
40
|
-
{
|
|
41
|
-
ref: forwardedRef,
|
|
42
|
-
src: imgIcon,
|
|
43
|
-
style: iconStyles,
|
|
44
|
-
className: classNames(className),
|
|
45
|
-
onClick
|
|
46
|
-
}
|
|
47
|
-
) : CUSTOM_ICONS_MAP[icon] ? /* @__PURE__ */ jsx(DynamicIcon, { onClick, style: { ...iconStyles, color }, name: String(icon), className }) : /* @__PURE__ */ jsx(
|
|
48
|
-
FontAwesomeIcon,
|
|
49
|
-
{
|
|
50
|
-
ref: forwardedRef,
|
|
51
|
-
icon: faIcon,
|
|
52
|
-
style: { color, fontSize: `${width ?? size}rem` },
|
|
53
|
-
className: classNames("text-xs", className),
|
|
54
|
-
onClick,
|
|
55
|
-
...nativeProps
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
const IconProvider$1 = React__default.memo(
|
|
60
|
-
forwardRef((props, ref) => /* @__PURE__ */ jsx(IconProvider, { ...props, forwardedRef: ref }))
|
|
61
|
-
);
|
|
62
|
-
export {
|
|
63
|
-
IconProvider$1 as default,
|
|
64
|
-
registerIcons,
|
|
65
|
-
registerImgIcons
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=IconProvider.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconProvider.es.js","sources":["../../../src/components/atoms/IconProvider.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef, Suspense } from 'react'\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\nimport { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome'\n\nimport classNames from '@/utils/classNames'\n\ntype ImgIconMap = { [key: string]: string }\nconst IMG_ICONS_MAP: ImgIconMap = {}\nexport const registerImgIcons = (iconMap: ImgIconMap) => {\n Object.assign(IMG_ICONS_MAP, iconMap)\n}\n\ntype CustomIcon = React.ComponentType<CustomIconProps>\ntype CustomIconMap = {\n [key: string]: React.LazyExoticComponent<CustomIcon> | CustomIcon\n}\nconst CUSTOM_ICONS_MAP: CustomIconMap = {}\nexport const registerIcons = (iconMap: CustomIconMap) => {\n Object.assign(CUSTOM_ICONS_MAP, iconMap)\n}\n\nconst FA_ICON_ALIAS_MAP: { readonly [key: string]: string } = {\n github: 'fa-brands fa-github',\n gitlab: 'fa-brands fa-gitlab',\n bitbucket: 'fa-brands fa-bitbucket',\n jenkins: 'fa-brands fa-jenkins',\n}\n\ninterface IconProps {\n icon: string | IconProp\n color?: string\n className?: string\n onClick?: (e: React.MouseEvent) => void\n size?: number\n width?: number\n forwardedRef?: React.Ref<HTMLElement>\n nativeProps?: Partial<FontAwesomeIconProps>\n}\n\ntype CustomIconProps = {\n onClick?: (e: React.MouseEvent) => void\n className?: string\n style?: React.CSSProperties\n}\ntype DynamicIconProps = CustomIconProps & {\n name: string\n}\n\nconst DynamicIcon = ({ name, ...props }: DynamicIconProps) => {\n const IconToRender = CUSTOM_ICONS_MAP[name]\n return (\n <Suspense fallback={<span />}>\n <IconToRender {...props} />\n </Suspense>\n )\n}\n\nconst IconProvider = ({\n icon,\n color,\n size = 0.75,\n width,\n className,\n onClick,\n forwardedRef,\n nativeProps = {},\n}: IconProps) => {\n const imgIcon = typeof icon === 'string' && icon.startsWith('http') ? icon : IMG_ICONS_MAP[icon as string]\n const faIcon = FA_ICON_ALIAS_MAP[icon as string] || icon\n\n const iconStyles = width ? { width: `${width}rem`, height: 'auto' } : { height: `${size}rem`, width: 'auto' }\n\n return imgIcon ? (\n <img\n ref={forwardedRef as React.ForwardedRef<HTMLImageElement>}\n src={imgIcon}\n style={iconStyles}\n className={classNames(className)}\n onClick={onClick}\n />\n ) : CUSTOM_ICONS_MAP[icon as string] ? (\n <DynamicIcon onClick={onClick} style={{ ...iconStyles, color }} name={String(icon)} className={className} />\n ) : (\n <FontAwesomeIcon\n ref={forwardedRef as ForwardedRef<SVGSVGElement>}\n icon={faIcon as IconProp}\n style={{ color, fontSize: `${width ?? size}rem` }}\n className={classNames('text-xs', className)}\n onClick={onClick}\n {...nativeProps}\n />\n )\n}\n\nexport default React.memo(\n forwardRef<HTMLElement, IconProps>((props, ref) => <IconProvider {...props} forwardedRef={ref} />),\n)\n"],"names":["React"],"mappings":";;;;;;AAOA,MAAM,gBAA4B,CAAA;AACrB,MAAA,mBAAmB,CAAC,YAAwB;AAChD,SAAA,OAAO,eAAe,OAAO;AACtC;AAMA,MAAM,mBAAkC,CAAA;AAC3B,MAAA,gBAAgB,CAAC,YAA2B;AAChD,SAAA,OAAO,kBAAkB,OAAO;AACzC;AAEA,MAAM,oBAAwD;AAAA,EAC5D,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AACX;AAsBA,MAAM,cAAc,CAAC,EAAE,MAAM,GAAG,YAA8B;AACtD,QAAA,eAAe,iBAAiB,IAAI;AAExC,SAAA,oBAAC,UAAS,EAAA,UAAW,oBAAA,QAAA,CAAK,CAAA,GACxB,UAAC,oBAAA,cAAA,EAAc,GAAG,MAAO,CAAA,EAC3B,CAAA;AAEJ;AAEA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC;AACjB,MAAiB;AACT,QAAA,UAAU,OAAO,SAAS,YAAY,KAAK,WAAW,MAAM,IAAI,OAAO,cAAc,IAAc;AACnG,QAAA,SAAS,kBAAkB,IAAc,KAAK;AAEpD,QAAM,aAAa,QAAQ,EAAE,OAAO,GAAG,KAAK,OAAO,QAAQ,OAAO,IAAI,EAAE,QAAQ,GAAG,IAAI,OAAO,OAAO;AAErG,SAAO,UACL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,MACP,WAAW,WAAW,SAAS;AAAA,MAC/B;AAAA,IAAA;AAAA,EAAA,IAEA,iBAAiB,IAAc,IAChC,oBAAA,aAAA,EAAY,SAAkB,OAAO,EAAE,GAAG,YAAY,MAAS,GAAA,MAAM,OAAO,IAAI,GAAG,UAAsB,CAAA,IAE1G;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO,EAAE,OAAO,UAAU,GAAG,SAAS,IAAI,MAAM;AAAA,MAChD,WAAW,WAAW,WAAW,SAAS;AAAA,MAC1C;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAeA,iBAAAA,eAAM;AAAA,EACnB,WAAmC,CAAC,OAAO,QAAQ,oBAAC,gBAAc,GAAG,OAAO,cAAc,IAAA,CAAK,CAAE;AACnG;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as classNames } from "../../classNames-f3c6f58e.js";
|
|
3
|
-
import "classnames";
|
|
4
|
-
import "tailwind-merge";
|
|
5
|
-
const Spinner = ({ className, small, big, medium, center, type = "normal" }) => {
|
|
6
|
-
const isDefault = () => type === "normal";
|
|
7
|
-
const classes = classNames({
|
|
8
|
-
"animate-spin ease-linear rounded-full overflow-hidden": true,
|
|
9
|
-
"border-gray-200 btop": isDefault(),
|
|
10
|
-
"border-4 border-t-4 h-8 w-8": isDefault() && !small && !medium && !big,
|
|
11
|
-
"h-4 w-4": small,
|
|
12
|
-
"border-2 border-t-2": isDefault() && small,
|
|
13
|
-
"h-12 w-12": medium,
|
|
14
|
-
"border-4 border-t-4": isDefault() && medium,
|
|
15
|
-
"h-20 w-20": big,
|
|
16
|
-
"border-8 border-t-8 ": isDefault() && big,
|
|
17
|
-
"m-auto": center,
|
|
18
|
-
[`${className}`]: className
|
|
19
|
-
});
|
|
20
|
-
switch (type) {
|
|
21
|
-
default:
|
|
22
|
-
return /* @__PURE__ */ jsx("div", { className: classes, role: "status", children: /* @__PURE__ */ jsx("span", { className: "invisible", children: "Loading..." }) });
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
Spinner as default
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=Spinner.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.es.js","sources":["../../../src/components/atoms/Spinner.tsx"],"sourcesContent":["import React from 'react'\n\nimport classNames from '@/utils/classNames'\n\nexport interface SpinnerProps {\n className?: string\n small?: boolean\n big?: boolean\n medium?: boolean\n center?: boolean\n type?: 'normal'\n}\nconst Spinner: React.FC<SpinnerProps> = ({ className, small, big, medium, center, type = 'normal' }) => {\n const isDefault = () => type === 'normal'\n\n const classes = classNames({\n 'animate-spin ease-linear rounded-full overflow-hidden': true,\n 'border-gray-200 btop': isDefault(),\n 'border-4 border-t-4 h-8 w-8': isDefault() && !small && !medium && !big,\n 'h-4 w-4': small,\n 'border-2 border-t-2': isDefault() && small,\n 'h-12 w-12': medium,\n 'border-4 border-t-4': isDefault() && medium,\n 'h-20 w-20': big,\n 'border-8 border-t-8 ': isDefault() && big,\n 'm-auto': center,\n [`${className}`]: className,\n })\n\n switch (type) {\n default:\n return (\n <div className={classes} role=\"status\">\n <span className=\"invisible\">Loading...</span>\n </div>\n )\n }\n}\n\nexport default Spinner\n"],"names":[],"mappings":";;;;AAYM,MAAA,UAAkC,CAAC,EAAE,WAAW,OAAO,KAAK,QAAQ,QAAQ,OAAO,eAAe;AAChG,QAAA,YAAY,MAAM,SAAS;AAEjC,QAAM,UAAU,WAAW;AAAA,IACzB,yDAAyD;AAAA,IACzD,wBAAwB,UAAU;AAAA,IAClC,+BAA+B,UAAU,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;AAAA,IACpE,WAAW;AAAA,IACX,uBAAuB,eAAe;AAAA,IACtC,aAAa;AAAA,IACb,uBAAuB,eAAe;AAAA,IACtC,aAAa;AAAA,IACb,wBAAwB,eAAe;AAAA,IACvC,UAAU;AAAA,IACV,CAAC,GAAG,SAAS,EAAE,GAAG;AAAA,EAAA,CACnB;AAED,UAAQ,MAAM;AAAA,IACZ;AAEI,aAAA,oBAAC,OAAI,EAAA,WAAW,SAAS,MAAK,UAC5B,UAAA,oBAAC,QAAK,EAAA,WAAU,aAAY,UAAA,aAAA,CAAU,EACxC,CAAA;AAAA,EAEN;AACF;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
|
-
import { MUIStyledCommonProps } from '@mui/system';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { TooltipProps } from '@mui/material/Tooltip';
|
|
5
|
-
export type Sizes = 'large' | 'variable' | 'medium' | 'fit';
|
|
6
|
-
export type CustomTooltipProps = TooltipProps & {
|
|
7
|
-
size?: Sizes;
|
|
8
|
-
border?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const LightTooltip: React.NamedExoticComponent<TooltipProps & {
|
|
11
|
-
size?: Sizes | undefined;
|
|
12
|
-
border?: boolean | undefined;
|
|
13
|
-
} & MUIStyledCommonProps<Theme>>;
|
|
14
|
-
export declare const DarkTooltip: React.NamedExoticComponent<TooltipProps & {
|
|
15
|
-
size?: Sizes | undefined;
|
|
16
|
-
border?: boolean | undefined;
|
|
17
|
-
} & MUIStyledCommonProps<Theme>>;
|
|
18
|
-
export declare const UnstyledTooltip: React.NamedExoticComponent<TooltipProps & {
|
|
19
|
-
size?: Sizes | undefined;
|
|
20
|
-
border?: boolean | undefined;
|
|
21
|
-
} & MUIStyledCommonProps<Theme>>;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import styled from "@mui/material/styles/styled";
|
|
4
|
-
import Tooltip, { tooltipClasses } from "@mui/material/Tooltip";
|
|
5
|
-
import { c as classNames } from "../../classNames-f3c6f58e.js";
|
|
6
|
-
import "classnames";
|
|
7
|
-
import "tailwind-merge";
|
|
8
|
-
const getSize = (size) => {
|
|
9
|
-
let height = 380;
|
|
10
|
-
let width = 250;
|
|
11
|
-
let font = 12;
|
|
12
|
-
switch (size) {
|
|
13
|
-
case "large":
|
|
14
|
-
width = 420;
|
|
15
|
-
height = 400;
|
|
16
|
-
font = 14;
|
|
17
|
-
break;
|
|
18
|
-
case "medium":
|
|
19
|
-
width = 360;
|
|
20
|
-
height = 300;
|
|
21
|
-
font = 14;
|
|
22
|
-
break;
|
|
23
|
-
case "variable":
|
|
24
|
-
width = "none";
|
|
25
|
-
height = "none";
|
|
26
|
-
case "fit":
|
|
27
|
-
width = "fit-content";
|
|
28
|
-
height = "none";
|
|
29
|
-
}
|
|
30
|
-
return { height, width, font };
|
|
31
|
-
};
|
|
32
|
-
const LightTooltip = React.memo(
|
|
33
|
-
styled(({ className, classes, border, ...props }) => /* @__PURE__ */ jsx(
|
|
34
|
-
Tooltip,
|
|
35
|
-
{
|
|
36
|
-
disableFocusListener: true,
|
|
37
|
-
...props,
|
|
38
|
-
classes: {
|
|
39
|
-
popper: className,
|
|
40
|
-
...classes,
|
|
41
|
-
tooltip: classNames(classes == null ? void 0 : classes.tooltip, "custom-scrollbar")
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
))(({ size, theme, border }) => {
|
|
45
|
-
const { height, width, font } = getSize(size);
|
|
46
|
-
return {
|
|
47
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
48
|
-
backgroundColor: "#ffffff",
|
|
49
|
-
color: theme.palette.grey[900],
|
|
50
|
-
fontWeight: 500,
|
|
51
|
-
fontSize: font,
|
|
52
|
-
maxHeight: height,
|
|
53
|
-
minWidth: width,
|
|
54
|
-
width: "auto",
|
|
55
|
-
boxShadow: "0px 2px 6px rgba(0, 52, 102, 0.06), 0px 8px 20px rgba(0, 52, 102, 0.1)",
|
|
56
|
-
borderRadius: "0.375rem",
|
|
57
|
-
overflow: "auto",
|
|
58
|
-
padding: "0.375rem 0.5rem",
|
|
59
|
-
border: border ? "0.0625rem solid #E0ECFD" : "0px solid"
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
})
|
|
63
|
-
);
|
|
64
|
-
const DarkTooltip = React.memo(
|
|
65
|
-
styled(({ className, classes, ...props }) => /* @__PURE__ */ jsx(
|
|
66
|
-
Tooltip,
|
|
67
|
-
{
|
|
68
|
-
disableFocusListener: true,
|
|
69
|
-
...props,
|
|
70
|
-
classes: {
|
|
71
|
-
popper: className,
|
|
72
|
-
...classes,
|
|
73
|
-
tooltip: classNames(classes == null ? void 0 : classes.tooltip, "custom-scrollbar")
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
))(({ size, theme }) => {
|
|
77
|
-
const { height, width, font } = getSize(size);
|
|
78
|
-
return {
|
|
79
|
-
[`& .${tooltipClasses.arrow}`]: {
|
|
80
|
-
color: theme.palette.common.black
|
|
81
|
-
},
|
|
82
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
83
|
-
backgroundColor: theme.palette.common.black,
|
|
84
|
-
color: theme.palette.grey[200],
|
|
85
|
-
fontWeight: 500,
|
|
86
|
-
fontSize: font,
|
|
87
|
-
width: "auto",
|
|
88
|
-
maxWidth: width,
|
|
89
|
-
maxHeight: height,
|
|
90
|
-
boxShadow: "0px 2px 6px rgba(0, 52, 102, 0.06), 0px 8px 20px rgba(0, 52, 102, 0.1)",
|
|
91
|
-
borderRadius: "0.375rem",
|
|
92
|
-
overflow: "auto",
|
|
93
|
-
padding: "0.375rem 0.5rem"
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
const UnstyledTooltip = React.memo(
|
|
99
|
-
styled(({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip, { disableFocusListener: true, ...props, classes: { popper: className, tooltip: "custom-scrollbar" } }))(({ size }) => {
|
|
100
|
-
const { width, height } = getSize(size);
|
|
101
|
-
return {
|
|
102
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
103
|
-
backgroundColor: "transparent",
|
|
104
|
-
color: "rgba(0, 0, 0, 0.87)",
|
|
105
|
-
maxWidth: width,
|
|
106
|
-
width: "auto",
|
|
107
|
-
maxHeight: height,
|
|
108
|
-
border: "none"
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
})
|
|
112
|
-
);
|
|
113
|
-
export {
|
|
114
|
-
DarkTooltip,
|
|
115
|
-
LightTooltip,
|
|
116
|
-
UnstyledTooltip
|
|
117
|
-
};
|
|
118
|
-
//# sourceMappingURL=Tooltip.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.es.js","sources":["../../../src/components/atoms/Tooltip.tsx"],"sourcesContent":["import * as React from 'react'\nimport styled from '@mui/material/styles/styled'\nimport Tooltip, { tooltipClasses, TooltipProps } from '@mui/material/Tooltip'\n\nimport classNames from '@/utils/classNames'\n\nexport type Sizes = 'large' | 'variable' | 'medium' | 'fit'\n\nexport type CustomTooltipProps = TooltipProps & {\n size?: Sizes\n border?: boolean\n}\n\n// todo: values should rely on root font size\nconst getSize = (size?: Sizes) => {\n let height: string | number = 380\n let width: string | number = 250\n let font = 12\n switch (size) {\n case 'large':\n width = 420\n height = 400\n font = 14\n break\n case 'medium':\n width = 360\n height = 300\n font = 14\n break\n case 'variable':\n width = 'none'\n height = 'none'\n case 'fit':\n width = 'fit-content'\n height = 'none'\n }\n return { height, width, font }\n}\n\nexport const LightTooltip = React.memo(\n styled(({ className, classes, border, ...props }: CustomTooltipProps) => (\n <Tooltip\n disableFocusListener\n {...props}\n classes={{\n popper: className,\n ...classes,\n tooltip: classNames(classes?.tooltip, 'custom-scrollbar'),\n }}\n />\n ))(({ size, theme, border }) => {\n const { height, width, font } = getSize(size)\n return {\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: '#ffffff',\n color: theme.palette.grey[900],\n fontWeight: 500,\n fontSize: font,\n maxHeight: height,\n minWidth: width,\n width: 'auto',\n boxShadow: '0px 2px 6px rgba(0, 52, 102, 0.06), 0px 8px 20px rgba(0, 52, 102, 0.1)',\n borderRadius: '0.375rem',\n overflow: 'auto',\n padding: '0.375rem 0.5rem',\n border: border ? '0.0625rem solid #E0ECFD' : '0px solid',\n },\n }\n }),\n)\n\nexport const DarkTooltip = React.memo(\n styled(({ className, classes, ...props }: CustomTooltipProps) => (\n <Tooltip\n disableFocusListener\n {...props}\n classes={{\n popper: className,\n ...classes,\n tooltip: classNames(classes?.tooltip, 'custom-scrollbar'),\n }}\n />\n ))(({ size, theme }) => {\n const { height, width, font } = getSize(size)\n return {\n [`& .${tooltipClasses.arrow}`]: {\n color: theme.palette.common.black,\n },\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: theme.palette.common.black,\n color: theme.palette.grey[200],\n fontWeight: 500,\n fontSize: font,\n width: 'auto',\n maxWidth: width,\n maxHeight: height,\n boxShadow: '0px 2px 6px rgba(0, 52, 102, 0.06), 0px 8px 20px rgba(0, 52, 102, 0.1)',\n borderRadius: '0.375rem',\n overflow: 'auto',\n padding: '0.375rem 0.5rem',\n },\n }\n }),\n)\n\nexport const UnstyledTooltip = React.memo(\n styled(({ className, ...props }: CustomTooltipProps) => (\n <Tooltip disableFocusListener {...props} classes={{ popper: className, tooltip: 'custom-scrollbar' }} />\n ))(({ size }) => {\n const { width, height } = getSize(size)\n return {\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: 'transparent',\n color: 'rgba(0, 0, 0, 0.87)',\n maxWidth: width,\n width: 'auto',\n maxHeight: height,\n border: 'none',\n },\n }\n }),\n)\n"],"names":[],"mappings":"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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type ContextType = {
|
|
3
|
-
isPreventEscape?: boolean;
|
|
4
|
-
confirmOnClose?: boolean;
|
|
5
|
-
onEscape?: () => void;
|
|
6
|
-
updateDrawerContext?: (_?: ContextType, clearState?: boolean) => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const CustomDrawerContext: React.Context<ContextType>;
|
|
9
|
-
interface DrawerProps {
|
|
10
|
-
children: React.ReactNode | JSX.Element | string;
|
|
11
|
-
anchor?: 'right' | 'left' | 'top' | 'bottom' | undefined;
|
|
12
|
-
open: boolean;
|
|
13
|
-
inner?: boolean;
|
|
14
|
-
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
15
|
-
width?: string;
|
|
16
|
-
bodyClassName?: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
overflowY?: boolean;
|
|
19
|
-
confirmOnClose?: boolean;
|
|
20
|
-
confirmOnCloseMessage?: string;
|
|
21
|
-
onClose: () => void;
|
|
22
|
-
}
|
|
23
|
-
declare const CustomDrawer: React.FC<DrawerProps>;
|
|
24
|
-
export default CustomDrawer;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { useState, useRef, useMemo, useEffect } from "react";
|
|
3
|
-
import Drawer from "@mui/material/Drawer";
|
|
4
|
-
import { c as classNames } from "../../classNames-f3c6f58e.js";
|
|
5
|
-
import "classnames";
|
|
6
|
-
import "tailwind-merge";
|
|
7
|
-
const CustomDrawerContext = React__default.createContext({});
|
|
8
|
-
const CustomDrawer = ({
|
|
9
|
-
anchor = "right",
|
|
10
|
-
children,
|
|
11
|
-
open,
|
|
12
|
-
inner,
|
|
13
|
-
size = "medium",
|
|
14
|
-
width,
|
|
15
|
-
bodyClassName,
|
|
16
|
-
className = "",
|
|
17
|
-
overflowY,
|
|
18
|
-
confirmOnClose,
|
|
19
|
-
confirmOnCloseMessage,
|
|
20
|
-
onClose
|
|
21
|
-
}) => {
|
|
22
|
-
const [isCloseConfirmationOpen, setIsCloseConfirmationOpen] = useState(false);
|
|
23
|
-
const [shouldConfirmOnClose, setShouldConfirmOnClose] = useState(confirmOnClose);
|
|
24
|
-
const contextRef = useRef({});
|
|
25
|
-
const contextValue = useMemo(
|
|
26
|
-
() => ({
|
|
27
|
-
updateDrawerContext: (state, clearState) => {
|
|
28
|
-
contextRef.current = clearState ? {} : { ...contextRef.current ?? {}, ...state };
|
|
29
|
-
if ((state == null ? void 0 : state.confirmOnClose) !== shouldConfirmOnClose) {
|
|
30
|
-
setShouldConfirmOnClose(state == null ? void 0 : state.confirmOnClose);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
[shouldConfirmOnClose]
|
|
35
|
-
);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
setShouldConfirmOnClose(confirmOnClose);
|
|
38
|
-
if (!open) {
|
|
39
|
-
setIsCloseConfirmationOpen(false);
|
|
40
|
-
}
|
|
41
|
-
}, [confirmOnClose, open]);
|
|
42
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
Drawer,
|
|
45
|
-
{
|
|
46
|
-
anchor,
|
|
47
|
-
open,
|
|
48
|
-
onClose: inner ? shouldConfirmOnClose ? () => setIsCloseConfirmationOpen(true) : onClose : void 0,
|
|
49
|
-
className: classNames("feature-importance custom-drawer", className),
|
|
50
|
-
onKeyDown: (e) => {
|
|
51
|
-
const { isPreventEscape, onEscape } = contextRef.current || {};
|
|
52
|
-
if (e.key === "Escape") {
|
|
53
|
-
if (!isPreventEscape)
|
|
54
|
-
;
|
|
55
|
-
else {
|
|
56
|
-
onEscape == null ? void 0 : onEscape();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
onClick: (e) => {
|
|
61
|
-
e.stopPropagation();
|
|
62
|
-
},
|
|
63
|
-
children: /* @__PURE__ */ jsx("div", { className: "flex overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
className: classNames(
|
|
67
|
-
"flex-1 bg-gray-50 min-h-[100vh] feature-content",
|
|
68
|
-
width ?? {
|
|
69
|
-
"w-[46vw]": size === "medium" && inner,
|
|
70
|
-
"w-[52vw]": size === "medium" && !inner,
|
|
71
|
-
"w-[30vw]": size === "small" && inner,
|
|
72
|
-
"w-[35vw]": size === "small" && !inner,
|
|
73
|
-
"w-[65vw]": size === "large" && inner,
|
|
74
|
-
"w-[70vw]": size === "large" && !inner,
|
|
75
|
-
"w-[80vw]": size === "xlarge" && inner,
|
|
76
|
-
"w-[85vw]": size === "xlarge" && !inner
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"overflow-y-scroll custom-scrollbar": overflowY
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
children: open && /* @__PURE__ */ jsx("div", { className: classNames("h-full", bodyClassName ?? "my-3 mx-5 mb-1.5"), children: /* @__PURE__ */ jsx(CustomDrawerContext.Provider, { value: contextValue, children }) })
|
|
83
|
-
}
|
|
84
|
-
) })
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
shouldConfirmOnClose && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
88
|
-
"following code will be added here ",
|
|
89
|
-
confirmOnCloseMessage && false,
|
|
90
|
-
`
|
|
91
|
-
<Alert
|
|
92
|
-
title="Warning"
|
|
93
|
-
message={
|
|
94
|
-
confirmOnCloseMessage ||
|
|
95
|
-
'Closing this drawer will discard all changes. Are you sure you want to close it?'
|
|
96
|
-
}
|
|
97
|
-
onConfirm={async () => {
|
|
98
|
-
setIsCloseConfirmationOpen(false)
|
|
99
|
-
}}
|
|
100
|
-
onClose={() => setIsCloseConfirmationOpen(false)}
|
|
101
|
-
onCloseAfterConfirm={onClose}
|
|
102
|
-
confirmButtonText="Yes"
|
|
103
|
-
open={isCloseConfirmationOpen}
|
|
104
|
-
/>
|
|
105
|
-
`,
|
|
106
|
-
isCloseConfirmationOpen
|
|
107
|
-
] })
|
|
108
|
-
] });
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
CustomDrawerContext,
|
|
112
|
-
CustomDrawer as default
|
|
113
|
-
};
|
|
114
|
-
//# sourceMappingURL=CustomDrawer.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDrawer.es.js","sources":["../../../src/components/molecules/CustomDrawer.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from 'react'\nimport Drawer from '@mui/material/Drawer'\n\nimport classNames from '@/utils/classNames'\n\ntype ContextType = {\n isPreventEscape?: boolean\n confirmOnClose?: boolean\n onEscape?: () => void\n updateDrawerContext?: (_?: ContextType, clearState?: boolean) => void\n}\n\nexport const CustomDrawerContext = React.createContext<ContextType>({})\n\ninterface DrawerProps {\n children: React.ReactNode | JSX.Element | string\n anchor?: 'right' | 'left' | 'top' | 'bottom' | undefined\n open: boolean\n inner?: boolean\n size?: 'small' | 'medium' | 'large' | 'xlarge'\n width?: string\n bodyClassName?: string\n className?: string\n overflowY?: boolean\n confirmOnClose?: boolean\n confirmOnCloseMessage?: string\n onClose: () => void\n}\n\nconst CustomDrawer: React.FC<DrawerProps> = ({\n anchor = 'right',\n children,\n open,\n inner,\n size = 'medium',\n width,\n bodyClassName,\n className = '',\n overflowY,\n confirmOnClose,\n confirmOnCloseMessage,\n onClose,\n}) => {\n const [isCloseConfirmationOpen, setIsCloseConfirmationOpen] = useState(false)\n const [shouldConfirmOnClose, setShouldConfirmOnClose] = useState(confirmOnClose)\n\n const contextRef = useRef<ContextType>({})\n const contextValue = useMemo<ContextType>(\n () => ({\n updateDrawerContext: (state?: ContextType, clearState?: boolean) => {\n contextRef.current = clearState ? {} : { ...(contextRef.current ?? {}), ...state }\n if (state?.confirmOnClose !== shouldConfirmOnClose) {\n setShouldConfirmOnClose(state?.confirmOnClose)\n }\n },\n }),\n [shouldConfirmOnClose],\n )\n\n useEffect(() => {\n setShouldConfirmOnClose(confirmOnClose)\n if (!open) {\n setIsCloseConfirmationOpen(false)\n }\n }, [confirmOnClose, open])\n\n return (\n <>\n <Drawer\n anchor={anchor}\n open={open}\n onClose={inner ? (shouldConfirmOnClose ? () => setIsCloseConfirmationOpen(true) : onClose) : undefined}\n className={classNames('feature-importance custom-drawer', className)}\n onKeyDown={(e) => {\n const { isPreventEscape, onEscape } = contextRef.current || {}\n if (e.key === 'Escape') {\n if (!isPreventEscape) {\n // TODO: Fix this, do not close drawer when escape is pressed\n // onClose()\n } else {\n onEscape?.()\n }\n }\n }}\n onClick={(e) => {\n e.stopPropagation()\n }}\n >\n <div className=\"flex overflow-hidden\">\n <div\n className={classNames(\n 'flex-1 bg-gray-50 min-h-[100vh] feature-content',\n width ?? {\n 'w-[46vw]': size === 'medium' && inner,\n 'w-[52vw]': size === 'medium' && !inner,\n 'w-[30vw]': size === 'small' && inner,\n 'w-[35vw]': size === 'small' && !inner,\n 'w-[65vw]': size === 'large' && inner,\n 'w-[70vw]': size === 'large' && !inner,\n 'w-[80vw]': size === 'xlarge' && inner,\n 'w-[85vw]': size === 'xlarge' && !inner,\n },\n {\n 'overflow-y-scroll custom-scrollbar': overflowY,\n },\n )}\n >\n {open && (\n <div className={classNames('h-full', bodyClassName ?? 'my-3 mx-5 mb-1.5')}>\n <CustomDrawerContext.Provider value={contextValue}>{children}</CustomDrawerContext.Provider>\n </div>\n )}\n </div>\n </div>\n </Drawer>\n {shouldConfirmOnClose && (\n <>\n following code will be added here {confirmOnCloseMessage && false}\n {`\n <Alert\n title=\"Warning\"\n message={\n confirmOnCloseMessage ||\n 'Closing this drawer will discard all changes. Are you sure you want to close it?'\n }\n onConfirm={async () => {\n setIsCloseConfirmationOpen(false)\n }}\n onClose={() => setIsCloseConfirmationOpen(false)}\n onCloseAfterConfirm={onClose}\n confirmButtonText=\"Yes\"\n open={isCloseConfirmationOpen}\n />\n `}\n {isCloseConfirmationOpen}\n </>\n )}\n </>\n )\n}\n\nexport default CustomDrawer\n"],"names":["React"],"mappings":";;;;;;AAYO,MAAM,sBAAsBA,eAAM,cAA2B,EAAE;AAiBtE,MAAM,eAAsC,CAAC;AAAA,EAC3C,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAS,KAAK;AAC5E,QAAM,CAAC,sBAAsB,uBAAuB,IAAI,SAAS,cAAc;AAEzE,QAAA,aAAa,OAAoB,CAAA,CAAE;AACzC,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,MACL,qBAAqB,CAAC,OAAqB,eAAyB;AACvD,mBAAA,UAAU,aAAa,KAAK,EAAE,GAAI,WAAW,WAAW,CAAA,GAAK,GAAG;AACvE,aAAA,+BAAO,oBAAmB,sBAAsB;AAClD,kCAAwB,+BAAO,cAAc;AAAA,QAC/C;AAAA,MACF;AAAA,IAAA;AAAA,IAEF,CAAC,oBAAoB;AAAA,EAAA;AAGvB,YAAU,MAAM;AACd,4BAAwB,cAAc;AACtC,QAAI,CAAC,MAAM;AACT,iCAA2B,KAAK;AAAA,IAClC;AAAA,EAAA,GACC,CAAC,gBAAgB,IAAI,CAAC;AAEzB,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,SAAS,QAAS,uBAAuB,MAAM,2BAA2B,IAAI,IAAI,UAAW;AAAA,QAC7F,WAAW,WAAW,oCAAoC,SAAS;AAAA,QACnE,WAAW,CAAC,MAAM;AAChB,gBAAM,EAAE,iBAAiB,SAAA,IAAa,WAAW,WAAW,CAAA;AACxD,cAAA,EAAE,QAAQ,UAAU;AACtB,gBAAI,CAAC;AAAiB;AAAA,iBAGf;AACM;AAAA,YACb;AAAA,UACF;AAAA,QACF;AAAA,QACA,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAAA,QACpB;AAAA,QAEA,UAAA,oBAAC,OAAI,EAAA,WAAU,wBACb,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,SAAS;AAAA,gBACP,YAAY,SAAS,YAAY;AAAA,gBACjC,YAAY,SAAS,YAAY,CAAC;AAAA,gBAClC,YAAY,SAAS,WAAW;AAAA,gBAChC,YAAY,SAAS,WAAW,CAAC;AAAA,gBACjC,YAAY,SAAS,WAAW;AAAA,gBAChC,YAAY,SAAS,WAAW,CAAC;AAAA,gBACjC,YAAY,SAAS,YAAY;AAAA,gBACjC,YAAY,SAAS,YAAY,CAAC;AAAA,cACpC;AAAA,cACA;AAAA,gBACE,sCAAsC;AAAA,cACxC;AAAA,YACF;AAAA,YAEC,kBACE,oBAAA,OAAA,EAAI,WAAW,WAAW,UAAU,iBAAiB,kBAAkB,GACtE,UAAA,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,cAAe,SAAS,CAAA,GAC/D;AAAA,UAAA;AAAA,QAAA,GAGN;AAAA,MAAA;AAAA,IACF;AAAA,IACC,wBACG,qBAAA,UAAA,EAAA,UAAA;AAAA,MAAA;AAAA,MACmC,yBAAyB;AAAA,MAC3D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAgBA;AAAA,IAAA,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animation.es.js","sources":["../../../src/components/theme/animation.ts"],"sourcesContent":["export const animation = {\n fadeOut: 'fadeOut 250ms ease-in-out',\n fadeIn: 'fadeIn 250ms ease-in-out',\n}\n"],"names":[],"mappings":"AAAO,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,EACT,QAAQ;AACV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backgroundColor.es.js","sources":["../../../src/components/theme/backgroundColor.ts"],"sourcesContent":["export const backgroundColor = (theme: (path: string) => string | undefined) => ({\n app: theme('colors.gray.50'),\n})\n"],"names":[],"mappings":"AAAa,MAAA,kBAAkB,CAAC,WAAiD;AAAA,EAC/E,KAAK,MAAM,gBAAgB;AAC7B;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const backgroundImage = (theme) => ({
|
|
2
|
-
"blue-red-gradient": `linear-gradient(to right, ${theme("colors.violet.500")}, ${theme("colors.rose.400")}, ${theme(
|
|
3
|
-
"colors.blue.600"
|
|
4
|
-
)})`,
|
|
5
|
-
"white-indigo-gradient": `linear-gradient(186deg, ${theme("colors.white / 10%")} 35.98%, ${theme(
|
|
6
|
-
"colors.indigo.500 / 19%"
|
|
7
|
-
)} 96.63%)`,
|
|
8
|
-
"chat-template": `linear-gradient(179deg, ${theme("colors.white / 10%")} 45.13%, ${theme("colors.blue.10")} 99.12%)`,
|
|
9
|
-
"blue-linear-gradient": `linear-gradient(0deg, ${theme("colors.blue.purple")} 40.19%, ${theme(
|
|
10
|
-
"colors.blue.650"
|
|
11
|
-
)} 111.1%)`,
|
|
12
|
-
"new-deployment-gradient": `linear-gradient(180deg, ${theme("colors.white")} 30.17%, ${theme(
|
|
13
|
-
"colors.gray.100"
|
|
14
|
-
)} 100%)`
|
|
15
|
-
});
|
|
16
|
-
export {
|
|
17
|
-
backgroundImage
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=backgroundImage.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backgroundImage.es.js","sources":["../../../src/components/theme/backgroundImage.ts"],"sourcesContent":["export const backgroundImage = (theme: (path: string) => string | undefined) => ({\n 'blue-red-gradient': `linear-gradient(to right, ${theme('colors.violet.500')}, ${theme('colors.rose.400')}, ${theme(\n 'colors.blue.600',\n )})`,\n 'white-indigo-gradient': `linear-gradient(186deg, ${theme('colors.white / 10%')} 35.98%, ${theme(\n 'colors.indigo.500 / 19%',\n )} 96.63%)`,\n 'chat-template': `linear-gradient(179deg, ${theme('colors.white / 10%')} 45.13%, ${theme('colors.blue.10')} 99.12%)`,\n 'blue-linear-gradient': `linear-gradient(0deg, ${theme('colors.blue.purple')} 40.19%, ${theme(\n 'colors.blue.650',\n )} 111.1%)`,\n 'new-deployment-gradient': `linear-gradient(180deg, ${theme('colors.white')} 30.17%, ${theme(\n 'colors.gray.100',\n )} 100%)`,\n})\n"],"names":[],"mappings":"AAAa,MAAA,kBAAkB,CAAC,WAAiD;AAAA,EAC/E,qBAAqB,6BAA6B,MAAM,mBAAmB,CAAC,KAAK,MAAM,iBAAiB,CAAC,KAAK;AAAA,IAC5G;AAAA,EACD,CAAA;AAAA,EACD,yBAAyB,2BAA2B,MAAM,oBAAoB,CAAC,YAAY;AAAA,IACzF;AAAA,EACD,CAAA;AAAA,EACD,iBAAiB,2BAA2B,MAAM,oBAAoB,CAAC,YAAY,MAAM,gBAAgB,CAAC;AAAA,EAC1G,wBAAwB,yBAAyB,MAAM,oBAAoB,CAAC,YAAY;AAAA,IACtF;AAAA,EACD,CAAA;AAAA,EACD,2BAA2B,2BAA2B,MAAM,cAAc,CAAC,YAAY;AAAA,IACrF;AAAA,EACD,CAAA;AACH;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"borderWidth.es.js","sources":["../../../src/components/theme/borderWidth.ts"],"sourcesContent":["export const borderWidth = {\n DEFAULT: '0.0625rem',\n 1: '0.0625rem',\n}\n"],"names":[],"mappings":"AAAO,MAAM,cAAc;AAAA,EACzB,SAAS;AAAA,EACT,GAAG;AACL;"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export declare const colors: {
|
|
2
|
-
gray: {
|
|
3
|
-
16: string;
|
|
4
|
-
25: string;
|
|
5
|
-
50: string;
|
|
6
|
-
100: string;
|
|
7
|
-
150: string;
|
|
8
|
-
200: string;
|
|
9
|
-
225: string;
|
|
10
|
-
250: string;
|
|
11
|
-
300: string;
|
|
12
|
-
350: string;
|
|
13
|
-
400: string;
|
|
14
|
-
450: string;
|
|
15
|
-
500: string;
|
|
16
|
-
550: string;
|
|
17
|
-
600: string;
|
|
18
|
-
650: string;
|
|
19
|
-
700: string;
|
|
20
|
-
750: string;
|
|
21
|
-
800: string;
|
|
22
|
-
850: string;
|
|
23
|
-
900: string;
|
|
24
|
-
950: string;
|
|
25
|
-
1000: string;
|
|
26
|
-
disabled: string;
|
|
27
|
-
};
|
|
28
|
-
indigo: {
|
|
29
|
-
500: string;
|
|
30
|
-
};
|
|
31
|
-
yellow: {
|
|
32
|
-
'50light': string;
|
|
33
|
-
100: string;
|
|
34
|
-
'200dark': string;
|
|
35
|
-
500: string;
|
|
36
|
-
};
|
|
37
|
-
skyblue: string;
|
|
38
|
-
blue: {
|
|
39
|
-
10: string;
|
|
40
|
-
primary: string;
|
|
41
|
-
secondary: string;
|
|
42
|
-
purple: string;
|
|
43
|
-
'purple-2': string;
|
|
44
|
-
'purple-3': string;
|
|
45
|
-
100: string;
|
|
46
|
-
200: string;
|
|
47
|
-
500: string;
|
|
48
|
-
'500original': string;
|
|
49
|
-
650: string;
|
|
50
|
-
600: string;
|
|
51
|
-
dark: string;
|
|
52
|
-
};
|
|
53
|
-
green: {
|
|
54
|
-
600: string;
|
|
55
|
-
};
|
|
56
|
-
violet: {
|
|
57
|
-
500: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const colors = {
|
|
2
|
-
gray: {
|
|
3
|
-
16: "#162236",
|
|
4
|
-
25: "#F5FAFF",
|
|
5
|
-
50: "#fafcff",
|
|
6
|
-
100: "#F0F7FF",
|
|
7
|
-
150: "#E8F2FE",
|
|
8
|
-
200: "#E0ECFD",
|
|
9
|
-
225: "#CAD4E3",
|
|
10
|
-
250: "#CEE0F8",
|
|
11
|
-
300: "#A8C3E8",
|
|
12
|
-
350: "#95B2DD",
|
|
13
|
-
400: "#82A0CE",
|
|
14
|
-
450: "#6F8EBD",
|
|
15
|
-
500: "#5E7BAA",
|
|
16
|
-
550: "#4D6896",
|
|
17
|
-
600: "#3E5680",
|
|
18
|
-
650: "#31456A",
|
|
19
|
-
700: "#263755",
|
|
20
|
-
750: "#1C2A42",
|
|
21
|
-
800: "#0E1623",
|
|
22
|
-
850: "#090F17",
|
|
23
|
-
900: "#05090E",
|
|
24
|
-
950: "#030407",
|
|
25
|
-
1e3: "#010202",
|
|
26
|
-
disabled: "#f2f2f2"
|
|
27
|
-
},
|
|
28
|
-
indigo: {
|
|
29
|
-
500: "#6366F1"
|
|
30
|
-
},
|
|
31
|
-
yellow: {
|
|
32
|
-
"50light": "#FFFBEB",
|
|
33
|
-
100: "#FEF3C7",
|
|
34
|
-
"200dark": "#FDE68A",
|
|
35
|
-
500: "#F59E0B"
|
|
36
|
-
},
|
|
37
|
-
skyblue: "#F5FAFF",
|
|
38
|
-
blue: {
|
|
39
|
-
10: "#F5F9FF",
|
|
40
|
-
primary: "#481DF1",
|
|
41
|
-
secondary: "#93C5FD",
|
|
42
|
-
purple: "#5501E1",
|
|
43
|
-
"purple-2": "#0047ff",
|
|
44
|
-
"purple-3": "#2900CE",
|
|
45
|
-
100: "#e0e7ff",
|
|
46
|
-
200: "#818cf8",
|
|
47
|
-
500: "#BBD2F1",
|
|
48
|
-
"500original": "#3b82f6",
|
|
49
|
-
650: "#2F5FFF",
|
|
50
|
-
600: "#2563EB",
|
|
51
|
-
dark: "#003466"
|
|
52
|
-
},
|
|
53
|
-
green: {
|
|
54
|
-
600: "#059669"
|
|
55
|
-
},
|
|
56
|
-
violet: {
|
|
57
|
-
500: "#4F46E5"
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
colors
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=colors.es.js.map
|