@ssa-ui-kit/core 2.28.2 → 2.28.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.
@@ -7,6 +7,7 @@ export declare const DaysViewCell: import("@emotion/styled").StyledComponent<{
7
7
  alignItems?: string;
8
8
  fade?: boolean;
9
9
  fadeDelay?: number;
10
+ isVisible?: boolean;
10
11
  } & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
11
12
  theme?: import("@emotion/react").Theme;
12
13
  } & {
@@ -7,6 +7,7 @@ export declare const DatesListWrapper: import("@emotion/styled").StyledComponent
7
7
  alignItems?: string;
8
8
  fade?: boolean;
9
9
  fadeDelay?: number;
10
+ isVisible?: boolean;
10
11
  } & import("../../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
11
12
  theme?: import("@emotion/react").Theme;
12
13
  }, {}, {}>;
@@ -7,6 +7,7 @@ export declare const DaysViewCell: import("@emotion/styled").StyledComponent<{
7
7
  alignItems?: string;
8
8
  fade?: boolean;
9
9
  fadeDelay?: number;
10
+ isVisible?: boolean;
10
11
  } & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
11
12
  theme?: import("@emotion/react").Theme;
12
13
  } & {
@@ -42,6 +43,7 @@ export declare const TriggerWrapper: import("@emotion/styled").StyledComponent<{
42
43
  alignItems?: string;
43
44
  fade?: boolean;
44
45
  fadeDelay?: number;
46
+ isVisible?: boolean;
45
47
  } & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
46
48
  theme?: import("@emotion/react").Theme;
47
49
  }, {}, {}>;
@@ -7,6 +7,7 @@ export declare const FilterBlockWrapper: import("@emotion/styled").StyledCompone
7
7
  alignItems?: string;
8
8
  fade?: boolean;
9
9
  fadeDelay?: number;
10
+ isVisible?: boolean;
10
11
  } & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
11
12
  theme?: import("@emotion/react").Theme;
12
13
  }, {}, {}>;
@@ -1,3 +1,3 @@
1
1
  import { TagsProps } from './types';
2
- declare const Tag: ({ color, size, className, children, }: TagsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare const Tag: ({ color, size, className, children, customStyles, }: TagsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Tag;
@@ -1,6 +1,15 @@
1
1
  import { CommonProps } from '../../types/emotion';
2
+ import { Interpolation, Theme } from '@emotion/react';
3
+ export interface CustomTagStyles {
4
+ color?: string;
5
+ background?: string;
6
+ border?: string;
7
+ boxShadow?: string;
8
+ css?: Interpolation<Theme>;
9
+ }
2
10
  export interface TagsProps extends CommonProps {
3
11
  color?: keyof MainColors;
4
12
  size?: keyof MainSizes;
5
13
  children: React.ReactNode;
14
+ customStyles?: CustomTagStyles;
6
15
  }
@@ -36,6 +36,7 @@ export declare const TypeaheadInputsGroupWrapper: import("@emotion/styled").Styl
36
36
  alignItems?: string;
37
37
  fade?: boolean;
38
38
  fadeDelay?: number;
39
+ isVisible?: boolean;
39
40
  } & import("../..").CommonProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
40
41
  theme?: Theme;
41
42
  } & {
@@ -8,5 +8,6 @@ declare const Wrapper: import("@emotion/styled").StyledComponent<{
8
8
  alignItems?: string;
9
9
  fade?: boolean;
10
10
  fadeDelay?: number;
11
+ isVisible?: boolean;
11
12
  } & CommonProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
13
  export default Wrapper;
package/dist/index.js CHANGED
@@ -1481,21 +1481,26 @@ const Wrapper = /*#__PURE__*/base_default()("div", true ? {
1481
1481
  }) => alignItems ? alignItems : 'center', ";width:100%;flex-direction:", ({
1482
1482
  direction
1483
1483
  }) => direction ? direction : 'row', ";", ({
1484
+ isVisible = true,
1484
1485
  fade,
1485
1486
  fadeDelay = 0.3
1486
- }) => fade && `
1487
- opacity: 0;
1488
- animation: fadeInOut ${fadeDelay}s ease-in-out forwards;
1489
-
1490
- @keyframes fadeInOut {
1491
- 0% {
1492
- opacity: 0;
1493
- }
1494
- 100% {
1495
- opacity: 1;
1496
- }
1497
- }
1498
- `, ";" + ( true ? "" : 0));
1487
+ }) => {
1488
+ const baseStyles = `
1489
+ opacity: ${isVisible ? 1 : 0};
1490
+ `;
1491
+ if (fade) {
1492
+ return `
1493
+ ${baseStyles}
1494
+ transition: opacity ${fadeDelay}s ease-in-out, visibility ${fadeDelay}s ease-in-out;
1495
+ visibility: ${isVisible ? 'visible' : 'hidden'};
1496
+ ${!isVisible ? `transition-delay: 0s, ${fadeDelay}s;` : ''}
1497
+ `;
1498
+ }
1499
+ return `
1500
+ ${baseStyles}
1501
+ visibility: ${isVisible ? 'visible' : 'hidden'};
1502
+ `;
1503
+ }, ";" + ( true ? "" : 0));
1499
1504
  /* harmony default export */ const Wrapper_Wrapper = (Wrapper);
1500
1505
  ;// ./src/components/Button/ButtonBase.tsx
1501
1506
 
@@ -8041,6 +8046,7 @@ const styles_blueLight = theme => /*#__PURE__*/(0,react_namespaceObject.css)("co
8041
8046
 
8042
8047
 
8043
8048
 
8049
+
8044
8050
  const Tag_mapColors = {
8045
8051
  pink: [styles_pink, pinkBorder],
8046
8052
  yellow: [styles_yellow, yellowBorder],
@@ -8051,18 +8057,29 @@ const Tag_mapColors = {
8051
8057
  blue: [styles_blue, blueBorder],
8052
8058
  yellowWarm: [styles_yellowWarm, yellowWarmBorder]
8053
8059
  };
8060
+ const createCustomStyles = customStyles => {
8061
+ if (!customStyles) return [];
8062
+ const styles = [/*#__PURE__*/(0,react_namespaceObject.css)(customStyles.color && `color: ${customStyles.color};`, " ", customStyles.background && `background: ${customStyles.background};`, " ", customStyles.border && `border: ${customStyles.border};`, " ", customStyles.boxShadow && `box-shadow: ${customStyles.boxShadow};`, ";" + ( true ? "" : 0), true ? "" : 0)];
8063
+ return customStyles.css ? [styles, customStyles.css] : [styles];
8064
+ };
8054
8065
  const Tag = ({
8055
8066
  color = 'purple',
8056
8067
  size = 'medium',
8057
8068
  className,
8058
- children
8059
- }) => (0,jsx_runtime_namespaceObject.jsx)(Badge_Badge, {
8060
- color: color,
8061
- size: size,
8062
- css: Tag_mapColors[color],
8063
- className: className,
8064
- children: children
8065
- });
8069
+ children,
8070
+ customStyles
8071
+ }) => {
8072
+ const hasCustomStyles = customStyles && Object.keys(customStyles).length > 0;
8073
+ const defaultStyles = hasCustomStyles ? null : Tag_mapColors[color];
8074
+ const customStylesArray = createCustomStyles(customStyles);
8075
+ return (0,jsx_runtime_namespaceObject.jsx)(Badge_Badge, {
8076
+ color: hasCustomStyles ? 'transparent' : color,
8077
+ size: size,
8078
+ css: [defaultStyles, ...(customStylesArray || []), true ? "" : 0],
8079
+ className: className,
8080
+ children: children
8081
+ });
8082
+ };
8066
8083
  /* harmony default export */ const Tag_Tag = (Tag);
8067
8084
  ;// ./src/components/Textarea/TextareaBase.tsx
8068
8085