ab-ui-library 1.58.3 → 1.59.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.
@@ -120,7 +120,7 @@ var CardSelect = function CardSelect(props) {
120
120
  className: 'card-select__content__left'
121
121
  }, /*#__PURE__*/React.createElement("div", {
122
122
  className: 'flexbox align-items--center'
123
- }, /*#__PURE__*/React.createElement(Text, {
123
+ }, /*#__PURE__*/React.isValidElement(title) ? title : /*#__PURE__*/React.createElement(Text, {
124
124
  type: disabled ? 'disabled' : 'primary',
125
125
  size: 'medium',
126
126
  weight: 'bold'
@@ -1,7 +1,7 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
2
  import type { TInfoList } from '../types';
3
3
  interface TCardAdditionalInfo {
4
- additionalInfo?: TInfoList;
4
+ additionalInfo?: TInfoList | ReactNode;
5
5
  disabled?: boolean;
6
6
  }
7
7
  export declare const CardAdditionalInfo: (props: TCardAdditionalInfo) => ReactElement | null;
@@ -8,28 +8,34 @@ import 'dayjs';
8
8
  var CardAdditionalInfo = function CardAdditionalInfo(props) {
9
9
  var additionalInfo = props.additionalInfo,
10
10
  disabled = props.disabled;
11
- return additionalInfo !== null && additionalInfo !== void 0 && additionalInfo.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
12
- type: 'primary',
13
- isHorizontal: true,
14
- className: 'mt-16 mb-16'
15
- }), /*#__PURE__*/React.createElement("div", {
16
- className: "card-select__list"
17
- }, additionalInfo.map(function (_ref) {
18
- var key = _ref.key,
19
- value = _ref.value,
20
- id = _ref.id;
21
- return /*#__PURE__*/React.createElement("div", {
22
- key: id,
23
- className: "card-select__list__item flexbox justify-content--between mt-12"
24
- }, /*#__PURE__*/React.createElement(Text, {
25
- type: disabled ? 'disabled' : 'secondary',
26
- size: 'small',
27
- className: 'pr-16'
28
- }, key), /*#__PURE__*/React.createElement(Text, {
29
- type: disabled ? 'disabled' : 'primary',
30
- weight: 'semibold'
31
- }, value));
32
- }))) : null;
11
+ if (/*#__PURE__*/React.isValidElement(additionalInfo)) {
12
+ return additionalInfo;
13
+ }
14
+ if (Array.isArray(additionalInfo) && additionalInfo.length) {
15
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
16
+ type: 'primary',
17
+ isHorizontal: true,
18
+ className: 'mt-16 mb-16'
19
+ }), /*#__PURE__*/React.createElement("div", {
20
+ className: "card-select__list"
21
+ }, additionalInfo.map(function (_ref) {
22
+ var key = _ref.key,
23
+ value = _ref.value,
24
+ id = _ref.id;
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ key: id,
27
+ className: "card-select__list__item flexbox justify-content--between mt-12"
28
+ }, /*#__PURE__*/React.createElement(Text, {
29
+ type: disabled ? 'disabled' : 'secondary',
30
+ size: 'small',
31
+ className: 'pr-16'
32
+ }, key), /*#__PURE__*/React.createElement(Text, {
33
+ type: disabled ? 'disabled' : 'primary',
34
+ weight: 'semibold'
35
+ }, value));
36
+ })));
37
+ }
38
+ return null;
33
39
  };
34
40
 
35
41
  export { CardAdditionalInfo };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { InputCustomProps } from '../Input/types';
2
3
  import type { TChipsProps } from '../Chips/types';
3
4
  import type { CARD_SELECT_TYPES } from '../../consts';
@@ -6,7 +7,7 @@ import type { TTooltipProps } from '../Tooltip/types';
6
7
  export interface TCardSelectProps extends IFormCompProps {
7
8
  id?: number | string;
8
9
  type?: CARD_SELECT_TYPES;
9
- title: string;
10
+ title: string | React.ReactNode;
10
11
  subtext?: string;
11
12
  description?: string;
12
13
  chips?: TChipsProps[];
@@ -15,7 +16,7 @@ export interface TCardSelectProps extends IFormCompProps {
15
16
  disabled?: boolean;
16
17
  handleCardSelectValue?: (isChecked: boolean) => void;
17
18
  dataId?: string;
18
- additionalInfo?: TInfoList;
19
+ additionalInfo?: TInfoList | React.ReactNode;
19
20
  selectedCard?: number;
20
21
  value?: number | string;
21
22
  handleChange?: (selected: number | string) => void;
@@ -0,0 +1,4 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { ISVGIconProps } from './types';
3
+ export declare const IconArrowTrendingLines: ({ size, type, className, onClick, refHandler, id, dataId }: ISVGIconProps) => ReactElement;
4
+ export default IconArrowTrendingLines;
@@ -0,0 +1,30 @@
1
+ import { _ as _defineProperty } from '../../defineProperty-9000dd50.js';
2
+ import React from 'react';
3
+ import classNames from 'classnames';
4
+ import '../../typeof-28108b73.js';
5
+
6
+ var IconArrowTrendingLines = function IconArrowTrendingLines(_ref) {
7
+ var size = _ref.size,
8
+ type = _ref.type,
9
+ _ref$className = _ref.className,
10
+ className = _ref$className === void 0 ? '' : _ref$className,
11
+ onClick = _ref.onClick,
12
+ refHandler = _ref.refHandler,
13
+ id = _ref.id,
14
+ dataId = _ref.dataId;
15
+ return /*#__PURE__*/React.createElement("svg", {
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ className: classNames('svg-icon', _defineProperty(_defineProperty(_defineProperty({}, "svg-icon__size-".concat(size), size), "svg-icon__type-".concat(type), type), className, className)),
18
+ viewBox: "0 0 32 32",
19
+ fill: "none",
20
+ onClick: onClick,
21
+ ref: refHandler,
22
+ id: id,
23
+ "data-id": dataId ? "".concat(dataId, "-svg-icon") : ''
24
+ }, /*#__PURE__*/React.createElement("path", {
25
+ d: "M22.3319 2.66663L28.4036 2.66732L28.5373 2.68588L28.6691 2.72269L28.7494 2.75676C28.8551 2.80324 28.9541 2.87083 29.041 2.95777L29.0953 3.01649L29.1534 3.09167L29.2256 3.21183L29.2771 3.33226L29.3027 3.41769L29.3208 3.50303L29.3333 3.62863L29.3339 9.67181C29.3339 10.2241 28.8862 10.6718 28.3339 10.6718C27.8277 10.6718 27.4093 10.2956 27.3431 9.80751L27.3339 9.67181L27.3333 6.07863L18.7476 14.6663C18.3925 15.0213 17.837 15.0536 17.4455 14.7632L17.3333 14.6663L13.2929 10.7856L5.70711 18.3714C5.31658 18.7619 4.68342 18.7619 4.29289 18.3714C3.93787 18.0164 3.9056 17.4609 4.19607 17.0694L4.29289 16.9572L12.5858 8.6643C12.9408 8.30929 13.4964 8.27701 13.8878 8.56747L14 8.66429L18.0404 12.545L25.9173 4.66663H22.3319C21.8256 4.66663 21.4072 4.29042 21.341 3.80232L21.3319 3.66663C21.3319 3.16036 21.7081 2.74197 22.1962 2.67575L22.3319 2.66663ZM5 22.6666C5.55228 22.6666 6 23.1143 6 23.6666V28.3333C6 28.8856 5.55228 29.3333 5 29.3333C4.44772 29.3333 4 28.8856 4 28.3333V23.6666C4 23.1143 4.44772 22.6666 5 22.6666ZM12.6667 18.3333C12.6667 17.781 12.219 17.3333 11.6667 17.3333C11.1144 17.3333 10.6667 17.781 10.6667 18.3333V28.3333C10.6667 28.8856 11.1144 29.3333 11.6667 29.3333C12.219 29.3333 12.6667 28.8856 12.6667 28.3333V18.3333ZM18.3333 20C18.8856 20 19.3333 20.4477 19.3333 21V28.3333C19.3333 28.8856 18.8856 29.3333 18.3333 29.3333C17.781 29.3333 17.3333 28.8856 17.3333 28.3333V21C17.3333 20.4477 17.781 20 18.3333 20ZM26 14.3333C26 13.781 25.5523 13.3333 25 13.3333C24.4477 13.3333 24 13.781 24 14.3333V28.3333C24 28.8856 24.4477 29.3333 25 29.3333C25.5523 29.3333 26 28.8856 26 28.3333V14.3333Z",
26
+ fill: "#005CCA"
27
+ }));
28
+ };
29
+
30
+ export { IconArrowTrendingLines, IconArrowTrendingLines as default };
@@ -424,3 +424,4 @@ export * from './IconZoomOut';
424
424
  export * from './IconZoomOutFilled';
425
425
  export * from './IconWifiOff';
426
426
  export * from './IconAppStore';
427
+ export * from './IconArrowTrendingLines';
@@ -423,6 +423,7 @@ export { IconZoomInFilled } from './IconZoomInFilled.js';
423
423
  export { IconZoomOut } from './IconZoomOut.js';
424
424
  export { IconZoomOutFilled } from './IconZoomOutFilled.js';
425
425
  export { IconAppStore } from './IconAppStore.js';
426
+ export { IconArrowTrendingLines } from './IconArrowTrendingLines.js';
426
427
  import '../../defineProperty-9000dd50.js';
427
428
  import '../../typeof-28108b73.js';
428
429
  import 'react';
package/index.js CHANGED
@@ -488,6 +488,7 @@ export { IconZoomInFilled } from './components/SVGIcons/IconZoomInFilled.js';
488
488
  export { IconZoomOut } from './components/SVGIcons/IconZoomOut.js';
489
489
  export { IconZoomOutFilled } from './components/SVGIcons/IconZoomOutFilled.js';
490
490
  export { IconAppStore } from './components/SVGIcons/IconAppStore.js';
491
+ export { IconArrowTrendingLines } from './components/SVGIcons/IconArrowTrendingLines.js';
491
492
  export { OneTimePassword } from './components/OneTimePassword/OneTimePassword.js';
492
493
  export { OptionItem } from './helperComponents/OptionItem/OptionItem.js';
493
494
  export { MultiTextareaWithChips } from './components/MultiTextareaWithChips/MultiTextareaWithChips.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-ui-library",
3
- "version": "1.58.3",
3
+ "version": "1.59.0",
4
4
  "description": "UI library for AM",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",