@itcase/ui 1.2.29 → 1.2.31
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/{Badge-TyPbVqR_.js → Badge-BMKD9teI.js} +6 -2
- package/dist/{Badge-BZYBmgBK.js → Badge-DQnTpE4I.js} +6 -2
- package/dist/{Button-avhviao1.js → Button-DS2l65oq.js} +4 -4
- package/dist/{Button-BcOsYgoT.js → Button-x4mnZJoS.js} +3 -3
- package/dist/Divider-3upWnf8a.js +71 -0
- package/dist/Divider-DE2Q5J36.js +68 -0
- package/dist/{DropdownItem-toApJyeB.js → DropdownItem-CT9Dmiub.js} +38 -14
- package/dist/DropdownItem-DzDP45iO.js +179 -0
- package/dist/{Icon-ClsRaxDk.js → Icon-B7BJo5kW.js} +14 -19
- package/dist/{Icon-B2BwTQnP.js → Icon-PoesVPJn.js} +13 -18
- package/dist/{Input-BaicBuyd.js → Input-DXbt_RWB.js} +1 -2
- package/dist/{Input-DbzsXvEf.js → Input-HGM-rzzr.js} +1 -2
- package/dist/{Label-fp2Bus_T.js → Label-BBm19sQ-.js} +3 -6
- package/dist/{Label-BfotYOmD.js → Label-Chm6tl6E.js} +3 -6
- package/dist/{Link-CzC1kU5C.js → Link-CeQuavin.js} +1 -1
- package/dist/Loader-CqEocvjh.js +56 -0
- package/dist/Loader-DRTOGvF1.js +59 -0
- package/dist/{MenuItem-BJ3uGKCH.js → MenuItem-DPJ_9FxW.js} +14 -3
- package/dist/{MenuItem-BEYVY0Vf.js → MenuItem-zHzWXIvQ.js} +15 -4
- package/dist/{Scrollbar-CrGXCZ_F.js → Scrollbar-Bo7z7ELm.js} +10 -13
- package/dist/{Scrollbar-DVlIZzvz.js → Scrollbar-CKbA0jQU.js} +10 -13
- package/dist/{Text-CC0xnhmx.js → Text-1b-Bk7yG.js} +3 -4
- package/dist/{Text-kxGZButz.js → Text-DlSG_p4u.js} +3 -4
- package/dist/{Title-CQ_Fr1hO.js → Title-mkus84Rh.js} +3 -6
- package/dist/{Title-Ze_OL1Co.js → Title-o5ofk8ge.js} +3 -6
- package/dist/{Tooltip-PrwacZFC.js → Tooltip-CNJN2lf5.js} +19 -3
- package/dist/{Tooltip-ccRCMYQM.js → Tooltip-f5EWhsGj.js} +19 -3
- package/dist/appearance/Avatar.js +5 -0
- package/dist/appearance/Code.js +5 -0
- package/dist/appearance/Divider.js +5 -0
- package/dist/appearance/DropdownItem.js +5 -0
- package/dist/appearance/Modal.js +5 -0
- package/dist/appearance/Response.js +95 -21
- package/dist/appearance/SiteMenu.js +5 -0
- package/dist/appearance/Switch.js +5 -0
- package/dist/appearance/Tile.js +5 -0
- package/dist/cjs/appearance/Avatar.js +7 -0
- package/dist/cjs/appearance/Code.js +7 -0
- package/dist/cjs/appearance/Divider.js +7 -0
- package/dist/cjs/appearance/DropdownItem.js +7 -0
- package/dist/cjs/appearance/Modal.js +7 -0
- package/dist/cjs/appearance/Response.js +95 -21
- package/dist/cjs/appearance/SiteMenu.js +7 -0
- package/dist/cjs/appearance/Switch.js +7 -0
- package/dist/cjs/appearance/Tile.js +7 -0
- package/dist/cjs/components/Accordion.js +6 -6
- package/dist/cjs/components/Avatar.js +22 -8
- package/dist/cjs/components/Badge.js +2 -3
- package/dist/cjs/components/Breadcrumbs.js +4 -8
- package/dist/cjs/components/Button.js +7 -8
- package/dist/cjs/components/Caption.js +0 -1
- package/dist/cjs/components/Card.js +3 -12
- package/dist/cjs/components/Cell.js +7 -12
- package/dist/cjs/components/Checkbox.js +1 -5
- package/dist/cjs/components/Chips.js +1 -2
- package/dist/cjs/components/Choice.js +6 -7
- package/dist/cjs/components/Code.js +31 -10
- package/dist/cjs/components/ContextMenu.js +9 -21
- package/dist/cjs/components/CookiesWarning.js +9 -15
- package/dist/cjs/components/DadataHintField.js +1 -2
- package/dist/cjs/components/DatePicker.js +10 -1053
- package/dist/cjs/components/Divider.js +3 -2
- package/dist/cjs/components/Dot.js +1 -3
- package/dist/cjs/components/Dropdown.js +6 -4
- package/dist/cjs/components/Flex.js +0 -1
- package/dist/cjs/components/Grid.js +1 -8
- package/dist/cjs/components/Group.js +0 -1
- package/dist/cjs/components/HTMLContent.js +0 -1
- package/dist/cjs/components/Icon.js +5 -6
- package/dist/cjs/components/Image.js +0 -1
- package/dist/cjs/components/Input.js +1 -2
- package/dist/cjs/components/InputMask.js +7 -9
- package/dist/cjs/components/InputPassword.js +5 -6
- package/dist/cjs/components/Label.js +4 -5
- package/dist/cjs/components/LanguageSelector.js +5 -6
- package/dist/cjs/components/Link.js +0 -1
- package/dist/cjs/components/List.js +0 -1
- package/dist/cjs/components/Loader.js +2 -3
- package/dist/cjs/components/Logo.js +0 -1
- package/dist/cjs/components/Menu.js +2 -3
- package/dist/cjs/components/MenuItem.js +2 -3
- package/dist/cjs/components/Modal.js +27 -7
- package/dist/cjs/components/ModalSheetBottom.js +34 -0
- package/dist/cjs/components/Notification.js +7 -6
- package/dist/cjs/components/Overlay.js +0 -1
- package/dist/cjs/components/Page.js +3 -46
- package/dist/cjs/components/Pagination.js +8 -7
- package/dist/cjs/components/Panel.js +1 -2
- package/dist/cjs/components/Radio.js +1 -3
- package/dist/cjs/components/RangeSlider.js +0 -1
- package/dist/cjs/components/Response.js +20 -15
- package/dist/cjs/components/SVGContent.js +0 -1
- package/dist/cjs/components/ScrollOnDrag.js +0 -1
- package/dist/cjs/components/ScrollToView.js +0 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +9 -12
- package/dist/cjs/components/Segmented.js +1 -2
- package/dist/cjs/components/Select.js +7 -7
- package/dist/cjs/components/SiteMenu.js +18 -8
- package/dist/cjs/components/Swiper.js +6 -8
- package/dist/cjs/components/Switch.js +12 -3
- package/dist/cjs/components/Tab.js +4 -4
- package/dist/cjs/components/Text.js +1 -2
- package/dist/cjs/components/Textarea.js +0 -1
- package/dist/cjs/components/Tile.js +22 -6
- package/dist/cjs/components/Title.js +1 -2
- package/dist/cjs/components/Tooltip.js +3 -4
- package/dist/cjs/components/Video.js +0 -1
- package/dist/cjs/components/Wrapper.js +3 -8
- package/dist/cjs/context/Notifications.js +0 -5
- package/dist/cjs/context/UIContext.js +0 -9
- package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
- package/dist/cjs/hooks/useStyles.js +0 -1
- package/dist/components/Accordion.js +8 -8
- package/dist/components/Avatar.js +23 -10
- package/dist/components/Badge.js +2 -3
- package/dist/components/Breadcrumbs.js +6 -10
- package/dist/components/Button.js +8 -9
- package/dist/components/Caption.js +0 -1
- package/dist/components/Card.js +3 -12
- package/dist/components/Cell.js +8 -13
- package/dist/components/Checkbox.js +1 -5
- package/dist/components/Chips.js +1 -2
- package/dist/components/Choice.js +7 -8
- package/dist/components/Code.js +32 -12
- package/dist/components/ContextMenu.js +10 -22
- package/dist/components/CookiesWarning.js +10 -16
- package/dist/components/DadataHintField.js +2 -3
- package/dist/components/DatePicker.js +11 -1054
- package/dist/components/Divider.js +2 -2
- package/dist/components/Dot.js +1 -3
- package/dist/components/Dropdown.js +7 -6
- package/dist/components/Flex.js +0 -1
- package/dist/components/Grid.js +1 -8
- package/dist/components/Group.js +0 -1
- package/dist/components/HTMLContent.js +0 -1
- package/dist/components/Icon.js +6 -7
- package/dist/components/Image.js +0 -1
- package/dist/components/Input.js +1 -2
- package/dist/components/InputMask.js +7 -9
- package/dist/components/InputPassword.js +6 -7
- package/dist/components/Label.js +4 -5
- package/dist/components/LanguageSelector.js +6 -7
- package/dist/components/Link.js +2 -3
- package/dist/components/List.js +2 -3
- package/dist/components/Loader.js +2 -3
- package/dist/components/Logo.js +2 -3
- package/dist/components/Menu.js +4 -5
- package/dist/components/MenuItem.js +4 -5
- package/dist/components/Modal.js +27 -8
- package/dist/components/ModalSheetBottom.js +32 -0
- package/dist/components/Notification.js +8 -7
- package/dist/components/Overlay.js +0 -1
- package/dist/components/Page.js +3 -46
- package/dist/components/Pagination.js +10 -9
- package/dist/components/Panel.js +1 -2
- package/dist/components/Radio.js +1 -3
- package/dist/components/RangeSlider.js +0 -1
- package/dist/components/Response.js +21 -16
- package/dist/components/SVGContent.js +0 -1
- package/dist/components/ScrollOnDrag.js +1 -2
- package/dist/components/ScrollToView.js +0 -1
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +10 -13
- package/dist/components/Segmented.js +1 -2
- package/dist/components/Select.js +9 -9
- package/dist/components/SiteMenu.js +19 -10
- package/dist/components/Swiper.js +6 -8
- package/dist/components/Switch.js +12 -4
- package/dist/components/Tab.js +6 -6
- package/dist/components/Text.js +1 -2
- package/dist/components/Textarea.js +0 -1
- package/dist/components/Tile.js +22 -7
- package/dist/components/Title.js +1 -2
- package/dist/components/Tooltip.js +3 -4
- package/dist/components/Video.js +0 -1
- package/dist/components/Wrapper.js +3 -8
- package/dist/context/Notifications.js +1 -6
- package/dist/context/UIContext.js +0 -9
- package/dist/css/components/ModalSheetBottom/ModalSheetBottom.css +29 -0
- package/dist/hooks/useDeviceTargetClass.js +0 -1
- package/dist/hooks/useStyles.js +0 -1
- package/dist/stories/Response.stories.js +38 -12
- package/dist/{tslib.es6-w7hdJ3oZ.js → tslib.es6-5FtW-kfi.js} +1 -1
- package/dist/types/appearance/Avatar/index.d.ts +2 -0
- package/dist/types/appearance/Code/index.d.ts +2 -0
- package/dist/types/appearance/Divider/index.d.ts +2 -0
- package/dist/types/appearance/DropdownItem/index.d.ts +2 -0
- package/dist/types/appearance/Modal/index.d.ts +2 -0
- package/dist/types/appearance/SiteMenu/index.d.ts +2 -0
- package/dist/types/appearance/Switch/index.d.ts +2 -0
- package/dist/types/appearance/Tile/index.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.d.ts +3 -2
- package/dist/types/components/Avatar/Avatar.interface.d.ts +25 -11
- package/dist/types/components/Avatar/index.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +6 -0
- package/dist/types/components/Breadcrumbs/BreadcrumbsItem.d.ts +0 -5
- package/dist/types/components/Button/Button.interface.d.ts +6 -6
- package/dist/types/components/Card/Card.d.ts +0 -10
- package/dist/types/components/Cell/Cell.d.ts +0 -6
- package/dist/types/components/Checkbox/Checkbox.d.ts +0 -5
- package/dist/types/components/Code/Code.d.ts +6 -8
- package/dist/types/components/Code/Code.interface.d.ts +21 -2
- package/dist/types/components/Code/index.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +0 -5
- package/dist/types/components/CookiesWarning/CookiesWarning.d.ts +0 -7
- package/dist/types/components/Divider/Divider.d.ts +3 -2
- package/dist/types/components/Divider/Divider.interface.d.ts +11 -0
- package/dist/types/components/Divider/index.d.ts +1 -1
- package/dist/types/components/Dot/Dot.d.ts +0 -3
- package/dist/types/components/Dropdown/Dropdown.d.ts +0 -7
- package/dist/types/components/Dropdown/Dropdown.interface.d.ts +28 -15
- package/dist/types/components/Dropdown/DropdownItem.d.ts +5 -4
- package/dist/types/components/Dropdown/index.d.ts +2 -2
- package/dist/types/components/Grid/Grid.d.ts +0 -5
- package/dist/types/components/Grid/GridRow.d.ts +0 -5
- package/dist/types/components/Label/Label.d.ts +0 -5
- package/dist/types/components/Loader/Loader.interface.d.ts +3 -3
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +2 -2
- package/dist/types/components/Modal/Modal.d.ts +3 -2
- package/dist/types/components/Modal/Modal.interface.d.ts +22 -6
- package/dist/types/components/Modal/index.d.ts +2 -2
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.d.ts +3 -0
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.interface.d.ts +11 -0
- package/dist/types/components/ModalSheetBottom/index.d.ts +1 -0
- package/dist/types/components/Notification/Notification.interface.d.ts +8 -7
- package/dist/types/components/Page/Page.d.ts +3 -0
- package/dist/types/components/Page/Page.interface.d.ts +18 -0
- package/dist/types/components/Page/index.d.ts +1 -42
- package/dist/types/components/Radio/Radio.d.ts +0 -1
- package/dist/types/components/Response/Response.interface.d.ts +4 -4
- package/dist/types/components/Scrollbar/Scrollbar.d.ts +0 -5
- package/dist/types/components/Search/Search.interface.d.ts +9 -9
- package/dist/types/components/SiteMenu/SiteMenu.d.ts +3 -2
- package/dist/types/components/SiteMenu/SiteMenu.interface.d.ts +18 -5
- package/dist/types/components/SiteMenu/index.d.ts +2 -2
- package/dist/types/components/Swiper/Swiper.d.ts +0 -1
- package/dist/types/components/Switch/Switch.d.ts +3 -2
- package/dist/types/components/Switch/Switch.interface.d.ts +17 -4
- package/dist/types/components/Switch/index.d.ts +1 -1
- package/dist/types/components/Text/Text.d.ts +0 -5
- package/dist/types/components/Text/Text.interface.d.ts +1 -1
- package/dist/types/components/Tile/Tile.d.ts +3 -2
- package/dist/types/components/Tile/Tile.interface.d.ts +21 -9
- package/dist/types/components/Tile/index.d.ts +1 -1
- package/dist/types/components/Title/Title.d.ts +0 -5
- package/dist/types/components/Wrapper/Wrapper.d.ts +0 -6
- package/dist/types/context/Notifications.d.ts +0 -7
- package/dist/types/context/UIContext.d.ts +10 -2
- package/dist/types/icons/index.d.ts +2 -2
- package/dist/types/types/componentProps/appearanceKeys.d.ts +1 -1
- package/package.json +29 -32
- package/dist/Divider-BjB5MD6u.js +0 -50
- package/dist/Divider-U5UdY-ef.js +0 -48
- package/dist/DropdownItem-CFkRx8LX.js +0 -156
- package/dist/Loader-CU_5Ydmy.js +0 -53
- package/dist/Loader-Ck59IXGG.js +0 -56
- package/dist/types/constants/componentProps/align.d.ts +0 -2
- package/dist/types/constants/componentProps/alignDirection.d.ts +0 -2
- package/dist/types/constants/componentProps/fill.d.ts +0 -2
- package/dist/types/constants/componentProps/horizontalResizeMode.d.ts +0 -2
- package/dist/types/constants/componentProps/position.d.ts +0 -2
- package/dist/types/constants/componentProps/verticalResizeMode.d.ts +0 -2
- /package/dist/css/{styles → mediaqueries}/mediaqueries.css +0 -0
|
@@ -4,8 +4,8 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { tooltipAppearance } from './appearance/Tooltip.js';
|
|
5
5
|
import { useDeviceTargetClass } from './hooks/useDeviceTargetClass.js';
|
|
6
6
|
import { useStyles } from './hooks/useStyles.js';
|
|
7
|
-
import { T as Text } from './Text-
|
|
8
|
-
import { T as Title } from './Title-
|
|
7
|
+
import { T as Text } from './Text-DlSG_p4u.js';
|
|
8
|
+
import { T as Title } from './Title-mkus84Rh.js';
|
|
9
9
|
|
|
10
10
|
var tooltipConfig = {
|
|
11
11
|
appearance: tooltipAppearance,
|
|
@@ -111,7 +111,23 @@ var Tooltip = React.forwardRef(function Tooltip(props, ref) {
|
|
|
111
111
|
var appearanceConfig = (appearance && tooltipConfig.appearance && tooltipConfig.appearance[appearance]);
|
|
112
112
|
return (jsxs("div", { className: clsx(className, 'tooltip', isTooltipVisible === true && 'tooltip_state_open', isTooltipVisible === false && 'tooltip_state_close', fillClass ||
|
|
113
113
|
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.fill) &&
|
|
114
|
-
"fill_".concat(appearanceConfig.fill).replace(/([A-Z])/g, '-$1').toLowerCase()), shapeClass
|
|
114
|
+
"fill_".concat(appearanceConfig.fill).replace(/([A-Z])/g, '-$1').toLowerCase()), shapeClass ||
|
|
115
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.shape) &&
|
|
116
|
+
"tooltip_shape_".concat(appearanceConfig.shape).replace(/([A-Z])/g, '-$1').toLowerCase()), alignPosition && "tooltip_align-position_".concat(alignPosition), alignDirectionClass ||
|
|
117
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.alignDirection) &&
|
|
118
|
+
"align_".concat(appearanceConfig.alignDirection).replace(/([A-Z])/g, '-$1').toLowerCase()), alignClass ||
|
|
119
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.align) &&
|
|
120
|
+
"align_".concat(appearanceConfig.align).replace(/([A-Z])/g, '-$1').toLowerCase()), alignmentClass ||
|
|
121
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.alignment) &&
|
|
122
|
+
"alignment_".concat(appearanceConfig.alignment).replace(/([A-Z])/g, '-$1').toLowerCase()), borderWidthClass, borderColorClass ||
|
|
123
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.borderColor) &&
|
|
124
|
+
"border-color_".concat(appearanceConfig.borderColor)
|
|
125
|
+
.replace(/([A-Z])/g, '-$1')
|
|
126
|
+
.toLowerCase()), borderTypeClass, elevationClass ||
|
|
127
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.elevation) &&
|
|
128
|
+
"elevation_".concat(appearanceConfig.elevation).replace(/([A-Z])/g, '-$1').toLowerCase()), sizeClass ||
|
|
129
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.size) &&
|
|
130
|
+
"tooltip_size_".concat(appearanceConfig.size).replace(/([A-Z])/g, '-$1').toLowerCase()), arrowPosition && "tooltip_type_arrow tooltip_arrow_position_".concat(arrowPosition), type && "tooltip_type_".concat(type), set && "tooltip_set_".concat(set), widthClass), ref: tooltipElementRef, style: tooltipStyles, onAnimationEnd: onAnimationEnd, children: [before, jsxs("div", { className: "tooltip__inner", children: [title && (jsx(Title, { className: "tooltip__title", size: titleSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleSize), textColor: titleTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextColor), textWeight: titleTextWeight || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextWeight), children: title })), text && (jsx(Text, { className: "tooltip__text", size: textSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textSize), textColor: textColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textColor), children: text })), children] }), after] }));
|
|
115
131
|
});
|
|
116
132
|
|
|
117
133
|
export { Tooltip as T, tooltipConfig as t };
|
|
@@ -1,91 +1,165 @@
|
|
|
1
1
|
var responseAppearance = {
|
|
2
2
|
dev: {
|
|
3
|
+
imageSrc: '/img/response/Search.svg',
|
|
3
4
|
fill: 'surfaceSecondary',
|
|
4
5
|
messageTextColor: 'surfaceTextPrimary',
|
|
5
|
-
messageTextSize: '
|
|
6
|
+
messageTextSize: 'm',
|
|
6
7
|
primaryButtonAppearance: 'surfaceTertiary',
|
|
7
|
-
primaryButtonLabel: 'primary Button',
|
|
8
8
|
primaryButtonLabelTextSize: 'l',
|
|
9
9
|
primaryButtonShape: 'rounded',
|
|
10
10
|
primaryButtonSize: 'xxl',
|
|
11
11
|
primaryButtonWidth: 'fill',
|
|
12
|
-
secondaryButtonAppearance: '
|
|
13
|
-
secondaryButtonLabel: 'secondary Button',
|
|
12
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
14
13
|
secondaryButtonLabelTextSize: 'l',
|
|
15
14
|
secondaryButtonShape: 'rounded',
|
|
16
15
|
secondaryButtonSize: 'xxl',
|
|
17
16
|
secondaryButtonWidth: 'fill',
|
|
18
17
|
titleTextColor: 'surfaceTextPrimary',
|
|
19
18
|
titleTextSize: 'h2',
|
|
20
|
-
titleTextWeight:
|
|
19
|
+
titleTextWeight: 400,
|
|
21
20
|
},
|
|
22
|
-
|
|
21
|
+
custom: {
|
|
23
22
|
messageTextColor: 'surfaceTextPrimary',
|
|
24
|
-
messageTextSize: '
|
|
25
|
-
primaryButtonAppearance: '
|
|
23
|
+
messageTextSize: 'm',
|
|
24
|
+
primaryButtonAppearance: 'accent',
|
|
26
25
|
primaryButtonLabelTextSize: 'l',
|
|
27
26
|
primaryButtonShape: 'rounded',
|
|
28
27
|
primaryButtonSize: 'xxl',
|
|
29
28
|
primaryButtonWidth: 'fill',
|
|
30
|
-
secondaryButtonAppearance: '
|
|
29
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
31
30
|
secondaryButtonLabelTextSize: 'l',
|
|
32
31
|
secondaryButtonShape: 'rounded',
|
|
33
32
|
secondaryButtonSize: 'xxl',
|
|
34
33
|
secondaryButtonWidth: 'fill',
|
|
35
34
|
titleTextColor: 'surfaceTextPrimary',
|
|
36
35
|
titleTextSize: 'h2',
|
|
37
|
-
titleTextWeight:
|
|
36
|
+
titleTextWeight: 400,
|
|
38
37
|
},
|
|
39
|
-
|
|
38
|
+
error: {
|
|
39
|
+
imageSrc: '/img/response/Error.svg',
|
|
40
40
|
messageTextColor: 'surfaceTextPrimary',
|
|
41
|
-
messageTextSize: '
|
|
42
|
-
primaryButtonAppearance: '
|
|
41
|
+
messageTextSize: 'm',
|
|
42
|
+
primaryButtonAppearance: 'secondary',
|
|
43
43
|
primaryButtonLabelTextSize: 'l',
|
|
44
44
|
primaryButtonShape: 'rounded',
|
|
45
45
|
primaryButtonSize: 'xxl',
|
|
46
46
|
primaryButtonWidth: 'fill',
|
|
47
|
-
secondaryButtonAppearance: '
|
|
47
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
48
48
|
secondaryButtonLabelTextSize: 'l',
|
|
49
49
|
secondaryButtonShape: 'rounded',
|
|
50
50
|
secondaryButtonSize: 'xxl',
|
|
51
51
|
secondaryButtonWidth: 'fill',
|
|
52
52
|
titleTextColor: 'surfaceTextPrimary',
|
|
53
53
|
titleTextSize: 'h2',
|
|
54
|
-
titleTextWeight:
|
|
54
|
+
titleTextWeight: 400,
|
|
55
55
|
},
|
|
56
56
|
success: {
|
|
57
|
+
imageSrc: '/img/response/Success.svg',
|
|
57
58
|
messageTextColor: 'surfaceTextPrimary',
|
|
58
|
-
messageTextSize: '
|
|
59
|
+
messageTextSize: 'm',
|
|
59
60
|
primaryButtonAppearance: 'accent',
|
|
60
61
|
primaryButtonLabelTextSize: 'l',
|
|
61
62
|
primaryButtonShape: 'rounded',
|
|
62
63
|
primaryButtonSize: 'xxl',
|
|
63
64
|
primaryButtonWidth: 'fill',
|
|
64
|
-
secondaryButtonAppearance: '
|
|
65
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
65
66
|
secondaryButtonLabelTextSize: 'l',
|
|
66
67
|
secondaryButtonShape: 'rounded',
|
|
67
68
|
secondaryButtonSize: 'xxl',
|
|
68
69
|
secondaryButtonWidth: 'fill',
|
|
69
70
|
titleTextColor: 'surfaceTextPrimary',
|
|
70
71
|
titleTextSize: 'h2',
|
|
71
|
-
titleTextWeight:
|
|
72
|
+
titleTextWeight: 400,
|
|
72
73
|
},
|
|
73
74
|
warning: {
|
|
75
|
+
imageSrc: '/img/response/Warning.svg',
|
|
74
76
|
messageTextColor: 'surfaceTextPrimary',
|
|
75
|
-
messageTextSize: '
|
|
77
|
+
messageTextSize: 'm',
|
|
76
78
|
primaryButtonAppearance: 'primary',
|
|
77
79
|
primaryButtonLabelTextSize: 'l',
|
|
78
80
|
primaryButtonShape: 'rounded',
|
|
79
81
|
primaryButtonSize: 'xxl',
|
|
80
82
|
primaryButtonWidth: 'fill',
|
|
81
|
-
secondaryButtonAppearance: '
|
|
83
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
84
|
+
secondaryButtonLabelTextSize: 'l',
|
|
85
|
+
secondaryButtonShape: 'rounded',
|
|
86
|
+
secondaryButtonSize: 'xxl',
|
|
87
|
+
secondaryButtonWidth: 'fill',
|
|
88
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
89
|
+
titleTextSize: 'h2',
|
|
90
|
+
titleTextWeight: 400,
|
|
91
|
+
},
|
|
92
|
+
fail: {
|
|
93
|
+
imageSrc: '/img/response/Fail.svg',
|
|
94
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
95
|
+
messageTextSize: 'm',
|
|
96
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
97
|
+
primaryButtonLabelTextSize: 'l',
|
|
98
|
+
primaryButtonShape: 'rounded',
|
|
99
|
+
primaryButtonSize: 'xxl',
|
|
100
|
+
primaryButtonWidth: 'fill',
|
|
101
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
102
|
+
secondaryButtonLabelTextSize: 'l',
|
|
103
|
+
secondaryButtonShape: 'rounded',
|
|
104
|
+
secondaryButtonSize: 'xxl',
|
|
105
|
+
secondaryButtonWidth: 'fill',
|
|
106
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
107
|
+
titleTextSize: 'h2',
|
|
108
|
+
titleTextWeight: 400,
|
|
109
|
+
},
|
|
110
|
+
search: {
|
|
111
|
+
imageSrc: '/img/response/Search.svg',
|
|
112
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
113
|
+
messageTextSize: 'm',
|
|
114
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
115
|
+
primaryButtonLabelTextSize: 'l',
|
|
116
|
+
primaryButtonShape: 'rounded',
|
|
117
|
+
primaryButtonSize: 'xxl',
|
|
118
|
+
primaryButtonWidth: 'fill',
|
|
119
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
120
|
+
secondaryButtonLabelTextSize: 'l',
|
|
121
|
+
secondaryButtonShape: 'rounded',
|
|
122
|
+
secondaryButtonSize: 'xxl',
|
|
123
|
+
secondaryButtonWidth: 'fill',
|
|
124
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
125
|
+
titleTextSize: 'h2',
|
|
126
|
+
titleTextWeight: 400,
|
|
127
|
+
},
|
|
128
|
+
cantLoadData: {
|
|
129
|
+
imageSrc: '/img/response/CantLoadData.svg',
|
|
130
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
131
|
+
messageTextSize: 'm',
|
|
132
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
133
|
+
primaryButtonLabelTextSize: 'l',
|
|
134
|
+
primaryButtonShape: 'rounded',
|
|
135
|
+
primaryButtonSize: 'xxl',
|
|
136
|
+
primaryButtonWidth: 'fill',
|
|
137
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
138
|
+
secondaryButtonLabelTextSize: 'l',
|
|
139
|
+
secondaryButtonShape: 'rounded',
|
|
140
|
+
secondaryButtonSize: 'xxl',
|
|
141
|
+
secondaryButtonWidth: 'fill',
|
|
142
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
143
|
+
titleTextSize: 'h2',
|
|
144
|
+
titleTextWeight: 400,
|
|
145
|
+
},
|
|
146
|
+
refresh: {
|
|
147
|
+
imageSrc: '/img/response/Refresh.svg',
|
|
148
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
149
|
+
messageTextSize: 'm',
|
|
150
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
151
|
+
primaryButtonLabelTextSize: 'l',
|
|
152
|
+
primaryButtonShape: 'rounded',
|
|
153
|
+
primaryButtonSize: 'xxl',
|
|
154
|
+
primaryButtonWidth: 'fill',
|
|
155
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
82
156
|
secondaryButtonLabelTextSize: 'l',
|
|
83
157
|
secondaryButtonShape: 'rounded',
|
|
84
158
|
secondaryButtonSize: 'xxl',
|
|
85
159
|
secondaryButtonWidth: 'fill',
|
|
86
160
|
titleTextColor: 'surfaceTextPrimary',
|
|
87
161
|
titleTextSize: 'h2',
|
|
88
|
-
titleTextWeight:
|
|
162
|
+
titleTextWeight: 400,
|
|
89
163
|
},
|
|
90
164
|
};
|
|
91
165
|
|
|
@@ -2,92 +2,166 @@
|
|
|
2
2
|
|
|
3
3
|
var responseAppearance = {
|
|
4
4
|
dev: {
|
|
5
|
+
imageSrc: '/img/response/Search.svg',
|
|
5
6
|
fill: 'surfaceSecondary',
|
|
6
7
|
messageTextColor: 'surfaceTextPrimary',
|
|
7
|
-
messageTextSize: '
|
|
8
|
+
messageTextSize: 'm',
|
|
8
9
|
primaryButtonAppearance: 'surfaceTertiary',
|
|
9
|
-
primaryButtonLabel: 'primary Button',
|
|
10
10
|
primaryButtonLabelTextSize: 'l',
|
|
11
11
|
primaryButtonShape: 'rounded',
|
|
12
12
|
primaryButtonSize: 'xxl',
|
|
13
13
|
primaryButtonWidth: 'fill',
|
|
14
|
-
secondaryButtonAppearance: '
|
|
15
|
-
secondaryButtonLabel: 'secondary Button',
|
|
14
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
16
15
|
secondaryButtonLabelTextSize: 'l',
|
|
17
16
|
secondaryButtonShape: 'rounded',
|
|
18
17
|
secondaryButtonSize: 'xxl',
|
|
19
18
|
secondaryButtonWidth: 'fill',
|
|
20
19
|
titleTextColor: 'surfaceTextPrimary',
|
|
21
20
|
titleTextSize: 'h2',
|
|
22
|
-
titleTextWeight:
|
|
21
|
+
titleTextWeight: 400,
|
|
23
22
|
},
|
|
24
|
-
|
|
23
|
+
custom: {
|
|
25
24
|
messageTextColor: 'surfaceTextPrimary',
|
|
26
|
-
messageTextSize: '
|
|
27
|
-
primaryButtonAppearance: '
|
|
25
|
+
messageTextSize: 'm',
|
|
26
|
+
primaryButtonAppearance: 'accent',
|
|
28
27
|
primaryButtonLabelTextSize: 'l',
|
|
29
28
|
primaryButtonShape: 'rounded',
|
|
30
29
|
primaryButtonSize: 'xxl',
|
|
31
30
|
primaryButtonWidth: 'fill',
|
|
32
|
-
secondaryButtonAppearance: '
|
|
31
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
33
32
|
secondaryButtonLabelTextSize: 'l',
|
|
34
33
|
secondaryButtonShape: 'rounded',
|
|
35
34
|
secondaryButtonSize: 'xxl',
|
|
36
35
|
secondaryButtonWidth: 'fill',
|
|
37
36
|
titleTextColor: 'surfaceTextPrimary',
|
|
38
37
|
titleTextSize: 'h2',
|
|
39
|
-
titleTextWeight:
|
|
38
|
+
titleTextWeight: 400,
|
|
40
39
|
},
|
|
41
|
-
|
|
40
|
+
error: {
|
|
41
|
+
imageSrc: '/img/response/Error.svg',
|
|
42
42
|
messageTextColor: 'surfaceTextPrimary',
|
|
43
|
-
messageTextSize: '
|
|
44
|
-
primaryButtonAppearance: '
|
|
43
|
+
messageTextSize: 'm',
|
|
44
|
+
primaryButtonAppearance: 'secondary',
|
|
45
45
|
primaryButtonLabelTextSize: 'l',
|
|
46
46
|
primaryButtonShape: 'rounded',
|
|
47
47
|
primaryButtonSize: 'xxl',
|
|
48
48
|
primaryButtonWidth: 'fill',
|
|
49
|
-
secondaryButtonAppearance: '
|
|
49
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
50
50
|
secondaryButtonLabelTextSize: 'l',
|
|
51
51
|
secondaryButtonShape: 'rounded',
|
|
52
52
|
secondaryButtonSize: 'xxl',
|
|
53
53
|
secondaryButtonWidth: 'fill',
|
|
54
54
|
titleTextColor: 'surfaceTextPrimary',
|
|
55
55
|
titleTextSize: 'h2',
|
|
56
|
-
titleTextWeight:
|
|
56
|
+
titleTextWeight: 400,
|
|
57
57
|
},
|
|
58
58
|
success: {
|
|
59
|
+
imageSrc: '/img/response/Success.svg',
|
|
59
60
|
messageTextColor: 'surfaceTextPrimary',
|
|
60
|
-
messageTextSize: '
|
|
61
|
+
messageTextSize: 'm',
|
|
61
62
|
primaryButtonAppearance: 'accent',
|
|
62
63
|
primaryButtonLabelTextSize: 'l',
|
|
63
64
|
primaryButtonShape: 'rounded',
|
|
64
65
|
primaryButtonSize: 'xxl',
|
|
65
66
|
primaryButtonWidth: 'fill',
|
|
66
|
-
secondaryButtonAppearance: '
|
|
67
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
67
68
|
secondaryButtonLabelTextSize: 'l',
|
|
68
69
|
secondaryButtonShape: 'rounded',
|
|
69
70
|
secondaryButtonSize: 'xxl',
|
|
70
71
|
secondaryButtonWidth: 'fill',
|
|
71
72
|
titleTextColor: 'surfaceTextPrimary',
|
|
72
73
|
titleTextSize: 'h2',
|
|
73
|
-
titleTextWeight:
|
|
74
|
+
titleTextWeight: 400,
|
|
74
75
|
},
|
|
75
76
|
warning: {
|
|
77
|
+
imageSrc: '/img/response/Warning.svg',
|
|
76
78
|
messageTextColor: 'surfaceTextPrimary',
|
|
77
|
-
messageTextSize: '
|
|
79
|
+
messageTextSize: 'm',
|
|
78
80
|
primaryButtonAppearance: 'primary',
|
|
79
81
|
primaryButtonLabelTextSize: 'l',
|
|
80
82
|
primaryButtonShape: 'rounded',
|
|
81
83
|
primaryButtonSize: 'xxl',
|
|
82
84
|
primaryButtonWidth: 'fill',
|
|
83
|
-
secondaryButtonAppearance: '
|
|
85
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
86
|
+
secondaryButtonLabelTextSize: 'l',
|
|
87
|
+
secondaryButtonShape: 'rounded',
|
|
88
|
+
secondaryButtonSize: 'xxl',
|
|
89
|
+
secondaryButtonWidth: 'fill',
|
|
90
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
91
|
+
titleTextSize: 'h2',
|
|
92
|
+
titleTextWeight: 400,
|
|
93
|
+
},
|
|
94
|
+
fail: {
|
|
95
|
+
imageSrc: '/img/response/Fail.svg',
|
|
96
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
97
|
+
messageTextSize: 'm',
|
|
98
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
99
|
+
primaryButtonLabelTextSize: 'l',
|
|
100
|
+
primaryButtonShape: 'rounded',
|
|
101
|
+
primaryButtonSize: 'xxl',
|
|
102
|
+
primaryButtonWidth: 'fill',
|
|
103
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
104
|
+
secondaryButtonLabelTextSize: 'l',
|
|
105
|
+
secondaryButtonShape: 'rounded',
|
|
106
|
+
secondaryButtonSize: 'xxl',
|
|
107
|
+
secondaryButtonWidth: 'fill',
|
|
108
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
109
|
+
titleTextSize: 'h2',
|
|
110
|
+
titleTextWeight: 400,
|
|
111
|
+
},
|
|
112
|
+
search: {
|
|
113
|
+
imageSrc: '/img/response/Search.svg',
|
|
114
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
115
|
+
messageTextSize: 'm',
|
|
116
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
117
|
+
primaryButtonLabelTextSize: 'l',
|
|
118
|
+
primaryButtonShape: 'rounded',
|
|
119
|
+
primaryButtonSize: 'xxl',
|
|
120
|
+
primaryButtonWidth: 'fill',
|
|
121
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
122
|
+
secondaryButtonLabelTextSize: 'l',
|
|
123
|
+
secondaryButtonShape: 'rounded',
|
|
124
|
+
secondaryButtonSize: 'xxl',
|
|
125
|
+
secondaryButtonWidth: 'fill',
|
|
126
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
127
|
+
titleTextSize: 'h2',
|
|
128
|
+
titleTextWeight: 400,
|
|
129
|
+
},
|
|
130
|
+
cantLoadData: {
|
|
131
|
+
imageSrc: '/img/response/CantLoadData.svg',
|
|
132
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
133
|
+
messageTextSize: 'm',
|
|
134
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
135
|
+
primaryButtonLabelTextSize: 'l',
|
|
136
|
+
primaryButtonShape: 'rounded',
|
|
137
|
+
primaryButtonSize: 'xxl',
|
|
138
|
+
primaryButtonWidth: 'fill',
|
|
139
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
140
|
+
secondaryButtonLabelTextSize: 'l',
|
|
141
|
+
secondaryButtonShape: 'rounded',
|
|
142
|
+
secondaryButtonSize: 'xxl',
|
|
143
|
+
secondaryButtonWidth: 'fill',
|
|
144
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
145
|
+
titleTextSize: 'h2',
|
|
146
|
+
titleTextWeight: 400,
|
|
147
|
+
},
|
|
148
|
+
refresh: {
|
|
149
|
+
imageSrc: '/img/response/Refresh.svg',
|
|
150
|
+
messageTextColor: 'surfaceTextPrimary',
|
|
151
|
+
messageTextSize: 'm',
|
|
152
|
+
primaryButtonAppearance: 'surfaceTertiary',
|
|
153
|
+
primaryButtonLabelTextSize: 'l',
|
|
154
|
+
primaryButtonShape: 'rounded',
|
|
155
|
+
primaryButtonSize: 'xxl',
|
|
156
|
+
primaryButtonWidth: 'fill',
|
|
157
|
+
secondaryButtonAppearance: 'surfaceSecondary',
|
|
84
158
|
secondaryButtonLabelTextSize: 'l',
|
|
85
159
|
secondaryButtonShape: 'rounded',
|
|
86
160
|
secondaryButtonSize: 'xxl',
|
|
87
161
|
secondaryButtonWidth: 'fill',
|
|
88
162
|
titleTextColor: 'surfaceTextPrimary',
|
|
89
163
|
titleTextSize: 'h2',
|
|
90
|
-
titleTextWeight:
|
|
164
|
+
titleTextWeight: 400,
|
|
91
165
|
},
|
|
92
166
|
};
|
|
93
167
|
|
|
@@ -7,23 +7,23 @@ var clsx = require('clsx');
|
|
|
7
7
|
var castArray = require('lodash/castArray');
|
|
8
8
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
9
9
|
var useStyles = require('../hooks/useStyles.js');
|
|
10
|
-
var Divider = require('../../Divider-
|
|
11
|
-
var Icon = require('../../Icon-
|
|
12
|
-
var Text = require('../../Text-
|
|
10
|
+
var Divider = require('../../Divider-3upWnf8a.js');
|
|
11
|
+
var Icon = require('../../Icon-PoesVPJn.js');
|
|
12
|
+
var Text = require('../../Text-1b-Bk7yG.js');
|
|
13
13
|
require('lodash/camelCase');
|
|
14
14
|
require('../context/UIContext.js');
|
|
15
|
-
require('prop-types');
|
|
16
15
|
require('../hooks/useMediaQueries.js');
|
|
17
16
|
require('react-responsive');
|
|
18
17
|
require('lodash/maxBy');
|
|
19
18
|
require('lodash/upperFirst');
|
|
20
19
|
require('../hooks/styleAttributes.js');
|
|
20
|
+
require('../appearance/Divider.js');
|
|
21
21
|
require('react-inlinesvg');
|
|
22
22
|
require('../appearance/Icon.js');
|
|
23
23
|
require('../../Link-CqWzwh8V.js');
|
|
24
|
-
require('../../Tooltip-
|
|
24
|
+
require('../../Tooltip-CNJN2lf5.js');
|
|
25
25
|
require('../appearance/Tooltip.js');
|
|
26
|
-
require('../../Title-
|
|
26
|
+
require('../../Title-o5ofk8ge.js');
|
|
27
27
|
require('../appearance/Title.js');
|
|
28
28
|
require('../appearance/Text.js');
|
|
29
29
|
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
|
+
var index = require('../appearance/Avatar.js');
|
|
6
7
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
7
|
-
var Icon = require('../../Icon-
|
|
8
|
+
var Icon = require('../../Icon-PoesVPJn.js');
|
|
8
9
|
var Image = require('../../Image-DrUlRMHa.js');
|
|
9
|
-
var Text = require('../../Text-
|
|
10
|
+
var Text = require('../../Text-1b-Bk7yG.js');
|
|
10
11
|
require('lodash/castArray');
|
|
11
12
|
require('lodash/camelCase');
|
|
12
13
|
require('../context/UIContext.js');
|
|
13
|
-
require('prop-types');
|
|
14
14
|
require('../hooks/useMediaQueries.js');
|
|
15
15
|
require('react-responsive');
|
|
16
|
+
require('../../tslib.es6-CCZ3TN_7.js');
|
|
16
17
|
require('react-inlinesvg');
|
|
17
18
|
require('../appearance/Icon.js');
|
|
18
19
|
require('../hooks/useStyles.js');
|
|
@@ -20,15 +21,20 @@ require('lodash/maxBy');
|
|
|
20
21
|
require('lodash/upperFirst');
|
|
21
22
|
require('../hooks/styleAttributes.js');
|
|
22
23
|
require('../../Link-CqWzwh8V.js');
|
|
23
|
-
require('../../
|
|
24
|
-
require('../../Tooltip-PrwacZFC.js');
|
|
24
|
+
require('../../Tooltip-CNJN2lf5.js');
|
|
25
25
|
require('../appearance/Tooltip.js');
|
|
26
|
-
require('../../Title-
|
|
26
|
+
require('../../Title-o5ofk8ge.js');
|
|
27
27
|
require('../appearance/Title.js');
|
|
28
28
|
require('../appearance/Text.js');
|
|
29
29
|
|
|
30
|
+
var avatarConfig = {
|
|
31
|
+
appearance: index.avatarAppearance,
|
|
32
|
+
setAppearance: function (newComponent) {
|
|
33
|
+
avatarConfig.appearance = newComponent;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
30
36
|
function Avatar(props) {
|
|
31
|
-
var
|
|
37
|
+
var after = props.after, appearance = props.appearance, before = props.before, className = props.className, Dot = props.Dot, _a = props.firstName, firstName = _a === void 0 ? '' : _a, icon = props.icon, iconFill = props.iconFill, iconFillHover = props.iconFillHover, iconFillSize = props.iconFillSize, iconItemFill = props.iconItemFill, iconShape = props.iconShape, iconSize = props.iconSize, iconSrc = props.iconSrc, mode = props.mode, _b = props.secondName, secondName = _b === void 0 ? '' : _b, _c = props.size, size = _c === void 0 ? '96' : _c, src = props.src, _d = props.textColor, textColor = _d === void 0 ? 'surfaceTextTertiary' : _d, _e = props.textSize, textSize = _e === void 0 ? 'l' : _e, _f = props.textWeight, textWeight = _f === void 0 ? '600' : _f, type = props.type, onClick = props.onClick;
|
|
32
38
|
var fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
33
39
|
prefix: 'fill_',
|
|
34
40
|
propsKey: 'fill',
|
|
@@ -46,7 +52,15 @@ function Avatar(props) {
|
|
|
46
52
|
var secondChar = ((secondName === null || secondName === void 0 ? void 0 : secondName[0]) || '').toUpperCase();
|
|
47
53
|
return "".concat(firstChar).concat(secondChar);
|
|
48
54
|
}, [firstName, secondName]);
|
|
49
|
-
|
|
55
|
+
var appearanceConfig = appearance && avatarConfig.appearance && avatarConfig.appearance[appearance];
|
|
56
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'avatar', shapeClass ||
|
|
57
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.shape) &&
|
|
58
|
+
"avatar_shape_".concat(appearanceConfig.shape).replace(/([A-Z])/g, '-$1').toLowerCase()), mode && "avatar_mode_".concat(mode), size && "avatar_size_".concat(size), type && "avatar_type_".concat(type), Dot && 'avatar_status', onClick && 'cursor_type_pointer'), onClick: onClick, children: jsxRuntime.jsxs("div", { className: clsx('avatar__wrapper', fillClass ||
|
|
59
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.fill) &&
|
|
60
|
+
"fill_".concat(appearanceConfig.fill).replace(/([A-Z])/g, '-$1').toLowerCase()), fillHoverClass ||
|
|
61
|
+
((appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.fillHover) &&
|
|
62
|
+
"fill_hover_".concat(appearanceConfig.fillHover).replace(/([A-Z])/g, '-$1').toLowerCase())), children: [before, src ? (jsxRuntime.jsx(Image.Image, { className: "avatar__image", shape: "geometric", src: src })) : (jsxRuntime.jsx(Text.Text, { className: "avatar__name", size: textSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textSize), textColor: textColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textColor), textWeight: textWeight || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textWeight), children: avatarChars })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "avatar__icon", fill: iconFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFill), fillHover: iconFillHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFillHover), fillSize: iconFillSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconFillSize), iconFill: iconItemFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconItemFill), iconSize: iconSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconSize), imageSrc: iconSrc || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconSrc), shape: iconShape || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.iconShape), SvgImage: icon || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.icon) })), Dot, after] }) }));
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
exports.Avatar = Avatar;
|
|
66
|
+
exports.avatarConfig = avatarConfig;
|